1
0
Fork 0
Commit graph

1685 commits

Author SHA1 Message Date
Thomas Thurman
4c8557055c remove workaround for a problem in GTK 1.3.9(!) which was causing
2008-02-04  Thomas Thurman  <tthurman@gnome.org>

        * configure.in, src/ui/ui.c: remove workaround for a problem
          in GTK 1.3.9(!) which was causing problems. Closes #513737.


svn path=/trunk/; revision=3551
2008-02-04 17:25:30 +00:00
Michael Meeks
2f43d436c8 src/core/display.c (meta_display_open), fetch & use composite version, for
2008-01-28  Michael Meeks  <michael.meeks@novell.com>

        * src/core/display.c (meta_display_open),
        * src/core/compositor.c: fetch & use composite
        version, for remote screens that don't match the
        compile system's version.
        (meta_compositor_manage_screen): bin erroneous FIXME.
        (add_win): remove common warning churn for (very)
        transient windows


svn path=/trunk/; revision=3550
2008-02-04 15:57:07 +00:00
Thomas Thurman
8bd2822e69 core.h is in include, not core. (Last one, I promise.)
2008-02-02  Thomas Thurman  <tthurman@gnome.org>

        * src/Makefile.am: core.h is in include, not core. (Last one, I
          promise.)


svn path=/trunk/; revision=3537
2008-02-03 05:53:18 +00:00
Thomas Thurman
7a340792c9 main.h is in include, not core.
2008-02-02  Thomas Thurman  <tthurman@gnome.org>

        * src/Makefile.am: main.h is in include, not core.


svn path=/trunk/; revision=3536
2008-02-03 04:25:38 +00:00
Thomas Thurman
8e77d5b28d draw-workspace.h is in ui, not core.
2008-02-02  Thomas Thurman  <tthurman@gnome.org>

        * src/Makefile.am: draw-workspace.h is in ui, not core.


svn path=/trunk/; revision=3535
2008-02-02 21:35:23 +00:00
Alex R.M. Turner
18b63e9b5f Have the list also pull windows that are in other workspaces that have the
2008-02-01  Alex R.M. Turner  <armtuk@gmail.com>

        * src/core/display.c (meta_get_tab_entry_list): Have the list also pull 
          windows that are in other workspaces that have the  
          wm_state_needs_attention flag set
        * src/core/window.c (meta_window_set_demands_attention): Make windows that
          are on other workspaces that demand attention that aren't obscured
          count as being obscured
        Bug #333548.

svn path=/trunk/; revision=3533
2008-02-02 04:05:16 +00:00
Christian Persch
ea1c807d69 Use G_STRFUNC instead of the deprecated G_GNUC_FUNCTION. Bug #512561.
2008-01-28  Christian Persch  <chpe@gnome.org>

	* src/core/display.c: (convert_property):
	* src/core/screen.c: (meta_screen_calc_workspace_layout):
	* src/core/xprops.c: (meta_prop_get_values): 
	Use G_STRFUNC instead of the deprecated G_GNUC_FUNCTION. Bug #512561.

svn path=/trunk/; revision=3529
2008-01-28 14:52:34 +00:00
Thomas Thurman
b4890a3d22 more commenting.
2008-01-21  Thomas Thurman  <tthurman@gnome.org>

     * src/ui/theme.[ch]: more commenting.



svn path=/trunk/; revision=3524
2008-01-22 04:00:35 +00:00
Thomas Thurman
7b031a1c28 some more commenting.
2008-01-18  Thomas Thurman  <tthurman@gnome.org>                                                                                                  
                                                                                                                                                  
        * src/ui/theme.[ch]: some more commenting. 

svn path=/trunk/; revision=3523
2008-01-18 05:07:53 +00:00
Thomas Thurman
ca098b2416 Correct comment. Correct comment. Much commenting; #ifdeffed-out debug
2008-01-16  Thomas Thurman  <tthurman@gnome.org>

        * src/core/bell.c: Correct comment.
        * src/core/main.c: Correct comment.
        * src/core/theme.c: Much commenting; #ifdeffed-out debug code removed.
        * src/core/theme.h: Much commenting.



svn path=/trunk/; revision=3522
2008-01-17 03:49:24 +00:00
Thomas Thurman
13918cea25 Commenting. Commenting, and fixing existing comments.
2008-01-13  Thomas Thurman  <tthurman@gnome.org>
        * src/core/bell.c: Commenting.
        * src/core/main.c: Commenting, and fixing existing comments.

svn path=/trunk/; revision=3518
2008-01-13 16:32:56 +00:00
Thomas Thurman
8828532d14 Refactor repeated lines in main() to iterate instead.
2008-01-12  Thomas Thurman  <tthurman@gnome.org>

        * src/core/main.c: Refactor repeated lines in main() to
       iterate instead.


svn path=/trunk/; revision=3516
2008-01-13 02:53:25 +00:00
Thomas Thurman
146ad60c7f removed as it was never used. lots of comments. copyright year is 2008.
2008-01-12  Thomas Thurman  <tthurman@gnome.org>

        * src/core/main.[ch] (meta_get_main_loop): removed as it
        was never used.
        * src/core/main.c: lots of comments.
        * src/core/main.c (version): copyright year is 2008.
        * src/core/c-screen.[ch], src/core/c-window.[ch]: removed
        files from Søren's compositor which were removed by the
        merge with Iain's compositor but reintroduced by the split
        to separate subdirectories.
        * src/core/display.c: fix comments.


svn path=/trunk/; revision=3515
2008-01-13 02:42:47 +00:00
Thomas Thurman
6da40d919b reinstated missing first character! correct reordering of blank fields.
2008-01-12  Thomas Thurman  <tthurman@gnome.org>

        * src/core/display.c: reinstated missing first character!
        * Doxyfile: correct reordering of blank fields.



