1
0
Fork 0
Commit graph

167 commits

Author SHA1 Message Date
Soeren Sandmann
ba18c630b7 Handle crossing events during resizing. (#93384).
Mon Dec  9 22:09:56 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/display.c, src/window.c: Handle crossing events during
	resizing. (#93384).
2002-12-09 21:07:27 +00:00
Havoc Pennington
8d314aead8 make this always return FALSE for now, to avoid bug reports.
2002-12-08  Havoc Pennington  <hp@pobox.com>

	* src/prefs.c (meta_prefs_get_application_based): make this always
	return FALSE for now, to avoid bug reports.

	* src/util.c (ensure_logfile): put "opened log file" message on
	stderr so it will normally land in ~/.xsession-errors

	* configure.in: remove extra AC_ARG_PROGRAM

	* src/display.c (event_callback): handle the toggle-verbose message

	* src/tools/metacity-message.c: add a toggle-verbose message, been
	meaning to do this for a while.

	* src/util.c (meta_set_verbose): if verbose mode is enabled and we
	don't support it, then exit.

	* src/prefs.c: allow building without gconf (currently means some
	prefs are no-ops)

	* src/util.c, src/util.h: support defining macros to
	kill all verbose output entirely. (Removes the code and strings
	associated with it)

	* configure.in: don't get METACITY_PROPS_LIBS if not building the
	config dialog.
	(HAVE_GCONF): allow building sans gconf, if you are size-sensitive
	and not using gnome.
	(WITH_VERBOSE_MODE): add ability to disable all the verbose debug
	spew strings, to shrink the binary.
	(--disable-sm): allow SM support to be forced on or off
	(--disable-startup-notification): allow forcing this on or off
2002-12-08 19:17:17 +00:00
Hidetoshi Tajima
d275e4bbc2 move a window to the current space on the MapRequest when it's not on the
* src/display.c (event_callback): move a window to the current
	space on the MapRequest when it's not on the space yet. #100390
2002-12-05 21:59:14 +00:00
Havoc Pennington
5e1439f89e lengthen to 15 seconds
2002-11-30  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (STARTUP_TIMEOUT): lengthen to 15 seconds

	* src/util.c (utf8_fputs): hmm, return a value

	* src/screen.c (meta_screen_apply_startup_properties): new
	function to apply initial workspace based on startup sequence.

	* src/window.c (meta_window_new): load _NET_STARTUP_ID
	(meta_window_get_startup_id): new function

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	hooks for _NET_STARTUP_ID

	* src/display.c (event_callback): send property events to
	groups.

	* src/xprops.c (meta_prop_get_values): make a type of INVALID
	mean to ignore that property (don't fetch its value).

	* src/group.c (meta_group_property_notify): new function

	* src/screen.c (set_supported_hint): support _NET_STARTUP_ID

	* src/display.c (meta_display_open): add _NET_STARTUP_ID to atoms
	we initialize

	* src/group-private.h: private header shared between
	group-props.c, group.c

	* src/group-props.h, src/group-props.c: new files to contain
	functions for retrieving group properties

	* src/window.c (meta_window_same_application): change this a bit
	to work with new definition of group

	* src/group.c (meta_window_get_group): always create a group for
	every window, using the window's own ID as group leader if
	required.

	* src/window.c (update_wm_hints): handle changes to group leader

	* src/group.c (meta_window_group_leader_changed): new function

	* src/display.h (struct _MetaDisplay): _NET_WM_WINDOW_TYPE_SPLASH,
	not SPLASHSCREEN. Reported by Gregory Merchan and Matthias Clasen.

	* src/screen.c (startup_sequence_timeout): when timing out a
	startup sequence, send a remove message, don't just time it out
	locally.
2002-12-01 03:58:04 +00:00
Havoc Pennington
fd135d0869 patch from Hidetoshi Tajima to move a window's transients when moving the
2002-11-22  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_change_workspace): patch from
	Hidetoshi Tajima to move a window's transients when moving
	the window between workspaces. #98900

2002-11-21  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_open): init ret_to to
	RevertToPointerRoot out of sheer paranoia; don't want no
	RevertToNone in my code!
2002-11-22 06:00:18 +00:00
Havoc Pennington
c613fed9ef push an error trap around the whole window-key-grab loop
2002-11-06  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (grab_keys): push an error trap around the
	whole window-key-grab loop
	(ungrab_all_keys): avoid requiring return value from the error
	trap, unless in debugging mode
	(regrab_window_bindings, regrab_screen_bindings): push traps
	around the loops, for efficiency

	* src/display.c (event_callback): fix from Padraig O'Briain to
	compress extra MappingNotify events to avoid extra work.
2002-11-06 16:00:56 +00:00
Havoc Pennington
e0a4c2a1df remove XSync calls from here (meta_display_ungrab): remove XSync from
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_grab): remove XSync calls from here
	(meta_display_ungrab): remove XSync from here, but put in
	an XFlush to be sure we get the ungrab sent.

	* src/util.c (meta_topic): track sync count here

	* src/errors.c: move sync count out of here

        Throughout: error spew on all XSync() calls

	* src/run-metacity.sh: don't set METACITY_DEBUG
