1
0
Fork 0
Commit graph

223 commits

Author SHA1 Message Date
Soeren Sandmann
9cee95f210 Move wireframe code before grab is released to prevent endless loops with
Fri Aug 20 12:54:12 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/display.c (meta_display_end_grab_op): Move wireframe code
	before grab is released to prevent endless loops with fullscreen
	windows.
2004-08-20 10:56:41 +00:00
Havoc Pennington
06a58f43c0 track the last_xor_rect separately from the current window size, and then
2004-08-18  Havoc Pennington  <hp@redhat.com>

	* src/display.h (struct _MetaDisplay): track the last_xor_rect
	separately from the current window size, and then use that to
	paint the wireframe including the frame, and taking into
	account shaded windows.

	* src/window.c (meta_window_get_xor_rect): new function to compute
	the xor rect; it is not really 100% right, because it uses the
	frame dimensions from the window at the start of the move/resize.
	But probably won't break in practice.
2004-08-19 02:05:24 +00:00
Elijah Newren
118a1fb76a activating the current workspace should be a no-op. This prevents a race
2004-08-07  Elijah Newren  <newren@math.utah.edu>

	* src/display.c (event_callback): activating the current workspace
	should be a no-op.  This prevents a race condition in focus window
	choice when activating a window via the taskbar.  Fix for #149589.
