1
0
Fork 0
Commit graph

449 commits

Author SHA1 Message Date
Elijah Newren
8144a962e7 Patch from Thomas Andersen to make windows be stacked correctly before
2006-09-13  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_show): Patch from Thomas Andersen to
	make windows be stacked correctly before showing them, to prevent
	flicker with focus stealing prevention.  #332385.
2006-09-13 22:21:19 +00:00
Elijah Newren
3b0478776d Fix issues on 64-bit machines with timestamps by using guint32 (like gtk+
2006-09-13  Elijah Newren  <newren gmail com>

	* src/common.h (MetaWindowMenuFunc):
	* src/core.[ch] (meta_core_user_lower_and_unfocus,
	  meta_core_user_focus, meta_core_show_window_menu,
	  meta_core_begin_grab_op, meta_core_end_grab_op):
	* src/delete.c (delete_ping_reply_func, delete_ping_timeout_func,
	  meta_window_delete):
	* src/display.[ch] (struct MetaDisplay, struct MetaPingData,
	  sanity_check_timestamps, meta_display_open, event_callback,
	  meta_spew_event, meta_display_set_grab_op_cursor,
	  meta_display_begin_grab_op, meta_display_end_grab_op,
	  meta_display_ping_timeout, meta_display_ping_window,
	  process_pong_message, timestamp_too_old,
	  meta_display_set_input_focus_window):
	* src/keybindings.[ch] (grab_keyboard, ungrab_keyboard,
	  meta_screen_grab_all_keys, meta_window_grab_all_keys,
	  meta_window_ungrab_all_keys, error_on_generic_command,
	  error_on_command, error_on_terminal_command):
	* src/metacity-dialog.c (on_realize, warn_about_no_sm_support,
	  error_about_command, main):
	* src/screen.[ch] (struct _MetaScreen, meta_screen_new,
	  meta_screen_show_desktop, meta_screen_apply_startup_properties):
	* src/session.c (warn_about_lame_clients_and_finish_interact):
	* src/window.[ch] (struct _MetaWindow,
	  intervening_user_event_occurred, window_activate,
	  meta_window_delete, meta_window_focus,
	  meta_window_send_icccm_message, meta_window_client_message,
	  menu_callback, meta_window_show_menu, struct EventScannerData,
	  check_use_this_motion_notify, meta_window_begin_grab_op,
	  meta_window_set_user_time):
	* src/workspace.[ch] (focus_ancestor_or_mru_window,
	  meta_workspace_activate_with_focus, meta_workspace_activate,
	  meta_workspace_focus_default_window,
	  focus_ancestor_or_mru_window):
	Fix issues on 64-bit machines with timestamps by using guint32
	(like gtk+ does) instead of Time.  #348305
2006-09-13 16:32:33 +00:00
Elijah Newren
4c96afba71 Fix several bugs with handling of fullscreen windows, causing them to not
2006-08-21  Elijah Newren  <newren gmail com>

	Fix several bugs with handling of fullscreen windows, causing them
	to not actually be fullscreen.  #343115 (and also #346927,
	#350547, #351643, the recent additional WINE-related issue
	mentioned on the mailing list, and probably others...)

	* src/constraints.c (setup_constraint_info): if a window tries to
	resize to fullscreen-size and it has a fullscreen function but
	isn't actually marked as fullscreen then assist it by marking it
	as such, (constrain_fully_onscreen, constrain_titlebar_visible):
	ignore this constraint for fullscreen windows since such windows
	have a separate specialized constraint

	* src/stack.c (window_is_fullscreen_size, get_standalone_layer):
	remove the old window_is_fullscreen_size() hack for detecting
	windows to treat as fullscreen since it doesn't work well with the
	new constraints framework (i.e. we needed a slightly different
	hack)

	* src/window.[ch] (meta_window_new_with_addrs): shuffle the order
	of adding the window to the stack and moveresizing the window
	since moveresizing can cause stack changes if the window's initial
	size is fullscreen size, (meta_window_make_fullscreen,
	meta_window_make_fullscreen_internal): split
	meta_window_make_fullscreen() similar to meta_window_maximize() so
	that constraints can make use of it