2002-11-04 00:56:12 +00:00
Havoc Pennington
d7917c02fe use window-props.h stuff for a couple of properties (implement_showing):
2002-11-03  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_new): use window-props.h stuff for a
	couple of properties
	(implement_showing): fix printf string

	* src/xprops.c (meta_prop_free_values): new function

	* src/window-props.h, src/window-props.c: start moving code that
	handles loading window properties into this file.
2002-11-03 23:42:21 +00:00
Havoc Pennington
effec94613 store the window menu on the display and blow it away when a window
2002-10-28  Havoc Pennington  <hp@pobox.com>

	* src/window.c, src/display.c: store the window menu on the
	display and blow it away when a window closes, so we don't
	get funny stuck menus. Patch from Martin Garton #87514
2002-10-28 05:35:30 +00:00
Havoc Pennington
e8097a6f8f fix build 2002-10-26 01:49:03 +00:00
Havoc Pennington
cb27f0c4be Add "busy cursor on app startup" support, conditionally - works only if
2002-10-25  Havoc Pennington  <hp@pobox.com>

        Add "busy cursor on app startup" support, conditionally - works
	only if libstartup-notification is found, and in practice requires
	a GTK patch that's not in yet.

	* src/screen.c: monitor startup events and set busy cursor if
	appropriate

	* src/display.c (meta_display_open): create SnDisplay

	* configure.in: check for startup notification,
	and add the cute "configure summary" at the end
2002-10-25 23:35:50 +00:00
Havoc Pennington
15a05467bd put minimized windows at the end of Alt+Tab, #89416
2002-10-24  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_get_tab_list): put minimized windows
	at the end of Alt+Tab, #89416