2004-08-08 04:11:33 +00:00
Elijah Newren
e81659d2ff Focusing a window upon unshowing the desktop in various ways (panel applet
2004-08-06  Elijah Newren  <newren@math.utah.edu>

	* src/display.c (event_callback): Focusing a window upon unshowing
	the desktop in various ways (panel applet or keybinding) was
	inconsistent for sloppy and click focus modes.  Fix this by
	calling meta_workspace_focus_default_window after unshowing the
	desktop via a _NET_SHOWING_DESKTOP message.  (resolves #149543)
2004-08-07 03:13:56 +00:00
Elijah Newren
cd09a27aa6 Fix some bugs (reported in #120100) regarding the focus window when using
2004-08-02  Elijah Newren  <newren@math.utah.edu>

	Fix some bugs (reported in #120100) regarding the focus window
	when using the workspace switcher.

	* src/display.c (event_callback): When switching workspaces due to
	a _NET_CURRENT_DESKTOP message, make sure to focus the default
	window as well.

	* src/workspace.c (meta_workspace_focus_default_window,
	meta_workspace_focus_mru_window): Make DOCK or DESKTOP windows
	have lower priority than others when choosing a window to focus.
	(For the former function, this means don't focus them at all; for
	the latter, this means only focus them (via the
	meta_workspace_focus_top_window call) if no other mru window can
	be found.)
2004-08-02 19:23:03 +00:00
Rob Adams
e60da6c006 Fix some support for EWMH hints, and fix USER_TIME support to include the
2004-07-31  Rob Adams  <readams@readams.net>

	Fix some support for EWMH hints, and fix USER_TIME support to
	include the DEMANDS_ATTENTION hint.  Also includes some code for
	implementing _NET_RESTACK_WINDOW and _NET_MOVERESIZE_WINDOW, but
	this is disabled pending feature thaw.

	* COMPLIANCE: update with new information

	* src/display.c (meta_display_open): add new hints to list

	* src/display.h (_MetaDisplay): Add new atoms to struct

	* src/screen.c (set_supported_hint): update the list of support
	hints.
	(set_desktop_viewport_hint): new function sets the viewport hint
	to (0,0) as required by the spec for WMs with no viewport support.
	(set_desktop_geometry_hint): new function to set the desktop size
	hint to the size of the display, since we don't implement large
	desktop support, as required by the spec.
	(meta_screen_resize): update the geometry hint on screen resize

	* src/window.c (meta_window_new_with_attrs): Initialize
	demands_attention state
	(set_net_wm_state): Set demands_attention hint in the window state
	(meta_window_show): If we don't pop up a window because of
	USER_TIME, set DEMANDS_ATTENTION on the window.
	(meta_window_focus): When a window receives focus, remove
	DEMANDS_ATTENTION hint
	(meta_window_client_message): Allow other apps to set
	DEMANDS_ATTENTION on a window.  Also, if the _NET_ACTIVE_WINDOW
	hint includes a timestamp, use it.
	(update_net_wm_state): Read DEMANDS_ATTENTION state also

	* src/window.h (_MetaWindow): add wm_state_demands_attention bit.
2004-07-31 19:56:10 +00:00
Elijah Newren
28a54c6bb4 Add support for _NET_WM_USER_TIME
2004-06-17  Elijah Newren  <newren@math.utah.edu>

	Add support for _NET_WM_USER_TIME

	* src/display.c:
	(meta_display_open): Add _NET_WM_USER_TIME to atom_names[],
	(event_callback): Manually set _NET_WM_USER_TIME upon KeyPress
	(doesn't work since keyboard isn't grabbed) and ButtonPress (does
	work), this is just a fallback for applications that don't update
	this themselves.

	* src/display.h: (struct _MetaDisplay): Add atom_net_wm_user_time field

	* src/screen.c: (meta_screen_apply_startup_properties): Check for
	TIMESTAMP provided from startup sequence as well.

	* src/stack.c:
	s/meta_window_set_stack_position/meta_window_set_stack_position_no_sync/,
	(meta_window_set_stack_position): New function which calls the
	meta_window_set_stack_position_no_sync function followed immediately
	by calling meta_stack_sync_to_server.

	* src/window-props.c:
	(init_net_wm_user_time), (reload_net_wm_user_time): new functions,
	(reload_wm_hints): also load atom_net_wm_user_time

	* src/window.c:
	new XSERVER_TIME_IS_LATER macro (accounts for timestamp wraparound),
	(meta_window_new_with_attrs): add timestamp attributes,
	(window_takes_focus_on_map): use TIMESTAMP from startup
	notification and _NET_WM_USER_TIME to decide whether to focus new
	windows,
	(meta_window_show): if app doesn't take focus on map, place it
	just below the focused window in the stack
	(process_property_notify): check for changes to _NET_WM_USRE_TIME,
	(meta_window_stack_just_below): new function

	* src/window.h:
	(_MetaWindow struct): new fields for initial_timestamp,
	initial_timestamp_set, net_wm_user_time_set, and net_wm_user_time,
	(meta_window_stack_just_below): new function
2004-06-24 15:47:05 +00:00
Soeren Sandmann
4cfb5152f7 Fix bug 143333, support for update counter spec, and 109362, schedule
Sat Jun 19 02:21:08 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	Fix bug 143333, support for update counter spec, and 109362,
	schedule compensation events when events are ignored.

	* src/display.c (meta_display_open): Add _NET_WM_SYNC_REQUEST and
	_NET_WM_SYNC_REQUEST_COUNTER atoms. Remove the old
	METACITY_SYNC_COUNTER stuff.
	(meta_display_begin_op): Setup the sync counter

	* src/xprops.c, src/xprops.h, src/window-props.c, src/display.h:
	Add new atoms.

	* src/window.c (send_sync_request): new function.
	(meta_window_move_resize_internal): send a sync request before
	resizing.
	(check_move_resize_frequence): Rework logic to also check the SYNC
	case. If an event is ignored return the remaining time.
	(update_resize_timeout): Timeout that gets called when a
	compensation event is scheduled.
	(uddate_resize): schedule compensation events when an event is
	ignored.
	(meta_window_handle_mouse_grap_op_event): When an alarm is
	received and sync was turned off, turn it back on.

	* src/window.h (struct MetaWindow)  Add some variables
2004-06-19 00:45:24 +00:00
Elijah Newren
4b9a23e8eb Fix unwanted mouse grab op on rapid click-and-release 2004-04-16 03:38:19 +00:00
Rob Adams
db108c1fc3 Add my copyright notice to a number of files on which it should already
2004-02-23  Rob Adams  <readams@readams.net>

	Add my copyright notice to a number of files on which it should
	already exist.

	* src/window.c (meta_window_notify_focus): modify code to move to
	front of MRU list so that we can have an assert that it was there
	in the first place.  This code may be causing some crashes.  See
	#131196.
2004-02-23 01:48:29 +00:00
Thomas Fitzsimmons
a605da04c1 Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.
2004-01-09  Thomas Fitzsimmons  <fitzsim@redhat.com>

	Add _NET_FRAME_EXTENTS and _NET_REQUEST_FRAME_EXTENTS.

	* src/display.c: include xprops.h
	(process_request_frame_extents): new function
	(meta_display_open): add _NET_FRAME_EXTENTS and
	_NET_REQUEST_FRAME_EXTENTS atoms
	(event_callback): handle frame extents message

	* src/display.h (struct _MetaDisplay): add atom_net_frame_extents
	and atom_net_request_frame_extents

	* src/theme.c (meta_pango_font_desc_get_text_height): make font_desc
	parameter const

	* src/ui.c: include prefs.h
	(meta_ui_theme_get_frame_borders): new function

	* src/window.c (update_net_frame_extents): new function
	(meta_window_move_resize_internal): update frame extents
	property when frame geometry changes

	* src/screen.c (set_supported_hint): add atom_net_frame_extents
	and atom_net_request_frame_extents
2004-01-10 17:16:07 +00:00
Rob Adams
2fdb75ad45 Maintain the button grab for sloppy and mouse focus all the time. This
2003-01-04  Rob Adams  <readams@readams.net>

	Maintain the button grab for sloppy and mouse focus all the time.
	This fixes a number of problem introduced by trying to drop the
	grab; we now do this only for click to focus mode.  This has the
	unfortunate effect that #102209 reappears for sloppy and mouse
	focus, but this seems unavoidable, because of limitations in the X
	protocol.  See #115072.

	* src/display.c (meta_display_grab_focus_window_button): #if 0 the
	section on not grabbing unless in click-to-focus mode.

	* src/window.c (meta_window_notify_focus): drop focus button grab
	on FocusIn and acquire it on FocusOut only when in click-to-focus
	mode.
2004-01-05 07:24:32 +00:00
Havoc Pennington
a27089a110 handle ReparentNotify, and add a lot of debug output.
2003-12-25  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (process_reparent): handle ReparentNotify, and
	add a lot of debug output.
2003-12-26 02:42:38 +00:00
Havoc Pennington
35c64b45dd change to track all children of the root window, not only mapped children;
2003-12-25  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_process_event): change to
	track all children of the root window, not only mapped children;
	this keeps us from losing track of the stacking order

	* src/display.c (event_callback): don't do any of the compositor
	event handling inline, do it all in compositor.c
2003-12-26 00:05:26 +00:00
Rob Adams
104786735a initialize grab_wireframe_active to FALSE. Fix for #128090.
2003-12-17  Rob Adams  <readams@readams.net>

	* src/display.c (meta_display_open): initialize
	grab_wireframe_active to FALSE.  Fix for #128090.

2003-12-17  Rob Adams  <readams@readams.net>

	* src/tabpopup.c (meta_ui_tab_popup_new): Don't try to call
	utf8_strndup on a null title for an entry.  Fix for #128566.

	* src/workspace.c (meta_workspace_free): Call g_list_free on the
	mru_list, since with sticky windows that MRU list could well not
	be emtpy.  See #122016.
2003-12-17 16:01:00 +00:00
Rob Adams
9bde925d3d Revert prior change 2003-12-13 23:00:06 +00:00
Rob Adams
7630d22b8d Add increased robustness for dealing with all workspaces windows and MRU
2003-12-13  Rob Adams  <readams@readams.net>

	Add increased robustness for dealing with all workspaces windows
	and MRU lists.
	Also add very preliminary _NET_WM_USER_TIME
	support, limited to simply listening for the property and keeping
	an internal variable updated, and also treating some input events
	as though they were user time updates.

	* src/window.c (meta_window_new_with_attrs): set on_all_workspaces
	in all cases _before_ adding to the workspaces, so that windows
	initially on all workspaces are added correctly to the MRU lists.
	Fix for #120907.
	(process_property_notify): add net_wm_user_time support.

	* src/workspace.c (meta_workspace_add_window): handle sticky
	windows so that we add to add mru lists if needed
	(meta_workspace_remove_window): handle sticky windows so that they
	are removed from all mru lists if needed.

	* src/display.[ch] (meta_display_open): add net_wm_user_time support.
	(event_callback): simulate user time update on key and button presses.

	* src/screen.c (set_supported_hint): add net_wm_user_time support.

	* src/window-props.c (init_net_wm_user_time): new function for
	user_time support
	(reload_net_wm_user_time): new function for user_time support
	(meta_display_init_window_prop_hooks): add hook for user_time
2003-12-13 18:28:14 +00:00
Havoc Pennington
4ebdb0b9c0 fix up compositing manager to somewhat work
2003-11-29  Havoc Pennington  <hp@redhat.com>

	* fix up compositing manager to somewhat work
2003-11-30 03:30:27 +00:00
Havoc Pennington
8d892f76da Oops, did not mean to do that. 2003-11-24 23:05:04 +00:00
Havoc Pennington
03bbe3de17 fix the extension checks
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c (meta_compositor_new): fix the extension checks
2003-11-24 23:00:52 +00:00
Havoc Pennington
423b5f5f39 add an event_serial argument and use it when the pointer is already
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* src/display.c (meta_display_begin_grab_op): add an event_serial
	argument and use it when the pointer is already grabbed
	automatically on the button press. May fix bug #126871
2003-11-24 18:09:47 +00:00
Havoc Pennington
feefcdd892 Apply patch from Gregory Merchan to avoid using CurrentTime when setting
2003-11-24  Havoc Pennington  <hp@redhat.com>

	* Apply patch from Gregory Merchan to avoid using CurrentTime when
	setting input focus. Bug #108881
2003-11-24 17:47:48 +00:00
Havoc Pennington
927a6def1b move xcompmgr code in here (minus drop shadows), untested since Keith's
2003-11-23  Havoc Pennington  <hp@redhat.com>

	* src/compositor.c: move xcompmgr code in here (minus drop
	shadows), untested since Keith's server just crashes at the
	moment. "It compiles"
2003-11-23 18:16:01 +00:00
Havoc Pennington
d538690bd4 new function
2003-11-20  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new_with_attrs): new function

	* src/display.c, src/screen.c: create the compositor and feed
	windows and events to it
2003-11-21 02:32:05 +00:00
Rob Adams
9378a4fb4d Create COMPLIANCE document describing metacity specification compliance.
2003-11-16  Rob Adams  <readams@readams.net>

	Create COMPLIANCE document describing metacity specification
	compliance.  Right now gives detailed EWMH compliance; still need
	to add ICCCM compliance information.  Also some minor fixes to
	bring metacity into compliance on some points.

	* COMPLIANCE: new file

	* src/display.h, src/display.c (meta_display_open),
	src/screen.c (set_supported_hint): add
	atom_net_wm_action_fullscreen and atom_net_wm_action_minimize

	* src/window.c (set_allowed_actions_hint): some fixes to which
	hints to set and add fullscreen and minimize.
2003-11-17 00:06:58 +00:00
Havoc Pennington
6aff3466c6 In the "prefs cause code complexity" department, here's a "sloppy focus
2003-10-13  Havoc Pennington  <hp@redhat.com>

        In the "prefs cause code complexity" department, here's a "sloppy
	focus die die die" kind of moment.

	* src/display.c (meta_display_grab_focus_window_button): don't
	grab in sloppy focus mode, since we were dropping the grab on
	window enter anyway this just removes races from the current
	behavior.

	* src/display.c (prefs_changed_callback): ungrab/grab on focus
	mode changes, since we treat sloppy and click differently.
2003-10-13 20:15:40 +00:00
Havoc Pennington
e98fad3e62 Merge reduced_resources mode patch from the branch. Offers wireframe and
2003-10-12  Havoc Pennington  <hp@redhat.com>

        Merge reduced_resources mode patch from the branch. Offers
	wireframe and no-animations.

	* src/window.c (implement_showing): no animation if we are
	in reduced resources mode

	* src/prefs.c: add REDUCED_RESOURCES pref

	* src/window.c (meta_window_update_keyboard_resize): fix to
	modify grab_anchor_window_pos to grab_wireframe_rect if
	appropriate instead of window->rect

	* src/display.h (struct _MetaDisplay): add grab_start_serial used
	to avoid responding to events that occurred prior to the grab
	initialization.

	Still broken in various ways, specifically EnterNotify that
	occurred prior to XGrabPointer is processed as if it occurred
	after.

	* src/window.c (meta_window_update_keyboard_move): add this
	instead of meta_window_warp_pointer() crack

	* src/effects.c (meta_effects_update_wireframe): draw a kind of
	grid for the wireframe, instead of just a rectangle, like twm

	* src/screen.c (meta_screen_new): line width of 3 for the XOR gc

        "Reduced resources" mode based on wireframe patch from
	Erwann Chenede. Still pretty buggy.

	* src/keybindings.c (process_keyboard_move_grab)
	(process_keyboard_resize_grab): add gruesome wireframe hacks

	* src/display.c (meta_display_end_grab_op): end wireframe
	(meta_display_begin_grab_op): begin wireframe

	* src/effects.c (meta_effects_end_wireframe)
	(meta_effects_update_wireframe, meta_effects_begin_wireframe):
	routines to draw the wireframe stuff

	* src/window.c (window_should_be_showing): hide window when
	doing wireframe, commented out as it breaks grab
	* src/window.c (meta_window_refresh_resize_popup): handle wireframe

	* src/screen.c (meta_screen_new): create a screen->root_xor_gc
	for use in drawing wireframes

	* src/frames.c (meta_frames_push_delay_exposes): repaint
	everything before we delay
2003-10-12 06:25:38 +00:00
Havoc Pennington
6628acb59c initialize display->grab_have_pointer to FALSE, previously I think you
2003-10-11  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_begin_grab_op): initialize
	display->grab_have_pointer to FALSE, previously I think you could
	get a case where we didn't have the grab and thought we did.
	Bugs were reported with this happening. Of course we still have
	the "why did the grab fail" problem, but it should be less
	noticeable with this fixed.
2003-10-11 04:27:06 +00:00
Havoc Pennington
199d20197e add the moveresize idle at META_PRIORITY_RESIZE so it runs before GTK does
2003-09-30  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_queue_move_resize): add the moveresize
	idle at META_PRIORITY_RESIZE so it runs before GTK does any
	drawing, may fix bug #109211 (seem to for me)

	* src/ui.h (META_PRIORITY_RESIZE): add this between GTK
	resize/redraw priorities

	* src/display.c (meta_display_queue_retheme_all_windows): remove
	some debug spew from meta_warning