2006-08-21 18:08:05 +00:00
Elijah Newren
9051b70d40 Vytautus Liuolia totally rocks; he tested and debugged and tracked down
2006-08-07  Elijah Newren  <newren gmail com>

	* src/window.c (intervening_user_event_occurred): Vytautus Liuolia
	totally rocks; he tested and debugged and tracked down where we
	were using the focus window's net_wm_user_time even when it was
	uninitialized.  This may fix bug 311868 and others I've heard
	about (with Valknut, IIRC).  It definitely fixes the issues Vytas
	was seeing with his single instance library.  :-)
2006-08-09 18:32:30 +00:00
Elijah Newren
57bedc42a4 Add a constrain_titlebar_visible constraint; should fix both bug 333328
2006-08-07  Elijah Newren  <newren gmail com>

	Add a constrain_titlebar_visible constraint; should fix both bug
	333328 and bug 345522.  Not perfect (minor annoying snap pulling
	windows back onscreen, plus an ugly hack almost as bad as the old
	one), but tarballs are due in less than half an hour.  ;-)

	* src/boxes.[ch] (meta_rectangle_overlaps_with_region):
	new function

	* src/constraints.c (constrain_titlebar_visible): new function,
	  (enum ConstraintPriority, array all_constraints,
	  update_onscreen_requirements): various small changes to
	  accomodate the new function

	* src/edge-resistance.c: remove the infinite edge resistance,
	which was a big hack of a way to workaround the lack of a
	titlebar_visible constraint

	* src/window.[ch] (MetaWindow): new require_titlebar_visible
	bitfield, (meta_window_new_with_attrs): initialized here
2006-08-07 23:34:55 +00:00
Elijah Newren
adc46fc970 Patch from Vytautas Liuolia to react to _NET_STARTUP_ID changes, as
2006-08-07  Elijah Newren  <newren gmail com>

	Patch from Vytautas Liuolia to react to _NET_STARTUP_ID changes,
	as proposed for the new startup-notification/EWMH spec.  #347515

	* src/window-props.c (reload_net_startup_id): be sure to act on
	the new id instead of just recording it

	* src/window.[ch] (window_activate, meta_window_activate,
	  meta_window_activate_with_workspace, meta_window_client_message):
	change window_activate() to take a workspace parameter instead of
	hardcoding to the current workspace, add
	meta_window_activate_with_workspace() function needed by
	reload_net_startup_id().
2006-08-07 18:08:27 +00:00
Elijah Newren
74d4768b8e Patch from Dmitry Timoshkov to fix the heuristic for determining if
2006-08-04  Elijah Newren  <newren gmail com>

	Patch from Dmitry Timoshkov to fix the heuristic for determining
	if windows can be made fullscreen (needed for WINE and possible
	also some legacy applications).  Part of #346927.

	* src/window.c (recalc_window_features): ignore window decoration
	when checking size for determing whether an unresizable window
	should be allowed ot be considered for fullscreening
2006-08-04 22:33:20 +00:00
Thomas James Alexander Thurman
e8fb842aad oops, forgot to add missing apostrophe. Punctuation is good. #336850. 2006-07-31 19:58:06 +00:00
Thomas James Alexander Thurman
76e4fd8a07 Make it so maximized windows do not have rounded corners. #336850. 2006-07-31 19:56:56 +00:00
Søren Sandmann
4a06163710 Run an unminimize effect
Fri May 26 16:48:29 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/effects.c (meta_effect_run_unminimize): Run an unminimize effect

        * src/window.c (meta_window_unminimize): Store a "was_minimized"
        boolean in the window.

        * src/window.c (meta_window_show): If the window was minimized,
        run an unminimize animation.

        * src/c-window.c (meta_comp_window_run_unminimize): Add an
        unminimize animation, running the minimize one in reverse.