2002-10-24 05:15:28 +00:00
Havoc Pennington
c6b475b251 Optimizations for managing new windows (do not all take effect if
2002-10-21  Havoc Pennington  <hp@redhat.com>

	Optimizations for managing new windows (do not all take effect if
	METACITY_DEBUG=1). Bug #96404

	* src/keybindings.c (meta_change_keygrab): use error trap nesting
	and conditionalize on meta_is_verbose() to avoid a ton of XSync

	* src/display.c (meta_change_button_grab): ditto

	Throughout: move to new error trap setup to save on XSync calls,
	new setup is:

	* src/errors.c (meta_error_trap_push_with_return): new function,
	an error trap that needs to care about return value and thus
	sync even if an outer trap still exists
	(meta_error_trap_pop_with_return): new function
	(meta_error_trap_pop): add "last_request_was_roundtrip"
	argument allowing us to avoid XSync() if we just did
	a GetProperty or whatever.

	* src/util.c (meta_warning): flush the warning file descriptor

	* src/Makefile.am (INCLUDES): define G_LOG_DOMAIN
2002-10-21 21:44:35 +00:00
Havoc Pennington
337812d51d workspaces are all per-screen now, fix accordingly
2002-10-16  Havoc Pennington  <hp@redhat.com>

	* src/workspace.c: workspaces are all per-screen now, fix
	accordingly

	* src/core.c: fix multihead workspace stuff

	* src/keybindings.c: multihead-rama

	* src/screen.c (meta_screen_show_desktop): new functions to
	replace display equivalents

	* src/display.c (meta_display_get_workspace_by_screen_index): get
	rid of this
	(meta_display_get_workspace_by_index): get rid of this
	(event_callback): handle _NET_SHOWING_DESKTOP message per-screen

	* src/screen.c (meta_screen_get_workspace_by_index): new function

	* src/screen.h (struct _MetaScreen): move workspace list, and
	showing_desktop flag, to be per-screen

	* src/window.c (window_query_root_pointer): return whether pointer
	is on window's screen
	(meta_window_handle_mouse_grab_op_event): don't use coordinates
	from other screens when updating a window operation on the current
	screen. I can't believe no one has reported this...
2002-10-16 20:12:24 +00:00
Federico Mena Quintero
8c2e8ddf5c Ignore EnterNotify events when the detail field is set to NotifyInferior.
2002-10-14  Federico Mena Quintero  <federico@ximian.com>

	* src/display.c (event_callback): Ignore EnterNotify events when
	the detail field is set to NotifyInferior.  Fixes #95747.
2002-10-15 14:46:12 +00:00
Havoc Pennington
82e5cb578c don't raise window on button 2 click, only on button 1 and button 3.
2002-10-11  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): don't raise window on button 2
	click, only on button 1 and button 3.

	* src/frames.c (meta_frames_button_press_event): lower on button 2
	press on frame

	* src/core.c (meta_core_user_lower): new function
2002-10-11 18:42:40 +00:00
Havoc Pennington
f08337d939 Add a modifier key preference for the Alt+click stuff. Can be set to
2002-10-07  Havoc Pennington  <hp@redhat.com>

        Add a modifier key preference for the Alt+click stuff.
	Can be set to "disabled" as well.

	* src/run-metacity.sh: load .Xmodmap in the Xnest if it exists

	* src/display.c (meta_display_ungrab_window_buttons): ungrab
	AnyModifier in case the modifier changed since we grabbed
	(meta_display_open): rearrange code to use meta_display_close() to
	mop up when we can't find any screens, avoiding the need to
	keep the bail-out code in sync with meta_display_close.

	* src/keybindings.c (devirtualize_modifiers): move this function
	to a public place in display.c

	* src/metacity.schemas.in: add setting for the modifier key
	to use for Alt+left/middle/right click.

	* src/prefs.c (update_binding): add a missing newline to a warning
	(meta_prefs_get_mouse_button_mods): new function

	* src/ui.c (meta_ui_parse_modifier): new function
2002-10-07 23:14:40 +00:00
Havoc Pennington
9de7b59e93 do XRRUpdateConfiguration() if we have RandR extension, else poke in
2002-10-04  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): do XRRUpdateConfiguration()
	if we have RandR extension, else poke in Xlib's screen struct to
	update the screen size.

	* configure.in: fix a bogus overwrite of cppflags,
	add a check for RandR extension
2002-10-04 18:31:54 +00:00
Havoc Pennington
94b6dde6bb make it static
2002-10-01  Havoc Pennington  <hp@pobox.com>

	* src/screen.c (meta_screen_resize_func): make it static

	* src/stack.c (get_standalone_layer): put above/below windows
	in an appropriate layer.

	* src/screen.c (set_supported_hint): say we support above/below

	* src/display.h (struct _MetaDisplay): add _NET_WM_STATE_ABOVE,
	_NET_WM_STATE_BELOW atoms

	* src/window.c (meta_window_client_message): handle above/below
	state messages
	(set_net_wm_state): handler above/below state
	(update_net_wm_state): handle above/below states