2003-09-30 20:36:02 +00:00
Havoc Pennington
26c2ae81ea when focus on root window becomes None, set it to something other than
2003-09-26  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): when focus on root window
	becomes None, set it to something other than None so keybindings
	keep working and print a warning about how some application sucks.
	#84564
	(event_callback): Fix debug spew to print focus event details
	properly
	(meta_display_open): when setting initial focus, always use
	RevertToPointerRoot and fix the focus if it's None or PointerRoot
2003-09-27 02:40:09 +00:00
Havoc Pennington
a9e5560c36 fix cursor for META_GRAB_OP_MOVING, #111943
2003-08-16  Havoc Pennington  <hp@pobox.com>

	* src/display.c (xcursor_for_op): fix cursor for
	META_GRAB_OP_MOVING, #111943
2003-08-16 14:36:56 +00:00
Ray Strode
2fc880db19 Changed MRU list to be per workspace instead of per display, so sticky
2003-08-15  Ray Strode  <halfline@hawaii.rr.com>

	Changed MRU list to be per workspace instead of per display, so
	sticky windows don't hijack the window focus after workspace
	switching (Bug #97635).

	* src/delete.c (meta_window_delete): Use
	meta_workspace_focus_top_window instead of
	meta_screen_focus_top_window.

	* src/display.c (meta_display_open): Stop using display->mru_list.
	(find_tab_forward):
	(find_tab_backward):
	(meta_display_get_tab_list): Use workspace->mru_list instead of
	display->mru_list and remove unneeded calls to
	meta_window_visible_on_workspace

	* src/display.h: Remove mru_list from MetaDisplay

	* src/keybindings.c (handle_toggle_desktop): Use
	meta_workspace_focus_top_window instead of
	meta_screen_focus_top_window.

	* src/screen.c (meta_screen_focus_top_window):
	(meta_screen_focus_default_window): Remove functions.
	(meta_screen_show_desktop): Use meta_workspace_focus_top_window
	instead of meta_screen_focus_top_window.

	* src/screen.h: Remove meta_screen_focus_top_window and
	meta_screen_focus_default_window declarations.

	* src/window.c (meta_window_new): Stop using display->mru_list.
	(meta_window_free): Use meta_workspace_focus_top_window
	instead of meta_screen_focus_top_window and stop using
	display->mru_list.
	(meta_window_stick): Add sticky window to all workspace MRU lists.
	(meta_window_unstick): Remove non-sticky window from the workspace
	MRU lists it doesn't belong in.
	(meta_window_notify_focus): Move newly focused window to the front
	of active workspace's MRU list.

	* src/workspace.c (meta_workspace_new): Initialize
	workspace->mru_list to NULL.
	(meta_workspace_add_window): Add window to workspace's MRU list.
	(meta_workspace_remove_window): Remove window from workspace's MRU
	list.
	(meta_workspace_activate_with_focus): Use
	meta_workspace_focus_default_window instead of
	meta_screen_focus_default_window.
	(meta_workspace_focus_default_window):
	(meta_workspace_focus_mru_window):
	(meta_workspace_focus_top_window): Add functions.

	* src/workspace.h: Add mru_list to MetaWorkspace and add function
	declarations for meta_workspace_focus_default_window,
	meta_workspace_focus_mru_window, meta_workspace_focus_top_window.
2003-08-15 22:09:55 +00:00
Rob Adams
971f3f1207 Update constraints code to support the new _NET_WM_STRUT_PARTIAL EWMH
2003-06-10  Rob Adams  <robadams@ucla.edu>

	Update constraints code to support the new _NET_WM_STRUT_PARTIAL
	EWMH draft specification.  See #86682.  Also, fix a bug involving
	work area invalidation on metacity startup.  Fix for #108497.
	Finally, some minor fixes for full screen windows.

	* src/window.h: Add new MetaStruts structure to store strut rects
	for a window.  Remove has_struts and do_not_cover flag, and
	support new MetaStruts instead of the four ints.

	* src/window.c (meta_window_new): change initialization to work
	with new struts.  Also, move meta_window_update_struts call to
	after the workspaces are initialized to fix #108497.  Remove
	do_not_cover and related code.
	(process_property_notify): add strut_partial
	(update_struts): change function name to meta_window_update_struts
	and expose in external MetaWindow API.  Support partial width
	struts and the new strut rects.

	* src/workspace.h: add new GSLists containing pointers to all
	relevant struts for this workspace.

	* src/workspace.c (meta_workspace_new): initialize the list of
	strut rects for this workspace.
	(meta_workspace_free): free the strut rect lists
	(ensure_work_areas_validated): support new struts and new strut
	rect lists.  Unleash the per-xinerama work areas.

	* src/constraints.c (get_outermost_onscreen_positions): Use the
	current window position along with the new per-workspace strut
	rects to compute the constraints that apply to a particular
	window.
	(constraint_hint_applies_func): don't do hints constraints on
	fullscreen windows
	(update_position_limits): for maximized windows use the work areas
	to set the position limits; for other windows rely on the struts
	constraints to be computed later in
	get_outermost_onscreen_positions
	(meta_window_constrain): don't apply aspect ratio hints to full
	screen windows

	* src/display.c (meta_display_open): add _NET_WM_STRUT_PARTIAL atom
	(meta_rectangle_equal): new helper function for MetaRectangles
	(event_queue_callback): #ifndef out if USE_GDK_DISPLAY not set to
	avoid compiler warning

	* src/display.h: add atom_net_wm_strut_partial, and add
	meta_rectangle_equal.

	* src/screen.c (meta_screen_rect_intersects_xinerama): change
	_window_intersects_ to _rect_intersects_ which is more useful now.
	(meta_screen_resize_func): update struts on windows with struts
	since struts are relative to the screen size, and this function is
	called when the screen size updates.

	* src/screen.h (meta_screen_rect_intersects_xinerama): change
	_window_intersects_ to _rect_intersects_ which is more useful now.

	* src/window-props.c (meta_display_init_window_prop_hooks): add
	hook for strut_partial

	* src/tools/metacity-window-demo.c: Support partial-width struts
	on the dock window tests for metacity testing purposes.
2003-06-26 03:09:38 +00:00
Rob Adams
4d8414acfd Focus on mouse click in sloppy/mouse to fix keynav. Fix for #115072.
2003-06-12  Rob Adams  <robadams@ucla.edu>

	* src/display.c (event_callback): Focus on mouse click in
	sloppy/mouse to fix keynav.  Fix for #115072.
2003-06-13 05:47:51 +00:00
Rob Adams
85826d0d9a Remove legacy support for Gnome 1 hints, since we deem it unlikely that
2003-06-12  Rob Adams  <robadams@ucla.edu>

	Remove legacy support for Gnome 1 hints, since we deem it unlikely
	that anyone is running a current metacity with Gnome 1.  The
	removed hints are _WIN_WORKSPACE, _WIN_LAYER, _WIN_PROTOCOLS,
	_WIN_SUPPORTING_WM_CHECK, and _WIN_HINTS.

	* display.c (meta_display_open): remove hints

	* display.h: remove atoms for hints

	* screen.c (set_wm_check_hint): don't set legacy hint
	(set_supported_hint): don't set legacy hint

	* window-props.c (init_win_workspace): removed
	(reload_win_workspace): removed
	(meta_display_init_window_prop_hooks): remove hints

	* window.h: remove do_not_cover flag

	* window.c: remove GnomeWinHints enum
	(recalc_do_not_cover_struts): removed
	(meta_window_new): don't initialize removed flags or compute
	legacy struts
	(move_resize_cmp): removed
	(idle_move_resize): Don't bother sorting the idle queue
	(meta_window_client_message): don't set legacy hint
	(process_property_notify): remove hints
	(update_net_wm_type): don't fall back to WIN_LAYER hint
	(update_struts): remove legacy struts
2003-06-12 07:03:04 +00:00
Havoc Pennington
0a20419628 make raise-on-click explicitly only happen in click to focus mode.
2003-06-12  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): make raise-on-click explicitly
	only happen in click to focus mode.

	* src/window.c (update_move): apply patch from Jurg Billeter to
	allow you to "shake loose" maximized windows and move them between
	Xinerama heads. #93586

	* src/display.c: delete event_queue_callback

	* src/display.h (struct _MetaDisplay): get rid of
	grab_current_window_pos and grab_current_root_[xy] as I could find
	absolutely no code using them for anything. They were just sort of
	randomly assigned to for no apparent reason.

	* src/display.c (event_callback): double-click timeout is per
	screen, so get the screen and pass screen->ui to
	meta_ui_get_double_click_timeout()

	* src/ui.c (meta_ui_get_double_click_timeout): take a MetaUI
	argument so we get the right settings for each screen
	(meta_ui_get_drag_threshold): new function
