Compare commits
266 Commits
METACITY_2
...
METACITY_2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fd533eee1 | ||
|
|
dc7e1007b0 | ||
|
|
976968e07e | ||
|
|
d986898234 | ||
|
|
1d8db8825f | ||
|
|
7c377a0193 | ||
|
|
fe9e1cdb05 | ||
|
|
d6e8c6c3ed | ||
|
|
029e3fc0ae | ||
|
|
c27cdff29c | ||
|
|
cf2da99859 | ||
|
|
3fe42e647a | ||
|
|
1d06b1f5e8 | ||
|
|
20479df535 | ||
|
|
c585fa5036 | ||
|
|
1aed84c9d7 | ||
|
|
8cacb2afef | ||
|
|
2cfd418b03 | ||
|
|
e4c4d8b4d8 | ||
|
|
fc74911256 | ||
|
|
3d0535569d | ||
|
|
4dc7e6a4ed | ||
|
|
e84b5bfed0 | ||
|
|
c9366989a0 | ||
|
|
eb3c38e3ad | ||
|
|
5196fb1ec5 | ||
|
|
353408e30b | ||
|
|
cc6b0e03fb | ||
|
|
38cd0f28ef | ||
|
|
3d118513c5 | ||
|
|
d35c086240 | ||
|
|
27e7d0c529 | ||
|
|
a9294e2906 | ||
|
|
446cc65f5d | ||
|
|
0a94728234 | ||
|
|
aa87fe4140 | ||
|
|
5944e94710 | ||
|
|
2b468a45b3 | ||
|
|
d7cff41d1b | ||
|
|
b4d0db909b | ||
|
|
b595f1e99c | ||
|
|
ed467aad59 | ||
|
|
73224faec0 | ||
|
|
bd5436097e | ||
|
|
a462ba5798 | ||
|
|
b1ff50f45f | ||
|
|
5a6bbef8ac | ||
|
|
309e254b1d | ||
|
|
10dd09687b | ||
|
|
69bbbbc6ca | ||
|
|
1a6c98c79b | ||
|
|
952e883456 | ||
|
|
c652788542 | ||
|
|
696ef85e64 | ||
|
|
007e8c013c | ||
|
|
cd07c25706 | ||
|
|
3802f157b6 | ||
|
|
a871830927 | ||
|
|
5545e49581 | ||
|
|
e98e38d32e | ||
|
|
2d74cdc026 | ||
|
|
7c343fc22d | ||
|
|
1dc74bbc8c | ||
|
|
618a6b38c3 | ||
|
|
e8b016984b | ||
|
|
8bbccb91f7 | ||
|
|
9c2e546f53 | ||
|
|
12ac1d6a4b | ||
|
|
2ccb7f7bfa | ||
|
|
389eb410c7 | ||
|
|
f0c4d2c57b | ||
|
|
4c4943312a | ||
|
|
d616aeb828 | ||
|
|
92c63dfdc5 | ||
|
|
f9678266c7 | ||
|
|
e3db5a0be6 | ||
|
|
49e1802c7a | ||
|
|
eb4941d005 | ||
|
|
371f0b732f | ||
|
|
bdd9e28878 | ||
|
|
1f05ddcd0e | ||
|
|
78604b64bc | ||
|
|
7c4af65ec1 | ||
|
|
e6083f64fb | ||
|
|
b996cd03be | ||
|
|
36287b9417 | ||
|
|
6d8efc90e0 | ||
|
|
d53af7196c | ||
|
|
667c74bc4d | ||
|
|
c5c59b1761 | ||
|
|
5fb20624c4 | ||
|
|
8f2b9cb4a9 | ||
|
|
0418146249 | ||
|
|
6e70013412 | ||
|
|
ff33209e1f | ||
|
|
98791271e1 | ||
|
|
8eac4fa3ce | ||
|
|
0666e2c038 | ||
|
|
1004bd8b60 | ||
|
|
45966f581b | ||
|
|
5194df842c | ||
|
|
a7053d3d47 | ||
|
|
8ead622f8f | ||
|
|
7759644304 | ||
|
|
526dd959ed | ||
|
|
cb5c112166 | ||
|
|
fb3b32a2bd | ||
|
|
0e25c6eff6 | ||
|
|
1724fa36f1 | ||
|
|
a50b3c7a2b | ||
|
|
c8d33dc86b | ||
|
|
aae4472a63 | ||
|
|
18c9101a4f | ||
|
|
b10626c5d8 | ||
|
|
50310c5870 | ||
|
|
e03de727db | ||
|
|
7f6b23a90d | ||
|
|
e66919510f | ||
|
|
966e36b9f6 | ||
|
|
ee3ae1584f | ||
|
|
128cda50bf | ||
|
|
3f7d729978 | ||
|
|
6de7271ab6 | ||
|
|
6fa4dee13e | ||
|
|
bc6996b171 | ||
|
|
9ec6dbd5ca | ||
|
|
2034a309e5 | ||
|
|
7626f74b85 | ||
|
|
eb639a4650 | ||
|
|
dc9920b883 | ||
|
|
b8f89db4d1 | ||
|
|
63ca4e8bde | ||
|
|
4d8a7a2045 | ||
|
|
ebfbef86a0 | ||
|
|
addf369006 | ||
|
|
82c56cb5d7 | ||
|
|
0a8bdcdcb3 | ||
|
|
745906b7db | ||
|
|
8fe344db51 | ||
|
|
f32712937b | ||
|
|
43d4ea3f3b | ||
|
|
8d00f13dc7 | ||
|
|
6753584e80 | ||
|
|
9b85e7ee7f | ||
|
|
dda3c2bee6 | ||
|
|
921661e91d | ||
|
|
7a799b3a63 | ||
|
|
b01dcaa338 | ||
|
|
9cae11fd9e | ||
|
|
da7d198757 | ||
|
|
350225ea37 | ||
|
|
930c7ea270 | ||
|
|
ec51e41c62 | ||
|
|
08f51fdf94 | ||
|
|
e82ce26425 | ||
|
|
8a4c3c81a1 | ||
|
|
0bb8bd4370 | ||
|
|
81e32cfa32 | ||
|
|
6e007baaa8 | ||
|
|
55899b5ab7 | ||
|
|
5c06f103ca | ||
|
|
e6b1bd9922 | ||
|
|
44b86d468e | ||
|
|
44ef3b3a51 | ||
|
|
11a90c53ed | ||
|
|
88b91199d2 | ||
|
|
15d871023e | ||
|
|
fc00da1099 | ||
|
|
db3d6725a2 | ||
|
|
f94d12a991 | ||
|
|
c7cb503003 | ||
|
|
dc9880ea7e | ||
|
|
7eb85e6e9c | ||
|
|
6ab8fb150f | ||
|
|
e179b813f4 | ||
|
|
24a6a105e3 | ||
|
|
9d6fed2aa0 | ||
|
|
8090d192e3 | ||
|
|
36b9a3a974 | ||
|
|
f145337a8b | ||
|
|
0d7d821343 | ||
|
|
7211cc21c3 | ||
|
|
f4277e3235 | ||
|
|
47bb79adb2 | ||
|
|
39a6707a06 | ||
|
|
f6f968a545 | ||
|
|
10ad03db76 | ||
|
|
ae441010b9 | ||
|
|
a877cbc80d | ||
|
|
b40993fab9 | ||
|
|
b86d678c4c | ||
|
|
56b59faf87 | ||
|
|
90e6198401 | ||
|
|
cd748a2e97 | ||
|
|
c73a198f94 | ||
|
|
4e478159b6 | ||
|
|
85e43a402f | ||
|
|
c1fcc4bb6b | ||
|
|
a850771e04 | ||
|
|
6126940518 | ||
|
|
82267f5afb | ||
|
|
22e6c6f7c9 | ||
|
|
fe75a334b1 | ||
|
|
2774292561 | ||
|
|
e9f578b511 | ||
|
|
2ee754ddaf | ||
|
|
f7a45f10ea | ||
|
|
9626780635 | ||
|
|
e3249d6e1b | ||
|
|
419884a0cb | ||
|
|
1b941ff508 | ||
|
|
5d9ccfac37 | ||
|
|
031b03513a | ||
|
|
50c5bf4bf6 | ||
|
|
c4a135aeee | ||
|
|
d97395ae52 | ||
|
|
d6be56358e | ||
|
|
4becc1e631 | ||
|
|
1b9faba6c5 | ||
|
|
d20d537113 | ||
|
|
28b48248a2 | ||
|
|
f665d54373 | ||
|
|
5ca9f43752 | ||
|
|
5eabc7c781 | ||
|
|
0180c10092 | ||
|
|
5080b8fefb | ||
|
|
34138ff44e | ||
|
|
a2d21149e4 | ||
|
|
db4fa5c5fb | ||
|
|
ff88d79062 | ||
|
|
15c7e2aed9 | ||
|
|
09a48beaec | ||
|
|
ea137d35f3 | ||
|
|
54b0105ffa | ||
|
|
01a282fdd3 | ||
|
|
9d6d1c5fb6 | ||
|
|
fd4378d84f | ||
|
|
ceb54162b3 | ||
|
|
390ded3054 | ||
|
|
caf43a123f | ||
|
|
106391a431 | ||
|
|
595465ad22 | ||
|
|
0b3391a25c | ||
|
|
fcdd0fbd50 | ||
|
|
9b701f520a | ||
|
|
a3e309bab8 | ||
|
|
c065a5df5d | ||
|
|
01030ac0df | ||
|
|
3e55c138f1 | ||
|
|
81256ebe48 | ||
|
|
8722c60a28 | ||
|
|
8f09a12069 | ||
|
|
c68c26b7f8 | ||
|
|
d419955ddc | ||
|
|
af593aa5c5 | ||
|
|
191baa3c76 | ||
|
|
c8c666f855 | ||
|
|
edea47d113 | ||
|
|
b164d11b90 | ||
|
|
0cc7e939ab | ||
|
|
2276f91162 | ||
|
|
63ea328ea8 | ||
|
|
fe34523949 | ||
|
|
d79a571d0a | ||
|
|
a34944d341 | ||
|
|
b569dddc17 |
23
HACKING
23
HACKING
@@ -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
|
||||
|
||||
44
MAINTAINERS
44
MAINTAINERS
@@ -1,14 +1,38 @@
|
||||
Currently active maintainers
|
||||
----------------------------
|
||||
|
||||
Havoc Pennington
|
||||
E-mail: hp@redhat.com
|
||||
|
||||
--------------------------------
|
||||
Elijah Newren
|
||||
E-mail: newren@gmail.com
|
||||
|
||||
Søren Sandmann
|
||||
E-mail: sandmann@redhat.com
|
||||
Email: newren gmail com
|
||||
Userid: newren
|
||||
- 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
|
||||
|
||||
@@ -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
|
||||
|
||||
285
NEWS
285
NEWS
@@ -1,3 +1,282 @@
|
||||
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. (Bruno) [#382962]
|
||||
- unmaximise button keeps pressed appearance when moved off and
|
||||
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)
|
||||
|
||||
Translations
|
||||
Djihed Afifi (ar), Ales Nyakhaychyk (be), Jordi Mallach (ca),
|
||||
Jakub Friedl (cs), David Lodge (en_GB), Raivis Dejus (lv),
|
||||
Kjartan Maraas (nb), Mugurel Tudor (ro), Daniel Nylander (sv),
|
||||
Theppitak Karoonboonyanan (th)
|
||||
|
||||
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 (Christof) [#358715]
|
||||
- grab server when switching workspaces (Federico) [#381127]
|
||||
- replace changing text on window menu with pairs of radio buttons
|
||||
and checkboxes (Bruno, Björn) [#343108]
|
||||
|
||||
Translations
|
||||
Kjartan Maraas (nb), Jakub Friedl (cs), Yuval Tanny (he), Ivar Smolin (et),
|
||||
Duarte Loreto (pt), Francisco Javier F. Serrador (es)
|
||||
|
||||
2.17.2
|
||||
======
|
||||
|
||||
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]
|
||||
- fix strict focus mode by picking up on res_class (Dan) [#361054]
|
||||
- remove deprecated gtk stuff (Priit, Bruno)
|
||||
- string fixes (Kjartan) [#363354, #363355]
|
||||
|
||||
Translations
|
||||
Jakub Friedl (cs), Francisco Javier F. Serrador (es), Ilkka Tuohela (fi),
|
||||
Christophe Merlet (RedFox) (fr), Kjartan Maraas (nb)
|
||||
|
||||
2.17.1
|
||||
======
|
||||
|
||||
Thanks to Bruno Boaventura and Carlo Wood for improvements in this
|
||||
release.
|
||||
|
||||
- sync metacity workspace previous with libwnck (Bruno) [#341893]
|
||||
- fix cases when titlebar is allowed offscreen and shouldn't be, and
|
||||
vice-versa (Carlo) [#333995]
|
||||
|
||||
Translations
|
||||
Ilkka Tuohela (fi)
|
||||
|
||||
2.17.0
|
||||
======
|
||||
|
||||
@@ -20,9 +299,9 @@ and Thomas Thurman for changes in this release.
|
||||
[#355620]
|
||||
- fixes for compilation warnings, etc (Elijah, Jens) [#348067, #356631]
|
||||
|
||||
Translators
|
||||
Ivar Smolin (et), Gabor Kelemen (hu), Luca Ferretti (it),
|
||||
Runa Bhattacharjee (bn_IN)
|
||||
Translators
|
||||
Ivar Smolin (et), Gabor Kelemen (hu), Luca Ferretti (it),
|
||||
Runa Bhattacharjee (bn_IN)
|
||||
|
||||
2.16.2
|
||||
======
|
||||
|
||||
11
configure.in
11
configure.in
@@ -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], [20])
|
||||
# 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], [0])
|
||||
@@ -176,6 +176,13 @@ else
|
||||
AC_MSG_ERROR("Pango 1.2.0 or greater based on Xft2 is required")
|
||||
fi
|
||||
|
||||
if $PKG_CONFIG --exists gnome-keybindings; then
|
||||
GNOME_KEYBINDINGS_KEYSDIR=$($PKG_CONFIG --variable keysdir gnome-keybindings)
|
||||
else
|
||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
||||
fi
|
||||
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,7 +226,7 @@ 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..."
|
||||
echo "Not building compositing manager by default now, must enable explicitly to get it."
|
||||
have_xcomposite=no
|
||||
else
|
||||
have_xcomposite=no
|
||||
|
||||
46
doc/compositor-control.txt
Normal file
46
doc/compositor-control.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
The compositor is the box of tricks inside the window manager which performs
|
||||
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.
|
||||
|
||||
To turn the compositor on initially, you need to pass --enable-compositor to
|
||||
the configure script. This will introduce a dependence on libcm, which you
|
||||
can get from <URL:http://ftp.gnome.org/pub/GNOME/sources/libcm/>.
|
||||
|
||||
When Metacity is compiled, you will need to turn the compositor on in gconf
|
||||
for it to have any effect. You will find the boolean switch at
|
||||
|
||||
/apps/metacity/general/compositing_manager
|
||||
|
||||
When that's done, you can set some environment variables before you launch
|
||||
Metacity to influence how the compositor works. These will eventually become
|
||||
configuration options or gconf options when they grow up. Define them to any
|
||||
value to turn them on; leave them undefined to turn them off. Currently the
|
||||
options you can set are:
|
||||
|
||||
LIBCM_DIRECT
|
||||
|
||||
If this is set, the compositor will bypass the X server and do all its
|
||||
work directly with the hardware. I know of no reason you would want to
|
||||
do so, but perhaps you do.
|
||||
|
||||
LIBCM_TFP
|
||||
|
||||
If this is set ("tfp mode"), the compositor will feel free to use the
|
||||
texture_from_pixmap extension; if this is not set ("non-tfp mode"), the
|
||||
compositor will use a workaround. Many drivers require non-tfp mode in
|
||||
order to work, and will paint all windows clear blue or clear white
|
||||
without it. Thanks to Travis Watkins for suggesting this switch; he
|
||||
cautions that some games or video players may require tfp mode.
|
||||
|
||||
METACITY_BLING
|
||||
|
||||
This turns on several pretty but non-essential animations (dialogues
|
||||
fracturing and exploding, minimisations doing a shrinkydink effect,
|
||||
and so on). If it is not set, the standard non-GL animations are
|
||||
retained. This affects only window event animations; it doesn't change
|
||||
menus zooming, dialogues being semi-transparent, and so on. Try it
|
||||
and see whether you like it.
|
||||
|
||||
If you have any problems, ask on metacity-devel-list@gnome.org, or
|
||||
#gnome-hackers on gimpnet, or come and find me (tthurman at gnome) and ask.
|
||||
@@ -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.
|
||||
|
||||
539
po/ChangeLog
539
po/ChangeLog
@@ -1,3 +1,540 @@
|
||||
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.
|
||||
|
||||
2007-01-13 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2007-01-05 Jakub Friedl <jfriedl@suse.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2007-01-3 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation by Djihed Afifi.
|
||||
|
||||
2007-01-01 David Lodge <dave@cirt.net>
|
||||
|
||||
* en_GB.po: Updated English (British) translation
|
||||
|
||||
2006-12-29 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2006-12-29 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
|
||||
2006-12-27 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation.
|
||||
|
||||
2006-12-24 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation.
|
||||
|
||||
2006-12-23 Raivis Dejus <orvils@gmail.com>
|
||||
|
||||
* lv.po: Updated Latvian Translation.
|
||||
|
||||
2006-12-18 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2006-12-18 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic Translation.
|
||||
|
||||
2006-12-18 Ales Nyakhaychyk <nab@mail.by>
|
||||
|
||||
* be.po: Updated Belarusian Translation by Ihar Hrachyshka.
|
||||
|
||||
2006-12-15 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
|
||||
2006-12-13 Mugurel Tudor <mugurelu@gnome.ro>
|
||||
|
||||
* ro.po: Updated Romanian translation.
|
||||
|
||||
2006-12-11 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2006-12-11 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2006-12-04 Jakub Friedl <jfriedl@suse.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2006-11-22 Yair Hershkovitz <yairhr@gmail.com>
|
||||
|
||||
* he.po: Updated Hebrew translation.
|
||||
|
||||
2006-11-19 Priit Laes <plaes@cvs.gnome.org>
|
||||
|
||||
* et.po: Translation updated by Ivar Smolin.
|
||||
|
||||
2006-11-19 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Partial updated Portuguese translation.
|
||||
|
||||
2006-11-19 Priit Laes <plaes@cvs.gnome.org>
|
||||
|
||||
* et.po: Translation updated by Ivar Smolin.
|
||||
|
||||
2006-11-18 Priit Laes <plaes@cvs.gnome.org>
|
||||
|
||||
* et.po: Translation updated by Ivar Smolin.
|
||||
|
||||
2006-11-07 Francisco Javier F. Serrador <serrador@openshine.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2006-11-03 Jakub Friedl <jfriedl@suse.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2006-10-26 Francisco Javier F. Serrador <serrador@openshine.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2006-10-26 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2006-10-26 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2006-10-22 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation.
|
||||
|
||||
2006-10-19 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2006-10-15 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2006-10-02 Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
@@ -110,7 +647,7 @@
|
||||
|
||||
* mr.po: Added the file and updated Marathi translation.
|
||||
* LINGUAS: Added an entry for Marathi(mr).
|
||||
|
||||
|
||||
2006-09-03 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation from
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
3813
po/be@latin.po
Normal file
3813
po/be@latin.po
Normal file
File diff suppressed because it is too large
Load Diff
2814
po/en_CA.po
2814
po/en_CA.po
File diff suppressed because it is too large
Load Diff
1477
po/en_GB.po
1477
po/en_GB.po
File diff suppressed because it is too large
Load Diff
333
po/he.po
333
po/he.po
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity.HEAD.he\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-08-03 09:21+0300\n"
|
||||
"POT-Creation-Date: 2006-11-22 04:22+0100\n"
|
||||
"PO-Revision-Date: 2005-07-31 01:18+0300\n"
|
||||
"Last-Translator: Yuval Tanny\n"
|
||||
"Language-Team: Hebrew <he@li.org>\n"
|
||||
@@ -27,35 +27,35 @@ msgstr "שימוש: %s\n"
|
||||
msgid "Metacity was compiled without support for verbose mode\n"
|
||||
msgstr "Metacity was compiled without support for verbose mode\n"
|
||||
|
||||
#: ../src/delete.c:64 ../src/delete.c:91 ../src/metacity-dialog.c:71
|
||||
#: ../src/delete.c:65 ../src/delete.c:92 ../src/metacity-dialog.c:48
|
||||
#: ../src/theme-parser.c:467
|
||||
#, c-format
|
||||
msgid "Could not parse \"%s\" as an integer"
|
||||
msgstr "לא ניתן להעביר את \"%s\" כמספר שלם"
|
||||
|
||||
#: ../src/delete.c:71 ../src/delete.c:98 ../src/metacity-dialog.c:78
|
||||
#: ../src/delete.c:72 ../src/delete.c:99 ../src/metacity-dialog.c:55
|
||||
#: ../src/theme-parser.c:476 ../src/theme-parser.c:530
|
||||
#, c-format
|
||||
msgid "Did not understand trailing characters \"%s\" in string \"%s\""
|
||||
msgstr "לא ניתן להבין את התוים \"%s\" במחרוזת \"%s\""
|
||||
|
||||
#: ../src/delete.c:129
|
||||
#: ../src/delete.c:130
|
||||
#, c-format
|
||||
msgid "Failed to parse message \"%s\" from dialog process\n"
|
||||
msgstr "נכשל בהעברת ההודעה \"%s\" מתהליך תיבת דו-השיח\n"
|
||||
|
||||
#: ../src/delete.c:264
|
||||
#: ../src/delete.c:265
|
||||
#, c-format
|
||||
msgid "Error reading from dialog display process: %s\n"
|
||||
msgstr "שגיאה בקריאה מתהליך הצגת תיבת דו-שיח: %s\n"
|
||||
|
||||
#: ../src/delete.c:345
|
||||
#: ../src/delete.c:346
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error launching metacity-dialog to ask about killing an application: %s\n"
|
||||
msgstr "שגיאה בהפעלת תיבת דו-שיח של מטאסיטי השואלת אם להרוג יישום: %s\n"
|
||||
|
||||
#: ../src/delete.c:453
|
||||
#: ../src/delete.c:454
|
||||
#, c-format
|
||||
msgid "Failed to get hostname: %s\n"
|
||||
msgstr "נכשל בקבלת שם המארח: %s\n"
|
||||
@@ -81,44 +81,44 @@ msgstr ""
|
||||
msgid "Fatal IO error %d (%s) on display '%s'.\n"
|
||||
msgstr "שגיאת קלט/פלט חמורה %d (%s) בתצוגה '%s'.\n"
|
||||
|
||||
#: ../src/frames.c:1086
|
||||
#: ../src/frames.c:1089
|
||||
msgid "Close Window"
|
||||
msgstr "סגור חלון"
|
||||
|
||||
#: ../src/frames.c:1089
|
||||
#: ../src/frames.c:1092
|
||||
msgid "Window Menu"
|
||||
msgstr "תפריט חלון"
|
||||
|
||||
#: ../src/frames.c:1092
|
||||
#: ../src/frames.c:1095
|
||||
msgid "Minimize Window"
|
||||
msgstr "מזער חלון"
|
||||
|
||||
#: ../src/frames.c:1095
|
||||
#: ../src/frames.c:1098
|
||||
msgid "Maximize Window"
|
||||
msgstr "הגדל חלון"
|
||||
|
||||
#: ../src/frames.c:1098
|
||||
#: ../src/frames.c:1101
|
||||
msgid "Unmaximize Window"
|
||||
msgstr "שחזר חלון"
|
||||
|
||||
#: ../src/keybindings.c:1021
|
||||
#: ../src/keybindings.c:1031
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Some other program is already using the key %s with modifiers %x as a "
|
||||
"binding\n"
|
||||
msgstr "תוכנית אחרת כבר משתמשת במקש %s עם המקש %x כצירוף\n"
|
||||
|
||||
#: ../src/keybindings.c:2588
|
||||
#: ../src/keybindings.c:2663
|
||||
#, c-format
|
||||
msgid "Error launching metacity-dialog to print an error about a command: %s\n"
|
||||
msgstr "שגיאה בהפעלת תיבת דו-שיח של מטאסיטי כדי להדפיס שגיאה על הפקודה: %s\n"
|
||||
|
||||
#: ../src/keybindings.c:2693
|
||||
#: ../src/keybindings.c:2768
|
||||
#, c-format
|
||||
msgid "No command %d has been defined.\n"
|
||||
msgstr "אף פקודה %d לא הוגדרה.\n"
|
||||
|
||||
#: ../src/keybindings.c:3559
|
||||
#: ../src/keybindings.c:3635
|
||||
msgid "No terminal command has been defined.\n"
|
||||
msgstr "אף פקודת מסוף לא הוגדרה.\n"
|
||||
|
||||
@@ -131,50 +131,52 @@ msgid ""
|
||||
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A "
|
||||
"PARTICULAR PURPOSE.\n"
|
||||
msgstr ""
|
||||
"מטאסיטי %s\n"
|
||||
"כל הזכויות שמורות (C) 2001-2002 Havoc Pennington, Red Hat, Inc., ואחרים\n"
|
||||
"זוהי תוכנה חופשית; ראה קוד מקור לתנאי ההעתקה.\n"
|
||||
"אין אחראיות; אפילו לא לאפשרויות מסחר או התאמה למטרה מסויימת.\n"
|
||||
"metacity %s\n"
|
||||
"Copyright (C) 2001-2002 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"
|
||||
|
||||
#: ../src/main.c:169
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr ""
|
||||
msgstr "Disable connection to session manager"
|
||||
|
||||
#: ../src/main.c:175
|
||||
msgid "Replace the running window manager with Metacity"
|
||||
msgstr ""
|
||||
msgstr "Replace the running window manager with Metacity"
|
||||
|
||||
#: ../src/main.c:181
|
||||
msgid "Specify session management ID"
|
||||
msgstr ""
|
||||
msgstr "Specify session management ID"
|
||||
|
||||
#: ../src/main.c:186
|
||||
msgid "X Display to use"
|
||||
msgstr ""
|
||||
msgstr "X Display to use"
|
||||
|
||||
#: ../src/main.c:192
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr ""
|
||||
msgstr "Initialize session from savefile"
|
||||
|
||||
#: ../src/main.c:198
|
||||
msgid "Print version"
|
||||
msgstr ""
|
||||
msgstr "Print version"
|
||||
|
||||
#: ../src/main.c:350
|
||||
#, c-format
|
||||
msgid "Failed to scan themes directory: %s\n"
|
||||
msgstr "נכשל בסריקת ספריית ערכות נושא: %s\n"
|
||||
msgstr "Failed to scan themes directory: %s\n"
|
||||
|
||||
#: ../src/main.c:366
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not find a theme! Be sure %s exists and contains the usual themes."
|
||||
msgstr "לא ניתן למצוא ערכת נושא! ודא כי %s קיים ומכיל את ערכות הנושא הרגילות."
|
||||
msgstr ""
|
||||
"Could not find a theme! Be sure %s exists and contains the usual themes."
|
||||
|
||||
#: ../src/main.c:424
|
||||
#: ../src/main.c:426
|
||||
#, c-format
|
||||
msgid "Failed to restart: %s\n"
|
||||
msgstr "נכשל בהפעלה מחדש: %s\n"
|
||||
msgstr "Failed to restart: %s\n"
|
||||
|
||||
#: ../src/menu.c:55
|
||||
msgid "Mi_nimize"
|
||||
@@ -242,7 +244,7 @@ msgstr "הזז חלון לסביבת העבודה למעלה"
|
||||
msgid "Move to Workspace _Down"
|
||||
msgstr "הזז חלון לסביבת העבודה למטה"
|
||||
|
||||
#: ../src/menu.c:164 ../src/prefs.c:2142 ../src/prefs.c:2669
|
||||
#: ../src/menu.c:164 ../src/prefs.c:2142 ../src/prefs.c:2677
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "סביבת עבודה %d"
|
||||
@@ -350,29 +352,29 @@ msgstr "Mod4"
|
||||
msgid "Mod5"
|
||||
msgstr "Mod5"
|
||||
|
||||
#: ../src/metacity-dialog.c:111
|
||||
#: ../src/metacity-dialog.c:88
|
||||
#, c-format
|
||||
msgid "The window \"%s\" is not responding."
|
||||
msgstr "החלון \"%s\" אינו מגיב"
|
||||
|
||||
#: ../src/metacity-dialog.c:119
|
||||
#: ../src/metacity-dialog.c:96
|
||||
msgid ""
|
||||
"Forcing this application to quit will cause you to lose any unsaved changes."
|
||||
msgstr "להכריח את ישום זה לסיים יגרום לאיבוד שינויים שלא נשמרו"
|
||||
|
||||
#: ../src/metacity-dialog.c:130
|
||||
#: ../src/metacity-dialog.c:107
|
||||
msgid "_Force Quit"
|
||||
msgstr "_הכרח יציאה"
|
||||
|
||||
#: ../src/metacity-dialog.c:227
|
||||
#: ../src/metacity-dialog.c:204
|
||||
msgid "Title"
|
||||
msgstr "כותרת"
|
||||
|
||||
#: ../src/metacity-dialog.c:239
|
||||
#: ../src/metacity-dialog.c:216
|
||||
msgid "Class"
|
||||
msgstr "מחלקה"
|
||||
|
||||
#: ../src/metacity-dialog.c:265
|
||||
#: ../src/metacity-dialog.c:242
|
||||
msgid ""
|
||||
"These windows do not support \"save current setup\" and will have to be "
|
||||
"restarted manually next time you log in."
|
||||
@@ -380,7 +382,7 @@ msgstr ""
|
||||
"חלון זה אינו תומך ב\"שמירת ההגדרות הנוכחיות\", ויהיה צורך באתחול ידני בכניסה "
|
||||
"הבאה שלך."
|
||||
|
||||
#: ../src/metacity-dialog.c:331
|
||||
#: ../src/metacity-dialog.c:308
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There was an error running \"%s\":\n"
|
||||
@@ -395,7 +397,8 @@ msgstr "מטאסיטי"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:1
|
||||
msgid "(Not implemented) Navigation works in terms of applications not windows"
|
||||
msgstr "(Not implemented) Navigation works in terms of applications not windows"
|
||||
msgstr ""
|
||||
"(Not implemented) Navigation works in terms of applications not windows"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:2
|
||||
msgid ""
|
||||
@@ -2061,7 +2064,7 @@ msgstr "Window title font"
|
||||
#: ../src/prefs.c:1014 ../src/prefs.c:1030
|
||||
#, c-format
|
||||
msgid "GConf key \"%s\" is set to an invalid type\n"
|
||||
msgstr "מפתח GConf \"%s\" נקבע לסוג לא תקני\n"
|
||||
msgstr "GConf key \"%s\" is set to an invalid type\n"
|
||||
|
||||
#: ../src/prefs.c:1075
|
||||
#, c-format
|
||||
@@ -2069,11 +2072,13 @@ msgid ""
|
||||
"\"%s\" found in configuration database is not a valid value for mouse button "
|
||||
"modifier\n"
|
||||
msgstr ""
|
||||
"\"%s\" found in configuration database is not a valid value for mouse button "
|
||||
"modifier\n"
|
||||
|
||||
#: ../src/prefs.c:1099 ../src/prefs.c:1120 ../src/prefs.c:1616
|
||||
#, c-format
|
||||
msgid "GConf key '%s' is set to an invalid value\n"
|
||||
msgstr ""
|
||||
msgstr "GConf key '%s' is set to an invalid value\n"
|
||||
|
||||
#: ../src/prefs.c:1249
|
||||
#, c-format
|
||||
@@ -2081,11 +2086,13 @@ msgid ""
|
||||
"%d stored in GConf key %s is not a reasonable cursor_size; must be in the "
|
||||
"range 1..128\n"
|
||||
msgstr ""
|
||||
"%d stored in GConf key %s is not a reasonable cursor_size; must be in the "
|
||||
"range 1..128\n"
|
||||
|
||||
#: ../src/prefs.c:1329
|
||||
#, c-format
|
||||
msgid "Could not parse font description \"%s\" from GConf key %s\n"
|
||||
msgstr ""
|
||||
msgstr "Could not parse font description \"%s\" from GConf key %s\n"
|
||||
|
||||
#: ../src/prefs.c:1514
|
||||
#, c-format
|
||||
@@ -2093,46 +2100,52 @@ msgid ""
|
||||
"%d stored in GConf key %s is not a reasonable number of workspaces, current "
|
||||
"maximum is %d\n"
|
||||
msgstr ""
|
||||
"%d stored in GConf key %s is not a reasonable number of workspaces, current "
|
||||
"maximum is %d\n"
|
||||
|
||||
#: ../src/prefs.c:1574
|
||||
msgid ""
|
||||
"Workarounds for broken applications disabled. Some applications may not "
|
||||
"behave properly.\n"
|
||||
msgstr ""
|
||||
"Workarounds for broken applications disabled. Some applications may not "
|
||||
"behave properly.\n"
|
||||
|
||||
#: ../src/prefs.c:1643
|
||||
#, c-format
|
||||
msgid "%d stored in GConf key %s is out of range 0 to %d\n"
|
||||
msgstr ""
|
||||
msgstr "%d stored in GConf key %s is out of range 0 to %d\n"
|
||||
|
||||
#: ../src/prefs.c:1786
|
||||
#, c-format
|
||||
msgid "Error setting number of workspaces to %d: %s\n"
|
||||
msgstr ""
|
||||
msgstr "Error setting number of workspaces to %d: %s\n"
|
||||
|
||||
#: ../src/prefs.c:2170 ../src/prefs.c:2335
|
||||
#: ../src/prefs.c:2172 ../src/prefs.c:2342
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||
"\"%s\"\n"
|
||||
msgstr ""
|
||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||
"\"%s\"\n"
|
||||
|
||||
#: ../src/prefs.c:2750
|
||||
#: ../src/prefs.c:2758
|
||||
#, c-format
|
||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||
msgstr ""
|
||||
msgstr "Error setting name for workspace %d to \"%s\": %s\n"
|
||||
|
||||
#: ../src/resizepopup.c:111
|
||||
#, c-format
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
|
||||
#: ../src/screen.c:403
|
||||
#: ../src/screen.c:404
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Screen %d on display '%s' is invalid\n"
|
||||
|
||||
#: ../src/screen.c:419
|
||||
#: ../src/screen.c:420
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||
@@ -2141,19 +2154,19 @@ msgstr ""
|
||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||
"replace option to replace the current window manager.\n"
|
||||
|
||||
#: ../src/screen.c:443
|
||||
#: ../src/screen.c:444
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
msgstr ""
|
||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
|
||||
#: ../src/screen.c:501
|
||||
#: ../src/screen.c:502
|
||||
#, c-format
|
||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
||||
msgstr "Screen %d on display \"%s\" already has a window manager\n"
|
||||
|
||||
#: ../src/screen.c:705
|
||||
#: ../src/screen.c:707
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "Could not release screen %d on display \"%s\"\n"
|
||||
@@ -2238,7 +2251,7 @@ msgstr "Line %d character %d: %s"
|
||||
#: ../src/theme-parser.c:396
|
||||
#, c-format
|
||||
msgid "Attribute \"%s\" repeated twice on the same <%s> element"
|
||||
msgstr ""
|
||||
msgstr "Attribute \"%s\" repeated twice on the same <%s> element"
|
||||
|
||||
#: ../src/theme-parser.c:414 ../src/theme-parser.c:439
|
||||
#, c-format
|
||||
@@ -2959,296 +2972,316 @@ msgstr ""
|
||||
|
||||
#: ../src/theme.c:202
|
||||
msgid "top"
|
||||
msgstr "מעלה"
|
||||
msgstr "top"
|
||||
|
||||
#: ../src/theme.c:204
|
||||
msgid "bottom"
|
||||
msgstr "מטה"
|
||||
msgstr "bottom"
|
||||
|
||||
#: ../src/theme.c:206
|
||||
msgid "left"
|
||||
msgstr "שמאלה"
|
||||
msgstr "left"
|
||||
|
||||
#: ../src/theme.c:208
|
||||
msgid "right"
|
||||
msgstr "ימינה"
|
||||
msgstr "right"
|
||||
|
||||
#: ../src/theme.c:222
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify \"%s\" dimension"
|
||||
msgstr ""
|
||||
msgstr "frame geometry does not specify \"%s\" dimension"
|
||||
|
||||
#: ../src/theme.c:241
|
||||
#, c-format
|
||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
msgstr ""
|
||||
msgstr "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||
|
||||
#: ../src/theme.c:278
|
||||
#, c-format
|
||||
msgid "Button aspect ratio %g is not reasonable"
|
||||
msgstr ""
|
||||
msgstr "Button aspect ratio %g is not reasonable"
|
||||
|
||||
#: ../src/theme.c:290
|
||||
msgid "Frame geometry does not specify size of buttons"
|
||||
msgstr ""
|
||||
msgstr "Frame geometry does not specify size of buttons"
|
||||
|
||||
#: ../src/theme.c:813
|
||||
#: ../src/theme.c:847
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr ""
|
||||
msgstr "Gradients should have at least two colors"
|
||||
|
||||
#: ../src/theme.c:939
|
||||
#: ../src/theme.c:973
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
"where NORMAL is the state; could not parse \"%s\""
|
||||
msgstr ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
"where NORMAL is the state; could not parse \"%s\""
|
||||
|
||||
#: ../src/theme.c:953
|
||||
#: ../src/theme.c:987
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||
msgstr ""
|
||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||
"fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
|
||||
|
||||
#: ../src/theme.c:964
|
||||
#: ../src/theme.c:998
|
||||
#, c-format
|
||||
msgid "Did not understand state \"%s\" in color specification"
|
||||
msgstr ""
|
||||
msgstr "Did not understand state \"%s\" in color specification"
|
||||
|
||||
#: ../src/theme.c:977
|
||||
#: ../src/theme.c:1011
|
||||
#, c-format
|
||||
msgid "Did not understand color component \"%s\" in color specification"
|
||||
msgstr ""
|
||||
msgstr "Did not understand color component \"%s\" in color specification"
|
||||
|
||||
#: ../src/theme.c:1007
|
||||
#: ../src/theme.c:1041
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||
"format"
|
||||
msgstr ""
|
||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||
"format"
|
||||
|
||||
#: ../src/theme.c:1018
|
||||
#: ../src/theme.c:1052
|
||||
#, c-format
|
||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||
msgstr ""
|
||||
msgstr "Could not parse alpha value \"%s\" in blended color"
|
||||
|
||||
#: ../src/theme.c:1028
|
||||
#: ../src/theme.c:1062
|
||||
#, c-format
|
||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
msgstr ""
|
||||
msgstr "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||
|
||||
#: ../src/theme.c:1075
|
||||
#: ../src/theme.c:1109
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
msgstr ""
|
||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||
|
||||
#: ../src/theme.c:1086
|
||||
#: ../src/theme.c:1120
|
||||
#, c-format
|
||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||
msgstr ""
|
||||
msgstr "Could not parse shade factor \"%s\" in shaded color"
|
||||
|
||||
#: ../src/theme.c:1096
|
||||
#: ../src/theme.c:1130
|
||||
#, c-format
|
||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||
msgstr ""
|
||||
msgstr "Shade factor \"%s\" in shaded color is negative"
|
||||
|
||||
#: ../src/theme.c:1125
|
||||
#: ../src/theme.c:1159
|
||||
#, c-format
|
||||
msgid "Could not parse color \"%s\""
|
||||
msgstr ""
|
||||
msgstr "Could not parse color \"%s\""
|
||||
|
||||
#: ../src/theme.c:1384
|
||||
#: ../src/theme.c:1418
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression contains character '%s' which is not allowed"
|
||||
|
||||
#: ../src/theme.c:1411
|
||||
#: ../src/theme.c:1445
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
msgstr ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
|
||||
#: ../src/theme.c:1425
|
||||
#: ../src/theme.c:1459
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
|
||||
#: ../src/theme.c:1492
|
||||
#: ../src/theme.c:1526
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
"\"%s\""
|
||||
msgstr ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
"\"%s\""
|
||||
|
||||
#: ../src/theme.c:1549
|
||||
#: ../src/theme.c:1583
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression was empty or not understood"
|
||||
|
||||
#: ../src/theme.c:1686 ../src/theme.c:1696 ../src/theme.c:1730
|
||||
#: ../src/theme.c:1720 ../src/theme.c:1730 ../src/theme.c:1764
|
||||
msgid "Coordinate expression results in division by zero"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression results in division by zero"
|
||||
|
||||
#: ../src/theme.c:1738
|
||||
#: ../src/theme.c:1772
|
||||
msgid ""
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr ""
|
||||
msgstr
|
||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||
|
||||
#: ../src/theme.c:1794
|
||||
#: ../src/theme.c:1828
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
msgstr ""
|
||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
|
||||
#: ../src/theme.c:1803
|
||||
#: ../src/theme.c:1837
|
||||
msgid "Coordinate expression had an operand where an operator was expected"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression had an operand where an operator was expected"
|
||||
|
||||
#: ../src/theme.c:1811
|
||||
#: ../src/theme.c:1845
|
||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression ended with an operator instead of an operand"
|
||||
|
||||
#: ../src/theme.c:1821
|
||||
#: ../src/theme.c:1855
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||
"operand in between"
|
||||
msgstr ""
|
||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||
"operand in between"
|
||||
|
||||
#: ../src/theme.c:1939
|
||||
#: ../src/theme.c:1973
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression parser overflowed its buffer."
|
||||
|
||||
#: ../src/theme.c:1968
|
||||
#: ../src/theme.c:2002
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
|
||||
#: ../src/theme.c:2030
|
||||
#: ../src/theme.c:2064
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression had unknown variable or constant \"%s\""
|
||||
|
||||
#: ../src/theme.c:2085
|
||||
#: ../src/theme.c:2119
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
|
||||
#: ../src/theme.c:2096
|
||||
#: ../src/theme.c:2130
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
msgstr ""
|
||||
msgstr "Coordinate expression doesn't seem to have any operators or operands"
|
||||
|
||||
#: ../src/theme.c:2337 ../src/theme.c:2359 ../src/theme.c:2380
|
||||
#: ../src/theme.c:2371 ../src/theme.c:2393 ../src/theme.c:2414
|
||||
#, c-format
|
||||
msgid "Theme contained an expression \"%s\" that resulted in an error: %s\n"
|
||||
msgstr "ערכת הנושא מכילה ביטוי \"%s\" שגרם לשגיאה: %s\n"
|
||||
msgstr "Theme contained an expression \"%s\" that resulted in an error: %s\n"
|
||||
|
||||
#: ../src/theme.c:3826
|
||||
#: ../src/theme.c:3860
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
"specified for this frame style"
|
||||
msgstr ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> חייב להיות "
|
||||
"מצויין לסגנון מסגרת זו"
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
"specified for this frame style"
|
||||
|
||||
#: ../src/theme.c:4270 ../src/theme.c:4295
|
||||
#: ../src/theme.c:4304 ../src/theme.c:4329
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
msgstr ""
|
||||
"חסר <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
|
||||
#: ../src/theme.c:4341
|
||||
#: ../src/theme.c:4375
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "נכשל בטעינת ערכת נושא \"%s\": %s\n"
|
||||
msgstr "Failed to load theme \"%s\": %s\n"
|
||||
|
||||
#: ../src/theme.c:4481 ../src/theme.c:4488 ../src/theme.c:4495
|
||||
#: ../src/theme.c:4502 ../src/theme.c:4509
|
||||
#: ../src/theme.c:4515 ../src/theme.c:4522 ../src/theme.c:4529
|
||||
#: ../src/theme.c:4536 ../src/theme.c:4543
|
||||
#, c-format
|
||||
msgid "No <%s> set for theme \"%s\""
|
||||
msgstr "לא נקבע <%s> לערכת הנושא \"%s\""
|
||||
msgstr "No <%s> set for theme \"%s\""
|
||||
|
||||
#: ../src/theme.c:4517
|
||||
#: ../src/theme.c:4551
|
||||
#, c-format
|
||||
msgid ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
"type=\"%s\" style_set=\"whatever\"/> element"
|
||||
msgstr ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
"type=\"%s\" style_set=\"whatever\"/> element"
|
||||
|
||||
#: ../src/theme.c:4531
|
||||
#: ../src/theme.c:4565
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<menu_icon function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
"specified for this theme"
|
||||
msgstr ""
|
||||
"<menu_icon function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> חייב להיות "
|
||||
"מצויין לערכת נושא זו"
|
||||
"<menu_icon function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
"specified for this theme"
|
||||
|
||||
#: ../src/theme.c:4911 ../src/theme.c:4973
|
||||
#: ../src/theme.c:4945 ../src/theme.c:5007
|
||||
#, c-format
|
||||
msgid ""
|
||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
msgstr "קבועים מותאמים-אישית חייבים להתחיל באות גדולה; \"%s\" לא"
|
||||
msgstr ""
|
||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
|
||||
#: ../src/theme.c:4919 ../src/theme.c:4981
|
||||
#: ../src/theme.c:4953 ../src/theme.c:5015
|
||||
#, c-format
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "הקבוע \"%s\" כבר הוגדר"
|
||||
msgstr "Constant \"%s\" has already been defined"
|
||||
|
||||
#: ../src/util.c:96
|
||||
#, c-format
|
||||
msgid "Failed to open debug log: %s\n"
|
||||
msgstr ""
|
||||
msgstr "Failed to open debug log: %s\n"
|
||||
|
||||
#: ../src/util.c:106
|
||||
#, c-format
|
||||
msgid "Failed to fdopen() log file %s: %s\n"
|
||||
msgstr ""
|
||||
msgstr "Failed to fdopen() log file %s: %s\n"
|
||||
|
||||
#: ../src/util.c:112
|
||||
#, c-format
|
||||
msgid "Opened log file %s\n"
|
||||
msgstr ""
|
||||
msgstr "Opened log file %s\n"
|
||||
|
||||
#: ../src/util.c:220
|
||||
msgid "Window manager: "
|
||||
msgstr "מנהל החלונות: "
|
||||
msgstr "Window manager: "
|
||||
|
||||
#: ../src/util.c:368
|
||||
msgid "Bug in window manager: "
|
||||
msgstr "תקלה במנהל החלונות: "
|
||||
msgstr "Bug in window manager: "
|
||||
|
||||
#: ../src/util.c:397
|
||||
msgid "Window manager warning: "
|
||||
msgstr "אזהרת מנהל החלונות: "
|
||||
msgstr "Window manager warning: "
|
||||
|
||||
#: ../src/util.c:421
|
||||
msgid "Window manager error: "
|
||||
msgstr "שגיאת מנהל החלונות: "
|
||||
msgstr "Window manager error: "
|
||||
|
||||
#: ../src/window-props.c:169
|
||||
#: ../src/window-props.c:170
|
||||
#, c-format
|
||||
msgid "Application set a bogus _NET_WM_PID %lu\n"
|
||||
msgstr ""
|
||||
msgstr "Application set a bogus _NET_WM_PID %lu\n"
|
||||
|
||||
#: ../src/window-props.c:237
|
||||
#: ../src/window-props.c:238
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr ""
|
||||
msgstr "%s (מעל %s)"
|
||||
|
||||
#: ../src/window-props.c:1159
|
||||
#: ../src/window-props.c:1182
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr ""
|
||||
msgstr "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
|
||||
#. first time through
|
||||
#: ../src/window.c:5248
|
||||
#: ../src/window.c:5359
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
"window as specified in the ICCCM.\n"
|
||||
msgstr ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
"window as specified in the ICCCM.\n"
|
||||
|
||||
#. We ignore mwm_has_resize_func because WM_NORMAL_HINTS is the
|
||||
#. * authoritative source for that info. Some apps such as mplayer or
|
||||
@@ -3257,12 +3290,14 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/window.c:5844
|
||||
#: ../src/window.c:5955
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
||||
"d x %d and max size %d x %d; this doesn't make much sense.\n"
|
||||
msgstr ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
||||
"d x %d and max size %d x %d; this doesn't make much sense.\n"
|
||||
|
||||
#: ../src/xprops.c:153
|
||||
#, c-format
|
||||
@@ -3273,14 +3308,20 @@ msgid ""
|
||||
"This is most likely an application bug, not a window manager bug.\n"
|
||||
"The window has title=\"%s\" class=\"%s\" name=\"%s\"\n"
|
||||
msgstr ""
|
||||
"Window 0x%lx has property %s\n"
|
||||
"that was expected to have type %s format %d\n"
|
||||
"and actually has type %s format %d n_items %d.\n"
|
||||
"This is most likely an application bug, not a window manager bug.\n"
|
||||
"The window has title=\"%s\" class=\"%s\" name=\"%s\"\n"
|
||||
|
||||
#: ../src/xprops.c:399
|
||||
#, c-format
|
||||
msgid "Property %s on window 0x%lx contained invalid UTF-8\n"
|
||||
msgstr "המאפיין %s של החלון 0x%lx מכיל UTF-8 לא תקני\n"
|
||||
msgstr "Property %s on window 0x%lx contained invalid UTF-8\n"
|
||||
|
||||
#: ../src/xprops.c:482
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
||||
msgstr "המאפיין %s של החלון 0x%lx מכיל UTF-8 לא תקני לפריט %d ברשימה\n"
|
||||
msgstr ""
|
||||
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
||||
|
||||
2111
po/pt_BR.po
2111
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1489
po/sr@Latn.po
1489
po/sr@Latn.po
File diff suppressed because it is too large
Load Diff
1428
po/zh_CN.po
1428
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1282
po/zh_HK.po
1282
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
1874
po/zh_TW.po
1874
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
20
src/50-metacity-desktop-key.xml.in
Normal file
20
src/50-metacity-desktop-key.xml.in
Normal 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
269
src/50-metacity-key.xml.in
Normal 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>
|
||||
|
||||
@@ -161,6 +161,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 +183,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 +196,6 @@ EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) $(schema_DATA) \
|
||||
$(desktopfiles_in_files) \
|
||||
$(schema_in_files) \
|
||||
$(xml_in_files) \
|
||||
libmetacity-private.pc.in
|
||||
|
||||
|
||||
238
src/boxes.c
238
src/boxes.c
@@ -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);
|
||||
|
||||
23
src/boxes.h
23
src/boxes.h
@@ -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
|
||||
|
||||
@@ -338,8 +338,6 @@ meta_comp_screen_redirect (MetaCompScreen *info)
|
||||
|
||||
info->magnifier = cm_magnifier_new (CM_NODE (info->stacker), &source, &target);
|
||||
|
||||
g_object_unref (info->stacker);
|
||||
|
||||
if (g_getenv ("USE_MAGNIFIER"))
|
||||
cm_magnifier_set_active (info->magnifier, TRUE);
|
||||
else
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
#include "c-window.h"
|
||||
#include "window.h"
|
||||
#include "frame.h"
|
||||
#include "spring-model.h"
|
||||
#include "compositor.h"
|
||||
#include "workspace.h"
|
||||
|
||||
typedef struct UnminimizeInfo UnminimizeInfo;
|
||||
|
||||
@@ -1186,10 +1187,6 @@ typedef struct
|
||||
gdouble last_time;
|
||||
} FocusInfo;
|
||||
|
||||
/* XXX HATE */
|
||||
extern void get_patch_points (Model *model, CmPoint points[4][4]);
|
||||
extern void compute_window_rect (MetaWindow *window, MetaRectangle *rect);
|
||||
|
||||
static gboolean
|
||||
update_focus (gpointer data)
|
||||
{
|
||||
|
||||
38
src/common.h
38
src/common.h
@@ -172,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
|
||||
{
|
||||
@@ -215,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
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
#include <X11/extensions/Xdamage.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#include "spring-model.h"
|
||||
#include <cm/state.h>
|
||||
|
||||
#include "effects.h"
|
||||
@@ -113,6 +112,10 @@ get_xid (MetaWindow *window)
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
/* This is called by Metacity's effect code when an effect needs to happen.
|
||||
* In compositor-less Metacity, this includes things like the wireframe
|
||||
* zoom when a window is minimised. We have a rather larger box of tricks.
|
||||
*/
|
||||
static void
|
||||
do_effect (MetaEffect *effect,
|
||||
gpointer data)
|
||||
@@ -121,6 +124,15 @@ do_effect (MetaEffect *effect,
|
||||
MetaCompWindow *window;
|
||||
|
||||
screen = meta_comp_screen_get_by_xwindow (get_xid (effect->window));
|
||||
|
||||
if (!screen)
|
||||
{
|
||||
/* sanity check: if no screen is found, bail */
|
||||
meta_warning ("No screen found for %s (%ld); aborting effect.\n",
|
||||
effect->window->desc, get_xid (effect->window));
|
||||
return;
|
||||
}
|
||||
|
||||
window = meta_comp_screen_lookup_window (screen, get_xid (effect->window));
|
||||
|
||||
switch (effect->type)
|
||||
@@ -158,6 +170,9 @@ do_effect (MetaEffect *effect,
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
/* Constructs a new compositor. The rest of Metacity knows whether the
|
||||
* compositor is turned on by whether this function returns NULL or not.
|
||||
*/
|
||||
MetaCompositor *
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
@@ -202,7 +217,11 @@ meta_compositor_new (MetaDisplay *display)
|
||||
|
||||
compositor->enabled = TRUE;
|
||||
|
||||
meta_push_effect_handler (do_effect, compositor);
|
||||
/* Compositor without bling is the default, but leave the bling
|
||||
* accessible for now.
|
||||
*/
|
||||
if (getenv("METACITY_BLING")!=NULL)
|
||||
meta_push_effect_handler (do_effect, compositor);
|
||||
|
||||
return compositor;
|
||||
#else /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
@@ -210,6 +229,7 @@ meta_compositor_new (MetaDisplay *display)
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
#if 0
|
||||
void
|
||||
meta_compositor_set_debug_updates (MetaCompositor *compositor,
|
||||
gboolean debug_updates)
|
||||
@@ -218,6 +238,7 @@ meta_compositor_set_debug_updates (MetaCompositor *compositor,
|
||||
compositor->debug_updates = !!debug_updates;
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
#endif /* 0 */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
@@ -246,8 +267,29 @@ meta_compositor_unref (MetaCompositor *compositor)
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/****************************************************************************
|
||||
*
|
||||
* HANDLING X EVENTS
|
||||
*
|
||||
* Here are several process_* functions, which are all called by
|
||||
* meta_compositor_process_event at the bottom.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the CirculateNotify XEvent.
|
||||
*/
|
||||
static void
|
||||
process_circulate_notify (MetaCompositor *compositor,
|
||||
XCirculateEvent* event)
|
||||
{
|
||||
/* FIXME: Do something here. */
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the ConfigureNotify XEvent.
|
||||
*/
|
||||
static void
|
||||
process_configure_notify (MetaCompositor *compositor,
|
||||
XConfigureEvent *event)
|
||||
@@ -281,6 +323,9 @@ process_configure_notify (MetaCompositor *compositor,
|
||||
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the Expose XEvent.
|
||||
* XXX FIXME: This looks like it quite urgently needs looking into. --tthurman
|
||||
*/
|
||||
static void
|
||||
process_expose (MetaCompositor *compositor,
|
||||
XExposeEvent *event)
|
||||
@@ -292,6 +337,10 @@ process_expose (MetaCompositor *compositor,
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
#if 0
|
||||
|
||||
/* Apparently never used. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CmDrawableNode *node;
|
||||
@@ -331,9 +380,12 @@ fade_out (gpointer data)
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#endif /* 0 */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the MapNotify XEvent.
|
||||
*/
|
||||
static void
|
||||
process_map (MetaCompositor *compositor,
|
||||
XMapEvent *event)
|
||||
@@ -347,13 +399,13 @@ process_map (MetaCompositor *compositor,
|
||||
/* See if window was mapped as child of root */
|
||||
screen = meta_display_screen_for_root (compositor->meta_display,
|
||||
event->event);
|
||||
|
||||
|
||||
if (screen == NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"MapNotify received on non-root 0x%lx for 0x%lx\n",
|
||||
event->event, event->window);
|
||||
|
||||
|
||||
/* MapNotify wasn't for a child of the root */
|
||||
return;
|
||||
}
|
||||
@@ -365,6 +417,8 @@ process_map (MetaCompositor *compositor,
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the UnmapNotify XEvent.
|
||||
*/
|
||||
static void
|
||||
process_unmap (MetaCompositor *compositor,
|
||||
XUnmapEvent *event)
|
||||
@@ -391,6 +445,8 @@ process_unmap (MetaCompositor *compositor,
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the CreateNotify XEvent.
|
||||
*/
|
||||
static void
|
||||
process_create (MetaCompositor *compositor,
|
||||
XCreateWindowEvent *event)
|
||||
@@ -432,6 +488,8 @@ process_create (MetaCompositor *compositor,
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the DestroyNotify XEvent.
|
||||
*/
|
||||
static void
|
||||
process_destroy (MetaCompositor *compositor,
|
||||
XDestroyWindowEvent *event)
|
||||
@@ -465,6 +523,8 @@ process_destroy (MetaCompositor *compositor,
|
||||
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* Handles the ReparentNotify XEvent.
|
||||
*/
|
||||
static void
|
||||
process_reparent (MetaCompositor *compositor,
|
||||
XReparentEvent *event)
|
||||
@@ -507,6 +567,9 @@ process_reparent (MetaCompositor *compositor,
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
/* If the compositor is enabled, this function gets called with any XEvent
|
||||
* in case we want to deal with it specially.
|
||||
*/
|
||||
void
|
||||
meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
@@ -516,9 +579,12 @@ meta_compositor_process_event (MetaCompositor *compositor,
|
||||
if (!compositor->enabled)
|
||||
return; /* no extension */
|
||||
|
||||
/* FIXME support CirculateNotify */
|
||||
|
||||
if (event->type == ConfigureNotify)
|
||||
if (event->type == CirculateNotify)
|
||||
{
|
||||
process_circulate_notify (compositor,
|
||||
(XCirculateEvent*) event);
|
||||
}
|
||||
else if (event->type == ConfigureNotify)
|
||||
{
|
||||
process_configure_notify (compositor,
|
||||
(XConfigureEvent*) event);
|
||||
@@ -558,10 +624,13 @@ meta_compositor_process_event (MetaCompositor *compositor,
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#if 0
|
||||
static GTimer *timer;
|
||||
#endif /* 0 */
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#if 0
|
||||
static void
|
||||
dump_stacking_order (GList *nodes)
|
||||
{
|
||||
@@ -575,6 +644,7 @@ dump_stacking_order (GList *nodes)
|
||||
}
|
||||
g_print ("\n");
|
||||
}
|
||||
#endif /* 0 */
|
||||
#endif
|
||||
|
||||
/* This is called when metacity does its XQueryTree() on startup
|
||||
@@ -761,7 +831,7 @@ struct MoveInfo
|
||||
|
||||
void
|
||||
get_patch_points (Model *model,
|
||||
CmPoint points[4][4])
|
||||
CmPoint points[4][4])
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
||||
@@ -26,6 +26,13 @@
|
||||
|
||||
#include "util.h"
|
||||
#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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
@@ -1125,13 +1174,10 @@ constrain_titlebar_visible (MetaWindow *window,
|
||||
return TRUE;
|
||||
|
||||
/* Allow the titlebar beyond the top of the screen only if the user wasn't
|
||||
* clicking on the titlebar to start the move.
|
||||
* FIXME: This is kind of a hack; nearly as ugly as the old infinite edge
|
||||
* resistance.
|
||||
* clicking on the frame to start the move.
|
||||
*/
|
||||
unconstrained_user_action =
|
||||
info->is_user_action &&
|
||||
window->display->grab_anchor_root_y >= window->display->grab_initial_window_pos.y;
|
||||
info->is_user_action && !window->display->grab_frame_action;
|
||||
|
||||
/* Exit early if we know the constraint won't apply--note that this constraint
|
||||
* is only meant for normal windows (e.g. we don't want docks to be shoved
|
||||
|
||||
317
src/core.c
317
src/core.c
@@ -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,
|
||||
@@ -630,7 +605,7 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
gboolean frame_action,
|
||||
int button,
|
||||
gulong modmask,
|
||||
guint32 timestamp,
|
||||
@@ -648,7 +623,7 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
op, pointer_already_grabbed,
|
||||
event_serial,
|
||||
frame_action,
|
||||
button, modmask,
|
||||
timestamp, root_x, root_y);
|
||||
}
|
||||
@@ -730,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)
|
||||
{
|
||||
|
||||
112
src/core.h
112
src/core.h
@@ -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,
|
||||
@@ -150,7 +169,7 @@ gboolean meta_core_begin_grab_op (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
gboolean frame_action,
|
||||
int button,
|
||||
gulong modmask,
|
||||
guint32 timestamp,
|
||||
@@ -170,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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
188
src/display.c
188
src/display.c
@@ -333,7 +333,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)];
|
||||
|
||||
@@ -492,6 +495,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 +508,7 @@ meta_display_open (void)
|
||||
* created in screen_new
|
||||
*/
|
||||
display->leader_window = None;
|
||||
display->timestamp_pinging_window = None;
|
||||
|
||||
display->xinerama_cache_invalidated = TRUE;
|
||||
|
||||
@@ -657,8 +664,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 +697,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;
|
||||
@@ -1192,14 +1221,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 +1369,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 +1411,7 @@ event_callback (XEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
MetaWindow *window;
|
||||
MetaWindow *property_for_window;
|
||||
MetaDisplay *display;
|
||||
Window modified;
|
||||
gboolean frame_was_receiver;
|
||||
@@ -1510,6 +1465,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 +1500,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 +1542,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 +1585,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))
|
||||
{
|
||||
@@ -1738,7 +1703,7 @@ event_callback (XEvent *event,
|
||||
window,
|
||||
op,
|
||||
TRUE,
|
||||
event->xbutton.serial,
|
||||
FALSE,
|
||||
event->xbutton.button,
|
||||
0,
|
||||
event->xbutton.time,
|
||||
@@ -1795,7 +1760,7 @@ event_callback (XEvent *event,
|
||||
window,
|
||||
META_GRAB_OP_MOVING,
|
||||
TRUE,
|
||||
event->xbutton.serial,
|
||||
FALSE,
|
||||
event->xbutton.button,
|
||||
0,
|
||||
event->xbutton.time,
|
||||
@@ -1806,19 +1771,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);
|
||||
@@ -1912,7 +1874,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)
|
||||
@@ -2171,6 +2132,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);
|
||||
@@ -2195,9 +2158,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
|
||||
@@ -3263,7 +3223,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
gboolean frame_action,
|
||||
int button,
|
||||
gulong modmask,
|
||||
guint32 timestamp,
|
||||
@@ -3308,12 +3268,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.
|
||||
@@ -3380,7 +3334,8 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
display->grab_last_user_action_was_snap = FALSE;
|
||||
#endif
|
||||
display->grab_was_cancelled = FALSE;
|
||||
|
||||
display->grab_frame_action = frame_action;
|
||||
|
||||
if (display->grab_resize_timeout_id)
|
||||
{
|
||||
g_source_remove (display->grab_resize_timeout_id);
|
||||
@@ -3389,10 +3344,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 =
|
||||
@@ -3916,13 +3869,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)
|
||||
@@ -3933,7 +3885,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;
|
||||
@@ -3952,7 +3905,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;
|
||||
@@ -4749,6 +4702,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;
|
||||
@@ -4761,6 +4715,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,
|
||||
|
||||
@@ -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;
|
||||
@@ -264,6 +267,7 @@ struct _MetaDisplay
|
||||
guint grab_have_keyboard : 1;
|
||||
guint grab_wireframe_active : 1;
|
||||
guint grab_was_cancelled : 1; /* Only used in wireframe mode */
|
||||
guint grab_frame_action : 1;
|
||||
MetaRectangle grab_wireframe_rect;
|
||||
MetaRectangle grab_wireframe_last_xor_rect;
|
||||
MetaRectangle grab_initial_window_pos;
|
||||
@@ -412,6 +416,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.
|
||||
*/
|
||||
@@ -446,7 +454,7 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
gboolean frame_action,
|
||||
int button,
|
||||
gulong modmask,
|
||||
guint32 timestamp,
|
||||
|
||||
@@ -66,21 +66,38 @@ get_window_rect (const WnckWindowDisplayInfo *win,
|
||||
}
|
||||
|
||||
static void
|
||||
draw_window (GtkWidget *widget,
|
||||
GdkDrawable *drawable,
|
||||
draw_window (GtkWidget *widget,
|
||||
GdkDrawable *drawable,
|
||||
const WnckWindowDisplayInfo *win,
|
||||
const GdkRectangle *winrect)
|
||||
const GdkRectangle *winrect,
|
||||
GtkStateType state)
|
||||
{
|
||||
cairo_t *cr;
|
||||
GdkPixbuf *icon;
|
||||
int icon_x, icon_y, icon_w, icon_h;
|
||||
|
||||
gdk_draw_rectangle (drawable,
|
||||
win->is_active ?
|
||||
widget->style->bg_gc[GTK_STATE_SELECTED] :
|
||||
widget->style->bg_gc[GTK_STATE_NORMAL],
|
||||
TRUE,
|
||||
winrect->x + 1, winrect->y + 1,
|
||||
winrect->width - 2, winrect->height - 2);
|
||||
gboolean is_active;
|
||||
GdkColor *color;
|
||||
|
||||
is_active = win->is_active;
|
||||
|
||||
cr = gdk_cairo_create (drawable);
|
||||
cairo_rectangle (cr, winrect->x, winrect->y, winrect->width, winrect->height);
|
||||
cairo_clip (cr);
|
||||
|
||||
if (is_active)
|
||||
color = &widget->style->light[state];
|
||||
else
|
||||
color = &widget->style->bg[state];
|
||||
cairo_set_source_rgb (cr,
|
||||
color->red / 65535.,
|
||||
color->green / 65535.,
|
||||
color->blue / 65535.);
|
||||
|
||||
cairo_rectangle (cr,
|
||||
winrect->x + 1, winrect->y + 1,
|
||||
MAX (0, winrect->width - 2), MAX (0, winrect->height - 2));
|
||||
cairo_fill (cr);
|
||||
|
||||
|
||||
icon = win->icon;
|
||||
|
||||
@@ -103,7 +120,7 @@ draw_window (GtkWidget *widget,
|
||||
{
|
||||
icon_w = gdk_pixbuf_get_width (icon);
|
||||
icon_h = gdk_pixbuf_get_height (icon);
|
||||
|
||||
|
||||
/* Give up. */
|
||||
if (icon_w > (winrect->width - 2) ||
|
||||
icon_h > (winrect->height - 2))
|
||||
@@ -116,44 +133,31 @@ draw_window (GtkWidget *widget,
|
||||
{
|
||||
icon_x = winrect->x + (winrect->width - icon_w) / 2;
|
||||
icon_y = winrect->y + (winrect->height - icon_h) / 2;
|
||||
|
||||
{
|
||||
/* render_to_drawable should take a clip rect to save
|
||||
* us this mess...
|
||||
*/
|
||||
GdkRectangle pixbuf_rect;
|
||||
GdkRectangle draw_rect;
|
||||
|
||||
pixbuf_rect.x = icon_x;
|
||||
pixbuf_rect.y = icon_y;
|
||||
pixbuf_rect.width = icon_w;
|
||||
pixbuf_rect.height = icon_h;
|
||||
|
||||
if (gdk_rectangle_intersect ((GdkRectangle *)winrect, &pixbuf_rect,
|
||||
&draw_rect))
|
||||
{
|
||||
gdk_pixbuf_render_to_drawable_alpha (icon,
|
||||
drawable,
|
||||
draw_rect.x - pixbuf_rect.x,
|
||||
draw_rect.y - pixbuf_rect.y,
|
||||
draw_rect.x, draw_rect.y,
|
||||
draw_rect.width,
|
||||
draw_rect.height,
|
||||
GDK_PIXBUF_ALPHA_FULL,
|
||||
128,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
cairo_save (cr);
|
||||
gdk_cairo_set_source_pixbuf (cr, icon, icon_x, icon_y);
|
||||
cairo_rectangle (cr, icon_x, icon_y, icon_w, icon_h);
|
||||
cairo_clip (cr);
|
||||
cairo_paint (cr);
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
gdk_draw_rectangle (drawable,
|
||||
win->is_active ?
|
||||
widget->style->fg_gc[GTK_STATE_SELECTED] :
|
||||
widget->style->fg_gc[GTK_STATE_NORMAL],
|
||||
FALSE,
|
||||
winrect->x, winrect->y,
|
||||
winrect->width - 1, winrect->height - 1);
|
||||
if (is_active)
|
||||
color = &widget->style->fg[state];
|
||||
else
|
||||
color = &widget->style->fg[state];
|
||||
|
||||
cairo_set_source_rgb (cr,
|
||||
color->red / 65535.,
|
||||
color->green / 65535.,
|
||||
color->blue / 65535.);
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
cairo_rectangle (cr,
|
||||
winrect->x + 0.5, winrect->y + 0.5,
|
||||
MAX (0, winrect->width - 1), MAX (0, winrect->height - 1));
|
||||
cairo_stroke (cr);
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -172,48 +176,56 @@ wnck_draw_workspace (GtkWidget *widget,
|
||||
{
|
||||
int i;
|
||||
GdkRectangle workspace_rect;
|
||||
|
||||
GtkStateType state;
|
||||
|
||||
workspace_rect.x = x;
|
||||
workspace_rect.y = y;
|
||||
workspace_rect.width = width;
|
||||
workspace_rect.height = height;
|
||||
|
||||
|
||||
if (is_active)
|
||||
gdk_draw_rectangle (drawable,
|
||||
GTK_WIDGET (widget)->style->dark_gc[GTK_STATE_SELECTED],
|
||||
TRUE,
|
||||
x, y, width, height);
|
||||
else if (workspace_background)
|
||||
state = GTK_STATE_SELECTED;
|
||||
else if (workspace_background)
|
||||
state = GTK_STATE_PRELIGHT;
|
||||
else
|
||||
state = GTK_STATE_NORMAL;
|
||||
|
||||
if (workspace_background)
|
||||
{
|
||||
gdk_pixbuf_render_to_drawable (workspace_background,
|
||||
drawable,
|
||||
GTK_WIDGET (widget)->style->dark_gc[GTK_STATE_SELECTED],
|
||||
0, 0,
|
||||
x, y,
|
||||
-1, -1,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
0, 0);
|
||||
gdk_draw_pixbuf (drawable,
|
||||
GTK_WIDGET (widget)->style->dark_gc[state],
|
||||
workspace_background,
|
||||
0, 0,
|
||||
x, y,
|
||||
-1, -1,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
0, 0);
|
||||
}
|
||||
else
|
||||
gdk_draw_rectangle (drawable,
|
||||
GTK_WIDGET (widget)->style->dark_gc[GTK_STATE_NORMAL],
|
||||
TRUE,
|
||||
x, y, width, height);
|
||||
|
||||
|
||||
{
|
||||
cairo_t *cr;
|
||||
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
gdk_cairo_set_source_color (cr, &widget->style->dark[state]);
|
||||
cairo_rectangle (cr, x, y, width, height);
|
||||
cairo_fill (cr);
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while (i < n_windows)
|
||||
{
|
||||
const WnckWindowDisplayInfo *win = &windows[i];
|
||||
GdkRectangle winrect;
|
||||
|
||||
get_window_rect (win, screen_width, screen_height, &workspace_rect, &winrect);
|
||||
get_window_rect (win, screen_width,
|
||||
screen_height, &workspace_rect, &winrect);
|
||||
|
||||
draw_window (widget,
|
||||
drawable,
|
||||
win,
|
||||
&winrect);
|
||||
&winrect,
|
||||
state);
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
@@ -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) ||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
12
src/frame.c
12
src/frame.c
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
567
src/frames.c
567
src/frames.c
@@ -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))));
|
||||
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))));
|
||||
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))));
|
||||
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))));
|
||||
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) !=
|
||||
@@ -1351,7 +1429,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
frame->xwindow,
|
||||
op,
|
||||
TRUE,
|
||||
meta_ui_get_last_event_serial (gdk_display),
|
||||
TRUE,
|
||||
event->button,
|
||||
0,
|
||||
event->time,
|
||||
@@ -1375,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,
|
||||
@@ -1394,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;
|
||||
|
||||
@@ -1428,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,
|
||||
@@ -1441,7 +1527,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
frame->xwindow,
|
||||
op,
|
||||
TRUE,
|
||||
meta_ui_get_last_event_serial (gdk_display),
|
||||
TRUE,
|
||||
event->button,
|
||||
0,
|
||||
event->time,
|
||||
@@ -1452,16 +1538,18 @@ 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,
|
||||
frame->xwindow,
|
||||
META_GRAB_OP_MOVING,
|
||||
TRUE,
|
||||
meta_ui_get_last_event_serial (gdk_display),
|
||||
TRUE,
|
||||
event->button,
|
||||
0,
|
||||
event->time,
|
||||
@@ -1471,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;
|
||||
@@ -1557,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;
|
||||
|
||||
@@ -1639,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;
|
||||
@@ -1794,7 +1880,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
grab_op == META_GRAB_OP_CLICKING_DELETE) ||
|
||||
(control == META_FRAME_CONTROL_MINIMIZE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_MINIMIZE) ||
|
||||
(control == META_FRAME_CONTROL_MAXIMIZE &&
|
||||
((control == META_FRAME_CONTROL_MAXIMIZE ||
|
||||
control == META_FRAME_CONTROL_UNMAXIMIZE) &&
|
||||
(grab_op == META_GRAB_OP_CLICKING_MAXIMIZE ||
|
||||
grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE)) ||
|
||||
(control == META_FRAME_CONTROL_SHADE &&
|
||||
@@ -1812,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 */
|
||||
}
|
||||
@@ -1827,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);
|
||||
}
|
||||
@@ -1867,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 &&
|
||||
@@ -1895,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);
|
||||
}
|
||||
@@ -1911,7 +1998,7 @@ clear_backing (GdkPixmap *pixmap,
|
||||
|
||||
static GdkPixmap *
|
||||
generate_pixmap (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
MetaUIFrame *frame,
|
||||
MetaRectangle rect)
|
||||
{
|
||||
GdkRectangle rectangle;
|
||||
@@ -1931,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);
|
||||
|
||||
@@ -1941,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 ||
|
||||
@@ -1966,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
|
||||
@@ -2025,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);
|
||||
|
||||
@@ -2045,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;
|
||||
@@ -2126,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;
|
||||
@@ -2143,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;
|
||||
|
||||
@@ -2249,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,
|
||||
@@ -2297,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
|
||||
@@ -2315,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);
|
||||
}
|
||||
@@ -2496,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;
|
||||
@@ -2666,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);
|
||||
|
||||
@@ -191,6 +191,51 @@ static void handle_maximize_horiz (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_side_n (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_side_w (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_side_s (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_side_e (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_corner_nw (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_corner_ne (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_corner_sw (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_corner_se (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
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,
|
||||
@@ -379,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 }
|
||||
};
|
||||
|
||||
@@ -432,6 +478,14 @@ static const MetaKeyHandler window_handlers[] = {
|
||||
{ META_KEYBINDING_LOWER, handle_lower, NULL},
|
||||
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, handle_maximize_vert, NULL },
|
||||
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, handle_maximize_horiz, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_N, handle_move_to_side_n, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_S, handle_move_to_side_s, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_E, handle_move_to_side_e, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_W, handle_move_to_side_w, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_NW, handle_move_to_corner_nw, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_NE, handle_move_to_corner_ne, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_SW, handle_move_to_corner_sw, NULL },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_SE, handle_move_to_corner_se, NULL },
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
@@ -1903,10 +1957,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,
|
||||
@@ -2817,6 +2868,162 @@ handle_maximize_horiz (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/* Move a window to a corner; to_bottom/to_right are FALSE for the
|
||||
* top or left edge, or TRUE for the bottom/right edge. xchange/ychange
|
||||
* are FALSE if that dimension is not to be changed, TRUE otherwise.
|
||||
* Together they describe which of the four corners, or four sides,
|
||||
* is desired.
|
||||
*/
|
||||
static void
|
||||
handle_move_to_corner_backend (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
gboolean xchange,
|
||||
gboolean ychange,
|
||||
gboolean to_right,
|
||||
gboolean to_bottom)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle outer;
|
||||
int orig_x, orig_y;
|
||||
int new_x, new_y;
|
||||
int frame_width, frame_height;
|
||||
|
||||
meta_window_get_work_area_all_xineramas (window, &work_area);
|
||||
meta_window_get_outer_rect (window, &outer);
|
||||
meta_window_get_position (window, &orig_x, &orig_y);
|
||||
|
||||
frame_width = (window->frame ? window->frame->child_x : 0);
|
||||
frame_height = (window->frame ? window->frame->child_y : 0);
|
||||
|
||||
if (xchange) {
|
||||
new_x = work_area.x + (to_right ?
|
||||
(work_area.width + frame_width) - outer.width :
|
||||
0);
|
||||
} else {
|
||||
new_x = orig_x;
|
||||
}
|
||||
|
||||
if (ychange) {
|
||||
new_y = work_area.y + (to_bottom ?
|
||||
(work_area.height + frame_height) - outer.height :
|
||||
0);
|
||||
} else {
|
||||
new_y = orig_y;
|
||||
}
|
||||
|
||||
meta_window_move_resize (window,
|
||||
FALSE,
|
||||
new_x,
|
||||
new_y,
|
||||
window->rect.width,
|
||||
window->rect.height);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_corner_nw (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, TRUE, TRUE, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_corner_ne (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, TRUE, TRUE, TRUE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_corner_sw (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, TRUE, TRUE, FALSE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_corner_se (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, TRUE, TRUE, TRUE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_n (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, FALSE, TRUE, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_s (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, FALSE, TRUE, FALSE, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_e (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, TRUE, FALSE, TRUE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_side_w (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
handle_move_to_corner_backend (display, screen, window, TRUE, FALSE, FALSE, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
process_workspace_switch_grab (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -2990,7 +3197,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);
|
||||
|
||||
@@ -3020,6 +3229,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,
|
||||
@@ -3122,7 +3334,7 @@ do_choose_window (MetaDisplay *display,
|
||||
tab_op_from_tab_type (type) :
|
||||
cycle_op_from_tab_type (type),
|
||||
FALSE,
|
||||
event->xkey.serial,
|
||||
FALSE,
|
||||
0,
|
||||
binding->mask,
|
||||
event->xkey.time,
|
||||
@@ -3343,6 +3555,7 @@ handle_begin_move (MetaDisplay *display,
|
||||
{
|
||||
meta_window_begin_grab_op (window,
|
||||
META_GRAB_OP_KEYBOARD_MOVING,
|
||||
FALSE,
|
||||
event->xkey.time);
|
||||
}
|
||||
}
|
||||
@@ -3358,6 +3571,7 @@ handle_begin_resize (MetaDisplay *display,
|
||||
{
|
||||
meta_window_begin_grab_op (window,
|
||||
META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN,
|
||||
FALSE,
|
||||
event->xkey.time);
|
||||
}
|
||||
}
|
||||
@@ -3555,7 +3769,7 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
NULL,
|
||||
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
|
||||
FALSE,
|
||||
event->xkey.serial,
|
||||
FALSE,
|
||||
0,
|
||||
grab_mask,
|
||||
event->xkey.time,
|
||||
@@ -3594,7 +3808,6 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
handle_spew_mark (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -3604,7 +3817,6 @@ handle_spew_mark (MetaDisplay *display,
|
||||
{
|
||||
meta_verbose ("-- MARK MARK MARK MARK --\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_set_keybindings_disabled (gboolean setting)
|
||||
|
||||
19
src/main.c
19
src/main.c
@@ -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);
|
||||
@@ -126,7 +126,7 @@ meta_print_self_identity (void)
|
||||
|
||||
/* Version and current date. */
|
||||
g_date_clear (&d, 1);
|
||||
g_date_set_time (&d, time (NULL));
|
||||
g_date_set_time_t (&d, time (NULL));
|
||||
g_date_strftime (buf, sizeof (buf), "%x", &d);
|
||||
meta_verbose ("Metacity version %s running on %s\n",
|
||||
VERSION, buf);
|
||||
@@ -293,15 +293,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,
|
||||
@@ -388,7 +389,7 @@ main (int argc, char **argv)
|
||||
if (!meta_display_open ())
|
||||
meta_exit (META_EXIT_ERROR);
|
||||
|
||||
g_main_run (meta_main_loop);
|
||||
g_main_loop_run (meta_main_loop);
|
||||
|
||||
{
|
||||
GSList *displays;
|
||||
@@ -446,8 +447,8 @@ meta_quit (MetaExitCode code)
|
||||
{
|
||||
meta_exit_code = code;
|
||||
|
||||
if (g_main_is_running (meta_main_loop))
|
||||
g_main_quit (meta_main_loop);
|
||||
if (g_main_loop_is_running (meta_main_loop))
|
||||
g_main_loop_quit (meta_main_loop);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
337
src/menu.c
337
src/menu.c
@@ -32,13 +32,25 @@
|
||||
#include "core.h"
|
||||
#include "themewidget.h"
|
||||
#include "metaaccellabel.h"
|
||||
#include "ui.h"
|
||||
|
||||
typedef struct _MenuItem MenuItem;
|
||||
typedef struct _MenuData MenuData;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MENU_ITEM_SEPARATOR = 0,
|
||||
MENU_ITEM_NORMAL,
|
||||
MENU_ITEM_IMAGE,
|
||||
MENU_ITEM_CHECKBOX,
|
||||
MENU_ITEM_RADIOBUTTON,
|
||||
MENU_ITEM_WORKSPACE_LIST,
|
||||
} MetaMenuItemType;
|
||||
|
||||
struct _MenuItem
|
||||
{
|
||||
MetaMenuOp op;
|
||||
MetaMenuItemType type;
|
||||
const char *stock_id;
|
||||
const gboolean checked;
|
||||
const char *label;
|
||||
@@ -55,41 +67,42 @@ static void activate_cb (GtkWidget *menuitem, gpointer data);
|
||||
|
||||
static MenuItem menuitems[] = {
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_MINIMIZE, METACITY_STOCK_MINIMIZE, FALSE, N_("Mi_nimize") },
|
||||
{ META_MENU_OP_MINIMIZE, MENU_ITEM_IMAGE, METACITY_STOCK_MINIMIZE, FALSE, N_("Mi_nimize") },
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_MAXIMIZE, METACITY_STOCK_MAXIMIZE, FALSE, N_("Ma_ximize") },
|
||||
{ META_MENU_OP_MAXIMIZE, MENU_ITEM_IMAGE, METACITY_STOCK_MAXIMIZE, FALSE, N_("Ma_ximize") },
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_UNMAXIMIZE, NULL, FALSE, N_("Unma_ximize") },
|
||||
{ META_MENU_OP_UNMAXIMIZE, MENU_ITEM_NORMAL, NULL, FALSE, N_("Unma_ximize") },
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_SHADE, NULL, FALSE, N_("Roll _Up") },
|
||||
{ META_MENU_OP_SHADE, MENU_ITEM_NORMAL, NULL, FALSE, N_("Roll _Up") },
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_UNSHADE, NULL, FALSE, N_("_Unroll") },
|
||||
{ META_MENU_OP_UNSHADE, MENU_ITEM_NORMAL, NULL, FALSE, N_("_Unroll") },
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_ABOVE, NULL, FALSE, N_("On _Top") },
|
||||
{ META_MENU_OP_MOVE, MENU_ITEM_NORMAL, NULL, FALSE, N_("_Move") },
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_UNABOVE, NULL, TRUE, N_("On _Top") },
|
||||
{ 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_MOVE, NULL, FALSE, N_("_Move") },
|
||||
{ META_MENU_OP_RECOVER, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move Titlebar On_screen") },
|
||||
{ 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_RESIZE, NULL, FALSE, N_("_Resize") },
|
||||
{ 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_RECOVER, NULL, FALSE, N_("Move Titlebar On_screen") },
|
||||
{ 0, NULL, FALSE, NULL }, /* separator */
|
||||
{ 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_DELETE, METACITY_STOCK_DELETE, FALSE, N_("_Close") },
|
||||
{ META_MENU_OP_WORKSPACES, NULL, FALSE, NULL }, /* separator */
|
||||
{ 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_STICK, NULL, FALSE, N_("_Always on Visible Workspace") },
|
||||
{ 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_UNSTICK, NULL, FALSE, N_("_Only on This Workspace") },
|
||||
{ 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! */
|
||||
{ META_MENU_OP_MOVE_LEFT, NULL, FALSE, N_("Move to Workspace _Left") },
|
||||
{ META_MENU_OP_MOVE_RIGHT, MENU_ITEM_NORMAL, NULL, FALSE, N_("Move to Workspace R_ight") },
|
||||
/* Translators: Translate this string the same way as you do in libwnck! */
|
||||
{ META_MENU_OP_MOVE_RIGHT, NULL, FALSE, N_("Move to Workspace R_ight") },
|
||||
{ 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_UP, NULL, FALSE, N_("Move to Workspace _Up") },
|
||||
{ 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_MOVE_DOWN, NULL, FALSE, N_("Move to Workspace _Down") }
|
||||
{ META_MENU_OP_DELETE, MENU_ITEM_IMAGE, METACITY_STOCK_DELETE, FALSE, N_("_Close") }
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -97,7 +110,7 @@ popup_position_func (GtkMenu *menu,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gboolean *push_in,
|
||||
gpointer user_data)
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkRequisition req;
|
||||
GdkPoint *pos;
|
||||
@@ -109,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));
|
||||
@@ -125,7 +141,7 @@ menu_closed (GtkMenu *widget,
|
||||
meta_frames_notify_menu_hide (menu->frames);
|
||||
(* menu->func) (menu, gdk_display,
|
||||
menu->client_xwindow,
|
||||
gtk_get_current_event_time (),
|
||||
gtk_get_current_event_time (),
|
||||
0, 0,
|
||||
menu->data);
|
||||
|
||||
@@ -144,7 +160,7 @@ activate_cb (GtkWidget *menuitem, gpointer data)
|
||||
meta_frames_notify_menu_hide (md->menu->frames);
|
||||
(* md->menu->func) (md->menu, gdk_display,
|
||||
md->menu->client_xwindow,
|
||||
gtk_get_current_event_time (),
|
||||
gtk_get_current_event_time (),
|
||||
md->op,
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (menuitem),
|
||||
"workspace")),
|
||||
@@ -239,36 +255,63 @@ get_workspace_name_with_accel (Display *display,
|
||||
}
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
menu_item_new (const char *label,
|
||||
gboolean with_image,
|
||||
gboolean with_check,
|
||||
unsigned int key,
|
||||
MetaVirtualModifier mods)
|
||||
static GtkWidget *
|
||||
menu_item_new (MenuItem *menuitem, int workspace_id)
|
||||
{
|
||||
GtkWidget *menu_item;
|
||||
unsigned int key;
|
||||
MetaVirtualModifier mods;
|
||||
const char *i18n_label;
|
||||
GtkWidget *mi;
|
||||
GtkWidget *accel_label;
|
||||
|
||||
if (with_check)
|
||||
if (menuitem->type == MENU_ITEM_NORMAL)
|
||||
{
|
||||
menu_item = gtk_check_menu_item_new ();
|
||||
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item),
|
||||
TRUE);
|
||||
mi = gtk_menu_item_new ();
|
||||
}
|
||||
else if (with_image)
|
||||
menu_item = gtk_image_menu_item_new ();
|
||||
else if (menuitem->type == MENU_ITEM_IMAGE)
|
||||
{
|
||||
GtkWidget *image;
|
||||
|
||||
image = gtk_image_new_from_stock (menuitem->stock_id, GTK_ICON_SIZE_MENU);
|
||||
mi = gtk_image_menu_item_new ();
|
||||
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), image);
|
||||
gtk_widget_show (image);
|
||||
}
|
||||
else if (menuitem->type == MENU_ITEM_CHECKBOX)
|
||||
{
|
||||
mi = gtk_check_menu_item_new ();
|
||||
|
||||
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
|
||||
menu_item = gtk_menu_item_new ();
|
||||
accel_label = meta_accel_label_new_with_mnemonic (label);
|
||||
return gtk_separator_menu_item_new ();
|
||||
|
||||
i18n_label = _(menuitem->label);
|
||||
meta_core_get_menu_accelerator (menuitem->op, workspace_id, &key, &mods);
|
||||
|
||||
accel_label = meta_accel_label_new_with_mnemonic (i18n_label);
|
||||
gtk_misc_set_alignment (GTK_MISC (accel_label), 0.0, 0.5);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (menu_item), accel_label);
|
||||
gtk_container_add (GTK_CONTAINER (mi), accel_label);
|
||||
gtk_widget_show (accel_label);
|
||||
|
||||
meta_accel_label_set_accelerator (META_ACCEL_LABEL (accel_label),
|
||||
key, mods);
|
||||
|
||||
return menu_item;
|
||||
return mi;
|
||||
}
|
||||
|
||||
MetaWindowMenu*
|
||||
@@ -276,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)
|
||||
@@ -284,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)
|
||||
@@ -301,58 +345,126 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
menu->menu = gtk_menu_new ();
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu->menu),
|
||||
gtk_widget_get_screen (GTK_WIDGET (frames)));
|
||||
gtk_widget_get_screen (GTK_WIDGET (frames)));
|
||||
|
||||
i = 0;
|
||||
while (i < (int) G_N_ELEMENTS (menuitems))
|
||||
for (i = 0; i < (int) G_N_ELEMENTS (menuitems); i++)
|
||||
{
|
||||
if (ops & menuitems[i].op || menuitems[i].op == 0)
|
||||
MenuItem menuitem = menuitems[i];
|
||||
if (ops & menuitem.op || menuitem.op == 0)
|
||||
{
|
||||
GtkWidget *mi;
|
||||
MenuData *md;
|
||||
unsigned int key;
|
||||
MetaVirtualModifier mods;
|
||||
|
||||
if (menuitems[i].label == NULL)
|
||||
|
||||
mi = menu_item_new (&menuitem, -1);
|
||||
|
||||
/* Set the activeness of radiobuttons. */
|
||||
switch (menuitem.op)
|
||||
{
|
||||
mi = gtk_separator_menu_item_new ();
|
||||
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;
|
||||
}
|
||||
else
|
||||
|
||||
if (menuitem.type == MENU_ITEM_WORKSPACE_LIST)
|
||||
{
|
||||
GtkWidget *image;
|
||||
|
||||
image = NULL;
|
||||
|
||||
if (menuitems[i].stock_id)
|
||||
if (ops & META_MENU_OP_WORKSPACES)
|
||||
{
|
||||
image = gtk_image_new_from_stock (menuitems[i].stock_id,
|
||||
GTK_ICON_SIZE_MENU);
|
||||
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);
|
||||
|
||||
if (image)
|
||||
{
|
||||
mi = menu_item_new (_(menuitems[i].label), TRUE, FALSE, key, mods);
|
||||
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi),
|
||||
image);
|
||||
gtk_widget_show (image);
|
||||
}
|
||||
else
|
||||
{
|
||||
mi = menu_item_new (_(menuitems[i].label), FALSE,
|
||||
menuitems[i].checked, key, mods);
|
||||
}
|
||||
|
||||
if (insensitive & menuitems[i].op)
|
||||
if (insensitive & menuitem.op)
|
||||
gtk_widget_set_sensitive (mi, FALSE);
|
||||
|
||||
md = g_new (MenuData, 1);
|
||||
|
||||
md->menu = menu;
|
||||
md->op = menuitems[i].op;
|
||||
md->op = menuitem.op;
|
||||
|
||||
gtk_signal_connect_full (GTK_OBJECT (mi),
|
||||
"activate",
|
||||
@@ -361,90 +473,15 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
md,
|
||||
g_free, FALSE, FALSE);
|
||||
}
|
||||
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu),
|
||||
mi);
|
||||
|
||||
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu), mi);
|
||||
|
||||
gtk_widget_show (mi);
|
||||
}
|
||||
++i;
|
||||
}
|
||||
|
||||
if (ops & META_MENU_OP_WORKSPACES)
|
||||
{
|
||||
|
||||
GtkWidget *mi;
|
||||
Display *display;
|
||||
Window xroot;
|
||||
GdkScreen *screen;
|
||||
GtkWidget *submenu;
|
||||
GtkWidget *submenuitem;
|
||||
|
||||
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 (_("Move to Another _Workspace"), FALSE, FALSE, 0, 0);
|
||||
gtk_menu_item_set_submenu (GTK_MENU_ITEM (submenuitem), submenu);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu->menu),
|
||||
submenuitem);
|
||||
gtk_widget_show (submenuitem);
|
||||
|
||||
i = 0;
|
||||
while (i < n_workspaces)
|
||||
{
|
||||
char *label;
|
||||
MenuData *md;
|
||||
unsigned int key;
|
||||
MetaVirtualModifier mods;
|
||||
|
||||
meta_core_get_menu_accelerator (META_MENU_OP_WORKSPACES,
|
||||
i + 1,
|
||||
&key, &mods);
|
||||
|
||||
label = get_workspace_name_with_accel (display, xroot, i);
|
||||
mi = menu_item_new (label, FALSE, FALSE, key, mods);
|
||||
|
||||
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);
|
||||
|
||||
++i;
|
||||
}
|
||||
}
|
||||
else
|
||||
meta_verbose ("not creating workspace menu\n");
|
||||
|
||||
|
||||
g_signal_connect (menu->menu, "selection_done",
|
||||
G_CALLBACK (menu_closed), menu);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 -
|
||||
|
||||
@@ -94,11 +94,11 @@ kill_window_question (const char *window_name,
|
||||
GTK_BUTTONS_NONE,
|
||||
"<big><b>%s</b></big>\n\n<i>%s</i>",
|
||||
str,
|
||||
_("You may choose to wait a short while"
|
||||
"for it to continue or force the application"
|
||||
_("You may choose to wait a short while "
|
||||
"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);
|
||||
|
||||
@@ -93,14 +93,29 @@
|
||||
<short>Whether raising should be a side-effect of other user
|
||||
interactions</short>
|
||||
<long>
|
||||
Setting this option to false can lead to buggy behavior, so
|
||||
users are strongly discouraged from changing it from the default
|
||||
of true.
|
||||
|
||||
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.
|
||||
normal click on the window decorations, or by special messages
|
||||
from pagers, such as activation requests from tasklist applets.
|
||||
This option is currently disabled in click-to-focus mode.
|
||||
|
||||
Note that the list of ways to raise windows when raise_on_click
|
||||
is false does not include programmatic requests from
|
||||
applications to raise windows; such requests will be ignored
|
||||
regardless of the reason for the request. If you are an
|
||||
application developer and have a user complaining that your
|
||||
application does not work with this setting disabled, tell them
|
||||
it is _their_ fault for breaking their window manager and that
|
||||
they need to change this option back to true or live with the
|
||||
bug they requested. See also
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
@@ -123,6 +138,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>
|
||||
@@ -1084,6 +1135,198 @@ you set
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_corner_nw</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_corner_nw</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to north-west corner</short>
|
||||
<long>
|
||||
This keybinding moves a window into the north-west (top left)
|
||||
corner of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_corner_ne</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_corner_ne</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to north-east corner</short>
|
||||
<long>
|
||||
This keybinding moves a window into the north-east (top right)
|
||||
corner of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_corner_sw</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_corner_sw</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to south-west corner</short>
|
||||
<long>
|
||||
This keybinding moves a window into the south-west (bottom left)
|
||||
corner of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_corner_se</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_corner_se</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to south-east corner</short>
|
||||
<long>
|
||||
This keybinding moves a window into the south-east (bottom right)
|
||||
corner of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_side_n</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_side_n</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to north side of screen</short>
|
||||
<long>
|
||||
This keybinding moves a window against the north (top)
|
||||
side of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_side_s</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_side_s</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to south side of screen</short>
|
||||
<long>
|
||||
This keybinding moves a window into the south (bottom)
|
||||
side of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_side_e</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_side_e</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to east side of screen</short>
|
||||
<long>
|
||||
This keybinding moves a window into the east (right)
|
||||
side of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/move_to_side_w</key>
|
||||
<applyto>/apps/metacity/window_keybindings/move_to_side_w</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<!-- no default for this one -->
|
||||
<locale name="C">
|
||||
<short>Move window to west side of screen</short>
|
||||
<long>
|
||||
This keybinding moves a window into the west (left)
|
||||
side of the screen.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1".
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<!-- Global Keybindings -->
|
||||
|
||||
|
||||
|
||||
239
src/place.c
239
src/place.c
@@ -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:
|
||||
|
||||
243
src/prefs.c
243
src/prefs.c
@@ -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}
|
||||
};
|
||||
|
||||
@@ -1940,6 +1992,14 @@ static MetaKeyPref window_bindings[] = {
|
||||
{ META_KEYBINDING_LOWER, NULL, FALSE },
|
||||
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, NULL, FALSE },
|
||||
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_NW, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_NE, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_SW, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_CORNER_SE, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_N, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_S, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_E, NULL, FALSE },
|
||||
{ META_KEYBINDING_MOVE_TO_SIDE_W, NULL, FALSE },
|
||||
{ NULL, NULL, FALSE }
|
||||
};
|
||||
|
||||
@@ -2492,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
|
||||
@@ -2865,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)
|
||||
{
|
||||
@@ -2972,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;
|
||||
};
|
||||
|
||||
17
src/prefs.h
17
src/prefs.h
@@ -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"
|
||||
@@ -207,6 +214,14 @@ gboolean meta_prefs_get_compositing_manager (void);
|
||||
#define META_KEYBINDING_LOWER "lower"
|
||||
#define META_KEYBINDING_MAXIMIZE_VERTICALLY "maximize_vertically"
|
||||
#define META_KEYBINDING_MAXIMIZE_HORIZONTALLY "maximize_horizontally"
|
||||
#define META_KEYBINDING_MOVE_TO_CORNER_NW "move_to_corner_nw"
|
||||
#define META_KEYBINDING_MOVE_TO_CORNER_NE "move_to_corner_ne"
|
||||
#define META_KEYBINDING_MOVE_TO_CORNER_SW "move_to_corner_sw"
|
||||
#define META_KEYBINDING_MOVE_TO_CORNER_SE "move_to_corner_se"
|
||||
#define META_KEYBINDING_MOVE_TO_SIDE_N "move_to_side_n"
|
||||
#define META_KEYBINDING_MOVE_TO_SIDE_S "move_to_side_s"
|
||||
#define META_KEYBINDING_MOVE_TO_SIDE_E "move_to_side_e"
|
||||
#define META_KEYBINDING_MOVE_TO_SIDE_W "move_to_side_w"
|
||||
|
||||
typedef enum _MetaKeyBindingAction
|
||||
{
|
||||
|
||||
69
src/screen.c
69
src/screen.c
@@ -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;
|
||||
|
||||
@@ -577,10 +584,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 */
|
||||
|
||||
@@ -983,7 +990,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
|
||||
@@ -1815,7 +1822,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 +1832,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 +2219,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 +2272,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 +2546,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 +2563,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 +2574,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 +2610,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 +2639,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 +2647,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 +2656,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 +2682,7 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
|
||||
}
|
||||
|
||||
#endif /* HAVE_STARTUP_NOTIFICATION */
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,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,7 +207,7 @@ 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);
|
||||
|
||||
|
||||
@@ -82,7 +82,6 @@ static void save_state (void);
|
||||
static char* load_state (const char *previous_save_file);
|
||||
static void regenerate_save_file (void);
|
||||
static const char* full_save_file (void);
|
||||
static const char* base_save_file (void);
|
||||
static void warn_about_lame_clients_and_finish_interact (gboolean shutdown);
|
||||
|
||||
/* This is called when data is available on an ICE connection. */
|
||||
@@ -240,6 +239,12 @@ meta_session_init (const char *previous_client_id,
|
||||
saved_client_id = load_state (previous_save_file);
|
||||
previous_client_id = saved_client_id;
|
||||
}
|
||||
else if (previous_client_id)
|
||||
{
|
||||
char *save_file = g_strconcat (previous_client_id, ".ms", NULL);
|
||||
saved_client_id = load_state (save_file);
|
||||
g_free (save_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
saved_client_id = NULL;
|
||||
@@ -588,12 +593,14 @@ set_clone_restart_commands (void)
|
||||
prop1.name = SmRestartCommand;
|
||||
prop1.type = SmLISTofARRAY8;
|
||||
|
||||
g_return_if_fail (client_id);
|
||||
|
||||
i = 0;
|
||||
restartv[i] = "metacity";
|
||||
++i;
|
||||
restartv[i] = "--sm-save-file";
|
||||
restartv[i] = "--sm-client-id";
|
||||
++i;
|
||||
restartv[i] = (char*) base_save_file ();
|
||||
restartv[i] = client_id;
|
||||
++i;
|
||||
restartv[i] = NULL;
|
||||
|
||||
@@ -794,24 +801,6 @@ decode_text_from_utf8 (const char *text)
|
||||
return g_string_free (str, FALSE);
|
||||
}
|
||||
|
||||
static int
|
||||
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 */
|
||||
}
|
||||
|
||||
static void
|
||||
save_state (void)
|
||||
{
|
||||
@@ -884,7 +873,7 @@ save_state (void)
|
||||
int stack_position;
|
||||
|
||||
windows = meta_display_list_windows (display_iter->data);
|
||||
windows = g_slist_sort (windows, stack_cmp);
|
||||
windows = g_slist_sort (windows, meta_display_stack_cmp);
|
||||
|
||||
stack_position = 0;
|
||||
tmp = windows;
|
||||
@@ -1681,24 +1670,21 @@ session_info_new (void)
|
||||
return info;
|
||||
}
|
||||
|
||||
static char* relative_save_path = NULL;
|
||||
static char* full_save_path = NULL;
|
||||
|
||||
static void
|
||||
regenerate_save_file (void)
|
||||
{
|
||||
g_free (relative_save_path);
|
||||
g_free (full_save_path);
|
||||
|
||||
relative_save_path = g_strdup_printf ("%d-%d-%u.ms",
|
||||
(int) time (NULL),
|
||||
(int) getpid (),
|
||||
g_random_int ());
|
||||
|
||||
full_save_path = g_strconcat (g_get_home_dir (),
|
||||
"/.metacity/sessions/",
|
||||
relative_save_path,
|
||||
NULL);
|
||||
|
||||
if (client_id)
|
||||
full_save_path = g_strconcat (g_get_home_dir (),
|
||||
"/.metacity/sessions/",
|
||||
client_id,
|
||||
".ms",
|
||||
NULL);
|
||||
else
|
||||
full_save_path = NULL;
|
||||
}
|
||||
|
||||
static const char*
|
||||
@@ -1707,12 +1693,6 @@ full_save_file (void)
|
||||
return full_save_path;
|
||||
}
|
||||
|
||||
static const char*
|
||||
base_save_file (void)
|
||||
{
|
||||
return relative_save_path;
|
||||
}
|
||||
|
||||
static int
|
||||
windows_cmp_by_title (MetaWindow *a,
|
||||
MetaWindow *b)
|
||||
@@ -1824,9 +1804,6 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
||||
|
||||
display_iter = display_iter->next;
|
||||
}
|
||||
/* don't need to free displays */
|
||||
displays = NULL;
|
||||
|
||||
if (lame == NULL)
|
||||
{
|
||||
/* No lame apps. */
|
||||
@@ -1836,29 +1813,12 @@ warn_about_lame_clients_and_finish_interact (gboolean shutdown)
|
||||
|
||||
lame = g_slist_sort (lame, (GCompareFunc) windows_cmp_by_title);
|
||||
|
||||
|
||||
{
|
||||
XEvent property_event;
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_displays_list ()->data;
|
||||
|
||||
/* Using the property XA_PRIMARY because it's safe; nothing
|
||||
* would use it as a property. The type doesn't matter.
|
||||
*/
|
||||
XChangeProperty (display->xdisplay,
|
||||
display->leader_window,
|
||||
XA_PRIMARY, XA_STRING, 8,
|
||||
PropModeAppend, NULL, 0);
|
||||
XWindowEvent (display->xdisplay,
|
||||
display->leader_window,
|
||||
PropertyChangeMask,
|
||||
&property_event);
|
||||
|
||||
timestamp = property_event.xproperty.time;
|
||||
}
|
||||
timestamp = meta_display_get_current_time_roundtrip (displays->data);
|
||||
sprintf (timestampbuf, "%u", timestamp);
|
||||
|
||||
/* don't need to free displays */
|
||||
displays = NULL;
|
||||
|
||||
len = g_slist_length (lame);
|
||||
len *= 2; /* titles and also classes */
|
||||
len += 2; /* --timestamp flag and actual timestamp */
|
||||
|
||||
@@ -58,6 +58,17 @@ new_meta_rect (int x, int y, int width, int height)
|
||||
return temporary;
|
||||
}
|
||||
|
||||
static MetaStrut*
|
||||
new_meta_strut (int x, int y, int width, int height, int side)
|
||||
{
|
||||
MetaStrut* temporary;
|
||||
temporary = g_new (MetaStrut, 1);
|
||||
temporary->rect = meta_rect(x, y, width, height);
|
||||
temporary->side = side;
|
||||
|
||||
return temporary;
|
||||
}
|
||||
|
||||
static MetaEdge*
|
||||
new_screen_edge (int x, int y, int width, int height, int side_type)
|
||||
{
|
||||
@@ -228,9 +239,10 @@ free_strut_list (GSList *struts)
|
||||
static GSList*
|
||||
get_strut_list (int which)
|
||||
{
|
||||
GSList *struts;
|
||||
GSList *ans;
|
||||
MetaDirection wc = 0; /* wc == who cares? ;-) */
|
||||
|
||||
struts = NULL;
|
||||
ans = NULL;
|
||||
|
||||
g_assert (which >=0 && which <= 6);
|
||||
switch (which)
|
||||
@@ -238,36 +250,36 @@ get_strut_list (int which)
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 0, 0, 1600, 20));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 400, 1160, 1600, 40));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 1600, 20, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 400, 1160, 1600, 40, wc));
|
||||
break;
|
||||
case 2:
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 0, 0, 1600, 20));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 800, 1100, 400, 100));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 300, 1150, 150, 50));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 1600, 20, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 800, 1100, 400, 100, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 300, 1150, 150, 50, wc));
|
||||
break;
|
||||
case 3:
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 0, 0, 1600, 20));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 800, 1100, 400, 100));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 300, 1150, 80, 50));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 700, 525, 200, 150));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 1600, 20, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 800, 1100, 400, 100, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 300, 1150, 80, 50, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 700, 525, 200, 150, wc));
|
||||
break;
|
||||
case 4:
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 0, 0, 800, 1200));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 800, 0, 1600, 20));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 800, 1200, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 800, 0, 1600, 20, wc));
|
||||
break;
|
||||
case 5:
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 800, 0, 1600, 20));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 0, 0, 800, 1200));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 800, 10, 800, 1200));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 800, 0, 1600, 20, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 800, 1200, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 800, 10, 800, 1200, wc));
|
||||
break;
|
||||
case 6:
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 0, 0, 1600, 40));
|
||||
struts = g_slist_prepend (struts, new_meta_rect ( 0, 0, 1600, 20));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 1600, 40, wc));
|
||||
ans = g_slist_prepend (ans, new_meta_strut ( 0, 0, 1600, 20, wc));
|
||||
break;
|
||||
}
|
||||
|
||||
return struts;
|
||||
return ans;
|
||||
}
|
||||
|
||||
static GList*
|
||||
|
||||
@@ -131,13 +131,13 @@ render_simple (GdkDrawable *drawable,
|
||||
draw_checkerboard (drawable, width, height);
|
||||
}
|
||||
|
||||
gdk_pixbuf_render_to_drawable (pixbuf,
|
||||
drawable,
|
||||
gc,
|
||||
0, 0,
|
||||
0, 0, width, height,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
0, 0);
|
||||
gdk_draw_pixbuf (drawable,
|
||||
gc,
|
||||
pixbuf,
|
||||
0, 0,
|
||||
0, 0, width, height,
|
||||
GDK_RGB_DITHER_MAX,
|
||||
0, 0);
|
||||
|
||||
g_object_unref (G_OBJECT (pixbuf));
|
||||
}
|
||||
|
||||
@@ -4610,7 +4610,8 @@ meta_theme_load (const char *theme_name,
|
||||
g_markup_parse_context_free (context);
|
||||
g_free (text);
|
||||
|
||||
info.theme->format_version = info.format_version;
|
||||
if (info.theme)
|
||||
info.theme->format_version = info.format_version;
|
||||
|
||||
if (error)
|
||||
{
|
||||
|
||||
44
src/theme.c
44
src/theme.c
@@ -596,14 +596,11 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
|
||||
|
||||
n_left = 0;
|
||||
n_right = 0;
|
||||
for (i = 0; i < MAX_BUTTONS_PER_CORNER; i++)
|
||||
{
|
||||
/* NULL all unused */
|
||||
left_func_rects[i] = NULL;
|
||||
right_func_rects[i] = NULL;
|
||||
|
||||
if (!layout->hide_buttons)
|
||||
{
|
||||
/* Try to fill in rects */
|
||||
if (button_layout->left_buttons[i] != META_BUTTON_FUNCTION_LAST && !layout->hide_buttons)
|
||||
for (i = 0; i < MAX_BUTTONS_PER_CORNER && button_layout->left_buttons[i] != META_BUTTON_FUNCTION_LAST; i++)
|
||||
{
|
||||
left_func_rects[n_left] = rect_for_function (fgeom, flags,
|
||||
button_layout->left_buttons[i],
|
||||
@@ -612,7 +609,7 @@ meta_frame_layout_calc_geometry (const MetaFrameLayout *layout,
|
||||
++n_left;
|
||||
}
|
||||
|
||||
if (button_layout->right_buttons[i] != META_BUTTON_FUNCTION_LAST && !layout->hide_buttons)
|
||||
for (i = 0; i < MAX_BUTTONS_PER_CORNER && button_layout->right_buttons[i] != META_BUTTON_FUNCTION_LAST; i++)
|
||||
{
|
||||
right_func_rects[n_right] = rect_for_function (fgeom, flags,
|
||||
button_layout->right_buttons[i],
|
||||
@@ -2815,18 +2812,17 @@ render_pixbuf (GdkDrawable *drawable,
|
||||
draw_rect = pixbuf_rect;
|
||||
}
|
||||
|
||||
gdk_pixbuf_render_to_drawable_alpha (pixbuf,
|
||||
drawable,
|
||||
draw_rect.x - pixbuf_rect.x,
|
||||
draw_rect.y - pixbuf_rect.y,
|
||||
draw_rect.x, draw_rect.y,
|
||||
draw_rect.width,
|
||||
draw_rect.height,
|
||||
GDK_PIXBUF_ALPHA_FULL, /* ignored */
|
||||
128, /* ignored */
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
draw_rect.x - pixbuf_rect.x,
|
||||
draw_rect.y - pixbuf_rect.y);
|
||||
gdk_draw_pixbuf (drawable,
|
||||
NULL,
|
||||
pixbuf,
|
||||
draw_rect.x - pixbuf_rect.x,
|
||||
draw_rect.y - pixbuf_rect.y,
|
||||
draw_rect.x, draw_rect.y,
|
||||
draw_rect.width,
|
||||
draw_rect.height,
|
||||
GDK_RGB_DITHER_NORMAL,
|
||||
draw_rect.x - pixbuf_rect.x,
|
||||
draw_rect.y - pixbuf_rect.y);
|
||||
}
|
||||
|
||||
static GdkPixbuf*
|
||||
@@ -3900,11 +3896,6 @@ get_button (MetaFrameStyle *style,
|
||||
parent = parent->parent;
|
||||
}
|
||||
|
||||
/* We fall back to normal if no prelight */
|
||||
if (op_list == NULL &&
|
||||
state == META_BUTTON_STATE_PRELIGHT)
|
||||
return get_button (style, type, META_BUTTON_STATE_NORMAL);
|
||||
|
||||
/* We fall back to middle button backgrounds if we don't
|
||||
* have the ones on the sides
|
||||
*/
|
||||
@@ -3921,6 +3912,11 @@ get_button (MetaFrameStyle *style,
|
||||
return get_button (style, META_BUTTON_TYPE_RIGHT_MIDDLE_BACKGROUND,
|
||||
state);
|
||||
|
||||
/* We fall back to normal if no prelight */
|
||||
if (op_list == NULL &&
|
||||
state == META_BUTTON_STATE_PRELIGHT)
|
||||
return get_button (style, type, META_BUTTON_STATE_NORMAL);
|
||||
|
||||
return op_list;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user