2002-10-02 00:47:29 +00:00
Havoc Pennington
43a726efe7 Patch from Keith Packard to handle root window resizes.
2002-09-28  Havoc Pennington  <hp@pobox.com>

        Patch from Keith Packard to handle root window resizes.

	* src/screen.c (reload_xinerama_infos): factor out Xinerama code
	(meta_screen_resize): implement this, to be called from display.c
	on screen resize

	* src/display.c (event_callback): handle ConfigureNotify on root
	windows
2002-09-29 02:50:24 +00:00
Havoc Pennington
74b3bca93d Try to handle Solaris Xinerama, all coded blind, someone on Solaris will
2002-09-27  Havoc Pennington  <hp@redhat.com>

        Try to handle Solaris Xinerama, all coded blind, someone
	on Solaris will need to debug the typos.

	* src/display.c: updates for Solaris Xinerama

	* src/screen.c: updates for Solaris Xinerama

	* configure.in: make Xinerama check more complicated to catch
	Solaris Xinerama
2002-09-27 20:28:34 +00:00
Havoc Pennington
94e75ba53c re-enable the log handler, maybe it will break something, I don't remember
2002-09-23  Havoc Pennington  <hp@pobox.com>

	* src/main.c (main): re-enable the log handler, maybe it will
	break something, I don't remember why I turned it off.

	* src/display.c: s/_NET_SHOW_DESKTOP/_NET_SHOWING_DESKTOP/ which
	is what's in the spec
2002-09-24 02:04:32 +00:00
Havoc Pennington
6ab198ac22 small reordering of code
2002-09-22  Havoc Pennington  <hp@pobox.com>

	* src/window.c (recalc_window_features): small reordering of
	code

	* src/display.c (meta_spew_event): more spew for MapNotify,
	UnmapNotify

	* src/window.c (recalc_window_features): spew more stuff

	* src/display.c (meta_spew_event): spew override_redirect field of
	ConfigureNotify
2002-09-23 01:43:20 +00:00
Havoc Pennington
cbb0b8e66c new function
2002-09-03  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_get_tab_current): new function

	* src/keybindings.c (do_choose_window): apply modified patch from
	JeyaSudha to still display tab popup if only one window is on the
	desktop.
2002-09-04 04:15:46 +00:00
Havoc Pennington
8b7447b282 _NET_SUPPORTING_WM_CHECK is supposed to have type WINDOW not CARDINAL.
2002-08-25  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_open): _NET_SUPPORTING_WM_CHECK is
	supposed to have type WINDOW not CARDINAL. reported by
	Ben Jansens
2002-08-25 17:53:27 +00:00
Keith Packard
0f9bdb18f5 Place cursors on frames, not root 2002-08-23 18:00:40 +00:00
Havoc Pennington
e74969bd17 if in the title rect check for y <= TOP_RESIZE_HEIGHT
2002-08-20  Havoc Pennington  <hp@redhat.com>

	* src/frames.c (get_control): if in the title rect check for y
	<= TOP_RESIZE_HEIGHT

	* src/display.c (meta_spew_event): put x/y coordinates in spew for
	enter/leave notify

	* src/frames.c (meta_frames_motion_notify_event): move cursor
	changing from here to update_prelit_control so it happens on enter
	notify as well
	(get_control): change test "y < TOP_RESIZE_HEIGHT" to
	"y <= TOP_RESIZE_HEIGHT"

	* src/Makefile.am (EXTRA_DIST): include .in files in EXTRA_DIST
2002-08-20 20:18:18 +00:00
Havoc Pennington
9ed1636ffe leave has_fullscreen_func set to TRUE if the window is screen sized and
2002-08-15  Havoc Pennington  <hp@pobox.com>

	* src/window.c (recalc_window_features): leave has_fullscreen_func
	set to TRUE if the window is screen sized and undecorated, even if
	the window isn't resizable. idea from Christian - Manny Calavera -
	Neumair

	* src/keybindings.c (handle_toggle_fullscreen)
	(handle_toggle_maximize): these disabled fullscreen/maximize if
	the window wasn't resizable, should have used has_fullscreen_func
	has_maximize_func instead.

