Compare commits

..

278 Commits

Author SHA1 Message Date
Thomas Thurman
3229882183 2.21.3 release.
2007-12-14  Thomas Thurman  <tthurman@gnome.org>

        * NEWS: 2.21.3 release.


svn path=/trunk/; revision=3488
2007-12-19 11:42:51 +00:00
Kjartan Maraas
f4cc847f83 Updated Norwegian bokmål translation.
2007-12-19  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.

svn path=/trunk/; revision=3487
2007-12-19 11:35:34 +00:00
Thomas Thurman
a63d5801ae print "Subversion" and not "CVS".
2007-12-19  Thomas Thurman  <tthurman@gnome.org>

        * configure.in: print "Subversion" and not "CVS".


svn path=/trunk/; revision=3486
2007-12-19 11:04:16 +00:00
Jorge Gonzalez Gonzalez
4b774eb18e Updated Spanish translation
svn path=/trunk/; revision=3485
2007-12-19 07:43:42 +00:00
Thomas Thurman
d052782caf compositor enabled by default.
2007-12-18  Thomas Thurman  <tthurman@gnome.org>

        * configure.in: compositor enabled by default.


svn path=/trunk/; revision=3484
2007-12-19 04:34:11 +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
Daniel Nylander
931d70d87f sv.po: Updated Swedish translation
svn path=/trunk/; revision=3477
2007-12-17 15:20:49 +00:00
Kjartan Maraas
f28cd718f8 Updated Norwegian bokmål translation.
2007-12-15  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.

svn path=/trunk/; revision=3476
2007-12-15 11:47:20 +00:00
Thomas Thurman
623e4dc05c Post-release bump to 2.21.5.
2007-12-14  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: Post-release bump to 2.21.5.



svn path=/trunk/; revision=3475
2007-12-15 03:31:34 +00:00
Thomas Thurman
89e47e2431 2.21.3 release.
2007-12-14  Thomas Thurman  <tthurman@gnome.org>

        * NEWS: 2.21.3 release.


svn path=/trunk/; revision=3473
2007-12-15 03:23:09 +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
Jorge Gonzalez Gonzalez
42951ec68f Updated Spanish translation, fixes bug #500562 and bug #500831
svn path=/trunk/; revision=3470
2007-12-10 15:25:45 +00:00
Matej Urbančič
a99ece5a5e Updated Slovenian translation
svn path=/trunk/; revision=3468
2007-12-10 15:06:06 +00:00
Jorge Gonzalez Gonzalez
6bb78dcb0b Updated Spanish translation, fixes bug #500831
svn path=/trunk/; revision=3467
2007-12-10 14:02:00 +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
Jorge Gonzalez Gonzalez
e7758d64d8 Updated Spanish translation, fixes bug #500562
svn path=/trunk/; revision=3463
2007-12-09 20:41:46 +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
Jakub Friedl
2891388813 Czech Translation updated by Petr Kovar.
2007-12-08  Jakub Friedl  <jfriedl@suse.cz>

  * cs.po: Czech Translation updated by Petr Kovar.


svn path=/trunk/; revision=3461
2007-12-08 09:45:35 +00:00
Ihar Hrachyshka
194c514b45 Updated Belarusian Latin translation.
svn path=/trunk/; revision=3460
2007-12-08 09:06:37 +00:00
Leonardo Ferreira Fontenelle
69255114d9 Fixes in Brazilian Portuguese translation by Luiz Armesto.
2007-12-08  Leonardo Ferreira Fontenelle  <leonardof@svn.gnome.org>

	* pt_BR.po: Fixes in Brazilian Portuguese translation by Luiz Armesto.

svn path=/trunk/; revision=3459
2007-12-08 02:21:46 +00:00
Leonardo Ferreira Fontenelle
43f0c34cf8 Fixed attributes in Brazilian Portuguese translation by Rodrigo Flores.
2007-12-07  Leonardo Ferreira Fontenelle  <leonardof@svn.gnome.org>

	* pt_BR.po: Fixed attributes in Brazilian Portuguese translation by
	Rodrigo Flores.

svn path=/trunk/; revision=3457
2007-12-08 01:06:11 +00:00
Marcel Telka
aa2af695d7 Updated Slovak translation by Pavol Šimo.
2007-12-02  Marcel Telka  <marcel@telka.sk>

	* sk.po: Updated Slovak translation by Pavol Šimo.

svn path=/trunk/; revision=3449
2007-12-02 22:30:58 +00:00
Ignacio Casal Quinteiro
539285ca78 Updated Galician Translation.
svn path=/trunk/; revision=3446
2007-11-28 13:26:25 +00:00
Yannig MARCHEGAY
dda8866f30 Updated Occitan translation
svn path=/trunk/; revision=3421
2007-11-20 20:01:23 +00:00
Matej Urbančič
618115931e Updated Slovenian translation
svn path=/trunk/; revision=3416
2007-11-19 14:23:56 +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
Thomas Thurman
a8583668eb Post-release bump to 2.21.3.
2007-11-17  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: Post-release bump to 2.21.3.


svn path=/trunk/; revision=3414
2007-11-18 04:40:22 +00:00
Thomas James Alexander Thurman
4b0fd1b7d8 ==================================================
gnome-panel-2.3.1.tar.gz is ready for distribution
==================================================

svn path=/trunk/; revision=3412
2007-11-18 04:37:26 +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
Matej Urbančič
386ffb4752 Updated Slovenian translation
svn path=/trunk/; revision=3392
2007-11-13 13:53:38 +00:00
Peter Bloomfield
fa51a94a69 more changes discussed in bug #461927
svn path=/trunk/; revision=3391
2007-11-13 13:31:14 +00:00
Matej Urbančič
ef3f8c18a1 Updated Slovenian translation
svn path=/trunk/; revision=3390
2007-11-12 14:28:44 +00:00
Thomas Thurman
f4e327f69c Post-release bump to 2.21.2.
2007-11-11  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: Post-release bump to 2.21.2.

2007-11-11  Thomas Thurman  <thomas@thurman.org.uk>

        * NEWS: 2.21.1 release.



svn path=/trunk/; revision=3389
2007-11-12 04:48:04 +00:00
Thomas James Alexander Thurman
b61359506c =================================================
metacity-2.21.1 archives ready for distribution:
metacity-2.21.1.tar.gz
=================================================


svn path=/trunk/; revision=3387
2007-11-12 04:45:38 +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
Thomas James Alexander Thurman
6bec74017f Metacity Proudly Marching Into The 23rd Century
svn path=/trunk/; revision=3384
2007-11-11 21:00:32 +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
67ce5927e1 add reference to #461927
svn path=/trunk/; revision=3377
2007-11-08 16:06:46 +00:00
Daniel Nylander
f29afe115d sv.po: Updated Swedish translation
svn path=/trunk/; revision=3376
2007-11-08 11:30:46 +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
Jorge Gonzalez Gonzalez
848ccb3249 Updated Spanish translation
svn path=/trunk/; revision=3373
2007-11-01 13:22:10 +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
Matej Urbančič
908715bd84 Updated Slovenian translation
svn path=/trunk/; revision=3362
2007-10-25 13:02:27 +00:00
Djihed Afifi
c241036c06 Updated Arabic Translation by Djihed Afifi.
svn path=/trunk/; revision=3361
2007-10-23 20:56:13 +00:00
Djihed Afifi
280a01c5de Updated Arabic Translation by Djihed Afifi.
svn path=/trunk/; revision=3359
2007-10-21 16:45:19 +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
Thomas Thurman
8a023b00f2 Post-branch bump to 2.21.1.
2007-10-14  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: Post-branch bump to 2.21.1.


svn path=/trunk/; revision=3357
2007-10-15 02:38:56 +00:00
Yannig MARCHEGAY
ab9ff657c7 Updated Occitan translation
svn path=/trunk/; revision=3356
2007-10-03 16:27:00 +00:00
Kjartan Maraas
34cfd6fafd Remove circular dep metacity<->gnomecc.
2007-10-03  Kjartan Maraas  <kmaraas@gnome.org>

	* configure.in: Remove circular dep metacity<->gnomecc.

svn path=/trunk/; revision=3355
2007-10-03 06:53:29 +00:00
Stéphane Raimbault
c691288b14 Fixed French translation.
2007-09-30  Stéphane Raimbault  <stephane.raimbault@gmail.com>

	* fr.po: Fixed French translation.

svn path=/trunk/; revision=3354
2007-09-30 18:04:07 +00:00
Changwoo Ryu
46c9134992 Updated Korean translation.
2007-09-27  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.

svn path=/trunk/; revision=3352
2007-09-26 20:29:06 +00:00
Gil Forcada Codinachs
eb3449f5c7 Fixed a string in Catalan translation thanks to Sílvia Miranda
svn path=/trunk/; revision=3351
2007-09-25 17:25:50 +00:00
Olav Vitters
211de6cfac Make sure active maintainers can be parsed
svn path=/trunk/; revision=3350
2007-09-21 14:19:52 +00:00
Gil Forcada Codinachs
4e2434c082 Updated Catalan translation by Joan Duran
svn path=/trunk/; revision=3349
2007-09-21 12:12:10 +00:00
Artur Flinta
2d60c6b878 Updated Polish translation by GNOME PL Team.
2007-09-17  Artur Flinta  <aflinta@svn.gnome.org>

	* pl.po: Updated Polish translation by GNOME PL Team.


svn path=/trunk/; revision=3348
2007-09-17 20:17:41 +00:00
Alexander Shopov
f71386bdb5 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2007-09-17  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>

svn path=/trunk/; revision=3347
2007-09-17 18:35:45 +00:00
Wouter Bolsterlee
4e3a658b8e Translation updated by Wouter Bolsterlee.
2007-09-17  Wouter Bolsterlee  <wbolster@svn.gnome.org>

	* nl.po: Translation updated by Wouter Bolsterlee.

svn path=/trunk/; revision=3346
2007-09-17 17:15:16 +00:00
Djihed Afifi
bf683f6e50 Updated Arabic Translation by Djihed Afifi.
svn path=/trunk/; revision=3345
2007-09-17 11:01:54 +00:00
Gil Forcada Codinachs
cb8b2fd433 Updated Catalan translation
svn path=/trunk/; revision=3344
2007-09-16 21:16:35 +00:00
Elijah Newren
8780fd5e44 post-release version bump to 2.20.1
2007-09-15  Elijah Newren  <newren gmail com>

	* configure.in: post-release version bump to 2.20.1

svn path=/trunk/; revision=3343
2007-09-16 03:01:16 +00:00
Elijah Newren
0fd533eee1 2.20.0 release
2007-09-15  Elijah Newren  <newren gmail com>

	* configure.in:
	* NEWS:
	2.20.0 release

svn path=/trunk/; revision=3341
2007-09-16 02:58:03 +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
Takeshi AIHANA
976968e07e Translation improved.
2007-09-16  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Translation improved.

svn path=/trunk/; revision=3339
2007-09-16 02:41:31 +00:00
Mugurel Tudor
d986898234 Updated Romanian translation
2007-09-16  Mugurel Tudor  <mugurelu@gnome.ro>

	* ro.po: Updated Romanian translation

svn path=/trunk/; revision=3338
2007-09-15 21:57:18 +00:00
Nickolay V. Shmyrev
1d8db8825f Updated Russian translation.
2007-09-15  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* ru.po: Updated Russian translation.


svn path=/trunk/; revision=3337
2007-09-15 21:14:32 +00:00
Stéphane Raimbault
7c377a0193 Fixed French translation by Vincent Untz and Stéphane Raimbault.
svn path=/trunk/; revision=3336
2007-09-15 15:34:41 +00:00
Andre Klapper
fe9e1cdb05 Updated Slovak translation on behalf of Peter Tuharsky
2007-09-15  Andre Klapper  <a9016009@gmx.de>

	* sk.po: Updated Slovak translation on behalf of Peter Tuharsky
        <tuharsky@misbb.sk>.


svn path=/trunk/; revision=3335
2007-09-15 14:17:23 +00:00
Clytie Siddall
d6e8c6c3ed 2007-09-14 vi.po Updated Vietnamese translation
Clytie Siddall <clytie@riverland.net.au>

svn path=/trunk/; revision=3334
2007-09-14 11:43:52 +00:00
Luca Ferretti
029e3fc0ae Updated Italian translation.
2007-09-14  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation.


svn path=/trunk/; revision=3333
2007-09-14 07:30:23 +00:00
Djihed Afifi
c27cdff29c Updated Arabic Translation by Khaled Hosny.
svn path=/trunk/; revision=3332
2007-09-13 22:45:34 +00:00
Gabor Kelemen
cf2da99859 Translation updated.
2007-09-14 Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated.


svn path=/trunk/; revision=3331
2007-09-13 22:14:07 +00:00
Amanpreet Singh Alam
3fe42e647a updating for Punjabi
svn path=/trunk/; revision=3330
2007-09-13 03:41:15 +00:00
Ihar Hrachyshka
1d06b1f5e8 Updated Belarusian Latin translation
svn path=/trunk/; revision=3329
2007-09-12 23:07:57 +00:00
Maxim Dziumanenko
20479df535 Update Ukrainian translation.
2007-09-12 Maxim Dziumanenko <dziumanenko@gmail.com>

	* Update Ukrainian translation.

svn path=/trunk/; revision=3328
2007-09-12 13:50:16 +00:00
Goran Rakic
c585fa5036 Updated Serbian translation
svn path=/trunk/; revision=3327
2007-09-12 01:33:36 +00:00
Kenneth Nielsen
1aed84c9d7 Updated Danish translation
svn path=/trunk/; revision=3326
2007-09-09 01:19:30 +00:00
Inaki Larranaga Murgoitio
8cacb2afef Fixed some typos in Basque translation.
2007-09-08  Inaki Larranaga Murgoitio  <dooteo@zundan.com>

        * eu.po: Fixed some typos in Basque translation.



svn path=/trunk/; revision=3325
2007-09-08 16:31:48 +00:00
Vladimer Sichinava
2cfd418b03 Updated Georgian translation by Vladimer Sichinava <vsichi@gnome.org>
svn path=/trunk/; revision=3324
2007-09-07 12:17:00 +00:00
Yang Zhang
e4c4d8b4d8 Updated zh_CN translation
svn path=/trunk/; revision=3323
2007-09-07 11:32:28 +00:00
Jovan Naumovski
fc74911256 2007-09-05 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/trunk/; revision=3322
2007-09-05 12:53:56 +00:00
Clytie Siddall
3d0535569d 2007-09-03 vi.po Updated Vietnamese translation
Clytie Siddall <clytie@riverland.net.au>

svn path=/trunk/; revision=3321
2007-09-03 11:19:00 +00:00
Duarte Loreto
4dc7e6a4ed Updated Portuguese translation.
2007-09-03  Duarte Loreto <happyguy_pt@hotmail.com>

	* pt.po: Updated Portuguese translation.

svn path=/trunk/; revision=3320
2007-09-03 00:23:26 +00:00
Jovan Naumovski
e84b5bfed0 2007-09-03 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/trunk/; revision=3319
2007-09-02 23:41:06 +00:00
Yannig MARCHEGAY
c9366989a0 Updated Occitan translation
svn path=/trunk/; revision=3318
2007-09-01 20:16:05 +00:00
Elijah Newren
eb3c38e3ad update; cvs->svn & mention GConf needed Make it match idiotic format
2007-09-01  Elijah Newren  <newren gmail com>

	* HACKING: update; cvs->svn & mention GConf needed
	* MAINTAINERS: Make it match idiotic format requirements (I love
	you Olav!)

svn path=/trunk/; revision=3317
2007-09-01 18:50:07 +00:00
Jovan Naumovski
5196fb1ec5 2007-09-01 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/trunk/; revision=3316
2007-09-01 11:04:54 +00:00
Stéphane Raimbault
353408e30b Updated French translation.
svn path=/trunk/; revision=3315
2007-09-01 08:43:52 +00:00
Ani Peter
cc6b0e03fb Updated Malayalam (ml) Translation
svn path=/trunk/; revision=3314
2007-08-30 11:37:30 +00:00
Ani Peter
38cd0f28ef Updated Malayalam (ml) Translation
svn path=/trunk/; revision=3313
2007-08-30 11:37:20 +00:00
Felix I
3d118513c5 updated ta translation
svn path=/trunk/; revision=3312
2007-08-29 07:14:05 +00:00
Johannes Schmid
d35c086240 Updated German translation
svn path=/trunk/; revision=3311
2007-08-27 16:05:22 +00:00
Raphael Higino
27e7d0c529 Updated Brazilian Portuguese translation
svn path=/trunk/; revision=3309
2007-08-26 13:15:39 +00:00
Yannig MARCHEGAY
a9294e2906 Updated Occitan translation
svn path=/trunk/; revision=3308
2007-08-21 11:12:58 +00:00
Yannig MARCHEGAY
446cc65f5d Updated Occitan translation
svn path=/trunk/; revision=3307
2007-08-20 17:00:10 +00:00
Yannig MARCHEGAY
0a94728234 Updated Occitan translation
svn path=/trunk/; revision=3305
2007-08-17 17:58:20 +00:00
SANDRA MARAKKALA DANISHKA NAVIN
aa87fe4140 Add entry si for sinhala
svn path=/trunk/; revision=3304
2007-08-17 08:58:39 +00:00
SANDRA MARAKKALA DANISHKA NAVIN
5944e94710 si.po file for sinhala updated
svn path=/trunk/; revision=3303
2007-08-17 08:43:59 +00:00
Adam Weinberger
2b468a45b3 Updated Canadian English translation.
2007-08-15  Adam Weinberger  <adamw@gnome.org>

	* en_CA.po: Updated Canadian English translation.



svn path=/trunk/; revision=3301
2007-08-15 19:43:39 +00:00
Takeshi AIHANA
d7cff41d1b Updated Japanese translation.
2007-08-13  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Updated Japanese translation.

svn path=/trunk/; revision=3300
2007-08-13 13:57:55 +00:00
Žygimantas Beručka
b4d0db909b Updated Lithuanian translation.
svn path=/trunk/; revision=3299
2007-08-13 07:51:28 +00:00
Daniel Nylander
b595f1e99c sv.po: Swedish translation updated
svn path=/trunk/; revision=3298
2007-08-11 10:49:35 +00:00
Felix I
ed467aad59 updated ta translation
svn path=/trunk/; revision=3297
2007-08-10 08:48:06 +00:00
Ankitkumar Rameshchandra Patel
73224faec0 Updated Translation
svn path=/trunk/; revision=3296
2007-08-10 08:37:23 +00:00
Ilkka Tuohela
bd5436097e Updated Finnish translation
svn path=/trunk/; revision=3295
2007-08-09 04:22:21 +00:00
Ankitkumar Rameshchandra Patel
a462ba5798 Updated Translation
svn path=/trunk/; revision=3294
2007-08-08 13:53:20 +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
5a6bbef8ac post-release bump to 2.19.89.
2007-08-07  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: post-release bump to 2.19.89.



svn path=/trunk/; revision=3292
2007-08-07 12:50:15 +00:00
Thomas James Alexander Thurman
309e254b1d ==================================================
metacity-2.19.55 archives ready for distribution: 
metacity-2.19.55.tar.gz
==================================================


svn path=/trunk/; revision=3290
2007-08-07 12:44:05 +00:00
Jorge Gonzalez Gonzalez
10dd09687b Updated Spanish translation
svn path=/trunk/; revision=3289
2007-08-07 10:22:48 +00:00
Theppitak Karoonboonyanan
69bbbbc6ca Updated Thai translation.
* th.po: Updated Thai translation.


svn path=/trunk/; revision=3288
2007-08-07 04:51: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
Ilkka Tuohela
952e883456 Updated Finnish translation
svn path=/trunk/; revision=3286
2007-08-06 13:29:36 +00:00
Inaki Laranaga Murgoitio
c652788542 Updated Basque translation.
2007-08-05  Inaki Laranaga Murgoitio  <dooteo@zundan.com>

	* eu.po: Updated Basque translation.


svn path=/trunk/; revision=3285
2007-08-05 18:50:59 +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
Yannig MARCHEGAY
a871830927 Updated Occitan translation
svn path=/trunk/; revision=3280
2007-07-29 12:54:42 +00:00
Alexander Shopov
5545e49581 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2007-07-25  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>

svn path=/trunk/; revision=3279
2007-07-25 19:48:17 +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
Thomas Thurman
2d74cdc026 post-release bump to 2.19.55.
2007-07-22  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: post-release bump to 2.19.55.



svn path=/trunk/; revision=3277
2007-07-24 01:49:22 +00:00
Thomas James Alexander Thurman
7c343fc22d ==================================================
gnome-panel-2.3.1.tar.gz is ready for distribution
==================================================
(for real this time-- previously forgot NEWS in ChangeLog)

svn path=/trunk/; revision=3276
2007-07-24 01:37:22 +00:00
Thomas James Alexander Thurman
1dc74bbc8c 2.19.34 =======
2.19.34
=======

Thanks to Rob Bradford, Cosimo Cecchi, Yair Hershkovitz and Thomas Thurman
for improvements in this release.

 - Fix a bug where the window can be focused without being raised
   if the maximize is aborted. (Rob) [#459027]
 - Unset fullscreen is an allowed action where relevant. (Cosimo) [#449427]
 - Reverse window buttons and align them to the left for RTL locales.
   (Yair) [#92212]
 - Put all bitfields in window data together to help with optimisation.
   (Thomas) [#450271]

Translations
  Jorge Gonzalez (es), Ilkka Tyohela (fi), Gabor Kelemen (hu),
  Takeshi AIHANA (ja), Kjartan Maraas (nb), Vincent van Adrighem (nl),
  Daniel Nylander (sv), Theppitak Karoonbooyana (th),
  Nguyễn Thái Ngọc Duy (vi)


svn path=/trunk/; revision=3274
2007-07-24 00:59:54 +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
Gabor Kelemen
9c2e546f53 Translation updated.
2007-07-21 Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated.


svn path=/trunk/; revision=3270
2007-07-21 11:05:06 +00:00
Vincent van Adrighem
12ac1d6a4b Translation updated.
2007-07-18  Vincent van Adrighem  <adrighem@gnome.org>

	* nl.po: Translation updated.

svn path=/trunk/; revision=3269
2007-07-18 13:45:57 +00:00
Daniel Nylander
2ccb7f7bfa sv.po: Updated Swedish translation
svn path=/trunk/; revision=3268
2007-07-17 12:02:36 +00:00
Ilkka Tuohela
389eb410c7 Updated Finnish translation
svn path=/trunk/; revision=3267
2007-07-16 16:10:22 +00:00
Theppitak Karoonboonyanan
f0c4d2c57b Updated Thai translation.
* th.po: Updated Thai translation.


svn path=/trunk/; revision=3266
2007-07-10 16:15:44 +00:00
Takeshi AIHANA
4c4943312a Updated Japanese translation.
2007-07-08  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Updated Japanese translation.

svn path=/trunk/; revision=3264
2007-07-08 02:07:09 +00:00
Nguyen Thai Ngoc Duy
d616aeb828 updated vi.po
svn path=/trunk/; revision=3262
2007-07-03 00:18:03 +00:00
Clytie Siddall
92c63dfdc5 Updated Vietnamese translation.
svn path=/trunk/; revision=3260
2007-06-27 12:41:20 +00:00
Jorge Gonzalez Gonzalez
f9678266c7 Updated Spanish translation
svn path=/trunk/; revision=3259
2007-06-25 06:43:32 +00:00
Kjartan Maraas
e3db5a0be6 Add src/core.c Updated Norwegian bokmål translation.
2007-06-24  Kjartan Maraas  <kmaraas@gnome.org>

	* POTFILES.in: Add src/core.c
	* nb.po: Updated Norwegian bokmål translation.

svn path=/trunk/; revision=3258
2007-06-24 12:51:07 +00:00
Thomas Thurman
49e1802c7a Put all bitfields together to help with optimisation. Closes #450271.
2007-06-23  Thomas Thurman  <thomas@thurman.org.uk>

        * src/window.c (MetaWindow): Put all bitfields together to
        help with optimisation. Closes #450271.


svn path=/trunk/; revision=3257
2007-06-23 04:30:49 +00:00
Jorge Gonzalez Gonzalez
eb4941d005 Updated Spanish translation
svn path=/trunk/; revision=3256
2007-06-19 09:28:37 +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
1f05ddcd0e post-release bump to 2.19.34.
2007-06-18  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: post-release bump to 2.19.34.


svn path=/trunk/; revision=3250
2007-06-18 12:10:48 +00:00
Thomas Thurman
78604b64bc 2.19.21 release.
2007-06-18  Thomas Thurman  <thomas@thurman.org.uk>

        * NEWS: 2.19.21 release.


svn path=/trunk/; revision=3248
2007-06-18 12:08:43 +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
Funda Wang
6d8efc90e0 Updated metacity zh_CN translation
svn path=/trunk/; revision=3242
2007-06-16 09:40:15 +00:00
Jorge Gonzalez Gonzalez
d53af7196c Updated Spanish translation
svn path=/trunk/; revision=3241
2007-06-15 10:13:49 +00:00
Pema Geyleg
667c74bc4d updated dzongkha translation
svn path=/trunk/; revision=3240
2007-06-13 09:11:51 +00:00
Thomas Thurman
c5c59b1761 post-release bump to 2.19.21.
2007-06-10  Thomas Thurman  <thomas@thurman.org.uk>

        * configure.in: post-release bump to 2.19.21.


svn path=/trunk/; revision=3239
2007-06-11 03:39:20 +00:00
Thomas James Alexander Thurman
5fb20624c4 2.19.13 release
svn path=/trunk/; revision=3237
2007-06-11 03:22:40 +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
98791271e1 Added translators' names from 2.19.8 (sorry, folks: I forgot to save NEWS
2007-06-04  Thomas Thurman  <thomas@thurman.org.uk>                                                                                                                       
                                                                                                                                                                          
        * NEWS: Added translators' names from 2.19.8 (sorry, folks:                                                                                                       
        I forgot to save NEWS with their names in it before shipping.)  


svn path=/trunk/; revision=3232
2007-06-04 19:34:01 +00:00
Thomas James Alexander Thurman
8eac4fa3ce post-release bump to .13
svn path=/trunk/; revision=3231
2007-06-04 19:05:26 +00:00
Thomas James Alexander Thurman
0666e2c038 =================================================
metacity-2.19.8 archives ready for distribution: 
metacity-2.19.8.tar.gz
=================================================


svn path=/trunk/; revision=3229
2007-06-04 19:03:10 +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
Kenneth Nielsen
a7053d3d47 Updated Danish translation
svn path=/trunk/; revision=3221
2007-05-24 22:42:59 +00:00
Yannig MARCHEGAY
8ead622f8f Occitan translation update
svn path=/trunk/; revision=3220
2007-05-23 15:23:18 +00:00
Theppitak Karoonboonyanan
7759644304 Updated Thai translation.
* th.po: Updated Thai translation.


svn path=/trunk/; revision=3219
2007-05-18 10:45:19 +00:00
Yannig MARCHEGAY
526dd959ed + Occitan
svn path=/trunk/; revision=3218
2007-05-16 17:05:26 +00:00
Yannig MARCHEGAY
cb5c112166 svn path=/trunk/; revision=3217
svn path=/trunk/; revision=3217
2007-05-16 17:05:06 +00:00
Jovan Naumovski
fb3b32a2bd 2007-05-09 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/trunk/; revision=3216
2007-05-09 15:17:18 +00:00
Djihed Afifi
0e25c6eff6 Updated Arabic Translation by Khaled Hosny.
svn path=/trunk/; revision=3215
2007-05-02 15:41:33 +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
Ihar Hrachyshka
a50b3c7a2b Updated Belarusian Latin translation.
svn path=/trunk/; revision=3212
2007-04-23 23:52:08 +00:00
Elijah Newren
c8d33dc86b post-release bump to 2.19.8.
2007-04-23  Elijah Newren  <newren gmail com>

        * configure.in: post-release bump to 2.19.8.

svn path=/trunk/; revision=3211
2007-04-23 23:10:34 +00:00
Elijah Newren
aae4472a63 2.19.5 release.
2007-04-23  Elijah Newren  <newren gmail com>

        * NEWS: 2.19.5 release.

svn path=/trunk/; revision=3209
2007-04-23 23:06:30 +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
David Lodge
b10626c5d8 Updated British English translation
svn path=/trunk/; revision=3207
2007-04-23 06:07:42 +00:00
Ignacio Casal Quinteiro
50310c5870 Updated Galician Translation
svn path=/trunk/; revision=3206
2007-04-22 18:56:44 +00:00
Jorge Gonzalez Gonzalez
e03de727db Updated Spanish translation.
svn path=/trunk/; revision=3205
2007-04-22 10:30:56 +00:00
Daniel Nylander
7f6b23a90d sv.po: Updated Swedish translation
svn path=/trunk/; revision=3204
2007-04-21 11:40:17 +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
ee3ae1584f post-release bump to 2.19.5.
2007-04-16  Elijah Newren  <newren gmail com>

        * configure.in: post-release bump to 2.19.5.

svn path=/trunk/; revision=3200
2007-04-16 16:20:12 +00:00
Elijah Newren
128cda50bf 2.19.3 release.
2007-04-16  Elijah Newren  <newren gmail com>

        * NEWS: 2.19.3 release.

svn path=/trunk/; revision=3198
2007-04-16 16:17:47 +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
Djihed Afifi
6fa4dee13e Updated Arabic Translation by Khaled Hosny.
svn path=/trunk/; revision=3195
2007-04-14 18:48:25 +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
Kjartan Maraas
dc9920b883 Updated Norwegian bokmål translation.
2007-04-10  Kjartan Maraas  <kmaraas@gnome.org>

	* nb.po: Updated Norwegian bokmål translation.

svn path=/trunk/; revision=3187
2007-04-09 23:44:00 +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
63ca4e8bde post-release bump to 2.19.3.
2007-04-09  Elijah Newren  <newren gmail com>

        * configure.in: post-release bump to 2.19.3.

svn path=/trunk/; revision=3185
2007-04-09 17:24:50 +00:00
Elijah Newren
4d8a7a2045 2.19.2 release.
2007-04-09  Elijah Newren  <newren gmail com>

        * NEWS: 2.19.2 release.

svn path=/trunk/; revision=3183
2007-04-09 17:20: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
Thomas Thurman
82c56cb5d7 removed conflict line.
2007-04-08  Thomas Thurman  <thomas@thurman.org.uk>

        * ChangeLog: removed conflict line.



svn path=/trunk/; revision=3175
2007-04-08 18:17:38 +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
Raivis Dejus
43d4ea3f3b Updated Latvian Translation.
2007-04-05  Raivis Dejus <orvils@gmail.com>

        * lv.po: Updated Latvian Translation.

svn path=/trunk/; revision=3169
2007-04-05 06:55:35 +00:00
Raivis Dejus
8d00f13dc7 Updated Latvian Translation.
2007-04-05  Raivis Dejus <orvils@gmail.com>

        * lv.po: Updated Latvian Translation.

svn path=/trunk/; revision=3168
2007-04-05 06:50:57 +00:00
Elijah Newren
6753584e80 post-release bump to 2.19.2
2007-04-04  Elijah Newren  <newren gmail com>

        * configure.in: post-release bump to 2.19.2

svn path=/trunk/; revision=3167
2007-04-05 01:04:09 +00:00
Elijah Newren
9b85e7ee7f 2.19.1 release.
2007-04-04  Elijah Newren  <newren gmail com>

        * NEWS: 2.19.1 release.

svn path=/trunk/; revision=3165
2007-04-05 01:02:57 +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
b01dcaa338 Update. #412319.
2007-04-03  Elijah Newren  <newren gmail com>

	* MAINTAINERS: Update.  #412319.

svn path=/trunk/; revision=3153
2007-04-04 00:45:58 +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
930c7ea270 Um, fix the date in that last commit
svn path=/trunk/; revision=3146
2007-04-03 18:40:47 +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
Elijah Newren
e82ce26425 Fix Bruno's date typo
svn path=/trunk/; revision=3143
2007-04-03 02:35:33 +00:00
Alessio Frusciante
8a4c3c81a1 Fixed a typo in Italian translation.
svn path=/trunk/; revision=3142
2007-04-02 20:18:20 +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
Ihar Hrachyshka
55899b5ab7 be@latin.po: Added Belarusian Latin translation by Ales Navicki.
svn path=/trunk/; revision=3132
2007-03-30 19:33:23 +00:00
Priit Laes
5c06f103ca Updated Estonian translation by Ivar Smolin <okul@linux.ee>.
2007-03-29  Priit Laes  <plaes@svn.gnome.org>

	* et.po: Updated Estonian translation by Ivar Smolin <okul@linux.ee>.

svn path=/trunk/; revision=3128
2007-03-29 18:06:40 +00:00
Gabor Kelemen
e6b1bd9922 Translation updated.
2007-03-27  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated.


svn path=/trunk/; revision=3127
2007-03-27 11:14:02 +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
Elijah Newren
44ef3b3a51 bump version to 2.19.1; doesn't make sense to have the development version
2007-03-25  Elijah Newren  <newren gmail com>

	* configure.in: bump version to 2.19.1; doesn't make sense to have
	the development version have a version number less than the stable
	version.  ;-)

svn path=/trunk/; revision=3124
2007-03-26 01:31:11 +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
David Lodge
15d871023e Update en_GB translation
svn path=/trunk/; revision=3117
2007-03-15 07:00:54 +00:00
David Lodge
fc00da1099 Update en_GB translation
svn path=/trunk/; revision=3116
2007-03-15 07:00:35 +00:00
Jakub Friedl
db3d6725a2 Updated Czech translation.
2007-03-12  Jakub Friedl  <jfriedl@suse.cz>

  * cs.po: Updated Czech translation.


svn path=/trunk/; revision=3112
2007-03-12 14:16:22 +00:00
Goran Rakic
f94d12a991 Updated Serbian translation
svn path=/trunk/; revision=3110
2007-03-11 15:13:30 +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
Josep Puigdemont i Casamajó
dc9880ea7e Updated Catalan translation by Jordi Mallach.
svn path=/trunk/; revision=3106
2007-03-11 00:00:06 +00:00
Artur Flinta
7eb85e6e9c Updated Polish translation by GNOME PL Team.
2007-03-10  Artur Flinta  <aflinta@svn.gnome.org>

	* pl.po: Updated Polish translation by GNOME PL Team.


svn path=/trunk/; revision=3105
2007-03-10 18:53:11 +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
Nickolay V. Shmyrev
e179b813f4 Updated Russian translation.
2007-03-09  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>

	* ru.po: Updated Russian translation.



svn path=/trunk/; revision=3100
2007-03-09 20:24:53 +00:00
Artur Flinta
24a6a105e3 Updated Polish translation by GNOME PL Team.
2007-03-07  Artur Flinta  <aflinta@svn.gnome.org>

	* pl.po: Updated Polish translation by GNOME PL Team.


svn path=/trunk/; revision=3094
2007-03-06 23:36:05 +00:00
Takeshi AIHANA
9d6fed2aa0 Updated Japanese translation.
2007-03-06  Takeshi AIHANA <takeshi.aihana@gmail.com>

        * ja.po: Updated Japanese translation.

svn path=/trunk/; revision=3091
2007-03-06 14:31:32 +00:00
Jovan Naumovski
8090d192e3 2007-03-06 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation.
svn path=/trunk/; revision=3089
2007-03-06 11:27:44 +00:00
Vincent van Adrighem
36b9a3a974 Translation updated by Reinout van Schouwen.
2007-03-05  Vincent van Adrighem  <adrighem@gnome.org>

	* nl.po: Translation updated by Reinout van Schouwen.

svn path=/trunk/; revision=3086
2007-03-05 09:26:32 +00:00
Gintautas Miliauskas
f145337a8b Updated Lithuanian translation.
2007-03-04  Gintautas Miliauskas  <gintas@akl.lt>

	* lt.po: Updated Lithuanian translation.



svn path=/trunk/; revision=3085
2007-03-04 21:36:09 +00:00
Erdal Ronahi
0d7d821343 Updated Kurdish translation
svn path=/trunk/; revision=3084
2007-03-04 20:36:14 +00:00
Pema Geyleg
7211cc21c3 Updated Dzongkha Translation
svn path=/trunk/; revision=3083
2007-03-04 10:19:12 +00:00
Chao-Hsiung Liao
f4277e3235 Updated Traditional Chinese translation(Hong Kong). Updated Traditional
2007-03-04  Chao-Hsiung Liao  <j_h_liau@yahoo.com.tw>

	* zh_HK.po: Updated Traditional Chinese translation(Hong Kong).
	* zh_TW.po: Updated Traditional Chinese translation(Taiwan).


svn path=/trunk/; revision=3082
2007-03-04 03:31:43 +00:00
Leonardo Ferreira Fontenelle
47bb79adb2 Updated Brazilian Portuguese translation by Leonardo Ferreira Fontenelle
2007-03-02  Leonardo Ferreira Fontenelle  <leonardof@svn.gnome.org>

	* pt_BR.po: Updated Brazilian Portuguese translation by Leonardo
	Ferreira Fontenelle <leo.fontenelle@gmail.com> (me!) and Raul Pereira
	<contato@raulpereira.com>.

svn path=/trunk/; revision=3081
2007-03-02 20:52:10 +00:00
Gintautas Miliauskas
39a6707a06 Updated Lithuanian translation.
2007-02-27  Gintautas Miliauskas  <gintas@akl.lt>

	* lt.po: Updated Lithuanian translation.


svn path=/trunk/; revision=3080
2007-02-27 14:49:30 +00:00
Luca Ferretti
f6f968a545 Updated Italian translation.
2007-02-26  Luca Ferretti  <elle.uca@libero.it>

	* it.po: Updated Italian translation.


svn path=/trunk/; revision=3074
2007-02-26 12:51:34 +00:00
Gabor Kelemen
10ad03db76 Translation updated.
2007-02-25  Gabor Kelemen  <kelemeng@gnome.hu>

	* hu.po: Translation updated.

svn path=/trunk/; revision=3073
2007-02-25 14:30:54 +00:00
Amanpreet Singh Alam
ae441010b9 updating for Punjabi by alam
svn path=/trunk/; revision=3072
2007-02-25 14:19:52 +00:00
Raphael Higino
a877cbc80d Updated Brazilian Portuguese translation
svn path=/trunk/; revision=3071
2007-02-25 01:27:05 +00:00
Nguyen Thai Ngoc Duy
b40993fab9 updated vi.po
svn path=/trunk/; revision=3070
2007-02-24 11:35:20 +00:00
Kwok-Koon Cheung
b86d678c4c Help Funda Wang commit zh_CN translation
svn path=/trunk/; revision=3069
2007-02-22 04:18:31 +00:00
Maxim Dziumanenko
56b59faf87 Update Ukrainian translation.
2007-02-21 Maxim Dziumanenko <dziumanenko@gmail.com>

	* Update Ukrainian translation.


svn path=/trunk/; revision=3066
2007-02-21 09:19:51 +00:00
Artur Flinta
90e6198401 Updated Polish translation by GNOME PL Team.
2007-02-21  Artur Flinta  <aflinta@cvs.gnome.org>

	* pl.po: Updated Polish translation by GNOME PL Team.


svn path=/trunk/; revision=3065
2007-02-20 22:59:55 +00:00
Kjartan Maraas
cd748a2e97 Add MAINTAINERS to EXTRA_DIST so others can find out where to send
2007-02-20  Kjartan Maraas  <kmaraas@gnome.org>

	* Makefile.am: Add MAINTAINERS to EXTRA_DIST so others
	can find out where to send patches. Hi Linus :-)

svn path=/trunk/; revision=3064
2007-02-20 14:09:06 +00:00
Alexander Shopov
c73a198f94 Updated Bulgarian translation by Alexander Shopov <ash@contact.bg>
2007-02-20  Alexander Shopov  <ash@contact.bg>

	* bg.po: Updated Bulgarian translation by
	Alexander Shopov <ash@contact.bg>

svn path=/trunk/; revision=3063
2007-02-19 22:56:32 +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
Ilkka Tuohela
c1fcc4bb6b Updated Finnish translation
svn path=/trunk/; revision=3060
2007-02-16 17:01:57 +00:00
Changwoo Ryu
a850771e04 Updated Korean translation.
2007-02-15  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.

svn path=/trunk/; revision=3059
2007-02-15 06:18:57 +00:00
Duarte Loreto
6126940518 Updated Portuguese translation.
2007-02-15  Duarte Loreto <happyguy_pt@hotmail.com>

	* pt.po: Updated Portuguese translation.

svn path=/trunk/; revision=3058
2007-02-15 00:12:20 +00:00
Ilkka Tuohela
82267f5afb Updated Finnish translation
svn path=/trunk/; revision=3057
2007-02-14 12:24:56 +00:00
Changwoo Ryu
22e6c6f7c9 Updated Korean translation.
2007-02-09  Changwoo Ryu  <cwryu@debian.org>

	* ko.po: Updated Korean translation.

svn path=/trunk/; revision=3056
2007-02-08 21:51:03 +00:00
Stéphane Raimbault
fe75a334b1 Updated French translation by Robert-André Mauchin.
2007-01-31  Stéphane Raimbault  <stephane.raimbault@gmail.com>

        * fr.po: Updated French translation by Robert-André Mauchin.

svn path=/trunk/; revision=3055
2007-01-31 22:04:43 +00:00
Priit Laes
2774292561 Updated Estonian translation by Ivar Smolin <okul@linux.ee>.
2007-01-27  Priit Laes  <plaes@svn.gnome.org>

	* et.po: Updated Estonian translation by Ivar Smolin <okul@linux.ee>.

svn path=/trunk/; revision=3051
2007-01-27 16:02:54 +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
Jakub Friedl
2ee754ddaf Updated Czech translation.
2007-01-22  Jakub Friedl <jfriedl@suse.cz> 

  * cs.po: Updated Czech translation.


svn path=/trunk/; revision=3049
2007-01-23 12:10:56 +00:00
Hendrik Richter
f7a45f10ea Updated German translation.
2007-01-16  Hendrik Richter  <hendrikr@gnome.org>

	* de.po: Updated German translation.

svn path=/trunk/; revision=3048
2007-01-16 21:11:20 +00:00
Thomas James Alexander Thurman
9626780635 fix silly thinko.
* doc/compositor-control.txt: fix silly thinko.


svn path=/trunk/; revision=3047
2007-01-16 19:11:13 +00:00
Thomas James Alexander Thurman
e3249d6e1b post-release bump to 2.17.8.
* configure.in: post-release bump to 2.17.8.


svn path=/trunk/; revision=3046
2007-01-16 18:20:08 +00:00
116 changed files with 63216 additions and 38984 deletions

1009
ChangeLog

File diff suppressed because it is too large Load Diff

23
HACKING
View File

@@ -42,18 +42,17 @@ Minimal Building/Testing Environment
build a development version of Metacity -- odds are, you may be able
to build metacity from CVS without building any other modules.
As long as you have gtk+ >= 2.10 with your distro (gtk+ >= 2.6 if
you manually revert the change from bug 348633), you should be able
to install your distro's development packages (e.g. gtk2-devel,
GConf2-devel, startup-notification-devel on Fedora; also, remember
to install the gnome-common package which is needed for building cvs
versions of Gnome modules like Metacity) as well as the standard
development tools (gcc, autoconf, automake, pkg-config, intltool,
and libtool) and be ready to build and test Metacity. Steps to do
so:
As long as you have gtk+ >= 2.10 and GConf with your distro (gtk+ >=
2.6 if you manually revert the change from bug 348633), you should
be able to install your distro's development packages
(e.g. gtk2-devel, GConf2-devel, startup-notification-devel on
Fedora; also, remember to install the gnome-common package which is
needed for building cvs versions of Gnome modules like Metacity) as
well as the standard development tools (gcc, autoconf, automake,
pkg-config, intltool, and libtool) and be ready to build and test
Metacity. Steps to do so:
$ cvs -q -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome \
checkout metacity
$ svn checkout http://svn.gnome.org/svn/metacity/trunk metacity
$ cd metacity
$ ./autogen.sh --prefix /usr
$ make
@@ -183,7 +182,7 @@ Debugging information
To run metacity under valgrind, use options typical for any Gnome
program, such as
valgrind --logfile=metacity.log --tool=memcheck --num-callers=48 \
valgrind --log-file=metacity.log --tool=memcheck --num-callers=48 \
--leak-check=yes --leak-resolution=high --show-reachable=yes \
./src/metacity --replace
where, again, the backslashes mean to join all the stuff on the following