2006-05-26 20:50:34 +00:00
Adam Jackson
76dff49a3e Bounce on window focus. 2006-05-25 14:40:50 +00:00
Adam Jackson
22bc36eb3b Move shrink effect code from compositor.c to c-window.c. Stubs for
restore effect.  Notes in various places for where to hook in
other effects.
2006-05-23 21:42:34 +00:00
Søren Sandmann
3e5b9776c6 Beginning of new layer that abstracts transition effects.
Mon May 22 17:35:52 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/effects.[ch]: Beginning of new layer that abstracts
	transition effects.

	New functions:
	(meta_push_effect_handler): Install an effect handler
	(meta_pop_effect_handler): Remove last effect handler
	(meta_effect_run_minimize): Create a minimize effect and pass it
	to the handler.
	(meta_effect_end): Called by handler when the effect is finished.

	* src/compositor.c: Move explosion code form there to src/c-window.c.

	* src/c-screen.c: Delete explosion related code.
2006-05-22 21:46:14 +00:00
Björn Lindqvist
23a5f5bb58 Remove the unused attributes resize_gravity, width_inc, height_inc,
2006-05-18  Björn Lindqvist  <bjourne@gmail.com>

	* resizepopup.c: Remove the unused attributes resize_gravity,
	width_inc, height_inc, min_width, min_height, frame_left,
	frame_right, frame_top, frame_bottom, tick_origin_x, tick_origin_y
	from the MetaResizePopup struct. Delete all code that references
	those attributes.
2006-05-18 08:32:16 +00:00
Elijah Newren
b62dd8d130 Clear _NET_WM_VISIBLE_NAME (and the ICON_ equivalent) when no longer being
2006-04-25  Elijah Newren  <newren gmail com>

	Clear _NET_WM_VISIBLE_NAME (and the ICON_ equivalent) when no
	longer being used.  Fixes #330671.

	* src/window.[ch] (struct MetaWindow): new
	using_net_wm_visible_name and using_net_wm_visible_icon_name bits,
	(meta_window_new_with_attrs): initialize these new bits to false

	* src/window-props.c (set_title_text, set_window_title, set_icon_title):
	if the _NET_WM_VISIBLE_(ICON_)NAME property was previously set but
	doesn't need to be this time, make sure to clear it
2006-05-05 01:10:20 +00:00
Elijah Newren
e2ea1cf722 Patch from Dan Sanders to fix #334899.
2006-04-16  Elijah Newren  <newren gmail com>

	Patch from Dan Sanders to fix #334899.

	* window.c (meta_window_new_with_attrs): Unminimize ancestors of
	new windows when mapped; this prevents e.g. confirmation windows
	from causing applications to appear locked when closing via the
	window list.
2006-04-17 03:54:49 +00:00
Elijah Newren
7e2d5185a0 Patch from Dan Sanders to fix #335076.
2006-04-15  Elijah Newren  <newren gmail com>

	Patch from Dan Sanders to fix #335076.

	* src/core.c (meta_core_maximize, meta_core_toggle_maximize,
	  meta_core_unmaximize):
	* src/window.c (meta_window_client_message):
	Raise windows on maximize/unmaximize.
2006-04-16 02:20:41 +00:00
Elijah Newren
59d99fb9d1 Patch from Ron Yorston to add a focus_new_windows option. Default is
2006-04-12  Elijah Newren  <newren gmail com>

	Patch from Ron Yorston to add a focus_new_windows option.  Default
	is 'smart' (focus by default but normal focus-stealing-prevention
	can kick in); 'strict' is current other choice (like 'smart'
	except that programs launched by the terminal will not be
	focused).  Fixes remainder of #326159.  Should also close #152004
	and a bunch of others.

	* src/common.h:
	Add a MetaFocusNewWindows enum giving the current types allowed

	* src/display.h:
	Update docs on allow_terminal_deactivation to note that it is only
	relevant when focus_new_windows is 'strict'

	* src/prefs.c:
	* src/prefs.h:

	* src/metacity.schemas.in: add the new gconf key and explanation

	* src/prefs.[ch] (#define KEY_FOCUS_NEW_WINDOWS, static gboolean
	  focus_new_windows, update_focus_new_windows, meta_prefs_init,
	  change_notify, meta_prefs_get_focus_new_windows,
	  meta_preference_to_string):
	Add all the normal preference handling stuff for this new
	focus-new-windows option.

	* src/window.c (window_state_on_map, meta_window_set_user_time):
	Don't focus windows launched from a terminal