2002-08-15  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c: implement raise/lower

	* src/metacity.schemas.in: add raise/lower

	* src/prefs.c: add "raise" and "lower" prefs to keybindings

	* src/display.c (meta_display_set_grab_op_cursor): assert that
	the screen arg is non-NULL in appropriate cases
2002-08-15 05:14:49 +00:00
Jayaraj Rajappan
bb9cc21d8e In XGrabPointer, set the confine_to argument to the root window of the
2002-08-14  Jayaraj Rajappan <jayaraj.rajappan@wipro.com>

        * src/display.c (meta_display_set_grab_op_cursor):
        In XGrabPointer, set the confine_to argument to the root window
        of the screen the window is on.

        * src/display.h: add screen argument.

        * src/window.c (meta_window_update_resize_grab_op):
        pass screen argument as NULL.
2002-08-14 16:51:13 +00:00
Havoc Pennington
27e35b8bcd window is in fullscreen layer if any member of its group is fullscreen
2002-08-12  Havoc Pennington  <hp@redhat.com>

	* src/stack.c (compute_layer): window is in fullscreen layer if
	any member of its group is fullscreen

	* src/window.c (meta_window_unmake_fullscreen): update layer for
	whole window group
	(meta_window_make_fullscreen): ditto

	* src/util.c (meta_unsigned_long_hash): move hash/equal funcs for
	Window in here.

	* src/group.c: track window groups so we can do stuff with them.
2002-08-12 21:32:13 +00:00
Havoc Pennington
f36d236a55 track time to avoid sending a deluge of move/resize requests, suggestion
2002-08-10  Havoc Pennington  <hp@pobox.com>

	* src/window.c (update_resize): track time to avoid sending a
	deluge of move/resize requests, suggestion from
	xavier.bestel@free.fr bug #86830. Not really sure if this will
	make a difference or not. We'll see I guess.
	(update_move): do same on move though it seems less important
	here.

	* src/display.h (struct _MetaDisplay): store the
	last time we sent a move/resize event.
2002-08-10 05:27:17 +00:00
Craig Black
4fcc9f052e Patch to provide extra cues to the user when using window menu move and
2002-08-08  Craig Black  <blackc@speakeasy.net>

  Patch to provide extra cues to the user when using
  window menu move and resize, #85724.

  * src/common.h: add new cursors

  * src/display.c: (grab_op_is_mouse)
  (meta_display_create_x_cursor), (xcursor_for_op),
  (meta_display_set_grab_op_cursor),
  (meta_display_begin_grab_op):
  The keyboard move and resize grab ops now also use the mouse.
  Allow the grab cursor to be changed during the grab op.
  Hold onto the initial grab position in case of reset.

  * src/display.h: save the initial grab position

  * src/keybindings.c: (process_keyboard_move_grab),
  (process_keyboard_resize_grab), (handle_begin_move),
  (handle_begin_resize):
  The keyboard move and resize grab ops now also use the mouse.

  * src/window.c: (meta_window_client_message), (menu_callback),
  (update_move), (update_resize),
  (meta_window_handle_mouse_grab_op_event), (warp_pointer),
  (meta_window_warp_pointer), (meta_window_begin_grab_op),
  (meta_window_update_resize_grab_op):
  When moving or resizing a window use the last grab position
  in computing change increment.
  Provide support for warping the mouse pointer.

  * src/window.h: new warp pointer and grab op helper functions
2002-08-09 04:27:23 +00:00
Craig Black
d299fbd8da focus top window after showing desktop, fixes #88080.
2002-08-07  Craig Black  <blackc@speakeasy.net>

  * src/display.c: (meta_display_unshow_desktop): focus
  top window after showing desktop, fixes #88080.