View File

@@ -1,14 +1,41 @@
Currently active maintainers
----------------------------
Havoc Pennington
E-mail: hp@redhat.com
--------------------------------
Elijah Newren
E-mail: newren@gmail.com
Email: newren gmail com
Userid: newren
Søren Sandmann
E-mail: sandmann@redhat.com
- Usually won't touch the theme bugs (isn't interested) or the
compositor (until open source nvidia drivers are up to snuff).
Tends to be most interested in libwnck/gtk interactions, focus
issues, constraints problems, and raising/stacking, but works on
just about anything other than themes and the compositor.
Thomas Thurman
E-mail: thomas@thurman.org.uk
Email: thomas thurman org uk
Userid: tthurman
- Responsible for all theme bugs and the compositor (thank goodness
Thomas got involved, eh?). I'm sure he'll replace this sentence
with his interests when he reads it. ;-)
Semi-active maintainers
--------------------------------
Havoc Pennington
Email: hp redhat com
Userid: hp
- Original author. Doesn't patch metacity anymore, but is active in
answering questions, responding to bugs, providing very helpful
suggestions and insight, and even assisting with debugging.
Important historical figureheads
--------------------------------
Rob Adams (readams readams net)
- Was the main maintainer of metacity for a while; particular areas
of focus included xinerama, placement, and an older version of the
constraints code. Still responds to bugs every once in a while.
Søren Sandmann (sandmann redhat com)
- Wrote most of the current compositing manager code + libcm

View File

@@ -1,7 +1,7 @@
SUBDIRS=src po doc
EXTRA_DIST=HACKING rationales.txt \
EXTRA_DIST = HACKING MAINTAINERS rationales.txt \
intltool-extract.in intltool-merge.in intltool-update.in
DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache

306
NEWS
View File