svn path=/trunk/; revision=3514
2008-01-13 01:10:12 +00:00
Thomas Thurman
a4d657a324 change comments from /*! to /** because the other way makes doxygen think
2008-01-12  Thomas Thurman  <tthurman@gnome.org>

        * src/core/display.c: change comments from /*! to /** because the
          other way makes doxygen think they are Qt comments, which messes
          up brief descriptions.
        * Doxyfile: check in so other people can generate documentation too.
                                                                             

svn path=/trunk/; revision=3513
2008-01-13 01:01:21 +00:00
Thomas Thurman
11ba3be6b9 further commenting (trying to keep comment addings down to once a day at
2008-01-07  Thomas Thurman  <tthurman@gnome.org>

        * src/core/display.c: further commenting (trying to keep comment
                        addings down to once a day at most so you don't all get spammed
                                    too much). 



svn path=/trunk/; revision=3511
2008-01-08 03:59:12 +00:00
Thomas Thurman
286af99def g_free is a no-op on nulls; there is no need to test.
2008-01-07  Thomas Thurman  <tthurman@gnome.org>

        * src/core/main.c (main): g_free is a no-op on nulls; there is no
       need to test.



svn path=/trunk/; revision=3510
2008-01-08 03:13:17 +00:00
Thomas Thurman
a409a0a098 Function commenting marathon; more to come.
2008-01-06  Thomas Thurman  <tthurman@gnome.org>

        * src/core/display.c: Function commenting marathon; more to come.



svn path=/trunk/; revision=3506
2008-01-06 21:23:33 +00:00
Thomas Thurman
9d1549e1ff Two really minor coding standards layout tweaks.
2008-01-02  Thomas Thurman  <tthurman@gnome.org>

        * src/core/xprops.c (meta_prop_get_cardinal), src/core/compositor.c
        (timeout_debug): Two really minor coding standards layout tweaks.


svn path=/trunk/; revision=3503
2008-01-03 03:30:55 +00:00
Iain Holmes
212a9f26ab Don't do anything in meta_compositor_free_window. It doesn't seem to be
needed and breaks stuff badly (disappearing windows)

svn path=/trunk/; revision=3500
2007-12-27 23:51:29 +00:00
Iain Holmes
e61015cb42 Don't set mark newly mapped windows as damaged. Fixes a shadow drawing
issue


svn path=/trunk/; revision=3499
2007-12-27 23:11:43 +00:00
Iain Holmes
c96ae75437 USe the compositor overlay window instead of the root window.
2007-12-25  Iain Holmes  <iain@gnome.org>

        * src/core/compositor.c: USe the compositor overlay window 
instead of
        the root window.


svn path=/trunk/; revision=3498
2007-12-25 22:55:59 +00:00
Paolo Borelli
b9e1a9159e do not leak list.
2007-12-21  Paolo Borelli  <pborelli@katamail.com>

	* src/core/core.c (meta_invalidate_default_icons): do not leak list.

	* src/core/edge-resistance.c 
	(meta_display_compute_resistance_and_snapping_edges): ditto.

	* src/core/workspace.c (meta_workspace_index): small cleanup in list
	handling.


svn path=/trunk/; revision=3495
2007-12-21 19:56:07 +00:00
Havoc Pennington
b718f79c47 fix a third warning about %d and long int
2007-12-19  Havoc Pennington  <hp@redhat.com>

	* src/core/display.c (meta_display_open): fix a third warning
	about %d and long int

	* src/core/delete.c (io_from_ping_dialog): fix another warning
	about long int to %d

	* src/core/compositor.c (meta_compositor_new): fix a warning about
	long int to %d

	* src/core/iconcache.c (meta_read_icons): use
	meta_ui_get_fallback_icons() instead of incorrectly including theme.h

	* src/ui/ui.c (meta_ui_get_fallback_icons): new function


svn path=/trunk/; revision=3492
2007-12-19 21:38:15 +00:00
Havoc Pennington
72b08c82b1 sort source files into these directories according to which part of the WM
2007-12-19  Havoc Pennington  <hp@redhat.com>

	* src/ui, src/core, src/include: sort source files into these
	directories according to which part of the WM they are supposed to
	be in. In an eventual plan, we should also create
	src/compositor/render, src/compositor/fallback and move some of
	the compositor stuff into that.
	
	* autogen.sh: require a newer automake, so we don't have to use
	a recursive build

	* src/ui/tabpopup.c: put in a hack to make the build temporarily
	work, want to commit the large rearrangement before fixing this
	not to include workspace.h or frame.h

	* src/core/iconcache.c (meta_read_icons): temporarily break this
	to get the build to work, want to commit the large rearrangement
	before fixing this file not to include theme.h


svn path=/trunk/; revision=3491
2007-12-19 21:17:50 +00:00
Iain Holmes
c2a6eeaf5e Merge compositor branch.
2007-12-18  Iain Holmes  <iain@gnome.org>

        * configure.in, src/theme.c, src/display.c,
      src/theme.h, src/display.h, src/theme-parser.c,
      src/compositor.c, src/c-screen.c, src/compositor.h,
      src/c-screen.h, src/ui.c, src/screen.c, src/ui.h,
      src/screen.h, src/c-window.c, src/c-window.h,
      src/theme-viewer.c, src/Makefile.am: Merge compositor branch.


svn path=/trunk/; revision=3483
2007-12-19 03:49:50 +00:00
Thomas Thurman
83e18f8da4 remove dead code; closes #501365.
2007-12-11  Thomas Thurman  <tthurman@gnome.org>

        * src/theme-parser.c: remove dead code; closes #501365.


svn path=/trunk/; revision=3472
2007-12-12 02:23:53 +00:00
Thomas Thurman
855de7253d rewrite long description of
2007-12-08  Thomas Thurman  <tthurman@gnome.org>

        * src/metacity.schemas.in: rewrite long description of
        /schemas/apps/metacity/general/focus_new_windows because we
        love the translators really. Closes #474889.


svn path=/trunk/; revision=3466
2007-12-09 23:48:39 +00:00
Matthias Clasen
e7dc04d28e check for null before adding menu; closes #496054.
2007-12-08  Matthias Clasen  <mclasen@redhat.com>

        * src/menu.c (meta_window_menu_new): check for null before adding
        menu; closes #496054.


svn path=/trunk/; revision=3465
2007-12-09 23:03:45 +00:00
Thomas Thurman
4564236abf Recur if the keypress ended a grab, so it can be processed in its own
2007-12-08  Thomas Thurman  <tthurman@gnome.org>

        * src/keybindings.c (meta_display_process_key_event): Recur if the
        keypress ended a grab, so it can be processed in its own right.
        Closes #112560.


svn path=/trunk/; revision=3464
2007-12-09 22:56:12 +00:00
Martin Meyer
71c83da805 Fix typo where wrong variable was checked (reported by Kjartan Maraas).
2007-12-08  Martin Meyer  <elreydetodo@gmail.com>

        * src/theme-parser.c (parse_draw_op_element): Fix
        typo where wrong variable was checked (reported by
        Kjartan Maraas). Closes #501362.


svn path=/trunk/; revision=3462
2007-12-09 19:39:26 +00:00
Lucas Rocha
20d599819b try to get the session client ID from DESKTOP_AUTOSTART_ID environment
2007-11-19  Lucas Rocha  <lucasr@gnome.org>

	* src/main.c (main): try to get the session client ID from 
	DESKTOP_AUTOSTART_ID environment variable in case the --sm-client-id 
	is not used. Closes #498033.

svn path=/trunk/; revision=3415
2007-11-18 23:48:23 +00:00
Benjamin Gramlich
3789229a70 make our theme search compliant to the XDG Base Directory Specification.
2007-11-17  Benjamin Gramlich  <benjamin.gramlich@gmail.com>

        * src/theme-parser.c (meta_theme_load): make our theme
        search compliant to the XDG Base Directory Specification.
        Closes #480026.


svn path=/trunk/; revision=3411
2007-11-18 03:23:58 +00:00
Thomas Thurman
14c046d18d remove almost-unused files. move the used parts of api.[ch] in here.
2007-11-15  Thomas Thurman  <thomas@thurman.org.uk>                                                                                                                       
                                                                                                                                                                          
        * src/api.[ch]: remove almost-unused files.                                                                                                                       
        * src/colors.[ch]: move the used parts of api.[ch] in here.                                                                                                       
        Closes #496947.


svn path=/trunk/; revision=3401
2007-11-16 02:53:25 +00:00
Peter Bloomfield
fa51a94a69 more changes discussed in bug #461927
svn path=/trunk/; revision=3391
2007-11-13 13:31:14 +00:00
Thomas Thurman
2a9dc7272b adjust expression which decides whether new windows should not go on top,
2007-11-11  Thomas Thurman  <thomas@thurman.org.uk>

        * src/window.c (meta_window_show): adjust expression which decides
        whether new windows should not go on top, so that restacking happens
        only the first time a window is mapped. Thanks to Olav Vitters for
        pointing out the problem. Re-fixes #486445.


svn path=/trunk/; revision=3386
2007-11-12 00:45:35 +00:00
Alex R.M. Turner
bcc3f56193 Instruct the GtkLabel in the tabpopup to ellipsize text that is too big.
2007-11-11  Alex R.M. Turner  <armtuk@gmail.com>

        * src/tabpopup.c (tab_entry_new, meta_ui_tab_popup_new): Instruct the
        GtkLabel in the tabpopup to ellipsize text that is too big.  Set the
        maximum window width of the tabpopup to screen_width/4, which seems a
        sensible size for the popup.


svn path=/trunk/; revision=3385
2007-11-11 22:17:51 +00:00
Elijah Newren
618a9f03b3 If a window is launched without any kind of launch timestamp, grab the
2007-11-09  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_new_with_attrs): If a window is
	launched without any kind of launch timestamp, grab the current
	time and stash it away.  When transients of that window are also
	launched without a timestamp, we can use the stashed timestamp
	from the parent.  Fixes #488468.

svn path=/trunk/; revision=3381
2007-11-09 20:41:45 +00:00
Federico Mena Quintero
98886f3d94 Oops, revert patch which I didn't intend to commit - stupid 'git-svn dcommit' - Federico
Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=3379
2007-11-09 19:01:31 +00:00
Federico Mena Quintero
7b690d6bc1 Fix swapped arguments when updating _NET_WM_USER_TIME
2007-11-09  Federico Mena Quintero  <federico@novell.com>

	* src/window.c (intervening_user_event_occurred): When the window
	doesn't have a user time nor an initial timestamp set, act as if
	there always was an intervening user event.  This causes
	un-timestamped windows to *not* get the focus.  Fixes
	http://bugzilla.gnome.org/show_bug.cgi?id=488468

Signed-off-by: Federico Mena Quintero <federico@gnu.org>

svn path=/trunk/; revision=3378
2007-11-09 18:57:29 +00:00
Peter Bloomfield
6fa4345514 save unmaximized part of client root coords
svn path=/trunk/; revision=3375
2007-11-07 04:25:57 +00:00
Peter Bloomfield
d0523744b7 do not save client root coords while window is maximized
svn path=/trunk/; revision=3374
2007-11-06 13:23:39 +00:00
Iain Holmes
988e5f49dd Add a --sync option to turn on synchronous X calls
svn path=/trunk/; revision=3368
2007-10-30 18:10:54 +00:00
Jans Granseuer
118d962b2d Free title of preview when the preview is destroyed. Closes #469682.
2007-10-28  Jans Granseuer  <jensgr@gmx.net>

        * src/preview-widget.c (meta_preview_finalize): Free title of
        preview when the preview is destroyed. Closes #469682.


svn path=/trunk/; revision=3365
2007-10-28 19:55:37 +00:00
Alex R.M. Turner
1bf37776c3 Truncate the string to max_char_per_title before adding bold tags and fix
2007-10-27  Alex R.M. Turner  <armtuk@gmail.com>

        * src/tabpopup.c (tab_entry_new): Truncate the string to
        max_char_per_title before adding bold tags and fix general flow of
        function.


svn path=/trunk/; revision=3363
2007-10-28 15:51:14 +00:00
Thomas Thurman
4ef11cfbd3 new function. rewrite assertion not to put window on top in terms of
2007-10-16  Thomas Thurman  <thomas@thurman.org.uk>

        * src/window.c (window_would_be_covered): new function.
        * src/window.c (meta_window_show): rewrite assertion not
        to put window on top in terms of window_would_be_covered();
        remove assertion because it's no longer valid; explicitly
        don't focus windows that shouldn't be focussed; closes #486445.


svn path=/trunk/; revision=3358
2007-10-16 22:29:59 +00:00
Elijah Newren
dc7e1007b0 Patch from Alexey Rusakov to prevent a crash on logout with metacity
2007-09-15  Elijah Newren  <newren gmail com>

	* src/session.c (warn_about_lame_clients_and_finish_interact):
	Patch from Alexey Rusakov to prevent a crash on logout with
	metacity subsequently not being restored in future sessions.
	Fixes #433253.

svn path=/trunk/; revision=3340
2007-09-16 02:46:32 +00:00
Søren Sandmann
b1ff50f45f Don't maintain a passive grab on windows when raise-on-click is FALSE -
Tue Aug  7 13:26:49 2007  Søren Sandmann  <sandmann@redhat.com>

	* src/window.c (meta_window_notify_focus): Don't maintain a
	passive grab on windows when raise-on-click is FALSE - bug
	461577.



svn path=/trunk/; revision=3293
2007-08-07 17:27:09 +00:00
Thomas Thurman
1a6c98c79b If KEY_AUTO_RAISE_DELAY is undefined or non-integer, it is not treated as
2007-08-06  Thomas Thurman  <thomas@thurman.org.uk>

        If KEY_AUTO_RAISE_DELAY is undefined or non-integer, it is not treated
        as zero.

        * src/prefs.c (meta_prefs_init): check type of key, and behave sensibly
        if it's unexpected.
        * src/prefs.c (find_and_update_list_binding): remove old comment.


svn path=/trunk/; revision=3287
2007-08-07 01:30:28 +00:00
Frédéric Crozat
696ef85e64 Fix mangled window title in "Force Quit" dialog when using non-UTF8
* src/delete.c: Fix mangled window title in "Force Quit"
        dialog when using non-UTF8 locale. Close #462734.


svn path=/trunk/; revision=3284
2007-08-03 07:43:03 +00:00
Thomas Thurman
007e8c013c Move "close" to bottom of window menu; allow workspace list to appear at
2007-08-02  Thomas Thurman  <thomas@thurman.org.uk>

        Move "close" to bottom of window menu; allow workspace list to appear
        at any position in the menu. Closes #104026.

        * src/menu.c (MetaMenuItemType): added new MENU_ITEM_WORKSPACE_LIST
        item.
        * src/menu.c (menuitems): reordered "close", added a workspace list.
        * src/menu.c (menu_item_new): return null for workspace lists.
        * src/menu.c (meta_window_menu_new): handle workspace lists.


svn path=/trunk/; revision=3283
2007-08-02 13:45:46 +00:00
Thomas Thurman
cd07c25706 windows which are always on top have the "stick" menu option insensitive.
2007-06-31  Thomas Thurman  <thomas@thurman.org.uk>

        * src/window.c (meta_window_show_menu): windows which are
        always on top have the "stick" menu option insensitive. (#460997).


svn path=/trunk/; revision=3282
2007-07-31 12:20:14 +00:00
Thomas Thurman
3802f157b6 Put all bitfields together to help with optimisation. Closes #450271 (for
2007-06-23  Thomas Thurman  <thomas@thurman.org.uk>

        * src/window.h (MetaWindow): Put all bitfields together to
        help with optimisation. Closes #450271 (for real this time).


svn path=/trunk/; revision=3281
2007-07-30 13:53:25 +00:00
Matthias Clasen
e98e38d32e Use the correct directory when installing keybindings. (#454055)
2007-07-23  Matthias Clasen  <mclasen@redhat.com>

        * configure.in:
        * src/Makefile.am: Use the correct directory when
        installing keybindings.  (#454055)


svn path=/trunk/; revision=3278
2007-07-24 02:41:33 +00:00
Rob Bradford
618a6b38c3 Fix a bug where the window can be focused without being raised if the
2007-07-22  Rob Bradford  <rob@robster.org.uk>

        Fix a bug where the window can be focused without being raised
        if the maximize is aborted. Fixes #459027.

        * src/frames.c (meta_frames_button_press_event,
        meta_frames_button_release_event): When maximising only focus
        the window once the button press is released.       



svn path=/trunk/; revision=3273
2007-07-23 01:48:17 +00:00
Cosimo Cecchi
e8b016984b Unset fullscreen is an allowed action where relevant. Fixes #449427.
2007-07-22  Cosimo Cecchi  <anarki@lilik.it>

Unset fullscreen is an allowed action where relevant. Fixes #449427.

* src/window.c (set_allowed_actions_hint): Separate FULLSCREEN action from RESIZE action.
                                                                                      

svn path=/trunk/; revision=3272
2007-07-23 00:46:03 +00:00
Yair Hershkovitz
8bbccb91f7 Reverse window buttons and align them to the left for RTL locales. (#92212)
svn path=/trunk/; revision=3271
2007-07-22 06:39:29 +00:00
Thomas James Alexander Thurman
371f0b732f I don't actually know what year it is most days
svn path=/trunk/; revision=3255
2007-06-18 17:32:09 +00:00
Thomas Thurman
bdd9e28878 Update copyright year because it was five years out of date.
2007-06-18  Thomas Thurman  <thomas@thurman.org.uk>

        * src/main.c (version): Update copyright year because it was
        five years out of date.


svn path=/trunk/; revision=3254
2007-06-18 17:30:28 +00:00
Thomas Thurman
7c4af65ec1 Only open new windows on the current xinerama. Closes #145503, for now.
2007-06-18  Thomas Thurman  <thomas@thurman.org.uk>

        * src/place.c (find_first_fit, meta_window_place): Only open new
        windows on the current xinerama. Closes #145503, for now.


svn path=/trunk/; revision=3247
2007-06-18 11:46:44 +00:00
Thomas Thurman
e6083f64fb return a boolean instead a void, to show whether startup properties were
2007-06-17  Thomas Thurman  <thomas@thurman.org.uk>

        * src/screen.[ch] (meta_screen_apply_startup_properties): return a
        boolean instead a void, to show whether startup properties were
        applied. Also some commenting.
        * src/window-props.c: (reload_net_startup_id): Only activate the
        window if the startup_id was actually changed. Closes #400167.


svn path=/trunk/; revision=3245
2007-06-18 02:37:14 +00:00
Damien Carbery
b996cd03be MetaCloseEffect and MetaFocusEffect, which were empty structs, #ifdeffed
2007-06-16  Damien Carbery  <damien.carbery@sun.com>

        * effects.h: MetaCloseEffect and MetaFocusEffect, which were empty
        structs, #ifdeffed out because they broke the build on Solaris.
        Closes #397296.



svn path=/trunk/; revision=3244
2007-06-17 02:55:07 +00:00
Damien Carbery
36287b9417 make prototype of meta_window_unqueue match implementation. Closes
2007-06-16  Damien Carbery  <damien.carbery@sun.com>

        * window.h: make prototype of meta_window_unqueue match
        implementation. Closes #446535.



svn path=/trunk/; revision=3243
2007-06-17 02:15:07 +00:00
Thomas Thurman
8f2b9cb4a9 Refactor thrice-duplicated queue code in window.c. Closes #376760.
2007-06-10  Thomas Thurman  <thomas@thurman.org.uk>

        Refactor thrice-duplicated queue code in window.c. Closes #376760.

        * src/window.c (meta_window_queue, meta_window_unqueue):
        New functions.
        * src/window.[ch] (meta_window_unqueue_*, meta_window_queue_*):
        Removed functions.
        * src/window.c (meta_window_new_with_attrs, meta_window_free,
        meta_window_flush_calc_showing, queue_calc_showing_func,
        meta_window_minimize, meta_window_unminimize, meta_window_maximize,
        meta_window_make_fullscreen, meta_window_shade,
        meta_window_unshade, meta_window_move_resize_internal,
        window_stick_impl, window_unstick_impl,
        meta_window_client_message, process_property_notify): Modified to
        use new queueing functions.
        * src/window.c (idle_move_resize, idle_update_icon,
        idle_calc_showing): update to receive queue number from pointer.
        * src/window.h (MetaQueueType): new enum.
        * src/window.h (MetaWindow): *_queued replaced with is_in_queue
        bitfield.
        * src/core.c (meta_core_queue_frame_resize):
        * src/display.c (event_callback,
        meta_display_queue_retheme_all_windows): Using new queueing functions.
        * src/frame.c (meta_window_destroy_frame): Using new queueing functions.
        * src/screen.c (queue_resize, meta_screen_resize_func,
        queue_windows_showing): Using new queueing functions.
        * src/window-props.c (reload_mwm_hints, reload_wm_hints,
        reload_transient_for): Using new queueing functions.
        * src/workspace.c (meta_workspace_add_window,
        meta_workspace_remove_window, meta_workspace_queue_calc_showing,
        meta_workspace_invalidate_work_area): Using new queueing functions.


svn path=/trunk/; revision=3236
2007-06-11 01:15:33 +00:00
Thomas Thuramn
0418146249 added switch_group; closes #444879.
2007-06-09  Thomas Thuramn  <thomas@thurman.org.uk>

        * src/50-metacity-key.xml.in: added switch_group; closes #444879.


svn path=/trunk/; revision=3235
2007-06-09 21:11:57 +00:00
Elijah Newren
6e70013412 Update the raise_on_click description to try to prevent misuses, to
2007-06-08  Elijah Newren  <newren gmail com>

	* src/metacity.schemas.in:
	Update the raise_on_click description to try to prevent misuses,
	to appropriately warn users, and to stop wasting the time of
	application developers.  #445447, #389923

svn path=/trunk/; revision=3234
2007-06-08 15:28:48 +00:00
Thomas Thurman
ff33209e1f changed all tabs to spaces. Removed and replaced with meta_core_get(). New
2007-06-06  Thomas Thurman  <thomas@thurman.org.uk>

        * frames.c, core.[ch]: changed all tabs to spaces.
        * core.[ch] (meta_core_get_client_size, meta_core_window_has_frame,
        meta_core_titlebar_is_onscreen, meta_core_get_client_xwindow,
        meta_core_get_frame_flags, meta_core_get_frame_type,
        meta_core_get_mini_icon, meta_core_get_icon, meta_core_get_position,
        meta_core_get_size, meta_core_get_frame_workspace,
        meta_core_get_frame_extents, meta_core_get_screen_size): Removed
        and replaced with meta_core_get().
        * core.[ch] (meta_core_get): New function.
        * core.h (MetaCoreGetType): New enum.
        * frames.c (meta_frames_ensure_layout, meta_frames_calc_geometry,
        meta_frames_get_geometry, meta_frames_apply_shapes,
        meta_frame_titlebar_event, meta_frames_button_press_event,
        populate_cache, clip_to_screen, meta_frames_paint_to_drawable,
        meta_frames_set_window_background, get_control): Replace use of
        removed functions in ui.c with meta_core_get().

        All this should make things a little faster. Closes #377495.


svn path=/trunk/; revision=3233
2007-06-07 03:31:17 +00:00
Thomas Thurman
1004bd8b60 fix label layout for RTL languages. Closes #433400.
2007-06-04  Thomas Thurman  <thomas@thurman.org.uk>

        * src/metaaccellabel.c (meta_accel_label_expose_event): fix
        label layout for RTL languages. Closes #433400.


svn path=/trunk/; revision=3228
2007-06-04 12:50:50 +00:00
Thomas Thurman
45966f581b Pango layout for titlebars should take LTR/RTL-ness from the underlying
2007-06-03  Thomas Thurman  <thomas@thurman.org.uk>

        * src/frames.c (meta_frames_ensure_layout): Pango layout for
        titlebars should take LTR/RTL-ness from the underlying widget
        and not from sniffing the content. Closes #438944.



svn path=/trunk/; revision=3227
2007-06-03 06:26:29 +00:00
Yair Hershkovitz
5194df842c Add support for RTL languages so that alt-tab, etc., go the other way. In
2007-05-25  Yair Hershkovitz  <yairhr@yahoo.com>

        * src/workspace.c (meta_workspace_get_neighbor): Add support
        for RTL languages so that alt-tab, etc., go the other way.
        * src/keybindings.c (handle_activate_menu): In RTL locales,
        pop up the menu on the right-hand side when the menu keystroke
        is pressed.
        * src/fixedtip.c (meta_fixed_tip_show): right-justify tooltips
        in RTL locales.
        * src/menu.c (popup_position_func): popup menus in RTL locales
        are flush with the right-hand side of the window where possible.
        * src/frames.c (show_tip_now, meta_frames_button_press_event):
        tooltips are aligned with the right-hand side of buttons in
        RTL locales.
        * src/ui.[ch] (meta_ui_get_direction, enum MetaUIDirection):
        New content.
        * src/window.c (meta_window_show_menu): "move left" appears above
        "move right" in the window menu for LTR locales, and vice versa
        for RTL locales.

        This is all to close bug #387893.


svn path=/trunk/; revision=3222
2007-05-25 14:36:12 +00:00
Linus Torvalds
1724fa36f1 Add code to configure what happens when the titlebar is right or middle
2007-04-24  Linus Torvalds  <torvalds@woody.linux-foundation.org>

        * src/prefs.[ch] (init_action_meta_prefs, meta_prefs_init,
        action_change_titlebar, change_notify, update_action_titlebar,
        meta_preference_to_string): Add code to configure what happens
        when the titlebar is right or middle clicked as well as
        double clicked.

                                                                                                                                             

svn path=/trunk/; revision=3214
2007-04-25 03:30:17 +00:00
Elijah Newren
18c9101a4f Fix some uninitialized memory usage errors. #427385
2007-04-23  Elijah Newren  <newren gmail com>

        Fix some uninitialized memory usage errors.  #427385

        * src/frame.c (meta_window_ensure_frame):
        * src/frames.c (meta_frames_manage_window):
        Do not try to set the window background in
        meta_frames_manage_window() since the frame window is not yet
        created and not yet registered with the corresponding MetaWindow.
        Do it inside meta_window_ensure_frame() instead.

svn path=/trunk/; revision=3208
2007-04-23 22:44:01 +00:00
Elijah Newren
e66919510f Fix some fallout from #426519; update user_rect for all position changes
2007-04-17  Elijah Newren  <newren gmail com>

	Fix some fallout from #426519; update user_rect for all position
	changes prior to the window being marked as placed.  Prevents
	emacs in particular from flickering on start and always being
	shoved to the upper-left corner.

	* src/window.c (meta_window_move_resize_internal):
	Record position in user_rect if the window is not yet marked as
	placed too

	* src/window.c (struct MetaWindow, meta_window_new_with_attrs,
	  meta_window_move_resize_internal):
	Remove window->user_has_move_resized; it's not needed or used
	anymore.

	* src/window.[ch] (meta_window_get_user_position):
	Remove this function as it is no longer needed or used.

svn path=/trunk/; revision=3203
2007-04-18 05:43:42 +00:00
Elijah Newren
966e36b9f6 Prevent metacity from "forgetting" which machine a window is on. #418552
2007-04-16  Elijah Newren  <newren gmail com>

	Prevent metacity from "forgetting" which machine a window is on.
	#418552

	* src/window.c (meta_window_new_with_attrs): reorder the property
	loading so that we know the wm_client_machine when we load the
	name of the window and can modify the window name accordingly.

svn path=/trunk/; revision=3201
2007-04-16 16:23:12 +00:00
Elijah Newren
3f7d729978 Preserve stacking order across restarts.
2007-04-15  Elijah Newren  <newren gmail com>

	Preserve stacking order across restarts.

	* src/display.c (meta_display_unmanage_windows_for_screen):
	unmap windows in stacking order so that stacking is preserved upon
	shutdown

	* src/display.[ch] (meta_display_stack_cmp):
	* src/session.c (stack_cmp, save_state):
	rename stack_cmp() -> meta_display_stack_cmp() and move it to a
	different function so that it can be used in both
	session.c:save_state() and
	meta_display_unmanage_windows_for_screen()

svn path=/trunk/; revision=3197
2007-04-16 04:57:32 +00:00
Elijah Newren
6de7271ab6 Remove incorrect usage of window.h from menu.c. See #426791 & #382962.
2007-04-15  Elijah Newren  <newren gmail com>

	Remove incorrect usage of window.h from menu.c.  See #426791 &
	#382962.

	* src/menu.c (enum MetaMenuItemType, variable menuitems,
	  meta_menu_item_new):
	cleanup: add a MENU_ITEM_RADIOBUTTON for the sticky stuff

	* src/menu.c (variable menuitems):
	* src/core.c (meta_core_get_menu_accelerator):
	* src/window.c (menu_callback, meta_window_show_menu):
	* src/common.h (enum MetaMenuOp):
	reinstate META_MENU_OP_UNABOVE

	* src/menu.c (meta_window_menu_new):
	remove hacks (using inappropriate data) for STICK/UNSTICK/ABOVE
	and clean it up while just setting STICK/UNSTICK activeness as
	necessary

	* src/menu.[ch] (meta_window_menu_new):
	* src/ui.[ch] (meta_ui_window_menu_new):
	make the active_workspace parameter an unsigned long

2007-04-15  Bruno Boaventura <brunobol@gnome.org>

	* src/menu.c (meta_window_menu_new): don't show the current
	workspace as a possible workspace to switch to.  Fixes #426791.

svn path=/trunk/; revision=3196
2007-04-16 04:48:14 +00:00
Elijah Newren
bc6996b171 do not auto-maximize windows larger than the workarea in only a single
2007-04-12  Elijah Newren  <newren gmail com>

	* src/place.c (meta_window_place): do not auto-maximize windows
	larger than the workarea in only a single direction.  Fixes
	#419810.

svn path=/trunk/; revision=3194
2007-04-12 22:25:25 +00:00
Elijah Newren
9ec6dbd5ca Make sure apps have correct info about their coordinates, even on unmap.
2007-04-11  Elijah Newren  <newren gmail com>

	Make sure apps have correct info about their coordinates, even on
	unmap.  Fixes temporary hang with libXt (XtVaSetValues setting x &
	y coordinates).  #399552.

	* src/frame.c (meta_window_destroy_frame): Add a comment noting
	that the current choice causes the need for a ConfigureNotify
	event

	* src/window.c (meta_window_free): Send a configure notify event
	due to our XReparentWindow coordinate choices on withdrawal,
	(unmaximize_window_before_freeing): no need to send a configure
	notify from here since it is always done in meta_window_free new,
	(send_configure_notify): have to special case the coordinates used
	when withdrawing the window

svn path=/trunk/; revision=3192
2007-04-12 04:02:57 +00:00
Thomas Thurman
2034a309e5 Workaround for a gdk bug which dies with BadAlloc if you try to allocate
2007-04-11  Thomas Thurman  <thomas@thurman.org.uk>

        Workaround for a gdk bug which dies with BadAlloc if you try
        to allocate an insanely huge rectangle for an insanely huge
        window. Fixes #399529.



svn path=/trunk/; revision=3191
2007-04-12 03:48:50 +00:00
Elijah Newren
7626f74b85 Advertise support of Above and Below operations (assuming the proposed
2007-04-11  Elijah Newren  <newren gmail com>

	Advertise support of Above and Below operations (assuming the
	proposed EWMH additions of _NET_WM_ACTION_(ABOVE|BELOW) will be
	accepted, otherwise these changes will have to be modified).  Part
	of #115247.

	* src/display.[ch] (meta_display_open, struct MetaDisplay):
	* src/screen.c (set_wm_check_hint):
	Add support for _NET_WM_ACTION_ABOVE and _NET_WM_ACTION_BELOW

	* src/window.c (set_allowed_actions_hints):
	add active_above and action_below

svn path=/trunk/; revision=3190
2007-04-11 17:15:54 +00:00
Elijah Newren
eb639a4650 make sure to set _NET_WM_ALLOWED_ACTIONS so that libwnck menus don't have
2007-04-10  Elijah Newren  <newren gmail com>

	* src/window.c (recalc_window_features): make sure to set
	_NET_WM_ALLOWED_ACTIONS so that libwnck menus don't have sensitive
	but ineffective menu items.  The "On Top" item is now buggy, but
	due to the fact that _NET_WM_ACTION_ABOVE is not yet defined in
	the EWMH.  Fixes #115247.

svn path=/trunk/; revision=3189
2007-04-11 02:37:30 +00:00
Elijah Newren
b8f89db4d1 Add support for _NET_MOVERESIZE_WINDOW. #344521.
2007-04-09  Elijah Newren  <newren gmail com>

	Add support for _NET_MOVERESIZE_WINDOW.  #344521.

	* src/display.c (handle_net_moveresize_window, event_callback):
	Remove handle_net_moveresize_window() and the call to it; this
	code was highly buggy, though to be fair it was never tested and
	had simply been put into the code in commented out form.

	* src/screen.c (set_supported_hint):
	add atom_net_moveresize_window

	* src/window.[ch]:
	(meta_window_configure_request, meta_window_move_resize_request):
	Split out the moving/resize part of the configure request and put
	it into meta_window_move_resize_request

	(meta_window_client_message):
	check for NET_MOVERESIZE_WINDOW messages and call
	meta_window_move_resize_request() with the appropriate parameters
	to handle them

	(meta_window_move_resize_internal):
	fix some of the big comment at this function -- it wasn't quite
	right, use the passed in gravity instead of
	window->size_hints.win_gravity when calling adjust_for_gravity()
	to make sure the correct adjustments are used.

	(meta_window_get_gravity_position,
	 meta_window_get_geometry, meta_window_move_resize_request):
	add a gravity parameter to meta_window_get_gravity_position and
	have it use that gravity instead of window->size_hints.win_gravity

svn path=/trunk/; revision=3186
2007-04-09 23:00:55 +00:00
Elijah Newren
ebfbef86a0 Remove grab_start_serial, which we expect to be an ancient attempt to
2007-04-08  Elijah Newren  <newren gmail com>

	Remove grab_start_serial, which we expect to be an ancient attempt
	to workaround sloppy/mouse focus bugs that have since been
	correctly fixed.  May fix some race conditions.  May cause nasty
	bugs in sloppy/mouse focus modes.  We'll find out soon enough...
	See #304430.

	* src/display.c (event_callback):
	remove event->xany.serial >= display->grab_start_serial in several
	event callback handlers

	* src/display.[ch] (struct _MetaDisplay, meta_display_begin_grab_op):
	* src/keybindings.c (do_choose_window, handle_workspace_switch):
	* src/frames.c (meta_frames_button_press_event):
	* src/core.[ch] (meta_core_begin_grab_op):
	* src/window.c (meta_window_client_message, meta_window_begin_grab_op):
	don't require an event_serial to be passed to
	meta_display_begin_grab_op () and don't record it anymore.

	* src/ui.c (struct _EventFunc, filter_func,
	  meta_ui_get_last_event_serial)
	* src/core.h (meta_ui_get_last_event_serial):
	remove meta_ui_get_last_event_serial() function (don't ask me why
	it was declared in core.h) and the last_even_serial field of
	_EventFunc

svn path=/trunk/; revision=3182
2007-04-09 05:49:57 +00:00
Elijah Newren
addf369006 Fix move/resize events in relation to combinations of ConfigureRequest and
2007-04-08  Elijah Newren  <newren gmail com>

	Fix move/resize events in relation to combinations of
	ConfigureRequest and WM_NORMAL_HINTS change notifications (plus a
	few code cleanups).  Fixes #426519.

	* src/window.c (meta_window_move_resize_now):
	move to the user_rect position, not some weird combination of rect
	and user_rect

	* src/window.c (meta_window_configure_request):
        set user_rect in response to ConfigureRequest events (after the
	ConfigureRequest values have been constrained) and add a big
	comment explaining this change, remove unused only_resize variable
	and irrelevant huge FIXME comment about it

	* src/window.[ch] (meta_window_get_client_root_coords):
	new function

	* src/display.c (meta_display_begin_grab_op):
	* src/keybindings.c (process_keyboard_move_grab):
	* src/window.c (meta_window_unmaximize,
	  meta_window_move_resize_internal, meta_window_begin_wireframe,
	  update_move, meta_window_refresh_resize_popup,
	  warp_grab_pointer)
	combine multi-step client rect root coord setting into a single
	function call to meta_window_get_client_root_coords()

svn path=/trunk/; revision=3181
2007-04-09 03:43:55 +00:00
Elijah Newren
0a8bdcdcb3 Add an (unbound by default) keybinding for setting spew marks in verbose
2007-04-07  Elijah Newren  <newren gmail com>

	* src/prefs.[ch] (screen_bindings array,
	  META_KEYBINDING_SET_SPEW_MARK definition):
	* src/keybindings.c (handle_spew_mark, screen_handlers array):
	Add an (unbound by default) keybinding for setting spew marks in
	verbose debugging logs.  I'm not sure why this was ever removed;
	I've wanted it so many times.

	* HACKING:
	valgrind wants --log-file not --logfile.

svn path=/trunk/; revision=3174
2007-04-07 22:16:35 +00:00
Elijah Newren
745906b7db Fix memory bug (invalid free) introduced in 2007-04-02 strut cleanup
2007-04-07  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_free): Fix memory bug (invalid free)
	introduced in 2007-04-02 strut cleanup commit.  Part of #427385.

svn path=/trunk/; revision=3173
2007-04-07 21:42:05 +00:00
Thomas Thurman
8fe344db51 if theme is invalid and therefore got freed, don't attempt to read from
2007-04-05  Thomas Thurman  <thomas@thurman.org.uk>

        * src/theme_parser.c: if theme is invalid and therefore got
        freed, don't attempt to read from it. Closes #423855.



svn path=/trunk/; revision=3172
2007-04-05 18:45:03 +00:00
Bastien Nocera
f32712937b Add new control-center key bindings definitions (Closes: #420145)
2007-04-05  Bastien Nocera  <hadess@hadess.net>

	* src/50-metacity-desktop-key.xml.in:
	* src/50-metacity-key.xml.in:
	* src/Makefile.am:
	Add new control-center key bindings definitions (Closes: #420145)

2007-04-05  Bastien Nocera  <hadess@hadess.net>

	* POTFILES.in: add the XML keys definitions to the list


svn path=/trunk/; revision=3170
2007-04-05 09:22:19 +00:00
Elijah Newren
dda3c2bee6 send synthetic configurenotify events also in response to MapRequest
2007-04-04  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_move_resize_internal): send synthetic
	configurenotify events also in response to MapRequest events when
	the window has a frame and the application specifies PPosition or
	UPosition hints.  I believe they are already sent for all other
	cases.  Should fix #322840.  Fixes the testcase at least.  :)

svn path=/trunk/; revision=3156
2007-04-04 23:52:21 +00:00
Elijah Newren
921661e91d Fix lots of little issues with min/max constraints and size increment
2004-04-04  Elijah Newren  <newren gmail com>

	Fix lots of little issues with min/max constraints and size
	increment constraints.  Fixes #329152, #418395, and possibly
	others.

	* src/window-props.c (meta_set_normal_hints):
	Do more checking to make sure application specified constraints
	are self-consistent, modifying the size_hints as necessary to
	achieve self-consistency.

	* src/constraints.c (setup_constraint_info): remove ugly
	copy-pasto, (constrain_size_increments): be careful that fixing
	violation of the constraints doesn't cause a violation of the
	minimum size constraints.

	* src/window.c (ensure_size_hints_satisfied): new function,
	(meta_window_unmaximize, meta_window_unmake_fullscreen): the
	saved_rect may no longer be valid (as in the case of #329152) so
	call ensure_size_hints_satisfied to fix it up.

	* doc/how-to-get-focus-right.txt: Some minor spacing and wording
	fixes completely unrelated to the rest of this commit

svn path=/trunk/; revision=3155
2007-04-04 21:54:56 +00:00
Elijah Newren
7a799b3a63 Only use saved_rect for determining the position to unmaximize to for the
2007-04-03  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_unmaximize):
	Only use saved_rect for determining the position to unmaximize to
	for the previously-maximized direction(s).  Fixes #355497.

svn path=/trunk/; revision=3154
2007-04-04 03:07:26 +00:00
Elijah Newren
9cae11fd9e _NET_ACTIVE_WINDOW is a single xwindow id, not two.
2007-04-03  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_update_active_window_hint):
	_NET_ACTIVE_WINDOW is a single xwindow id, not two.

svn path=/trunk/; revision=3152
2007-04-03 22:26:47 +00:00
Elijah Newren
da7d198757 turn mouse_mode off to prevent focus issues with the run application
2007-04-03  Elijah Newren  <newren gmail com>

	* src/keybindings.c (handle_panel_keybinding): turn mouse_mode off
	to prevent focus issues with the run application dialog.  Fixes
	#374752.

svn path=/trunk/; revision=3149
2007-04-03 20:19:12 +00:00
Elijah Newren
350225ea37 Avoid some crashes when dragging windows partially offscreen. Possible (or
2007-04-03  Elijah Newren  <newren gmail com>

	Avoid some crashes when dragging windows partially offscreen.
	Possible (or at least partial) fix for #353513.

	* src/edge-resistance.c (apply_edge_resistance): be more careful
	about calls to find_index_of_edge_near_position() returning
	possibly invalid indices.  Also, add a warning comment to
	find_index_of_edge_near_position().

svn path=/trunk/; revision=3147
2007-04-03 19:56:34 +00:00
Elijah Newren
ec51e41c62 Patch from Carlo Wood to do some miscellaneous code cleanups found while
2007-04-02  Elijah Newren  <newren gmail com>

	Patch from Carlo Wood to do some miscellaneous code cleanups found
	while working on #358311.

	* src/constraints.c (do_screen_and_xinerama_relative_constraints):
	nicer way of avoiding compilation warning

	* src/boxes.c (meta_rectangle_clamp_to_fit_into_region,
	  meta_rectangle_clip_to_region, meta_rectangle_shove_into_region):
	Much cleaner way of ignoring invalid boxes in comparisons

svn path=/trunk/; revision=3145
2007-04-03 18:40:00 +00:00
Elijah Newren
08f51fdf94 Patch from Carlo Wood to fix handling of unidirectional maximization and
2007-04-02  Elijah Newren  <newren gmail com>

	Patch from Carlo Wood to fix handling of unidirectional
	maximization and partial struts.  #358311.

	* src/constraints.c (constrain_maximization):
	determine target size for unidirectionally maximized windows by
	determining how far they can be maximized without hitting
	orthogonal struts.  Avoids weird "empty spaces".

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

2007-04-02  Elijah Newren  <newren gmail com>

	Make the strut lists (stored in workspaces) record both the
	rectangle and the side that the strut is on.  Lots of code
	cleanups relating to struts.

	* src/boxes.h (struct MetaStrut):
	new struct for struts

	* src/window.[ch] (struct MetaStruts, struct MetaWindow,
	  meta_window_update_struts):
	overhaul to make window's struts remember their side as well as
	their rectangular location, and just use a list instead of several
	copies of near-identical code for left/right/top/bottom (allowing
	us to nuke MetaStruts struct as well)
	
	* src/testboxes.c (new_meta_strut, get_strut_list):
	* src/workspace.c (ensure_work_areas_validated):
	* src/boxes.c (meta_rectangle_get_minimal_spanning_set_for_region,
	  meta_rectangle_expand_to_avoiding_struts,
	  get_disjoint_strut_rect_list_in_region, fix_up_edges,
	  meta_rectangle_find_onscreen_edges,
	  meta_rectangle_find_nonintersected_xinerama_edges):
	modify to handle struts being rectangle + side instead of just rectangle

	* src/workspace.c (ensure_work_areas_validated):
	simplify strut list creation considerably given MetaWindow change,
	modify work_area computations to take advantage of region
	computations being done (makes the code shorter as well as more
	robust against pathological cases).

	* src/util.[ch] (meta_free_gslist_and_elements):
	new convenience function

	* src/common.h (enum MetaDirection):
	* src/edge-resistance.c (movement_towards_edge):
	* src/boxes.c (meta_rectangle_edge_aligns,
	  rectangle_and_edge_intersection, split_edge):
	Add more MetaDirection fields for convenience

	* src/boxes.h (enum FixedDirections):
	* src/constraints.c (setup_constraint_info, place_window_if_needed):
	add a FIXED_DIRECTION_NONE to the FixedDirections enum to make
	code more clear

svn path=/trunk/; revision=3144
2007-04-03 03:41:10 +00:00
Bruno Boaventura
0bb8bd4370 Fallback to NORMAL state after checking for the middle button. Fixes bug
2007-01-27  Bruno Boaventura <brunobol@gnome.org>

	* src/theme.c (kill_window_question): Fallback to NORMAL state after
	checking for the middle button. Fixes bug #419043.
	Patch from Benjamin Berg <benjamin@sipsolutions.net>.	


svn path=/trunk/; revision=3140
2007-04-01 15:31:24 +00:00
Elijah Newren
81e32cfa32 Clean up event mask handling and meta_create_offscreen_window, to prevent
2007-03-31  Elijah Newren  <newren gmail com>

	Clean up event mask handling and meta_create_offscreen_window, to
	prevent nasty metacity/gdk interactions causing hangs. See #354213.

	* src/screen.[ch] (meta_create_offscreen_window):
	* src/display.c (meta_display_open):
	* src/screen.c (meta_screen_new):
	Add a valuemask parameter to meta_create_offscreen_window
	
	* src/display.c (meta_display_open):
	make it explicit that we can't rely on PropertyNotify events for
	the leader_window due to nasty metacity/gdk interaction

	* src/session.c (warn_about_lame_clients_and_finish_interact):
	remove cut-and-paste code for timestamp pinging and just call
	meta_display_get_current_time_roundtrip

svn path=/trunk/; revision=3137
2007-03-31 23:34:36 +00:00
Elijah Newren
6e007baaa8 Add support for _NET_WM_USER_TIME_WINDOW in order to cut down on context
2007-03-30  Elijah Newren  <newren gmail com>

	Add support for _NET_WM_USER_TIME_WINDOW in order to cut down on
	context switches.

	* src/display.c (meta_display_open):
	* src/display.h (struct _MetaDisplay):
	* src/screen.c (set_supported_hint):
	new atom

	* src/display.c (meta_display_open,
	  meta_display_get_current_time_roundtrip):
	* src/display.h (struct _MetaDisplay):
	create a dedicated timestamp pinging window instead of reusing
	display->leader_window

	* src/display.c (event_callback):
	* src/window-props.c (reload_net_wm_user_time_window):
	* src/window.c (meta_window_new_with_attrs, meta_window_free,
	  process_property_notify):
	* src/window.h (struct _MetaWindow):
	monitor property notify events on _NET_WM_USER_TIME_WINDOW windows too
	
	* src/window-props.[ch]:
	new meta_window_reload_propert(y|ies)_from_xwindow() functions

	* src/window-props.[ch]
	  (init_net_wm_user_time_window, reload_net_wm_user_time_window,
	  meta_display_init_window_prop_hooks):
	* src/window.c (meta_window_new_with_attrs):
	new hooks to handle new atom

svn path=/trunk/; revision=3134
2007-03-31 05:19:41 +00:00
Josselin Mouette
44b86d468e if previous client ID was supplied, use it in filename. use --sm-client-id
2007-03-26  Josselin Mouette  <joss@malsain.org>

        * src/session.c (meta_session_init): if previous client ID
        was supplied, use it in filename.
        * src/session.c (set_clone_restart_commands): use --sm-client-id
        in command line to restore session, not original file name.
        * src/session.c (regenerate_save_file): generate filename using
        client ID and not original file name.
        * src/session.c (base_save_file): removed function.
        Closes GNOME 407981, Debian 391287, Debian 315169.


svn path=/trunk/; revision=3125
2007-03-26 21:38:19 +00:00
Arthur Taylor
11a90c53ed adjusted the rounded corners so that they fit nicely with the arcs around
2007-03-20  Arthur Taylor  <theycallhimart@gmail.com>

        * src/frames.c (meta_frames_apply_shapes): adjusted the rounded
          corners so that they fit nicely with the arcs around them.
          Fixes #399373.
                                                                                                                                           

svn path=/trunk/; revision=3120
2007-03-21 02:22:10 +00:00
Kjartan Maraas
88b91199d2 Remove #include <pango/pangox.h> since it's apparently not installed
2007-03-17  Kjartan Maraas  <kmaraas@gnome.org>

	* src/ui.c: Remove #include <pango/pangox.h> since it's
	apparently not installed anymore. Builds just fine without it too.

svn path=/trunk/; revision=3119
2007-03-17 08:40:02 +00:00
Charlie Brej
c7cb503003 add action_{middle|right}_click_titlebar. Closes #408903.
2007-03-10  Charlie Brej  <cbrej@cs.man.ac.uk>

        * src/metacity.schemas.in: add action_{middle|right}_click_titlebar.
        Closes #408903.



svn path=/trunk/; revision=3107
2007-03-11 02:39:07 +00:00
Linus Torvalds
6ab8fb150f honour preferences. new functions.
2007-03-09  Linus Torvalds  <torvalds@woody.linux-foundation.org>

        * src/frames.c (meta_frame_middle_click_event,
        meta_frame_right_click_event): honour preferences.
        * src/prefs.[ch] (meta_prefs_get_action_middle_click_titlebar,
        meta_prefs_get_action_right_click_titlebar): new functions.


svn path=/trunk/; revision=3102
2007-03-10 01:15:14 +00:00
Linus Torvalds
4e478159b6 renamed from MetaActionDoubleClickTitleBar; added _LOWER and _MENU.
2007-02-17  Linus Torvalds  <torvalds@woody.linux-foundation.org>

        * src/common.h (MetaActionTitleBar): renamed from
        MetaActionDoubleClickTitleBar; added _LOWER and _MENU.
        * src/frames.c (meta_frame_titlebar_event): renamed
        enums as above; added code to handle _LOWER and _MENU,
        which is moved in from meta_frame_{middle|right}_click_event.
        * src/frames.c (meta_frame_middle_click_event,
        meta_frame_right_click_event): rewrote in terms of
        meta_frame_titlebar_event.
        * src/prefs.c: removed "DoubleClick" from names as above.
        * src/prefs.c (action_titlebar_from_string): added cases
        for "lower" and "menu".
        Fixes #408902.


svn path=/trunk/; revision=3062
2007-02-17 21:34:00 +00:00
Linus Torvalds
85e43a402f Split out code for different kinds of click into separate functions. Fixes
2007-02-17  Linus Torvalds  <torvalds@woody.linux-foundation.org>

        * src/frames.c (meta_frames_button_press_event): Split out
        code for different kinds of click into separate functions.
        Fixes #408899.
        * src/frames.c (meta_frame_titlebar_event,
         meta_frame_double_click_event, meta_frame_middle_click_event,
         meta_frame_right_click_event): new functions.



svn path=/trunk/; revision=3061
2007-02-17 21:15:59 +00:00
Bruno Boaventura
e9f578b511 Change dialog icon because gnome-icon-theme have no more
2007-01-27  Bruno Boaventura <brunobol@gnome.org>

        * src/metacity-dialog.c (kill_window_question): Change dialog
        icon because gnome-icon-theme have no more "panel-force-quit".
        Patch from Jaap A. Haitsma <jaap@haitsma.org>.


svn path=/trunk/; revision=3050
2007-01-27 04:18:15 +00:00
Thomas James Alexander Thurman
5d9ccfac37 Removed #ifdef SPIFFY_COMPOSITOR throughout the file. Replaced with check
* src/compositor.c (meta_compositor_new): Removed
        #ifdef SPIFFY_COMPOSITOR throughout the file. Replaced with check 
        for environment variable METACITY_BLING, which may be temporary.


svn path=/trunk/; revision=3042
2007-01-16 17:02:39 +00:00
Bruno Boaventura
50c5bf4bf6 Unmaximize button must keep preesed appearence when clicked (hold down),
2007-01-13  Bruno Boaventura  <brunobol@gnome.org>

        * src/frames.c (meta_frames_motion_notify_event): Unmaximize
        button must keep preesed appearence when clicked (hold down),
        move off, and back over the button. Fixes #395560. Patch from
        Mad Alex <madalexonline@yahoo.co.uk>.


svn path=/trunk/; revision=3040
2007-01-13 13:27:20 +00:00
Thomas James Alexander Thurman
4becc1e631 Remove double unref of stacker object. Fixes #387761.
* src/c-screen.c (meta_comp_screen_redirect): Remove double unref
        of stacker object. Fixes #387761.


svn path=/trunk/; revision=3036
2007-01-02 14:09:45 +00:00
Bruno Boaventura
5ca9f43752 Move "On Top" option in menu. Fix #382962.
2006-12-27  Bruno Boaventura  <brunoboaventura@gmail.com>

        Move "On Top" option in menu. Fix #382962.

        * src/common.h, src/core.c: Remove META_MENU_OP_UNABOVE.
        * src/menu.c: remove unabove menu item and put above item
        next "Always on Visible Viewport".
        * src/window.c: remove handles of META_MENU_OP_UNABOVE.
2006-12-27 15:51:49 +00:00
Thomas James Alexander Thurman
5080b8fefb Disabled bling for now; added function for handling CirculateNotify
* src/compositor.c: Disabled bling for now; added function for
        handling CirculateNotify XEvent; some commenting.
        * src/compositor.h, src/c-window.c: fix function prototype visibility.
2006-12-21 05:12:34 +00:00
Thomas James Alexander Thurman
ea137d35f3 Sanity check to avoid dereferencing a null pointer.
* src/compositor.c (do_effect): Sanity check to avoid dereferencing
        a null pointer.
2006-12-12 18:30:27 +00:00
Christof Krüger
ceb54162b3 Fix flickering about when dragging maximised windows between xineramas.
2006-12-05  Christof Krüger  <mail@pop2wap.net>

        * src/window.c (update_move): Fix flickering about when dragging
        maximised windows between xineramas. Closes #358715.
2006-12-06 01:26:30 +00:00
Federico Mena Quintero
caf43a123f Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127:
2006-12-03  Federico Mena Quintero  <federico@novell.com>

	Fix http://bugzilla.gnome.org/show_bug.cgi?id=381127:

	* src/window.c (idle_calc_showing): Grab the server while the
	windows are being shuffled.  First show the windows to be shown,
	and then hide the windows to be hidden, in order to minimize
	the number of expose events.
2006-12-03 20:05:23 +00:00
Bruno Boaventura
a3e309bab8 2006-11-15 Björn Lindqvist <bjourne@gmail.com>
2006-11-15  Bruno Boaventura  <brunoboaventura@gmail.com>
2006-11-15  Björn Lindqvist   <bjourne@gmail.com>

        * src/menu.c: added MetaMenuItemType enum; added it
        to MenuItem; added values of this type to menuitems
        array.
        * src/menu.c (menu_item_new): rewrite to take a MenuItem
        instead of a set of parameters describing the menu item.
        * src/menu.c (meta_window_menu_new): use proper checkboxes
        or radio buttons on the window menu.
        * src/window.c (meta_window_show_menu): unstick and stick
        are always shown.
2006-11-15 13:16:32 +00:00
Priit Laes
81256ebe48 remove deprecated gtk stuff.
2006-11-05  Priit Laes  <amd@store20.com>

        * src/main.c, src/ui.c: remove deprecated gtk stuff.

2006-11-05  Bruno Boaventura  <brunoboaventura@gmail.com>

        * src/theme.c, src/testgradient.c: remove deprecated gtk stuff.
2006-11-05 23:03:36 +00:00
Thomas James Alexander Thurman
8722c60a28 add missing spaces to string. Fixes #363355.
* src/metacity-dialog.c: add missing spaces to string. Fixes
        #363355.
2006-11-05 22:34:37 +00:00
Thomas James Alexander Thurman
8f09a12069 use g_strdup to allocate a string, not strdup. Fixes #363354.
* src/ui.c: use g_strdup to allocate a string, not strdup. Fixes
        #363354.
2006-11-05 22:32:01 +00:00
Justin Mason
c68c26b7f8 implement handle_move_to_{side|corner}_* to allow the user to flip a
2006-11-05  Justin Mason  <jm@jmason.org>

        * src/keybindings.c: implement handle_move_to_{side|corner}_* to
        allow the user to flip a window to the side or corner of the
        screen. Fixes #317884.
        * src/prefs.h: keybindings for the above.
        * src/metacity.schemas.in: keybindings for the above.
2006-11-05 22:23:44 +00:00
Thomas James Alexander Thurman
d419955ddc improved rounding of rounded corners. Fixes #360542, mostly.
* src/frames.c: improved rounding of rounded corners. Fixes #360542,
        mostly.
2006-11-05 21:20:10 +00:00
Dan Mick
191baa3c76 Fix strict focus mode by picking up on res_class. Fixes #361054, strict
2006-10-30  Dan Mick  <dan.mick@sun.com>

	* src/window.c: (__window_is_terminal): Fix strict focus
        mode by picking up on res_class. Fixes #361054, strict focus
        mode still not working; should look for res_class, not res_name
2006-10-29 20:30:18 +00:00
Carlo Wood
d79a571d0a Fix cases when titlebar is allowed offscreen and shouldn't be (and
2006-10-13  Carlo Wood <carlo@alinoe.com>

	Fix cases when titlebar is allowed offscreen and shouldn't be (and
	vice-versa).  #333995.

	* src/display.[ch] (struct _MetaDisplay): add grab_frame_action
	member

	* src/display.[ch] (meta_display_begin_grab_op):
	* src/window.[ch] (meta_window_begin_grab_op):
	* src/core.[ch] (meta_core_begin_grab_op):
	Add frame_action parameter (core & window versions pass it on to
	display)

	* src/display.c (event_callback):
	* src/window.c (meta_window_begin_grab_op,
	  meta_window_client_message, menu_callback):
	* frames.c (meta_frames_button_press_event):
	* keybindings.c (do_choose_window, handle_begin_move,
	  handle_begin_resize, handle_workspace_switch):
	Pass whether the action should be considered a 'frame_action',
	which will be used to determine whether to force the titlebar to
	remain onscreen, to meta_*_begin_grab_op

	* constraints.c (constrain_titlebar_visible):
	Replace previous ugly hack by using grab_frame_action (and whether
	the action is a user action) to determine whether to enforce the
	titlebar_visible constraint.
2006-10-13 00:28:34 +00:00
Elijah Newren
a34944d341 Patch from Bruno Boaventura to sync metacity workspace previews with
2006-10-10  Elijah Newren  <newren gmail com>

	* src/draw-workspace.c (draw_window, wnck_draw_workspace): Patch
	from Bruno Boaventura to sync metacity workspace previews with
	libwnck.  #341893
2006-10-10 18:19:32 +00:00
Thomas James Alexander Thurman
9da34955f7 removed hide_buttons. Closes #360498.
* src/themes/Crux/metacity-theme-2.xml: removed hide_buttons.
        Closes #360498.
2006-10-07 21:19:40 +00:00
Thomas James Alexander Thurman
ef1c6e9214 described new theme format.
* doc/theme-format.txt: described new theme format.

        * src/themes/Bright, src/themes/Crux: added version 2 themes.
2006-10-07 17:21:05 +00:00
Thomas James Alexander Thurman
90359a5346 Added "above" to the list of flags a frame can have, so that we know when
* common.h: Added "above" to the list of flags a frame can have, so
	that we know when to mark it as always on top.  Added six grab ops,
	one to do and one to undo each of the three new titlebar buttons
	(shade, above, stick).  Added six new button functions, similarly.
	(#96229)

        * frame.c (meta_frame_get_flags): If a frame has the WM_STATE_ABOVE X
         attribute, set META_FRAME_ABOVE in its flags.

        * frames.c (meta_frames_apply_shapes): Allow variable amounts of
         rounding. (#113162)

        * frames.c (show_tip_now, meta_frames_paint_to_drawable, control_rect,
	 get_control): extend handling of existing buttons to the
         3*2 new kinds of button. (#96229)

        * frames.c (meta_frames_button_press_event): translate clicks on the 3*2
         new kinds of button to the new grab ops. (#96229)

        * frames.c (meta_frames_button_release_event): implement the various
        actions for the 3*2 new kinds of button. (#96229)

        * frames.c (meta_frames_update_prelit_control,
         meta_frames_motion_notify_event): extend existing motion
         notifications for buttons to the 3*2 new kinds of button. (#96229)

        * frames.c (meta_frames_set_window_background): handle specified
         background colours and alpha transparency. (#151261)

        * frames.h (MetaFrameControl): New control types for the 3*2 new kinds
	 of button.  (#96229)

        * iconcache.[ch] (meta_read_icons): use theme's fallback icons if a
	 window has no icon; use metacity's fallback icons only if the theme
         does not provide any. (#11363)

        * iconcache.[ch] (meta_invalidate_default_icons (new function)): clear
         icon cache on windows using default icons, and update them. (#11363)

        * main.c (main): added \n to error message.

        * prefs.c (button_function_from_string): extend for 3 new button
	 types. (#96229)

        * prefs.c (button_opposite_function (new function)): return a button
         function's inverse (shade -> unshade, etc) (#96229)

        * prefs.c (update_button_layout): allocate space for a button's
	 inverse, if it has one. (#96229)

        * theme-parser.c (ParseState): add state for fallback icons (#11363)

        * theme-parser.c (ParseInfo): add format_version; remove
         menu_icon_* (#114305)

        * theme-parser.c (parse_positive_integer): add lookup for integer
	 constants (#331356)

        * theme-parser.c (parse_rounding (new function)): parse window
	 rounding amount (#113162)

        * theme-parser.c (parse_alpha): don't set error if the number can't
	 be parsed since it'll already be set; change tolerance in comparison
	 from 1e6 to 1e-6

        * theme-parser.c (parse_color (new function)): parse colour, including
	 possible constant lookup.

        * theme-parser.c (parse_toplevel_element): allow defining of various
	new kinds of constant; allow
	hide_buttons (#121639) and more detailed rounding attributes on
	<frame_geometry> (#113162); allow background and alpha attributes on
	<frame_style>; (#151261) remove support for <menu_icon> except as
	stub; (#114305) add support for loading stock images (#113465); add
        support for <fallback>. (#11363))

        * theme-parser.c (parse_draw_op_element): add from and to attribute
         for arcs. (#121603)

        * theme-parser.c (parse_style_element): add check for theme version
         supporting a button function. (#96229)

        * theme-parser.c (parse_style_set_element): add ability for shaded
	 windows to be resizable (#114304)

        * theme-parser.c (meta_theme_load): add theme versioning routine.

        * theme.c ( meta_frame_layout_get_borders): return rectangles for
	 the new 3*2 kinds of button, except where they're
         inapplicable. (#96229)

        * theme.c (meta_frame_layout_calc_geometry): don't format buttons on
	windows with no buttons (#121639); strip the 3*2 new kinds of button
	correctly (#96229); allow variable amounts of rounding (#113162).

        * theme.c (meta_frame_style_new): set alpha to 255 by
        default. (#151261)

        * theme.c (meta_frame_style_unref): free colour spec if
        allocated. (#151261)

        * theme.c (meta_frame_style_validate): it's only an error not to
        include a button if that button is valid in the current
        theme. (#96229)

        * theme.c (button_rect): return rectangles for the new 3*2 kinds
	of button. (#96229)

        * theme.c (meta_frame_style_set_unref): free differently resizable
	shaded styles. (#114304)

        * theme.c (get_style): look up differently resizable styles
        for shaded windows. (#114304)

        * theme.c (free_menu_ops (removed function), get_menu_icon
	 (removed function), meta_theme_draw_menu_icon (removed function),
         meta_menu_icon_type_from_string (removed function),
         meta_menu_icon_type_to_string (removed function),
         meta_theme_free, meta_theme_validate): removed menu icon code. (#114305)

        * theme.c (meta_theme_load_image): add size_of_theme_icons
	parameter. (#113465)

        * theme.c (meta_theme_define_color_constant (new function),
        meta_theme_lookup_color_constant (new function)): allow
        definition of colour constants. (#129747)

        * theme.c (meta_button_type_from_string, meta_button_type_to_string):
        add the 3*2 new kinds of button. (#96229)

        * theme.c (meta_theme_earliest_version_with_button (new function)):
        return the theme version each button was introduced in. (#96229)

        * theme.h ( MetaFrameLayout): add "hide_buttons" flag (#121639) and
	corner radiuses. (#113162)

        * theme.h (MetaFrameGeometry): add rectangles for the 3*2 new
	buttons. (#96229)

        * theme.h (MetaButtonType): the 3*2 new buttons. (#96229)

        * theme.h (MetaFrameStyle): add window_background_color and
        window_background_alpha so that we can specify background on a
        <frame_style>. (#151261)

        * theme.h (MetaFrameStyleSet): shaded_styles gets resize
	dimension. (#114304)

        * theme.h (MetaTheme): added format_version, color_constants
        hash, (#129747) fallback_icon and fallback_mini_icon, (#11363)
        and removed menu_icons. (#114305)

        * theme.h (META_THEME_ALLOWS (new macro)): return whether a theme
        supports a given feature. Also, several macros representing
        new features in v2.

        * ui.c (meta_ui_set_current_theme)): also invalidate default
        icons. (#11363)

        * window.[ch] (meta_window_update_icon_now)): became
	non-static. (#11363)
2006-10-07 16:56:47 +00:00
Elijah Newren
9e341dd4d8 Be nice to translators; remove unnecessary markup from strings marked for
2006-10-06  Elijah Newren  <newren gmail com>

	* src/metacity-dialog.c (kill_window_question): Be nice to
	translators; remove unnecessary markup from strings marked for
	translation (oops, I missed this in my review before previous
	commit)
2006-10-07 00:10:35 +00:00
Elijah Newren
2168cd3eb7 Patch from Bruno Boaventura to improve the "Force Quit" dialog. #121936
2006-10-06  Elijah Newren  <newren gmail com>

	* src/metacity-dialog.c (kill_window_question): Patch from Bruno
	Boaventura to improve the "Force Quit" dialog.  #121936
2006-10-06 22:02:48 +00:00
Elijah Newren
25910508ae Ignore edge resistance for size-increment windows when resizing with the
2006-10-02  Elijah Newren  <newren gmail com>

	Ignore edge resistance for size-increment windows when resizing
	with the keyboard.  #346782.

	* src/edge-resistance.c (apply_edge_resistance_to_each_side):
	ignore edge resistance for size-increment windows when resizing
	with the keyboard, (apply_edge_resistance_to_each_side,
	meta_window_edge_resistance_for_move,
	meta_window_edge_resistance_for_resize): pass a is_resize
	parameter as well
2006-10-02 22:48:40 +00:00
Elijah Newren
c4fa0d118c Don't require a push/pop trap around
2006-10-01  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_set_input_focus_window):
	* src/window.c (meta_window_focus):
	Don't require a push/pop trap around
	meta_display_set_input_focus_window(), but rather move the
	push/pop into that function surrounding the XSetInputFocus() call
	directly.  Follow up to #358514.
2006-10-02 04:08:33 +00:00
Elijah Newren
0201fcfc6c Stick an emacs comment directive at the beginning of all the code files so
2006-10-01  Elijah Newren  <newren gmail com>

	* src/*.[ch]: Stick an emacs comment directive at the beginning of
	all the code files so that people using emacs will be more likely
	to get coding style correct in their patches.  We still need a
	similar vi directive.  #358866
2006-10-01 22:30:10 +00:00
Elijah Newren
07e4cacf14 Patch from Carlo Wood to ensure that maximized and minimized properties
2006-10-01  Elijah Newren  <newren gmail com>

	Patch from Carlo Wood to ensure that maximized and minimized
	properties are maintained across restarts.  #358042.

	* src/constraints.c (place_window_if_needed): fix up partial
	maximization handling and add minimize_after_placement handling.

	* src/display.[ch] (struct MetaDisplay, meta_display_open): add a
	new display->display_opening flag to allow handling startup
	differently where needed.

	* src/window-props.c (reload_net_wm_state): handle
	_net_wm_state_hidden as well, setting
	window->minimize_after_placement appropriately

	* src/window.[ch] (struct MetaWindow, meta_window_new_with_attrs):
	add a window->minimize_after_placement field

	* src/window.c (meta_window_new_with_attrs): only unminimize the
	window and its transients if the display isn't being opened,
	(unmaximize_window_before_freeing): don't reset the state unless
	the window is becoming withdrawn, if the screen is being closed be
	sure to save the unmaximized state of the window so the next
	window manager can restore it
2006-10-01 21:59:09 +00:00
Elijah Newren
79eb53bd53 surround the XDeleteProperty() call with a
2006-10-01  Elijah Newren  <newren gmail com>

	* src/window-props.c (set_title_text): surround the
	XDeleteProperty() call with a
	meta_error_trap_push/meta_error_trap_pop pair to prevent a crash
	when closing a remote instance of gedit (and perhaps other apps).
	#358514.
2006-10-01 21:36:10 +00:00
Elijah Newren
b694312f1c Fix longstanding focus bug with mouse (not sloppy) focus mode with popup
2006-10-01  Elijah Newren  <newren gmail com>

	Fix longstanding focus bug with mouse (not sloppy) focus mode with
	popup override-redirect windows, particularly mozilla and
	firefox's location bar autocompletion.  #357695.

	* src/display.c (event_callback -- EnterNotify & LeaveNotify events):
	for mouse focus, defocus the focused window when the mouse enters
	the desktop window rather than when the mouse leaves the focused
	window.

	* doc/how-to-get-focus-right.txt:
	update for the slightly nuanced definition of mouse focus (people
	without a DESKTOP window like nautilus get sloppy focus behavior
	now)
2006-10-01 18:10:24 +00:00
Elijah Newren
b01408f358 Patch from Bruno Boaventura to add notes to remind translators to keep
2006-09-27  Elijah Newren  <newren gmail com>

	* src/menu.c (var menuitems): Patch from Bruno Boaventura to add
	notes to remind translators to keep translations in sync with
	libwnck.  #355620.
2006-09-28 00:32:23 +00:00
Elijah Newren
569ff8a34c Patch from Jens Granseuer to fix c89 cleanness, again. #356631.
2006-09-18  Elijah Newren  <newren gmail com>

	* src/window.c (meta_window_show): Patch from Jens Granseuer to
	fix c89 cleanness, again.  #356631.
2006-09-18 22:00:57 +00:00
Elijah Newren
2d73af1530 Ignore maximum size hints when maximizing. Should fix #327543 (see comment
2006-09-18  Elijah Newren  <newren gmail com>

	* src/constraints.c (constrain_maximization): Ignore maximum size
	hints when maximizing.  Should fix #327543 (see comment 4 and comment
	5).
2006-09-18 21:08:46 +00:00
Elijah Newren
470dc30174 avoid a compilation warning by making sure to return something. #348067
2006-09-18  Elijah Newren  <newren gmail com>

	* src/ui.c (filter_func): avoid a compilation warning by making
	sure to return something.  #348067
2006-09-18 20:27:26 +00:00
Elijah Newren
5c587726ae Partial audit to fix timestamp usage. One step towards fixing #355180; see
2006-09-18  Elijah Newren  <newren gmail com>

	Partial audit to fix timestamp usage.  One step towards fixing
	#355180; see important comments in that bug.

	* src/core.[ch] (meta_core_unshade, meta_core_shade):
	* src/delete.c (meta_window_present_delete_dialog,
	  delete_ping_timeout_func):
	* src/display.[ch] (meta_display_open, meta_display_close,
	  event_callback, meta_display_begin_grab_op,
	  process_selection_clear, meta_display_unmanage_screen,
	  meta_display_unmanage_windows_for_screen):
	* src/frames.c (meta_frames_button_press_event):
	* src/keybindings.c (handle_toggle_shade):
	* src/main.c (main):
	* src/screen.[ch] (update_num_workspaces, meta_screen_new,
	  meta_screen_free, prefs_changed_callback):
	* src/window.[ch] (meta_window_free, finish_minimize,
	  implement_showing, meta_window_show, meta_window_maximize,
	  meta_window_make_fullscreen_internal,
	  meta_window_unmake_fullscreen, meta_window_shade,
	  meta_window_unshade, window_activate, send_sync_request,
	  meta_window_client_message, menu_callback,
	  meta_window_update_keyboard_resize):
	Remove usage of CurrentTime, meta_display_get_current_time() and
	meta_display_get_current_time_roundtrip() where possible, or
	document why it isn't possible, or at very least add a FIXME with
	some explanation of my laziness and what needs to be done.
2006-09-18 17:27:24 +00:00
Elijah Newren
87100b64d9 Patch from Maik Beckmann to remove compilation warnings. Fixes #355876.
2006-09-18  Elijah Newren  <newren gmail com>

	* src/spring-model.c (on_end_move, model_is_calm): Patch from Maik
	Beckmann to remove compilation warnings.  Fixes #355876.
2006-09-18 16:31:25 +00:00
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
3fac671fc8 patch from Bruno Boaventura de Oliveira to fix a compiler warning about
2006-09-12  Elijah Newren  <newren gmail com>

	* src/theme.c (meta_gtk_arrow_from_string,
	meta_gtk_arrow_to_string): patch from Bruno Boaventura de Oliveira
	to fix a compiler warning about not handling GTK_ARRROW_NONE.
	#355490.
2006-09-13 03:14:16 +00:00
Elijah Newren
199e2b6988 Patch from Bruno Boaventura de Oliveira Lacerda to fix warnings about
2006-09-11  Elijah Newren  <newren gmail com>

	* src/compositor.c: Patch from Bruno Boaventura de Oliveira
	Lacerda to fix warnings about unused function and global var.
	#355489.
2006-09-13 01:14:03 +00:00
Elijah Newren
189c8b9b11 Fix build when XKB not found. #354211
2006-09-09  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_open): Fix build when XKB not found.
	#354211
2006-09-10 04:29:14 +00:00
Elijah Newren
555d7dc90c Avoid a stuck grab, preventing focus from being transferred between
2006-09-09  Elijah Newren  <newren gmail com>

	Avoid a stuck grab, preventing focus from being transferred
	between windows.  Thanks to Fryderyk Dziarmagowski for steps to
	reproduce.  Fixes at least part of #354422.

	* src/display.c (meta_display_begin_grab_op,
	meta_display_end_grab_op): pass timestamp to
	meta_screen_ungrab_all_keys, meta_screen_ungrab_all_keys, and
	meta_window_ungrab_all_keys

	* src/keybindings.[ch] (grab_keyboard, ungrab_keyboard): add a
	timestamp parameter and remove call to
	meta_display_get_current_time(), (meta_screen_grab_all_keys,
	meta_screen_ungrab_all_keys, meta_window_ungrab_all_keys): add a
	timestamp parameter and pass it on to grab_keyboard and
	ungrab_keyboard
2006-09-09 20:19:56 +00:00
Elijah Newren
b62aba4401 make sure windows returning from fullscreen mode are constrained to be
2006-09-07  Elijah Newren  <newren gmail com>

	* src/constraints.c (update_onscreen_requirements): make sure
	windows returning from fullscreen mode are constrained to be
	"onscreen"; fixes #353699.
2006-09-07 23:05:00 +00:00
Colin Watson
3800dac492 Clear window->xtransient_for after emitting the invalid window warning.
2006-08-30  Colin Watson  <cjwatson@ubuntu.com>

	* src/window-props.c (reload_transient_for): Clear
	window->xtransient_for after emitting the invalid window warning.
	#353540
2006-09-07 23:00:27 +00:00
Elijah Newren
bba4df7187 Patch from Bruno Boaventura de Oliveira Lacerda to replace
2006-09-07  Elijah Newren  <newren gmail com>

	* src/metacity-dialog.c: Patch from Bruno Boaventura de Oliveira
	Lacerda to replace copy_of_gdk_x11_window_set_user_time() with
	gdk_x11_window_set_user_time().  We've long since adopted gtk+ >=
	2.6 as a dependency.  #352293
2006-09-07 22:57:36 +00:00
Elijah Newren
7a68a53322 Patch from Jens Granseuer to fix the build with c89/gcc 2.95.
2006-08-22  Elijah Newren  <newren gmail com>

        * src/metacity-dialog.c (main): Patch from Jens Granseuer to fix
        the build with c89/gcc 2.95.
2006-08-22 17:29:36 +00:00
Elijah Newren
18107f5f36 Patch from Thomas Andersen to fix metacity-dialog handling of arguments.
2006-08-21  Elijah Newren  <newren gmail com>

	Patch from Thomas Andersen to fix metacity-dialog handling of
	arguments.  #340690

	* src/metacity-dialog.c (main): replace hackish argument parsing
	with GOption parsing.  Much nicer.  :)
2006-08-21 19:16:08 +00:00
Elijah Newren
88b9efd0b7 Patch from Ed Catmur to fix keybindings with hex-values (coming from
2006-08-21  Elijah Newren  <newren gmail com>

	Patch from Ed Catmur to fix keybindings with hex-values (coming
	from special extended keyboard keys).  #140448.

	* src/keybindings.c (struct _MetaKeyBinding): change keycode from
	KeyCode to unsigned int (comment from Elijah: why???),
	(reload_keycodes): only grab keysyms for keybindings that have
	them, (count_bindings, rebuild_binding_table): bindings can be
	valid either due to a valid keysym or a valid keycode,
	(display_get_keybinding_action, meta_change_keygrab,
	process_tab_grab, process_workspace_switch_grab): handle keycode
	as well as keysym

	* src/prefs.[ch] (struct MetaKeyCombo, update_binding,
	update_list_binding): handle keycode as well as keysym

	* src/ui.[ch] (meta_ui_accelerator_parse): new function special
	cases strings of the form "0x[0-9a-fA-F]+" and otherwise calling
	gtk_accelerator_parse(), (meta_ui_parse_accelerator,
	meta_ui_parse_modifier): call meta_ui_accelerator_parse instead of
	gtk_accelerator_parse.
2006-08-21 19:06:26 +00:00
Elijah Newren
7489dbc34e Allow drags & resizes to be reverted by hitting escape. Based on patch
2006-08-21  Elijah Newren  <newren gmail com>

	Allow drags & resizes to be reverted by hitting escape.  Based on
	patch from Thomas Andersen.  #126497.

	* src/display.c (grab_op_is_mouse_only): new function,
	(meta_display_begin_grab_op): grab the keyboard when moving or
	resizing too so that we can get escape keypresses

	* src/display.h (struct _MetaDisplay): add a comment to remind
	that grab_was_cancelled is only used in wireframe mode

	* src/keybindings.[ch] (process_mouse_move_resize_grab): add new
	function for handling keypresses during mouse-only moving and
	resizing, (meta_window_grab_all_keys): add a timestamp parameter
	and pass it to meta_window_focus(),
	(meta_display_process_key_event): make sure
	process_mouse_move_resize_grab() gets called when needed,
	(process_keyboard_move_grab, process_keyboard_resize_grab):
	rearrange some code slightly and improve the comments to make it
	more readable
2006-08-21 18:38:21 +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
Baptiste Mille-Mathias
7ea55a1e54 Update the pixmap to a new one which fit better with the other pixmaps of
2006-08-19 Baptiste Mille-Mathias <baptiste.millemathias@gmail.com>

        * src/stock_delete.png: Update the pixmap to a new one which
        fit better with the other pixmaps of the menu. First patch in
        metacity, woot! #345498
2006-08-20 19:44:52 +00:00
Elijah Newren
1f5130dc93 Patch from Willie Walker to restore the part of the patch that I should
2006-08-18  Elijah Newren  <newren gmail com>

	* src/tabpopup.c (meta_ui_tab_popup_new): Patch from Willie Walker
	to restore the part of the patch that I should not have reverted
	in #123372, in order to fix accessibility.  #350624
2006-08-18 17:32:58 +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
9fe845581b patch from Stéphane Rosi to allow moving maximized windows between
2006-08-07  Elijah Newren  <newren gmail com>

	* src/constraints.c (setup_constraint_info): patch from Stéphane
	Rosi to allow moving maximized windows between xineramas again.
	#323820
2006-08-08 00:36:04 +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
acc6c97997 Patch from Chris Ball to not minimize in response to double clicks on the
2006-08-07  Elijah Newren  <newren gmail com>

	* src/frames.c (meta_frames_button_press_event): Patch from Chris
	Ball to not minimize in response to double clicks on the titlebar
	when minimiziation should not be allowed.  #347377
2006-08-07 22:06:25 +00:00
Elijah Newren
dcef402d68 Patch from Björn Lindqvist to fix button lighting with dragged clicks.
2006-08-07  Elijah Newren  <newren gmail com>

	Patch from Björn Lindqvist to fix button lighting with dragged
	clicks.  #321474.

	* src/frames.c (meta_frames_button_press_event): update the
	prelit_control, (meta_frames_button_release_event): some code
	refactoring to simplify things a bit, and make sure to update the
	prelit_control
2006-08-07 21:04:44 +00:00
Elijah Newren
d4973e8d1b Patch from Thomas Andersen to return the window to maximized state if the
2006-08-07  Elijah Newren  <newren gmail com>

	* src/keybindings.c (process_keyboard_move_grab): Patch from
	Thomas Andersen to return the window to maximized state if the
	window was "shaken loose" from maximized state during a resize but
	the resize is later aborted.  #346719.
2006-08-07 19:24:41 +00:00
Elijah Newren
1dd78e38ff Just a couple more details to explain why MetaButtonSpace is used 2006-08-07 18:20:37 +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
Thomas Thurman
cc5def1021 add new MetaButtonSpace struct; use it for close_rect, max_rect, min_rect
2006-08-07  Thomas Thurman  <thomas@thurman.org.uk>

        * src/frames.h: add new MetaButtonSpace struct; use it for
        close_rect, max_rect, min_rect and menu_rect.

        * src/frames.c (control_rect, get_control): modify to support
        the new fields in MetaButtonSpace.

        * src/theme.c (meta_frame_layout_get_borders, rect_for_function,
        meta_frame_layout_calc_geometry, button_rect): add support for
        the new fields in MetaButtonSpace.
2006-08-07 18:01:21 +00:00
Elijah Newren
77a331a1e3 patch from Dmitry Timoshkov to make sure window features get recalculated
2006-08-07  Elijah Newren  <newren gmail com>

	* src/screen.c (meta_screen_resize_func): patch from Dmitry
	Timoshkov to make sure window features get recalculated when the
	screen is resized via XRandR.  Part of #346927.
2006-08-07 17:18:33 +00:00
Elijah Newren
ae86fcd5b2 Fix ugly spacing 2006-08-04 22:33:42 +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
Thomas James Alexander Thurman
7d8087f3e8 Fix another C89 vs. C99 issue. #347621. 2006-07-30 18:32:40 +00:00
Vincent Untz
419e063a24 also kill this
2006-07-26  Vincent Untz  <vuntz@gnome.org>

	* src/update-from-egg.sh: also kill this
2006-07-26 08:31:05 +00:00
Thomas James Alexander Thurman
05323ef21a #348633 2006-07-26 02:11:48 +00:00
Thomas James Alexander Thurman
6e4d6da191 Kill usage of libegg. #348633. 2006-07-26 02:06:17 +00:00
Björn Lindqvist
3d661f9bc7 Grab Alt+Shift+Button1 as well to partially fix operation ordering issues
2006-07-24  Björn Lindqvist  <bjourne@gmail.com>

	* src/display.c (meta_display_grab_window_buttons): Grab
	Alt+Shift+Button1 as well to partially fix operation ordering
	issues when trying to snap-move windows.  Part of #112478.
2006-07-24 17:15:32 +00:00
Thomas James Alexander Thurman
5e85bf7210 Avoid a case where a struct's fields might be updated after it was freed.
* ui.[ch] (filter_func): Avoid a case where a struct's
fields might be updated after it was freed. #348067.
2006-07-22 01:45:21 +00:00
Elijah Newren
bcbdfbe177 Patch from Aidan Delaney to tidy tabpopup.c by factoring out
2006-06-10  Elijah Newren  <newren gmail com>

	Patch from Aidan Delaney to tidy tabpopup.c by factoring out
	tab_entry_new().  #166890.

	* src/tabpopup.c (tab_entry_new): new function,
	(meta_ui_tab_popup_new): use tab_entry_new() to remove a big chunk
	of code, plus a few other small cleanups.
2006-06-11 02:44:55 +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
Søren Sandmann
83f82e5f28 Rename from _bounce() to _focus().
Fri May 26 14:55:07 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (meta_comp_window_run_focus): Rename from
        _bounce() to _focus().
2006-05-26 18:59:15 +00:00
Elijah Newren
db87abfb19 Fix a crash on exit/logout from assuming a compositor would always exist
2006-05-26  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_close): Fix a crash on exit/logout
	from assuming a compositor would always exist
2006-05-26 16:51:03 +00:00
Elijah Newren
a8f382019a Remove MetaWindowEdgePosition enum that isn't used anymore
2006-05-25  Elijah Newren  <newren gmail com>

	* src/place.h:
	* src/common.h:
	Remove MetaWindowEdgePosition enum that isn't used anymore
2006-05-26 00:16:52 +00:00
Søren Sandmann
a1324af018 Move duplicated window field outside the union
Thu May 25 15:56:43 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/effects.h (struct MetaEffect): Move duplicated window field
        outside the union

        * src/compositor.c: delete duplicated code to get at the window.
2006-05-25 19:59:20 +00:00
Søren Sandmann
ed37bcc258 Fix compilation in non-compositor case, by moving the stack functions into
Thu May 25 15:17:29 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c: Fix compilation in non-compositor case, by
        moving the stack functions into the HAVE_COMPOSITOR defines.
2006-05-25 19:18:34 +00:00
Søren Sandmann
cb84bc3e1d Add a destroy notifier to the window.
Thu May 25 15:11:58 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.h: Add a destroy notifier to the window.

        * src/c-screen.c (on_window_destroy): New function.

        * src/c-screen.c (meta_comp_screen_add_window): Use the destroy
        notifier here.

        * src/c-window.c (generate_phases): New function. Simplify the
        minimize animation a lot by generating all the rectangle
        information into an array, then processing that.
2006-05-25 19:14:29 +00:00
Adam Jackson
76dff49a3e Bounce on window focus. 2006-05-25 14:40:50 +00:00
Søren Sandmann
6dfb56cc77 Make sure windows are kept on top of the panel during minimize.
Wed May 24 22:15:01 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Make sure windows are kept on top
        of the panel during minimize.
2006-05-25 02:15:49 +00:00
Søren Sandmann
ab1adf6c06 Shrink the window instead of explode it.
Wed May 24 21:17:59 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Shrink the window instead of
        explode it.

        * src/compositor.c (do_effect): don't read the frame if it is
        NULL.

        * src/c-window.c (meta_comp_window_run_minimize): Resurrect the
        shrinking minimize animation.

        * src/c-window.c (meta_comp_window_fade_in): Make dialogs 90%
        translucent.

        * src/c-window.c (update_fade): End at end_fade, not 1.0.
2006-05-25 01:19:03 +00:00
Søren Sandmann
3ae4e25162 Add a fade-in animation when windows are mapped.
Wed May 24 19:15:45 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (cancel_fade): Add a fade-in animation when
        windows are mapped.
2006-05-24 23:16:31 +00:00
Søren Sandmann
7535f0f58a New function
Wed May 24 16:37:11 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (private_metacity_window): New function

        * src/c-window.c (meta_comp_window_refresh_attrs): Map metacity's
        own windows directly.
2006-05-24 20:38:56 +00:00
Søren Sandmann
ca3236f76c Add a stack-freeze feature to CWindow.
Wed May 24 14:36:42 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (meta_comp_window_{freeze,thaw}_stack: Add a
        stack-freeze feature to CWindow.

        * src/c-screen.c (meta_comp_screen_restack): Don't restack if the
        window is frozen.
2006-05-24 18:38:54 +00:00
Søren Sandmann
7d2f0bf1fe Fix compilation in the non-composited case.
Wed May 24 13:09:49 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c: Fix compilation in the non-composited case.
2006-05-24 17:10:31 +00:00
Søren Sandmann
3f4e194c8f return TRUE when the window is actually freed.
Wed May 24 12:57:32 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (meta_comp_window_free): return TRUE when the
        window is actually freed.

        * src/compositor.c (do_effect): Disable updating before exploding
        the window.

        * src/c-window.c: Make MetaCompWindow refcounted.

        * src/c-window.[ch]: New functions meta_comp_window_{show,hide}

        * src/c-screen.c (meta_comp_screen_unmap): Call
        meta_comp_window_hide() instead of directly setting the viewable
        status of the node.

        * src/c-screen.c (meta_comp_screen_remove_window): Only remove the
        window when it is actually freed.
2006-05-24 16:58:20 +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
7592470dab Also use explode when windows close.
Tue May 23 16:36:04 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (do_effect): Also use explode when windows close.

        * src/c-window.c (meta_comp_window_explode): Add refcounting to
        comp window, and use it in the explosion effect

        * src/effects.h (struct MetaEffect): Add new MetaCloseEffect.

        * src/display.c (event_callback): Run it from the UnmapNotify
        event handler.
2006-05-23 20:38:18 +00:00
Søren Sandmann
179987132c New function to send a sync request to newly mapped windows.
Tue May 23 15:23:58 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-window.c (send_sync_request): New function to send a sync
        request to newly mapped windows.
        (on_request_alarm): Show the window here.
2006-05-23 19:25:29 +00:00
Adam Jackson
1e64cf4a8b Add more effect tokens. 2006-05-23 18:22:09 +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
cdb94d7e57 Make mouse cursor when moving windows become a hand. Fixes #337376.
2006-05-22  Björn Lindqvist  <bjourne@gmail.com>

	* common.h (enum MetaCursor):
	* display.c (meta_display_create_x_cursor): Make mouse cursor when
	moving windows become a hand. Fixes #337376.
2006-05-22 16:12:28 +00:00
Björn Lindqvist
3e394580da Fix a logic bug so that the whole titlebar becomes sensitive to mouse
2006-05-19  Björn Lindqvist  <bjourne@gmail.com>

	* frames.c: Fix a logic bug so that the whole titlebar becomes
	sensitive to mouse clicks. Fixes #336320.
2006-05-19 13:15:29 +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
1a16108310 Revert the accessibility module loading workaround from Gnome 2.6, since
2006-05-15  Elijah Newren  <newren gmail com>

	Revert the accessibility module loading workaround from Gnome
	2.6, since gtk+ has long since fixed this for us.  #123372.

	* src/Makefile.am: remove METACITY_LIBDIR define

	* src/main.c (find_accessibility_module,
	accessibility_invoke_module, accessibility_invoke, main): remove
	the first three of these functions and all calls to them

	* src/tabpopup.c (meta_ui_tab_popup_new): not sure if this part of
	120025 needed to be reverted but doing the reversion, if wrong, is
	the best way to get someone from the accessibility team to scream,
	er, I mean comment.  ;-)
2006-05-15 18:46:26 +00:00
Elijah Newren
3cb72d338c Patch from jylefort@FreeBSD.org to prevent a crash when changing
2006-05-15  Elijah Newren  <newren gmail com>

	* src/screen.c (reload_xinerama_infos): Patch from
	jylefort@FreeBSD.org to prevent a crash when changing resolution.
	Fixes #340847.
2006-05-15 18:37:36 +00:00
Björn Lindqvist
51ade19ae9 Remove the preceeding functions as they are all obsoleted by the new
2006-05-15  Björn Lindqvist  <bjourne@gmail.com>

	* places.[ch] (intcmp, window_get_edges,
	get_windows_showing_on_same_screen, get_vertical_edges,
	get_horizontal_edges, meta_window_find_next_vertical_edge,
	meta_window_find_next_horizontal_edge,
	meta_window_find_nearest_vertical_edge,
	meta_window_find_nearest_horizontal_edge): Remove the preceeding
	functions as they are all obsoleted by the new edge-resistance
	stuff. Fixes #341561.
2006-05-15 17:00:14 +00:00
Paolo Borelli
fb3b5c92f8 plug a small leak.
2006-05-15  Paolo Borelli  <pborelli@katamail.com>

	* src/prefs.c (update_binding): plug a small leak.
2006-05-15 06:59:30 +00:00
Søren Sandmann
5750974d5d Some experimental code to handle sync counter notifications on a window.
Fri May  5 12:50:58 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-window.c (has_counter): Some experimental code to handle
	sync counter notifications on a window.

	* src/c-screen.c (meta_comp_screen_add_window): Pass a MetaDisplay
2006-05-05 16:52:05 +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
Søren Sandmann
addc04f463 Delete unused META_PRIORITY_COMPOSITE
Thu May  4 13:30:04 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/ui.h: Delete unused META_PRIORITY_COMPOSITE

	* src/ui.c: Delete argument from meta_ui_get_display().

	* src/c-window.c: Remove the xid->window hashtable and associated
	code.

	* src/c-screen.[ch]: Rename MetaScreenInfo to MetaCompScreen. Put the
	xid->windows table here instaed of as a static variable. Also make
	sure that CompWindows are freed when the screen is unredirected.

	* src/display.c: Delete non USE_GDK_DISPLAY case, as it didn't
	work and hasn't been compiled for a long time.

	* src/display.[ch] (meta_display_open): Remove argument as it was
	always NULL (and couldn't possibly be anything else in the
	USE_GDK_DISPLAY case).
2006-05-04 17:32:26 +00:00
Søren Sandmann
411fd3db44 New files
Tue May  2 17:12:54 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-window.[ch]: New files

	* src/c-screen.c: Move WindowInfo struct to new c-window.[ch]
	files. Delete various bits of obsolete, commented-out code.
2006-05-02 21:15:32 +00:00
Søren Sandmann
975130ff70 New function. Use get_window() instead of cutted-and-pasted code all over
Fri Apr 28 12:53:23 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/core.c (get_window): New function.
	* src/core.c: Use get_window() instead of cutted-and-pasted code
	all over the place.
2006-04-28 16:54:52 +00:00
Elijah Newren
12d5978268 2.15.1 release belated post-release version bump to 2.15.1 Include boxes.h
2006-04-25  Elijah Newren  <newren gmail com>

	* NEWS:	2.15.1 release
	* configure.in: belated post-release version bump to 2.15.1
	* src/Makefile.am: Include boxes.h so that control-center won't
	fail to build  #339708.
2006-04-25 17:53:49 +00:00
Thomas Andersen
14f120f131 warn and ignore if transient_for is set to a non-top-level window. Fixes
2006-04-19  Thomas Andersen  <phomes@gmail.com>

        * src/window-props.c (reload_transient_for): warn and ignore if
	transient_for is set to a non-top-level window.  Fixes #335524.
2006-04-19 20:55:49 +00:00
Björn Lindqvist
c118c50117 Replace while loops iterating over sequences with for loops. Also, replace
2006-04-19  Björn Lindqvist  <bjourne@gmail.com>

	* src/frames.c (struct CachedPixels, meta_frames_destroy,
	invalidate_cache, generate_pixmap, populate_cache,
	cached_pixels_draw, meta_frames_expose_event,
	meta_frames_paint_to_drawable):

	Replace while loops iterating over sequences with for loops. Also,
	replace the attributes in the CachedPixels struct with a list of
	four CachedFramePiece:s, this allows iteration over the four
	pixmaps instead of treating each one separately. Fixes #338359.
2006-04-19 15:22:07 +00:00
Björn Lindqvist
ae85a33614 Add boxes.{c,h} to libmetacity_private
2006-04-18  Björn Lindqvist  <bjourne@gmail.com>

	* makefile.am: Add boxes.{c,h} to libmetacity_private
	* src/theme-parser.c (check_expression):
	* src/theme-viewer.c (run_position_expression_tests):
	Use meta_rect ().

	* src/theme.c: Replace while loops iterating over sequences with
	for loops.

	* src/theme.c, src/theme.h (struct _MetaPositionExprEnv,
	meta_draw_op_draw, meta_draw_op_list_draw,
	meta_theme_draw_menu_icon): Use MetaRectangles in function
	prototypes instead of x, y, with, height ints where applicable.
2006-04-18 17:18:53 +00:00
Thomas Thurman
fee1fb094a Allow any keybinding pref to be specified either with <foo>, a string, or
2004-04-17  Thomas Thurman <thomas@thurman.org.uk>

        * keybindings.c (count_bindings, rebuild_binding_table):
        * prefs.c (change_notify, screen_bindings,
        window_bindings, init_bindings, update_binding,
        find_and_update_list_binding, update_list_binding,
        meta_prefs_get_window_binding): Allow any keybinding pref
        to be specified either with <foo>, a string, or <foo>_list,
        a list of strings, or both. Fixes #164831.
2006-04-17 17:23:09 +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
5bf3e39ef6 Patch from Andy Morum to fix the build with --disable-xsync. #336605
2006-04-15  Elijah Newren  <newren gmail com>

	* src/display.h: Patch from Andy Morum to fix the build with
	--disable-xsync.  #336605
2006-04-15 22:58:07 +00:00
Thomas Thurman
2214fd75d9 Add a tabbing function, bound to alt-f6 by default, to cycle through the
2006-04-14  Thomas Thurman   <thomas@thurman.org.uk>

        Add a tabbing function, bound to alt-f6 by default, to cycle
        through the windows of the current application. Fixes #164831.

        * src/common.h: two new MetaGrabOpts values for group switching
        * src/display.c (ping_data_free, meta_display_in_grab_op,
        IN_TAB_CHAIN): adapt to new MetaGrabOpts
        * src/display.h: new enum value for MetaTabList for group switching
        * src/keybindings.c (meta_display_process_key_event):
        adapt to new MetaGrabOpts
        (process_tab_grab): adapt to new MetaGrabOpts, and use switch
        statement for cancelling instead of if statement
        * src/metacity.schemas.in: new keybindings
        * src/prefs.c, src/prefs.h: handle new keybindings
        * src/window.h: define META_WINDOW_IN_GROUP_TAB_CHAIN macro
2006-04-15 02:05:44 +00:00
Søren Sandmann
c7c9f0ee52 Check for both POPUP and DROPDOWN.
Thu Apr 13 12:23:28 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_add_window): Check for both
	POPUP and DROPDOWN.
2006-04-13 16:24:03 +00:00
Björn Lindqvist
ea50cc7239 *** empty log message *** 2006-04-13 13:16:42 +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
Björn Lindqvist
4730cb57bd *** empty log message *** 2006-04-10 08:30:02 +00:00
Gora Mohanty
793c1d7a43 Changes strings to make them more readable, and more translatable. Fixes
2006-03-27  Gora Mohanty  <gmohanty@cvs.gnome.org>

        * src/metacity.schemas.in:
	* src/theme.c:
	Changes strings to make them more readable, and more translatable.
	Fixes #335720.
2006-04-07 19:06:25 +00:00
Elijah Newren
8674051c58 Fix constraints bug causing negative width windows and crashes. #336651
2006-04-02  Elijah Newren  <newren gmail com>

	Fix constraints bug causing negative width windows and crashes.
	#336651

	* src/constraints.c (constrain_partially_onscreen): Don't
	accidentally shove & resize the window by requiring more pixels to
	be onscreen than the size of the window.
2006-04-02 23:11:25 +00:00
Søren Sandmann
6445d16fd5 Release the GL window here. Disconect from the magnifier, not the stacker.
Fri Mar 31 16:44:56 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_unredirect): Release the GL
	window here. Disconect from the magnifier, not the stacker.
2006-03-31 21:45:29 +00:00
Søren Sandmann
21d5a43c29 Only use magnifier when USE_MAGNIFIER is set.
Fri Mar 31 12:24:26 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_redirect): Only use magnifier
	when USE_MAGNIFIER is set.

	* src/compositor.c (meta_compositor_free_window): Only wobble when
	USE_WOBBLE is set.
2006-03-31 17:25:02 +00:00
Søren Sandmann
f7a202eb81 Don't hardcode screen size.
Fri Mar 31 12:13:21 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_redirect): Don't hardcode
	screen size.
2006-03-31 17:13:48 +00:00
Søren Sandmann
eb102ab37f Fix the memory corruption in a better way.
Thu Mar 30 17:01:12 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (struct MetaCompositor): Fix the memory
	corruption in a better way.
2006-03-30 22:01:45 +00:00
Søren Sandmann
aaafd14124 Fix an illegal write.
Thu Mar 30 16:38:35 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (meta_compositor_begin_move): Fix an illegal write.
2006-03-30 21:39:00 +00:00
Søren Sandmann
3bf211c89f Turn wobbling back on Add new explosion effect.
Thu Mar 30 16:13:52 2006  Søren Sandmann  <sandmann@redhat.com>

	* composite.c: Turn wobbling back on  Add new explosion effect.
2006-03-30 21:14:56 +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
Søren Sandmann
ea1568c720 Also check for overlay_window.
Tue Mar 28 09:57:26 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-screen.c (meta_screen_info_add_window): Also check for overlay_window.

        * src/c-screen.c (meta_screen_info_redirect): Trap errors out of
        unredirect().
2006-03-28 14:58:14 +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
Paolo Borelli
09a5c23585 use g_str_has_prefix instead of a local copy of the function.
2006-03-25  Paolo Borelli  <pborelli@katamail.com>

	* src/prefs.c: use g_str_has_prefix instead of a local copy
	of the function.
2006-03-25 11:47:31 +00:00
Ray Strode
8f59776087 Add patch from Elijah Newren to fix type for compositing_manager schema
2006-03-16  Ray Strode  <rstrode@redhat.com>

	Add patch from Elijah Newren to fix type
	for compositing_manager schema entry (bug 335901)

	* src/metacity.schemas.in: Change type from "boolean" to "bool"
	and default value from "FALSE" to "false"
2006-03-25 07:21:27 +00:00
Søren Sandmann
b11ac45352 Actually remove the window.
Wed Mar 22 13:16:48 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (meta_compositor_remove_window): Actually
	remove the window.

	* src/c-screen.c (meta_screen_info_remove_window): Only remove
	node if non-NULL
2006-03-22 18:34:18 +00:00
Søren Sandmann
fd1e1c76e8 Put a square below the desktop stack.
Wed Mar 22 10:33:21 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_redirect): Put a square below
	the desktop stack.
2006-03-22 15:33:55 +00:00
Søren Sandmann
fc7a246074 Put the desktop into a magnifier.
Mon Mar 20 11:50:44 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_redirect): Put the desktop into
	a magnifier.

	* src/c-screen.c (struct MetaScreenInfo): Add a CmMagnifier

	* src/c-screen.c (meta_screen_info_redirect): Move some of the gl
	window related stuff here.
2006-03-20 16:52:25 +00:00
Søren Sandmann Pedersen
543f85a1db 2006-03-16 Soren Sandmann (sandmann@daimi.au.dk)
* src/c-screen.c (meta_screen_info_set_target_rect): Put inside
	COMPOSIT_EXTENSIONS
2006-03-17 04:15:40 +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
Elijah Newren
ef47c243c5 Add debugging information for edge resistance
2006-03-16  Elijah Newren  <newren gmail com>

	Add debugging information for edge resistance

	* src/edge-resistance.c (cache_edges): print out the edges that
	are being cached if in verbose mode,
	(meta_window_edge_resistance_for_move,
	meta_window_edge_resistance_for_resize): if edge resistance kicked
	in then print out a message about it

	* src/util.c:
	* src/util.h:
	Add META_DEBUG_EDGE_RESISTANCE to MetaDebugTopic enum list
2006-03-17 02:55:21 +00:00
Søren Sandmann
01cd31f7f4 Maintain the size of the window.
Thu Mar 16 14:55:18 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (struct WindowInfo): Maintain the size of the
	window.
2006-03-16 20:00:18 +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
4d6ee9ea49 Use unset_patch() instead of unset_geometry().
Wed Mar 15 11:34:54 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/c-screen.c (meta_screen_info_add_window): Use unset_patch()
	instead of unset_geometry().
2006-03-15 16:35:26 +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
Thomas James Alexander Thurman
4d220adc32 Marking string for translation. Closes #334332 2006-03-12 21:04: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
eed6f29b30 Update for libcm API change.
Fri Mar  3 15:31:04 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/c-screen.c (meta_screen_info_new): Update for libcm API
        change.
2006-03-03 20:31:41 +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
Søren Sandmann
0a1a7e523c Put the windows in a stacker rather than do the traversing outselves.
Tue Feb 28 14:49:23 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c: Put the windows in a stacker rather than
        do the traversing outselves.
2006-02-28 19:51:45 +00:00
Elijah Newren
3e01e149eb Patch from Thomas Thurman to prevent setting cycle_windows to keybindings
2006-02-27  Elijah Newren  <newren gmail com>

        Patch from Thomas Thurman to prevent setting cycle_windows to
        keybindings that won't work.  #329676

        * src/prefs.c (update_binding):
        Make sure that bindings which require a modifier key are set to a
        keybinding with one or else that the binding is reverted.

        * src/ui.[ch] (meta_ui_accelerator_name):
        New function
2006-02-27 22:44:47 +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
e4cf87c985 Don't attempt to manage the screen if it already is managed.
Thu Feb 23 15:40:52 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c (meta_compositor_manage_screen): Don't attempt
        to manage the screen if it already is managed.

        * src/compositor.c (meta_compositor_unmanage_screen): Synchronize
        the display.
2006-02-23 20:41:53 +00:00
Thomas Thurman
9e17747f3c Removed "move to another workspace" menu when there are exactly two
2006-02-19  Thomas Thurman  <thomas thurman org uk>

        Removed "move to another workspace" menu when there are
        exactly two workspaces.  Fixes #151183.

        * src/menu.c (meta_window_menu_new): clear
        META_MENU_OP_WORKSPACES bit when n_workspaces==2
2006-02-20 02:15:14 +00:00
Søren Sandmann
f3ade45b96 Only uncomposite the screen if there is a compositor.
Fri Feb 17 11:56:35 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/screen.c (meta_screen_free): Only uncomposite the screen if
	there is a compositor.

	* src/compositor.c (meta_compositor_new): Warn and fail if the
	server doesn't have composite
2006-02-17 16:58:08 +00:00
Søren Sandmann
71b27c6228 Fix the build when --enable-compositor is there.
Thu Feb 16 18:57:48 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c: Fix the build when --enable-compositor is
	there.
2006-02-17 00:00:24 +00:00
Søren Sandmann
053759fad6 Insert #ifdef's to make it build again
Thu Feb 16 15:54:48 2006  Søren Sandmann  <sandmann@redhat.com>

       * src/compositor.c: Insert #ifdef's to make it build again
2006-02-16 21:03:02 +00:00
Søren Sandmann
f6738a930c New function.
Thu Feb 16 15:24:42 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/screen.c (meta_screen_composite_all_windows): New function.

	* src/prefs.[ch], src/metacity.schemas.in: Add new
	compositing_manager key.

	* src/display.c (prefs_changed_callback): Handle
	META_PREF_COMPOSITOR_MANAGER

	* src/display.c (event_callback): Only call
	meta_compositor_process_event() if there is in fact a compositor.

	* src/display.c (enable/disable_compositor): Add code to
	enable/disable compositor at runtime
2006-02-16 20:26:05 +00:00
Søren Sandmann
0f48ff448c Add code to destroy compositor. Implement unmanage_screen() functionality.
Wed Feb 15 18:42:03 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.[ch]: Add code to destroy compositor. Implement
	unmanage_screen() functionality.
2006-02-15 23:44:15 +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
c348794431 Patch from Jens Granseuer to fix more build issues with gcc 2.95. #331166.
2006-02-14  Elijah Newren  <newren gmail com>

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

	* src/prefs.c (meta_prefs_init):
	Remove C99 style variable initiailization
2006-02-14 17:26:40 +00:00
Elijah Newren
8ceb613668 We had that prev_window code in multiple places and it was all identical.
2006-02-13  Elijah Newren  <newren gmail com>

	* src/keybindings.c (process_tab_grab):
	We had that prev_window code in multiple places and it was all
	identical.  Let's just stick it in one place to make the function
	easier to read.
2006-02-13 19:26:40 +00:00
Thomas Thurman
500bbefc6a Allow alt-escape to cancel alt-tabbing, and vice versa. Fixes #141425.
2006-02-13  Thomas Thurman <thomas thurman org uk>

	* src/keybindings.c (process_tab_grab):
	Allow alt-escape to cancel alt-tabbing, and vice versa.  Fixes
	#141425.
2006-02-13 19:16:32 +00:00
Thomas Thurman
ce3299e815 Disable alt-f7 if a window can't be moved, and alt-f8 if it can't be
2006-02-11  Thomas Thurman <thomas thurman org uk>

        Disable alt-f7 if a window can't be moved, and alt-f8 if it
        can't be resized.  Fixes #328920.

        * src/keybindings.c (handle_begin_move, handle_begin_resize):
        check window->has_*_func before beginning operation
2006-02-12 03:17:10 +00:00
Elijah Newren
cb298b9279 actually use META_LAYER_TOP but just manually make it equal to
2006-02-11  Elijah Newren  <newren gmail com>

	* src/stack.h (enum MetaStackLayer):
	* src/stack.c (get_standalone_layer):
	actually use META_LAYER_TOP but just manually make it equal to
	META_LAYER_DOCK.  Add a note point to the EWMH for why we do this.
	#330717
2006-02-12 00:01:06 +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
Thomas Thurman
4b6a87acb5 add messages to explain that warnings are harmless
2006-02-09  Thomas Thurman <thomas thurman org uk>

        * src/testboxes.c (test_regions_okay, test_clamping_to_region):
        add messages to explain that warnings are harmless
2006-02-11 04:03:27 +00:00
Soeren Sandmann
f39bcff434 Wrap fade code in #ifdef HAVE_COMPOSITE_EXTENSIONS
Tue Feb  7 00:58:05 2006  Soeren Sandmann  <sandmann@redhat.com>

	* src/compositor.c: Wrap fade code in #ifdef HAVE_COMPOSITE_EXTENSIONS
2006-02-07 05:58:52 +00:00
Søren Sandmann
abde4a3769 New fancy minimize animation. Fade windows in and out.
Mon Feb  6 17:45:39 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c: New fancy minimize animation. Fade windows in
        and out.

2
2006-02-06 22:47:13 +00:00
Thomas Thurman
b5c199c6e6 produce warning when invalid events with no timestamp are received, rather
2006-02-03  Thomas Thurman <thomas thurman org uk>

        * src/display.c (event_callback): produce warning when invalid
        events with no timestamp are received, rather than failing an
        assertion
2006-02-03 18:09:16 +00:00
Søren Sandmann
63d978d228 update the pixmap. (update) print out framerate. (dump_stacking_order) new
Thu Feb  2 17:58:22 2006  Søren Sandmann  <sandmann@redhat.com>

	* compositor.c (process_map): update the pixmap.
	(update) print out framerate.
	(dump_stacking_order) new debug
	function.
	(meta_compositor_add_window) error trap fixes
	(MiniInfo): Make the minimize animation fade out.
2006-02-02 23:02:21 +00:00
Elijah Newren
297e0e466f Track the active_screen, (event_callback): If the mouse enters a window on
2006-01-30  Elijah Newren  <newren gmail com>

	* src/display.[ch] (struct MetaDisplay), meta_display_open,
	meta_display_set_input_focus_window,
	meta_display_focus_the_no_focus_window): Track the active_screen,
	(event_callback): If the mouse enters a window on a different
	screen, activate the default window on the new screen.  May need
	to be modified for click-to-focus; we'll wait for feedback.  Fixes
	#319348.
2006-01-30 17:22:14 +00:00
Elijah Newren
405e21a82a change the order of the ||'ed items in the if to avoid using an
2006-01-23  Elijah Newren  <newren gmail com>

	* src/display.c (meta_display_check_threshold_reached): change the
	order of the ||'ed items in the if to avoid using an uninitialized
	value

	* src/prefs.c (meta_prefs_init): fix a couple uninitialized value
	problems
2006-01-24 01:07:41 +00:00
Elijah Newren
9ce85d7657 Patch from Christian Kirbach to prevent a critical warning crasher when
2006-01-21  Elijah Newren  <newren gmail com>

	Patch from Christian Kirbach to prevent a critical warning crasher
	when switching themes.  #327847.

	* src/theme.c (meta_theme_free): since themes are only constructed
	as needed and may be NULL, check for that before freeing theme
	hash tables
2006-01-21 21:26:55 +00:00
Elijah Newren
c0f4b9d2d4 Patch from Dick Marinus to add a minimize double-click-titlebar-action;
2006-01-21  Elijah Newren  <newren gmail com>

	* src/common.h (enum MetaActionDoubleClickTitlebar):
	* src/frames.c (meta_frames_button_press_event):
	* src/prefs.c (action_double_click_titlebar_from_string):
	* src/metacity.schemas.in:
	Patch from Dick Marinus to add a minimize
	double-click-titlebar-action; slightly modified to also include a
	none action.  #300210.
2006-01-21 19:18:51 +00:00
Elijah Newren
8e5425a86f fixed_directions is only meant for explicit user interactions; disable it
2006-01-20  Elijah Newren  <newren gmail com>

	* src/constraints.c (setup_constraint_info): fixed_directions is
	only meant for explicit user interactions; disable it for
	everything else.  There are other bugs and improvements that could
	be made with fixed_directions that I should be filing too, but at
	least put a FIXME there for now--I'm so lame.  Fixes #327822.
2006-01-21 01:09:46 +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
6f318f1a75 Fix unitialized value problem when in raise-on-click mode. Søren,
2006-01-20  Elijah Newren  <newren gmail com>

	Fix unitialized value problem when in raise-on-click mode.  Søren,
	#327572.

	* src/display.c (meta_display_check_threshold_reached): make
	function be a no op if raise_on_click!=FALSE

	* src/display.h (struct MetaDisplay): point out that
	grab_initial_[xy] and grab_threshold_movement_reached are only for
	raise_on_click==FALSE mode.
2006-01-20 23:02:24 +00:00
Elijah Newren
5568f75cb0 Patch from Søren to fix some reading-from-free'd-data errors. #327575
2006-01-20  Elijah Newren  <newren gmail com>

	Patch from Søren to fix some reading-from-free'd-data errors.
	#327575

	* src/edge-resistance.c (meta_display_cleanup_edges): store the
	edges in a hash table so that we can still read their values
	within the loop from the other array they are stored in, then free
	them all at the end.
2006-01-20 22:57:42 +00:00
Elijah Newren
e272295976 Fix various initialization and default issues, especially for
2006-01-20  Elijah Newren  <newren gmail com>

	Fix various initialization and default issues, especially for
	--disable-gconf.  Make --disable-gconf actually work.  #326661.

	* configure.in: Fix compilation with --disable-gconf
	* src/metacity.schemas.in: Add a note that if any defaults are
	  changed in this file, src/prefs.c may need to be updated to
	  reflect the change
	* src/prefs.c: set various static global vars to the right default
	value, (meta_prefs_init): get the titlebar_font and current_theme
	handled better when not using gconf, (struct MetaSimpleKeyMapping,
	screen_string_bindings, window_string_bindings): helper vars to
	allow some keybindings to work even without gconf,
	(init_bindings): initialize bindings for the without-gconf case
	too, (init_commands): make sure these are all NULL for the
	non-gconf case so that we don't access random memory,
	(init_workspace_names): just give these all a default name for the
	non-gconf case,
	(meta_prefs_change_workspace_name): actually change the name for
	the non-gconf case too
2006-01-20 22:42:25 +00:00
Elijah Newren
a556a7334a More careful error handling of values returned by GConf. Fixes #326615.
2006-01-20  Elijah Newren  <newren gmail com>

	More careful error handling of values returned by GConf.  Fixes
	#326615.

	* src/prefs.c (get_bool): new helper function, (meta_prefs_init):
	use get_bool to handle the case of a gconf key not existing,
	(update_cursor_size): sanity check for sane values
2006-01-20 22:32:28 +00:00
Elijah Newren
af14d9d2a1 Prevent rapidly repeated visual bells from hanging metacity. Fixes
2006-01-20  Elijah Newren  <newren gmail com>

	Prevent rapidly repeated visual bells from hanging metacity.
	Fixes #322032.

	* src/display.h (struct MetaDisplay): add a last_bell_time field,
	(XSERVER_TIME_IS_BEFORE_ASSUMING_REAL_TIMESTAMPS macro,
	XERVER_TIME_IS_BEFORE macro): add parentheses around usage of
	macro parameter

	* src/display.c (meta_display_open): initialize last_bell_time,
	(event_callback): don't allow more than one bell per second
2006-01-20 22:08:52 +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
4c10722262 Patch from Björn Lindqvist to fix #98340.
2006-01-20  Elijah Newren  <newren gmail com>

	Patch from Björn Lindqvist to fix #98340.

	* src/screen.c (meta_screen_ensure_tab_popup): Make sure an
	outline border is shown even if a window frame's width is 0.
	Also, correctly handle window outlines in showing desktop mode.
2006-01-20 21:48:51 +00:00
Søren Sandmann
cc790655f2 Make minimize animation update again.
Fri Jan 20 16:42:25 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c: Make minimize animation update again.
2006-01-20 21:43:13 +00:00
Søren Sandmann
5f9a097d2c g_object_unref() rather than ws_region_unref().
Thu Jan 19 18:05:47 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (meta_compositor_manage_screen):
	g_object_unref() rather than ws_region_unref().
2006-01-19 23:06:19 +00:00
Søren Sandmann
24976318b5 Port to changes in libcm
Thu Jan 19 16:50:50 2006  Søren Sandmann  <sandmann@redhat.com>

        * src/compositor.c: Port to changes in libcm
2006-01-19 21:51:54 +00:00
Søren Sandmann
8638300708 Port to changes in libcm.
Tue Jan 17 17:25:29 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c: Port to changes in libcm.
2006-01-17 22:27:10 +00:00
Elijah Newren
4dd216f5a8 manually define HOST_NAME_MAX if not already defined to fix Solaris
2006-01-16  Elijah Newren  <newren gmail com>

	* src/window-props.c: manually define HOST_NAME_MAX if not already
	defined to fix Solaris compilation issue.  Caught by Damien
	Carbery, patch from Havoc.  #326745
2006-01-16 17:37:53 +00:00
Søren Sandmann
35dae65862 Really turn off draw-in-a-loop.
Mon Jan 16 11:55:20 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (meta_compositor_manage_screen): Really turn
	off draw-in-a-loop.
2006-01-16 16:56:09 +00:00
Kyle Ambroff
fac7010411 If no valid window is found in the MRU list, then set focus to the desktop
2006-01-15  Kyle Ambroff  <kambroff@csus.edu>

	* src/workspace.c (focus_ancestor_or_mru_window):
	If no valid window is found in the MRU list, then set focus to the
	desktop window. (#317405)
2006-01-16 06:07:29 +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
Elijah Newren
def12b85b8 fix compilation when HAVE_COMPOSITE_EXTENSIONS is undefined. #326912
2006-01-14  Elijah Newren  <newren gmail com>

	* src/compositor.[ch]: fix compilation when
	HAVE_COMPOSITE_EXTENSIONS is undefined.  #326912
2006-01-14 21:51:46 +00:00
Søren Sandmann
efe25a80ed Only update on damage events.
Fri Jan 13 16:37:26 2006  Søren Sandmann  <sandmann@redhat.com>

	* src/compositor.c (update): Only update on damage events.
2006-01-13 21:38:56 +00:00
Elijah Newren
f9d11c0be6 Patch from Damien Carbery. Fixes #326746.
2006-01-13  Elijah Newren  <newren gmail com>

	Patch from Damien Carbery.  Fixes #326746.

	* src/util.c: explicitly #include Xlib.h to fix a compilation
	issue on Solaris.
2006-01-13 21:36:10 +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
9ec589b3b8 Replace __PRETTY_FUNCTION__ with G_STRFUNC, because lesser compilers don't
2006-01-11  Elijah Newren  <newren gmail com>

	* src/textboxes.c (test_area, test_intersect, test_equal,
	  test_overlap_funcs, test_basic_fitting, test_merge_regions,
	  test_regions_okay, test_region_fitting, test_clamping_to_region,
	  test_clipping_to_region, test_shoving_into_region,
	  test_find_onscreen_edges,
	  test_find_nonintersected_xinerama_edges, test_gravity_resize,
	  test_find_closest_point_to_line):
	Replace __PRETTY_FUNCTION__ with G_STRFUNC, because lesser
	compilers don't support the former.  Caught by Damien Carbery, fix
	suggested by Ray Strode.  #326281.
2006-01-11 16:35:03 +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
8c5b6c875a Fix window outline for minimized windows when using alt-esc. #325092.
2006-01-09  Elijah Newren  <newren@gmail.com>

	Fix window outline for minimized windows when using alt-esc.
	#325092.

	* src/display.c (meta_display_begin_grab_op): Specify the showing
	type of tabbing operation (Alt tab vs. alt-esc) in addition to the
	listing type of tabbing operation (docks vs normal windows) to
	meta_screen_ensure_tab_popup().

	* src/display.h (enum MetaTabShowType): new convenience enum

	* src/screen.[ch] (meta_screen_ensure_tab_popup): require the
	showing type be specified in addition to the tabbing type; put the
	outline around the window instead of the icon when in alt-esc
	mode.
2006-01-10 05:05:40 +00:00
Elijah Newren
ae52d731be Fix reduced resources resize handling for windows with sizing or resizing
2006-01-09  Elijah Newren  <newren@gmail.com>

	Fix reduced resources resize handling for windows with sizing or
	resizing constraints.  #325774.

	* src/display.c (meta_display_end_grab_op): Provide constraints.c
	with the correct gravity information.
2006-01-10 05:01:08 +00:00
Elijah Newren
d884f9ce8a Be more strict about what is considered a valid region with partial
2006-01-09  Elijah Newren  <newren@gmail.com>

	Be more strict about what is considered a valid region with
	partial struts.  Fixes #322070.

	* src/boxes.[ch]:
	(meta_rectangle_expand_region_conditionally):
	new function behaving like meta_rectangle_expand_region() but
	which only does so when the width and height of the rectangles
	meet a certain threshold

	(replace_rect_with_list):
	Remove a compiling warning

	* src/constraints.c:
	(constrain_partially_onscreen):
	provide minimum thresholds in each direction for the size of the
	rectangles to avoid cases where only a single pixel thick layer of
	a window might be showing
2006-01-10 04:57:51 +00:00
Elijah Newren
ee54debd6a Use the right function to remove the timeout so that we don't crash if
2006-01-09  Elijah Newren  <newren@gmail.com>

	* src/bell.c (meta_bell_notify_frame_destroy): Use the right
	function to remove the timeout so that we don't crash if removed
	at an inopportune time.  Fixes #322031.
2006-01-10 04:50:17 +00:00
Elijah Newren
24cfed8cf0 Remove the "pull-away" edge resistance. Fixes another of the zillions of
2006-01-09  Elijah Newren  <newren@gmail.com>

	* src/edge-resistance.c (apply_edge_resistance): Remove the
	"pull-away" edge resistance.  Fixes another of the zillions of
	issues covered in #321905.
2006-01-10 04:46:45 +00:00
Elijah Newren
008a811e10 Revert to the old edge resistance behavior for keyboard movement/resizing
2006-01-09  Elijah Newren  <newren@gmail.com>

	* src/edge-resistance.c (apply_edge_resistance): Revert to the old
	edge resistance behavior for keyboard movement/resizing based
	resistance.  Not only makes the code much simpler and shorter, but
	also fixes another of the zillions of issues covered in #321905.
2006-01-10 04:42:30 +00:00
Elijah Newren
de65967b62 Remove the timeout resistance at screen/xinerama edges for the whiners.
2006-01-09  Elijah Newren  <newren@gmail.com>

	* src/edge-resistance.c (apply_edge_resistance): Remove the
	timeout resistance at screen/xinerama edges for the whiners.
	Okay, it made sense.  Fixes another of the zillions of issues
	covered in #321905.
2006-01-10 04:39:53 +00:00
Elijah Newren
35532d14cb Make extra timeout edge resistance apply even if one edge already
2006-01-09  Elijah Newren  <newren@gmail.com>

	* src/edge-resistance.c (apply_edge_resistance): Make extra
	timeout edge resistance apply even if one edge already offscreen.
	Fixes another of the zillions of issues covered in #321905.
2006-01-10 04:36:36 +00:00
Elijah Newren
9516694385 Allow edge resistance at both sides of a window and also when edges don't
2006-01-09  Elijah Newren  <newren@gmail.com>

	Allow edge resistance at both sides of a window and also when
	edges don't overlap but are a single pixel away from doing so.
	Fixes one of the zillions of issues covered in #321905.

	* src/boxes.[ch]:
	(meta_rectangle_edges_align):
	new function to handle the overlap or off by one determining
	whether edge resistance should kick in for an edge.

	(meta_rectangle_edge_cmp_ignore_type):
	new function to sort edges but ignore the type so that e.g. left &
	right edges of windows can be used interchangeably.

	(meta_rectangle_edge_cmp):
	now uses meta_rectangle_edge_cmp_ignore_type() to do most the work
	and just adds an extra condition

	* src/edge-resistance.c:
	(find_nearest_position):
	use meta_rectangle_edges_align() now to determine whether the
	edges align,

	(apply_edge_resistance, apply_edge_resistance_to_each_side):
	have the edge resistance kick in if either the beginning or ending
	positions would cause overlap in the given direction -- fixes an
	uncommon but annoying corner case,

	(apply_edge_snapping, apply_edge_resistance_to_each_side,
	 meta_display_cleanup_edges,
	 stupid_sort_requiring_extra_pointer_dereference, cache_edges):
	mix edges from both sides now
2006-01-10 04:33:58 +00:00
Elijah Newren
9eb56f151c Plug a few leaks. Fixes #309178.
2006-01-09  Elijah Newren  <newren@gmail.com>

	Plug a few leaks.  Fixes #309178.

	* src/main.c (main): remove an unneeded g_set_prgname() call, free
	some strings allocated by the GOptions parsing
2006-01-10 04:18:09 +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
5e9f20e94c since the title is going to be treated as markup, escape it. Fixes
2005-12-27  Elijah Newren  <newren@gmail.com>

	* src/tabpopup.c (meta_ui_tab_popup_new): since the title is going
	to be treated as markup, escape it.  Fixes #324846.
2005-12-27 16:40:47 +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
Kang Jeong-Hee
6a9242b192 compile with compositor enabled 2005-12-14 12:47:35 +00:00
Elijah Newren
12193322a8 make the debugging message actually correspond to the code. Patch from
2005-12-12  Elijah Newren  <newren@gmail.com>

	* src/window.c (update_net_frame_extents): make the debugging
	message actually correspond to the code.  Patch from Björn
	Lindqvist.  Fixes #322051.
2005-12-12 18:22:40 +00:00
Kjartan Maraas
b3f465c727 Make the wireframe a bit slimmer 2005-11-29 21:36:12 +00:00
Davyd Madeley
616d778f6b display hostname in titlebar for remote X clients. Closes bug #322202.
2005-11-24  Davyd Madeley  <davyd@fugro-fsi.com.au>

        * src/window-props.c: display hostname in titlebar for remote X
          clients. Closes bug #322202.
2005-11-23 17:08:03 +00:00
Elijah Newren
ca2fe384bc Don't allow removing a window from maximized or fullscreened state to
2005-11-22  Elijah Newren  <newren@gmail.com>

	Don't allow removing a window from maximized or fullscreened state
	to place the titlebar under the top panel.  Fixes #322075.

	* src/display.c (handle_net_moveresize_window): fix up previous
	comments now that I know a little more, modify the code just
	slightly to clarify that this is NOT a manual user move/resize
	operation

	* src/window.c (meta_window_unmaximize,
	  meta_window_unmake_fullscreen,
	  meta_window_shove_titlebar_onscreen):
	don't claim that these are manual user move/resize operations
2005-11-22 15:48:30 +00:00
Elijah Newren
b03d82661f Relax the partially onscreen constraint to allow the titlebar to touch the
2005-11-21  Elijah Newren  <newren@gmail.com>

	* src/constraints.c (constrain_partially_onscreen): Relax the
	partially onscreen constraint to allow the titlebar to touch the
	bottom panel in order to make the new constraints code function
	the same as the old version.  Fixes #322071.
2005-11-22 00:22:41 +00:00
Elijah Newren
3426844ad5 When updating the xinerama due to placement, update which maximal/spanning
2005-11-21  Elijah Newren  <newren@gmail.com>

	* src/constraints.c (place_window_if_needed): When updating the
	xinerama due to placement, update which maximal/spanning rect set
	to use as well
2005-11-21 21:35:31 +00:00
Elijah Newren
9641bc5ee7 compute the frame geometry due to maximization only after actually
2005-11-20  Elijah Newren  <newren@gmail.com>

	* src/constraints.c (place_window_if_needed): compute the frame
	geometry due to maximization only after actually maximizing.
	Fixes #321902.
2005-11-21 06:00:18 +00:00
Davyd Madeley
d1da3438d4 Use GPOINTER_TO_INT() macro instead of cast to allow compilation on 64-bit
2005-11-21  Davyd Madeley  <davyd@fugro-fsi.com.au>

        * src/edge-resistance.c (meta_display_compute_resistance_and_snap):
          Use GPOINTER_TO_INT() macro instead of cast to allow compilation on
          64-bit architectures without warning.
2005-11-21 02:58:36 +00:00
Elijah Newren
075d6d34db differentiate between movement towards an edge and movement away from one.
2005-11-19  Elijah Newren  <newren@gmail.com>

	* src/edge-resistance.c (apply_edge_resistance): differentiate
	between movement towards an edge and movement away from one.  Pick
	smaller constants for movement away from an edge.
2005-11-20 04:02:46 +00:00
Elijah Newren
a7201d27d1 Merge of all the changes on the constraints_experiments branch. This is
2005-11-18  Elijah Newren  <newren@gmail.com>

	Merge of all the changes on the constraints_experiments branch.
	This is just a summary, to get the full ChangeLog of those
	changes (approx. 2000 lines):
	  cvs -q -z3 update -Pd -r constraints_experiments
	  cvs -q -z3 diff -pu -r CONSTRAINTS_EXPERIMENTS_BRANCHPOINT ChangeLog

	Bugs fixed:
	  unfiled - constraints.c is overly complicated[1]
	  unfiled - constraints.c is not robust when all constraints
	            cannot simultaneously be met (constraints need to be
	            prioritized)
	  unfiled - keep-titlebar-onscreen constraint is decoration
	            unaware (since get_outermost_onscreen_positions()
	            forgets to include decorations)
	  unfiled - keyboard snap-moving and snap-resizing snap to hidden
	            edges
	   109553 - gravity w/ simultaneous move & resize doesn't work
	   113601 - maximize vertical and horizontal should toggle and be
	            constrained
	   122196 - windows show up under vertical panels
	   122670 - jerky/random resizing of window via keyboard[2]
	   124582 - keyboard and mouse snap-resizing and snap-moving
	            erroneously moves the window multidimensionally
	   136307 - don't allow apps to resize themselves off the screen
	            (*cough* filechooser *cough*)
	   142016, 143784 - windows should not span multiple xineramas
	            unless placed there by the user
	   143145 - clamp new windows to screensize and force them
	            onscreen, if they'll fit
	   144126 - Handle pathological strut lists sanely[3]
	   149867 - fixed aspect ratio windows are difficult to resize[4]
	   152898 - make screen edges consistent; allow easy slamming of
	            windows into the left, right, and bottom edges of the
	            screen too.
	   154706 - bouncing weirdness at screen edge with keyboard moving
	            or resizing
	   156699 - avoid struts when placing windows, if possible (nasty
	            a11y blocker)
	   302456 - dragging offscreen too restrictive
	   304857 - wireframe moving off the top of the screen is misleading
	   308521 - make uni-directional resizing easier with
	            alt-middle-drag and prevent the occasional super
	            annoying resize-the-wrong-side(s) behavior
	   312007 - snap-resize moves windows with a minimum size
	            constraint
	   312104 - resizing the top of a window can cause the bottom to
	            grow
	   319351 - don't instantly snap on mouse-move-snapping, remove
	            braindeadedness of having order of releasing shift and
	            releasing button press matter so much

	   [1] fixed in my opinion, anyway.
	   [2] Actually, it's not totally fixed--it's just annoying
	       instead of almost completely unusable.  Matthias had a
	       suggestion that may fix the remainder of the problems (see
	       http://tinyurl.com/bwzuu).
	   [3] This bug was originally about not-quite-so-pathological
	       cases but was left open for the worse cases. The code from
	       the branch handles the remainder of the cases mentioned in
	       this bug.
	   [4] Actually, although it's far better there's still some minor
	       issues left: a slight drift that's only noticeable after
	       lots of resizing, and potential problems with partially
	       onscreen constraints due to not clearing any
	       fixed_directions flags (aspect ratio windows get resized in
	       both directions and thus aren't fixed in one of them)

	New feature:
	    81704 - edge resistance for user move and resize operations;
	            in particular 3 different kinds of resistance are
	            implemented:
             	 Pixel-Distance: window movement is resisted when it
	     	   aligns with an edge unless the movement is greater than
	     	   a threshold number of pixels
             	 Timeout: window movement past an edge is prevented until
	     	   a certain amount of time has elapsed during the
	     	   operation since the first request to move it past that
	     	   edge
             	 Keyboard-Buildup: when moving or resizing with the
	     	   keyboard, once a window is aligned with a certain edge
	     	   it cannot move past until the correct direction has
	     	   been pressed enough times (e.g. 2 or 3 times)

	Major changes:
	  - constraints.c has been rewritten; very few lines of code from
	    the old version remain.  There is a comment near the top of
	    the function explaining the basics of how the new framework
	    works.  A more detailed explanation can be found in
	    doc/how-constraints-works.txt
	  - edge-resistance.[ch] are new files implementing edge-resistance.
	  - boxes.[ch] are new files containing low-level error-prone
	    functions used heavily in constraints.c and edge-resistance.c,
	    among various places throughout the code.  testboxes.c
	    contains a thorough testsuite for the boxes.[ch] functions
	    compiled into a program, testboxes.
	  - meta_window_move_resize_internal() *must* be told the gravity
	    of the associated operation (if it's just a move operation,
	    the gravity will be ignored, but for resize and move+resize
	    the correct value is needed)
	  - the craziness of different values that
	    meta_window_move_resize_internal() accepts has been documented
	    in a large comment at the beginning of the function.  It may
	    be possible to clean this up some, but until then things will
	    remain as they were before--caller beware.
	  - screen and xinerama usable areas (i.e. places not covered by
	    e.g. panels) are cached in the workspace now, as are the
	    screen and xinerama edges.  These get updated with the
	    workarea in src/workspace.c:ensure_work_areas_validated()
2005-11-19 14:58:50 +00:00
Aidan Delaney
6677b55cd5 Changed the 'minimized' field of the MetaTabEntry struct to 'hidden'.
2005-11-11 Aidan Delaney <a.j.delaney@brighton.ac.uk>

       * src/tabpopup.h: (struct _MetaTabEntry):
       * src/tabpopup.c: (meta_ui_tab_popup_new):
       * src/screen.c: (meta_screen_ensure_tab_popup):
       Changed the 'minimized' field of the MetaTabEntry struct to
       'hidden'.  Fixes reopened bug #168455.
2005-11-12 00:34:32 +00:00
Kjartan Maraas
4752ef55c7 Merge fix for bug #320050 from stable.
2005-10-29  Kjartan Maraas  <kmaraas@gnome.org>

	* src/eventqueue.c: (meta_event_queue_new): Merge fix
	for bug #320050 from stable.
2005-10-29 07:37:45 +00:00
Philip O'Brien
064303e98e add handling for META_PREF_CURSOR_THEME and META_PREF_CURSOR_SIZE for more
2005-10-25  Philip O'Brien  <philip.obrien@dal.ca>

	* src/prefs.c (meta_preference_to_string): add handling for
	META_PREF_CURSOR_THEME and META_PREF_CURSOR_SIZE for more complete
	debug info
2005-10-25 16:43:01 +00:00
Elijah Newren
f2acdda740 Fix edge snapping for multi-screen (non-xinerama) setups. #319425
2005-10-23  Elijah Newren  <newren@gmail.com>

	Fix edge snapping for multi-screen (non-xinerama) setups.  #319425

	* src/place.c (get_windows_showing_on_same_screen,
	get_vertical_edges, get_horizontal_edges): rename
	get_windows_on_same_workspace() to
	get_windows_showing_on_same_screen()

	* src/place.c (get_windows_showing_on_same_screen): exclude windows
	in the list that are on a different screen
2005-10-23 21:19:22 +00:00
Muktha
62fb5e6eb4 Make the unfocussed Simple window border visible with high contrast
2005-10-13  Muktha  <muktha.narayan@wipro.com>

        * src/themes/Simple/metacity-theme-1.xml: Make the unfocussed
        Simple window border visible with high contrast inverse theme.
        Fixes #121361.
2005-10-13 05:51:24 +00:00
Elijah Newren
7ef871f73a Fix a crash that occurs when removing some virtual desktops and windows
2005-10-08  Elijah Newren  <newren@gmail.com>

	Fix a crash that occurs when removing some virtual desktops and
	windows happen to be on those desktops.  #318306.

	* src/workspace.c (meta_workspace_relocate_windows): Since windows
	cannot be on more than one workspace at a time, remove the window
	from the old workspace before adding it to the new one.
2005-10-08 23:18:05 +00:00
Elijah Newren
29e38a2f53 Add my copyright notice to a number of files on which it should already
2005-10-08  Elijah Newren  <newren@gmail.com>

	Add my copyright notice to a number of files on which it should
	already exist.
2005-10-08 19:38:54 +00:00
Elijah Newren
0a13bf3270 clarify the meaning of the auto_raise preference. Fixes one of the issues
2005-10-03  Elijah Newren  <newren@gmail.com>

	* src/metacity.schemas.in: clarify the meaning of the auto_raise
	preference.  Fixes one of the issues in #312421.
2005-10-03 20:10:56 +00:00
Elijah Newren
4aaf6e3eb4 Patch from Ross Cohen to make alt-esc consistent with alt-tab by leaving
2005-10-03  Elijah Newren  <newren@gmail.com>

	Patch from Ross Cohen to make alt-esc consistent with alt-tab by
	leaving stacking of unselected windows unchanged.  Fixes #314285.

	* src/keybindings.c (process_tab_grab): before raising and showing
	the next candidate, reset the stack positions to what they were
	at the beginning of the grab
2005-10-03 20:05:44 +00:00
Elijah Newren
12daca5cb1 Patch from Ross Cohen to make alt-esc (show windows instantly) actually
2005-10-03  Elijah Newren  <newren@gmail.com>

	Patch from Ross Cohen to make alt-esc (show windows instantly)
	actually show minimized windows too.  Fixes #107072.

	* src/keybindings.c (process_tab_grab): initialize tab_unminimized
	to FALSE for the target window when starting the grab, when
	advancing through the list check to find the previous window and
	re-minimize it if it was tab-unminimized, unminimize the new
	window we're alt-esc'ing to if it's minimized, (do_choose_window):
	raise and unminimize the initial window as well in alt-esc'ing

	* src/window.h (struct _MetaWindow): add a tab_unminimized field

	* src/window.c (meta_window_new_with_attrs): initialize
	tab_unminimized to false
2005-10-03 20:02:31 +00:00
Elijah Newren
26dbf9856b A combination of a couple memory leaks fixes, from Kjartan, Soeren, and I.
2005-10-03  Elijah Newren  <newren@gmail.com>

	A combination of a couple memory leaks fixes, from Kjartan,
	Soeren, and I.  Fixes #313030.

	* src/bell.c (meta_bell_flash_screen): call XFreeGC()

	* src/frames.c (invalidate_cache): free pixels

	* src/window.c (meta_window_show_menu): call
	meta_screen_free_workspace_layout()
2005-10-03 19:22:40 +00:00
Elijah Newren
ea4cd88285 Patch from Björn Lindqvist fix the workspace switcher tabpopup to display
2005-10-03  Elijah Newren  <newren@gmail.com>

	Patch from Björn Lindqvist fix the workspace switcher tabpopup to
	display the right windows and to fix the
	pick-a-new-window-to-focus algorithm in order to not select
	windows that aren't showing.  Fixes #170475.

	* src/tabpopup.c (meta_convert_meta_to_wnck,
	meta_select_workspace_expose_event): factor out conversion code
	from meta_select_workspace_expose_event() into the new
	meta_convert_meta_to_wnck() function

	* src/tabpopup.c (meta_select_workspace_expose_event):
	* src/workspace.c (focus_ancestor_or_mru_window):
	replace the buggy window->minimized logic with
	!meta_window_showing_on_its_workspace (window)
2005-10-03 19:06:17 +00:00
Elijah Newren
47f1a8634b Patch from Björn Lindqvist to have ancestors come along with the
2005-10-03  Elijah Newren  <newren@gmail.com>

	Patch from Björn Lindqvist to have ancestors come along with the
	transient when moving the window from one workspace to another.
	Fixes #314977.

	* src/window.c (meta_window_change_workspace): have all ancestors
	change workspaces too
2005-10-03 19:00:01 +00:00
Elijah Newren
ef5299ee92 Truncate ridiculously long titles to avoid crashing or letting the pager
2005-10-03  Elijah Newren  <newren@gmail.com>

	Truncate ridiculously long titles to avoid crashing or letting the
	pager crash.  Based on patch from Ray, incorporating suggestions
	from Havoc and some extensions of my own.  Fixes #315070.

	* src/display.c (set_utf8_string_hint, meta_display_open):
	* src/xprops.[ch] (meta_prop_set_utf8_string_hint):
	Move set_utf8_string_hint() to props.[ch], namespace it
	("meta_prop_"), and make it public

	* src/tabpopup.c (utf8_strndup, meta_ui_tab_popup_new):
	* src/util.[ch] (meta_g_utf8_strndup):
	Move utf8_strndup() to util.[ch], namespace it ("meta_g_"), and
	make it public

	* src/display.c (meta_display_open):
	* src/display.h (struct _MetaDisplay):
	add net_wm_visible_name and net_wm_visible_icon_name atoms to the
	list of atoms we work with

	* src/window-props.c (set_window_title, set_icon_title): If title
	length is greater than 512, truncate it and set
	_NET_WM_VISIBLE_NAME or _NET_WM_VISIBLE_ICON_NAME accordingly
2005-10-03 18:13:45 +00:00
Elijah Newren
fcba59e685 Get the tabbing window outline to work with gtk+ 2.8.4 again. Fixes
2005-10-03  Elijah Newren  <newren@gmail.com>

	Get the tabbing window outline to work with gtk+ 2.8.4 again.
	Fixes #317528.

	* src/tabpopup.c (display_entry): gtk+ 2.8.4 needs to know the
	mapped state of its windows (see bug 316180), and since we
	manually map with gdk_window_show_unraised() we need to manually
	set the mapped state too
2005-10-03 17:11:49 +00:00
Brent Smith
6bb6566b86 Moved the call to meta_screen_get_natural_xinerama_list to earlier in
2005-09-02  Brent Smith  <gnome@nextreality.net>

        * src/place.c: (meta_window_place): Moved the call to
        meta_screen_get_natural_xinerama_list to earlier in
        function so that xineramas_list is allocated before
        find_first_fit is called.  Fixes #315000
2005-09-02 15:54:34 +00:00
Elijah Newren
87f613fbbe Avoid obscuring centered-on-desktop windows which are denied focus. Fixes
2005-08-12  Elijah Newren  <newren@gmail.com>

        * src/place.c (meta_window_place): Avoid obscuring
        centered-on-desktop windows which are denied focus.  Fixes
        #313234.
2005-08-13 03:58:24 +00:00
Elijah Newren
f335b0c381 Patch from Brent Smith to fix a duplicate string. Fixes #309774.
2005-08-08  Elijah Newren  <newren@gmail.com>

	Patch from Brent Smith to fix a duplicate string.  Fixes #309774.

	* src/theme-parser.c (parse_toplevel_element, parse_draw_op_element):

	Change "No \"%s\" attribute on element <%s>" string to "No \"%s\"
	attribute on <%s> element"
2005-08-08 21:31:31 +00:00
Ray Strode
2972ab6df6 Improve the behavior of keyboard move/resize and edge snapping. Still not
2005-08-03  Ray Strode  <rstrode@redhat.com>

	Improve the behavior of keyboard move/resize and edge
	snapping.  Still not perfect, bug 310888.

	* src/effects.c (draw_xor_rect): Make the outside of a
	wireframe rectangle line up with the outside edge of its
	window, instead of centering the wireframe edges on the
	window edges.

	* src/keybindings.c (process_keyboard_move_grab): allow
	edge snapping in wireframe mode.  Adjust code to take
	into account changed semantics of find_next_*_edge
	functions.
	(process_keyboard_resize_grab_op_change): new function
	to take some orthogonal logic out of
	process_keyboard_resize_grab_op.  Only allow keyboard
	resize cursor to go to flat edges, not corners.
	(process_keyboard_resize_grab):  allow edge snapping in
	wireframe mode.  Fix up snapping logic.

	* src/place.c (get_{vertical,horizontal}_edges): use
	GArray instead of int *, since the number of output
	edges isn't known until the middle of the function now.
	Use xor rect extents instead of window extends if in
	wireframe mode.
	(meta_window_find_next_{vertical,horizontal}_edge: add
	new source_edge_position parameter to specify which edge
	on the active window to start from when looking for next
	edge on the screen. Return the coordinate of the edge
	found and not the coordinate of where the window should be
	moved to snap to where the edge was found.

	* src/window.c (update_move): all the user to specify
	an edge to resize with mouse in keyboard resize mode.
	window
2005-08-03 02:22:00 +00:00
Elijah Newren
c50c8e6f7d Change default theme from "Simple" to "Clearlooks".
2005-08-01  Elijah Newren  <newren@gmail.com>

	* src/metacity.schemas.in: Change default theme from "Simple" to
	"Clearlooks".
2005-08-01 14:56:24 +00:00
Elijah Newren
1b2e5e56a8 use only the expected_focus_window instead of both the focused_window and
2005-07-31  Elijah Newren  <newren@gmail.com>

	* src/stack.c (is_focused_foreach, get_standalone_layer): use only
	the expected_focus_window instead of both the focused_window and
	the expected_focus_window.  Removes an infinite flicker loop in
	sloppy and mouse focus, and an ugly one time flicker in click to
	focus.  Fixes #311400.
2005-08-01 04:58:58 +00:00
Elijah Newren
d5705ef576 Patch from Jaap Haitsma to make sure that Metacity dialogs have icons.
2005-07-30  Elijah Newren  <newren@gmail.com>

        Patch from Jaap Haitsma to make sure that Metacity dialogs have
        icons.  Fixes #309876.

        * src/metacity-dialog.c (kill_window_question,
        warn_about_no_sm_support, error_about_command): call
        gtk_window_set_icon_name() to set the dialog icon
2005-07-30 15:18:01 +00:00
Elijah Newren
20b7ee18ef remove some unneeded debug spew that was causing crashes. Fixes #311819.
2005-07-28  Elijah Newren  <newren@gmail.com>

	* src/place.c (avoid_being_obscured_as_second_modal_dialog):
	remove some unneeded debug spew that was causing crashes.  Fixes
	#311819.
2005-07-28 19:05:28 +00:00
Elijah Newren
266f78d9a8 try to place windows denied focus near the focus window and fix a xinerama
2005-07-24  Elijah Newren  <newren@gmail.com>

	* src/place.c (find_most_freespace): try to place windows denied
	focus near the focus window and fix a xinerama bug with the
	placement, (avoid_being_obscured_as_a_second_modal_dialog): avoid
	modal dialogs being obscured in somewhat pathologically strange
	circumstances that Eclipse seems to be good at triggering,
	(meta_window_place): have dialog windows make use of
	avoid_being_obscured_as_a_second_modal_dialog().  Fixes one of the
	issues found in #307875.
2005-07-25 02:12:58 +00:00
Elijah Newren
c25b8ec616 raise the window as well as its ancestor; fixes a stacking bug with an
2005-07-24  Elijah Newren  <newren@gmail.com>

	* src/window.c (meta_window_raise): raise the window as well as
	its ancestor; fixes a stacking bug with an ancestor that has more
	than one child window.  Fixes one of the issues in #307875.
2005-07-25 01:52:50 +00:00
Elijah Newren
c64bda776b restore original window size if the window was maximized, as the FIXME
2005-07-24  Elijah Newren  <newren@gmail.com>

	* src/window.c (meta_window_free): restore original window size if
	the window was maximized, as the FIXME says.  ;-) Fixes #137185.
2005-07-25 01:39:24 +00:00
Elijah Newren
225407f3b3 revert the patch from #128380--change _NET_ACTIVE_WINDOW behavior to what
2005-07-23  Elijah Newren  <newren@gmail.com>

	* src/window.c: (meta_window_activate): revert the patch from
	#128380--change _NET_ACTIVE_WINDOW behavior to what it originally
	was.
2005-07-24 01:13:41 +00:00
Elijah Newren
6c023bfef7 Patch from Ken Harris to provide a more lenient threshold for drawing
2005-07-14  Elijah Newren  <newren@gmail.com>

	Patch from Ken Harris to provide a more lenient threshold for
	drawing rounded corners.  Fixes #122065.

	* src/theme.c (meta_frame_layout_calc_geometry): use height +
	width > 5 instead of height > 3 && width > 3 as criterion
2005-07-14 21:00:26 +00:00
Elijah Newren
c635ac51cb Fix a slight bug (causing possible miscoloring of parts of the titlebar)
2005-07-13  Elijah Newren  <newren@gmail.com>

	Fix a slight bug (causing possible miscoloring of parts of the
	titlebar) introduced by the patch from #169982.

	* src/gradient.c:
	(meta_gradient_create_interwoven):
	(meta_gradient_create_multi_vertical):

	bitshifting operators do not take precedence over typecasting, so
	make sure to use parentheses to get the right operation order.
2005-07-13 18:24:56 +00:00
Elijah Newren
7bda73a415 Patch from Andrew Johnson to speed up vertical gradients. Fixes #169982.
2005-07-12  Elijah Newren  <newren@gmail.com>

	Patch from Andrew Johnson to speed up vertical gradients.  Fixes
	#169982.

	* src/gradient.c:
	(meta_gradient_create_interwoven):
	(meta_gradient_create_vertical):
	(meta_gradient_create_multi_vertical):

	use memcpy instead of really long loops to set values in memory to
	a given pattern.
2005-07-12 22:34:25 +00:00
Elijah Newren
0e956c674f Patch from Björn Lindqvist to split up main() into more manageable chunks
2005-07-12  Elijah Newren  <newren@gmail.com>

	Patch from Björn Lindqvist to split up main() into more manageable
	chunks and make use of GOpt.  Closes #305331.

	* src/main.c (usage): remove this function,
	(meta_print_compilation_info): new function taken from main(),
	(meta_print_self_identity): new function taken from main(),
	(struct MetaArguments) new struct to replace some free variables,
	(meta_parse_options): new funcion taken from main() but now using
	GOpt, (meta_select_display): new function taken from main()
2005-07-12 20:54:34 +00:00
Aivars Kalvans
d09fb9f806 free ->xinerama_infos Closes bug#307884
2005-07-12  Aivars Kalvans <aivars.kalvans@inbox.lv>

        * src/screen.c (meta_screen_free): free ->xinerama_infos
        Closes bug#307884
2005-07-12 19:01:38 +00:00
Matthias Clasen
8ce054b21b React to cursor theme changes: (#308106)
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	React to cursor theme changes: (#308106)

	* src/prefs.h:
	* src/prefs.c: Expose the GConf keys for cursor theme
	and size as preferences META_PREF_CURSOR_THEME and
	META_PREF_CURSOR_SIZE with getters meta_prefs_get_cursor_theme()
	and meta_prefs_get_cursor_size().

	* src/display.c (meta_display_open): Initialize the cursor
	theme and size.

	* src/display.h:
	* src/display.c (meta_display_set_cursor_theme): New function
	to change the cursor theme and update all cursors.

	* src/screen.h
	* src/screen.c (meta_screen_update_cursor): New function to
	refesh the root cursor of a screen.

	* src/main.c (prefs_changed_callback): Update the cursor
	theme when the cursor preferences change.
2005-07-11 13:25:08 +00:00
Soeren Sandmann
947e45d27d Add a cache of pixmaps for recently exposed frame areas. Makes metacity a
Sun Jun 26 11:19:18 2005  Soeren Sandmann  <sandmann@redhat.com>

	* src/frames.c: Add a cache of pixmaps for recently exposed frame
	areas. Makes metacity a bit faster when dragging windows around.
	See bug 141813.
2005-06-26 21:58:37 +00:00
Ryan Lortie
e003ba87d1 Prevent using the address of a local variable as a hash key. (Bug #307209)
2005-06-10  Ryan Lortie  <desrt@desrt.ca>

        * src/frames.c: Prevent using the address of a local variable
          as a hash key.  (Bug #307209)

        * src/xprops.c (meta_prop_get_values): Fix a small leak in the
          case of a SYNC_COUNTER property value and HAVE_XSYNC not
          defined.  (Bug #307214)
2005-06-11 02:28:04 +00:00
Ray Strode
064a86e620 Cleanup font data when done with it (bug 306720).
2005-06-07  Ray Strode  <rstrode@redhat.com>

	Cleanup font data when done with it (bug 306720).

	* src/effects.c (draw_xor_rect): free font info structure.
	* src/screen.c (meta_screen_new): pass a 1 not a 0 to
	XFreeFontInfo to free font info structure.
	(meta_screen_free): call XUnloadFont on GC font before freeing
	the GC.
2005-06-07 15:52:56 +00:00
Elijah Newren
3fdf721286 If a window requests to be raised and is denied, set the demands attention
2005-06-02  Elijah Newren  <newren@gmail.com>

	* src/window.c (meta_window_configure_request): If a window
	requests to be raised and is denied, set the demands attention
	hint.  Fixes #305882.
2005-06-02 15:47:37 +00:00
Elijah Newren
90dc2116ad if the window has a modal transient which is being unmanaged, don't focus
2005-06-02  Elijah Newren  <newren@gmail.com>

	* src/window.c (meta_window_focus): if the window has a modal
	transient which is being unmanaged, don't focus it.  Fixes the
	Metacity issue reported in #305362.
2005-06-02 15:24:40 +00:00
Ray Strode
14b8de3727 Bug 305564 again.
2005-05-30  Ray Strode  <rstrode@redhat.com>

	Bug 305564 again.

	When drawing XOR resize popup use "fixed" font instead of
	-misc-fixed-*-16-* xlfd.  Should work on more xservers.

	Also take steps to fail better if the xserver isn't
	cooperating.

	* src/effects.c (draw_xor_rect): if we can't draw font box
	for whatever reason, at least draw grid frames.

	* src/screen.c (meta_screen_new): use fixed alias instead
	of a xfld.  Don't pass GCFont to XCreateGC if font couldn't
	be loaded.  Print a warning if font couldn't be loaded.
2005-05-30 20:15:26 +00:00
Elijah Newren
be49961944 Patch from Greg Hudson to make sure window position is calculated
2005-05-26  Elijah Newren  <newren@gmail.com>

	* src/window.c (meta_window_configure_request): Patch from Greg
	Hudson to make sure window position is calculated correctly for
	reconfigure requests when part of the XWindowChanges structure is
	uninitialized.  Fixes #305257.
2005-05-26 20:14:15 +00:00
Ray Strode
7b416a0a2d Actually commit the stuff mentioned in the last ChangeLog entry.
2005-05-26  Ray Strode  <rstrode@redhat.com>

	Actually commit the stuff mentioned in the last
	ChangeLog entry.
2005-05-26 19:58:17 +00:00
Elijah Newren
e1891161d0 don't accidentally treat maximize vertically as maximize in both
2005-05-26  Elijah Newren  <newren@gmail.com>

	* src/window.c (check_maximize_to_work_area): don't accidentally
	treat maximize vertically as maximize in both directions.  Fixes
	#302204.
2005-05-26 18:42:55 +00:00
Elijah Newren
eb46b01e97 put all transients of the new window, if any exist, in the calc_showing
2005-05-26  Elijah Newren  <newren@gmail.com>

	* src/window.c: (meta_window_new_with_attrs): put all transients
	of the new window, if any exist, in the calc_showing queue.  Fixes
	#303284.
2005-05-26 17:15:56 +00:00
Dan Winship
82c8ca4588 Make sure the "Close" button has the focus, not the table. (#172703)
* src/metacity-dialog.c (warn_about_no_sm_support): Make sure the
        "Close" button has the focus, not the table. (#172703)
2005-04-08 14:49:01 +00:00
Elijah Newren
c7ebe972e6 Patch from Aidan Delaney to make sure that icons in the alt-tab popup are
2005-02-28  Elijah Newren  <newren@gmail.com>

	Patch from Aidan Delaney to make sure that icons in the alt-tab
	popup are dimmed for all hidden windows, not just minimized ones.
	Fixes #168455.

	* src/screen.c: (meta_screen_ensure_tab_popup): make use
	meta_window_showing_on_its_workspace() instead of just checking if
	the window is minimized.
2005-02-28 21:34:48 +00:00
Elijah Newren
bea407e309 Prevent the visual bell from changing the focus window. Fixes #123366.
2005-02-25  Elijah Newren  <newren@gmail.com>

	Prevent the visual bell from changing the focus window.  Fixes
	#123366.

	* src/bell.c: (meta_bell_flash_screen): if not in click-to-focus
	mode and mouse_mode is also false, increment the focus sentinel so
	that we can ignore spurious EnterNotify and LeaveNotify events.

	* src.display.c: (event_callback): make sure to also ignore
	LeaveNotify events when the focus sentinel isn't clear
2005-02-25 20:14:08 +00:00
Elijah Newren
ebae340a1e Fix crash that occurs when stupid apps claim that a window is its own
2005-02-23  Elijah Newren  <newren@gmail.com>

	* src/window.c: (meta_window_new_with_attrs): Fix crash that
	occurs when stupid apps claim that a window is its own parent.
	#168207
2005-02-23 17:42:51 +00:00
Elijah Newren
612507260a Handle keynav vs. mousenav in mouse and sloppy focus modes. Fixes #167545.
2005-02-21  Elijah Newren  <newren@gmail.com>

	Handle keynav vs. mousenav in mouse and sloppy focus modes.  Fixes
	#167545.

	* doc/how-to-get-focus-right.txt: Update due to this new method
	for handling keynav vs. mousenav, plus various other updates that
	I previously forgot.

	* src/display.h: (struct _MetaDisplay): add a mouse_mode boolean

	* src/display.c: (meta_display_open): initialize mouse_mode to
	true, (event_callback): have EnterNotify and LeaveNotify events
	set mouse_mode to true when focusing a window

	* src/keybindings.c: (process_tab_grab): set mouse_mode to false
	when using alt-tab/alt-esc, (do_choose_window): likewise,
	(do_handle_move_to_workspace): set mouse_mode to false on
	move-window-to-workspace-<n> keybindings

	* src/window.c (idle_calc_showing): if we're in keynav mode while
	using sloppy or mouse focus, use metacity_sentinel to avoid
	EnterNotify events being generated from events other than mouse
	movement.

	* src/workspace.c (meta_workspace_activate_with_focus): add a
	FIXME in a potentially duplicate section of code,
	(meta_workspace_focus_default_window): use the same focus choice
	as click-to-focus if in keynav mode.
2005-02-22 02:11:25 +00:00
Elijah Newren
992f237090 Handle _NET_CURRENT_DESKTOP messages that come with timestamps. Fixes the
2005-02-20  Elijah Newren  <newren@gmail.com>

	* src/display.c: (event_callback): Handle _NET_CURRENT_DESKTOP
	messages that come with timestamps.  Fixes the metacity portion of
	#161361 other than the portion handled by #128380.
2005-02-20 23:38:31 +00:00
Elijah Newren
8de466b582 when receiving a _NET_ACTIVE_WINDOW message, switch to the desktop where
2005-02-20  Elijah Newren  <newren@gmail.com>

	* src/window.c: (meta_window_activate): when receiving a
	_NET_ACTIVE_WINDOW message, switch to the desktop where the window
	is located before activating instead of moving the window to the
	current desktop.  Thanks to Lubos Lunak for catching this issue.
	Fixes #128380.
2005-02-20 22:44:15 +00:00
Elijah Newren
79f2b91679 Ignore all focus and focus-stealing-prevention code in meta_window_show
2005-02-20  Elijah Newren  <newren@gmail.com>

	* src/window.c (meta_window_show): Ignore all focus and
	focus-stealing-prevention code in meta_window_show when not
	showing the window for the first time.  Fixes #167199.
2005-02-20 22:40:08 +00:00
Elijah Newren
b93960ac9d Fix an obscure xinerama placement bug with windows that are too large to
2005-02-20  Elijah Newren  <newren@gmail.com>

	Fix an obscure xinerama placement bug with windows that are too
	large to fit in the workarea in both dimensions.  #166757

	* src/place.c: (meta_window_place): use the current xinerama
	instead of arbitrarily resetting to 0
2005-02-20 22:38:05 +00:00
Elijah Newren
1f0fd137f5 Patch from Joe Marcus Clarke to fix a possible crash on logout. #167935.
2005-02-20  Elijah Newren  <newren@gmail.com>

	Patch from Joe Marcus Clarke to fix a possible crash on logout.
	#167935.  Thanks for fixing my mistakes, Joe!

	* src/display.c: (meta_display_open): initialize
	display->grab_old_window_stacking to NULL.
2005-02-20 17:23:20 +00:00
Elijah Newren
50312dd0e8 Big patch to cover about 6 different issues in order to correct rare
2005-02-20  Elijah Newren  <newren@gmail.com>

	Big patch to cover about 6 different issues in order to correct
	rare problems with timestamps (make sure window selected in
	tasklist actually gets focus, sanity check timestamps to avoid
	rogue apps hosing the system, correct the updating of
	net_wm_user_time, correctly handle timestamps of 0 when comparing
	xserver timestamps for those who have had their systems up for
	over 25 days or so, add some debugging information to verbose
	logs, some code cleanups).  Fixes all issues listed in #167358.

	* src/display.h: (struct _MetaDisplay): clarify comment on
	last_focus_time, introduce a new variable--last_user_time,
	(XSERVER_TIME_IS_BEFORE macro): put this functionality into a
	separate macro and then introduce a new macro with this name that
	uses the old one but adds additional special-case checks for
	timestamps that are 0, (comment to
	meta_display_set_input_focus_window): add information about how
	last_user_time should be used in this function

	* src/display.c (santiy_check_timestamps): new function,
	(meta_display_open): intialize display->last_user_time,
	(meta_display_get_current_time_roundtrip): use the timestamp,
	which is known to be good, in order to sanity_check_timestamps,
	(event_callback): use the new meta_window_ste_user_time() function
	in order to correct problems, use the timestamp of KeyPress and
	ButtonPress events, which are known to be good, in order to
	sanity_check_timestamps, (timestamp_too_old): new function for
	common behavior of meta_display_focus_the_no_focus_window and
	meta_display_set_input_focus_window, with added checking for
	display->last_user_time in addition to display->last_focus_time,
	(meta_display_set_input_focus_window): replace some of the code
	with a call to timestamp_too_old(),
	(meta_display_focus_the_no_focus_window): replace some of th ecode
	with a call to timestamp_too_old()

	* src/window.h: (meta_window_set_user_time): new function to
	abstract the many things that need to be done when updating the
	net_wm_user_time of any window

	* src/window.c: (meta_window_activate): add debugging spew, make
	sure the comparison is made with last_user_time NOT
	last_focus_time, use meta_window_set_user_time() function in order
	to correct problems, (meta_window_client_message): add a newline
	to a debugging message to make them easier to read,
	(meta_window_set_user_time): new function

	* src/window-props.c (reload_net_wm_user_time): use the new
	meta_window_ste_user_time() function in order to correct problems
2005-02-20 17:14:16 +00:00
Elijah Newren
754a75546d trivial fix to a log message: change %d to %lu (see debugging log from bug
2005-02-16  Elijah Newren  <newren@gmail.com>

	* src/display.c: (event_callback): trivial fix to a log message:
	change %d to %lu (see debugging log from bug 167358).
2005-02-16 09:36:24 +00:00
Elijah Newren
0488efc8c1 Raise the ancestor of a window instead of the window itself. Fixes
2005-02-12  Elijah Newren  <newren@gmail.com>

	Raise the ancestor of a window instead of the window itself.
	Fixes #166894.

	* src/window.c: (find_root_ancestor): new function,
	(meta_window_raise): get the ancestor of the given window and
	raise it if possible instead of the window
2005-02-12 07:34:30 +00:00
Elijah Newren
9fa5c1d4b9 Don't unconditionally place splashscreens (and other not-to-befocused
2005-02-12  Elijah Newren  <newren@gmail.com>

	Don't unconditionally place splashscreens (and other
	not-to-befocused windows) below the focus window.  Fixes #167042.

	* src/window.c: (intervening_user_event_occurred): new function
	taken from the timestamp comparison portion of the old
	window_takes_focus_on_map function, (window_state_on_map): new
	function with remainder of old window_takes_focus_on_map function
	that determines both whether the window will take focus and
	whether it should be placed on top, (meta_window_show): use
	place_on_top_on_map to determine window stacking instead of trying
	to infer it from takes_focus_on_map
2005-02-12 07:19:41 +00:00
Elijah Newren
d31a0829be Avoid new windows being obscured by the focus window (and thus possibly
2005-02-11  Elijah Newren  <newren@gmail.com>

	Avoid new windows being obscured by the focus window (and thus
	possibly lost).  Fixes #166524.

	* src/place.c: new MetaWindowDirection enum,
	(find_most_freespace): new function to find where there is the
	most space available around the focused window,
	(meta_window_place): if a window is denied focus and the window
	overlaps the focused window, retry the first-fit algorithm only
	paying attention to the focus window position and if that fails
	just find the location on the screen with the most space
	available.

	* src/window.h: (struct MetaWindow): new
	denied_focus_and_not_transient bitfield

	* src/window.c: (meta_window_new_with_attrs): initialize
	denied_focus_and_not_transient, (meta_window_show): set and unset
	the denied_focus_and_not_transient field appropriately
2005-02-11 19:20:44 +00:00
Aidan Delaney
f7aad0d647 Removed useless function call. #166730
2005-02-08  Aidan Delaney  <adelaney@cs.may.ie>

	Removed useless function call.  #166730

	* src/tabpopup.c: (outline_window_expose): Removed unused
	references to variables and an unnecessary function call to
	gdk_window_get_size().
2005-02-09 16:07:56 +00:00
Elijah Newren
fe1416c65f Avoid using CurrentTime when focusing, handle it better in case we miss
2005-02-08  Elijah Newren  <newren@gmail.com>

	Avoid using CurrentTime when focusing, handle it better in case we
	miss any cases.  Fixes #166732.

	* src/window.c: (meta_window_shade): use
	meta_display_get_current_time_roundtrip() to ensure we have a
	valid timestamp, (meta_window_unshade): same

	* src/display.c: (meta_display_set_input_focus_window): If
	CurrentTime was passed, get one from the XServer in addition to
	throwing a warning, (meta_display_focus_the_no_focus_window): same
2005-02-09 03:18:46 +00:00
Elijah Newren
454e595ef8 If we're not passed a timestamp, make sure to manually get one. Fixes
2005-02-08  Elijah Newren  <newren@gmail.com>

	* src/window.c: (meta_window_activate): If we're not passed a
	timestamp, make sure to manually get one.  Fixes #166728.
2005-02-09 03:15:11 +00:00
Elijah Newren
0aa903f0d4 Set a _METACITY_VERSION property (a utf8 string) on the WM check window.
2005-02-06  Elijah Newren  <newren@gmail.com>

	Set a _METACITY_VERSION property (a utf8 string) on the WM check
	window.  #165350.

	* src/display.h: (struct MetaDisplay): add a atom_metacity_version
	field

	* src/display.c: (meta_display_open): initialize the
	_METACITY_VERSION property on the WM check window to the current
	version of Metacity.
2005-02-07 04:37:35 +00:00