2002-08-08 05:28:51 +00:00
Craig Black
7a598e5567 clear expected focus window on open
2002-08-07  Craig Black  <blackc@speakeasy.net>

  * src/display.c: (meta_display_open): clear expected focus window
  on open

  * src/display.h: add expected_focus_window field

  * src/window.c: (meta_window_make_fullscreen),
  (meta_window_unmake_fullscreen): change meta_window_update_layer()
  to meta_stack_update_layer() so build works again.
  (meta_window_free), (meta_window_make_fullscreen),
  (meta_window_focus), (meta_window_notify_focus): keep track of
  expected focus window after sending WM_TAKE_FOCUS event,
  previously if a UnmapNotify event arrived before the FocusIn event
  we would lose focus, fixes #84564.
2002-08-08 04:45:13 +00:00
Havoc Pennington
00dcef82e3 disable animation when shading windows, just doesn't really convey the
2002-07-28  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_shade): disable animation when shading
	windows, just doesn't really convey the idea anyway.

	* src/effects.c: Move to using a shaped window instead of
	IncludeInferiors to do the animations, looks a lot better
	because we don't have to grab the server.

	* src/window.c (meta_window_change_workspace): remove bogus
	assertion that was causing a crash
	(meta_window_new): auto-fullscreen huge undecorated windows.

	* src/keybindings.c (switch_to_workspace): use
	meta_window_change_workspace() to avoid same bug in cut-and-paste
	code from there
2002-08-06 04:11:23 +00:00
Havoc Pennington
585e362526 raise/focus on click, even if the click was on the client area (this makes
2002-08-04  Havoc Pennington  <hp@redhat.com>

	* src/frames.c (meta_frames_button_press_event): raise/focus
	on click, even if the click was on the client area
	(this makes Alt+button1 raise windows again, yay)

	* src/stack.c (compute_layer): put panels in the DOCK layer always
	(keep them on top of other windows). Still sloppy-focus raised
	with respect to other docks.

	* configure.in: remove -Wshadow for now as GTK headers make all
	kinds of noise with it.
2002-08-04 20:20:53 +00:00
Havoc Pennington
583596178f use MetaMenuIconType not button type for the size of the menu ops array
2002-08-04  Havoc Pennington  <hp@redhat.com>

	* src/theme.c (free_menu_ops): use MetaMenuIconType not button
	type for the size of the menu ops array
	(meta_theme_define_int_constant): return TRUE on success (how the
	heck did this ever work?)
	(meta_theme_define_float_constant): return TRUE on success
	(meta_frame_style_validate): allow the "positional" buttons to
	be omitted for now.

	* src/testgradient.c (render_multi): don't define N_COLORS twice

	* src/theme-viewer.c (run_theme_benchmark): don't define
	ITERATIONS twice

	* src/theme.c (button_rect): handle new button types
	(meta_button_type_to_string): update
	(meta_button_type_from_string): update

	* src/theme.h (enum): add button types for the 6 possible button
	positions. No way to reposition buttons still but this will allow
	themes to go ahead and support doing so.
2002-08-04 20:02:45 +00:00
Craig Black
dc5a81ac77 Have ButtonPress and UnmapNotify events account for a null grab window,
2002-08-03  Craig Black  <blackc@speakeasy.net>

  * src/display.c: (event_callback): Have ButtonPress and UnmapNotify
  events account for a null grab window, fixes #87896
2002-08-03 23:07:04 +00:00
Mark McLoughlin
95e4c6ac2a Implements support for _NET_WM_ALLOWED_ACTIONS. Fixes #84282.
2002-08-01  Mark McLoughlin  <mark@skynet.ie>

        Implements support for _NET_WM_ALLOWED_ACTIONS.
        Fixes #84282.

        * src/display.[ch]: (meta_display_open): add
        _NET_WM_ALLOWED_ACTIONS atoms.

        * src/screen.c: (set_supported_hint): set them
        as being supported.

        * src/window.c:
        (set_allowed_actions_hint): impl setting
        _NET_WM_ALLOWED_ACTIONS.
        (recalc_window_features): use it here, but only
        if things have changed.
2002-08-01 23:52:47 +00:00
Havoc Pennington
78a2866980 grab display across managing each screen; XGetInputFocus() on startup.
2002-07-20  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_open): grab display across managing
	each screen; XGetInputFocus() on startup.