2003-06-12 05:55:06 +00:00
Rob Adams
3edad8599c CVS2003-05-29 Rob Adams <robadams@ucla.edu>
CVS2003-05-29  Rob Adams  <robadams@ucla.edu>

	Use a new property _METACITY_SENTINEL to eliminate a race
	condition that causes focus to behave badly with sloppy/mouse
	focus when lots of windows are mapped/unmapped, such as with a
	workspace switch.  The EnterNotify events on a display are ignored
	until the PropertyNotify sent after all the window maps is
	received.  This is a fix for #110970.

	* src/display.[ch]: New _METACITY_SENTINEL atom.
	(event_callback): ignore EnterNotify if the sentinel isn't clear,
	and decrement the sentinel counter when the PropertyNotify is
	received.
	(meta_display_increment_focus_sentinel): new function.  Increments
	the sentinel counter and updates the property on a root window on
	this display.
	(meta_display_decrement_focus_sentinel): Decrement the sentinel
	counter.
	(meta_display_focus_sentinel_clear): returns whether the sentinel
	counter is zero.

	* src/window.c (idle_calc_showing): after showing windows, call
	meta_display_increment_focus_sentinel on each display for windows
	to be shown.

	* src/workspace.[ch] (meta_workspace_activate_with_focus): new
	function activates a workspace and focuses a particular window
	after the workspace is activated.
	(meta_workspace_activate): now just a wrapper for
	meta_workspace_activate_with_focus

	* src/keybindings.c: use new meta_workspace_activate_with_focus
	function to ensure that focus will follow the focused window
	through the workspace switch.