2006-04-12 18:01:20 +00:00
Søren Sandmann
4b683fdbf2 Check if the window is a menu and make it 90% opaque in that case.
Mon Apr 10 16:44:51 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (is_menu): Check if the window is a menu and make
	it 90% opaque in that case.

	* src/c-screen.c (claim_selection): Handle CM_Sn selection
	properly.

	* src/c-screen.c: Remove debug spew

	* src/screen.c (meta_screen_composite_all_windows): Remove debug spew
2006-04-10 20:47:02 +00:00
Elijah Newren
127a89886b Fix grouping in the presence of ancestors; caught by Björn. #336184
2006-03-29  Elijah Newren  <newren gmail com>

	Fix grouping in the presence of ancestors; caught by Björn.
	#336184

	* src/group.c (meta_window_compute_group): Use new
	meta_window_find_root_ancestor() function to get ancestor; for the
	computed group, use the ancestor's group instead of the ancestor
	itself

	* src/window.[ch] (meta_window_find_root_ancestor,
	meta_window_raise): split meta_window_find_root_ancestor()
	functionality of meta_window_raise() and make it available
	elsewhere
2006-03-30 19:22:38 +00:00
Thomas Thurman
cf3deef6ea mark a window as needing or not needing the user's attention use the new
2006-03-29  Thomas Thurman   <thomas@thurman.org.uk>
        * src/window.c, src/window.h (meta_window_set_demands_attention,
        meta_window_unset_demands_attention): mark a window as needing
        or not needing the user's attention
        * src/window.c (meta_window_show, window_activate,
        meta_window_focus, meta_window_configure_request,
        meta_window_client_message): use the new set/unset
        demands attention functions. Fixes #305822.
2006-03-29 18:43:22 +00:00
Björn Lindqvist
28aeacb247 *** empty log message *** 2006-03-29 16:05:23 +00:00
Thomas Thurman
25923105e4 deleted and moved into window-props.c (meta_window_new_with_attrs): added
2006-03-25  Thomas Thurman  <thomas@thurman.org.uk>

	* src/window.c, src/window.h (update_net_wm_state,
	update_mwm_hints, update_wm_class, update_transient_for):
	deleted and moved into window-props.c
	(meta_window_new_with_attrs): added constructing field
	and four new initial properties (as above)
	(meta_window_recalc_features,
	meta_window_recalc_window_type): new functions

	* src/window-props.c (init_net_wm_state, reload_net_wm_state
	init_mwm_hints, reload_mwm_hints, init_wm_class,
	reload_mwm_class, init_transient_for, reload_transient_for):
	new functions, moved in from window.c

	(meta_display_init_window_prop_hooks): initialise new properties
2006-03-25 22:57:22 +00:00
Thomas Thurman
ab176cf831 Always set _NET_WM_STATE when a window is shown or hidden, even if it
2006-03-03  Thomas Thurman  <thomas@thurman.org.uk>

	Always set _NET_WM_STATE when a window is shown or
	hidden, even if it wasn't mapped.

	* src/window.c (meta_window_hide, meta_window_show):
	call set_net_wm_state unconditionally
2006-03-17 03:26:25 +00:00
Søren Sandmann
ad2c7c6ce3 Use set_target_rect() instead of set_size().
Wed Mar 15 16:30:09 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (set_geometry): Use set_target_rect() instead
	of set_size().

	* src/c-screen.c: Add set_target_rect() as a way of scaling windows.

	* src/window.c (meta_window_handle_mouse_grab_op_event): Turn
	updates on after a button release.

	* src/window.c (meta_window_move_resize_internal): Fix
	indentation.