2002-07-19  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_configure_request): disable configure
	requests during a user move/resize operation, mostly a workaround
	for stoopid apps.
2002-07-24 15:41:44 +00:00
Havoc Pennington
197c81178c handle NULL screen from screen_for_xwindow
2002-07-23  Havoc Pennington  <hp@redhat.com>

	* src/keybindings.c (meta_display_process_key_event): handle
	NULL screen from screen_for_xwindow

	* src/display.c (meta_display_screen_for_xwindow): put an error
	trap around the XGetWindowAttributes(), should fix the popular
	"closing a window results in a crash" bug.

	* src/util.c (print_backtrace): support optional backtrace
	feature using gnu libc backtrace() call
2002-07-23 19:12:02 +00:00
Havoc Pennington
a535ef6117 properly attribute selection code to Matthias Clasen
2002-07-10  Havoc Pennington  <hp@redhat.com>

	* src/display.c: properly attribute selection code to Matthias
	Clasen
2002-07-10 14:41:19 +00:00
Havoc Pennington
a62b3c8b29 Apply blackc@speakeasy.net patch, bug #83940, to do mini-workspaces
2002-07-06  Havoc Pennington  <hp@pobox.com>

        Apply blackc@speakeasy.net patch, bug #83940, to do
	mini-workspaces similar to the pager, when switching
	spaces.

	* src/window.c (update_net_wm_state): actually fill in
	wm_state_skip_taskbar, wm_state_skip_pager flags

	* src/tabpopup.c: support drawing a mini-workspace similar to the
	one the pager draws.

	* src/stack.c (meta_stack_list_windows): new function to list
	the windows in stacking order

	* src/screen.c (meta_screen_ensure_workspace_popup): don't pass in
	the ugly default app icon for workspaces

	* src/display.c (event_callback): fix from blackc@speakeasy.net
	to avoid dereferencing a NULL grab window.
2002-07-06 19:05:37 +00:00
Havoc Pennington
8c3437fd27 put _NET_DESKTOP_NAMES in the array of atom names, so desktop names might
2002-07-06  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_open): put _NET_DESKTOP_NAMES in the
	array of atom names, so desktop names might work and we don't read
	uninitialized memory.

	* src/main.c (main): add VERSION/timestamp verbose message.

	* src/keybindings.c: implement cycle_windows cycle_panels

	* src/metacity.schemas.in: add the cycle_windows cycle_panels
	keybindings

	* src/prefs.h (META_KEYBINDING_FOCUS_PREVIOUS): replace
	FOCUS_PREVIOUS key binding with CYCLE_WINDOWS and CYCLE_PANELS
	(not good names really, but I don't have ideas).

	* src/common.h: add a grab op for alt+esc window cycling
2002-07-06 16:50:48 +00:00
Mark McLoughlin
086f3d807e Fix broken workspace switching from my previous commit.
2002-07-01  Mark McLoughlin  <mark@skynet.ie>

        Fix broken workspace switching from my previous commit.

        * src/display.c: (meta_display_begin_grab_op): don't
        leak a pointer grab if we fail to grab the keyboard.

        * src/keybindings.c: (meta_screen_grab_keys): check
        screen->all_keys_grabbed.
        (meta_screen_grab_all_keys): regrab our standard
        bindings if we fail.
        (handle_workspace_switch): revert to our previous
        behaviour of using the last focused window to do
        the grab upon. Only use the RootWindow if there
        isn't anything else to use.

        * src/screen.c: (meta_screen_new): initialise
        all_keys_grabbed.
2002-07-01 03:20:29 +00:00
Mark McLoughlin
6b72d622a5 Fixes not being able to tab out of a workspace which contains no windows.
2002-06-26  Mark McLoughlin  <mark@skynet.ie>

        Fixes not being able to tab out of a
        workspace which contains no windows.

        * src/core.c: (meta_core_begin_grab_op): upd
        for meta_display_begin_grab_op change.
        (meta_core_get_grab_frame): allow for
        grab_window == NULL.

        * src/display.[ch]:
        (meta_display_screen_for_xwindow): implement.
        (meta_display_begin_grab_op): grab on the root window
        if window == NULL.
        (meta_display_end_grab_op): use grab_screen instead of
        grab_window.

        * src/keybindings.c:
        (grab_all_keys_and_keyboard): split out from
        meta_window_grab_all_keys.
        (ungrab_all_keys_and_keyboard): split out from
        meta_window_ungrab_all_keys.
        (meta_screen_grab_all_keys), (meta_screen_ungrab_all_keys):
        implement grabbing and ungrabbing on the root window.
        (meta_display_process_key_event): if window == NULL,
        check the event is from the same screen and process. Only
        happens with workspace switching.
        (process_workspace_switch_grab): kill window param and
        don't use grab_window.
        (handle_tab_forward), (handle_begin_move): upd for
        meta_display_begin_grab_op change.
        (handle_workspace_switch): remove brokeness. Always do
        the grab op on the root window.

        * src/keybindings.h: add meta_screen_{un}grab_all_keys.

        * src/window.c: (meta_window_client_message), (menu_callback):
        update for meta_display_begin_grab_op change.
2002-06-27 05:08:32 +00:00
Mark McLoughlin
d7b4eec74a src/screen.c: (set_supported_hint), (set_work_area_hint): Its
2002-06-25  Mark McLoughlin  <mark@skynet.ie>

        * src/display.[ch]: (meta_display_open):
          src/screen.c: (set_supported_hint), (set_work_area_hint):
        Its _NET_WORKAREA, not _NET_WM_WORKAREA silly :-)