: ----------------------------------------------------------------------
2003-05-30 20:24:00 +00:00
Ray Strode
d1a853557b Get and use double-click speed from GtkSettings (Bug #103218).
2003-05-29  Ray Strode  <halfline@hawaii.rr.com>

	Get and use double-click speed from GtkSettings (Bug #103218).

	* src/ui.c, src/ui.h:
	add function meta_ui_get_double_click_timeout for looking up
	the global double-click speed.

	* src/display.c, src/display.h: remove double_click_time
	field from MetaDisplay and use meta_ui_get_double_click_timeout
	instead.
2003-05-30 02:53:42 +00:00
Havoc Pennington
1620fd5408 the mask display->ignored_modifier_mask wasn't being bound, due to "<"
2003-05-20  Havoc Pennington  <hp@pobox.com>

	* src/keybindings.c (meta_change_keygrab): the mask
	display->ignored_modifier_mask wasn't being bound,
	due to "<" instead of "<=" (most people didn't notice
	as display->ignored_modifier_mask included Scroll_Lock).
	Red Hat bugzilla #91301 reported by Youssef Makki

	* src/display.c (meta_change_button_grab): make corresponding
	change for button grabs.
2003-05-21 03:45:58 +00:00
Havoc Pennington
4b02b0ddf1 fill in window->desc sooner since we use it sooner now.
2003-05-16  Havoc Pennington  <hp@redhat.com>

	* src/window.c (meta_window_new): fill in window->desc sooner
	since we use it sooner now.

	* src/display.c (meta_display_open): init
	display->grab_update_alarm

	* src/window.c (meta_window_new): initialize the always_sticky
	field
	(meta_window_new): initialize the update_icon_queued field

        Patch from Julien Olivier bug #92335 for converting "show desktop
	mode" to "all windows are minimized" when you open a new window,
	instead of just mapping all the windows again.

	* src/window.c (meta_window_activate): minimize all windows before
	coming out of show desktop mode.
	(meta_window_unminimize): don't toggle show desktop mode here

	* src/screen.c (meta_screen_minimize_all_except): new function
2003-05-16 21:59:08 +00:00
Havoc Pennington
ec9cf27a81 purge HAVE_GTK_MULTIHEAD from the source code, not just from configure.in.
2003-04-21  Havoc Pennington  <hp@redhat.com>

	* purge HAVE_GTK_MULTIHEAD from the source code, not just from
	configure.in. Yes I am a loser.
2003-04-21 23:37:42 +00:00
Soeren Sandmann
3c8b051e31 just return if we are not verbose.
Sun Mar 23 23:04:06 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* src/display.c (meta_spew_event): just return if we are not
	verbose.
2003-03-23 21:54:48 +00:00
Rob Adams
67cbbeb6c1 Make it so that the alt-tabbing won't try to go to a minimized window by
2003-03-13  Rob Adams <robadams@ucla.edu>

        Make it so that the alt-tabbing won't try to go to a minimized
	window by default.  Fix for #107071.

	* display.c (meta_display_get_tab_list): use a GList instead of a
	GSList
	(meta_display_get_tab_next): use meta_display_get_tab_list to
	decide what the next/previous tab window should be.

	* display.h (meta_display_get_tab_list): update function prototype
	to return GList instead of GSList.

	* screen.c (meta_screen_ensure_tab_popup): update function to deal
	with GList returned by meta_display_get_tab_list instead of GSList.
2003-03-15 02:16:21 +00:00
Mark McLoughlin
73cce3b174 Take control of the panel's global keybindings. The screenshot utility is
2003-02-24  Mark McLoughlin  <mark@skynet.ie>

        Take control of the panel's global keybindings. The
        screenshot utility is hooked up using a special case
        run_command and the menu and run dialog bindings are
        done using the _GNOME_PANEL_ACTION ClientMessage
        protocol.

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

        * src/keybindings.c:
        (handle_panel_keybinding): impl to handle a keybinding
        by sending an action message to the panel.

        * src/metacity.schemas.in: add schemas for the panel and
        screenshot keybindings and the screenshot commands.

        * src/prefs.[ch]: (update_command),
        (meta_prefs_get_gconf_key_for_command): impl special case
        handling for the screenshot commands. They are stored at
        the the end of the commands array but have named keys.
2003-02-24 02:16:09 +00:00
Havoc Pennington
d85012ecfd fix to unfocus window only when you leave the window frame, not when you
2003-02-22  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): fix to unfocus window only when
	you leave the window frame, not when you leave the window itself,
	unless window has no frame. #100248 fix from Orien Vandenbergh
2003-02-22 22:19:19 +00:00
Havoc Pennington
fb9ad1eb13 when tabbing backward, we are still tabbing *from* the most recently used
2003-02-22  Havoc Pennington  <hp@pobox.com>

	* src/display.c (meta_display_get_tab_next): when tabbing
	backward, we are still tabbing *from* the most recently used
	window, not from the least recently used window.

	* src/keybindings.c (struct _MetaKeyBinding): make keycode
	unsigned to match XEvent

	Patch for #84999 based on patch from Mark McLoughlin

	* src/prefs.c: add an add_shift field to MetaKeyPref to
	add shift when grabbing the given keybinding.

	* src/keybindings.c (rebuild_screen_binding_table)
	(rebuild_window_binding_table): refactor to share code,
	and honor add_shift field in MetaKeyPref
2003-02-22 20:31:51 +00:00
Bill Haneman
b424364710 Reinstated visual-bell patch, fix for bug 99886. 2003-01-28 15:07:43 +00:00
Havoc Pennington
82bd20911c Fix for the "mangles focus window when switching workspaces and using
2003-01-21  Havoc Pennington  <hp@pobox.com>

        Fix for the "mangles focus window when switching workspaces
	and using mouse focus" bug

	* src/stack.c (meta_stack_get_default_focus_window_at_point): new
	function

	* src/screen.c (meta_screen_focus_mouse_window): new function
	(meta_screen_focus_default_window): new function

	* src/workspace.c (meta_workspace_activate): use the
	new meta_screen_focus_default_window()

2003-01-17  Havoc Pennington  <hp@pobox.com>

	* src/window.c (meta_window_handle_mouse_grab_op_event): fix event
	compression code to use GDK algorithm suggested by Owen, should be
	more efficient.
2003-01-22 04:54:04 +00:00
Havoc Pennington
d02dbd62e9 only hop window to the current workspace if the window was previously
2003-01-21  Havoc Pennington  <hp@redhat.com>

	* src/display.c (event_callback): only hop window to the current
	workspace if the window was previously minimized. Should keep
	mozilla from popping windows over to your current workspace.

2003-01-20  Havoc Pennington  <hp@redhat.com>

        Attempt to fix #85916

	* src/keybindings.c (primary_modifier_still_pressed): new function
	(handle_workspace_switch): handle modifier release prior to
	getting the grab
	(do_choose_window): handle modifier release prior to getting the
	grab

	* src/keybindings.c (grab_keyboard): properly return failure
	if the GrabKeyboard doesn't work
2003-01-21 22:40:25 +00:00
Havoc Pennington
6cfcc01334 handle the client having a shape mask, fixes #101806
2003-01-05  Havoc Pennington  <hp@pobox.com>

	* src/frames.c (meta_frames_apply_shapes): handle
	the client having a shape mask, fixes #101806

	* src/core.c (meta_core_get_client_xwindow): new function

	* src/frame.c, src/frame.h: keep a flag for whether we need to
	update the frame shape

	* src/window.c (meta_window_new): select for ShapeNotify

	* src/display.h, src/display.c: actually query the shape
	extension, instead of just using it all over the place.

	* src/prefs.c (update_application_based): don't let people turn on
	application_based, as it just causes funky bugs. We can reenable
	the pref when/if it ever does something useful.
2003-01-05 07:51:02 +00:00