2006-03-15 21:31:12 +00:00
Søren Sandmann
16de3b603b Comment out wobbling
Tue Mar 14 11:57:46 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c: Comment out wobbling

	* src/compositor.c (blow_up): remove this function

	* src/compositor.c (process_configure_notify): Uncomment
	set_size().

	* src/c-screen.c (meta_screen_info_set_updates): When updates are
	true, set all the properties such as size and shape.

	* src/c-screen.c (meta_screen_info_add_window): Create a special
	WindowInfo structure for each window.

	* src/c-screen.c (meta_screen_info_set_size): Set size and output
	shape of the drawable node.
2006-03-14 17:00:56 +00:00
Ryan Lortie
3c6b291641 Only unmaximise window before freeing if the window is actually maximised.
2006-03-06  Ryan Lortie  <desrt@desrt.ca>

        * src/window.c (meta_window_free): Only unmaximise window before
        freeing if the window is actually maximised.  #333563.
2006-03-06 16:33:33 +00:00
Søren Sandmann
832968ddd6 Split the ScreenInfo data structure into separate, new files
Wed Mar  3 13:25:03 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c, src/c-screen.[ch]: Split the ScreenInfo data
        structure into separate, new files c-screen.[ch].

        * src/errors.c (x_error_handler): Forward foreign errors to
        foreign displays.

        * src/errors.c (meta_errors_register_foreign_display): Implement
        this function

        * src/errors.h: Add new meta_errors_register_foreign_display()
2006-03-03 15:53:10 +00:00
Elijah Newren
04a4f7c363 Patch from Thomas Thurman to work around buggy application grouping with
2006-02-27  Elijah Newren  <newren gmail com>

        Patch from Thomas Thurman to work around buggy application
        grouping with transient windows.  #328211

        * src/group.c (meta_window_compute_group):
        Put transients in the same group with their parent, always.

        * src/window.c (update_transient_for):
        Update group too
2006-02-27 22:19:11 +00:00
Søren Sandmann
f8f6016970 Remove include of flash.h
Sat Feb 25 14:50:17 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/window.c: Remove include of flash.h
2006-02-25 19:50:50 +00:00
Søren Sandmann
b1847959b1 Call meta_compositor_begin_move if there is a compositor
Sat Feb 25 11:46:14 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/display.c (meta_display_begin_grab_op): Call
	meta_compositor_begin_move if there is a compositor

	* src/compositor.c (meta_compositor_begin/update/end_move):
	Implement those functions.

	* src/spring-model.[ch]: New files
2006-02-25 16:54:39 +00:00
Søren Sandmann
ca539199b2 Add unused wobbly unminimize animation by Kristian
Wed Feb 15 14:47:50 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (meta_compositor_unminimize): Add unused wobbly
	unminimize animation by Kristian

	* src/compositor.c (meta_compositor_minimize): Add wobbly minimize
	animation by Kristian.

	* src/compositor.c: Add support for turning updates on and off.

	* src/window.c (meta_window_move_resize_internal): Use
	sync counter to make composited resizing tear free
2006-02-15 19:50:12 +00:00
Elijah Newren
74510389bc remove this legacy cruft that we stopped using years ago
2006-02-11  Elijah Newren  <newren gmail com>

	* src/window.c (enum GnomeWinLayer): remove this legacy cruft that
	we stopped using years ago
2006-02-11 23:41:15 +00:00
Thomas Thurman
7aebefad3c Avoid a memory leak when checking which workspace(s) a window is on. Fixes
2006-02-10  Thomas Thurman <thomas thurman org uk>

	Avoid a memory leak when checking which workspace(s) a window is
	on.  Fixes #322059.

        * src/workspace.h (struct MetaWorkspace):
        * src/workspace.c (meta_workspace_new, meta_workspace_free):
	added list_containing_self member to MetaWorkspace

        * src/window.c (meta_window_get_workspaces): use
	window->workspace->list_containing_self instead of allocating (and
	leaking) such a list on the fly.