2002-06-25  Mark McLoughlin  <mark@skynet.ie>

        * src/screen.[ch]:
        (update_num_workspaces), recalc workarea hint when
        new workspaces created. Fixes bug that workarea
        not calculated until first non-dock window is
        mapped.
        (set_work_area_hint), (set_work_area_idle_func),
        (meta_screen_queue_workarea_recalc): move all this
        stuff from workspace.c.

        * src/workspace.c: (meta_workspace_invalidate_work_area):
        use meta_screen_queue_workarea_recalc.
2002-06-25 01:12:37 +00:00
Havoc Pennington
8a8171ebc7 do nothing if screen is being unmanaged, we don't want to blow away state,
2002-06-22  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (set_number_of_spaces_hint): do nothing if
	screen is being unmanaged, we don't want to blow away state,
	we want to remember it for the next window manager.

2002-06-22  Havoc Pennington  <hp@pobox.com>

	* src/workspace.c (meta_screen_ensure_workspace_popup): rename
	from meta_workspace_ensure_tab_popup, and use workspace->name
	instead of a hardcoded name
2002-06-22 05:11:04 +00:00
Havoc Pennington
0243071f15 new utility function
2002-06-22  Havoc Pennington  <hp@pobox.com>

	* src/xprops.c (meta_prop_get_utf8_list): new utility function

	* src/display.c (meta_display_open): _NET_DESKTOP_NAMES atom
	(event_callback): update workspace names when the property changes

	* src/screen.c (set_supported_hint): "support" _NET_DESKTOP_NAMES
	(nothing to do really)
2002-06-22 04:52:35 +00:00
Havoc Pennington
b0d3660c91 handle UNKNOWN keyboard resizing state
2002-06-19  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_resize_gravity_from_grab_op): handle UNKNOWN
	keyboard resizing state

	* src/keybindings.c (process_keyboard_resize_grab): implement
	keyboard resize key handling somewhat (only vertical resize works,
	left/right arrow not implemented, and visual feedback of the
	edge we're resizing isn't implemented)

	* src/window.c (menu_callback): start keyboard resize grab when
	it's chosen from the menu
2002-06-19 04:12:49 +00:00