@@ -1,13 +1,304 @@
2.21.5
======
Thanks to Iain Holmes and Thomas Thurman for improvements in this version.
This contains the new compositor; downstream maintainers should note that
its GConf key is initially turned off in src/metacity.schemas.in and consider
whether to turn it on by default in their packages.
- merge compositor branch! (Iain) (499081)
- print "Subversion" and not "CVS" when building (Thomas)
Translations
Jorge González (es), Kjartan Maraas (nb), Daniel Nylander (sv)
2.21.3
======
Thanks to Matthias Clasen, Martin Meyer, Kjartan Maraas, Thomas Thurman,
and Lucas Rocha for improvements in this version.
- remove dead code (pointed out by Kjartan) (501365)
- rewrote long key binding description for the sake of
the translators (Thomas) (474889)
- check for null before adding menu (Matthias) (496054)
- let keys which end a grab also begin a grab (Thomas) (112560)
- check the right variable in theme sanity check (Martin) (501362)
- get session ID from environment if it's not passed in on the command
line (Lucas) (498033)
Translations
Ihar Hrachyshka (be@latin), Petr Kovar (cs), Jorge González (es),
Ignacio Casal Quinteiro (gl), Rodrigo Flores (pt_BR), Pavol Šimo (sk),
Matej Urbančič (sl)
2.21.2
======
Thanks to Benjamin Gramlich, Thomas Thurman, and Peter Bloomfield
for improvements in this release.
- Theme parser is compliant to XDG Base Directory Specification
in searching for theme files. (Benjamin) (#480026)
- Some source files which didn't get used were removed (Thomas)
(#496947)
- Fullscreen and maximise windows don't try to save their position
(Peter) (#461927)
Translations
Matej Urbančič (sl)
2.21.1
======
Thanks to Elijah Newren, Alex R.M. Turner, Peter Bloomfield, Iain Holmes,
Jans Granseuer, Federico Mena Quintero and Thomas Thurman for improvements
in this release.
- Add --sync option, like all other GTK apps (Iain)
- Don't save window's position if it's maximised (Peter) (#461927)
- Memory leak fix in preview (Jans) (#469682)
- Truncate tab popup string correctly, and refactor function (Alex)
- Windows which pop up under always-on-top windows don't get the
focus, but do get the "needs attention" hint (Thomas) (#486445)
- Fix error in function call which caused focus problems (Federico)
(partial fix of #488468)
Translations
Djihed Afifi (ar), Metin Amiroff (az), Alexander Shopov (bg),
Jordi Mallach (ca), David Lodge (en_GB), Jorge González (es),
Iñaki Larrañaga Murgoitio (eu), Vincent Untz (fr), Alastair McKinstry (ga),
Ankit Patel (gu), Rajesh Ranjan (hi), auto (hr), Changwoo Ryu (ko),
Raivis Dejus (lv), Wouter Bolsterlee (nl), Gora Mohanty (or),
ASB (pa), wadim dziedzic (pl), Duarte Loreto (pt),
Og Maciel (pt_BR), Peter Tuhársky (sk), Matej Urbančič (sl),
Daniel Nylander (sv), Maxim Dziumanenko (uk), Funda Wang (zh_CN)
2.20.0
======
Thanks to Alexey Rusakov for the fix in this release.
- prevent a crash on logout with metacity subsequently not being
restored in future sessions (Alexey) [#433253]
Translations
Khaled Hosny (ar), Ihar Hrachyshka (be@latin), Ask Hjorth Larsen (da),
Adam Weinberger (en_CA), Iñaki Larrañaga Murgoitio (eu), Ilkka
Tuohela (fi), Vincent Untz (fr), Ankit Patel (gu), Gabor Kelemen (hu),
Luca Ferretti (it), Takeshi AIHANA (ja), Žygimantas Beručka (lt), Jovan
Naumovski (mk), Ani Peter (ml), Og Maciel (pt_BR), Duarte Loreto (pt),
Mugurel Tudor (ro), Nickolay V. Shmyrev (ru), Peter Tuhársky (sk), Горан
Ракић (sr), Daniel Nylander (sv), Dr.T.Vasudevan (ta), Maxim
Dziumanenko (uk), Clytie Siddall (vi)
2.19.55
=======
Thanks to Frederic Crozat, Matthias Clasen, and Thomas Thurman for improvements
in this release.
- Noninteger auto-raise delay is not assumed to be zero (Thomas) (#377491)
- Fix mangled window title in "Force Quit" (Frederic) (#462734)
- "Close" can appear at any point in the window menu, and now appears
at the bottom (Thomas) (#104026)
- Windows which are always on top have "stick" insensitive (Thomas) (#460997)
- All bitfields in window structure are together for optimisation (Thomas)
(#450271)
- Use the correct directory when installing keybindings (Matthias) (#454055)
Translations
Alexander Shopov (bg), Jorge González (es), Iñaki Larrañaga Murgoitio (eu),
Ilkka Tuohela (fi), Theppitak Karoonboonyanan (th)
2.19.34
=======
Thanks to Rob Bradford, Cosimo Cecchi, Yair Hershkovitz and Thomas Thurman
for improvements in this release.
- Fix a bug where the window can be focused without being raised
if the maximize is aborted. (Rob) [#459027]
- Unset fullscreen is an allowed action where relevant. (Cosimo) [#449427]
- Reverse window buttons and align them to the left for RTL locales.
(Yair) [#92212]
- Put all bitfields in window data together to help with optimisation.
(Thomas) [#450271]
Translations
Jorge Gonzalez (es), Ilkka Tyohela (fi), Gabor Kelemen (hu),
Takeshi AIHANA (ja), Kjartan Maraas (nb), Vincent van Adrighem (nl),
Daniel Nylander (sv), Theppitak Karoonbooyana (th),
Nguyễn Thái Ngọc Duy (vi)
2.19.21
=======
Thanks to Damien Carbery and Thomas Thurman for improvements in
this release.
- Fixed build on Solaris (Damien) [#397296, #446535]
- Only activate windows which change their startup ID if the
new ID differs from the old. (This fixes the bug where KDE
apps gained the attention hint when switching workspaces.)
(Thomas) [#400167]
- Open new windows on the current xinerama. (Thomas) [#145503].
Translations
Tshewang Norbu (dz), Jorge González (es), Funda Wang (zh_CN)
2.19.13
=======
Thanks to Elijah Newren and Thomas Thurman for improvements in
this release.
- Updated the description of raise_on_click (Elijah) [#445447,
#389923]
- Refactor queueing code in window.c (Thomas) [#376760]
- Added switch_group to the keybindings file (Thomas) [#444879]
- New window information accessor function (Thomas) [#377495]
2.19.8
======
Thanks to Linus Torvalds, Yair Hershkovitz and Thomas Thurman for
improvements in this release.
- Lots of fixups for various alignments in RTL locales (Yair)
[#387893]
- Add code to configure what happens on right or middle click
of titlebar (Linus) [#408904]
- Fix layout for titlebars with mixed LTR/RTL scripts (Thomas)
[#433400]
- Fix window menu layout for RTL scripts (Thomas) [#433400]
Translations
Khaled Hosny (ar), Ihar Hrachyshka (be@latin), Jovan Naumovski (mk),
Theppitak Karoonboonyanan (th)
[ Apologies to these translators who didn't get credited in the
version of 2.19.8 that shipped. ]
2.19.5
======
- Prevent metacity from "forgetting" which machine a window is on
(Elijah) [#418552]
- Prevent nasty flickering an placement problem introduced in
metacity 2.19.2 (Elijah) [fix side-effect of change in #426519]
- Fix some uninitialized memory usage errors (Elijah) [#427385]
Translations
David Lodge (en_GB), Jorge González (es), Ignacio Casal Quinteiro (gl),
Daniel Nylander (sv)
2.19.3
======
Thanks to Magnus Therning, Elijah Newren, Thomas Thurman, and Bruno
Boaventura for improvements in this release.
- Add support for _NET_MOVERESIZE_WINDOW (Magnus, Elijah) [#344521]
- EWMH compliance: set _NET_WM_ALLOWED_ACTIONS so that pagers know
which actions we support (Elijah) [#115247]
- Fix crash with apps trying to open an insanely huge window
(Thomas) [#399529]
- Fix temporary hang/pause with libXt by making sure apps get a
ConfigureNotify on unmap (Elijah) [#399552]
- do not auto-maximize windows larger than the workarea in only a
single direction (Elijah) [#419810]
- Don't show the current workspace as a possible workspace to switch
to (Bruno) [#426791]
- Preserve stacking order across restarts (Elijah)
Translations
Khaled Hosny (ar), Kjartan Maraas (nb)
2.19.2
======
Thanks to Bastien Nocera, Thomas Thurman, and Elijah Newren for
improvements in this release.
- Add new control-center key bindings definitions (Bastien) [#420145]
- Prevent metacity from crashing when trying to use invalid themes
(Thomas) [#423855]
- Fix invalid free causing crash on metacity close introduced in
2.19.1 (Elijah) [#427385]
- Add special keybinding just for debugging spew marks, unbound and
not even listed in schemas (Elijah)
- Fix move/resize events in relation to combinations of
ConfigureRequest and WM_NORMAL_HINTS change notifications (Elijah)
[#426519]
- Remove what we believe to be an ancient attempt at working around
sloppy/mouse focus bugs that we believe have since been correctly
fixed. May fix some ugly race conditions. May also cause nasty
bugs in sloppy/mouse focus modes. Only one way to find
out... (Elijah) [#304430]
Translations
Raivis Dejus (lv)
2.19.1
======
Thanks to Jaap Haitsma, Linus Torvalds, Charlie Brej, Kjartan Maraas,
Arthur Taylor, Elijah Newren, Josselin Mouette, Havoc Pennington,
Benjamin Berg, and Carlo Wood for improvements in this release.
- new icon for the force-quit dialog (Jaap) [#396655]
- add configureable mouse click action abilities, and clean up lots of
related code (Linus) [#408899, #408902, others]
- add schemeas for middle and right click titlebar actions (Charlie)
[#408903]
- remove pango/pangox.h include since it's not needed and not
installed anymore (Kjartan)
- adjust rounded corners so that they fit nicely with the arcs
around them (Arthur) [#399373]
- fix session hang when metacity .sm file is missing (Josselin)
[#407981]
- add support for _NET_WM_USER_TIME_WINDOW in order to cut down on
context switches (Elijah, Havoc) [#354213]
- prevent nasty metacity/gdk interactions causing hangs with gtk
trunk (Elijah) [offshoots of #354213]
- fix button middle fallback and the prelight state (Benjamin) [#419043]
- Lots of code cleanup for the strut lists (Elijah)
- fix handling of unidirectional maximization and partial struts +
some miscellaneous cleanups (Carlo) [#358311]
- avoid some crashes when dragging windows partially offscreen
(Elijah) [#353513]
- avoid mousenav vs. keynav focus problems with the run application
dialog in mouse/sloppy focus modes (Elijah) [#374752]
- _NET_ACTIVE_WINDOW property on the root window should be a single
xwindow id, not two (Elijah)
- Fix unidirection unmaximization causing jumps (Elijah) [#355497]
- fix unfullscreening and unmaximizing with size increment/size
constraint windows (such as gnome-terminal) possibly not returning
to their "original position" (Elijah) [#329152]
- fix some issues with min/max and size increment constraints
(Elijah) [#418395]
- send synthetic configure notify events in response to appropriate
MapRequest events too (Elijah) [#322840]
Translations
Ihar Hrachyshka (be@latin), Jordi Mallach (ca), Jakub Friedl (cs),
norbu (dz), David Lodge (en_GB), Ivar Smolin (et), Gabor Kelemen (hu),
Luca Ferretti (it), Takeshi AIHANA (ja), Erdal Ronahi (ku), Gintautas
Miliauskas (lt), Jovan Naumovski (mk), Kjartan Maraas (nb), Reinout van
Schouwen (nl), wadim dziedzic (pl), raulpereira (pt_BR), Nickolay V.
Shmyrev (ru), Горан Ракић (sr), Woodman Tuen (zh_HK), Woodman Tuen (zh_TW)
2.17.5
======
Thanks to Bruno Boaventura, Mad Alex, and Thomas Thurman for
improvements in this release.
- make window menu arrangement more sensible. (#382962, Bruno)
- make window menu arrangement more sensible. (Bruno) [#382962]
- unmaximise button keeps pressed appearance when moved off and
back. (#395560, Alex)
- fix a couple of compositor crashes (#387761, Thomas)
back. (Alex) [#395560]
- fix a couple of compositor crashes (Thomas) [#387761]
- new environment variables checked if the compositor is enabled;
see the new file doc/compositor-control.txt for details. (Thomas)
@@ -19,14 +310,15 @@ Translations
2.17.3
======
Thanks to Christof Krüger, Federico Mena Quintero, Bruno Boaventura,
and Björn Lindqvist for improvements in this release.
- fix longstanding problem about windows flickering in and out of
maximised state when dragging between xineramas (#358715) (Christof)
- grab server when switching workspaces (#381127) (Federico)
maximised state when dragging between xineramas (Christof) [#358715]
- grab server when switching workspaces (Federico) [#381127]
- replace changing text on window menu with pairs of radio buttons
and checkboxes (#343108) (Bruno, Björn)
and checkboxes (Bruno, Björn) [#343108]
Translations
Kjartan Maraas (nb), Jakub Friedl (cs), Yuval Tanny (he), Ivar Smolin (et),
@@ -39,7 +331,7 @@ Thanks to Priit Laes, Bruno Boaventura, Kjartan Maraas, Justin Mason,
Elijah Newren and Dan Mick for improvements in this release.
- implement handle_move_to_{side|corner}_* to allow the user to flip a
window to the side or corner of the screen. (Justin) [#317884]
window to the side or corner of the screen. (Justin) [#317884]
- fix strict focus mode by picking up on res_class (Dan) [#361054]
- remove deprecated gtk stuff (Priit, Bruno)
- string fixes (Kjartan) [#363354, #363355]

View File

@@ -1,7 +1,7 @@
AC_PREREQ(2.50)
m4_define([metacity_major_version], [2])
m4_define([metacity_minor_version], [17])
m4_define([metacity_minor_version], [21])
# Fibonacci sequence for micro version numbering:
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
m4_define([metacity_micro_version], [5])
@@ -176,6 +176,10 @@ else
AC_MSG_ERROR("Pango 1.2.0 or greater based on Xft2 is required")
fi
# Unconditionally use this dir to avoid a circular dep with gnomecc
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
AC_SUBST(GNOME_KEYBINDINGS_KEYSDIR)
STARTUP_NOTIFICATION_VERSION=0.7
AC_MSG_CHECKING([Startup notification library >= $STARTUP_NOTIFICATION_VERSION])
if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_VERSION libstartup-notification-1.0; then
@@ -219,15 +223,15 @@ if test x$enable_compositor = xyes; then
have_xcomposite=yes
echo "CompositeExt support forced on"
elif test x$enable_compositor = xauto; then
echo "Not building compositing manager by default now, must enable explicitly to get it. And it doesn't work, so don't bother unless you want to hack on it..."
have_xcomposite=no
echo "Building compositing manager by default now."
have_xcomposite=yes
else
have_xcomposite=no
fi
if test x$have_xcomposite = xyes; then
echo "Building with CompositeExt"
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage cm"
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
## force on render also
@@ -473,6 +477,12 @@ else
GCONF_SCHEMAS_INSTALL_FALSE=
fi
AC_ARG_ENABLE(debug,
[ --enable-debug enable debugging],,
enable_debug=no)
if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -g -O -Wall"
fi
AC_CONFIG_FILES([
Makefile
doc/Makefile
@@ -528,7 +538,7 @@ if test $(( $(echo $METACITY_MINOR_VERSION) %2)) == "1"; then
stable_version=$(( ($METACITY_MINOR_VERSION / 2) * 2))
echo "This is the UNSTABLE branch of metacity"
echo -n "Use 2.$stable_version.x for stable "
echo "(gnome-2-$stable_version branch in CVS)"
echo "(gnome-2-$stable_version branch in Subversion)"
else
echo "This is the stable branch of metacity"
fi

View File

@@ -1,5 +1,5 @@
The compositor is the box of tricks inside the window manager which performs
special effects on the windows on your screen. Metacity's window manager is
special effects on the windows on your screen. Metacity's compositor is
under development. Your help is requested in finding and fixing bugs. This
document tells you how to configure Metacity so that you can use compositing.

View File

@@ -21,7 +21,6 @@ Focus method Invariant
sloppy If the mouse is in a window, then it is focused; if the
mouse is not in a window, then the most recently used
window is focused.
mouse If the mouse is in a non-DESKTOP window, then it is focused;
otherwise, the designated "no_focus_window" is focused
@@ -36,7 +35,6 @@ Focus method Behavior
on top)
sloppy Focus the window containing the pointer if there is such
a window, otherwise focus the most recently used window.
mouse Focus the non-DESKTOP window containing the pointer if
there is one, otherwise focus the designated
"no_focus_window".
@@ -66,9 +64,9 @@ cases in which a new window shouldn't be focused:
To handle these cases, Metacity compares timestamps of the event that
caused the launch and the timestamp of the last interaction with the
focused window. (Case 2 is handled by providing a special timestamp
of 0 for the launch time, which ensures that the window that appears
doesn't get focus)
focused window. (Case 2 is handled by the application providing a
special timestamp of 0 for the launch time, which ensures that the
window that appears doesn't get focus)
If the newly launched window isn't focused, some things should be done
to alert the user that there is a window to work with:
@@ -88,10 +86,10 @@ attempt to handle the INHERENTLY CONFLICTING CONSTRAINTS. Metacity does
this by having a mouse_mode boolean used to determine which of the two
sets of invariants holds. This mode is set according to which method was
most recently used to choose a focus window:
1) When receiving EnterNotify/LeaveNotify events from mouse movement, set
1) When receiving EnterNotify events from mouse movement, set
mouse_mode to TRUE.
2) When using keynav to choose a focus window (e.g. alt-tab, alt-esc,
move-window-to-workspace keybindings), set mouse_mode to FALSE.
alt-f2, move-window-to-workspace keybindings), set mouse_mode to FALSE.
3) When handling events that don't choose a focus window but rather need
a focus_window chosen for them (e.g. switch-to-workspace keybindings),
don't change the mouse_mode and just use the current value.

View File

@@ -1,4 +1,535 @@
2007-01-15 Djihed Afifi <djihed@gmail.com>
2007-12-19 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2007-12-19 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation.
2007-12-17 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2007-12-15 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2007-12-10 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation, fixes bug #500562 and bug #500831
2007-12-10 Matej Urbančič <mateju@svn.gnome.org>
* sl.po: Updated Slovenian Translation.
2007-12-10 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation, fixes bug #500831
2007-12-09 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation, fixes bug #500562
2007-12-08 Jakub Friedl <jfriedl@suse.cz>
* cs.po: Czech Translation updated by Petr Kovar.
2007-12-08 Ihar Hrachyshka <booxter@lacinka.org>
* be@latin.po: Updated Belarusian Latin translation.
2007-12-08 Leonardo Ferreira Fontenelle <leonardof@svn.gnome.org>
* pt_BR.po: Fixes in Brazilian Portuguese translation by Luiz Armesto.
2007-12-07 Leonardo Ferreira Fontenelle <leonardof@svn.gnome.org>
* pt_BR.po: Fixed attributes in Brazilian Portuguese translation by
Rodrigo Flores.
2007-12-02 Marcel Telka <marcel@telka.sk>
* sk.po: Updated Slovak translation by Pavol Šimo.
2007-11-28 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
* gl.po: Updated Galician Translation.
2007-11-12 Matej Urbančič <mateju@svn.gnome.org>
* sl.po: Updated Slovenian translation.
2007-11-08 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2007-11-01 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2007-10-25 Matej Urbančič <mateju@svn.gnome.org>
* sl.po: Updated Slovenian translation.
2007-10-23 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Djihed Afifi.
2007-10-21 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Djihed Afifi.
2007-09-30 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Fixed French translation.
2007-09-27 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation.
2007-09-25 Gil Forcada <gforcada@svn.gnome.org>
* ca.po: Fixed a string in Catalan translation thanks to Sílvia Miranda.
2007-09-21 Gil Forcada <gforcada@svn.gnome.org>
* ca.po: Updated Catalan translation by Joan Duran.
2007-09-17 Artur Flinta <aflinta@svn.gnome.org>
* pl.po: Updated Polish translation by GNOME PL Team.
2007-09-17 Alexander Shopov <ash@contact.bg>
* bg.po: Updated Bulgarian translation by
Alexander Shopov <ash@contact.bg>
2007-09-17 Wouter Bolsterlee <wbolster@svn.gnome.org>
* nl.po: Translation updated by Wouter Bolsterlee.
2007-09-17 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Djihed Afifi.
2007-09-16 Gil Forcada <gforcada@svn.gnome.org>
* ca.po: Updated Catalan translation.
2007-09-16 Takeshi AIHANA <takeshi.aihana@gmail.com>
* ja.po: Translation improved.
2007-09-16 Mugurel Tudor <mugurelu@gnome.ro>
* ro.po: Updated Romanian translation
2007-09-15 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* ru.po: Updated Russian translation.
2007-09-15 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Fixed French translation by Vincent Untz and Stéphane
Raimbault.
2007-09-15 Andre Klapper <a9016009@gmx.de>
* sk.po: Updated Slovak translation on behalf of Peter Tuharsky
<tuharsky@misbb.sk>.
2007-09-14 Clytie Siddall <clytie@riverland.net.au>
* vi.po: Updated Vietnamese translation.
2007-09-14 Luca Ferretti <elle.uca@libero.it>
* it.po: Updated Italian translation.
2007-09-13 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Khaled Hosny.
2007-09-14 Gabor Kelemen <kelemeng@gnome.hu>
* hu.po: Translation updated.
2007-09-13 Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
* be@latin.po: Updated Belarusian Latin translation.
2007-09-12 Maxim Dziumanenko <dziumanenko@gmail.com>
* uk.po: Update Ukrainian translation.
2007-09-12 Goran Rakić <grakic@devbase.net>
* sr.po, sr@Latn.po: Updated Serbian translation.
2007-09-09 Kenneth Nielsen <k.nielsen81@gmail.com>
* da.po: Updated Danish translation
2007-09-08 Inaki Larranaga Murgoitio <dooteo@zundan.com>
* eu.po: Fixed some typos in Basque translation.
2007-09-05 Jovan Naumovski <jovan@lugola.net>
* mk.po: Updated Macedonian translation.
2007-09-03 Clytie Siddall <clytie@riverland.net.au>
* vi.po: Updated Vietnamese translation.
2007-09-03 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
2007-09-03 Jovan Naumovski <jovan@lugola.net>
* mk.po: Updated Macedonian translation.
2007-09-01 Jovan Naumovski <jovan@lugola.net>
* mk.po: Updated Macedonian translation.
2007-09-01 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Updated French translation.
2007-08-30 Ani Peter <peter.ani@gmail.com>
* ml.po: Updated Malayalam Translation
2007-08-29 I. Felix <ifelix@svn.gnome.org>
* ta.po: Tamil Translation updated by Tirumurthi Vasudevan
2007-08-26 Raphael Higino <raphaelh@svn.gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation
by Og Maciel <ogmaciel@ubuntu.com>.
2007-08-15 Adam Weinberger <adamw@gnome.org>
* en_CA.po: Updated Canadian English translation.
2007-08-13 Takeshi AIHANA <takeshi.aihana@gmail.com>
* ja.po: Updated Japanese translation.
2007-08-13 Žygimantas Beručka <zygis@gnome.org>
* lt.po: Updated Lithuanian translation.
2007-08-11 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2007-08-10 I. Felix <ifelix@svn.gnome.org>
* ta.po: Tamil Translation updated by Tirumurthi Vasudevan
2007-08-10 Ankit Patel <ankit644@yahoo.com>
* gu.po: Updated Gujarati Translation.
2007-08-09 Ilkka Tuohela <hile@iki.fi>
* fi.po: Updated Finnish translation.
2007-08-08 Ankit Patel <ankit644@yahoo.com>
* gu.po: Updated Gujarati Translation.
2007-08-07 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2007-08-07 Theppitak Karoonboonyanan <thep@linux.thai.net>
* th.po: Updated Thai translation.
2007-08-06 Ilkka Tuohela <hile@iki.fi>
* fi.po: Updated Finnish translation.
2007-08-05 Inaki Laranaga Murgoitio <dooteo@zundan.com>
* eu.po: Updated Basque translation.
2007-07-25 Alexander Shopov <ash@contact.bg>
* bg.po: Updated Bulgarian translation by
Alexander Shopov <ash@contact.bg>
2007-07-21 Gabor Kelemen <kelemeng@gnome.hu>
* hu.po: Translation updated.
2007-07-18 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Translation updated.
2007-07-17 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2007-07-16 Ilkka Tuohela <hile@iki.fi>
* fi.po: Updated Finnish translation.
2007-07-10 Theppitak Karoonboonyanan <thep@linux.thai.net>
* th.po: Updated Thai translation.
2007-07-08 Takeshi AIHANA <takeshi.aihana@gmail.com>
* ja.po: Updated Japanese translation.
2007-07-02 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
* vi.po: Updated Vietnamese translation.
2007-06-27 Clytie Siddall <clytie@riverland.net.au>
* vi.po: Updated Vietnamese translation.
2007-06-25 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2007-06-24 Kjartan Maraas <kmaraas@gnome.org>
* POTFILES.in: Add src/core.c
* nb.po: Updated Norwegian bokmål translation.
2007-06-19 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2007-06-16 Funda Wang <fundawang@gmail.com>
* zh_CN.po: Updated Simplified Chinese translation
2007-06-15 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation
2007-06-13 Pema Geyleg <pema.geyleg@gmail.com>
* dz.po: Updated dzongkha translation
2007-05-18 Theppitak Karoonboonyanan <thep@linux.thai.net>
* th.po: Updated Thai translation.
2007-05-09 Jovan Naumovski <jovan@lugola.net>
* mk.po: Updated Macedonian translation.
2007-05-2 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Khaled Hosny.
2007-04-24 Ihar Hrachyshka <iharh@gnome.org>
* be@latin.po: Updated Belarusian Latin translation.
2007-04-23 David Lodge <dave@cirt.net>
* en_GB.po: Updated British English translation
2007-04-22 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
* gl.po: Updated Galician Translation.
2007-04-22 Jorge Gonzalez <jorgegonz@svn.gnome.org>
* es.po: Updated Spanish translation.
2007-04-21 Daniel Nylander <po@danielnylander.se>
* sv.po: Updated Swedish translation.
2007-04-14 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Khaled Hosny.
2007-04-10 Kjartan Maraas <kmaraas@gnome.org>
* nb.po: Updated Norwegian bokmål translation.
2007-04-05 Bastien Nocera <hadess@hadess.net>
* POTFILES.in: add the XML keys definitions to the list
2007-04-05 Raivis Dejus <orvils@gmail.com>
* lv.po: Updated Latvian Translation.
2007-04-02 Alessio Frusciante <algol@firenze.linux.it>
* it.po: Fixed a typo in translation. Closes #420494.
2007-03-30 Ihar Hrachyshka <iharh@gnome.org>
* be@latin.po: Added Belarusian Latin translation by Ales Navicki.
2007-03-29 Priit Laes <plaes@svn.gnome.org>
* et.po: Updated Estonian translation by Ivar Smolin <okul@linux.ee>.
2007-03-27 Gabor Kelemen <kelemeng@gnome.hu>
* hu.po: Translation updated.
2007-03-17 Kjartan Maraas <kmaraas@gnome.org>
reviewed by: <delete if not using a buddy>
* nb.po:
2007-03-14 David Lodge <dave@cirt.net>
* en_GB.po: Updated English (British) translation
2007-03-12 Jakub Friedl <jfriedl@suse.cz>
* cs.po: Updated Czech translation.
2007-03-11 Goran Rakić <grakic@devbase.net>
* sr.po, sr@Latn.po: Updated Serbian translation.
2007-03-11 Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>
* ca.po: Updated Catalan translation by
Jordi Mallach <jodri@sindominio.net>.
2007-03-10 Artur Flinta <aflinta@svn.gnome.org>
* pl.po: Updated Polish translation by GNOME PL Team.
2007-03-09 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
* ru.po: Updated Russian translation.
2007-03-07 Artur Flinta <aflinta@svn.gnome.org>
* pl.po: Updated Polish translation by GNOME PL Team.
2007-03-06 Takeshi AIHANA <takeshi.aihana@gmail.com>
* ja.po: Updated Japanese translation.
2007-03-06 Jovan Naumovski <jovan@lugola.net>
* mk.po: Updated Macedonian translation.
2007-03-05 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Translation updated by Reinout van Schouwen.
2007-03-04 Gintautas Miliauskas <gintas@akl.lt>
* lt.po: Updated Lithuanian translation.
2007-03-04 Erdal Ronahi <erdal dot ronahi at gmail dot com>
* ku.po: Updated Kurdish translations
2007-03-04 Pema Geyleg <pema.geyleg@gmail.com>
* dz.po: Updated Dzongkha Translation.
2007-03-04 Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
* zh_HK.po: Updated Traditional Chinese translation(Hong Kong).
* zh_TW.po: Updated Traditional Chinese translation(Taiwan).
2007-03-02 Leonardo Ferreira Fontenelle <leonardof@svn.gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation by Leonardo
Ferreira Fontenelle <leo.fontenelle@gmail.com> (me!) and Raul Pereira
<contato@raulpereira.com>.
2007-02-27 Gintautas Miliauskas <gintas@akl.lt>
* lt.po: Updated Lithuanian translation.
2007-02-26 Luca Ferretti <elle.uca@libero.it>
* it.po: Updated Italian translation.
2007-02-25 Gabor Kelemen <kelemeng@gnome.hu>
* hu.po: Translation updated.
2007-02-24 Raphael Higino <raphaelh@svn.gnome.org>
* pt_BR.po: Updated Brazilian Portuguese translation.
2007-02-24 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
* vi.po: Updated Vietnamese translation.
2007-02-22 Abel Cheung <abelcheung@gmail.com>
* zh_CN.po: Updated simplified Chinese translation on behalf of
Funda Wang.
2007-02-21 Maxim Dziumanenko <dziumanenko@gmail.com>
* uk.po: Update Ukrainian translation.
2007-02-21 Artur Flinta <aflinta@cvs.gnome.org>
* pl.po: Updated Polish translation by GNOME PL Team.
2007-02-20 Alexander Shopov <ash@contact.bg>
* bg.po: Updated Bulgarian translation by
Alexander Shopov <ash@contact.bg>
2007-02-16 Ilkka Tuohela <hile@iki.fi>
* fi.po: Updated Finnish translation.
2007-02-15 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation.
2007-02-15 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
2007-02-14 Ilkka Tuohela <hile@iki.fi>
* fi.po: Updated Finnish translation.
2007-02-09 Changwoo Ryu <cwryu@debian.org>
* ko.po: Updated Korean translation.
2007-01-31 Stéphane Raimbault <stephane.raimbault@gmail.com>
* fr.po: Updated French translation by Robert-André Mauchin.
2007-01-27 Priit Laes <plaes@svn.gnome.org>
* et.po: Updated Estonian translation by Ivar Smolin <okul@linux.ee>.
2007-01-22 Jakub Friedl <jfriedl@suse.cz>
* cs.po: Updated Czech translation.
2007-01-16 Hendrik Richter <hendrikr@gnome.org>
* de.po: Updated German translation.
2007-01-15 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Khaled Hosny.
@@ -6,11 +537,11 @@
* sv.po: Updated Swedish translation.
2007-01-05 Jakub Friedl <jfriedl@suse.cz>
2007-01-05 Jakub Friedl <jfriedl@suse.cz>
* cs.po: Updated Czech translation.
2007-01-3 Djihed Afifi <djihed@gmail.com>
2007-01-3 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation by Djihed Afifi.
@@ -26,11 +557,11 @@
* th.po: Updated Thai translation.
2006-12-27 Djihed Afifi <djihed@gmail.com>
2006-12-27 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation.
2006-12-24 Djihed Afifi <djihed@gmail.com>
2006-12-24 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation.
@@ -42,7 +573,7 @@
* nb.po: Updated Norwegian bokmål translation.
2006-12-18 Djihed Afifi <djihed@gmail.com>
2006-12-18 Djihed Afifi <djihed@gmail.com>
* ar.po: Updated Arabic Translation.
@@ -163,7 +694,7 @@
2006-09-13 Ilkka Tuohela <hile@iki.fi>
* fi.po: Updated Finnish translation.
- concistency fixes with libwnck
- concistency fixes with libwnck
2006-09-13 Rajesh Ranjan <rajeshkajha@yahoo.com>
@@ -411,7 +942,7 @@
2006-04-26 Gora Mohanty <gmohanty@cvs.gnome.org>
* lv.po: Updated Latvian translation by Raivis Dejus <orvils@gmail.com>
* lv.po: Updated Latvian translation by Raivis Dejus <orvils@gmail.com>
2006-04-21 Theppitak Karoonboonyanan <thep@linux.thai.net>
@@ -419,11 +950,11 @@
2006-04-20 Ankit Patel <ankit644@yahoo.com>
* gu.po: Updated Gujarati Translation.
* gu.po: Updated Gujarati Translation.
2006-04-19 Ankit Patel <ankit644@yahoo.com>
* gu.po: Updated Gujarati Translation.
* gu.po: Updated Gujarati Translation.
2006-04-17 Clytie Siddall <clytie@riverland.net.au>
@@ -612,7 +1143,7 @@
2006-03-03 Maxim Dziumanenko <mvd@mylinux.ua>
* uk.po: Updated Ukrainian translation.
* uk.po: Updated Ukrainian translation.
2006-03-02 Hendrik Richter <hendrikr@gnome.org>
@@ -1191,7 +1722,7 @@
* xh.po: Updated Xhosa translation.
2005-04-28 Kostas Papadimas <pkst@gnome.org>
2005-04-28 Kostas Papadimas <pkst@gnome.org>
* el.po: Updated Greek translation
@@ -1371,7 +1902,7 @@
2005-02-07 David Lodge <dave@cirt.net>
* en_GB.po: Updated British translation.
* en_GB.po: Updated British translation.
2005-02-06 Adam Weinberger <adamw@gnome.org>
@@ -1581,7 +2112,7 @@
2004-09-14 Gora Mohanty <gmohanty@cvs.gnome.org>
* or.po: Updated Oriya translation.
* or.po: Updated Oriya translation.
2004-09-12 Paisa Seeluangsawat <paisa@users.sf.net>
@@ -1777,7 +2308,7 @@
2004-07-21 Guntupalli Karunakar <karunakar@freedomink.org>
* hi.po: Updated Hindi translation.
* hi.po: Updated Hindi translation.
2004-07-14 Christian Rose <menthos@menthos.com>
@@ -1850,8 +2381,8 @@
2004-04-09 Guntupalli Karunakar <karunakar@freedomink.org>
* gu.po: Added Gujurati translation by
Gujarati Team <magnet@magnet-i.com>.
* gu.po: Added Gujurati translation by
Gujarati Team <magnet@magnet-i.com>.
2004-04-06 Mohammad DAMT <mdamt@bisnisweb.com>
@@ -1871,8 +2402,8 @@
2004-03-24 Guntupalli Karunakar <karunakar@freedomink.org>
* pa.po: Added Punjabi translation by
Jaswinder Singh Phulewala <jaswinderlinux@netscape.net>.
* pa.po: Added Punjabi translation by
Jaswinder Singh Phulewala <jaswinderlinux@netscape.net>.
2004-03-20 Mugurel Tudor <mugurelu@go.ro>
@@ -2003,7 +2534,7 @@
2004-02-07 Robert Sedak <robert.sedak@sk.htnet.hr>
* hr.po: Updated Croatian translation.
* hr.po: Updated Croatian translation.
2004-02-08 Changwoo Ryu <cwryu@debian.org>
@@ -2161,14 +2692,14 @@
* da.po: Updated Danish translation.
2003-11-26 Vincent van Adrighem <adrighem@gnome.org>
2003-11-26 Vincent van Adrighem <adrighem@gnome.org>
* nl.po: Dutch translation updated by Vincent van Adrighem.
2003-11-10 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation by
Francisco Javier F. Serrador <serrador@arrakis.es>.
* es.po: Updated Spanish translation by
Francisco Javier F. Serrador <serrador@arrakis.es>.
2003-11-08 Danilo Šegan <dsegan@gmx.net>
@@ -2300,8 +2831,8 @@
2003-08-27 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Revision of Spanish translation by
Francisco Javier F. Serrador <serrador@arrakis.es>.
* es.po: Revision of Spanish translation by
Francisco Javier F. Serrador <serrador@arrakis.es>.
2003-08-26 Guntupalli Karunakar <karunakar@freedomink.org>
@@ -2322,7 +2853,7 @@
2003-08-22 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
* sk.po: Update Slovak translation.
* sk.po: Update Slovak translation.
2003-08-20 Kjartan Maraas <kmaraas@gnome.org>
@@ -2372,7 +2903,7 @@
2003-08-06 Metin Amiroff <metin@karegen.com>
* az.po: Updated Azerbaijani translation.
* az.po: Updated Azerbaijani translation.
2003-08-05 Ole Laursen <olau@hardworking.dk>
@@ -2380,7 +2911,7 @@
2003-08-05 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
* es.po: Updated Spanish translation.
* es.po: Updated Spanish translation.
2003-07-29 Andras Timar <timar@gnome.hu>
@@ -2405,7 +2936,7 @@
2003-07-18 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
* pt.po: Updated Portuguese translation.
2002-07-17 Kostas Papadimas <pkst@gmx.net>
@@ -2516,7 +3047,7 @@
2003-05-30 Paul Duffy <dubhthach@frink.nuigalway.ie>
* ga.po: Updated Irish Translation.
* ga.po: Updated Irish Translation.
2003-05-30 Abel Cheung <maddog@linux.org.hk>
@@ -2524,7 +3055,7 @@
2003-05-26 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
* pt.po: Updated Portuguese translation.
2003-05-21 Miloslav Trmac <mitr@volny.cz>
@@ -2554,7 +3085,7 @@
2003-05-12 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
* pt.po: Updated Portuguese translation.
2003-05-10 KAMAGASAKO Masatoshi <emerald@gnome.gr.jp>
@@ -2566,7 +3097,7 @@
2003-05-09 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
* pt_BR.po: Updated Brazilian Portuguese translation.
* pt_BR.po: Updated Brazilian Portuguese translation.
2003-05-08 Christian Rose <menthos@menthos.com>
@@ -2605,7 +3136,7 @@
2003-03-11 Paul Duffy <dubhthach@zion.nuigalway.ie>
* ga.po: Added Irish translation
* ga.po: Added Irish translation
2003-03-10 Roozbeh Pournader <roozbeh@sharif.edu>
@@ -2670,8 +3201,8 @@
2003-01-23 He Qiangqiang <carton@linux.net.cn>
* zh_CN.po: Updated Simplified Chinese translation by
Xiong Jiang <jxiong@offtopic.org>.
* zh_CN.po: Updated Simplified Chinese translation by
Xiong Jiang <jxiong@offtopic.org>.
2003-01-23 Dmitry G. Mastrukov <dmitry@taurussoft.org>
@@ -3527,7 +4058,7 @@
2002-05-06 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation and converted to UTF-8.
* pt.po: Updated Portuguese translation and converted to UTF-8.
2002-04-26 Zbigniew Chyla <cyba@gnome.pl>
@@ -3597,7 +4128,7 @@
2002-02-11 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
* pt.po: Updated Portuguese translation.
2002-02-10 Hasbullah Bin Pit <sebol@ikhlas.com>
@@ -3658,7 +4189,7 @@
2002-01-08 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Updated Portuguese translation.
* pt.po: Updated Portuguese translation.
2002-01-06 Fatih Demir <kabalak@gtranslator.org>
@@ -3671,7 +4202,7 @@
2001-12-27 Duarte Loreto <happyguy_pt@hotmail.com>
* pt.po: Added portuguese translation
* pt.po: Added portuguese translation
2001-12-27 Jesus Bravo Alvarez <jba@pobox.com>
@@ -3705,11 +4236,11 @@
2001-10-29 Yuriy Syrota <rasta@renome.rovno.ua>
* uk.po: Added Ukrainian translation file.
* uk.po: Added Ukrainian translation file.
2001-10-28 Hᅵtor Garcᅵ ᅵvarez <hector@scouts-es.org>
* es.po: Updated Spanish translation.
* es.po: Updated Spanish translation.
2001-10-14 Hᅵtor Garcᅵ ᅵvarez <hector@scouts-es.org>

View File

@@ -4,6 +4,7 @@ am
ar
az
be
be@latin
bg
bn
bn_IN
@@ -50,6 +51,7 @@ nb
ne
nl
nn
oc
or
pa
pl
@@ -58,6 +60,7 @@ pt_BR
ro
ru
rw
si
sk
sl
sq

View File

@@ -1,6 +1,9 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
src/50-metacity-desktop-key.xml.in
src/50-metacity-key.xml.in
src/tools/metacity-message.c
src/core.c
src/delete.c
src/display.c
src/errors.c

2405
po/ar.po

File diff suppressed because it is too large Load Diff

3834
po/be@latin.po Normal file

File diff suppressed because it is too large Load Diff

1876
po/bg.po

File diff suppressed because it is too large Load Diff

970
po/ca.po

File diff suppressed because it is too large Load Diff

2209
po/cs.po

File diff suppressed because it is too large Load Diff

2109
po/da.po

File diff suppressed because it is too large Load Diff

1599
po/de.po

File diff suppressed because it is too large Load Diff

1480
po/dz.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1188
po/es.po

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@
# Estonian translation of Metacity
#
# Copyright (C) 2004-2005 The Free Software Foundation
# Copyright (C) 2007 The GNOME Project.
# This file is distributed under the same license as the metacity package.
#
# Tõivo Leedjärv <toivo@linux.ee>, 2004.
@@ -12,7 +13,7 @@ msgstr ""
"Project-Id-Version: metacity HEAD\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2006-11-18 21:11+0200\n"
"PO-Revision-Date: 2006-11-19 22:09+0200\n"
"PO-Revision-Date: 2007-03-25 09:22+0300\n"
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
"Language-Team: Estonian <gnome-et@linux.ee>\n"
"MIME-Version: 1.0\n"
@@ -156,7 +157,7 @@ msgid ""
msgstr ""
"metacity %s\n"
"Autoriõigused (C) 2001-2002 Havoc Pennington, Red Hat, Inc., ja teised\n"
"See protgramm on vaba tarkvara; kopeerimistingimuste kohta vaata\n"
"See programm on vaba tarkvara; kopeerimistingimuste kohta vaata\n"
"programmi lähteteksti. Sellel programmil pole MINGISUGUST GARANTIID;\n"
"isegi KESKMISE/TAVALISE KVALITEEDI GARANTIID või GARANTIID SOBIVUSELE\n"
"TEATUD KINDLAKS EESMÄRGIKS.\n"
@@ -582,7 +583,7 @@ msgstr ""
#: ../src/metacity.schemas.in.h:27
msgid "Maximize window"
msgstr "Maksimeeri aken"
msgstr "Akna maksimeerimine"
#: ../src/metacity.schemas.in.h:28
msgid "Maximize window horizontally"
@@ -594,7 +595,7 @@ msgstr "Maksimeeri aken vertikaalselt"
#: ../src/metacity.schemas.in.h:30
msgid "Minimize window"
msgstr "Minimeeri aken"
msgstr "Akna minimeerimine"
#: ../src/metacity.schemas.in.h:31
msgid "Modifier to use for modified window click actions"
@@ -2963,7 +2964,7 @@ msgstr "Värvust \"%s\" pole võimalik analüüsida"
#: ../src/theme.c:1499
#, c-format
msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr ""
msgstr "Koordinaatide avaldis sisaldab lubamatut märki '%s'"
#: ../src/theme.c:1526
#, c-format
@@ -2971,11 +2972,15 @@ msgid ""
"Coordinate expression contains floating point number '%s' which could not be "
"parsed"
msgstr ""
"Koordinaatide avaldis sisaldab ujukomaarvu '%s', seda aga pole võimalik "
"analüüsida"
#: ../src/theme.c:1540
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr ""
"Koordinaatide avaldis sisaldab täisarvu '%s', seda aga pole võimalik "
"analüüsida"
#: ../src/theme.c:1607
#, c-format
@@ -2986,11 +2991,11 @@ msgstr ""
#: ../src/theme.c:1664
msgid "Coordinate expression was empty or not understood"
msgstr ""
msgstr "Koordinaatide avaldis on tühi või arusaamatult koostatud"
#: ../src/theme.c:1801 ../src/theme.c:1811 ../src/theme.c:1845
msgid "Coordinate expression results in division by zero"
msgstr ""
msgstr "Koordinaatide avaldise tulemuseks on nulliga jagamine"
#: ../src/theme.c:1853
msgid ""
@@ -3020,20 +3025,21 @@ msgstr ""
#: ../src/theme.c:2054
msgid "Coordinate expression parser overflowed its buffer."
msgstr ""
msgstr "Koordinaatide avaldise analüsaatoril tekkis puhvri ületäitumine."
#: ../src/theme.c:2083
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr ""
msgstr "Koordinaatide avaldises on sulgevad sulud ilma avavate sulgudeta"
#: ../src/theme.c:2145
#, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr ""
"Koordinaatide avaldis sisaldab tundmatut muutujat või konstanti \"%s\""
#: ../src/theme.c:2200
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr ""
msgstr "Koordinaatide avaldises on avavad sulud ilma sulgevate sulgudeta"
#: ../src/theme.c:2211
msgid "Coordinate expression doesn't seem to have any operators or operands"
@@ -3094,7 +3100,7 @@ msgstr "Tõrge silumislogi avamisel: %s\n"
#: ../src/util.c:108
#, c-format
msgid "Failed to fdopen() log file %s: %s\n"
msgstr ""
msgstr "Tõrge logifaili %s avamisel funktsiooniga fdopen(): %s\n"
#: ../src/util.c:114
#, c-format
@@ -3175,15 +3181,8 @@ msgid ""
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
msgstr ""
#~ msgid ""
#~ "Forcing this application to quit will cause you to lose any unsaved "
#~ "changes."
#~ msgstr ""
#~ "Sellest rakendusest jõuga väljumine põhjustab kõigi salvestamata andmete "
#~ "hävimise."
#~ msgid "Unknown function \"%s\" for menu icon"
#~ msgstr "Tundmatu funktsioon \"%s\" menüüikoonile"
#~ msgid "Failed to read theme from file %s: %s\n"
#~ msgstr "Tõrge teema lugemisel failist %s: %s\n"
#. separator
#. Translators: Translate this string the same way as you do in libwnck!
#: ../src/menu.c:88
msgid "Always on _Top"
msgstr "Alati _pealmine"

1558
po/eu.po

File diff suppressed because it is too large Load Diff

920
po/fi.po

File diff suppressed because it is too large Load Diff

1783
po/fr.po

File diff suppressed because it is too large Load Diff

2825
po/gl.po

File diff suppressed because it is too large Load Diff

1396
po/gu.po

File diff suppressed because it is too large Load Diff

1491
po/hu.po

File diff suppressed because it is too large Load Diff

1826
po/it.po

File diff suppressed because it is too large Load Diff

2113
po/ja.po

File diff suppressed because it is too large Load Diff

1633
po/ka.po

File diff suppressed because it is too large Load Diff

1613
po/ko.po

File diff suppressed because it is too large Load Diff

2372
po/ku.po

File diff suppressed because it is too large Load Diff

2553
po/lt.po

File diff suppressed because it is too large Load Diff

706
po/lv.po

File diff suppressed because it is too large Load Diff

1543
po/mk.po

File diff suppressed because it is too large Load Diff

1523
po/ml.po

File diff suppressed because it is too large Load Diff

1208
po/nb.po

File diff suppressed because it is too large Load Diff

1515
po/nl.po

File diff suppressed because it is too large Load Diff

2992
po/oc.po Normal file

File diff suppressed because it is too large Load Diff

1891
po/pa.po

File diff suppressed because it is too large Load Diff

1776
po/pl.po

File diff suppressed because it is too large Load Diff

946
po/pt.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

1674
po/ro.po

File diff suppressed because it is too large Load Diff

1491
po/ru.po

File diff suppressed because it is too large Load Diff

2987
po/si.po Normal file

File diff suppressed because it is too large Load Diff

2169
po/sk.po

File diff suppressed because it is too large Load Diff

1709
po/sl.po

File diff suppressed because it is too large Load Diff

1489
po/sr.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2792
po/sv.po

File diff suppressed because it is too large Load Diff

1683
po/ta.po

File diff suppressed because it is too large Load Diff

797
po/th.po

File diff suppressed because it is too large Load Diff

1713
po/uk.po

File diff suppressed because it is too large Load Diff

2457
po/vi.po

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<KeyListEntries _name="Desktop" wm_name="Metacity" package="metacity">
<KeyListEntry
name="/apps/metacity/global_keybindings/panel_run_dialog" />
<KeyListEntry
name="/apps/metacity/global_keybindings/panel_main_menu" />
<KeyListEntry
name="/apps/metacity/global_keybindings/run_command_screenshot" />
<KeyListEntry
name="/apps/metacity/global_keybindings/run_command_window_screenshot" />
<KeyListEntry
name="/apps/metacity/global_keybindings/run_command_terminal" />
</KeyListEntries>

269
src/50-metacity-key.xml.in Normal file
View File

@@ -0,0 +1,269 @@
<?xml version="1.0" encoding="UTF-8" ?>
<KeyListEntries _name="Window Management" wm_name="Metacity" package="metacity">
<KeyListEntry
name="/apps/metacity/window_keybindings/activate_window_menu" />
<KeyListEntry
name="/apps/metacity/window_keybindings/toggle_fullscreen" />
<KeyListEntry
name="/apps/metacity/window_keybindings/toggle_maximized" />
<KeyListEntry
name="/apps/metacity/window_keybindings/maximize" />
<KeyListEntry
name="/apps/metacity/window_keybindings/unmaximize" />
<KeyListEntry
name="/apps/metacity/window_keybindings/toggle_shaded" />
<KeyListEntry
name="/apps/metacity/window_keybindings/close" />
<KeyListEntry
name="/apps/metacity/window_keybindings/minimize" />
<KeyListEntry
name="/apps/metacity/window_keybindings/begin_move" />
<KeyListEntry
name="/apps/metacity/window_keybindings/begin_resize" />
<KeyListEntry
name="/apps/metacity/window_keybindings/toggle_on_all_workspaces"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/raise_or_lower" />
<KeyListEntry
name="/apps/metacity/window_keybindings/raise" />
<KeyListEntry
name="/apps/metacity/window_keybindings/lower" />
<KeyListEntry
name="/apps/metacity/window_keybindings/maximize_vertically" />
<KeyListEntry
name="/apps/metacity/window_keybindings/maximize_horizontally" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_1"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_2"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_3"
value="2"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_4"
value="3"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_5"
value="4"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_6"
value="5"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_7"
value="6"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_8"
value="7"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_9"
value="8"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_10"
value="9"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_11"
value="10"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_12"
value="11"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_left"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_right"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_up"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/window_keybindings/move_to_workspace_down"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_windows" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_group" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_panels" />
<KeyListEntry
name="/apps/metacity/global_keybindings/cycle_windows" />
<KeyListEntry
name="/apps/metacity/global_keybindings/cycle_group" />
<KeyListEntry
name="/apps/metacity/global_keybindings/cycle_panels" />
<KeyListEntry
name="/apps/metacity/global_keybindings/show_desktop" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_1"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_2"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_3"
value="2"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_4"
value="3"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_5"
value="4"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_6"
value="5"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_7"
value="6"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_8"
value="7"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_9"
value="8"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_10"
value="9"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_11"
value="10"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_12"
value="11"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_left"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_right"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_up"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
<KeyListEntry
name="/apps/metacity/global_keybindings/switch_to_workspace_down"
value="1"
key="/apps/metacity/general/num_workspaces"
comparison="gt" />
</KeyListEntries>

View File

@@ -12,10 +12,6 @@ metacity_SOURCES= \
boxes.h \
boxes.c \
common.h \
c-screen.c \
c-screen.h \
c-window.c \
c-window.h \
compositor.c \
compositor.h \
constraints.c \
@@ -161,6 +157,12 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@
schema_in_files = metacity.schemas.in
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
@INTLTOOL_XML_NOMERGE_RULE@
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
xml_in_files = 50-metacity-desktop-key.xml.in 50-metacity-key.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
@INTLTOOL_SCHEMAS_RULE@
if GCONF_SCHEMAS_INSTALL
@@ -177,7 +179,7 @@ VARIABLES=default_icon_data $(srcdir)/default_icon.png \
stock_delete_data $(srcdir)/stock_delete.png
BUILT_SOURCES = inlinepixbufs.h
CLEANFILES = inlinepixbufs.h metacity.desktop metacity.schemas
CLEANFILES = inlinepixbufs.h metacity.desktop metacity.schemas 50-metacity-desktop-key.xml 50-metacity-key.xml
inlinepixbufs.h: $(IMAGES)
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
@@ -190,4 +192,6 @@ EXTRA_DIST=$(desktopfiles_files) \
$(IMAGES) $(schema_DATA) \
$(desktopfiles_in_files) \
$(schema_in_files) \
$(xml_in_files) \
libmetacity-private.pc.in

View File

@@ -1,55 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Metacity misc. public entry points */
/*
* Copyright (C) 2001 Havoc Pennington
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include "api.h"
#include "display.h"
#include "colors.h"
PangoContext*
meta_get_pango_context (Screen *xscreen,
const PangoFontDescription *desc)
{
MetaScreen *screen;
screen = meta_screen_for_x_screen (xscreen);
g_return_val_if_fail (screen != NULL, NULL);
return meta_screen_get_pango_context (screen,
desc,
/* FIXME, from the frame window */
PANGO_DIRECTION_LTR);
}
gulong
meta_get_x_pixel (Screen *xscreen, const PangoColor *color)
{
MetaScreen *screen;
screen = meta_screen_for_x_screen (xscreen);
g_return_val_if_fail (screen != NULL, 0);
return meta_screen_get_x_pixel (screen, color);
}

View File

@@ -1,64 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Metacity misc. public entry points */
/*
* Copyright (C) 2001 Havoc Pennington
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_API_H
#define META_API_H
/* don't add any internal headers here; api.h is an installed/public
* header. Only theme.h is also installed.
*/
#include <X11/Xlib.h>
#include <pango/pangox.h>
/* Colors/state stuff matches GTK since we get the info from
* the GTK UI slave
*/
typedef struct _MetaUIColors MetaUIColors;
typedef enum
{
META_STATE_NORMAL,
META_STATE_ACTIVE,
META_STATE_PRELIGHT,
META_STATE_SELECTED,
META_STATE_INSENSITIVE
} MetaUIState;
struct _MetaUIColors
{
PangoColor fg[5];
PangoColor bg[5];
PangoColor light[5];
PangoColor dark[5];
PangoColor mid[5];
PangoColor text[5];
PangoColor base[5];
PangoColor text_aa[5];
};
PangoContext* meta_get_pango_context (Screen *xscreen,
const PangoFontDescription *desc);
gulong meta_get_x_pixel (Screen *xscreen,
const PangoColor *color);
#endif

View File

@@ -547,10 +547,10 @@ meta_rectangle_get_minimal_spanning_set_for_region (
ret = g_list_prepend (NULL, temp_rect);
strut_iter = all_struts;
while (strut_iter)
for (strut_iter = all_struts; strut_iter; strut_iter = strut_iter->next)
{
GList *rect_iter;
MetaRectangle *strut = (MetaRectangle*) strut_iter->data;
MetaRectangle *strut_rect = &((MetaStrut*)strut_iter->data)->rect;
tmp_list = ret;
ret = NULL;
@@ -558,45 +558,45 @@ meta_rectangle_get_minimal_spanning_set_for_region (
while (rect_iter)
{
MetaRectangle *rect = (MetaRectangle*) rect_iter->data;
if (!meta_rectangle_overlap (rect, strut))
if (!meta_rectangle_overlap (rect, strut_rect))
ret = g_list_prepend (ret, rect);
else
{
/* If there is area in rect left of strut */
if (rect->x < strut->x)
if (BOX_LEFT (*rect) < BOX_LEFT (*strut_rect))
{
temp_rect = g_new (MetaRectangle, 1);
*temp_rect = *rect;
temp_rect->width = strut->x - rect->x;
temp_rect->width = BOX_LEFT (*strut_rect) - BOX_LEFT (*rect);
ret = g_list_prepend (ret, temp_rect);
}
/* If there is area in rect right of strut */
if (rect->x + rect->width > strut->x + strut->width)
if (BOX_RIGHT (*rect) > BOX_RIGHT (*strut_rect))
{
int new_x;
temp_rect = g_new (MetaRectangle, 1);
*temp_rect = *rect;
new_x = strut->x + strut->width;
temp_rect->width = rect->x + rect->width - new_x;
new_x = BOX_RIGHT (*strut_rect);
temp_rect->width = BOX_RIGHT(*rect) - new_x;
temp_rect->x = new_x;
ret = g_list_prepend (ret, temp_rect);
}
/* If there is area in rect above strut */
if (rect->y < strut->y)
if (BOX_TOP (*rect) < BOX_TOP (*strut_rect))
{
temp_rect = g_new (MetaRectangle, 1);
*temp_rect = *rect;
temp_rect->height = strut->y - rect->y;
temp_rect->height = BOX_TOP (*strut_rect) - BOX_TOP (*rect);
ret = g_list_prepend (ret, temp_rect);
}
/* If there is area in rect below strut */
if (rect->y + rect->height > strut->y + strut->height)
if (BOX_BOTTOM (*rect) > BOX_BOTTOM (*strut_rect))
{
int new_y;
temp_rect = g_new (MetaRectangle, 1);
*temp_rect = *rect;
new_y = strut->y + strut->height;
temp_rect->height = rect->y + rect->height - new_y;
new_y = BOX_BOTTOM (*strut_rect);
temp_rect->height = BOX_BOTTOM (*rect) - new_y;
temp_rect->y = new_y;
ret = g_list_prepend (ret, temp_rect);
}
@@ -605,7 +605,6 @@ meta_rectangle_get_minimal_spanning_set_for_region (
rect_iter = rect_iter->next;
}
g_list_free (tmp_list);
strut_iter = strut_iter->next;
}
/* Sort by maximal area, just because I feel like it... */
@@ -662,6 +661,76 @@ meta_rectangle_expand_region_conditionally (GList *region,
return region;
}
void
meta_rectangle_expand_to_avoiding_struts (MetaRectangle *rect,
const MetaRectangle *expand_to,
const MetaDirection direction,
const GSList *all_struts)
{
const GSList *strut_iter;
/* If someone wants this function to handle more fine-grained
* direction expanding in the future (e.g. only left, or fully
* horizontal plus upward), feel free. But I'm hard-coding for both
* horizontal directions (exclusive-)or both vertical directions.
*/
g_assert ((direction == META_DIRECTION_HORIZONTAL) ^
(direction == META_DIRECTION_VERTICAL ));
if (direction == META_DIRECTION_HORIZONTAL)
{
rect->x = expand_to->x;
rect->width = expand_to->width;
}
else
{
rect->y = expand_to->y;
rect->height = expand_to->height;
}
/* Run over all struts */
for (strut_iter = all_struts; strut_iter; strut_iter = strut_iter->next)
{
MetaStrut *strut = (MetaStrut*) strut_iter->data;
/* Skip struts that don't overlap */
if (!meta_rectangle_overlap (&strut->rect, rect))
continue;
if (direction == META_DIRECTION_HORIZONTAL)
{
if (strut->side == META_SIDE_LEFT)
{
int offset = BOX_RIGHT(strut->rect) - BOX_LEFT(*rect);
rect->x += offset;
rect->width -= offset;
}
else if (strut->side == META_SIDE_RIGHT)
{
int offset = BOX_RIGHT (*rect) - BOX_LEFT(strut->rect);
rect->width -= offset;
}
/* else ignore the strut */
}
else /* direction == META_DIRECTION_VERTICAL */
{
if (strut->side == META_SIDE_TOP)
{
int offset = BOX_BOTTOM(strut->rect) - BOX_TOP(*rect);
rect->y += offset;
rect->height -= offset;
}
else if (strut->side == META_SIDE_BOTTOM)
{
int offset = BOX_BOTTOM(*rect) - BOX_TOP(strut->rect);
rect->height -= offset;
}
/* else ignore the strut */
}
} /* end loop over struts */
} /* end meta_rectangle_expand_to_avoiding_struts */
void
meta_rectangle_free_list_and_elements (GList *filled_list)
{
@@ -739,39 +808,36 @@ meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
/* First, find best rectangle from spanning_rects to which we can clamp
* rect to fit into.
*/
temp = spanning_rects;
while (temp)
for (temp = spanning_rects; temp; temp = temp->next)
{
int factor = 1;
MetaRectangle *compare_rect = temp->data;
int maximal_overlap_amount_for_compare;
/* If x is fixed and the entire width of rect doesn't fit in compare, set
* factor to 0.
/* If x is fixed and the entire width of rect doesn't fit in compare,
* skip this rectangle.
*/
if ((fixed_directions & FIXED_DIRECTION_X) &&
(compare_rect->x > rect->x ||
compare_rect->x + compare_rect->width < rect->x + rect->width))
factor = 0;
continue;
/* If y is fixed and the entire height of rect doesn't fit in compare, set
* factor to 0.
/* If y is fixed and the entire height of rect doesn't fit in compare,
* skip this rectangle.
*/
if ((fixed_directions & FIXED_DIRECTION_Y) &&
(compare_rect->y > rect->y ||
compare_rect->y + compare_rect->height < rect->y + rect->height))
factor = 0;
continue;
/* If compare can't hold the min_size window, set factor to 0 */
/* If compare can't hold the min_size window, skip this rectangle. */
if (compare_rect->width < min_size->width ||
compare_rect->height < min_size->height)
factor = 0;
continue;
/* Determine maximal overlap amount */
maximal_overlap_amount_for_compare =
MIN (rect->width, compare_rect->width) *
MIN (rect->height, compare_rect->height);
maximal_overlap_amount_for_compare *= factor;
/* See if this is the best rect so far */
if (maximal_overlap_amount_for_compare > best_overlap)
@@ -779,8 +845,6 @@ meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
best_rect = compare_rect;
best_overlap = maximal_overlap_amount_for_compare;
}
temp = temp->next;
}
/* Clamp rect appropriately */
@@ -813,34 +877,31 @@ meta_rectangle_clip_to_region (const GList *spanning_rects,
/* First, find best rectangle from spanning_rects to which we will clip
* rect into.
*/
temp = spanning_rects;
while (temp)
for (temp = spanning_rects; temp; temp = temp->next)
{
int factor = 1;
MetaRectangle *compare_rect = temp->data;
MetaRectangle overlap;
int maximal_overlap_amount_for_compare;
/* If x is fixed and the entire width of rect doesn't fit in compare, set
* factor to 0.
/* If x is fixed and the entire width of rect doesn't fit in compare,
* skip the rectangle.
*/
if ((fixed_directions & FIXED_DIRECTION_X) &&
(compare_rect->x > rect->x ||
compare_rect->x + compare_rect->width < rect->x + rect->width))
factor = 0;
continue;
/* If y is fixed and the entire height of rect doesn't fit in compare, set
* factor to 0.
/* If y is fixed and the entire height of rect doesn't fit in compare,
* skip the rectangle.
*/
if ((fixed_directions & FIXED_DIRECTION_Y) &&
(compare_rect->y > rect->y ||
compare_rect->y + compare_rect->height < rect->y + rect->height))
factor = 0;
continue;
/* Determine maximal overlap amount */
meta_rectangle_intersect (rect, compare_rect, &overlap);
maximal_overlap_amount_for_compare = meta_rectangle_area (&overlap);
maximal_overlap_amount_for_compare *= factor;
/* See if this is the best rect so far */
if (maximal_overlap_amount_for_compare > best_overlap)
@@ -848,8 +909,6 @@ meta_rectangle_clip_to_region (const GList *spanning_rects,
best_rect = compare_rect;
best_overlap = maximal_overlap_amount_for_compare;
}
temp = temp->next;
}
/* Clip rect appropriately */
@@ -896,36 +955,35 @@ meta_rectangle_shove_into_region (const GList *spanning_rects,
/* First, find best rectangle from spanning_rects to which we will shove
* rect into.
*/
temp = spanning_rects;
while (temp)
for (temp = spanning_rects; temp; temp = temp->next)
{
int factor = 1;
MetaRectangle *compare_rect = temp->data;
int maximal_overlap_amount_for_compare;
int dist_to_compare;
/* If x is fixed and the entire width of rect doesn't fit in compare, set
* factor to 0.
/* If x is fixed and the entire width of rect doesn't fit in compare,
* skip this rectangle.
*/
if ((fixed_directions & FIXED_DIRECTION_X) &&
(compare_rect->x > rect->x ||
compare_rect->x + compare_rect->width < rect->x + rect->width))
factor = 0;
continue;
/* If y is fixed and the entire height of rect doesn't fit in compare, set
* factor to 0.
/* If y is fixed and the entire height of rect doesn't fit in compare,
* skip this rectangle.
*/
if ((fixed_directions & FIXED_DIRECTION_Y) &&
(compare_rect->y > rect->y ||
compare_rect->y + compare_rect->height < rect->y + rect->height))
factor = 0;
continue;
/* Determine maximal overlap amount between rect & compare_rect */
maximal_overlap_amount_for_compare =
MIN (rect->width, compare_rect->width) *
MIN (rect->height, compare_rect->height);
/* Determine distance necessary to put rect into comapre_rect */
/* Determine distance necessary to put rect into compare_rect */
dist_to_compare = 0;
if (compare_rect->x > rect->x)
dist_to_compare += compare_rect->x - rect->x;
@@ -938,13 +996,6 @@ meta_rectangle_shove_into_region (const GList *spanning_rects,
dist_to_compare += (rect->y + rect->height) -
(compare_rect->y + compare_rect->height);
/* If we'd have to move in the wrong direction, disqualify compare_rect */
if (factor == 0)
{
maximal_overlap_amount_for_compare = 0;
dist_to_compare = G_MAXINT;
}
/* See if this is the best rect so far */
if ((maximal_overlap_amount_for_compare > best_overlap) ||
(maximal_overlap_amount_for_compare == best_overlap &&
@@ -954,8 +1005,6 @@ meta_rectangle_shove_into_region (const GList *spanning_rects,
best_overlap = maximal_overlap_amount_for_compare;
shortest_distance = dist_to_compare;
}
temp = temp->next;
}
/* Shove rect appropriately */
@@ -1075,9 +1124,9 @@ meta_rectangle_edge_aligns (const MetaRectangle *rect, const MetaEdge *edge)
case META_DIRECTION_BOTTOM:
return BOX_LEFT (*rect) <= BOX_RIGHT (edge->rect) &&
BOX_LEFT (edge->rect) <= BOX_RIGHT (*rect);
default:
g_assert_not_reached ();
}
g_assert_not_reached ();
}
static GList*
@@ -1161,27 +1210,27 @@ replace_rect_with_list (GList *old_element,
}
/* Make a copy of the strut list, make sure that copy only contains parts
* of the old_struts that intersect with the rection rect, and then do some
* of the old_struts that intersect with the region rect, and then do some
* magic to make all the new struts disjoint (okay, we we break up struts
* that aren't disjoint in a way that the overlapping part is only included
* once, so it's not really magic...).
*/
static GList*
get_disjoint_strut_list_in_region (const GSList *old_struts,
const MetaRectangle *region)
get_disjoint_strut_rect_list_in_region (const GSList *old_struts,
const MetaRectangle *region)
{
GList *struts;
GList *strut_rects;
GList *tmp;
/* First, copy the list */
struts = NULL;
strut_rects = NULL;
while (old_struts)
{
MetaRectangle *cur = old_struts->data;
MetaRectangle *cur = &((MetaStrut*)old_struts->data)->rect;
MetaRectangle *copy = g_new (MetaRectangle, 1);
*copy = *cur;
if (meta_rectangle_intersect (copy, region, copy))
struts = g_list_prepend (struts, copy);
strut_rects = g_list_prepend (strut_rects, copy);
else
g_free (copy);
@@ -1191,7 +1240,7 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
/* Now, loop over the list and check for intersections, fixing things up
* where they do intersect.
*/
tmp = struts;
tmp = strut_rects;
while (tmp)
{
GList *compare;
@@ -1218,10 +1267,10 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
cur_leftover = g_list_prepend (cur_leftover, overlap_allocated);
/* Fix up tmp, compare, and cur -- maybe struts too */
if (struts == tmp)
if (strut_rects == tmp)
{
struts = replace_rect_with_list (tmp, cur_leftover);
tmp = struts;
strut_rects = replace_rect_with_list (tmp, cur_leftover);
tmp = strut_rects;
}
else
tmp = replace_rect_with_list (tmp, cur_leftover);
@@ -1239,7 +1288,7 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
tmp = tmp->next;
}
return struts;
return strut_rects;
}
gint
@@ -1347,7 +1396,7 @@ rectangle_and_edge_intersection (const MetaRectangle *rect,
/* Find out if the intersection is empty; have to do it this way since
* edges have a thickness of 0
*/
if ((result->width < 0 || result->height < 0) ||
if ((result->width < 0 || result->height < 0) ||
(result->width == 0 && result->height == 0))
{
result->width = 0;
@@ -1397,6 +1446,8 @@ rectangle_and_edge_intersection (const MetaRectangle *rect,
else
*handle_type = 0;
break;
default:
g_assert_not_reached ();
}
}
return intersect;
@@ -1503,23 +1554,25 @@ split_edge (GList *cur_list,
cur_list = g_list_prepend (cur_list, temp_edge);
}
break;
default:
g_assert_not_reached ();
}
return cur_list;
}
/* Split up edge and remove preliminary edges from strut_edges depending on
* if and how strut and edge intersect.
* if and how rect and edge intersect.
*/
static void
fix_up_edges (MetaRectangle *strut, MetaEdge *edge,
fix_up_edges (MetaRectangle *rect, MetaEdge *edge,
GList **strut_edges, GList **edge_splits,
gboolean *edge_needs_removal)
{
MetaEdge overlap;
int handle_type;
if (!rectangle_and_edge_intersection (strut, edge, &overlap, &handle_type))
if (!rectangle_and_edge_intersection (rect, edge, &overlap, &handle_type))
return;
if (handle_type == 0 || handle_type == 1)
@@ -1628,9 +1681,9 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
const GSList *all_struts)
{
GList *ret;
GList *fixed_struts;
GList *fixed_strut_rects;
GList *edge_iter;
const GList *strut_iter;
const GList *strut_rect_iter;
/* The algorithm is basically as follows:
* Make sure the struts are disjoint
@@ -1648,18 +1701,19 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
*/
/* Make sure the struts are disjoint */
fixed_struts = get_disjoint_strut_list_in_region (all_struts, basic_rect);
fixed_strut_rects =
get_disjoint_strut_rect_list_in_region (all_struts, basic_rect);
/* Start off the list with the edges of basic_rect */
ret = add_edges (NULL, basic_rect, TRUE);
strut_iter = fixed_struts;
while (strut_iter)
strut_rect_iter = fixed_strut_rects;
while (strut_rect_iter)
{
MetaRectangle *strut = (MetaRectangle*) strut_iter->data;
MetaRectangle *strut_rect = (MetaRectangle*) strut_rect_iter->data;
/* Get the new possible edges we may need to add from the strut */
GList *new_strut_edges = add_edges (NULL, strut, FALSE);
GList *new_strut_edges = add_edges (NULL, strut_rect, FALSE);
edge_iter = ret;
while (edge_iter)
@@ -1668,7 +1722,7 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
GList *splits_of_cur_edge = NULL;
gboolean edge_needs_removal = FALSE;
fix_up_edges (strut, cur_edge,
fix_up_edges (strut_rect, cur_edge,
&new_strut_edges, &splits_of_cur_edge,
&edge_needs_removal);
@@ -1692,14 +1746,14 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
}
ret = g_list_concat (new_strut_edges, ret);
strut_iter = strut_iter->next;
strut_rect_iter = strut_rect_iter->next;
}
/* Sort the list */
ret = g_list_sort (ret, meta_rectangle_edge_cmp);
/* Free the fixed struts list */
meta_rectangle_free_list_and_elements (fixed_struts);
meta_rectangle_free_list_and_elements (fixed_strut_rects);
return ret;
}
@@ -1716,6 +1770,7 @@ meta_rectangle_find_nonintersected_xinerama_edges (
*/
GList *ret;
const GList *cur;
GSList *temp_rects;
/* Initialize the return list to be empty */
ret = NULL;
@@ -1823,8 +1878,13 @@ meta_rectangle_find_nonintersected_xinerama_edges (
cur = cur->next;
}
temp_rects = NULL;
for (; all_struts; all_struts = all_struts->next)
temp_rects = g_slist_prepend (temp_rects,
&((MetaStrut*)all_struts->data)->rect);
ret = meta_rectangle_remove_intersections_with_boxes_from_edges (ret,
all_struts);
temp_rects);
g_slist_free (temp_rects);
/* Sort the list */
ret = g_list_sort (ret, meta_rectangle_edge_cmp);

View File

@@ -28,7 +28,6 @@
#include "common.h"
typedef struct _MetaRectangle MetaRectangle;
struct _MetaRectangle
{
int x;
@@ -37,6 +36,13 @@ struct _MetaRectangle
int height;
};
typedef struct _MetaStrut MetaStrut;
struct _MetaStrut
{
MetaRectangle rect;
MetaDirection side;
};
#define BOX_LEFT(box) ((box).x) /* Leftmost pixel of rect */
#define BOX_RIGHT(box) ((box).x + (box).width) /* One pixel past right */
#define BOX_TOP(box) ((box).y) /* Topmost pixel of rect */
@@ -44,8 +50,9 @@ struct _MetaRectangle
typedef enum
{
FIXED_DIRECTION_X = 1 << 0,
FIXED_DIRECTION_Y = 1 << 1,
FIXED_DIRECTION_NONE = 0,
FIXED_DIRECTION_X = 1 << 0,
FIXED_DIRECTION_Y = 1 << 1,
} FixedDirections;
typedef enum
@@ -166,6 +173,16 @@ GList* meta_rectangle_expand_region_conditionally (
const int min_x,
const int min_y);
/* Expand rect in direction to the size of expand_to, and then clip out any
* overlapping struts oriented orthognal to the expansion direction. (Think
* horizontal or vertical maximization)
*/
void meta_rectangle_expand_to_avoiding_struts (
MetaRectangle *rect,
const MetaRectangle *expand_to,
const MetaDirection direction,
const GSList *all_struts);
/* Free the list created by
* meta_rectangle_get_minimal_spanning_set_for_region()
* or

View File

@@ -1,677 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2006 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include <config.h>
#ifdef HAVE_COMPOSITE_EXTENSIONS
#include <cm/ws.h>
#include <cm/stacker.h>
#include <cm/wsint.h>
#include <cm/drawable-node.h>
#include <cm/state.h>
#include <cm/magnifier.h>
#include <cm/square.h>
#include <string.h>
#include "screen.h"
#include "c-screen.h"
#include "c-window.h"
struct MetaCompScreen
{
WsDisplay *display;
CmStacker *stacker;
CmMagnifier *magnifier;
WsWindow *gl_window;
WsWindow *root_window;
WsScreen *screen;
MetaScreen *meta_screen;
int repaint_id;
int idle_id;
WsWindow *selection_window;
GHashTable *windows_by_xid;
};
static MetaCompWindow *
meta_comp_window_lookup (MetaCompScreen *info,
Window xid)
{
MetaCompWindow *window;
window = g_hash_table_lookup (info->windows_by_xid, (gpointer)xid);
return window;
}
MetaCompWindow *
meta_comp_screen_lookup_window (MetaCompScreen *info,
Window xwindow)
{
return meta_comp_window_lookup (info, xwindow);
}
#if 0
static void
update_frame_counter (void)
{
#define BUFSIZE 128
static GTimer *timer;
static double buffer [BUFSIZE];
static int next = 0;
if (!timer)
timer = g_timer_new ();
buffer[next++] = g_timer_elapsed (timer, NULL);
if (next == BUFSIZE)
{
int i;
double total;
next = 0;
total = 0.0;
for (i = 1; i < BUFSIZE; ++i)
total += buffer[i] - buffer[i - 1];
g_print ("frames per second: %f\n", 1 / (total / (BUFSIZE - 1)));
}
}
#endif
static void
dump_stacking_order (GList *nodes)
{
GList *list;
for (list = nodes; list != NULL; list = list->next)
{
CmDrawableNode *node = list->data;
if (node)
g_print ("%lx, ", WS_RESOURCE_XID (node->drawable));
}
g_print ("\n");
}
static gboolean
repaint (gpointer data)
{
MetaCompScreen *info = data;
CmState *state;
#if 0
g_print ("repaint\n");
#endif
glViewport (0, 0,
info->meta_screen->rect.width,
info->meta_screen->rect.height);
glLoadIdentity();
#if 0
glClearColor (0, 0, 0, 1.0);
glClear (GL_COLOR_BUFFER_BIT);
#endif
ws_window_raise (info->gl_window);
#if 0
glDisable (GL_TEXTURE_2D);
glDisable (GL_TEXTURE_RECTANGLE_ARB);
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
glColor4f (0.0, 1.0, 0.0, 1.0);
glRectf (-1.0, -1.0, 1.0, 1.0);
glFinish();
#endif
state = cm_state_new ();
cm_state_disable_depth_buffer_update (state);
cm_node_render (CM_NODE (info->magnifier), state);
cm_state_enable_depth_buffer_update (state);
g_object_unref (state);
ws_window_gl_swap_buffers (info->gl_window);
glFinish();
#if 0
dump_stacking_order (info->stacker->children);
#endif
info->idle_id = 0;
return FALSE;
}
static MetaCompWindow *
find_comp_window (MetaCompScreen *info,
Window xwindow)
{
return meta_comp_window_lookup (info, xwindow);
}
static CmNode *
find_node (MetaCompScreen *info,
Window xwindow)
{
MetaCompWindow *window = meta_comp_window_lookup (info, xwindow);
if (window)
return meta_comp_window_get_node (window);
return NULL;
}
static GList *all_screen_infos;
MetaCompScreen *
meta_comp_screen_get_by_xwindow (Window xwindow)
{
GList *list;
for (list = all_screen_infos; list != NULL; list = list->next)
{
MetaCompScreen *info = list->data;
if (find_node (info, xwindow))
return info;
}
return NULL;
}
MetaCompScreen *
meta_comp_screen_new (WsDisplay *display,
MetaScreen *screen)
{
MetaCompScreen *scr_info = g_new0 (MetaCompScreen, 1);
scr_info->screen = ws_display_get_screen_from_number (
display, screen->number);
scr_info->root_window = ws_screen_get_root_window (scr_info->screen);
scr_info->display = display;
scr_info->meta_screen = screen;
scr_info->windows_by_xid = g_hash_table_new (g_direct_hash, g_direct_equal);
all_screen_infos = g_list_prepend (all_screen_infos, scr_info);
return scr_info;
}
static char *
make_selection_name (MetaCompScreen *info)
{
char *buffer;
buffer = g_strdup_printf ("_NET_WM_CM_S%d", info->meta_screen->number);
return buffer;
}
static void
on_selection_clear (WsWindow *window,
WsSelectionClearEvent *event,
gpointer data)
{
MetaCompScreen *info = data;
char *buffer = make_selection_name (info);
if (strcmp (event->selection, buffer))
{
/* We lost the selection */
meta_comp_screen_unredirect (info);
}
}
static WsWindow *
claim_selection (MetaCompScreen *info)
{
WsWindow *window = ws_window_new (info->root_window);
char *buffer = make_selection_name (info);
#if 0
g_print ("selection window: %lx\n", WS_RESOURCE_XID (window));
#endif
ws_window_own_selection (window, buffer, WS_CURRENT_TIME);
g_signal_connect (window, "selection_clear_event", G_CALLBACK (on_selection_clear), info);
g_free (buffer);
return window;
}
static void
queue_paint (CmNode *node,
MetaCompScreen *info)
{
#if 0
g_print ("queueing %s\n", G_OBJECT_TYPE_NAME (node));
#endif
meta_comp_screen_queue_paint (info);
}
void
meta_comp_screen_redirect (MetaCompScreen *info)
{
WsWindow *root = ws_screen_get_root_window (info->screen);
WsRectangle source;
WsRectangle target;
WsServerRegion *region;
int screen_w;
int screen_h;
CmSquare *square;
#if 0
g_print ("redirecting %lx\n", WS_RESOURCE_XID (root));
#endif
ws_window_redirect_subwindows (root);
info->gl_window = ws_screen_get_gl_window (info->screen);
/* FIXME: This should probably happen in libcm */
ws_window_set_override_redirect (info->gl_window, TRUE);
region = ws_server_region_new (info->display);
ws_window_set_input_shape (info->gl_window, region);
g_object_unref (G_OBJECT (region));
ws_display_begin_error_trap (info->display);
ws_window_unredirect (info->gl_window);
ws_display_end_error_trap (info->display);
info->selection_window = claim_selection (info);
ws_window_map (info->gl_window);
info->stacker = cm_stacker_new ();
square = cm_square_new (0.3, 0.3, 0.8, 1.0);
cm_stacker_add_child (info->stacker, CM_NODE (square));
g_object_unref (square);
screen_w = ws_screen_get_width (info->screen);
screen_h = ws_screen_get_height (info->screen);
#if 0
g_print ("width: %d height %d\n", screen_w, screen_h);
#endif
source.x = (screen_w - (screen_w / 4)) / 2;
source.y = screen_h / 16;
source.width = screen_w / 4;
source.height = screen_h / 16;
target.x = 0;
target.y = screen_h - screen_h / 4;
target.width = screen_w;
target.height = screen_h / 4;
info->magnifier = cm_magnifier_new (CM_NODE (info->stacker), &source, &target);
if (g_getenv ("USE_MAGNIFIER"))
cm_magnifier_set_active (info->magnifier, TRUE);
else
cm_magnifier_set_active (info->magnifier, FALSE);
info->repaint_id =
g_signal_connect (info->magnifier, "need_repaint",
G_CALLBACK (queue_paint), info);
ws_display_sync (info->display);
}
static void
listify (gpointer key,
gpointer value,
gpointer data)
{
GList **windows = data;
*windows = g_list_prepend (*windows, (gpointer)value);
}
static void
free_all_windows (MetaCompScreen *info)
{
GList *windows = NULL, *list;
g_hash_table_foreach (info->windows_by_xid, listify, &windows);
for (list = windows; list != NULL; list = list->next)
{
MetaCompWindow *window = list->data;
meta_comp_window_free (window);
}
g_list_free (windows);
}
void
meta_comp_screen_unredirect (MetaCompScreen *info)
{
WsScreen *ws_screen = info->screen;
WsWindow *root = ws_screen_get_root_window (ws_screen);
g_signal_handler_disconnect (info->magnifier, info->repaint_id);
g_object_unref (info->magnifier);
ws_window_unredirect_subwindows (root);
ws_screen_release_gl_window (ws_screen);
free_all_windows (info);
ws_display_sync (info->display);
/* FIXME: libcm needs a way to guarantee that a window is destroyed,
* without relying on ref counting having it as a side effect
*/
g_object_unref (info->selection_window);
}
void
meta_comp_screen_queue_paint (MetaCompScreen *info)
{
#if 0
g_print ("queuing\n");
#endif
if (!info->idle_id)
info->idle_id = g_idle_add (repaint, info);
}
void
meta_comp_screen_restack (MetaCompScreen *info,
Window window,
Window above_this)
{
MetaCompWindow *comp_window = find_comp_window (info, window);
MetaCompWindow *above_comp_window = find_comp_window (info, above_this);
CmNode *window_node = find_node (info, window);
CmNode *above_node = find_node (info, above_this);
if ((comp_window && meta_comp_window_stack_frozen (comp_window)) ||
(above_comp_window && meta_comp_window_stack_frozen (above_comp_window)))
{
return;
}
#if 0
dump_stacking_order (info->stacker->children);
#endif
if (window_node == above_node)
return;
if (window_node && above_this == WS_RESOURCE_XID (info->gl_window))
{
cm_stacker_raise_child (info->stacker, window_node);
}
else if (window_node && above_this == None)
{
cm_stacker_lower_child (info->stacker, window_node);
}
else if (window_node && above_node)
{
cm_stacker_restack_child (info->stacker, window_node, above_node);
}
#if 0
else
g_print ("nothing happened\n");
#endif
#if 0
g_print ("done restacking; new order:\n");
#endif
#if 0
dump_stacking_order (info->stacker->children);
#endif
}
void
meta_comp_screen_raise_window (MetaCompScreen *info,
Window window)
{
CmNode *node = find_node (info, window);
if (node)
cm_stacker_raise_child (info->stacker, node);
}
void
meta_comp_screen_set_size (MetaCompScreen *info,
Window xwindow,
gint x,
gint y,
gint width,
gint height)
{
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
if (comp_window)
{
WsRectangle rect;
rect.x = x;
rect.y = y;
rect.width = width;
rect.height = height;
meta_comp_window_set_size (comp_window, &rect);
}
}
static void
print_child_titles (WsWindow *window)
{
GList *children = ws_window_query_subwindows (window);
GList *list;
int i;
g_print ("window: %lx %s\n", WS_RESOURCE_XID (window), ws_window_query_title (window));
i = 0;
for (list = children; list != NULL; list = list->next)
{
WsWindow *child = list->data;
g_print (" %d adding: %lx %s\n", i++, WS_RESOURCE_XID (child), ws_window_query_title (child));
}
}
typedef struct
{
MetaCompScreen *cscreen;
XID xid;
} DestroyData;
static void
on_window_destroy (MetaCompWindow *comp_window,
gpointer closure)
{
DestroyData *data = closure;
CmNode *node = meta_comp_window_get_node (comp_window);
cm_stacker_remove_child (data->cscreen->stacker, node);
g_hash_table_remove (data->cscreen->windows_by_xid, (gpointer)data->xid);
}
void
meta_comp_screen_add_window (MetaCompScreen *info,
Window xwindow)
{
WsDrawable *drawable;
MetaCompWindow *comp_window;
DestroyData *data;
ws_display_begin_error_trap (info->display);
comp_window = meta_comp_window_lookup (info, xwindow);
if (comp_window)
goto out;
drawable = WS_DRAWABLE (ws_window_lookup (info->display, xwindow));
if (ws_window_query_input_only (WS_WINDOW (drawable)))
goto out;
if (WS_WINDOW (drawable) == info->gl_window ||
WS_WINDOW (drawable) == info->screen->overlay_window)
{
#if 0
g_print ("gl window\n");
#endif
goto out;
}
data = g_new (DestroyData, 1);
data->cscreen = info;
data->xid = WS_RESOURCE_XID (drawable);
comp_window = meta_comp_window_new (info->meta_screen, drawable,
on_window_destroy, data);
g_hash_table_insert (info->windows_by_xid, (gpointer)WS_RESOURCE_XID (drawable), comp_window);
cm_stacker_add_child (info->stacker, meta_comp_window_get_node (comp_window));
out:
if (comp_window)
{
/* This function is called both when windows are created and when they
* are mapped, so for now we have this silly function.
*/
meta_comp_window_refresh_attrs (comp_window);
}
ws_display_end_error_trap (info->display);
#if 0
g_print ("done checking\n");
#endif
return;
}
void
meta_comp_screen_remove_window (MetaCompScreen *info,
Window xwindow)
{
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
if (comp_window)
meta_comp_window_free (comp_window);
}
void
meta_comp_screen_set_updates (MetaCompScreen *info,
Window xwindow,
gboolean updates)
{
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
meta_comp_window_set_updates (comp_window, updates);
}
void
meta_comp_screen_set_patch (MetaCompScreen *info,
Window xwindow,
CmPoint points[4][4])
{
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
if (node)
cm_drawable_node_set_patch (node, points);
}
void
meta_comp_screen_unset_patch (MetaCompScreen *info,
Window xwindow)
{
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
if (node)
cm_drawable_node_unset_patch (node);
}
void
meta_comp_screen_set_alpha (MetaCompScreen *info,
Window xwindow,
gdouble alpha)
{
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
#if 0
g_print ("alpha: %f\n", alpha);
#endif
cm_drawable_node_set_alpha (node, alpha);
}
void
meta_comp_screen_get_real_size (MetaCompScreen *info,
Window xwindow,
WsRectangle *size)
{
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
if (!size)
return;
cm_drawable_node_get_clipbox (node, size);
}
void
meta_comp_screen_unmap (MetaCompScreen *info,
Window xwindow)
{
MetaCompWindow *window = find_comp_window (info, xwindow);
if (window)
meta_comp_window_hide (window);
}
void
meta_comp_screen_set_target_rect (MetaCompScreen *info,
Window xwindow,
WsRectangle *rect)
{
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
if (node)
cm_drawable_node_set_scale_rect (node, rect);
}
#endif

View File

@@ -1,53 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#include "screen.h"
#include "c-window.h"
typedef struct MetaCompScreen MetaCompScreen;
MetaCompScreen *meta_comp_screen_new (WsDisplay *display,
MetaScreen *screen);
MetaCompScreen *meta_comp_screen_get_by_xwindow (Window xwindow);
void meta_comp_screen_destroy (MetaCompScreen *scr_info);
void meta_comp_screen_redirect (MetaCompScreen *info);
void meta_comp_screen_unredirect (MetaCompScreen *info);
void meta_comp_screen_add_window (MetaCompScreen *scr_info,
Window xwindow);
void meta_comp_screen_remove_window (MetaCompScreen *scr_info,
Window xwindow);
void meta_comp_screen_restack (MetaCompScreen *scr_info,
Window window,
Window above_this);
void meta_comp_screen_set_size (MetaCompScreen *info,
Window window,
gint x,
gint y,
gint width,
gint height);
void meta_comp_screen_raise_window (MetaCompScreen *scr_info,
Window window);
void meta_comp_screen_queue_paint (MetaCompScreen *info);
void meta_comp_screen_set_updates (MetaCompScreen *info,
Window xwindow,
gboolean updates);
void meta_comp_screen_set_patch (MetaCompScreen *info,
Window xwindow,
CmPoint points[4][4]);
void meta_comp_screen_unset_patch (MetaCompScreen *info,
Window xwindow);
void meta_comp_screen_set_alpha (MetaCompScreen *info,
Window xwindow,
gdouble alpha);
void meta_comp_screen_get_real_size (MetaCompScreen *info,
Window xwindow,
WsRectangle *size);
void meta_comp_screen_set_target_rect (MetaCompScreen *info,
Window xwindow,
WsRectangle *rect);
void meta_comp_screen_set_explode (MetaCompScreen *info,
Window xwindow,
gdouble level);
void meta_comp_screen_unmap (MetaCompScreen *info,
Window xwindow);
MetaCompWindow *meta_comp_screen_lookup_window (MetaCompScreen *info,
Window xwindow);

File diff suppressed because it is too large Load Diff

View File

@@ -1,72 +0,0 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2006 Red Hat, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include <cm/node.h>
#include "display.h"
#include "effects.h"
#ifndef C_WINDOW_H
#define C_WINDOW_H
typedef struct _MetaCompWindow MetaCompWindow;
typedef void (* MetaCompWindowDestroy) (MetaCompWindow *window,
gpointer closure);
MetaCompWindow *meta_comp_window_new (MetaScreen *screen,
WsDrawable *drawable,
MetaCompWindowDestroy destroy,
gpointer data);
CmNode *meta_comp_window_get_node (MetaCompWindow *window);
gboolean meta_comp_window_free (MetaCompWindow *window);
void meta_comp_window_set_size (MetaCompWindow *window,
WsRectangle *size);
void meta_comp_window_hide (MetaCompWindow *comp_window);
void meta_comp_window_show (MetaCompWindow *comp_window);
void meta_comp_window_refresh_attrs (MetaCompWindow *comp_window);
void meta_comp_window_set_updates (MetaCompWindow *comp_window,
gboolean updates);
void meta_comp_window_explode (MetaCompWindow *comp_window,
MetaEffect *effect);
void meta_comp_window_shrink (MetaCompWindow *comp_window,
MetaEffect *effect);
void meta_comp_window_unshrink (MetaCompWindow *comp_window,
MetaEffect *effect);
void meta_comp_window_run_focus (MetaCompWindow *comp_window,
MetaEffect *effect);
void meta_comp_window_restack (MetaCompWindow *comp_window,
MetaCompWindow *above);
void meta_comp_window_freeze_stack (MetaCompWindow *comp_window);
void meta_comp_window_thaw_stack (MetaCompWindow *comp_window);
gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window);
void meta_comp_window_run_minimize (MetaCompWindow *window,
MetaEffect *effect);
void meta_comp_window_run_unminimize (MetaCompWindow *comp_window,
MetaEffect *effect);
#if 0
void meta_comp_window_set_explode (MetaCompWindow *comp_window,
double level);
#endif
#endif

View File

@@ -23,6 +23,17 @@
#include "colors.h"
struct _MetaUIColors
{
PangoColor fg[5];
PangoColor bg[5];
PangoColor light[5];
PangoColor dark[5];
PangoColor mid[5];
PangoColor text[5];
PangoColor base[5];
PangoColor text_aa[5];
};
static void
visual_decompose_mask (gulong mask,

View File

@@ -24,13 +24,17 @@
#ifndef META_COLORS_H
#define META_COLORS_H
/* Colors/state stuff matches GTK.
*/
typedef struct _MetaUIColors MetaUIColors;
/* This stuff will all just be XlibRGB eventually. Right now
* it has a stub implementation.
*/
#include "screen.h"
#include "util.h"
#include "api.h"
gulong meta_screen_get_x_pixel (MetaScreen *screen,
const PangoColor *color);
void meta_screen_init_visual_info (MetaScreen *screen);

View File

@@ -64,11 +64,12 @@ typedef enum
META_MENU_OP_MOVE = 1 << 9,
META_MENU_OP_RESIZE = 1 << 10,
META_MENU_OP_ABOVE = 1 << 11,
META_MENU_OP_MOVE_LEFT = 1 << 12,
META_MENU_OP_MOVE_RIGHT = 1 << 13,
META_MENU_OP_MOVE_UP = 1 << 14,
META_MENU_OP_MOVE_DOWN = 1 << 15,
META_MENU_OP_RECOVER = 1 << 16
META_MENU_OP_UNABOVE = 1 << 12,
META_MENU_OP_MOVE_LEFT = 1 << 13,
META_MENU_OP_MOVE_RIGHT = 1 << 14,
META_MENU_OP_MOVE_UP = 1 << 15,
META_MENU_OP_MOVE_DOWN = 1 << 16,
META_MENU_OP_RECOVER = 1 << 17
} MetaMenuOp;
typedef struct _MetaWindowMenu MetaWindowMenu;
@@ -171,12 +172,14 @@ typedef enum
typedef enum
{
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_NONE,
META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST
} MetaActionDoubleClickTitlebar;
META_ACTION_TITLEBAR_TOGGLE_SHADE,
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE,
META_ACTION_TITLEBAR_MINIMIZE,
META_ACTION_TITLEBAR_NONE,
META_ACTION_TITLEBAR_LOWER,
META_ACTION_TITLEBAR_MENU,
META_ACTION_TITLEBAR_LAST
} MetaActionTitlebar;
typedef enum
{
@@ -214,12 +217,24 @@ typedef enum
*/
typedef enum
{
META_DIRECTION_LEFT = 1 << 0,
META_DIRECTION_RIGHT = 1 << 1,
META_DIRECTION_TOP = 1 << 2,
META_DIRECTION_BOTTOM = 1 << 3,
META_DIRECTION_UP = 1 << 2, /* Alternate name for TOP */
META_DIRECTION_DOWN = 1 << 3 /* Alternate name for BOTTOM */
META_DIRECTION_LEFT = 1 << 0,
META_DIRECTION_RIGHT = 1 << 1,
META_DIRECTION_TOP = 1 << 2,
META_DIRECTION_BOTTOM = 1 << 3,
/* Some aliases for making code more readable for various circumstances. */
META_DIRECTION_UP = META_DIRECTION_TOP,
META_DIRECTION_DOWN = META_DIRECTION_BOTTOM,
/* A few more definitions using aliases */
META_DIRECTION_HORIZONTAL = META_DIRECTION_LEFT | META_DIRECTION_RIGHT,
META_DIRECTION_VERTICAL = META_DIRECTION_UP | META_DIRECTION_DOWN,
/* And a few more aliases */
META_SIDE_LEFT = META_DIRECTION_LEFT,
META_SIDE_RIGHT = META_DIRECTION_RIGHT,
META_SIDE_TOP = META_DIRECTION_TOP,
META_SIDE_BOTTOM = META_DIRECTION_BOTTOM
} MetaDirection;
/* Function a window button can have. Note, you can't add stuff here

File diff suppressed because it is too large Load Diff

View File

@@ -28,23 +28,12 @@
#include "display.h"
#include "spring-model.h"
#ifdef HAVE_COMPOSITE_EXTENSIONS
#include "cm/deform.h"
/* FIXME: Needs namespacing. */
void get_patch_points (Model *model, CmPoint points[4][4]);
#endif
typedef void (* MetaAnimationFinishedFunc) (gpointer data);
/* XXX namespace me */
void compute_window_rect (MetaWindow *window, MetaRectangle *rect);
MetaCompositor* meta_compositor_new (MetaDisplay *display);
void meta_compositor_unref (MetaCompositor *compositor);
void meta_compositor_process_event (MetaCompositor *compositor,
XEvent *xevent,
MetaWindow *window);
void meta_compositor_add_window (MetaCompositor *compositor,
MetaWindow *window,
Window xwindow,
XWindowAttributes *attrs);
void meta_compositor_remove_window (MetaCompositor *compositor,
@@ -57,23 +46,11 @@ void meta_compositor_manage_screen (MetaCompositor *compositor,
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
MetaScreen *screen);
#if 0
void meta_compositor_minimize (MetaCompositor *compositor,
MetaWindow *window,
int x,
int y,
int width,
int height,
MetaAnimationFinishedFunc finished_cb,
gpointer finished_data);
#endif
void meta_compositor_set_updates (MetaCompositor *compositor,
MetaWindow *window,
gboolean updates);
void
meta_compositor_set_updates (MetaCompositor *compositor,
MetaWindow *window,
gboolean updates);
void
meta_compositor_destroy (MetaCompositor *compositor);
void meta_compositor_destroy (MetaCompositor *compositor);
void meta_compositor_begin_move (MetaCompositor *compositor,
MetaWindow *window,
@@ -86,7 +63,7 @@ void meta_compositor_end_move (MetaCompositor *compositor,
MetaWindow *window);
void meta_compositor_free_window (MetaCompositor *compositor,
MetaWindow *window);
void meta_compositor_free_window (MetaCompositor *compositor,
MetaWindow *window);
Pixmap meta_compositor_get_window_pixmap (MetaCompositor *compositor,
MetaWindow *window);
#endif /* META_COMPOSITOR_H */

View File

@@ -350,7 +350,7 @@ setup_constraint_info (ConstraintInfo *info,
else if (flags & META_IS_RESIZE_ACTION)
info->action_type = ACTION_RESIZE;
else if (flags & META_IS_MOVE_ACTION)
info->action_type = ACTION_MOVE_AND_RESIZE;
info->action_type = ACTION_MOVE;
else
g_error ("BAD, BAD developer! No treat for you! (Fix your calls to "
"meta_window_move_resize_internal()).\n");
@@ -365,7 +365,7 @@ setup_constraint_info (ConstraintInfo *info,
* and (b) ignored it for aspect ratio windows -- at least in those
* cases where both directions do actually change size.
*/
info->fixed_directions = 0;
info->fixed_directions = FIXED_DIRECTION_NONE;
/* If x directions don't change but either y direction does */
if ( orig->x == new->x && orig->x + orig->width == new->x + new->width &&
(orig->y != new->y || orig->y + orig->height != new->y + new->height))
@@ -385,7 +385,7 @@ setup_constraint_info (ConstraintInfo *info,
* aren't explicit user interaction, though, so just clear it out.
*/
if (!info->is_user_action)
info->fixed_directions = 0;
info->fixed_directions = FIXED_DIRECTION_NONE;
xinerama_info =
meta_screen_get_xinerama_for_rect (window->screen, &info->current);
@@ -441,7 +441,7 @@ setup_constraint_info (ConstraintInfo *info,
"Freakin' Invalid Stupid",
(info->is_user_action) ? "true" : "false",
meta_gravity_to_string (info->resize_gravity),
(info->fixed_directions == 0) ? "None" :
(info->fixed_directions == FIXED_DIRECTION_NONE) ? "None" :
(info->fixed_directions == FIXED_DIRECTION_X) ? "X fixed" :
(info->fixed_directions == FIXED_DIRECTION_Y) ? "Y fixed" :
"Freakin' Invalid Stupid",
@@ -500,7 +500,7 @@ place_window_if_needed(MetaWindow *window,
/* Since we just barely placed the window, there's no reason to
* consider any of the directions fixed.
*/
info->fixed_directions = 0;
info->fixed_directions = FIXED_DIRECTION_NONE;
}
if (window->placed || did_placement)
@@ -691,7 +691,8 @@ constrain_maximization (MetaWindow *window,
ConstraintPriority priority,
gboolean check_only)
{
MetaRectangle min_size, max_size, work_area;
MetaRectangle target_size;
MetaRectangle min_size, max_size;
gboolean hminbad, vminbad;
gboolean horiz_equal, vert_equal;
gboolean constraint_already_satisfied;
@@ -703,20 +704,51 @@ constrain_maximization (MetaWindow *window,
if (!window->maximized_horizontally && !window->maximized_vertically)
return TRUE;
work_area = info->work_area_xinerama;
unextend_by_frame (&work_area, info->fgeom);
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
/* Calculate target_size = maximized size of (window + frame) */
if (window->maximized_horizontally && window->maximized_vertically)
target_size = info->work_area_xinerama;
else
{
/* Amount of maximization possible in a single direction depends
* on which struts could occlude the window given its current
* position. For example, a vertical partial strut on the right
* is only relevant for a horizontally maximized window when the
* window is at a vertical position where it could be occluded
* by that partial strut.
*/
MetaDirection direction;
GSList *active_workspace_struts;
hminbad = work_area.width < min_size.width && window->maximized_horizontally;
vminbad = work_area.height < min_size.height && window->maximized_vertically;
if (window->maximized_horizontally)
direction = META_DIRECTION_HORIZONTAL;
else
direction = META_DIRECTION_VERTICAL;
active_workspace_struts = window->screen->active_workspace->all_struts;
target_size = info->current;
extend_by_frame (&target_size, info->fgeom);
meta_rectangle_expand_to_avoiding_struts (&target_size,
&info->entire_xinerama,
direction,
active_workspace_struts);
}
/* Now make target_size = maximized size of client window */
unextend_by_frame (&target_size, info->fgeom);
/* Check min size constraints; max size constraints are ignored for maximized
* windows, as per bug 327543.
*/
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
hminbad = target_size.width < min_size.width && window->maximized_horizontally;
vminbad = target_size.height < min_size.height && window->maximized_vertically;
if (hminbad || vminbad)
return TRUE;
/* Determine whether constraint is already satisfied; exit if it is */
horiz_equal = work_area.x == info->current.x &&
work_area.width == info->current.width;
vert_equal = work_area.y == info->current.y &&
work_area.height == info->current.height;
horiz_equal = target_size.x == info->current.x &&
target_size.width == info->current.width;
vert_equal = target_size.y == info->current.y &&
target_size.height == info->current.height;
constraint_already_satisfied =
(horiz_equal || !window->maximized_horizontally) &&
(vert_equal || !window->maximized_vertically);
@@ -726,13 +758,13 @@ constrain_maximization (MetaWindow *window,
/*** Enforce constraint ***/
if (window->maximized_horizontally)
{
info->current.x = work_area.x;
info->current.width = work_area.width;
info->current.x = target_size.x;
info->current.width = target_size.width;
}
if (window->maximized_vertically)
{
info->current.y = work_area.y;
info->current.height = work_area.height;
info->current.y = target_size.y;
info->current.height = target_size.height;
}
return TRUE;
}
@@ -777,6 +809,7 @@ constrain_size_increments (MetaWindow *window,
gboolean check_only)
{
int bh, hi, bw, wi, extra_height, extra_width;
int new_width, new_height;
gboolean constraint_already_satisfied;
if (priority > PRIORITY_SIZE_HINTS_INCREMENTS)
@@ -794,10 +827,12 @@ constrain_size_increments (MetaWindow *window,
wi = window->size_hints.width_inc;
extra_height = (info->current.height - bh) % hi;
extra_width = (info->current.width - bw) % wi;
/* ignore size increments for maximized windows */
if (window->maximized_horizontally)
extra_width *= 0;
if (window->maximized_vertically)
extra_height *= 0;
/* constraint is satisfied iff there is no extra height or width */
constraint_already_satisfied =
(extra_height == 0 && extra_width == 0);
@@ -805,12 +840,24 @@ constrain_size_increments (MetaWindow *window,
return constraint_already_satisfied;
/*** Enforce constraint ***/
/* Shrink to base + N * inc */
new_width = info->current.width - extra_width;
new_height = info->current.height - extra_height;
/* Adjusting down instead of up (as done in the above two lines) may
* violate minimum size constraints; fix the adjustment if this
* happens.
*/
if (new_width < window->size_hints.min_width)
new_width += ((window->size_hints.min_width - new_width)/wi + 1)*wi;
if (new_height < window->size_hints.min_height)
new_height += ((window->size_hints.min_height - new_height)/hi + 1)*hi;
/* Resize to the new size */
meta_rectangle_resize_with_gravity (&info->orig,
&info->current,
info->resize_gravity,
info->current.width - extra_width,
info->current.height - extra_height);
new_width,
new_height);
return TRUE;
}
@@ -994,13 +1041,15 @@ do_screen_and_xinerama_relative_constraints (
gboolean exit_early = FALSE, constraint_satisfied;
MetaRectangle how_far_it_can_be_smushed, min_size, max_size;
#ifdef WITH_VERBOSE_MODE
/* First, log some debugging information */
char spanning_region[1 + 28 * g_list_length (region_spanning_rectangles)];
(void) spanning_region; /* Avoid stupid & incorrect compiler warnings... */
meta_topic (META_DEBUG_GEOMETRY,
"screen/xinerama constraint; region_spanning_rectangles: %s\n",
meta_rectangle_region_to_string (region_spanning_rectangles, ", ",
spanning_region));
#endif
/* Determine whether constraint applies; exit if it doesn't */
how_far_it_can_be_smushed = info->current;

View File

@@ -42,7 +42,7 @@
*/
static MetaWindow *
get_window (Display *xdisplay,
Window frame_xwindow)
Window frame_xwindow)
{
MetaDisplay *display;
MetaWindow *window;
@@ -60,125 +60,156 @@ get_window (Display *xdisplay,
}
void
meta_core_get_client_size (Display *xdisplay,
Window frame_xwindow,
int *width,
int *height)
meta_core_get (Display *xdisplay,
Window xwindow,
...)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
if (width)
*width = window->rect.width;
if (height)
*height = window->rect.height;
}
va_list args;
MetaCoreGetType request;
gboolean
meta_core_window_has_frame (Display *xdisplay,
Window frame_xwindow)
{
MetaDisplay *display;
MetaWindow *window;
display = meta_display_for_x_display (xdisplay);
window = meta_display_lookup_x_window (display, frame_xwindow);
MetaDisplay *display = meta_display_for_x_display (xdisplay);
MetaWindow *window = meta_display_lookup_x_window (display, xwindow);
return window != NULL && window->frame != NULL;
}
va_start (args, xwindow);
gboolean
meta_core_titlebar_is_onscreen (Display *xdisplay,
Window frame_xwindow)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
request = va_arg (args, MetaCoreGetType);
return meta_window_titlebar_is_onscreen (window);
}
/* Now, we special-case the first request slightly. Mostly, requests
* for information on windows which have no frame are errors.
* But sometimes we may want to know *whether* a window has a frame.
* In this case, pass the key META_CORE_WINDOW_HAS_FRAME
* as the *first* request, with a pointer to a boolean; if the window
* has no frame, this will be set to False and meta_core_get will
* exit immediately (so the values of any other requests will be
* undefined). Otherwise it will be set to True and meta_core_get will
* continue happily on its way.
*/
Window
meta_core_get_client_xwindow (Display *xdisplay,
Window frame_xwindow)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
if (request != META_CORE_WINDOW_HAS_FRAME &&
(window == NULL || window->frame == NULL)) {
meta_bug ("No such frame window 0x%lx!\n", xwindow);
return;
}
return window->xwindow;
}
while (request != META_CORE_GET_END) {
gpointer answer = va_arg (args, gpointer);
MetaFrameFlags
meta_core_get_frame_flags (Display *xdisplay,
Window frame_xwindow)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
return meta_frame_get_flags (window->frame);
}
switch (request) {
case META_CORE_WINDOW_HAS_FRAME:
*((gboolean*)answer) = window != NULL && window->frame != NULL;
if (!*((gboolean*)answer)) return; /* see above */
break;
case META_CORE_GET_CLIENT_WIDTH:
*((gint*)answer) = window->rect.width;
break;
case META_CORE_GET_CLIENT_HEIGHT:
*((gint*)answer) = window->rect.height;
break;
case META_CORE_IS_TITLEBAR_ONSCREEN:
*((gboolean*)answer) = meta_window_titlebar_is_onscreen (window);
break;
case META_CORE_GET_CLIENT_XWINDOW:
*((Window*)answer) = window->xwindow;
break;
case META_CORE_GET_FRAME_FLAGS:
*((MetaFrameFlags*)answer) = meta_frame_get_flags (window->frame);
break;
case META_CORE_GET_FRAME_TYPE:
{
MetaFrameType base_type = META_FRAME_TYPE_LAST;
MetaFrameType
meta_core_get_frame_type (Display *xdisplay,
Window frame_xwindow)
{
MetaWindow *window;
MetaFrameType base_type;
switch (window->type)
{
case META_WINDOW_NORMAL:
base_type = META_FRAME_TYPE_NORMAL;
break;
window = get_window (xdisplay, frame_xwindow);
case META_WINDOW_DIALOG:
base_type = META_FRAME_TYPE_DIALOG;
break;
base_type = META_FRAME_TYPE_LAST;
switch (window->type)
{
case META_WINDOW_NORMAL:
base_type = META_FRAME_TYPE_NORMAL;
break;
case META_WINDOW_DIALOG:
base_type = META_FRAME_TYPE_DIALOG;
break;
case META_WINDOW_MODAL_DIALOG:
base_type = META_FRAME_TYPE_MODAL_DIALOG;
break;
case META_WINDOW_MENU:
base_type = META_FRAME_TYPE_MENU;
break;
case META_WINDOW_MODAL_DIALOG:
base_type = META_FRAME_TYPE_MODAL_DIALOG;
break;
case META_WINDOW_UTILITY:
base_type = META_FRAME_TYPE_UTILITY;
break;
case META_WINDOW_DESKTOP:
case META_WINDOW_DOCK:
case META_WINDOW_TOOLBAR:
case META_WINDOW_SPLASHSCREEN:
/* No frame */
base_type = META_FRAME_TYPE_LAST;
break;
case META_WINDOW_MENU:
base_type = META_FRAME_TYPE_MENU;
break;
case META_WINDOW_UTILITY:
base_type = META_FRAME_TYPE_UTILITY;
break;
case META_WINDOW_DESKTOP:
case META_WINDOW_DOCK:
case META_WINDOW_TOOLBAR:
case META_WINDOW_SPLASHSCREEN:
/* No frame */
base_type = META_FRAME_TYPE_LAST;
break;
}
if (base_type == META_FRAME_TYPE_LAST)
{
/* can't add border if undecorated */
*((MetaFrameType*)answer) = META_FRAME_TYPE_LAST;
}
else if (window->border_only)
{
/* override base frame type */
*((MetaFrameType*)answer) = META_FRAME_TYPE_BORDER;
}
else
{
*((MetaFrameType*)answer) = base_type;
}
break;
}
case META_CORE_GET_MINI_ICON:
*((GdkPixbuf**)answer) = window->mini_icon;
break;
case META_CORE_GET_ICON:
*((GdkPixbuf**)answer) = window->icon;
break;
case META_CORE_GET_X:
meta_window_get_position (window, (int*)answer, NULL);
break;
case META_CORE_GET_Y:
meta_window_get_position (window, NULL, (int*)answer);
break;
case META_CORE_GET_FRAME_WORKSPACE:
*((gint*)answer) = meta_window_get_net_wm_desktop (window);
break;
case META_CORE_GET_FRAME_X:
*((gint*)answer) = window->frame->rect.x;
break;
case META_CORE_GET_FRAME_Y:
*((gint*)answer) = window->frame->rect.y;
break;
case META_CORE_GET_FRAME_WIDTH:
*((gint*)answer) = window->frame->rect.width;
break;
case META_CORE_GET_FRAME_HEIGHT:
*((gint*)answer) = window->frame->rect.height;
break;
case META_CORE_GET_SCREEN_WIDTH:
*((gint*)answer) = window->screen->rect.width;
break;
case META_CORE_GET_SCREEN_HEIGHT:
*((gint*)answer) = window->screen->rect.height;
break;
default:
meta_warning(_("Unknown window information request: %d"), request);
}
if (base_type == META_FRAME_TYPE_LAST)
return META_FRAME_TYPE_LAST; /* can't add border if undecorated */
else if (window->border_only)
return META_FRAME_TYPE_BORDER; /* override base frame type */
else
return base_type;
}
request = va_arg (args, MetaCoreGetType);
}
GdkPixbuf*
meta_core_get_mini_icon (Display *xdisplay,
Window frame_xwindow)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
return window->mini_icon;
}
GdkPixbuf*
meta_core_get_icon (Display *xdisplay,
Window frame_xwindow)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
return window->icon;
va_end (args);
}
void
@@ -187,7 +218,7 @@ meta_core_queue_frame_resize (Display *xdisplay,
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
meta_window_queue_move_resize (window);
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
}
void
@@ -275,32 +306,6 @@ meta_core_user_focus (Display *xdisplay,
meta_window_focus (window, timestamp);
}
void
meta_core_get_position (Display *xdisplay,
Window frame_xwindow,
int *x,
int *y)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
meta_window_get_position (window, x, y);
}
void
meta_core_get_size (Display *xdisplay,
Window frame_xwindow,
int *width,
int *height)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
if (width)
*width = window->rect.width;
if (height)
*height = window->rect.height;
}
void
meta_core_minimize (Display *xdisplay,
Window frame_xwindow)
@@ -451,36 +456,6 @@ meta_core_get_active_workspace (Screen *xscreen)
return meta_workspace_index (screen->active_workspace);
}
int
meta_core_get_frame_workspace (Display *xdisplay,
Window frame_xwindow)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
return meta_window_get_net_wm_desktop (window);
}
void
meta_core_get_frame_extents (Display *xdisplay,
Window frame_xwindow,
int *x,
int *y,
int *width,
int *height)
{
MetaWindow *window = get_window (xdisplay, frame_xwindow);
if (x)
*x = window->frame->rect.x;
if (y)
*y = window->frame->rect.y;
if (width)
*width = window->frame->rect.width;
if (height)
*height = window->frame->rect.height;
}
void
meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow,
@@ -531,6 +506,7 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
name = META_KEYBINDING_TOGGLE_STICKY;
break;
case META_MENU_OP_ABOVE:
case META_MENU_OP_UNABOVE:
name = META_KEYBINDING_TOGGLE_ABOVE;
break;
case META_MENU_OP_WORKSPACES:
@@ -630,7 +606,6 @@ meta_core_begin_grab_op (Display *xdisplay,
MetaGrabOp op,
gboolean pointer_already_grabbed,
gboolean frame_action,
int event_serial,
int button,
gulong modmask,
guint32 timestamp,
@@ -649,7 +624,6 @@ meta_core_begin_grab_op (Display *xdisplay,
return meta_display_begin_grab_op (display, screen, window,
op, pointer_already_grabbed,
frame_action,
event_serial,
button, modmask,
timestamp, root_x, root_y);
}
@@ -731,20 +705,6 @@ meta_core_set_screen_cursor (Display *xdisplay,
meta_frame_set_screen_cursor (window->frame, cursor);
}
void
meta_core_get_screen_size (Display *xdisplay,
Window frame_on_screen,
int *width,
int *height)
{
MetaWindow *window = get_window (xdisplay, frame_on_screen);
if (width)
*width = window->screen->rect.width;
if (height)
*height = window->screen->rect.height;
}
void
meta_core_increment_event_serial (Display *xdisplay)
{

View File

@@ -29,30 +29,68 @@
#include <gdk/gdkx.h>
#include "common.h"
void meta_core_get_client_size (Display *xdisplay,
Window frame_xwindow,
int *width,
int *height);
typedef enum
{
META_CORE_GET_END = 0,
META_CORE_WINDOW_HAS_FRAME,
META_CORE_GET_CLIENT_WIDTH,
META_CORE_GET_CLIENT_HEIGHT,
META_CORE_IS_TITLEBAR_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_X,
META_CORE_GET_Y,
META_CORE_GET_FRAME_WORKSPACE,
META_CORE_GET_FRAME_X,
META_CORE_GET_FRAME_Y,
META_CORE_GET_FRAME_WIDTH,
META_CORE_GET_FRAME_HEIGHT,
META_CORE_GET_SCREEN_WIDTH,
META_CORE_GET_SCREEN_HEIGHT,
} MetaCoreGetType;
gboolean meta_core_titlebar_is_onscreen (Display *xdisplay,
Window frame_xwindow);
gboolean meta_core_window_has_frame (Display *xdisplay,
Window frame_xwindow);
Window meta_core_get_client_xwindow (Display *xdisplay,
Window frame_xwindow);
MetaFrameFlags meta_core_get_frame_flags (Display *xdisplay,
Window frame_xwindow);
MetaFrameType meta_core_get_frame_type (Display *xdisplay,
Window frame_xwindow);
GdkPixbuf* meta_core_get_mini_icon (Display *xdisplay,
Window frame_xwindow);
GdkPixbuf* meta_core_get_icon (Display *xdisplay,
Window frame_xwindow);
/* General information function about the given window. Pass in a sequence of
* pairs of MetaCoreGetTypes and pointers to variables; the variables will be
* filled with the requested values. End the list with META_CORE_GET_END.
* For example:
*
* meta_core_get (my_display, my_window,
* META_CORE_GET_X, &x,
* META_CORE_GET_Y, &y,
* META_CORE_GET_END);
*
* If the window doesn't have a frame, this will raise a meta_bug. To suppress
* this behaviour, ask META_CORE_WINDOW_HAS_FRAME as the *first* question in
* the list. If the window has no frame, the answer to this question will be
* False, and anything else you asked will be undefined. Otherwise, the answer
* will be True. The answer will necessarily be True if you ask the question
* in any other position. The positions of all other questions don't matter.
*
* The reason for this function is that some parts of the program don't know
* about MetaWindows. But they *can* see core.h. So we used to have a whole
* load of functions which took a display and an X window, looked up the
* relevant MetaWindow, and returned information about it. The trouble with
* that is that looking up the MetaWindow is a nontrivial operation, and
* consolidating the calls in this way makes (for example) frame exposes
* 33% faster, according to valgrind.
*
* This function would perhaps be slightly better if the questions were
* represented by pointers, perhaps gchar*s, because then we could take
* advantage of gcc's automatic sentinel checking. On the other hand, this
* immediately suggests string comparison, and that's slow.
*
* Another possible improvement is that core.h still has a bunch of
* functions which can't be described by the formula "give a display and
* an X window, get a single value" (meta_core_user_move, for example), but
* which could theoretically be handled by this function if we relaxed the
* requirement that all questions should have exactly one argument.
*/
void meta_core_get (Display *xdisplay,
Window window,
...);
void meta_core_queue_frame_resize (Display *xdisplay,
Window frame_xwindow);
@@ -78,17 +116,6 @@ void meta_core_user_focus (Display *xdisplay,
Window frame_xwindow,
guint32 timestamp);
/* get position of client, same coord space expected by move */
void meta_core_get_position (Display *xdisplay,
Window frame_xwindow,
int *x,
int *y);
void meta_core_get_size (Display *xdisplay,
Window frame_xwindow,
int *width,
int *height);
void meta_core_minimize (Display *xdisplay,
Window frame_xwindow);
void meta_core_toggle_maximize (Display *xdisplay,
@@ -126,14 +153,6 @@ const char* meta_core_get_workspace_name_with_index (Display *xdisplay,
Window xroot,
int index);
void meta_core_get_frame_extents (Display *xdisplay,
Window frame_xwindow,
int *x,
int *y,
int *width,
int *height);
void meta_core_show_window_menu (Display *xdisplay,
Window frame_xwindow,
int root_x,
@@ -151,7 +170,6 @@ gboolean meta_core_begin_grab_op (Display *xdisplay,
MetaGrabOp op,
gboolean pointer_already_grabbed,
gboolean frame_action,
int event_serial,
int button,
gulong modmask,
guint32 timestamp,
@@ -171,19 +189,12 @@ void meta_core_set_screen_cursor (Display *xdisplay,
Window frame_on_screen,
MetaCursor cursor);
void meta_core_get_screen_size (Display *xdisplay,
Window frame_on_screen,
int *width,
int *height);
/* Used because we ignore EnterNotify when a window is unmapped that
* really shouldn't cause focus changes, by comparing the event serial
* of the EnterNotify and the UnmapNotify.
*/
void meta_core_increment_event_serial (Display *display);
int meta_ui_get_last_event_serial (Display *xdisplay);
void meta_invalidate_default_icons (void);
#endif

View File

@@ -306,6 +306,7 @@ delete_ping_timeout_func (MetaDisplay *display,
char numbuf[32];
char timestampbuf[32];
char *window_id_str;
char *window_title;
GIOChannel *channel;
meta_topic (META_DEBUG_PING,
@@ -319,6 +320,7 @@ delete_ping_timeout_func (MetaDisplay *display,
}
window_id_str = g_strdup_printf ("0x%lx", window->xwindow);
window_title = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL);
sprintf (numbuf, "%d", window->screen->number);
sprintf (timestampbuf, "%u", timestamp);
@@ -329,7 +331,7 @@ delete_ping_timeout_func (MetaDisplay *display,
argv[3] = "--timestamp";
argv[4] = timestampbuf;
argv[5] = "--kill-window-question";
argv[6] = window->title;
argv[6] = window_title;
argv[7] = window_id_str;
argv[8] = NULL;
@@ -362,6 +364,7 @@ delete_ping_timeout_func (MetaDisplay *display,
g_io_channel_unref (channel);
out:
g_free (window_title);
g_free (window_id_str);
}

View File

@@ -65,6 +65,11 @@
#ifdef HAVE_XCURSOR
#include <X11/Xcursor/Xcursor.h>
#endif
#ifdef HAVE_COMPOSITE_EXTENSIONS
#include <X11/extensions/Xcomposite.h>
#include <X11/extensions/Xdamage.h>
#include <X11/extensions/Xfixes.h>
#endif
#include <string.h>
#define GRAB_OP_IS_WINDOW_SWITCH(g) \
@@ -186,10 +191,23 @@ sn_error_trap_pop (SnDisplay *sn_display,
#endif
static void
enable_compositor (MetaDisplay *display)
enable_compositor (MetaDisplay *display,
gboolean composite_windows)
{
GSList *list;
if (!META_DISPLAY_HAS_COMPOSITE (display) ||
!META_DISPLAY_HAS_DAMAGE (display) ||
!META_DISPLAY_HAS_XFIXES (display) ||
!META_DISPLAY_HAS_RENDER (display))
{
meta_warning (_("Missing %s extension required for compositing"),
!META_DISPLAY_HAS_COMPOSITE (display) ? "composite" :
!META_DISPLAY_HAS_DAMAGE (display) ? "damage" :
!META_DISPLAY_HAS_XFIXES (display) ? "xfixes" : "render");
return;
}
if (!display->compositor)
display->compositor = meta_compositor_new (display);
@@ -203,7 +221,8 @@ enable_compositor (MetaDisplay *display)
meta_compositor_manage_screen (screen->display->compositor,
screen);
meta_screen_composite_all_windows (screen);
if (composite_windows)
meta_screen_composite_all_windows (screen);
}
}
@@ -333,7 +352,10 @@ meta_display_open (void)
"_NET_DESKTOP_VIEWPORT",
"_METACITY_VERSION",
"_NET_WM_VISIBLE_NAME",
"_NET_WM_VISIBLE_ICON_NAME"
"_NET_WM_VISIBLE_ICON_NAME",
"_NET_WM_USER_TIME_WINDOW",
"_NET_WM_ACTION_ABOVE",
"_NET_WM_ACTION_BELOW",
};
Atom atoms[G_N_ELEMENTS(atom_names)];
@@ -395,7 +417,8 @@ meta_display_open (void)
update_window_grab_modifiers (display);
meta_prefs_add_listener (prefs_changed_callback, display);
meta_verbose ("Creating %d atoms\n", G_N_ELEMENTS (atom_names));
XInternAtoms (display->xdisplay, atom_names, G_N_ELEMENTS (atom_names),
False, atoms);
display->atom_net_wm_name = atoms[0];
@@ -492,6 +515,9 @@ meta_display_open (void)
display->atom_metacity_version = atoms[91];
display->atom_net_wm_visible_name = atoms[92];
display->atom_net_wm_visible_icon_name = atoms[93];
display->atom_net_wm_user_time_window = atoms[94];
display->atom_net_wm_action_above = atoms[95];
display->atom_net_wm_action_below = atoms[96];
display->prop_hooks = NULL;
meta_display_init_window_prop_hooks (display);
@@ -502,6 +528,7 @@ meta_display_open (void)
* created in screen_new
*/
display->leader_window = None;
display->timestamp_pinging_window = None;
display->xinerama_cache_invalidated = TRUE;
@@ -640,6 +667,69 @@ meta_display_open (void)
meta_verbose ("Not compiled with Render support\n");
#endif /* !HAVE_RENDER */
#ifdef HAVE_COMPOSITE_EXTENSIONS
{
display->have_composite = FALSE;
display->composite_error_base = 0;
display->composite_event_base = 0;
if (!XCompositeQueryExtension (display->xdisplay,
&display->composite_event_base,
&display->composite_error_base))
{
display->composite_error_base = 0;
display->composite_event_base = 0;
}
else
display->have_composite = TRUE;
meta_verbose ("Attempted to init Composite, found error base %d event base %d\n",
display->composite_error_base,
display->composite_event_base);
display->have_damage = FALSE;
display->damage_error_base = 0;
display->damage_event_base = 0;
if (!XDamageQueryExtension (display->xdisplay,
&display->damage_event_base,
&display->damage_error_base))
{
display->damage_error_base = 0;
display->damage_event_base = 0;
}
else
display->have_damage = TRUE;
meta_verbose ("Attempted to init Damage, found error base %d event base %d\n",
display->damage_error_base,
display->damage_event_base);
display->have_xfixes = FALSE;
display->xfixes_error_base = 0;
display->xfixes_event_base = 0;
if (!XFixesQueryExtension (display->xdisplay,
&display->xfixes_event_base,
&display->xfixes_error_base))
{
display->xfixes_error_base = 0;
display->xfixes_event_base = 0;
}
else
display->have_xfixes = TRUE;
meta_verbose ("Attempted to init XFixes, found error base %d event base %d\n",
display->xfixes_error_base,
display->xfixes_event_base);
}
#else /* HAVE_COMPOSITE_EXTENSIONS */
meta_verbose ("Not compiled with Composite support\n");
#endif /* !HAVE_COMPOSITE_EXTENSIONS */
#ifdef HAVE_XCURSOR
{
XcursorSetTheme (display->xdisplay, meta_prefs_get_cursor_theme ());
@@ -657,8 +747,15 @@ meta_display_open (void)
gulong data[1];
XEvent event;
display->leader_window = meta_create_offscreen_window (display->xdisplay,
DefaultRootWindow (display->xdisplay));
/* We only care about the PropertyChangeMask in the next 30 or so lines of
* code. Note that gdk will at some point unset the PropertyChangeMask for
* this window, so we can't rely on it still being set later. See bug
* 354213 for details.
*/
display->leader_window =
meta_create_offscreen_window (display->xdisplay,
DefaultRootWindow (display->xdisplay),
PropertyChangeMask);
meta_prop_set_utf8_string_hint (display,
display->leader_window,
@@ -683,8 +780,23 @@ meta_display_open (void)
&event);
timestamp = event.xproperty.time;
/* Make it painfully clear that we can't rely on PropertyNotify events on
* this window, as per bug 354213.
*/
XSelectInput(display->xdisplay,
display->leader_window,
NoEventMask);
}
/* Make a little window used only for pinging the server for timestamps; note
* that meta_create_offscreen_window already selects for PropertyChangeMask.
*/
display->timestamp_pinging_window =
meta_create_offscreen_window (display->xdisplay,
DefaultRootWindow (display->xdisplay),
PropertyChangeMask);
display->last_focus_time = timestamp;
display->last_user_time = timestamp;
display->compositor = NULL;
@@ -713,7 +825,13 @@ meta_display_open (void)
meta_display_close (display, timestamp);
return FALSE;
}
/* We don't composite the windows here because they will be composited
faster with the call to meta_screen_manage_all_windows further down
the code */
if (meta_prefs_get_compositing_manager ())
enable_compositor (display, FALSE);
meta_display_grab (display);
/* Now manage all existing windows */
@@ -767,9 +885,6 @@ meta_display_open (void)
meta_display_ungrab (display);
if (meta_prefs_get_compositing_manager ())
enable_compositor (display);
/* Done opening new display */
display->display_opening = FALSE;
@@ -910,7 +1025,7 @@ meta_display_close (MetaDisplay *display,
meta_display_shutdown_keys (display);
if (display->compositor)
meta_compositor_unref (display->compositor);
meta_compositor_destroy (display->compositor);
g_free (display);
@@ -1192,14 +1307,13 @@ meta_display_get_current_time_roundtrip (MetaDisplay *display)
* would use it as a property. The type doesn't matter.
*/
XChangeProperty (display->xdisplay,
display->leader_window,
display->timestamp_pinging_window,
XA_PRIMARY, XA_STRING, 8,
PropModeAppend, NULL, 0);
XWindowEvent (display->xdisplay,
display->leader_window,
display->timestamp_pinging_window,
PropertyChangeMask,
&property_event);
timestamp = property_event.xproperty.time;
}
@@ -1341,80 +1455,6 @@ meta_display_queue_autoraise_callback (MetaDisplay *display,
}
#if 0
static void
handle_net_moveresize_window (MetaDisplay* display,
XEvent *event)
{
MetaWindow *window;
int x, y, width, height;
gboolean only_resize;
unsigned int gravity;
unsigned int mode;
window = meta_display_lookup_x_window (display,
event->xclient.window);
/*
* FIXME: The specification seems to have serious endian issues
* here. Does bits 8-11 mean the high-order byte, or the low-order
* byte?
*/
gravity = (event->xclient.data.l[0] & ~0xff);
mode = (event->xclient.data.l[0] & ~0xff00) >> 8;
if (window)
{
/* FIXME!!!! This function is _wrong_ except for the resize-only
* case. Even then, it sucks to special case the code instead of
* factoring out common functionality with the configure reqest
* handling, especially since the EWMH says this message should be
* treated identically to a configure request with the exception of
* having a special gravity specified.
*/
meta_window_get_gravity_position (window, &x, &y);
width = window->rect.width;
height = window->rect.height;
if (mode & (CWX | CWY))
only_resize = FALSE;
else
only_resize = TRUE;
if (mode & CWX)
x = event->xclient.data.l[1];
if (mode & CWY)
y = event->xclient.data.l[2];
if (mode & CWWidth)
width = event->xclient.data.l[3];
if (mode & CWHeight)
height = event->xclient.data.l[4];
if (only_resize)
{
if (gravity)
meta_window_resize_with_gravity (window,
FALSE,
width,
height,
gravity);
else
meta_window_resize (window,
FALSE,
width,
height);
}
else
{
meta_window_move_resize (window,
FALSE,
x,
y,
width,
height);
}
}
}
static void
handle_net_restack_window (MetaDisplay* display,
XEvent *event)
@@ -1457,6 +1497,7 @@ event_callback (XEvent *event,
gpointer data)
{
MetaWindow *window;
MetaWindow *property_for_window;
MetaDisplay *display;
Window modified;
gboolean frame_was_receiver;
@@ -1510,6 +1551,18 @@ event_callback (XEvent *event,
else
window = NULL;
/* We only want to respond to _NET_WM_USER_TIME property notify
* events on _NET_WM_USER_TIME_WINDOW windows; in particular,
* responding to UnmapNotify events is kind of bad.
*/
property_for_window = NULL;
if (window && modified == window->user_time_window)
{
property_for_window = window;
window = NULL;
}
frame_was_receiver = FALSE;
if (window &&
window->frame &&
@@ -1533,7 +1586,6 @@ event_callback (XEvent *event,
if (display->grab_op != META_GRAB_OP_NONE &&
display->grab_window != NULL &&
event->xany.serial >= display->grab_start_serial &&
grab_op_is_mouse (display->grab_op))
meta_window_handle_mouse_grab_op_event (display->grab_window, event);
}
@@ -1576,7 +1628,7 @@ event_callback (XEvent *event,
{
window->frame->need_reapply_frame_shape = TRUE;
meta_warning("from event callback\n");
meta_window_queue_move_resize (window);
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
}
}
}
@@ -1619,7 +1671,6 @@ event_callback (XEvent *event,
if ((window &&
grab_op_is_mouse (display->grab_op) &&
display->grab_button != (int) event->xbutton.button &&
event->xany.serial >= display->grab_start_serial &&
display->grab_window == window) ||
grab_op_is_keyboard (display->grab_op))
{
@@ -1739,7 +1790,6 @@ event_callback (XEvent *event,
op,
TRUE,
FALSE,
event->xbutton.serial,
event->xbutton.button,
0,
event->xbutton.time,
@@ -1797,7 +1847,6 @@ event_callback (XEvent *event,
META_GRAB_OP_MOVING,
TRUE,
FALSE,
event->xbutton.serial,
event->xbutton.button,
0,
event->xbutton.time,
@@ -1808,19 +1857,16 @@ event_callback (XEvent *event,
break;
case ButtonRelease:
if (display->grab_window == window &&
event->xany.serial >= display->grab_start_serial &&
grab_op_is_mouse (display->grab_op))
meta_window_handle_mouse_grab_op_event (window, event);
break;
case MotionNotify:
if (display->grab_window == window &&
event->xany.serial >= display->grab_start_serial &&
grab_op_is_mouse (display->grab_op))
meta_window_handle_mouse_grab_op_event (window, event);
break;
case EnterNotify:
if (display->grab_window == window &&
event->xany.serial >= display->grab_start_serial &&
grab_op_is_mouse (display->grab_op))
{
meta_window_handle_mouse_grab_op_event (window, event);
@@ -1914,7 +1960,6 @@ event_callback (XEvent *event,
break;
case LeaveNotify:
if (display->grab_window == window &&
event->xany.serial >= display->grab_start_serial &&
grab_op_is_mouse (display->grab_op))
meta_window_handle_mouse_grab_op_event (window, event);
else if (window != NULL)
@@ -2173,6 +2218,8 @@ event_callback (XEvent *event,
if (window && !frame_was_receiver)
meta_window_property_notify (window, event);
else if (property_for_window && !frame_was_receiver)
meta_window_property_notify (property_for_window, event);
group = meta_display_lookup_group (display,
event->xproperty.window);
@@ -2197,9 +2244,6 @@ event_callback (XEvent *event,
else if (event->xproperty.atom ==
display->atom_net_restack_window)
handle_net_restack_window (display, event);
else if (event->xproperty.atom ==
display->atom_net_moveresize_window)
handle_net_moveresize_window (display, event);
#endif
/* we just use this property as a sentinel to avoid
@@ -3266,7 +3310,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
MetaGrabOp op,
gboolean pointer_already_grabbed,
gboolean frame_action,
int event_serial,
int button,
gulong modmask,
guint32 timestamp,
@@ -3311,12 +3354,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
}
}
/* We'll ignore any events < this serial. */
if (pointer_already_grabbed)
display->grab_start_serial = event_serial;
else
display->grab_start_serial = XNextRequest (display->xdisplay);
/* FIXME:
* If we have no MetaWindow we do our best
* and try to do the grab on the RootWindow.
@@ -3393,10 +3430,8 @@ meta_display_begin_grab_op (MetaDisplay *display,
if (display->grab_window)
{
display->grab_initial_window_pos = display->grab_window->rect;
meta_window_get_position (display->grab_window,
&display->grab_initial_window_pos.x,
&display->grab_initial_window_pos.y);
meta_window_get_client_root_coords (display->grab_window,
&display->grab_initial_window_pos);
display->grab_anchor_window_pos = display->grab_initial_window_pos;
display->grab_wireframe_active =
@@ -3920,13 +3955,12 @@ meta_display_update_active_window_hint (MetaDisplay *display)
{
GSList *tmp;
unsigned long data[2];
gulong data[1];
if (display->focus_window)
data[0] = display->focus_window->xwindow;
else
data[0] = None;
data[1] = None;
tmp = display->screens;
while (tmp != NULL)
@@ -3937,7 +3971,8 @@ meta_display_update_active_window_hint (MetaDisplay *display)
XChangeProperty (display->xdisplay, screen->xroot,
display->atom_net_active_window,
XA_WINDOW,
32, PropModeReplace, (guchar*) data, 2);
32, PropModeReplace, (guchar*) data, 1);
meta_error_trap_pop (display, FALSE);
tmp = tmp->next;
@@ -3956,7 +3991,7 @@ meta_display_queue_retheme_all_windows (MetaDisplay *display)
{
MetaWindow *window = tmp->data;
meta_window_queue_move_resize (window);
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
if (window->frame)
{
window->frame->need_reapply_frame_shape = TRUE;
@@ -4753,6 +4788,7 @@ meta_display_unmanage_windows_for_screen (MetaDisplay *display,
GSList *winlist;
winlist = meta_display_list_windows (display);
winlist = g_slist_sort (winlist, meta_display_stack_cmp);
/* Unmanage all windows */
tmp = winlist;
@@ -4765,6 +4801,24 @@ meta_display_unmanage_windows_for_screen (MetaDisplay *display,
g_slist_free (winlist);
}
int
meta_display_stack_cmp (const void *a,
const void *b)
{
MetaWindow *aw = (void*) a;
MetaWindow *bw = (void*) b;
if (aw->screen == bw->screen)
return meta_stack_windows_cmp (aw->screen->stack, aw, bw);
/* Then assume screens are stacked by number */
else if (aw->screen->number < bw->screen->number)
return -1;
else if (aw->screen->number > bw->screen->number)
return 1;
else
return 0; /* not reached in theory, if windows on same display */
}
void
meta_display_devirtualize_modifiers (MetaDisplay *display,
MetaVirtualModifier modifiers,
@@ -4862,7 +4916,7 @@ prefs_changed_callback (MetaPreference pref,
gboolean cm = meta_prefs_get_compositing_manager ();
if (cm)
enable_compositor (display);
enable_compositor (display, TRUE);
else
disable_compositor (display);
}

View File

@@ -47,7 +47,7 @@
#define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0)
typedef struct MetaCompositor MetaCompositor;
typedef struct _MetaCompositor MetaCompositor;
typedef struct _MetaDisplay MetaDisplay;
typedef struct _MetaFrame MetaFrame;
typedef struct _MetaKeyBinding MetaKeyBinding;
@@ -85,6 +85,7 @@ struct _MetaDisplay
Display *xdisplay;
Window leader_window;
Window timestamp_pinging_window;
Atom atom_net_wm_name;
Atom atom_wm_protocols;
@@ -158,6 +159,8 @@ struct _MetaDisplay
Atom atom_net_wm_action_maximize_vert;
Atom atom_net_wm_action_change_desktop;
Atom atom_net_wm_action_close;
Atom atom_net_wm_action_above;
Atom atom_net_wm_action_below;
Atom atom_net_wm_state_above;
Atom atom_net_wm_state_below;
Atom atom_net_startup_id;
@@ -180,6 +183,7 @@ struct _MetaDisplay
Atom atom_metacity_version;
Atom atom_net_wm_visible_name;
Atom atom_net_wm_visible_icon_name;
Atom atom_net_wm_user_time_window;
/* This is the actual window from focus events,
* not the one we last set
@@ -252,7 +256,6 @@ struct _MetaDisplay
MetaScreen *grab_screen;
MetaWindow *grab_window;
Window grab_xwindow;
gulong grab_start_serial;
int grab_button;
int grab_anchor_root_x;
int grab_anchor_root_y;
@@ -351,6 +354,14 @@ struct _MetaDisplay
int render_event_base;
int render_error_base;
#endif
#ifdef HAVE_COMPOSITE_EXTENSIONS
int composite_event_base;
int composite_error_base;
int damage_event_base;
int damage_error_base;
int xfixes_event_base;
int xfixes_error_base;
#endif
#ifdef HAVE_XSYNC
unsigned int have_xsync : 1;
#define META_DISPLAY_HAS_XSYNC(display) ((display)->have_xsync)
@@ -369,6 +380,18 @@ struct _MetaDisplay
#else
#define META_DISPLAY_HAS_RENDER(display) FALSE
#endif
#ifdef HAVE_COMPOSITE_EXTENSIONS
unsigned int have_composite : 1;
unsigned int have_damage : 1;
unsigned int have_xfixes : 1;
#define META_DISPLAY_HAS_COMPOSITE(display) ((display)->have_composite)
#define META_DISPLAY_HAS_DAMAGE(display) ((display)->have_damage)
#define META_DISPLAY_HAS_XFIXES(display) ((display)->have_xfixes)
#else
#define META_DISPLAY_HAS_COMPOSITE(display) FALSE
#define META_DISPLAY_HAS_DAMAGE(display) FALSE
#define META_DISPLAY_HAS_XFIXES(display) FALSE
#endif
};
/* Xserver time can wraparound, thus comparing two timestamps needs to take
@@ -413,6 +436,10 @@ void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
MetaScreen *screen,
guint32 timestamp);
/* Utility function to compare the stacking of two windows */
int meta_display_stack_cmp (const void *a,
const void *b);
/* A given MetaWindow may have various X windows that "belong"
* to it, such as the frame window.
*/
@@ -448,7 +475,6 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
MetaGrabOp op,
gboolean pointer_already_grabbed,
gboolean frame_action,
int event_serial,
int button,
gulong modmask,
guint32 timestamp,

View File

@@ -62,6 +62,9 @@ struct MetaEdgeResistanceData
ResistanceDataForAnEdge bottom_data;
};
/* !WARNING!: this function can return invalid indices (namely, either -1 or
* edges->len); this is by design, but you need to remember this.
*/
static int
find_index_of_edge_near_position (const GArray *edges,
int position,
@@ -300,9 +303,9 @@ movement_towards_edge (MetaDirection side, int increment)
case META_DIRECTION_RIGHT:
case META_DIRECTION_BOTTOM:
return increment > 0;
default:
g_assert_not_reached ();
}
g_assert_not_reached ();
}
static gboolean
@@ -330,6 +333,7 @@ apply_edge_resistance (MetaWindow *window,
gboolean keyboard_op)
{
int i, begin, end;
int last_edge;
gboolean increasing = new_pos > old_pos;
int increment = increasing ? 1 : -1;
@@ -366,6 +370,13 @@ apply_edge_resistance (MetaWindow *window,
begin = find_index_of_edge_near_position (edges, old_pos, increasing, xdir);
end = find_index_of_edge_near_position (edges, new_pos, !increasing, xdir);
/* begin and end can be outside the array index, if the window is partially
* off the screen
*/
last_edge = edges->len - 1;
begin = CLAMP (begin, 0, last_edge);
end = CLAMP (end, 0, last_edge);
/* Loop over all these edges we're moving past/to. */
i = begin;
while ((increasing && i <= end) ||

View File

@@ -69,6 +69,8 @@ typedef struct
MetaRectangle icon_rect;
} MetaMinimizeEffect, MetaUnminimizeEffect;
#if 0
/* Solaris abhors an empty struct. #397296. */
typedef struct
{
@@ -77,6 +79,7 @@ typedef struct
typedef struct
{
} MetaFocusEffect;
#endif
struct MetaEffect
{
@@ -88,8 +91,11 @@ struct MetaEffect
{
MetaMinimizeEffect minimize;
MetaUnminimizeEffect unminimize;
#if 0
/* These don't currently exist, so we aren't using them. #397296. */
MetaCloseEffect close;
MetaFocusEffect focus;
#endif
} u;
MetaEffectPriv *priv;

View File

@@ -23,6 +23,7 @@
#include <config.h>
#include "fixedtip.h"
#include "ui.h"
static GtkWidget *tip = NULL;
static GtkWidget *label = NULL;
@@ -87,6 +88,10 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
gtk_label_set_markup (GTK_LABEL (label), markup_text);
gtk_window_get_size (GTK_WINDOW (tip), &w, &h);
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
root_x = MAX(0, root_x - w);
if ((root_x + w) > screen_right_edge)
root_x -= (root_x + w) - screen_right_edge;

View File

@@ -114,6 +114,11 @@ meta_window_ensure_frame (MetaWindow *window)
meta_display_register_x_window (window->display, &frame->xwindow, window);
/* Now that frame->xwindow is registered with window, we can set its
* background.
*/
meta_ui_reset_frame_bg (window->screen->ui, frame->xwindow);
/* Reparent the client window; it may be destroyed,
* thus the error trap. We'll get a destroy notify later
* and free everything. Comment in FVWM source code says
@@ -197,7 +202,10 @@ meta_window_destroy_frame (MetaWindow *window)
XReparentWindow (window->display->xdisplay,
window->xwindow,
window->screen->xroot,
/* FIXME where to put it back depends on the gravity */
/* Using anything other than meta_window_get_position()
* coordinates here means we'll need to ensure a configure
* notify event is sent; see bug 399552.
*/
window->frame->rect.x,
window->frame->rect.y);
meta_error_trap_pop (window->display, FALSE);
@@ -215,7 +223,7 @@ meta_window_destroy_frame (MetaWindow *window)
g_free (frame);
/* Put our state back where it should be */
meta_window_queue_calc_showing (window);
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
}

View File

@@ -33,6 +33,8 @@
#include "fixedtip.h"
#include "theme.h"
#include "prefs.h"
#include "errors.h"
#include "ui.h"
#ifdef HAVE_SHAPE
#include <X11/extensions/shape.h>
@@ -71,8 +73,8 @@ static void meta_frames_paint_to_drawable (MetaFrames *frames,
MetaUIFrame *frame,
GdkDrawable *drawable,
GdkRegion *region,
int x_offset,
int y_offset);
int x_offset,
int y_offset);
static void meta_frames_set_window_background (MetaFrames *frames,
MetaUIFrame *frame);
@@ -100,7 +102,7 @@ static MetaFrameControl get_control (MetaFrames *frames,
static void clear_tip (MetaFrames *frames);
static void invalidate_all_caches (MetaFrames *frames);
static void invalidate_whole_window (MetaFrames *frames,
MetaUIFrame *frame);
MetaUIFrame *frame);
static GtkWidgetClass *parent_class = NULL;
@@ -113,12 +115,12 @@ meta_frames_get_type (void)
{
static const GtkTypeInfo frames_info =
{
"MetaFrames",
sizeof (MetaFrames),
sizeof (MetaFramesClass),
(GtkClassInitFunc) meta_frames_class_init,
(GtkObjectInitFunc) meta_frames_init,
/* reserved_1 */ NULL,
"MetaFrames",
sizeof (MetaFrames),
sizeof (MetaFramesClass),
(GtkClassInitFunc) meta_frames_class_init,
(GtkObjectInitFunc) meta_frames_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
@@ -293,7 +295,7 @@ typedef struct
static CachedPixels *
get_cache (MetaFrames *frames,
MetaUIFrame *frame)
MetaUIFrame *frame)
{
CachedPixels *pixels;
@@ -310,7 +312,7 @@ get_cache (MetaFrames *frames,
static void
invalidate_cache (MetaFrames *frames,
MetaUIFrame *frame)
MetaUIFrame *frame)
{
CachedPixels *pixels = get_cache (frames, frame);
int i;
@@ -445,8 +447,10 @@ meta_frames_ensure_layout (MetaFrames *frames,
widget = GTK_WIDGET (frames);
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
type = meta_core_get_frame_type (gdk_display, frame->xwindow);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_FRAME_TYPE, &type,
META_CORE_GET_END);
style = meta_theme_get_frame_style (meta_theme_get_current (),
type, flags);
@@ -479,9 +483,11 @@ meta_frames_ensure_layout (MetaFrames *frames,
flags);
frame->layout = gtk_widget_create_pango_layout (widget, frame->title);
pango_layout_set_auto_dir (frame->layout, FALSE);
font_desc = meta_gtk_widget_get_font_desc (widget, scale,
meta_prefs_get_titlebar_font ());
meta_prefs_get_titlebar_font ());
size = pango_font_description_get_size (font_desc);
@@ -503,7 +509,7 @@ meta_frames_ensure_layout (MetaFrames *frames,
}
pango_layout_set_font_description (frame->layout,
font_desc);
font_desc);
pango_font_description_free (font_desc);
@@ -523,11 +529,12 @@ meta_frames_calc_geometry (MetaFrames *frames,
MetaFrameType type;
MetaButtonLayout button_layout;
meta_core_get_client_size (gdk_display, frame->xwindow,
&width, &height);
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
type = meta_core_get_frame_type (gdk_display, frame->xwindow);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_CLIENT_WIDTH, &width,
META_CORE_GET_CLIENT_HEIGHT, &height,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_FRAME_TYPE, &type,
META_CORE_GET_END);
meta_frames_ensure_layout (frames, frame);
@@ -548,17 +555,17 @@ meta_frames_new (int screen_number)
GdkScreen *screen;
screen = gdk_display_get_screen (gdk_display_get_default (),
screen_number);
screen_number);
return g_object_new (META_TYPE_FRAMES,
"screen", screen,
NULL);
"screen", screen,
NULL);
}
void
meta_frames_manage_window (MetaFrames *frames,
Window xwindow,
GdkWindow *window)
GdkWindow *window)
{
MetaUIFrame *frame;
@@ -570,9 +577,6 @@ meta_frames_manage_window (MetaFrames *frames,
gdk_window_set_user_data (frame->window, frames);
/* Set the window background to the current style */
meta_frames_set_window_background (frames, frame);
/* Don't set event mask here, it's in frame.c */
frame->xwindow = xwindow;
@@ -583,6 +587,11 @@ meta_frames_manage_window (MetaFrames *frames,
frame->expose_delayed = FALSE;
frame->shape_applied = FALSE;
frame->prelit_control = META_FRAME_CONTROL_NONE;
/* Don't set the window background yet; we need frame->xwindow to be
* registered with its MetaWindow, which happens after this function
* and meta_ui_create_frame_window() return to meta_window_ensure_frame().
*/
meta_core_grab_buttons (gdk_display, frame->xwindow);
@@ -608,8 +617,8 @@ meta_frames_unmanage_window (MetaFrames *frames,
/* restore the cursor */
meta_core_set_screen_cursor (gdk_display,
frame->xwindow,
META_CURSOR_DEFAULT);
frame->xwindow,
META_CURSOR_DEFAULT);
gdk_window_set_user_data (frame->window, NULL);
@@ -672,8 +681,10 @@ meta_frames_get_geometry (MetaFrames *frames,
if (frame == NULL)
meta_bug ("No such frame 0x%lx\n", xwindow);
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
type = meta_core_get_frame_type (gdk_display, frame->xwindow);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_FRAME_TYPE, &type,
META_CORE_GET_END);
g_return_if_fail (type < META_FRAME_TYPE_LAST);
@@ -788,12 +799,13 @@ meta_frames_apply_shapes (MetaFrames *frames,
if (fgeom.top_left_corner_rounded_radius != 0)
{
const int radius = fgeom.top_left_corner_rounded_radius;
const int corner = fgeom.top_left_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
int i;
for (i=0; i<radius; i++)
for (i=0; i<corner; i++)
{
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
const int width = floor(0.5 + radius - sqrt(radius*radius - (radius-(i+0.5))*(radius-(i+0.5))));
xrect.x = 0;
xrect.y = i;
xrect.width = width;
@@ -805,12 +817,13 @@ meta_frames_apply_shapes (MetaFrames *frames,
if (fgeom.top_right_corner_rounded_radius != 0)
{
const int radius = fgeom.top_right_corner_rounded_radius;
const int corner = fgeom.top_right_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
int i;
for (i=0; i<radius; i++)
for (i=0; i<corner; i++)
{
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
const int width = floor(0.5 + radius - sqrt(radius*radius - (radius-(i+0.5))*(radius-(i+0.5))));
xrect.x = new_window_width - width;
xrect.y = i;
xrect.width = width;
@@ -822,14 +835,15 @@ meta_frames_apply_shapes (MetaFrames *frames,
if (fgeom.bottom_left_corner_rounded_radius != 0)
{
const int radius = fgeom.bottom_left_corner_rounded_radius;
const int corner = fgeom.bottom_left_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
int i;
for (i=0; i<radius; i++)
for (i=0; i<corner; i++)
{
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
const int width = floor(0.5 + radius - sqrt(radius*radius - (radius-(i+0.5))*(radius-(i+0.5))));
xrect.x = 0;
xrect.y = new_window_height - i;
xrect.y = new_window_height - i - 1;
xrect.width = width;
xrect.height = 1;
@@ -839,14 +853,15 @@ meta_frames_apply_shapes (MetaFrames *frames,
if (fgeom.bottom_right_corner_rounded_radius != 0)
{
const int radius = fgeom.bottom_right_corner_rounded_radius;
const int corner = fgeom.bottom_right_corner_rounded_radius;
const float radius = sqrt(corner) + corner;
int i;
for (i=0; i<radius; i++)
for (i=0; i<corner; i++)
{
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i)) + 0.5));
const int width = floor(0.5 + radius - sqrt(radius*radius - (radius-(i+0.5))*(radius-(i+0.5))));
xrect.x = new_window_width - width;
xrect.y = new_window_height - i;
xrect.y = new_window_height - i - 1;
xrect.width = width;
xrect.height = 1;
@@ -904,8 +919,9 @@ meta_frames_apply_shapes (MetaFrames *frames,
&attrs);
/* Copy the client's shape to the temporary shape_window */
client_window = meta_core_get_client_xwindow (gdk_display,
frame->xwindow);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_CLIENT_XWINDOW, &client_window,
META_CORE_GET_END);
XShapeCombineShape (gdk_display, shape_window, ShapeBounding,
fgeom.left_width,
@@ -962,11 +978,11 @@ meta_frames_apply_shapes (MetaFrames *frames,
void
meta_frames_move_resize_frame (MetaFrames *frames,
Window xwindow,
int x,
int y,
int width,
int height)
Window xwindow,
int x,
int y,
int width,
int height)
{
MetaUIFrame *frame = meta_frames_lookup_window (frames, xwindow);
int old_x, old_y, old_width, old_height;
@@ -1127,10 +1143,15 @@ show_tip_now (MetaFrames *frames)
/* get conversion delta for root-to-frame coords */
dx = root_x - x;
dy = root_y - y;
/* Align the tooltip to the button right end if RTL */
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
dx += rect->width;
screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames)));
meta_fixed_tip_show (gdk_display,
screen_number,
screen_number,
rect->x + dx,
rect->y + rect->height + 2 + dy,
tiptext);
@@ -1187,6 +1208,114 @@ redraw_control (MetaFrames *frames,
invalidate_cache (frames, frame);
}
static gboolean
meta_frame_titlebar_event (MetaUIFrame *frame,
GdkEventButton *event,
int action)
{
MetaFrameFlags flags;
switch (action)
{
case META_ACTION_TITLEBAR_TOGGLE_SHADE:
{
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_END);
if (flags & META_FRAME_ALLOWS_SHADE)
{
if (flags & META_FRAME_SHADED)
meta_core_unshade (gdk_display,
frame->xwindow,
event->time);
else
meta_core_shade (gdk_display,
frame->xwindow,
event->time);
}
}
break;
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE:
{
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_END);
if (flags & META_FRAME_ALLOWS_MAXIMIZE)
{
meta_core_toggle_maximize (gdk_display, frame->xwindow);
}
}
break;
case META_ACTION_TITLEBAR_MINIMIZE:
{
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_END);
if (flags & META_FRAME_ALLOWS_MINIMIZE)
{
meta_core_minimize (gdk_display, frame->xwindow);
}
}
break;
case META_ACTION_TITLEBAR_NONE:
/* Yaay, a sane user that doesn't use that other weird crap! */
break;
case META_ACTION_TITLEBAR_LOWER:
meta_core_user_lower_and_unfocus (gdk_display,
frame->xwindow,
event->time);
break;
case META_ACTION_TITLEBAR_MENU:
meta_core_show_window_menu (gdk_display,
frame->xwindow,
event->x_root,
event->y_root,
event->button,
event->time);
break;
case META_ACTION_TITLEBAR_LAST:
break;
}
return TRUE;
}
static gboolean
meta_frame_double_click_event (MetaUIFrame *frame,
GdkEventButton *event)
{
int action = meta_prefs_get_action_double_click_titlebar ();
return meta_frame_titlebar_event (frame, event, action);
}
static gboolean
meta_frame_middle_click_event (MetaUIFrame *frame,
GdkEventButton *event)
{
int action = meta_prefs_get_action_middle_click_titlebar();
return meta_frame_titlebar_event (frame, event, action);
}
static gboolean
meta_frame_right_click_event(MetaUIFrame *frame,
GdkEventButton *event)
{
int action = meta_prefs_get_action_right_click_titlebar();
return meta_frame_titlebar_event (frame, event, action);
}
static gboolean
meta_frames_button_press_event (GtkWidget *widget,
GdkEventButton *event)
@@ -1212,7 +1341,8 @@ meta_frames_button_press_event (GtkWidget *widget,
/* focus on click, even if click was on client area */
if (event->button == 1 &&
!(control == META_FRAME_CONTROL_MINIMIZE ||
control == META_FRAME_CONTROL_DELETE))
control == META_FRAME_CONTROL_DELETE ||
control == META_FRAME_CONTROL_MAXIMIZE))
{
meta_topic (META_DEBUG_FOCUS,
"Focusing window with frame 0x%lx due to button 1 press\n",
@@ -1233,59 +1363,7 @@ meta_frames_button_press_event (GtkWidget *widget,
event->button == 1 &&
event->type == GDK_2BUTTON_PRESS)
{
MetaFrameFlags flags;
switch (meta_prefs_get_action_double_click_titlebar ())
{
case META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE:
{
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (flags & META_FRAME_ALLOWS_SHADE)
{
if (flags & META_FRAME_SHADED)
meta_core_unshade (gdk_display,
frame->xwindow,
event->time);
else
meta_core_shade (gdk_display,
frame->xwindow,
event->time);
}
}
break;
case META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE:
{
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (flags & META_FRAME_ALLOWS_MAXIMIZE)
{
meta_core_toggle_maximize (gdk_display, frame->xwindow);
}
}
break;
case META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE:
{
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
if (flags & META_FRAME_ALLOWS_MINIMIZE)
{
meta_core_minimize (gdk_display, frame->xwindow);
}
}
break;
case META_ACTION_DOUBLE_CLICK_TITLEBAR_NONE:
/* Yaay, a sane user that doesn't use that other weird crap! */
break;
case META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST:
break;
}
return TRUE;
return meta_frame_double_click_event (frame, event);
}
if (meta_core_get_grab_op (gdk_display) !=
@@ -1352,7 +1430,6 @@ meta_frames_button_press_event (GtkWidget *widget,
op,
TRUE,
TRUE,
meta_ui_get_last_event_serial (gdk_display),
event->button,
0,
event->time,
@@ -1376,6 +1453,10 @@ meta_frames_button_press_event (GtkWidget *widget,
dx = event->x_root - event->x;
dy = event->y_root - event->y;
/* Align to the right end of the menu rectangle if RTL */
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
dx += rect->width;
meta_core_show_window_menu (gdk_display,
frame->xwindow,
rect->x + dx,
@@ -1395,6 +1476,7 @@ meta_frames_button_press_event (GtkWidget *widget,
control == META_FRAME_CONTROL_RESIZE_W))
{
MetaGrabOp op;
gboolean titlebar_is_onscreen;
op = META_GRAB_OP_NONE;
@@ -1429,8 +1511,11 @@ meta_frames_button_press_event (GtkWidget *widget,
break;
}
if (!meta_core_titlebar_is_onscreen (gdk_display,
frame->xwindow))
meta_core_get (gdk_display, frame->xwindow,
META_CORE_IS_TITLEBAR_ONSCREEN, &titlebar_is_onscreen,
META_CORE_GET_END);
if (!titlebar_is_onscreen)
meta_core_show_window_menu (gdk_display,
frame->xwindow,
event->x_root,
@@ -1443,7 +1528,6 @@ meta_frames_button_press_event (GtkWidget *widget,
op,
TRUE,
TRUE,
meta_ui_get_last_event_serial (gdk_display),
event->button,
0,
event->time,
@@ -1454,9 +1538,11 @@ meta_frames_button_press_event (GtkWidget *widget,
event->button == 1)
{
MetaFrameFlags flags;
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_END);
if (flags & META_FRAME_ALLOWS_MOVE)
{
meta_core_begin_grab_op (gdk_display,
@@ -1464,7 +1550,6 @@ meta_frames_button_press_event (GtkWidget *widget,
META_GRAB_OP_MOVING,
TRUE,
TRUE,
meta_ui_get_last_event_serial (gdk_display),
event->button,
0,
event->time,
@@ -1474,18 +1559,11 @@ meta_frames_button_press_event (GtkWidget *widget,
}
else if (event->button == 2)
{
meta_core_user_lower_and_unfocus (gdk_display,
frame->xwindow,
event->time);
return meta_frame_middle_click_event (frame, event);
}
else if (event->button == 3)
{
meta_core_show_window_menu (gdk_display,
frame->xwindow,
event->x_root,
event->y_root,
event->button,
event->time);
return meta_frame_right_click_event (frame, event);
}
return TRUE;
@@ -1560,8 +1638,13 @@ meta_frames_button_release_event (GtkWidget *widget,
case META_GRAB_OP_CLICKING_MAXIMIZE:
if (control == META_FRAME_CONTROL_MAXIMIZE)
{
/* Focus the window on the maximize */
meta_core_user_focus (gdk_display,
frame->xwindow,
event->time);
meta_core_maximize (gdk_display, frame->xwindow);
}
meta_core_end_grab_op (gdk_display, event->time);
break;
@@ -1642,8 +1725,8 @@ meta_frames_button_release_event (GtkWidget *widget,
static void
meta_frames_update_prelit_control (MetaFrames *frames,
MetaUIFrame *frame,
MetaFrameControl control)
MetaUIFrame *frame,
MetaFrameControl control)
{
MetaFrameControl old_control;
MetaCursor cursor;
@@ -1816,7 +1899,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
control = META_FRAME_CONTROL_NONE;
/* Update prelit control and cursor */
meta_frames_update_prelit_control (frames, frame, control);
meta_frames_update_prelit_control (frames, frame, control);
/* No tooltip while in the process of clicking */
}
@@ -1831,7 +1914,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
control = get_control (frames, frame, x, y);
/* Update prelit control and cursor */
meta_frames_update_prelit_control (frames, frame, control);
meta_frames_update_prelit_control (frames, frame, control);
queue_tip (frames);
}
@@ -1871,8 +1954,8 @@ get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG && private->parent)
{
return get_bg_gc (GDK_WINDOW (private->parent),
x_offset + private->x,
y_offset + private->y);
x_offset + private->x,
y_offset + private->y);
}
else if (private->bg_pixmap &&
private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
@@ -1899,13 +1982,13 @@ get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
static void
clear_backing (GdkPixmap *pixmap,
GdkWindow *window,
int xoffset, int yoffset)
GdkWindow *window,
int xoffset, int yoffset)
{
GdkGC *tmp_gc = get_bg_gc (window, xoffset, yoffset);
gdk_draw_rectangle (pixmap, tmp_gc, TRUE,
0, 0, -1, -1);
0, 0, -1, -1);
g_object_unref (tmp_gc);
}
@@ -1915,7 +1998,7 @@ clear_backing (GdkPixmap *pixmap,
static GdkPixmap *
generate_pixmap (MetaFrames *frames,
MetaUIFrame *frame,
MetaUIFrame *frame,
MetaRectangle rect)
{
GdkRectangle rectangle;
@@ -1935,7 +2018,7 @@ generate_pixmap (MetaFrames *frames,
region = gdk_region_rectangle (&rectangle);
meta_frames_paint_to_drawable (frames, frame, result, region,
- rectangle.x, - rectangle.y);
-rectangle.x, -rectangle.y);
gdk_region_destroy (region);
@@ -1945,22 +2028,26 @@ generate_pixmap (MetaFrames *frames,
static void
populate_cache (MetaFrames *frames,
MetaUIFrame *frame)
MetaUIFrame *frame)
{
int top, bottom, left, right;
int width, height;
int frame_width, frame_height, screen_width, screen_height;
CachedPixels *pixels;
MetaFrameType frame_type;
MetaFrameFlags frame_flags;
int i;
meta_core_get_frame_extents (gdk_display,
frame->xwindow,
NULL, NULL,
&frame_width, &frame_height);
meta_core_get_screen_size (gdk_display,
frame->xwindow,
&screen_width, &screen_height);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_WIDTH, &frame_width,
META_CORE_GET_FRAME_HEIGHT, &frame_height,
META_CORE_GET_SCREEN_WIDTH, &screen_width,
META_CORE_GET_SCREEN_HEIGHT, &screen_height,
META_CORE_GET_CLIENT_WIDTH, &width,
META_CORE_GET_CLIENT_HEIGHT, &height,
META_CORE_GET_FRAME_TYPE, &frame_type,
META_CORE_GET_FRAME_FLAGS, &frame_flags,
META_CORE_GET_END);
/* don't cache extremely large windows */
if (frame_width > 2 * screen_width ||
@@ -1970,13 +2057,11 @@ populate_cache (MetaFrames *frames,
}
meta_theme_get_frame_borders (meta_theme_get_current (),
meta_core_get_frame_type (gdk_display, frame->xwindow),
frame->text_height,
meta_core_get_frame_flags (gdk_display, frame->xwindow),
frame_type,
frame->text_height,
frame_flags,
&top, &bottom, &left, &right);
meta_core_get_client_size (gdk_display, frame->xwindow, &width, &height);
pixels = get_cache (frames, frame);
/* Setup the rectangles for the four frame borders. First top, then
@@ -2029,14 +2114,14 @@ clip_to_screen (GdkRegion *region, MetaUIFrame *frame)
* is crucial to handle huge client windows,
* like "xterm -geometry 1000x1000"
*/
meta_core_get_frame_extents (gdk_display,
frame->xwindow,
&frame_area.x, &frame_area.y,
&frame_area.width, &frame_area.height);
meta_core_get_screen_size (gdk_display,
frame->xwindow,
&screen_area.width, &screen_area.height);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_X, &frame_area.x,
META_CORE_GET_FRAME_Y, &frame_area.y,
META_CORE_GET_FRAME_WIDTH, &frame_area.width,
META_CORE_GET_FRAME_HEIGHT, &frame_area.height,
META_CORE_GET_SCREEN_WIDTH, &screen_area.height,
META_CORE_GET_SCREEN_HEIGHT, &screen_area.height,
META_CORE_GET_END);
gdk_region_offset (region, frame_area.x, frame_area.y);
@@ -2049,7 +2134,7 @@ clip_to_screen (GdkRegion *region, MetaUIFrame *frame)
static void
subtract_from_region (GdkRegion *region, GdkDrawable *drawable,
gint x, gint y)
gint x, gint y)
{
GdkRectangle rect;
GdkRegion *reg_rect;
@@ -2130,13 +2215,18 @@ meta_frames_expose_event (GtkWidget *widget,
return TRUE;
}
/* How far off the screen edge the window decorations should
* be drawn. Used only in meta_frames_paint_to_drawable, below.
*/
#define DECORATING_BORDER 100
static void
meta_frames_paint_to_drawable (MetaFrames *frames,
MetaUIFrame *frame,
GdkDrawable *drawable,
GdkRegion *region,
int x_offset,
int y_offset)
int x_offset,
int y_offset)
{
GtkWidget *widget;
MetaFrameFlags flags;
@@ -2147,12 +2237,6 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
MetaButtonState button_states[META_BUTTON_TYPE_LAST];
Window grab_frame;
int i;
int top, bottom, left, right;
GdkRegion *edges;
GdkRegion *tmp_region;
GdkRectangle area;
GdkRectangle *areas;
int n_areas;
MetaButtonLayout button_layout;
MetaGrabOp grab_op;
@@ -2253,45 +2337,107 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
button_states[META_BUTTON_TYPE_RIGHT_RIGHT_BACKGROUND] =
button_states[META_BUTTON_TYPE_CLOSE];
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
type = meta_core_get_frame_type (gdk_display, frame->xwindow);
mini_icon = meta_core_get_mini_icon (gdk_display, frame->xwindow);
icon = meta_core_get_icon (gdk_display, frame->xwindow);
meta_core_get_client_size (gdk_display, frame->xwindow,
&w, &h);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_FRAME_TYPE, &type,
META_CORE_GET_MINI_ICON, &mini_icon,
META_CORE_GET_ICON, &icon,
META_CORE_GET_CLIENT_WIDTH, &w,
META_CORE_GET_CLIENT_HEIGHT, &h,
META_CORE_GET_END);
meta_frames_ensure_layout (frames, frame);
meta_theme_get_frame_borders (meta_theme_get_current (),
type, frame->text_height, flags,
&top, &bottom, &left, &right);
/* Repaint each side of the frame */
edges = gdk_region_copy (region);
/* Punch out the client area */
area.x = left;
area.y = top;
area.width = w;
area.height = h;
tmp_region = gdk_region_rectangle (&area);
gdk_region_subtract (edges, tmp_region);
gdk_region_destroy (tmp_region);
/* Now draw remaining portion of region */
gdk_region_get_rectangles (edges, &areas, &n_areas);
meta_prefs_get_button_layout (&button_layout);
for (i = 0; i < n_areas; i++)
if (G_LIKELY (GDK_IS_WINDOW (drawable)))
{
if (GDK_IS_WINDOW (drawable))
gdk_window_begin_paint_rect (drawable, &areas[i]);
/* A window; happens about 2/3 of the time */
GdkRectangle area, *areas;
int n_areas;
int screen_width, screen_height;
GdkRegion *edges, *tmp_region;
int top, bottom, left, right;
/* Repaint each side of the frame */
meta_theme_get_frame_borders (meta_theme_get_current (),
type, frame->text_height, flags,
&top, &bottom, &left, &right);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_SCREEN_WIDTH, &screen_width,
META_CORE_GET_SCREEN_HEIGHT, &screen_height,
META_CORE_GET_END);
edges = gdk_region_copy (region);
/* Punch out the client area */
area.x = left;
area.y = top;
area.width = w;
area.height = h;
tmp_region = gdk_region_rectangle (&area);
gdk_region_subtract (edges, tmp_region);
gdk_region_destroy (tmp_region);
/* Now draw remaining portion of region */
gdk_region_get_rectangles (edges, &areas, &n_areas);
for (i = 0; i < n_areas; i++)
{
/* Bug 399529: clamp areas[i] so that it doesn't go too far
* off the edge of the screen. This works around a GDK bug
* which makes gdk_window_begin_paint_rect cause an X error
* if the window is insanely huge. If the client is a GDK program
* and does this, it will still probably cause an X error in that
* program, but the last thing we want is for Metacity to crash
* because it attempted to decorate the silly window.
*/
areas[i].x = MAX (areas[i].x, -DECORATING_BORDER);
areas[i].y = MAX (areas[i].y, -DECORATING_BORDER);
if (areas[i].x+areas[i].width > screen_width + DECORATING_BORDER)
areas[i].width = MIN (0, screen_width - areas[i].x);
if (areas[i].y+areas[i].height > screen_height + DECORATING_BORDER)
areas[i].height = MIN (0, screen_height - areas[i].y);
/* Okay, so let's start painting. */
gdk_window_begin_paint_rect (drawable, &areas[i]);
meta_theme_draw_frame (meta_theme_get_current (),
widget,
drawable,
NULL, /* &areas[i], */
x_offset, y_offset,
type,
flags,
w, h,
frame->layout,
frame->text_height,
&button_layout,
button_states,
mini_icon, icon);
gdk_window_end_paint (drawable);
}
g_free (areas);
gdk_region_destroy (edges);
}
else
{
/* Not a window; happens about 1/3 of the time */
meta_theme_draw_frame (meta_theme_get_current (),
widget,
drawable,
NULL, /* &areas[i], */
NULL,
x_offset, y_offset,
type,
flags,
@@ -2301,13 +2447,8 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
&button_layout,
button_states,
mini_icon, icon);
if (GDK_IS_WINDOW (drawable))
gdk_window_end_paint (drawable);
}
gdk_region_destroy (edges);
g_free (areas);
}
static void
@@ -2319,12 +2460,14 @@ meta_frames_set_window_background (MetaFrames *frames,
MetaFrameStyle *style;
gboolean frame_exists;
frame_exists = meta_core_window_has_frame (gdk_display, frame->xwindow);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_WINDOW_HAS_FRAME, &frame_exists,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_FRAME_TYPE, &type,
META_CORE_GET_END);
if (frame_exists)
{
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
type = meta_core_get_frame_type (gdk_display, frame->xwindow);
style = meta_theme_get_frame_style (meta_theme_get_current (),
type, flags);
}
@@ -2500,7 +2643,9 @@ get_control (MetaFrames *frames,
if (POINT_IN_RECT (x, y, fgeom.menu_rect.clickable))
return META_FRAME_CONTROL_MENU;
flags = meta_core_get_frame_flags (gdk_display, frame->xwindow);
meta_core_get (gdk_display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
META_CORE_GET_END);
has_vert = (flags & META_FRAME_ALLOWS_VERTICAL_RESIZE) != 0;
has_horiz = (flags & META_FRAME_ALLOWS_HORIZONTAL_RESIZE) != 0;
@@ -2670,7 +2815,7 @@ meta_frames_pop_delay_exposes (MetaFrames *frames)
static void
invalidate_whole_window (MetaFrames *frames,
MetaUIFrame *frame)
MetaUIFrame *frame)
{
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
invalidate_cache (frames, frame);

View File

@@ -231,6 +231,11 @@ static void handle_move_to_corner_se (MetaDisplay *display,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_spew_mark (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding);
static void handle_run_terminal (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
@@ -419,6 +424,7 @@ static const MetaKeyHandler screen_handlers[] = {
GINT_TO_POINTER (33) },
{ META_KEYBINDING_RUN_COMMAND_TERMINAL, handle_run_terminal,
NULL },
{ META_KEYBINDING_SET_SPEW_MARK, handle_spew_mark, NULL },
{ NULL, NULL, NULL }
};
@@ -1638,6 +1644,17 @@ process_event (MetaKeyBinding *bindings,
"No handler found for this event in this binding table\n");
}
/* Handle a key event. May be called recursively: some key events cause
* grabs to be ended and then need to be processed again in their own
* right. This cannot cause infinite recursion because we never call
* ourselves when there wasn't a grab, and we always clear the grab
* first; the invariant is enforced using an assertion. See #112560.
* FIXME: We need to prove there are no race conditions here.
* FIXME: Does it correctly handle alt-Tab being followed by another
* grabbing keypress without letting go of alt?
* FIXME: An iterative solution would probably be simpler to understand
* (and help us solve the other fixmes).
*/
void
meta_display_process_key_event (MetaDisplay *display,
MetaWindow *window,
@@ -1785,6 +1802,12 @@ meta_display_process_key_event (MetaDisplay *display,
"Ending grab op %u on key event sym %s\n",
display->grab_op, XKeysymToString (keysym));
meta_display_end_grab_op (display, event->xkey.time);
g_assert (display->grab_op == META_GRAB_OP_NONE);
/* and go round again: #112560 */
meta_display_process_key_event (display, window, event);
}
}
@@ -1951,10 +1974,7 @@ process_keyboard_move_grab (MetaDisplay *display,
if (display->grab_wireframe_active)
old_rect = display->grab_wireframe_rect;
else
{
old_rect = window->rect;
meta_window_get_position (window, &old_rect.x, &old_rect.y);
}
meta_window_get_client_root_coords (window, &old_rect);
meta_window_edge_resistance_for_move (window,
old_rect.x,
@@ -3194,7 +3214,9 @@ handle_panel_keybinding (MetaDisplay *display,
ev.data.l[1] = event->xkey.time;
meta_topic (META_DEBUG_KEYBINDINGS,
"Sending panel message with timestamp %lu\n", event->xkey.time);
"Sending panel message with timestamp %lu, and turning mouse_mode "
"off due to keybinding press\n", event->xkey.time);
display->mouse_mode = FALSE;
meta_error_trap_push (display);
@@ -3224,6 +3246,9 @@ handle_activate_menu (MetaDisplay *display,
meta_window_get_position (display->focus_window,
&x, &y);
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
x += display->focus_window->rect.width;
meta_window_show_menu (display->focus_window,
x, y,
0,
@@ -3327,7 +3352,6 @@ do_choose_window (MetaDisplay *display,
cycle_op_from_tab_type (type),
FALSE,
FALSE,
event->xkey.serial,
0,
binding->mask,
event->xkey.time,
@@ -3763,7 +3787,6 @@ handle_workspace_switch (MetaDisplay *display,
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
FALSE,
FALSE,
event->xkey.serial,
0,
grab_mask,
event->xkey.time,
@@ -3802,7 +3825,6 @@ handle_workspace_switch (MetaDisplay *display,
}
}
#if 0
static void
handle_spew_mark (MetaDisplay *display,
MetaScreen *screen,
@@ -3812,7 +3834,6 @@ handle_spew_mark (MetaDisplay *display,
{
meta_verbose ("-- MARK MARK MARK MARK --\n");
}
#endif
void
meta_set_keybindings_disabled (gboolean setting)

View File

@@ -65,7 +65,7 @@ static void
version (void)
{
g_print (_("metacity %s\n"
"Copyright (C) 2001-2002 Havoc Pennington, Red Hat, Inc., and others\n"
"Copyright (C) 2001-2007 Havoc Pennington, Red Hat, Inc., and others\n"
"This is free software; see the source for copying conditions.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"),
VERSION);
@@ -148,6 +148,7 @@ typedef struct
gboolean replace_wm;
gboolean disable_sm;
gboolean print_version;
gboolean sync;
} MetaArguments;
/**
@@ -200,6 +201,12 @@ meta_parse_options (int *argc, char ***argv,
N_("Print version"),
NULL
},
{
"sync", 0, 0, G_OPTION_ARG_NONE,
&my_args.sync,
N_("Make X calls synchronous"),
NULL
},
{NULL}
};
GOptionContext *ctx;
@@ -243,7 +250,7 @@ main (int argc, char **argv)
struct sigaction act;
sigset_t empty_mask;
MetaArguments meta_args;
if (setlocale (LC_ALL, "") == NULL)
meta_warning ("Locale not understood by C library, internationalization will not work\n");
@@ -264,7 +271,6 @@ main (int argc, char **argv)
meta_set_verbose (TRUE);
if (g_getenv ("METACITY_DEBUG"))
meta_set_debugging (TRUE);
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
if (g_get_home_dir ())
chdir (g_get_home_dir ());
@@ -278,6 +284,8 @@ main (int argc, char **argv)
/* Parse command line arguments.*/
meta_parse_options (&argc, &argv, &meta_args);
meta_set_syncing (meta_args.sync || (g_getenv ("METACITY_SYNC") != NULL));
if (meta_args.print_version)
version ();
@@ -293,15 +301,16 @@ main (int argc, char **argv)
g_type_init ();
/* Load prefs */
meta_prefs_init ();
meta_prefs_add_listener (prefs_changed_callback, NULL);
meta_ui_init (&argc, &argv);
/* must be after UI init so we can override GDK handlers */
meta_errors_init ();
/* Load prefs */
meta_prefs_init ();
meta_prefs_add_listener (prefs_changed_callback, NULL);
#if 1
g_log_set_handler (NULL,
G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION,
@@ -373,8 +382,23 @@ main (int argc, char **argv)
* info
*/
if (!meta_args.disable_sm)
meta_session_init (meta_args.client_id, meta_args.save_file);
{
if (meta_args.client_id == NULL)
{
const gchar *desktop_autostart_id;
desktop_autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID");
if (desktop_autostart_id != NULL)
meta_args.client_id = g_strdup (desktop_autostart_id);
}
/* Unset DESKTOP_AUTOSTART_ID in order to avoid child processes to
* use the same client id. */
g_unsetenv ("DESKTOP_AUTOSTART_ID");
meta_session_init (meta_args.client_id, meta_args.save_file);
}
/* Free memory possibly allocated by the argument parsing which are
* no longer needed.
*/

View File

@@ -32,7 +32,7 @@
#include "core.h"
#include "themewidget.h"
#include "metaaccellabel.h"
#include "window.h"
#include "ui.h"
typedef struct _MenuItem MenuItem;
typedef struct _MenuData MenuData;
@@ -43,6 +43,8 @@ typedef enum
MENU_ITEM_NORMAL,
MENU_ITEM_IMAGE,
MENU_ITEM_CHECKBOX,
MENU_ITEM_RADIOBUTTON,
MENU_ITEM_WORKSPACE_LIST,
} MetaMenuItemType;
struct _MenuItem
@@ -80,16 +82,15 @@ static MenuItem menuitems[] = {
{ META_MENU_OP_RESIZE, MENU_ITEM_NORMAL, NULL, FALSE, N_("_Resize") },
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_RECOVER, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move Titlebar On_screen") },
{ 0, MENU_ITEM_SEPARATOR, NULL, FALSE, NULL }, /* separator */
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_DELETE, MENU_ITEM_IMAGE, METACITY_STOCK_DELETE, FALSE, N_("_Close") },
{ META_MENU_OP_WORKSPACES, MENU_ITEM_SEPARATOR, NULL, FALSE, NULL }, /* separator */
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_ABOVE, MENU_ITEM_CHECKBOX, NULL, FALSE, N_("Always on _Top") },
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_STICK, MENU_ITEM_CHECKBOX, NULL, FALSE, N_("_Always on Visible Workspace") },
{ META_MENU_OP_UNABOVE, MENU_ITEM_CHECKBOX, NULL, TRUE, N_("Always on _Top") },
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_UNSTICK, MENU_ITEM_CHECKBOX, NULL, FALSE, N_("_Only on This Workspace") },
{ META_MENU_OP_STICK, MENU_ITEM_RADIOBUTTON, NULL, FALSE, N_("_Always on Visible Workspace") },
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_UNSTICK, MENU_ITEM_RADIOBUTTON, NULL, FALSE, N_("_Only on This Workspace") },
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_MOVE_LEFT, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace _Left") },
/* Translators: Translate this string the same way as you do in libwnck! */
@@ -97,7 +98,11 @@ static MenuItem menuitems[] = {
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_MOVE_UP, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace _Up") },
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_MOVE_DOWN, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace _Down") }
{ META_MENU_OP_MOVE_DOWN, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace _Down") },
{ 0, MENU_ITEM_WORKSPACE_LIST, NULL, FALSE, NULL },
{ 0, MENU_ITEM_SEPARATOR, NULL, FALSE, NULL }, /* separator */
/* Translators: Translate this string the same way as you do in libwnck! */
{ META_MENU_OP_DELETE, MENU_ITEM_IMAGE, METACITY_STOCK_DELETE, FALSE, N_("_Close") }
};
static void
@@ -117,6 +122,9 @@ popup_position_func (GtkMenu *menu,
*x = pos->x;
*y = pos->y;
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
*x = MAX (0, *x - req.width);
/* Ensure onscreen */
*x = CLAMP (*x, 0, MAX (0, gdk_screen_width () - req.width));
*y = CLAMP (*y, 0, MAX (0, gdk_screen_height () - req.height));
@@ -274,14 +282,20 @@ menu_item_new (MenuItem *menuitem, int workspace_id)
{
mi = gtk_check_menu_item_new ();
if (menuitem->op == META_MENU_OP_STICK || menuitem->op == META_MENU_OP_UNSTICK)
{
gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (mi),
TRUE);
}
else
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi), menuitem->checked);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi),
menuitem->checked);
}
else if (menuitem->type == MENU_ITEM_RADIOBUTTON)
{
mi = gtk_check_menu_item_new ();
gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (mi),
TRUE);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi),
menuitem->checked);
}
else if (menuitem->type == MENU_ITEM_WORKSPACE_LIST)
return NULL;
else
return gtk_separator_menu_item_new ();
@@ -305,7 +319,7 @@ meta_window_menu_new (MetaFrames *frames,
MetaMenuOp ops,
MetaMenuOp insensitive,
Window client_xwindow,
int active_workspace,
unsigned long active_workspace,
int n_workspaces,
MetaWindowMenuFunc func,
gpointer data)
@@ -313,6 +327,7 @@ meta_window_menu_new (MetaFrames *frames,
int i;
MetaWindowMenu *menu;
/* FIXME: Modifications to 'ops' should happen in meta_window_show_menu */
if (n_workspaces < 2)
ops &= ~(META_MENU_OP_STICK | META_MENU_OP_UNSTICK | META_MENU_OP_WORKSPACES);
else if (n_workspaces == 2)
@@ -344,29 +359,101 @@ meta_window_menu_new (MetaFrames *frames,
mi = menu_item_new (&menuitem, -1);
if ((menuitem.op == META_MENU_OP_STICK) ||
(menuitem.op == META_MENU_OP_UNSTICK) ||
(menuitem.op == META_MENU_OP_ABOVE))
/* Set the activeness of radiobuttons. */
switch (menuitem.op)
{
Display *xdisplay;
MetaDisplay *display;
MetaWindow *window;
xdisplay = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
display = meta_display_for_x_display (xdisplay);
window = meta_display_lookup_x_window (display, client_xwindow);
if (menuitem.op == META_MENU_OP_STICK)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi), window->on_all_workspaces);
else
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi), !window->on_all_workspaces);
if (menuitem.op == META_MENU_OP_ABOVE)
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi), window->wm_state_above);
case META_MENU_OP_STICK:
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi),
active_workspace == 0xFFFFFFFF);
break;
case META_MENU_OP_UNSTICK:
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (mi),
active_workspace != 0xFFFFFFFF);
break;
default:
break;
}
if (menuitem.type != MENU_ITEM_SEPARATOR)
if (menuitem.type == MENU_ITEM_WORKSPACE_LIST)
{
if (ops & META_MENU_OP_WORKSPACES)
{
Display *display;
Window xroot;
GdkScreen *screen;
GtkWidget *submenu;
int j;
MenuItem to_another_workspace = {
0, MENU_ITEM_NORMAL,
NULL, FALSE,
N_("Move to Another _Workspace")
};
meta_verbose ("Creating %d-workspace menu current space %lu\n",
n_workspaces, active_workspace);
display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
submenu = gtk_menu_new ();
g_assert (mi==NULL);
mi = menu_item_new (&to_another_workspace, -1);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (mi), submenu);
for (j = 0; j < n_workspaces; j++)
{
char *label;
MenuData *md;
unsigned int key;
MetaVirtualModifier mods;
MenuItem moveitem;
GtkWidget *submi;
meta_core_get_menu_accelerator (META_MENU_OP_WORKSPACES,
j + 1,
&key, &mods);
label = get_workspace_name_with_accel (display, xroot, j);
moveitem.type = MENU_ITEM_NORMAL;
moveitem.op = META_MENU_OP_WORKSPACES;
moveitem.label = label;
submi = menu_item_new (&moveitem, j + 1);
g_free (label);
if ((active_workspace == (unsigned)j) && (ops & META_MENU_OP_UNSTICK))
gtk_widget_set_sensitive (submi, FALSE);
md = g_new (MenuData, 1);
md->menu = menu;
md->op = META_MENU_OP_WORKSPACES;
g_object_set_data (G_OBJECT (submi),
"workspace",
GINT_TO_POINTER (j));
gtk_signal_connect_full (GTK_OBJECT (submi),
"activate",
GTK_SIGNAL_FUNC (activate_cb),
NULL,
md,
g_free, FALSE, FALSE);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
gtk_widget_show (submi);
}
}
else
meta_verbose ("not creating workspace menu\n");
}
else if (menuitem.type != MENU_ITEM_SEPARATOR)
{
meta_core_get_menu_accelerator (menuitems[i].op, -1,
&key, &mods);
@@ -386,93 +473,17 @@ meta_window_menu_new (MetaFrames *frames,
md,
g_free, FALSE, FALSE);
}
if (mi)
{
gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi);
gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi);
gtk_widget_show (mi);
gtk_widget_show (mi);
}
}
}
if (ops & META_MENU_OP_WORKSPACES)
{
Display *display;
Window xroot;
GdkScreen *screen;
GtkWidget *submenu;
GtkWidget *submenuitem;
MenuItem to_another_workspace = {
0, MENU_ITEM_NORMAL,
NULL, FALSE,
N_("Move to Another _Workspace")
};
meta_verbose ("Creating %d-workspace menu current space %d\n",
n_workspaces, active_workspace);
display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
submenu = gtk_menu_new ();
submenuitem = menu_item_new (&to_another_workspace, -1);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (submenuitem), submenu);
gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), submenuitem);
gtk_widget_show (submenuitem);
for (i = 0; i < n_workspaces; i++)
{
char *label;
MenuData *md;
unsigned int key;
MetaVirtualModifier mods;
MenuItem moveitem;
GtkWidget *mi;
meta_core_get_menu_accelerator (META_MENU_OP_WORKSPACES,
i + 1,
&key, &mods);
label = get_workspace_name_with_accel (display, xroot, i);
moveitem.type = MENU_ITEM_NORMAL;
moveitem.op = META_MENU_OP_WORKSPACES;
moveitem.label = label;
mi = menu_item_new (&moveitem, i + 1);
g_free (label);
if (!(ops & META_MENU_OP_UNSTICK) &&
(active_workspace == i ||
insensitive & META_MENU_OP_WORKSPACES))
gtk_widget_set_sensitive (mi, FALSE);
else if (insensitive & META_MENU_OP_WORKSPACES)
gtk_widget_set_sensitive (mi, FALSE);
md = g_new (MenuData, 1);
md->menu = menu;
md->op = META_MENU_OP_WORKSPACES;
g_object_set_data (G_OBJECT (mi),
"workspace",
GINT_TO_POINTER (i));
gtk_signal_connect_full (GTK_OBJECT (mi),
"activate",
GTK_SIGNAL_FUNC (activate_cb),
NULL,
md,
g_free, FALSE, FALSE);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), mi);
gtk_widget_show (mi);
}
}
else
meta_verbose ("not creating workspace menu\n");
g_signal_connect (menu->menu, "selection_done",
G_CALLBACK (menu_closed), menu);

View File

@@ -47,7 +47,7 @@ MetaWindowMenu* meta_window_menu_new (MetaFrames *frames,
MetaMenuOp ops,
MetaMenuOp insensitive,
Window client_xwindow,
int active_workspace,
unsigned long active_workspace,
int n_workspaces,
MetaWindowMenuFunc func,
gpointer data);

View File

@@ -271,15 +271,33 @@ meta_accel_label_expose_event (GtkWidget *widget,
if (widget->allocation.width >= widget->requisition.width + ac_width)
{
int x;
int y;
GtkTextDirection direction = gtk_widget_get_direction (widget);
gint x;
gint y;
if (direction == GTK_TEXT_DIR_RTL)
{
widget->allocation.x += ac_width;
}
widget->allocation.width -= ac_width;
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
widget->allocation.width += ac_width;
x = widget->allocation.x + widget->allocation.width - misc->xpad - ac_width;
if (direction == GTK_TEXT_DIR_RTL)
{
widget->allocation.x -= ac_width;
}
widget->allocation.width += ac_width;
if (direction == GTK_TEXT_DIR_RTL)
{
x = widget->allocation.x + misc->xpad;
}
else
{
x = widget->allocation.x + widget->allocation.width - misc->xpad - ac_width;
}
y = (widget->allocation.y * (1.0 - misc->yalign) +
(widget->allocation.y + widget->allocation.height -

View File

@@ -98,7 +98,7 @@ kill_window_question (const char *window_name,
"for it to continue or force the application "
"to quit entirely."));
g_free (str);
gtk_window_set_icon_name (GTK_WINDOW (dialog), "panel-force-quit");
gtk_window_set_icon_name (GTK_WINDOW (dialog), "stock_dialog-warning");
gtk_label_set_use_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);

View File

@@ -93,14 +93,11 @@
<short>Whether raising should be a side-effect of other user
interactions</short>
<long>
Many actions (e.g. clicking in the client area, moving or
resizing the window) normally raise the window as a
side-effect. Set this option to false to decouple raising from
other user actions. Even when this option is false, windows can
still be raised by an alt-left-click anywhere on the window, a
normal click on the window decorations, or by special messages,
such as activation requests from pagers. This option is
currently disabled in click-to-focus mode.
Many actions (e.g. clicking in the client area, moving or resizing the window)
normally raise the window as a side-effect. Setting this option to false, which
is strongly discouraged, will decouple raising from other user actions, and
ignore raise requests generated by applications. See
http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6.
</long>
</locale>
</schema>
@@ -123,6 +120,42 @@
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/action_middle_click_titlebar</key>
<applyto>/apps/metacity/general/action_middle_click_titlebar</applyto>
<owner>metacity</owner>
<type>string</type>
<default>lower</default>
<locale name="C">
<short>Action on title bar middle-click</short>
<long>
This option determines the effects of middle-clicking on the
title bar. Current valid options are 'toggle_shade', which will
shade/unshade the window, 'toggle_maximize' which will
maximize/unmaximize the window, 'minimize' which will minimize
the window, and 'none' which will not do anything.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/action_right_click_titlebar</key>
<applyto>/apps/metacity/general/action_right_click_titlebar</applyto>
<owner>metacity</owner>
<type>string</type>
<default>menu</default>
<locale name="C">
<short>Action on title bar right-click</short>
<long>
This option determines the effects of right-clicking on the
title bar. Current valid options are 'toggle_shade', which will
shade/unshade the window, 'toggle_maximize' which will
maximize/unmaximize the window, 'minimize' which will minimize
the window, and 'none' which will not do anything.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/metacity/general/auto_raise</key>
<applyto>/apps/metacity/general/auto_raise</applyto>

View File

@@ -500,8 +500,7 @@ find_first_fit (MetaWindow *window,
MetaFrameGeometry *fgeom,
/* visible windows on relevant workspaces */
GList *windows,
int* xineramas_list,
int n_xineramas,
int xinerama,
int x,
int y,
int *new_x,
@@ -520,7 +519,6 @@ find_first_fit (MetaWindow *window,
GList *tmp;
MetaRectangle rect;
MetaRectangle work_area;
int i;
retval = FALSE;
@@ -543,108 +541,99 @@ find_first_fit (MetaWindow *window,
rect.height += fgeom->top_height + fgeom->bottom_height;
}
for (i = 0; i < n_xineramas; i++)
{
#ifdef WITH_VERBOSE_MODE
{
char xinerama_location_string[RECT_LENGTH];
meta_rectangle_to_string (&window->screen->xinerama_infos[xineramas_list[i]].rect,
meta_rectangle_to_string (&window->screen->xinerama_infos[xinerama].rect,
xinerama_location_string);
meta_topic (META_DEBUG_XINERAMA,
"Natural xinerama %d is %s\n",
i,
"Natural xinerama is %s\n",
xinerama_location_string);
}
#endif
}
/* try each xinerama in the natural ordering in turn */
i = 0;
while (i < n_xineramas)
{
meta_window_get_work_area_for_xinerama (window, xineramas_list[i], &work_area);
meta_window_get_work_area_for_xinerama (window, xinerama, &work_area);
center_tile_rect_in_area (&rect, &work_area);
center_tile_rect_in_area (&rect, &work_area);
if (meta_rectangle_contains_rect (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, windows))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
if (meta_rectangle_contains_rect (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, windows))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
/* try below each window */
tmp = below_sorted;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
meta_window_get_outer_rect (w, &outer_rect);
retval = TRUE;
rect.x = outer_rect.x;
rect.y = outer_rect.y + outer_rect.height;
if (meta_rectangle_contains_rect (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, below_sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
goto out;
}
/* try below each window */
tmp = below_sorted;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
meta_window_get_outer_rect (w, &outer_rect);
rect.x = outer_rect.x;
rect.y = outer_rect.y + outer_rect.height;
if (meta_rectangle_contains_rect (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, below_sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
retval = TRUE;
goto out;
}
goto out;
}
tmp = tmp->next;
}
tmp = tmp->next;
}
/* try to the right of each window */
tmp = right_sorted;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
/* try to the right of each window */
tmp = right_sorted;
while (tmp != NULL)
{
MetaWindow *w = tmp->data;
MetaRectangle outer_rect;
meta_window_get_outer_rect (w, &outer_rect);
meta_window_get_outer_rect (w, &outer_rect);
rect.x = outer_rect.x + outer_rect.width;
rect.y = outer_rect.y;
if (meta_rectangle_contains_rect (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, right_sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
rect.x = outer_rect.x + outer_rect.width;
rect.y = outer_rect.y;
if (meta_rectangle_contains_rect (&work_area, &rect) &&
!rectangle_overlaps_some_window (&rect, right_sorted))
{
*new_x = rect.x;
*new_y = rect.y;
if (fgeom)
{
*new_x += fgeom->left_width;
*new_y += fgeom->top_height;
}
retval = TRUE;
goto out;
}
tmp = tmp->next;
}
tmp = tmp->next;
}
++i;
}
out:
g_list_free (below_sorted);
@@ -662,11 +651,7 @@ meta_window_place (MetaWindow *window,
{
GList *windows;
const MetaXineramaScreenInfo *xi;
int* xineramas_list = NULL;
int n_xineramas;
int i;
int placed_on = -1;
/* frame member variables should NEVER be used in here, only
* MetaFrameGeometry. But remember fgeom == NULL
* for undecorated windows. Also, this function should
@@ -793,10 +778,6 @@ meta_window_place (MetaWindow *window,
}
}
meta_screen_get_natural_xinerama_list (window->screen,
&xineramas_list,
&n_xineramas);
/* FIXME UTILITY with transient set should be stacked up
* on the sides of the parent window or something.
*/
@@ -861,54 +842,10 @@ meta_window_place (MetaWindow *window,
y = xi->rect.y;
if (find_first_fit (window, fgeom, windows,
xineramas_list, n_xineramas,
xi->number,
x, y, &x, &y))
goto done_check_denied_focus;
/* This is a special-case origin-cascade so that windows that are
* too large to fit onto a workspace (and which will be
* automaximized later) will go onto an empty xinerama if one is
* available.
*/
if (window->has_maximize_func && window->decorated &&
!window->fullscreen)
{
if (window->frame)
{
x = fgeom->left_width;
y = fgeom->top_height;
}
else
{
x = 0;
y = 0;
}
for (i = 0; i < n_xineramas; i++)
{
MetaRectangle work_area;
meta_window_get_work_area_for_xinerama (window, xineramas_list[i], &work_area);
if (!rectangle_overlaps_some_window (&work_area, windows))
{
x += work_area.x;
y += work_area.y;
placed_on = i;
break;
}
}
}
/* if the window wasn't placed at the origin of an empty xinerama,
* cascade it onto the current xinerama
*/
if (placed_on == -1)
{
find_next_cascade (window, fgeom, windows, x, y, &x, &y);
placed_on = window->screen->last_xinerama_index;
}
/* Maximize windows if they are too big for their work area (bit of
* a hack here). Assume undecorated windows probably don't intend to
* be maximized.
@@ -920,15 +857,18 @@ meta_window_place (MetaWindow *window,
MetaRectangle outer;
meta_window_get_work_area_for_xinerama (window,
xineramas_list[placed_on],
xi->number,
&workarea);
meta_window_get_outer_rect (window, &outer);
if (outer.width >= workarea.width)
window->maximize_horizontally_after_placement = TRUE;
if (outer.height >= workarea.height)
window->maximize_vertically_after_placement = TRUE;
/* If the window is bigger than the screen, then automaximize. Do NOT
* auto-maximize the directions independently. See #419810.
*/
if (outer.width >= workarea.width && outer.height >= workarea.height)
{
window->maximize_horizontally_after_placement = TRUE;
window->maximize_vertically_after_placement = TRUE;
}
}
done_check_denied_focus:
@@ -964,7 +904,7 @@ meta_window_place (MetaWindow *window,
y = xi->rect.y;
found_fit = find_first_fit (window, fgeom, focus_window_list,
xineramas_list, n_xineramas,
xi->number,
x, y, &x, &y);
g_list_free (focus_window_list);
}
@@ -977,7 +917,6 @@ meta_window_place (MetaWindow *window,
}
done:
g_free (xineramas_list);
g_list_free (windows);
done_no_constraints:

View File

@@ -47,6 +47,8 @@
#define KEY_FOCUS_NEW_WINDOWS "/apps/metacity/general/focus_new_windows"
#define KEY_RAISE_ON_CLICK "/apps/metacity/general/raise_on_click"
#define KEY_ACTION_DOUBLE_CLICK_TITLEBAR "/apps/metacity/general/action_double_click_titlebar"
#define KEY_ACTION_MIDDLE_CLICK_TITLEBAR "/apps/metacity/general/action_middle_click_titlebar"
#define KEY_ACTION_RIGHT_CLICK_TITLEBAR "/apps/metacity/general/action_right_click_titlebar"
#define KEY_AUTO_RAISE "/apps/metacity/general/auto_raise"
#define KEY_AUTO_RAISE_DELAY "/apps/metacity/general/auto_raise_delay"
#define KEY_THEME "/apps/metacity/general/theme"
@@ -91,8 +93,9 @@ static MetaFocusNewWindows focus_new_windows = META_FOCUS_NEW_WINDOWS_SMART;
static gboolean raise_on_click = TRUE;
static char* current_theme = NULL;
static int num_workspaces = 4;
static MetaActionDoubleClickTitlebar action_double_click_titlebar =
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE;
static MetaActionTitlebar action_double_click_titlebar = META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE;
static MetaActionTitlebar action_middle_click_titlebar = META_ACTION_TITLEBAR_LOWER;
static MetaActionTitlebar action_right_click_titlebar = META_ACTION_TITLEBAR_MENU;
static gboolean application_based = FALSE;
static gboolean disable_workarounds = FALSE;
static gboolean auto_raise = FALSE;
@@ -106,20 +109,7 @@ static int cursor_size = 24;
static gboolean compositing_manager = FALSE;
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_FULLSCREEN_FLASH;
static MetaButtonLayout button_layout = {
{
META_BUTTON_FUNCTION_MENU,
META_BUTTON_FUNCTION_LAST,
META_BUTTON_FUNCTION_LAST,
META_BUTTON_FUNCTION_LAST
},
{
META_BUTTON_FUNCTION_MINIMIZE,
META_BUTTON_FUNCTION_MAXIMIZE,
META_BUTTON_FUNCTION_CLOSE,
META_BUTTON_FUNCTION_LAST
}
};
static MetaButtonLayout button_layout;
/* The screenshot commands are at the end */
static char *commands[MAX_COMMANDS] = { NULL, };
@@ -141,7 +131,7 @@ static gboolean update_visual_bell_type (const char *value);
static gboolean update_num_workspaces (int value);
static gboolean update_application_based (gboolean value);
static gboolean update_disable_workarounds (gboolean value);
static gboolean update_action_double_click_titlebar (const char *value);
static gboolean update_action_titlebar (const char *key, const char *value, MetaActionTitlebar *action);
static gboolean update_auto_raise (gboolean value);
static gboolean update_auto_raise_delay (int value);
static gboolean update_button_layout (const char *value);
@@ -192,6 +182,7 @@ static gboolean update_list_binding (MetaKeyPref *binding,
static void init_bindings (void);
static void init_commands (void);
static void init_workspace_names (void);
static void init_button_layout (void);
typedef struct
@@ -350,6 +341,20 @@ get_bool (const char *key, gboolean *val)
return filled_in;
}
static void
init_action_meta_prefs(const char *key, MetaActionTitlebar *action)
{
GError *err = NULL;
char *str_val;
str_val = gconf_client_get_string (default_client,
key,
&err);
cleanup_error (&err);
update_action_titlebar (key, str_val, action);
g_free (str_val);
}
#endif /* HAVE_GCONF */
void
@@ -359,6 +364,7 @@ meta_prefs_init (void)
GError *err = NULL;
char *str_val;
int int_val;
GConfValue *gconf_val;
gboolean bool_val, bool_val_2;
gboolean update_visual;
gboolean update_audible;
@@ -410,26 +416,25 @@ meta_prefs_init (void)
if (get_bool (KEY_RAISE_ON_CLICK, &bool_val))
update_raise_on_click (bool_val);
str_val = gconf_client_get_string (default_client,
KEY_ACTION_DOUBLE_CLICK_TITLEBAR,
&err);
cleanup_error (&err);
update_action_double_click_titlebar (str_val);
g_free (str_val);
init_action_meta_prefs (KEY_ACTION_DOUBLE_CLICK_TITLEBAR, &action_double_click_titlebar);
init_action_meta_prefs (KEY_ACTION_MIDDLE_CLICK_TITLEBAR, &action_middle_click_titlebar);
init_action_meta_prefs (KEY_ACTION_RIGHT_CLICK_TITLEBAR, &action_right_click_titlebar);
if (get_bool (KEY_AUTO_RAISE, &bool_val))
update_auto_raise (bool_val);
/* FIXME: Since auto_raise_delay of 0 is valid and gconf_client_get_int
* silently returns that value when KEY_AUTO_RAISE_DELAY doesn't exist,
* we should be using gconf_client_get() instead if we cared about
* careful error checking of the key-doesn't-exist case. Since this
* setting is crap, though, I'm adding a FIXME instead of fixing it. ;-)
*/
int_val = gconf_client_get_int (default_client, KEY_AUTO_RAISE_DELAY,
gconf_val = gconf_client_get (default_client, KEY_AUTO_RAISE_DELAY,
&err);
cleanup_error (&err);
update_auto_raise_delay (int_val);
if (gconf_val)
{
if (gconf_val->type == GCONF_VALUE_INT)
update_auto_raise_delay (gconf_value_get_int (gconf_val));
else
meta_warning(_("Type of %s was not integer"), KEY_AUTO_RAISE_DELAY);
gconf_value_free (gconf_val);
}
str_val = gconf_client_get_string (default_client, KEY_THEME,
@@ -516,6 +521,8 @@ meta_prefs_init (void)
*/
titlebar_font = pango_font_description_from_string ("Sans Bold 10");
current_theme = g_strdup ("Atlanta");
init_button_layout();
#endif /* HAVE_GCONF */
/* Load keybindings prefs */
@@ -555,6 +562,23 @@ meta_prefs_init (void)
#ifdef HAVE_GCONF
static gboolean
action_change_titlebar (const char *key, GConfValue *value, MetaActionTitlebar *action)
{
const char *str;
if (value && value->type != GCONF_VALUE_STRING)
{
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
key);
return FALSE;
}
str = value ? gconf_value_get_string (value) : NULL;
return update_action_titlebar (key, str, action);
}
static void
change_notify (GConfClient *client,
guint cnxn_id,
@@ -803,19 +827,21 @@ change_notify (GConfClient *client,
}
else if (strcmp (key, KEY_ACTION_DOUBLE_CLICK_TITLEBAR) == 0)
{
const char *str;
if (value && value->type != GCONF_VALUE_STRING)
{
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
key);
goto out;
}
str = value ? gconf_value_get_string (value) : NULL;
if (update_action_double_click_titlebar (str))
if (action_change_titlebar(KEY_ACTION_DOUBLE_CLICK_TITLEBAR, value, &action_double_click_titlebar))
queue_changed (META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR);
return;
}
else if (strcmp (key, KEY_ACTION_MIDDLE_CLICK_TITLEBAR) == 0)
{
if (action_change_titlebar(KEY_ACTION_MIDDLE_CLICK_TITLEBAR, value, &action_middle_click_titlebar))
queue_changed (META_PREF_ACTION_MIDDLE_CLICK_TITLEBAR);
return;
}
else if (strcmp (key, KEY_ACTION_RIGHT_CLICK_TITLEBAR) == 0)
{
if (action_change_titlebar(KEY_ACTION_RIGHT_CLICK_TITLEBAR, value, &action_right_click_titlebar))
queue_changed (META_PREF_ACTION_RIGHT_CLICK_TITLEBAR);
return;
}
else if (strcmp (key, KEY_AUTO_RAISE) == 0)
{
@@ -1428,14 +1454,6 @@ update_button_layout (const char *value)
if (value == NULL)
return FALSE;
i = 0;
while (i < MAX_BUTTONS_PER_CORNER)
{
new_layout.left_buttons[i] = META_BUTTON_FUNCTION_LAST;
new_layout.right_buttons[i] = META_BUTTON_FUNCTION_LAST;
++i;
}
/* We need to ignore unknown button functions, for
* compat with future versions
*/
@@ -1482,6 +1500,8 @@ update_button_layout (const char *value)
++b;
}
new_layout.left_buttons[i] = META_BUTTON_FUNCTION_LAST;
g_strfreev (buttons);
}
@@ -1525,11 +1545,32 @@ update_button_layout (const char *value)
++b;
}
new_layout.right_buttons[i] = META_BUTTON_FUNCTION_LAST;
g_strfreev (buttons);
}
g_strfreev (sides);
/* Invert the button layout for RTL languages */
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
{
MetaButtonLayout rtl_layout;
int j;
for (i = 0; new_layout.left_buttons[i] != META_BUTTON_FUNCTION_LAST; i++);
for (j = 0; j < i; j++)
rtl_layout.right_buttons[j] = new_layout.left_buttons[i - j - 1];
rtl_layout.right_buttons[j] = META_BUTTON_FUNCTION_LAST;
for (i = 0; new_layout.right_buttons[i] != META_BUTTON_FUNCTION_LAST; i++);
for (j = 0; j < i; j++)
rtl_layout.left_buttons[j] = new_layout.right_buttons[i - j - 1];
rtl_layout.left_buttons[j] = META_BUTTON_FUNCTION_LAST;
new_layout = rtl_layout;
}
changed = !button_layout_equal (&button_layout, &new_layout);
button_layout = new_layout;
@@ -1630,39 +1671,43 @@ meta_prefs_get_disable_workarounds (void)
}
#ifdef HAVE_GCONF
static MetaActionDoubleClickTitlebar
action_double_click_titlebar_from_string (const char *str)
static MetaActionTitlebar
action_titlebar_from_string (const char *str)
{
if (strcmp (str, "toggle_shade") == 0)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE;
return META_ACTION_TITLEBAR_TOGGLE_SHADE;
else if (strcmp (str, "toggle_maximize") == 0)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE;
return META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE;
else if (strcmp (str, "minimize") == 0)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE;
return META_ACTION_TITLEBAR_MINIMIZE;
else if (strcmp (str, "none") == 0)
return META_ACTION_DOUBLE_CLICK_TITLEBAR_NONE;
return META_ACTION_TITLEBAR_NONE;
else if (strcmp (str, "lower") == 0)
return META_ACTION_TITLEBAR_LOWER;
else if (strcmp (str, "menu") == 0)
return META_ACTION_TITLEBAR_MENU;
else
return META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST;
return META_ACTION_TITLEBAR_LAST;
}
static gboolean
update_action_double_click_titlebar (const char *value)
update_action_titlebar (const char *key, const char *value, MetaActionTitlebar *action)
{
MetaActionDoubleClickTitlebar old_action = action_double_click_titlebar;
MetaActionTitlebar old_action = *action, new_action = old_action;
if (value != NULL)
{
action_double_click_titlebar = action_double_click_titlebar_from_string (value);
new_action = action_titlebar_from_string (value);
if (action_double_click_titlebar == META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST)
if (new_action == META_ACTION_TITLEBAR_LAST)
{
action_double_click_titlebar = old_action;
meta_warning (_("GConf key '%s' is set to an invalid value\n"),
KEY_ACTION_DOUBLE_CLICK_TITLEBAR);
new_action = old_action;
meta_warning (_("GConf key '%s' is set to an invalid value\n"), key);
}
*action = new_action;
}
return (old_action != action_double_click_titlebar);
return (old_action != new_action);
}
static gboolean
@@ -1758,6 +1803,12 @@ meta_preference_to_string (MetaPreference pref)
case META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR:
return "ACTION_DOUBLE_CLICK_TITLEBAR";
case META_PREF_ACTION_MIDDLE_CLICK_TITLEBAR:
return "ACTION_MIDDLE_CLICK_TITLEBAR";
case META_PREF_ACTION_RIGHT_CLICK_TITLEBAR:
return "ACTION_RIGHT_CLICK_TITLEBAR";
case META_PREF_AUTO_RAISE:
return "AUTO_RAISE";
@@ -1903,6 +1954,7 @@ static MetaKeyPref screen_bindings[] = {
{ META_KEYBINDING_COMMAND_SCREENSHOT, NULL, FALSE },
{ META_KEYBINDING_COMMAND_WIN_SCREENSHOT, NULL, FALSE },
{ META_KEYBINDING_RUN_COMMAND_TERMINAL, NULL, FALSE },
{ META_KEYBINDING_SET_SPEW_MARK, NULL, FALSE },
{ NULL, NULL, FALSE}
};
@@ -2500,7 +2552,6 @@ find_and_update_list_binding (MetaKeyPref *bindings,
name_without_suffix[strlen(name_without_suffix) - strlen(KEY_LIST_BINDINGS_SUFFIX)] = 0;
/* FIXME factor out dupld code */
if (*name_without_suffix == '/')
key = relative_key (name_without_suffix);
else
@@ -2873,12 +2924,24 @@ meta_prefs_get_window_bindings (const MetaKeyPref **bindings,
*n_bindings = (int) G_N_ELEMENTS (window_bindings) - 1;
}
MetaActionDoubleClickTitlebar
MetaActionTitlebar
meta_prefs_get_action_double_click_titlebar (void)
{
return action_double_click_titlebar;
}
MetaActionTitlebar
meta_prefs_get_action_middle_click_titlebar (void)
{
return action_middle_click_titlebar;
}
MetaActionTitlebar
meta_prefs_get_action_right_click_titlebar (void)
{
return action_right_click_titlebar;
}
gboolean
meta_prefs_get_auto_raise (void)
{
@@ -2980,3 +3043,39 @@ meta_prefs_get_compositing_manager (void)
{
return compositing_manager;
}
static void
init_button_layout(void)
{
MetaButtonLayout button_layout_ltr = {
{
/* buttons in the group on the left side */
META_BUTTON_FUNCTION_MENU,
META_BUTTON_FUNCTION_LAST
},
{
/* buttons in the group on the right side */
META_BUTTON_FUNCTION_MINIMIZE,
META_BUTTON_FUNCTION_MAXIMIZE,
META_BUTTON_FUNCTION_CLOSE,
META_BUTTON_FUNCTION_LAST
}
};
MetaButtonLayout button_layout_rtl = {
{
/* buttons in the group on the left side */
META_BUTTON_FUNCTION_CLOSE,
META_BUTTON_FUNCTION_MAXIMIZE,
META_BUTTON_FUNCTION_MINIMIZE,
META_BUTTON_FUNCTION_LAST
},
{
/* buttons in the group on the right side */
META_BUTTON_FUNCTION_MENU,
META_BUTTON_FUNCTION_LAST
}
};
button_layout = meta_ui_get_direction() == META_UI_DIRECTION_LTR ?
button_layout_ltr : button_layout_rtl;
};

View File

@@ -36,6 +36,8 @@ typedef enum
META_PREF_FOCUS_NEW_WINDOWS,
META_PREF_RAISE_ON_CLICK,
META_PREF_ACTION_DOUBLE_CLICK_TITLEBAR,
META_PREF_ACTION_MIDDLE_CLICK_TITLEBAR,
META_PREF_ACTION_RIGHT_CLICK_TITLEBAR,
META_PREF_AUTO_RAISE,
META_PREF_AUTO_RAISE_DELAY,
META_PREF_THEME,
@@ -93,7 +95,11 @@ const char* meta_prefs_get_terminal_command (void);
const char* meta_prefs_get_gconf_key_for_terminal_command (void);
void meta_prefs_get_button_layout (MetaButtonLayout *button_layout);
MetaActionDoubleClickTitlebar meta_prefs_get_action_double_click_titlebar (void);
/* Double, right, middle click can be configured to any titlebar meta-action */
MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void);
void meta_prefs_set_num_workspaces (int n_workspaces);
@@ -172,6 +178,7 @@ gboolean meta_prefs_get_compositing_manager (void);
#define META_KEYBINDING_COMMAND_SCREENSHOT "run_command_screenshot"
#define META_KEYBINDING_COMMAND_WIN_SCREENSHOT "run_command_window_screenshot"
#define META_KEYBINDING_RUN_COMMAND_TERMINAL "run_command_terminal"
#define META_KEYBINDING_SET_SPEW_MARK "set_spew_mark"
/* Window bindings */
#define META_KEYBINDING_WINDOW_MENU "activate_window_menu"

View File

@@ -128,6 +128,13 @@ meta_preview_new (void)
static void
meta_preview_finalize (GObject *object)
{
MetaPreview *preview;
preview = META_PREVIEW (object);
g_free (preview->title);
preview->title = NULL;
G_OBJECT_CLASS (parent_class)->finalize (object);
}

View File

@@ -89,7 +89,7 @@ set_wm_check_hint (MetaScreen *screen)
static int
set_supported_hint (MetaScreen *screen)
{
#define N_SUPPORTED 58
#define N_SUPPORTED 62
Atom atoms[N_SUPPORTED];
atoms[0] = screen->display->atom_net_wm_name;
@@ -150,8 +150,12 @@ set_supported_hint (MetaScreen *screen)
atoms[55] = screen->display->atom_net_wm_state_demands_attention;
atoms[56] = screen->display->atom_net_desktop_geometry;
atoms[57] = screen->display->atom_net_desktop_viewport;
//atoms[58] = screen->display->atom_net_restack_window;
//atoms[59] = screen->display->atom_net_moveresize_window;
atoms[58] = screen->display->atom_net_wm_user_time_window;
atoms[59] = screen->display->atom_net_moveresize_window;
atoms[60] = screen->display->atom_net_wm_action_above;
atoms[61] = screen->display->atom_net_wm_action_below;
/* atoms[58] = screen->display->atom_net_restack_window; */
XChangeProperty (screen->display->xdisplay, screen->xroot,
screen->display->atom_net_supported,
@@ -434,7 +438,10 @@ meta_screen_new (MetaDisplay *display,
current_wm_sn_owner = None; /* don't wait for it to die later on */
}
new_wm_sn_owner = meta_create_offscreen_window (xdisplay, xroot);
/* We need SelectionClear and SelectionRequest events on the new_wm_sn_owner,
* but those cannot be masked, so we only need NoEventMask.
*/
new_wm_sn_owner = meta_create_offscreen_window (xdisplay, xroot, NoEventMask);
manager_timestamp = timestamp;
@@ -528,7 +535,12 @@ meta_screen_new (MetaDisplay *display,
screen->wm_sn_selection_window = new_wm_sn_owner;
screen->wm_sn_atom = wm_sn_atom;
screen->wm_sn_timestamp = manager_timestamp;
#ifdef HAVE_COMPOSITE_EXTENSIONS
screen->wm_cm_selection_window = meta_create_offscreen_window (xdisplay,
xroot,
NoEventMask);
#endif
screen->work_area_idle = 0;
screen->active_workspace = NULL;
@@ -577,10 +589,10 @@ meta_screen_new (MetaDisplay *display,
meta_screen_set_cursor (screen, META_CURSOR_DEFAULT);
/* Handle creating a no_focus_window for this screen */
screen->no_focus_window = meta_create_offscreen_window (display->xdisplay,
screen->xroot);
XSelectInput (display->xdisplay, screen->no_focus_window,
FocusChangeMask | KeyPressMask | KeyReleaseMask);
screen->no_focus_window =
meta_create_offscreen_window (display->xdisplay,
screen->xroot,
FocusChangeMask|KeyPressMask|KeyReleaseMask);
XMapWindow (display->xdisplay, screen->no_focus_window);
/* Done with no_focus_window stuff */
@@ -800,9 +812,23 @@ meta_screen_manage_all_windows (MetaScreen *screen)
for (list = windows; list != NULL; list = list->next)
{
WindowInfo *info = list->data;
MetaWindow *window;
meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
&info->attrs);
window = meta_window_new_with_attrs (screen->display, info->xwindow, TRUE,
&info->attrs);
if (info->xwindow == screen->no_focus_window ||
info->xwindow == screen->flash_window ||
#ifdef HAVE_COMPOSITE_EXTENSIONS
info->xwindow == screen->wm_cm_selection_window ||
#endif
info->xwindow == screen->wm_sn_selection_window) {
meta_verbose ("Not managing our own windows\n");
continue;
}
if (screen->display->compositor)
meta_compositor_add_window (screen->display->compositor, window,
info->xwindow, &info->attrs);
}
meta_stack_thaw (screen->stack);
@@ -815,9 +841,12 @@ meta_screen_manage_all_windows (MetaScreen *screen)
void
meta_screen_composite_all_windows (MetaScreen *screen)
{
#ifdef HAVE_COMPOSITE_EXTENSIONS
MetaDisplay *display;
GList *windows, *list;
if (!screen->display->compositor)
display = screen->display;
if (!display->compositor)
return;
windows = list_windows (screen);
@@ -828,7 +857,17 @@ meta_screen_composite_all_windows (MetaScreen *screen)
{
WindowInfo *info = list->data;
meta_compositor_add_window (screen->display->compositor,
if (info->xwindow == screen->no_focus_window ||
info->xwindow == screen->flash_window ||
info->xwindow == screen->wm_sn_selection_window ||
info->xwindow == screen->wm_cm_selection_window) {
meta_verbose ("Not managing our own windows\n");
continue;
}
meta_compositor_add_window (display->compositor,
meta_display_lookup_x_window (display,
info->xwindow),
info->xwindow, &info->attrs);
}
@@ -836,6 +875,7 @@ meta_screen_composite_all_windows (MetaScreen *screen)
g_list_foreach (windows, (GFunc)g_free, NULL);
g_list_free (windows);
#endif
}
MetaScreen*
@@ -983,7 +1023,7 @@ meta_screen_queue_frame_redraws (MetaScreen *screen)
static void
queue_resize (MetaScreen *screen, MetaWindow *window, gpointer data)
{
meta_window_queue_move_resize (window);
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
}
void
@@ -1208,6 +1248,49 @@ meta_screen_update_cursor (MetaScreen *screen)
XFreeCursor (screen->display->xdisplay, xcursor);
}
#define MAX_PREVIEW_SIZE 150.0
static GdkPixbuf *
get_window_pixbuf (MetaWindow *window,
int *width,
int *height)
{
Pixmap pmap;
GdkPixbuf *pixbuf, *scaled;
double ratio;
pmap = meta_compositor_get_window_pixmap (window->display->compositor,
window);
if (pmap == None)
return NULL;
pixbuf = meta_ui_get_pixbuf_from_pixmap (pmap);
if (pixbuf == NULL)
return NULL;
*width = gdk_pixbuf_get_width (pixbuf);
*height = gdk_pixbuf_get_height (pixbuf);
/* Scale pixbuf to max dimension MAX_PREVIEW_SIZE */
if (*width > *height)
{
ratio = ((double) *width) / MAX_PREVIEW_SIZE;
*width = (int) MAX_PREVIEW_SIZE;
*height = (int) (((double) *height) / ratio);
}
else
{
ratio = ((double) *height) / MAX_PREVIEW_SIZE;
*height = (int) MAX_PREVIEW_SIZE;
*width = (int) (((double) *width) / ratio);
}
scaled = gdk_pixbuf_scale_simple (pixbuf, *width, *height,
GDK_INTERP_BILINEAR);
g_object_unref (pixbuf);
return scaled;
}
void
meta_screen_ensure_tab_popup (MetaScreen *screen,
MetaTabList list_type,
@@ -1240,12 +1323,41 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
{
MetaWindow *window;
MetaRectangle r;
GdkPixbuf *win_pixbuf;
int width, height;
window = tmp->data;
entries[i].key = (MetaTabEntryKey) window->xwindow;
entries[i].title = window->title;
entries[i].icon = window->icon;
win_pixbuf = get_window_pixbuf (window, &width, &height);
if (win_pixbuf == NULL)
entries[i].icon = g_object_ref (window->icon);
else
{
int icon_width, icon_height, t_width, t_height;
#define ICON_OFFSET 6
icon_width = gdk_pixbuf_get_width (window->icon);
icon_height = gdk_pixbuf_get_height (window->icon);
t_width = width + ICON_OFFSET;
t_height = height + ICON_OFFSET;
entries[i].icon = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
t_width, t_height);
gdk_pixbuf_fill (entries[i].icon, 0x00000000);
gdk_pixbuf_copy_area (win_pixbuf, 0, 0, width, height,
entries[i].icon, 0, 0);
g_object_unref (win_pixbuf);
gdk_pixbuf_composite (window->icon, entries[i].icon,
t_width - icon_width, t_height - icon_height,
icon_width, icon_height,
t_width - icon_width, t_height - icon_height,
1.0, 1.0, GDK_INTERP_BILINEAR, 255);
}
entries[i].blank = FALSE;
entries[i].hidden = !meta_window_showing_on_its_workspace (window);
entries[i].demands_attention = window->wm_state_demands_attention;
@@ -1305,6 +1417,10 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
len,
5, /* FIXME */
TRUE);
for (i = 0; i < len; i++)
g_object_unref (entries[i].icon);
g_free (entries);
g_list_free (tab_list);
@@ -1815,7 +1931,8 @@ meta_screen_update_workspace_names (MetaScreen *screen)
Window
meta_create_offscreen_window (Display *xdisplay,
Window parent)
Window parent,
long valuemask)
{
XSetWindowAttributes attrs;
@@ -1824,7 +1941,7 @@ meta_create_offscreen_window (Display *xdisplay,
* (but on a display we are managing at least one screen for)
*/
attrs.override_redirect = True;
attrs.event_mask = PropertyChangeMask;
attrs.event_mask = valuemask;
return XCreateWindow (xdisplay,
parent,
@@ -2211,7 +2328,7 @@ meta_screen_resize_func (MetaScreen *screen,
{
meta_window_update_struts (window);
}
meta_window_queue_move_resize (window);
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
meta_window_recalc_features (window);
}
@@ -2264,7 +2381,7 @@ queue_windows_showing (MetaScreen *screen)
MetaWindow *w = tmp->data;
if (w->screen == screen)
meta_window_queue_calc_showing (w);
meta_window_queue (w, META_QUEUE_CALC_SHOWING);
tmp = tmp->next;
}
@@ -2538,7 +2655,15 @@ meta_screen_sn_event (SnMonitorEvent *event,
}
#endif
void
/* Sets the initial_timestamp and initial_workspace properties
* of a window according to information given us by the
* startup-notification library.
*
* Returns TRUE if startup properties have been applied, and
* FALSE if they have not (for example, if they had already
* been applied.)
*/
gboolean
meta_screen_apply_startup_properties (MetaScreen *screen,
MetaWindow *window)
{
@@ -2547,6 +2672,7 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
GSList *tmp;
SnStartupSequence *sequence;
/* Does the window have a startup ID stored? */
startup_id = meta_window_get_startup_id (window);
meta_topic (META_DEBUG_STARTUP,
@@ -2557,6 +2683,10 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
sequence = NULL;
if (startup_id == NULL)
{
/* No startup ID stored for the window. Let's ask the
* startup-notification library whether there's anything
* stored for the resource name or resource class hints.
*/
tmp = screen->startup_sequences;
while (tmp != NULL)
{
@@ -2589,9 +2719,14 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
}
}
/* Still no startup ID? Bail. */
if (startup_id == NULL)
return;
return FALSE;
/* We might get this far and not know the sequence ID (if the window
* already had a startup ID stored), so let's look for one if we don't
* already know it.
*/
if (sequence == NULL)
{
tmp = screen->startup_sequences;
@@ -2613,8 +2748,7 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
if (sequence != NULL)
{
int space;
guint32 timestamp;
gboolean changed_something = FALSE;
meta_topic (META_DEBUG_STARTUP,
"Found startup sequence for window %s ID \"%s\"\n",
@@ -2622,7 +2756,7 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
if (!window->initial_workspace_set)
{
space = sn_startup_sequence_get_workspace (sequence);
int space = sn_startup_sequence_get_workspace (sequence);
if (space >= 0)
{
meta_topic (META_DEBUG_STARTUP,
@@ -2631,21 +2765,23 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
window->initial_workspace_set = TRUE;
window->initial_workspace = space;
changed_something = TRUE;
}
}
if (!window->initial_timestamp_set)
{
timestamp = sn_startup_sequence_get_timestamp (sequence);
guint32 timestamp = sn_startup_sequence_get_timestamp (sequence);
meta_topic (META_DEBUG_STARTUP,
"Setting initial window timestamp to %u based on startup info\n",
timestamp);
window->initial_timestamp_set = TRUE;
window->initial_timestamp = timestamp;
changed_something = TRUE;
}
return;
return changed_something;
}
else
{
@@ -2655,5 +2791,32 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
}
#endif /* HAVE_STARTUP_NOTIFICATION */
return FALSE;
}
#ifdef HAVE_COMPOSITE_EXTENSIONS
void
meta_screen_set_cm_selection (MetaScreen *screen)
{
char selection[32];
Atom a;
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
meta_verbose ("Setting selection: %s\n", selection);
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
XSetSelectionOwner (screen->display->xdisplay, a,
screen->wm_cm_selection_window, CurrentTime);
}
void
meta_screen_unset_cm_selection (MetaScreen *screen)
{
char selection[32];
Atom a;
g_snprintf (selection, sizeof(selection), "_NET_WM_CM_S%d", screen->number);
a = XInternAtom (screen->display->xdisplay, selection, FALSE);
XSetSelectionOwner (screen->display->xdisplay, a, None, CurrentTime);
}
#endif /* HAVE_COMPOSITE_EXTENSIONS */

View File

@@ -102,7 +102,11 @@ struct _MetaScreen
GSList *startup_sequences;
guint startup_sequence_timeout;
#endif
#ifdef HAVE_COMPOSITE_EXTENSIONS
Window wm_cm_selection_window;
#endif
guint work_area_idle;
int rows_of_workspaces;
@@ -171,7 +175,8 @@ void meta_screen_update_workspace_names (MetaScreen *scree
void meta_screen_queue_workarea_recalc (MetaScreen *screen);
Window meta_create_offscreen_window (Display *xdisplay,
Window parent);
Window parent,
long valuemask);
typedef struct MetaWorkspaceLayout MetaWorkspaceLayout;
@@ -206,8 +211,13 @@ void meta_screen_unshow_desktop (MetaScreen *screen);
/* Update whether the destkop is being shown for the current active_workspace */
void meta_screen_update_showing_desktop_hint (MetaScreen *screen);
void meta_screen_apply_startup_properties (MetaScreen *screen,
gboolean meta_screen_apply_startup_properties (MetaScreen *screen,
MetaWindow *window);
void meta_screen_composite_all_windows (MetaScreen *screen);
#ifdef HAVE_COMPOSITE_EXTENSIONS
void meta_screen_set_cm_selection (MetaScreen *screen);
void meta_screen_unset_cm_selection (MetaScreen *screen);
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More