2006-02-11 05:06:08 +00:00
Elijah Newren
dcec11274a Avoid flashing when closing a maximized window. Fixes #317254.
2006-01-20  Elijah Newren  <newren gmail com>

	Avoid flashing when closing a maximized window.  Fixes #317254.

	* src/window.c (unmaximize_window_before_freeing): new function
	that just fixes the net_wm_state and sends a configure_notify,
	(meta_window_free): use unmaximize_window_before_freeing() instead
	of meta_window_unmaximize() to avoid flicker
2006-01-20 23:36:23 +00:00
Elijah Newren
32d4bd6b63 Patch from Kjartan Maraas to fix a lot of tiny issues (unused variable
2006-01-20  Elijah Newren  <newren gmail com>

	* src/async-getprop.c:
	* src/common.h:
	* src/display.c:
	* src/eggaccelerators.c:
	* src/frames.c:
	* src/gradient.c:
	* src/iconcache.c:
	* src/keybindings.c:
	* src/metaaccellabel.c:
	* src/place.c:
	* src/prefs.c:
	* src/preview-widget.c:
	* src/screen.c:
	* src/session.c:
	* src/stack.c:
	* src/tabpopup.c:
	* src/theme-viewer.c:
	* src/theme.c:
	* src/window-props.c:
	* src/window.c:
	* src/workspace.c:
	* src/tools/metacity-window-demo.c:
	* src/wm-tester/test-gravity.c:
	* src/wm-tester/test-resizing.c:
	* src/wm-tester/test-size-hints.c:
	Patch from Kjartan Maraas to fix a lot of tiny issues (unused
	variable removal, making unused variables used again, correction
	of types passed/declared for printf arguments, removal of unneeded
	breaks and returns, dead code removal, dead code revival, renaming
	to prevent shadowed variables, declaring unexported functions as
	static) spotted by the intel compiler.  #321439
2006-01-20 22:03:56 +00:00
Elijah Newren
9fdd3d165d Fix accidental overzealous focus holding by the terminal introduced by the
2006-01-15  Elijah Newren  <newren@gmail.com>

	Fix accidental overzealous focus holding by the terminal
	introduced by the original patch in bug 326159.  Windows launched
	from panel icons, the panel menu, or global keybindings should get
	focus now.  #326159.

	* src/display.c (meta_display_open, event_callback):
	* src/display.h (struct MetaDisplay):
	* src/keybindings.c (process_event):
	* src/window.c (meta_window_set_user_time):
	Add a new allow_terminal_deactivation field to MetaDisplay and use
	it to track whether the user's last action was interaction with
	the terminal or some outside action (global keybinding, clicking
	on a dock, etc.) likely to launch a new window.

	* src/window.c (window_state_on_map):
	Allow the focus switch from a terminal to something else if
	allow_terminal_deactiviation is true.

	* src/keybindings.c (handle_panel_keybinding):
	Remove some unneeded code.
2006-01-15 17:03:57 +00:00
Elijah Newren
ef792fc1f7 Patch from Jens Granseuer to fix more build issues with gcc 2.95. #327050.
2006-01-15  Elijah Newren  <newren@gmail.com>

	Patch from Jens Granseuer to fix more build issues with gcc 2.95.
	#327050.

	* src/boxes.c (meta_rectangle_edge_cmp_ignore_type):
	* src/window.c (meta_window_show):
	Remove C99 style variable initiailization
2006-01-15 16:37:06 +00:00
Elijah Newren
50bcc976bc Don't dereference a NULL string. Fixes #327013.
2006-01-14  Elijah Newren  <newren gmail com>

	* src/window.c (__window_is_terminal): Don't dereference a NULL
	string.  Fixes #327013.
2006-01-15 04:45:34 +00:00
Søren Sandmann
fea6191473 Add a dependency on libcm when building with compositor.
Fri Jan 13 14:40:19 2006  Søren Sandmann  <sandmann@redhat.com>

	* configure.in: Add a dependency on libcm when building with
	compositor.

	* src/window.c (meta_window_hide): Make this function static.

	* src/window.c (implement_showing): Use meta_compositor_minimize()
	to do a weird minimize effect.

	* src/compositor.[ch]: Beginning of new GL based compositor.

	* src/screen.h (struct _MetaScreen): Add void pointer to
	compositor data.

	* src/screen.c (meta_screen_new): Remove obsolete compositor
	stuff; initialize compositor_data. Don't composite manage screen
	out of this function.

	* src/errors.c (x_error_handler): Check that display is non-NULL
	before using it. Add comment about how that can happen.

	* src/display.c (meta_display_{begin,end}_grab_op): Remove
	explicity damage of windows.

	* src/display.c (meta_display_open): Composite manage all the
	screens.
2006-01-13 19:41:01 +00:00
Elijah Newren
5913b8c5ab Whoops, I forgot to keep my copyright info updated with my previous
2006-01-10  Elijah Newren  <newren@gmail.com>

	* src/bell.c:
	* src/boxes.c:
	* src/boxes.h:
	* src/constraints.c:
	* src/core.c:
	* src/display.c:
	* src/display.h:
	* src/edge-resistance.c:
	* src/frames.c:
	* src/keybindings.c:
	* src/main.c:
	* src/prefs.c:
	* src/prefs.h:
	* src/screen.c:
	* src/screen.h:
	* src/window.c:
	* src/window.h:
	Whoops, I forgot to keep my copyright info updated with my previous
	commits as Havoc had asked me to do.  Doing that now...
2006-01-10 19:43:21 +00:00
Elijah Newren
52df880f32 Add a raise on click option, basically only because all the major distros
2006-01-10  Elijah Newren  <newren@gmail.com>

	Add a raise on click option, basically only because all the major
	distros are patching it in anyway.  See #326156.

	* src/metacity.schemas.in: add the new gconf key and explanation

	* src/prefs.[ch] (#define KEY_RAISE_ON_CLICK, static gboolean
	  raise_on_click, update_raise_on_click, meta_prefs_init,
	  change_notify, meta_prefs_get_raise_on_click,
	  meta_preference_to_string):
	Add all the normal preference handling stuff for this new
	raise-on-click option.

	* src/core.c (meta_core_show_window_menu):
	* src/display.c (event_callback, meta_display_begin_grab_op):
	* src/window.c (window_activate, meta_window_configure_request, ):
	Only raise the window if in raise_on_click mode.

	* src/display.c (meta_display_begin_grab_op,
	  meta_display_end_grab_op, meta_display_check_threshold_reached):
	* src/display.h (struct MetaDisplay):
	* src/window.c (meta_window_handle_mouse_grab_op_event):
	if not in raise-on-click mode only raise on button release if the
	click didn't start a move or resize operation; needs a few extra
	MetaDisplay fields to handle this

	* src/core.c (meta_core_user_lower_and_unfocus):
	no need to do the MRU shuffling if not maintaining the stacking
	order == MRU order invariant

	* src/frames.c (meta_frames_button_press_event):
	* src/window.c (meta_window_begin_grab_op):
	remove an unneeded window raising that is already handled elsewhere
2006-01-10 19:35:03 +00:00
Elijah Newren
f6270596de Don't "steal" focus from terminal windows for new window mappings as the
2006-01-10  Elijah Newren  <newren@gmail.com>

	Don't "steal" focus from terminal windows for new window mappings
	as the difference in usage between terminals and other apps seems
	to suggest this difference in treatment.  See #326159 for details,
	feedback welcome.

	* src/window.[ch] (__window_is_terminal): New function, currently
	an ugly hack and should be replaced by a new property set by
	applications if the behavior works to our liking,
	(window_state_on_map): don't transfer focus to new windows from
	terminals unless the new window is a transient of the focused
	terminal

	* src/keybindigns.c (handle_panel_keybinding): panel run dialog
	keybinding should be counted as an explicit transfer of focus to
	the new window, so override the
	don't-transfer-focus-from-terminals in this case
2006-01-10 18:33:53 +00:00
Elijah Newren
a4d1c6fd61 More thorough handling of source indication. Part of #326041.
2006-01-09  Elijah Newren  <newren@gmail.com>

	More thorough handling of source indication.  Part of #326041.

	* src/window.c (window_activate): new function based off the old
	meta_window_activate but which also takes source indication into
	account, (meta_window_active): just call window_activate() with
	the necessary source indication to get the behavior wanted,
	(meta_window_client_message): check source indication too for
	_net_active_window messages

	* src/window.h (enum MetaClientType): convenience enum for source
	indication handling
2006-01-10 05:44:40 +00:00
Elijah Newren
0f8add8b37 Make the taskbar less flash happy and fix up some related stacking issues.
2006-01-09  Elijah Newren  <newren@gmail.com>

	Make the taskbar less flash happy and fix up some related stacking
	issues.  #326035.

	* src/window.c (windows_overlap): new function,
	(meta_window_show): if a window is denied focus but doesn't
	overlap with the focus window there is no need to set the demands
	attention hint nor stack that window below the focus window,
	(meta_window_get_outer_rect): we're not modifying the window so
	declare it to be const
2006-01-10 05:14:48 +00:00
Elijah Newren
339948fcf2 Patch from Björn Lindqvist to fix a logic error. #322149.
2006-01-02  Elijah Newren  <newren@gmail.com>

	Patch from Björn Lindqvist to fix a logic error.  #322149.

	* src/window.c (update_resize): && should have been ||.
2006-01-02 18:48:30 +00:00
Elijah Newren
ebd0c7e9a6 Patch from Jens Granseuer to fix build with gcc 2.95. #322622.
2006-01-02  Elijah Newren  <newren@gmail.com>

	Patch from Jens Granseuer to fix build with gcc 2.95.  #322622.

	* src/boxes.c (meta_rectangle_region_to_string,
	  meta_rectangle_edge_list_to_string, fix_up_edges):
	* src/constraints.c (meta_window_constrain, setup_constraint_info,
	  place_window_if_needed, constrain_maximization,
	  constrain_fullscreen, constrain_size_increments,
	  constrain_size_limits, constrain_aspect_ratio,
	  do_screen_and_xinerama_relative_constrai,
	  constrain_to_single_xinerama, constrain_fully_onscreen,
	  constrain_partially_onscreen):
	* src/edge-resistance.c (find_nearest_position,
	  apply_edge_resistance, apply_edge_resistance_to_each_side):
	* src/testboxes.c (test_clamping_to_region,
	  test_clipping_to_region, test_shoving_into_region):
	* src/window.c (meta_window_new_with_attrs,
	  meta_window_apply_session_info, meta_window_resize,
	  meta_window_resize_with_gravity, meta_window_configure_request):
	Remove C99 style variable initiailization
2006-01-02 18:37:46 +00:00
Elijah Newren
703f58cdf7 Make the workspace switcher work with dual-head (non-xinerama) setups.
2005-12-27  Elijah Newren  <newren@gmail.com>

	Make the workspace switcher work with dual-head (non-xinerama)
	setups.  Fixes #319423.

	* src/display.c (meta_display_open, event_callback,
	  meta_display_focus_the_no_focus_window):
	* src/display.h (struct MetaDisplay,
	  meta_display_focus_the_no_focus_window):
	* src/keybindings.c (primary_modifier_still_pressed):
	* src/screen.c (meta_screen_new):
	* src/screen.h (struct MetaScreen):
	* src/window.c (meta_window_new_with_attrs, meta_window_show):
	* src/workspace.c (meta_workspace_focus_default_window):
	Replace display->no_focus_window with a no_focus_window for each
	screen.

	* src/display.[ch] (meta_display_xwindow_is_a_no_focus_window,
	  event_callback):
	* src/window.c (meta_window_new_with_attrs):
	New utility function, meta_display_xwindow_is_a_no_focus_window(),
	for checking if the given xwindow is a no_focus_window for one of
	the screens.
2005-12-28 06:24:30 +00:00
Elijah Newren
53cba6ed37 Oops, I only meant to commit the changes to rationales.txt in the last commit 2005-12-22 07:08:38 +00:00
Elijah Newren
7e821f37fd Add xinerama and multi-head tracker bugs 2005-12-22 06:18:38 +00:00