Compare commits
212 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5d33a1bbb8 | ||
![]() |
9da34955f7 | ||
![]() |
536bb240ef | ||
![]() |
ef1c6e9214 | ||
![]() |
90359a5346 | ||
![]() |
9e341dd4d8 | ||
![]() |
2168cd3eb7 | ||
![]() |
25910508ae | ||
![]() |
c4fa0d118c | ||
![]() |
ca3ed6a1eb | ||
![]() |
0201fcfc6c | ||
![]() |
07e4cacf14 | ||
![]() |
79eb53bd53 | ||
![]() |
b694312f1c | ||
![]() |
3cca3f3ee9 | ||
![]() |
b01408f358 | ||
![]() |
4fc6a7ce65 | ||
![]() |
e657ef87ab | ||
![]() |
3bc5cc1ce7 | ||
![]() |
49971fc1ef | ||
![]() |
569ff8a34c | ||
![]() |
2d73af1530 | ||
![]() |
470dc30174 | ||
![]() |
7dd25001ce | ||
![]() |
9b0ba2f274 | ||
![]() |
8938ea3fa1 | ||
![]() |
df93236627 | ||
![]() |
5c587726ae | ||
![]() |
87100b64d9 | ||
![]() |
def5a12ff0 | ||
![]() |
31f0853ca8 | ||
![]() |
fb41e2bc8d | ||
![]() |
aa077d95c0 | ||
![]() |
b004ef4e15 | ||
![]() |
7c58ecb657 | ||
![]() |
8144a962e7 | ||
![]() |
8c3bce3f98 | ||
![]() |
3b0478776d | ||
![]() |
c53538b1c2 | ||
![]() |
2ba196b310 | ||
![]() |
4beb9df364 | ||
![]() |
6fb90bc723 | ||
![]() |
dd86330ff8 | ||
![]() |
f9772ac685 | ||
![]() |
312454150b | ||
![]() |
3fac671fc8 | ||
![]() |
dc5dff7e9a | ||
![]() |
199e2b6988 | ||
![]() |
d3f1996655 | ||
![]() |
277236f730 | ||
![]() |
0d06471910 | ||
![]() |
4de104f9cf | ||
![]() |
189c8b9b11 | ||
![]() |
555d7dc90c | ||
![]() |
2ab4a35c53 | ||
![]() |
b62aba4401 | ||
![]() |
3800dac492 | ||
![]() |
bba4df7187 | ||
![]() |
c808195eef | ||
![]() |
cb595266fd | ||
![]() |
3ba437d508 | ||
![]() |
28ae1b40df | ||
![]() |
b2352cf9e2 | ||
![]() |
3d62fedfa2 | ||
![]() |
6c6d871abc | ||
![]() |
39b7e2ed79 | ||
![]() |
dc856f0fdb | ||
![]() |
39cb0ee987 | ||
![]() |
78634dd4b8 | ||
![]() |
7c8f91a3a9 | ||
![]() |
e199b946ee | ||
![]() |
6b8a3a1af5 | ||
![]() |
445e982894 | ||
![]() |
d80721697d | ||
![]() |
d818e18d81 | ||
![]() |
f89973dbfc | ||
![]() |
c35fbb3f5f | ||
![]() |
d9b4fdd845 | ||
![]() |
0484ecd355 | ||
![]() |
277af5e783 | ||
![]() |
3274df7df1 | ||
![]() |
7a68a53322 | ||
![]() |
c7c4efa1c1 | ||
![]() |
e38609f4a2 | ||
![]() |
9d320ba435 | ||
![]() |
18107f5f36 | ||
![]() |
88b9efd0b7 | ||
![]() |
b42e848986 | ||
![]() |
7489dbc34e | ||
![]() |
4c96afba71 | ||
![]() |
7ea55a1e54 | ||
![]() |
77a207c9cc | ||
![]() |
1bea8254ba | ||
![]() |
1f5130dc93 | ||
![]() |
1d92dcdadd | ||
![]() |
e7b08814ec | ||
![]() |
69e245b237 | ||
![]() |
9ad9fd4290 | ||
![]() |
c47e425527 | ||
![]() |
9051b70d40 | ||
![]() |
43b5985c20 | ||
![]() |
0ec2133e81 | ||
![]() |
9fe845581b | ||
![]() |
fc23f9b22f | ||
![]() |
cbd0312605 | ||
![]() |
57bedc42a4 | ||
![]() |
acc6c97997 | ||
![]() |
dcef402d68 | ||
![]() |
d4973e8d1b | ||
![]() |
1dd78e38ff | ||
![]() |
adc46fc970 | ||
![]() |
3917d818f5 | ||
![]() |
cc5def1021 | ||
![]() |
77a331a1e3 | ||
![]() |
c12dc9de3c | ||
![]() |
ab7f789cb0 | ||
![]() |
ae86fcd5b2 | ||
![]() |
74d4768b8e | ||
![]() |
fe74d5da13 | ||
![]() |
1fec6583ff | ||
![]() |
bf6da74e6a | ||
![]() |
e8fb842aad | ||
![]() |
76e4fd8a07 | ||
![]() |
3cca3381ba | ||
![]() |
7d8087f3e8 | ||
![]() |
419e063a24 | ||
![]() |
05323ef21a | ||
![]() |
6e4d6da191 | ||
![]() |
9c75b95146 | ||
![]() |
edfaf1a6bc | ||
![]() |
1538ffa04c | ||
![]() |
3d661f9bc7 | ||
![]() |
34662a6a3a | ||
![]() |
92dff14d55 | ||
![]() |
61e1bb57e7 | ||
![]() |
5e85bf7210 | ||
![]() |
85f9c499fb | ||
![]() |
42dd771506 | ||
![]() |
8afa1da3a7 | ||
![]() |
f0c5312b6e | ||
![]() |
af8e3c0d93 | ||
![]() |
69f1a9d3bd | ||
![]() |
b126f61eed | ||
![]() |
b1ba1cbad0 | ||
![]() |
a58ea99379 | ||
![]() |
cb38ccc57f | ||
![]() |
41ae99000b | ||
![]() |
0f05948c95 | ||
![]() |
5744f08056 | ||
![]() |
6681725dcd | ||
![]() |
a99a2ab14c | ||
![]() |
616bffdeef | ||
![]() |
a067105a14 | ||
![]() |
76291d31b7 | ||
![]() |
bcbdfbe177 | ||
![]() |
5eaf79f6fa | ||
![]() |
1cabbfef25 | ||
![]() |
454638fd0c | ||
![]() |
4a06163710 | ||
![]() |
83f82e5f28 | ||
![]() |
db87abfb19 | ||
![]() |
35b47b59ab | ||
![]() |
a8f382019a | ||
![]() |
a1324af018 | ||
![]() |
ed37bcc258 | ||
![]() |
cb84bc3e1d | ||
![]() |
76dff49a3e | ||
![]() |
5af52e9fe1 | ||
![]() |
6dfb56cc77 | ||
![]() |
ab1adf6c06 | ||
![]() |
0ca0bca0d0 | ||
![]() |
3ae4e25162 | ||
![]() |
7535f0f58a | ||
![]() |
ca3236f76c | ||
![]() |
7d2f0bf1fe | ||
![]() |
3f4e194c8f | ||
![]() |
22bc36eb3b | ||
![]() |
7592470dab | ||
![]() |
179987132c | ||
![]() |
1e64cf4a8b | ||
![]() |
7859b69a88 | ||
![]() |
3e5b9776c6 | ||
![]() |
cdb94d7e57 | ||
![]() |
3e394580da | ||
![]() |
23a5f5bb58 | ||
![]() |
78826fd35c | ||
![]() |
616ce23a9a | ||
![]() |
3c24269ceb | ||
![]() |
ac606c6223 | ||
![]() |
1a16108310 | ||
![]() |
3cb72d338c | ||
![]() |
51ade19ae9 | ||
![]() |
fb3b5c92f8 | ||
![]() |
ff87e70e8d | ||
![]() |
34cb1840cf | ||
![]() |
9f21db5366 | ||
![]() |
0dcc85e79a | ||
![]() |
acb5e483a9 | ||
![]() |
5750974d5d | ||
![]() |
b62dd8d130 | ||
![]() |
e9c8fd8527 | ||
![]() |
addc04f463 | ||
![]() |
411fd3db44 | ||
![]() |
451c990dd5 | ||
![]() |
3a6dd75f63 | ||
![]() |
975130ff70 | ||
![]() |
abde6fc359 | ||
![]() |
10f3ce3de0 | ||
![]() |
618d282893 | ||
![]() |
ba1e888cba | ||
![]() |
7e78d707ea | ||
![]() |
12d5978268 |
@@ -29,3 +29,7 @@ COPYING
|
||||
intltool-*
|
||||
metacity.spec
|
||||
autom4te.cache
|
||||
compile
|
||||
depcomp
|
||||
omf.make
|
||||
xmldocs.make
|
||||
|
15
HACKING
15
HACKING
@@ -39,13 +39,18 @@ Minimal Building/Testing Environment
|
||||
You do not need to _install_ a development version of Metacity to
|
||||
build, run and test it; you can run it from some temporary
|
||||
directory. Also, you do not need to build all of Gnome in order to
|
||||
build a development version of Metacity -- odds are, you can build
|
||||
metacity from CVS without building any other modules.
|
||||
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.6 with your distro, you should be able
|
||||
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, and startup-notification-devel on Fedora) and be ready
|
||||
to build and test Metacity. Steps to do so:
|
||||
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
|
||||
|
@@ -9,3 +9,6 @@ E-mail: newren@gmail.com
|
||||
|
||||
Søren Sandmann
|
||||
E-mail: sandmann@redhat.com
|
||||
|
||||
Thomas Thurman
|
||||
E-mail: thomas@thurman.org.uk
|
||||
|
231
NEWS
231
NEWS
@@ -1,3 +1,234 @@
|
||||
2.17.0
|
||||
======
|
||||
|
||||
Thanks to Elijah Newren, Jens Granseuer, Bruno Boaventura, Carlo Wood,
|
||||
and Thomas Thurman for changes in this release.
|
||||
|
||||
- version 2 of theme format: stick, shade and above buttons on titlebar,
|
||||
variable rounding on corners, variable transparency on window
|
||||
backgrounds, stock icons in themes, can remove all titlebar buttons
|
||||
from certain classes of window, and more (Thomas) [#102547 and
|
||||
dependencies]
|
||||
- improve "Force Quit" dialog (Bruno) [#121936]
|
||||
- ignore edge resistance when resizing with keyboard (Elijah) [#346782]
|
||||
- maintain window size and placement across restarts (Carlo) [#358042]
|
||||
- prevent crash when closing certain remote apps (Elijah) [#358514]
|
||||
- longstanding mouse-focus bug fixed which affected firefox's
|
||||
autocompletion (Elijah) [#357695]
|
||||
- ignore maximum size constraints when maximising (Elijah) [#327543]
|
||||
- warn translators to keep translations in sync with libwnck (Bruno)
|
||||
[#355620]
|
||||
- fixes for compilation warnings, etc (Elijah, Jens) [#348067, #356631]
|
||||
|
||||
Translators
|
||||
Ivar Smolin (et), Gabor Kelemen (hu), Luca Ferretti (it),
|
||||
Runa Bhattacharjee (bn_IN)
|
||||
|
||||
2.16.2
|
||||
======
|
||||
|
||||
Thanks to Eljah Newren, Maik Beckmann, Christian Hamar, Thomas Andersen,
|
||||
and Bruno Boaventura de Oliveira for changes in this release.
|
||||
|
||||
- partial audit to fix timestamp usage (Elijah) [part of #355180]
|
||||
- remove compilation warnings (Maik) [#355876]; (Bruno) [#355490,
|
||||
#355489]
|
||||
- automatic detection of stable/unstable in configure script
|
||||
(Christian/Elijah) [#356122]
|
||||
- make windows be stacked correctly before showing them (Thomas)
|
||||
[#332385]
|
||||
- use guint32 for timestamps (Elijah) [#348305]
|
||||
|
||||
Translators
|
||||
Wouter Bolsterlee (nl), Matic Žgur (sl), Francisco Javier F. Serrador (es),
|
||||
Vladimir Petkov (bg), Jordi Mallach (ca), Ilkka Tuohela (fi),
|
||||
Rajesh Ranjan (hi), Woodman Tuen (zh_HK, zh_TW), Ani Peter (ml),
|
||||
Felix (ta), Ankit Patel (gu), Mohammad DAMT (id)
|
||||
|
||||
2.16.1
|
||||
======
|
||||
|
||||
Thanks to Elijah Newren, Colin Watson, and Bruno Boaventura de Oliveira
|
||||
Lacerda for changes in this release.
|
||||
|
||||
- fix stuck grab, letting focus be transferred between windows (Elijah)
|
||||
[#354422 partial]
|
||||
- windows returning from fullscreen are constrained to be onscreen
|
||||
(Elijah) [#353699]
|
||||
- Clear the transient_for flag of a window after emitting a warning
|
||||
(Colin)
|
||||
- Replace copy_of_gdk_x11_window_set_user_time() with the real thing
|
||||
(Bruno) [#352293]
|
||||
|
||||
Translators
|
||||
David Lodge (en_GB), Ivar Smolin (et), Matic Žgur (sl),
|
||||
Vasiliy Faronov (ru)
|
||||
|
||||
2.16.0
|
||||
==
|
||||
|
||||
Thanks to Jens Granseuer for changes in this release.
|
||||
|
||||
- Fix the build with c89/gcc 2.95.
|
||||
|
||||
Translators
|
||||
Rahul Bhalerao (mr), Runa Bhattacharjee (bn_IN), Woodman Tuen
|
||||
(zh_HK, zh_TW), Kostas Papadimas (el), Ani Peter (ml),
|
||||
Jonathan Ernst (fr), Горан Ракић (sr, Gabor Kelemen (hu),
|
||||
Maxim Dziumanenko (uk), Duarte Loreto (pt), Jordi Mallach (ca),
|
||||
Gintautas Miliauskas (lt)
|
||||
|
||||
2.15.34
|
||||
==
|
||||
|
||||
Thanks to Stéphane Rosi, Vytautus Liuolia, Will Walker, Baptiste
|
||||
Mille-Mathias, Elijah Newren, Ed Catmur, and Thomas Andersen for fixes
|
||||
in this release.
|
||||
|
||||
- allow moving maximized windows between xineramas again (Stéphane)
|
||||
[#338660]
|
||||
- fix an uninitialized-usage bug with net_wm_user_time that breaks
|
||||
focus with new windows (Vytautus)
|
||||
- re-fix accessibility events for the alt-tab popup (Will) [#350624]
|
||||
- update the close pixmap to fit better with the other pixmaps of the
|
||||
menu (Baptiste) [#345498]
|
||||
- fix several fullscreen handling bugs I introduced, causing
|
||||
fullscreen windows to not actually be shown fullscreen (Elijah)
|
||||
[#343115]
|
||||
- fix keybindings with hex-values, coming from special extended
|
||||
keyboard keys (Ed) [#140448]
|
||||
- fix metacity-dialog handling of arguments (Thomas) [#340690]
|
||||
|
||||
Translators
|
||||
Vladimir Petkov (bg), Jordi Mallach (ca), Gabor Kelemen (hu),
|
||||
Mohammad DAMT (id), Wouter Bolsterlee (nl), Daniel Nylander (sv),
|
||||
Funda Wang (zh_CN)
|
||||
|
||||
2.15.21
|
||||
==
|
||||
|
||||
Thanks to Vincent Untz, Jens Granseuer, Björn Lindqvist, Dmitry
|
||||
Timoshkov, Thomas Thurman, Vytautas Liuolia, Thomas Andersen, Chris
|
||||
Ball, and Elijah Newren for fixes in this release.
|
||||
|
||||
- kill usage of libegg (Vincent) [#348633]
|
||||
- fix another C89 vs. C99 issue (Jens) [#347621]
|
||||
- make it so maximized windows do not have rounded corners (Björn)
|
||||
[#336850]
|
||||
- fix the heuristic for determining if windows can be made
|
||||
fullscreen, needed for WINE and possible also some legacy
|
||||
applications (Dmitry) [#346927]
|
||||
- make sure window features get recalculated when the screen is
|
||||
resized via XRandR (Dmitry) [#346927]
|
||||
- fitts' law fixes for titlebar buttons on maximized windows (Thomas
|
||||
Thurman) [#97703]
|
||||
- react to _NET_STARTUP_ID changes, as proposed for the new
|
||||
startup-notification/EWMH spec (Vytautas) [#347515]
|
||||
- return the window to maximized state if the window was "shaken
|
||||
loose" from maximized state during a resize but the resize is later
|
||||
aborted (Thomas Andersen) [#346719]
|
||||
- fix button lighting with dragged clicks (Björn) [#321474]
|
||||
- don't minimize in response to double clicks on the titlebar when
|
||||
minimiziation should not be allowed (Chris) [#347377]
|
||||
- fix some titlebar-not-on-screen constraint issues (Elijah)
|
||||
[#333328, #345522]
|
||||
|
||||
Translators
|
||||
Mahay Alam Khan (bn_IN), Jakub Friedl (cs), Iñaki Larrañaga
|
||||
Murgoitio (eu), Yuval Tanny (he), Rajesh Ranjan (hi), Jovan
|
||||
Naumovski (mk) Kjartan Maraas (nb), Leonid Kanter (ru)
|
||||
|
||||
2.15.13
|
||||
==
|
||||
|
||||
Thanks to Björn Lindqvist and Thomas Thurman for improvements in this
|
||||
release.
|
||||
|
||||
- grab alt+shift+button1 when trying to snap-move windows (Björn)
|
||||
- avoid a case where memory is written after it's freed (Thomas)
|
||||
|
||||
Translators
|
||||
Hendrik Richter (de), Kostas Papadimas (el), Jonathan Ernst (fr),
|
||||
Satoru SATOH (ja)
|
||||
|
||||
2.15.8
|
||||
==
|
||||
|
||||
Known as the "Elijah sucks for not reviewing a couple dozen patches"
|
||||
release. And for not getting on IRC soon enough to catch Marnanel and
|
||||
show him how to do the release. So, just translations this time.
|
||||
|
||||
Translations
|
||||
|
||||
Mahay Alam Khan (bn_IN), Rhys Jones (cy), Francisco Javier
|
||||
F. Serrador (es), Ilkka Tuohela (fi), Rajesh Ranjan (hi), Changwoo
|
||||
Ryu (ko), Fano Rajaonarisoa (mg), Sanlig Badral (mn), Слободан Д.
|
||||
Средојевић (sr), Funda Wang (zh_CN)
|
||||
|
||||
2.15.5
|
||||
==
|
||||
|
||||
Thanks to Björn Lindqvist, Søren Sandmann, Adam Jackson, Elijah
|
||||
Newren, and Aidan Delaney for improvements in this release.
|
||||
|
||||
- code cleanup in resizepopup.c (Björn) [#341648]
|
||||
- fix a logic bug so that the whole titlebar becomes sensitive to
|
||||
mouse clicks (Björn) [#336320]
|
||||
- make mouse cursor when moving windows become a hand (Björn) [#337376]
|
||||
- lots and lots of compositor improvements -- beginning of a new
|
||||
layer to abstract transition effects, shrinking and minimizing and
|
||||
exploding effects, fading in and out, unminimize animation that
|
||||
reverses minimize one, translucent menus, bounce on window focus,
|
||||
and all kinds of stuff I don't understand and can't summarize well
|
||||
(Søren, Adam)
|
||||
- Fix a crash on exit/logout from assuming a compositor would always
|
||||
exist (Elijah) [#342166]
|
||||
- code cleanup in tabpopup.c (Aidan Delaney) [#166890]
|
||||
|
||||
Translations
|
||||
Pema Geyleg (dz), Iñaki Larrañaga Murgoitio (eu), Theppitak
|
||||
Karoonboonyanan (th), Clytie Siddall (vi)
|
||||
|
||||
2.15.3
|
||||
==
|
||||
|
||||
Thanks to Søren Sandmann, Elijah Newren, Paolo Borelli, Björn
|
||||
Lindqvist, jylefort at FreeBSD org,
|
||||
|
||||
- various code cleanups (Søren)
|
||||
- prevent long titles from "sticking" in the tasklist (Elijah) [#330671]
|
||||
- handle sync counter notifications in the compositor (Søren)
|
||||
- notes/documentation updates (Elijah)
|
||||
- plug a small leak (Paolo)
|
||||
- remove a lot of dead code obsoleted by the new edge-resistance
|
||||
stuff (Björn) [#341561]
|
||||
- prevent a crash when changing resolution (jylefort) [#340847]
|
||||
- revert an accessibility module loading workaround from Gnome 2.6
|
||||
that has long since been fixed for us in gtk+ (Elijah) [#123372]
|
||||
|
||||
Translations
|
||||
Francisco Javier F. Serrador (es), Ignacio Casal Quinteiro (gl),
|
||||
Raivis Dejus (lv), Kjartan Maraas (nb), Funda Wang (zh_CN), Woodman
|
||||
Tuen (zh_HK), Woodman Tuen (zh_TW)
|
||||
|
||||
2.15.2
|
||||
==
|
||||
|
||||
Here's hoping that "third time's a charm." ;-) This release just
|
||||
fixes the translations-not-included issue. See
|
||||
http://mail.gnome.org/archives/desktop-devel-list/2006-April/msg00483.html
|
||||
for more details.
|
||||
|
||||
- Use gnome-autogen.sh like most other modules (Rodney)
|
||||
|
||||
2.15.1
|
||||
==
|
||||
|
||||
This release just fixes the control-center build (which depends upon
|
||||
libmetacity-private). Thanks to Vincent for catching the problem.
|
||||
|
||||
- Include boxes.h in the includes dir (Elijah) [#339708]
|
||||
|
||||
2.15.0
|
||||
==
|
||||
|
||||
|
7
README
7
README
@@ -6,10 +6,11 @@ on UNIX keyboards.
|
||||
The first release of Metacity was version 2.3. Metacity has no need for
|
||||
your petty hangups about version numbers.
|
||||
|
||||
The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-, 2.10.x,
|
||||
2.12.x, 2.14.x.
|
||||
The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-,
|
||||
2.10.x, 2.12.x, 2.14.x, 2.16.x.
|
||||
|
||||
Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x, 2.15.x
|
||||
Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x,
|
||||
2.15.x, 2.17.x.
|
||||
|
||||
COMPILING METACITY
|
||||
===
|
||||
|
144
autogen.sh
144
autogen.sh
@@ -4,140 +4,18 @@
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=metacity
|
||||
TEST_TYPE=-f
|
||||
FILE=src/display.c
|
||||
PKG_NAME="metacity"
|
||||
REQUIRED_AUTOMAKE_VERSION=1.7
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
|
||||
DIE=1
|
||||
(test -f $srcdir/configure.in \
|
||||
&& test -d $srcdir/src) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level metacity directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if automake-1.9 --version < /dev/null > /dev/null 2>&1; then
|
||||
AUTOMAKE=automake-1.9
|
||||
ACLOCAL=aclocal-1.9
|
||||
elif automake-1.8 --version < /dev/null > /dev/null 2>&1; then
|
||||
AUTOMAKE=automake-1.8
|
||||
ACLOCAL=aclocal-1.8
|
||||
elif automake-1.7 --version < /dev/null > /dev/null 2>&1; then
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
else
|
||||
echo
|
||||
echo "You must have automake >= 1.7 installed to compile $PROJECT."
|
||||
echo "Get http://ftp.gnu.org/gnu/automake/automake-1.9.3.tar.bz2"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
|
||||
echo "Get http://ftp.gnu.org/gnu/libtool/libtool-1.5.10.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
which gnome-autogen.sh || {
|
||||
echo "You need to install gnome-common from the GNOME CVS"
|
||||
exit 1
|
||||
}
|
||||
|
||||
CONFIGURE=configure.in
|
||||
if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
|
||||
if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
|
||||
GETTEXTIZE=""
|
||||
else
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
|
||||
GETTEXTIZE="glib-gettextize"
|
||||
GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
|
||||
else
|
||||
GETTEXTIZE="gettextize"
|
||||
GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
|
||||
fi
|
||||
|
||||
$GETTEXTIZE --version < /dev/null > /dev/null 2>&1
|
||||
if test $? -ne 0; then
|
||||
echo
|
||||
echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
|
||||
echo "Get $GETTEXTIZE_URL"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
topdir=`pwd`
|
||||
for coin in .
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
cd $dr
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.in >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.in
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running glib-gettextize... Ignore non-fatal messages."
|
||||
echo "no" | glib-gettextize --force --copy || exit $?
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
|
||||
echo "Running intltoolize..."
|
||||
intltoolize --force --copy --automake || exit $?
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy || exit $?
|
||||
fi
|
||||
|
||||
echo "Running $ACLOCAL $ACLOCAL_FLAGS ..."
|
||||
$ACLOCAL $ACLOCAL_FLAGS || exit $?
|
||||
echo "Running autoconf ..."
|
||||
autoconf || exit $?
|
||||
if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader || exit $?
|
||||
fi
|
||||
echo "Running $AUTOMAKE..."
|
||||
$AUTOMAKE --add-missing --force --gnu || exit $?
|
||||
|
||||
cd $topdir
|
||||
fi
|
||||
done
|
||||
|
||||
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
cd "$ORIGDIR"
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PROJECT || exit $?
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
|
||||
|
29
configure.in
29
configure.in
@@ -1,8 +1,14 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([metacity_major_version], [2])
|
||||
m4_define([metacity_minor_version], [17])
|
||||
# Fibonacci sequence for micro version numbering:
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
AC_INIT([metacity], [2.15.0],
|
||||
m4_define([metacity_micro_version], [0])
|
||||
|
||||
m4_define([metacity_version],
|
||||
[metacity_major_version.metacity_minor_version.metacity_micro_version])
|
||||
AC_INIT([metacity], [metacity_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
|
||||
|
||||
AC_CONFIG_SRCDIR(src/display.c)
|
||||
@@ -101,7 +107,7 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0'
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.10.0 pango >= 1.2.0'
|
||||
|
||||
AC_ARG_ENABLE(gconf,
|
||||
AC_HELP_STRING([--disable-gconf],
|
||||
@@ -483,11 +489,8 @@ AC_OUTPUT
|
||||
|
||||
if test x$enable_gconf = xno; then
|
||||
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
||||
echo "*** Building without GConf"
|
||||
echo "*** This means there's no way to change prefs except"
|
||||
echo "*** hacking source code, at least for now."
|
||||
echo "*** Also, some prefs may have broken defaults."
|
||||
echo "*** Patches needed for a simple no-gconf config file."
|
||||
echo "*** Building without GConf. This means there's no"
|
||||
echo "*** way to change prefs except hacking source code."
|
||||
echo "*** This is intended for embedded systems etc., not for normal use."
|
||||
fi
|
||||
|
||||
@@ -519,5 +522,13 @@ metacity-$VERSION:
|
||||
Render: ${have_xrender}
|
||||
Xcursor: ${have_xcursor}
|
||||
"
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo "Use 2.14.x for stable (gnome-2-14 branch in CVS)"
|
||||
|
||||
METACITY_MINOR_VERSION=metacity_minor_version
|
||||
if test $(( $(echo $METACITY_MINOR_VERSION) %2)) == "1"; then
|
||||
stable_version=$(( ($METACITY_MINOR_VERSION / 2) * 2))
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo -n "Use 2.$stable_version.x for stable "
|
||||
echo "(gnome-2-$stable_version branch in CVS)"
|
||||
else
|
||||
echo "This is the stable branch of metacity"
|
||||
fi
|
||||
|
@@ -9,7 +9,8 @@ basics are easy:
|
||||
Focus method Behavior
|
||||
click When a user clicks on a window, focus it
|
||||
sloppy When an EnterNotify is received, focus the window
|
||||
mouse Same as sloppy, but also defocus on LeaveNotify
|
||||
mouse Same as sloppy, but also defocus when mouse enters DESKTOP
|
||||
window
|
||||
|
||||
Note that these choices (along with the choice that clicking on a
|
||||
window raises it for the click focus method) introduces the following
|
||||
@@ -20,8 +21,9 @@ 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 window, then it is focused; otherwise,
|
||||
the designated "no_focus_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
|
||||
|
||||
However, there are a number of cases where the current focus window
|
||||
becomes invalid and another should be chosen. Some examples are when
|
||||
@@ -34,8 +36,10 @@ 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 window containing the pointer if there is one,
|
||||
otherwise focus the designated "no_focus_window".
|
||||
|
||||
mouse Focus the non-DESKTOP window containing the pointer if
|
||||
there is one, otherwise focus the designated
|
||||
"no_focus_window".
|
||||
|
||||
Note that "most recently used window", as used here, has a slightly
|
||||
different connotation than "most recent to have keyboard focus". This
|
||||
@@ -123,6 +127,7 @@ To read more about the bugs that inspired these choices:
|
||||
- Mousenav vs. Keynav in mouse and sloppy focus modes
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=167545
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=101190
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=357695
|
||||
- Not focusing panels
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=160470
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=120100
|
||||
|
@@ -1,6 +1,91 @@
|
||||
Docs on the theme format
|
||||
Themes are in a simple XML-subset format. There are multiple versions
|
||||
of the theme format, and a given theme can support more than one format.
|
||||
|
||||
Themes are in a simple XML-subset format.
|
||||
Version 1: THEMEDIR/metacity-1/metacity-theme-1.xml
|
||||
(original metacity format)
|
||||
Version 2: THEMEDIR/metacity-1/metacity-theme-2.xml
|
||||
|
||||
The subdirectory name is "metacity-1" in all versions.
|
||||
|
||||
As you might expect, older versions of metacity will not understand
|
||||
newer theme formats. However, newer versions will use old themes.
|
||||
Metacity will always use the newest theme format it understands that
|
||||
the X server supports. Some format versions are only supported if you
|
||||
have the right X server features.
|
||||
|
||||
Each format *requires* the corresponding filename. If you put version
|
||||
2 format features in the metacity-1/metacity-theme-1.xml file, then
|
||||
metacity will get angry.
|
||||
|
||||
This document has separate sections for each format version. You may
|
||||
want to read the document in reverse order, since the base features
|
||||
are discussed under version 1.
|
||||
|
||||
New Features in Theme Format Version 2
|
||||
======================================
|
||||
|
||||
The optional attributes rounded_top_left, rounded_top_right,
|
||||
rounded_bottom_left and rounded_bottom_right on <frame_geometry>
|
||||
should now be the radius of the corner in pixels. You may still use
|
||||
the values "false" for 0 and "true" for 5, which means v1 values will
|
||||
still work just fine.
|
||||
|
||||
<frame_geometry> has a new optional attribute, hide_buttons. If this
|
||||
is true, no buttons will be displayed on the titlebar.
|
||||
|
||||
Anywhere you can use a positive integer, you can use an integer constant.
|
||||
|
||||
As well as constant integers and reals, you may define constant colours,
|
||||
thus:
|
||||
<constant name="RevoltingPink" value="#FF00FF"/>
|
||||
<constant name="Background" value="gtk:bg[NORMAL]"/>
|
||||
|
||||
<frame_style> has two new optional attributes, background and alpha.
|
||||
If you specify alpha, you must specify background. background is a
|
||||
colour used for the background of the frame. alpha is the transparency
|
||||
as a real between 0.0 and 1.0. If the current X server does not support
|
||||
alpha channels, the value is ignored.
|
||||
|
||||
The filename attribute of <image> may begin with "theme:". If so, the
|
||||
rest of the string is the name of a theme icon. The 64x64 version of the
|
||||
icon is used, except for fallback mini_icons, which use the 16x16 version.
|
||||
This does not affect ordinary resizing. For example:
|
||||
<button function="close" state="normal">
|
||||
<draw_ops>
|
||||
<include name="active_button"/>
|
||||
<image filename="theme:gnome-logout" x="2" y="2"
|
||||
width="width-4" height="height-4"/>
|
||||
<!-- Note: not "theme:gnome-logout.png" or similar. -->
|
||||
</draw_ops>
|
||||
</button>
|
||||
|
||||
<menu_icon>s are parsed but ignored.
|
||||
|
||||
Fallback icons can be specified using <fallback>. There are two
|
||||
optional arguments, icon and mini_icon. The values of these arguments
|
||||
are identical to that of the filename attribute of <image>. Fallback
|
||||
icons are used when a window does not supply its own icon. If a fallback
|
||||
icon is not specified with <fallback>, Metacity will use a built-in
|
||||
icon, as in metacity-theme-1.
|
||||
|
||||
The <arc> element, as well as the original start_angle and end_angle
|
||||
attributes, may be given from and to attributes. The values of these
|
||||
attributes are given in degrees clockwise, with 0 being straight up.
|
||||
For example:
|
||||
<arc from="0.0" to="90.0" filled="true" color="#FF00FF"
|
||||
x="0" y="5" width="15" height="15"/>
|
||||
|
||||
<frame state="shaded"> may now take an optional resize attribute, with
|
||||
the same interpretation as the resize attribute on <frame state="normal">.
|
||||
If this attribute is omitted for state="shaded", it defaults to "both".
|
||||
(If it is omitted for state="normal", it remains an error.)
|
||||
|
||||
In addition to the four <button> functions which are required in
|
||||
metacity-theme-1, there are six new functions in metacity-theme-2:
|
||||
shade, unshade, above, unabove, stick and unstick.
|
||||
|
||||
Overview of Theme Format Version 1
|
||||
==================================
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<metacity_theme>
|
||||
|
@@ -9,3 +9,4 @@ cat-id-tbl.c
|
||||
messages
|
||||
missing
|
||||
stamp-cat-id
|
||||
stamp-it
|
||||
|
410
po/ChangeLog
410
po/ChangeLog
@@ -1,3 +1,294 @@
|
||||
2006-10-02 Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2006-09-29 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation with
|
||||
bugfixes prompted by Yavor Doganov
|
||||
|
||||
2006-09-21 Gabor Kelemen <kelemeng@gnome.hu>
|
||||
|
||||
* hu.po: Translation updated.
|
||||
|
||||
2006-09-19 Runa Bhattacharjee <runabh@gmail.com>
|
||||
|
||||
* bn_IN.po: Updated Bengali India Translation.
|
||||
|
||||
2006-09-15 Wouter Bolsterlee <wbolster@gnome.org>
|
||||
|
||||
* nl.po: Translation updated by Wouter Bolsterlee.
|
||||
|
||||
2006-09-15 Matic Zgur <mr.zgur@gmail.com>
|
||||
|
||||
* sl.po: Updated Slovenian translation.
|
||||
|
||||
2006-09-14 Francisco Javier F. Serrador <serrador@openshine.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2006-09-14 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Alexander Shopov <ash@contact.bg>
|
||||
|
||||
2006-09-13 Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2006-09-13 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
- concistency fixes with libwnck
|
||||
|
||||
2006-09-13 Rajesh Ranjan <rajeshkajha@yahoo.com>
|
||||
|
||||
* hi.po: Updated Hindi Translation.
|
||||
|
||||
2006-09-13 Abel Cheung <abel@oaka.org>
|
||||
|
||||
* zh_HK.po: Updated Chinese (Hong Kong) translation.
|
||||
* zh_TW.po: Updated Chinese (Taiwan) translation.
|
||||
|
||||
2006-09-13 Ani Peter <peter.ani@gmail.com>
|
||||
|
||||
* ml.po: Updated Malayalam translation
|
||||
|
||||
2006-09-13 I.Felix <ifelix25@gmail.com>
|
||||
|
||||
* ta.po: Updated Tamil Translation.
|
||||
|
||||
2006-09-13 Ankit Patel <ankit644@yahoo.com>
|
||||
|
||||
* gu.po: Updated Gujarati Translation.
|
||||
|
||||
2006-09-13 Ahmad Riza H Nst <rizahnst@eriagempita.co.id>
|
||||
|
||||
* id.po: Updated.
|
||||
|
||||
2006-09-10 David Lodge <dave@cirt.net>
|
||||
|
||||
* en_GB.po: Updated English (British) translation.
|
||||
|
||||
2006-09-08 Priit Laes <plaes@cvs.gnome.org>
|
||||
|
||||
* et.po: Translation updated by Ivar Smolin.
|
||||
|
||||
2006-09-07 Matic Zgur <mr.zgur@gmail.com>
|
||||
|
||||
* sl.po: Updated Slovenian translation.
|
||||
|
||||
2006-09-04 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
|
||||
|
||||
* ru.po: Updated Russian translation by
|
||||
Vasiliy Faronov <qvvx@yandex.ru>.
|
||||
|
||||
2006-09-04 Rahul Bhalerao <b.rahul.pm@gmail.com>
|
||||
|
||||
* mr.po: Updated Marathi translations.
|
||||
|
||||
2006-09-04 Runa Bhattacharjee <runabh@gmail.com>
|
||||
|
||||
* bn_IN.po: Modified the accelerators to English.
|
||||
|
||||
2006-09-04 Abel Cheung <abel@oaka.org>
|
||||
|
||||
* zh_HK.po: Updated Chinese (Hong Kong) translation from
|
||||
Woodman Tuen <wmtuen@gmail.com>.
|
||||
* zh_TW.po: Updated Chinese (Taiwan) translation from
|
||||
Woodman Tuen <wmtuen@gmail.com>.
|
||||
|
||||
2006-09-04 Kostas Papadimas <pkst@gnome.org>
|
||||
|
||||
* el.po: Updated Greek translation.
|
||||
|
||||
2006-09-04 Ani Peter <peter.ani@gmail.com>
|
||||
|
||||
* ml.po: Updated Malayalam translation
|
||||
|
||||
2006-09-04 Rahul Bhalerao <b.rahul.pm@gmail.com>
|
||||
|
||||
* 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
|
||||
Jonathan Ernst <jonathan@ernstfamily.ch>.
|
||||
|
||||
2006-09-03 Danilo Šegan <danilo@gnome.org>
|
||||
|
||||
* sr.po, sr@Latn.po: Updated by Goran Rakić.
|
||||
|
||||
2006-09-03 Gabor Kelemen <kelemeng@gnome.hu>
|
||||
|
||||
* hu.po: Translation updated.
|
||||
|
||||
2006-09-03 Gabor Kelemen <kelemeng@gnome.hu>
|
||||
|
||||
* hu.po: Translation updated.
|
||||
|
||||
2006-09-01 Maxim Dziumanenko <dziumanenko@gmail.com>
|
||||
|
||||
* uk.po: Update Ukrainian translation.
|
||||
|
||||
2006-09-01 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
|
||||
2006-08-30 Josep Puigdemont i Casamajó <josep.puigdemont@gmail.com>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2006-08-27 Gintautas Miliauskas <gintas@akl.lt>
|
||||
|
||||
* lt.po: Updated Lithuanian translation.
|
||||
|
||||
2006-08-20 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2006-08-19 Ahmad Riza H Nst <rizahnst@eriagempita.co.id>
|
||||
|
||||
* id.po: Updated.
|
||||
|
||||
2006-08-18 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Alexander Shopov <ash@contact.bg>
|
||||
|
||||
2006-08-17 Jordi Mas <jmas@softcatala.org>
|
||||
|
||||
* ca.po: Fixes small mistakes in Catalan translation
|
||||
|
||||
2006-08-16 Gabor Kelemen <kelemeng@gnome.hu>
|
||||
|
||||
* hu.po: Translation updated.
|
||||
|
||||
2006-08-13 Wouter Bolsterlee <uws+gnome@xs4all.nl>
|
||||
|
||||
* nl.po: Translation updated by Wouter Bolsterlee.
|
||||
|
||||
2006-08-09 Funda Wang <fundawang@linux.net.cn>
|
||||
|
||||
* zh_CN.po: Updated Simplified Chinese translation.
|
||||
|
||||
2006-08-08 Wouter Bolsterlee <uws+gnome@xs4all.nl>
|
||||
|
||||
* nl.po: Translation updated by Wouter Bolsterlee.
|
||||
|
||||
2006-08-07 Leonid Kanter <leon@asplinux.ru>
|
||||
|
||||
* ru.po: Updated Russian translation
|
||||
|
||||
2006-08-07 Inaki Larranaga <dooteo@euskalgnu.org>
|
||||
|
||||
* eu.po: Fixed some typos.
|
||||
|
||||
2006-08-03 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2006-08-03 Yair Hershkovitz <yairhr@gmail.com>
|
||||
|
||||
* he.po: Updated Hebrew translation.
|
||||
|
||||
2006-08-02 Jovan Naumovski <jovan@lugola.net>
|
||||
|
||||
* mk.po: Updated Macedonian translation.
|
||||
|
||||
2006-07-31 Jakub Friedl <jfriedl@suse.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2006-07-23 Satoru SATOH <ss@gnome.gr.jp>
|
||||
|
||||
* ja.po: Updated Japanese translation.
|
||||
|
||||
2006-07-22 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation from
|
||||
Jonathan Ernst <jonathan@ernstfamily.ch>.
|
||||
|
||||
2006-07-22 Kostas Papadimas <pkst@gnome.org>
|
||||
|
||||
* el.po: Updated Greek translation
|
||||
|
||||
2006-07-21 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation from
|
||||
Jonathan Ernst <jonathan@ernstfamily.ch>.
|
||||
|
||||
2006-07-18 Hendrik Richter <hendrikr@gnome.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2006-07-03 Runa Bhattacharjee <runabh@gmail.com>
|
||||
|
||||
* bn_IN.po: Added Bengali India Translation
|
||||
* LINGUAS: Added Bengali India (bn_IN) to the list of languages.
|
||||
|
||||
2006-07-03 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2006-06-29 Thierry Randrianiriana <thierryR@cvs.gnome.org>
|
||||
|
||||
* mg.po: Added Malagasy translation
|
||||
|
||||
2006-06-28 Rajesh Ranjan <rajeshkajha@yahoo.com>
|
||||
|
||||
* hi.po: Updated Hindi Translation.
|
||||
|
||||
2006-06-27 Rajesh Ranjan <rajeshkajha@yahoo.com>
|
||||
|
||||
* hi.po: Updated Hindi Translation.
|
||||
|
||||
2006-06-26 Rajesh Ranjan <rajeshkajha@yahoo.com>
|
||||
|
||||
* hi.po: Updated Hindi Translation.
|
||||
|
||||
2006-05-28 Pema Geyleg <pema.geyleg@gmail.com>
|
||||
|
||||
* dz.po: Updated Dzongkha translation.
|
||||
|
||||
2006-05-26 Clytie Siddall <clytie@riverland.net.au>
|
||||
|
||||
* vi.po: Updated Vietnamese translation.
|
||||
|
||||
2006-05-25 Inaki Larranaga <dooteo@euskalgnu.org>
|
||||
|
||||
* eu.po: Updated Basque translation.
|
||||
|
||||
2006-05-23 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
|
||||
2006-05-14 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).
|
||||
|
||||
2006-05-10 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
|
||||
|
||||
* gl.po: Updated Galician Translation.
|
||||
|
||||
2006-05-06 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2006-05-02 Funda Wang <fundawang@linux.net.cn>
|
||||
|
||||
* zh_CN.po: Updated Simplified Chinese translation.
|
||||
|
||||
2006-04-30 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2006-04-26 Gora Mohanty <gmohanty@cvs.gnome.org>
|
||||
|
||||
* lv.po: Updated Latvian translation by Raivis Dejus <orvils@gmail.com>
|
||||
|
||||
2006-04-21 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
@@ -35,7 +326,7 @@
|
||||
* nn.po: Updated Norwegian Nynorsk translation.
|
||||
|
||||
2006-04-14 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2006-04-14 Wouter Bolsterlee <uws+gnome@xs4all.nl>
|
||||
@@ -238,7 +529,7 @@
|
||||
2006-02-23 Clytie Siddall <clytie@riverland.net.au>
|
||||
|
||||
* ka.po: Added Georgian translation by Alexander Didebulidze <didebuli@in.tum.de>.
|
||||
|
||||
|
||||
2006-02-23 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
@@ -562,7 +853,7 @@
|
||||
2005-09-04 Danilo Šegan <danilo@gnome.org>
|
||||
|
||||
* hy.po: Added Armenian translation by Norayr Chilingaryan
|
||||
<asprayama@yahoo.com>.
|
||||
<asprayama@yahoo.com>.
|
||||
|
||||
2005-09-04 Ignacio Casal Quinteiro <nacho.resa@gmail.com>
|
||||
|
||||
@@ -955,9 +1246,9 @@
|
||||
* no.po: Update
|
||||
|
||||
2005-02-07 David Lodge <dave@cirt.net>
|
||||
|
||||
|
||||
* en_GB.po: Updated British translation.
|
||||
|
||||
|
||||
2005-02-06 Adam Weinberger <adamw@gnome.org>
|
||||
|
||||
* en_CA.po: Updated Canadian English translation.
|
||||
@@ -1152,9 +1443,9 @@
|
||||
* en_CA.po: Updated Canadian English translation.
|
||||
|
||||
2004-10-13 David Lodge <dave@cirt.net>
|
||||
|
||||
* en_GB.po: Updated British English translation.
|
||||
|
||||
|
||||
* en_GB.po: Updated British English translation.
|
||||
|
||||
2004-09-26 Adam Weinberger <adamw@gnome.org>
|
||||
|
||||
* en_CA.po: Updated Canadian English translation.
|
||||
@@ -1165,9 +1456,9 @@
|
||||
Luca Ferretti <elle.uca@infinito.it>.
|
||||
|
||||
2004-09-14 Gora Mohanty <gmohanty@cvs.gnome.org>
|
||||
|
||||
|
||||
* or.po: Updated Oriya translation.
|
||||
|
||||
|
||||
2004-09-12 Paisa Seeluangsawat <paisa@users.sf.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
@@ -1207,7 +1498,7 @@
|
||||
2004-09-03 Baris Cicek <baris@teamforce.name.tr>
|
||||
|
||||
* tr.po: Updated Turkish Translation
|
||||
|
||||
|
||||
2004-08-31 Åsmund Skjæveland <aasmunds@fys.uio.no>
|
||||
|
||||
* nn.po: Updated Norwegian Nynorsk translation.
|
||||
@@ -1221,7 +1512,7 @@
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2004-08-26 Iñaki Larrañaga <dooteo@euskalgnu.org>
|
||||
|
||||
|
||||
* eu.po: Updated Basque translation.
|
||||
|
||||
2004-08-23 Maxim Dziumanenko <mvd@mylinux.com.ua>
|
||||
@@ -1345,7 +1636,7 @@
|
||||
|
||||
2004-07-24 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2004-07-23 Miloslav Trmac <mitr@volny.cz>
|
||||
|
||||
@@ -1376,7 +1667,7 @@
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Vladimir "Kaladan" Petkov <vpetkov@i-space.org>
|
||||
|
||||
|
||||
2004-07-07 Laszlo Dvornik <ldvornik@cvs.gnome.org>
|
||||
|
||||
* hu.po: Updated Hungarian translation.
|
||||
@@ -1587,7 +1878,7 @@
|
||||
* no.po: Updated Norwegian translation.
|
||||
|
||||
2004-02-07 Robert Sedak <robert.sedak@sk.htnet.hr>
|
||||
|
||||
|
||||
* hr.po: Updated Croatian translation.
|
||||
|
||||
2004-02-08 Changwoo Ryu <cwryu@debian.org>
|
||||
@@ -1673,7 +1964,7 @@
|
||||
2004-01-02 Sanlig Badral <Badral@openmn.org>
|
||||
|
||||
* mn.po: Updated Mongolian translation.
|
||||
|
||||
|
||||
2004-01-02 Taneem Ahmed <taneem@bengalinux.org>
|
||||
|
||||
* bn.po: Updated Bangla (Bengali) translation.
|
||||
@@ -1736,7 +2027,7 @@
|
||||
|
||||
2003-12-03 Sanlig Badral <badral@openmn.org>
|
||||
|
||||
* mn.po: Updated Mongolian translation.
|
||||
* mn.po: Updated Mongolian translation.
|
||||
|
||||
2003-12-02 Miloslav Trmac <mitr@volny.cz>
|
||||
|
||||
@@ -1754,7 +2045,7 @@
|
||||
|
||||
* es.po: Updated Spanish translation by
|
||||
Francisco Javier F. Serrador <serrador@arrakis.es>.
|
||||
|
||||
|
||||
2003-11-08 Danilo Šegan <dsegan@gmx.net>
|
||||
|
||||
* sr.po, sr@Latn.po: Updated Serbian translation.
|
||||
@@ -1898,7 +2189,7 @@
|
||||
|
||||
2003-08-26 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
* ko.po: Updated Korean translation by
|
||||
* ko.po: Updated Korean translation by
|
||||
Young-Ho Cha <ganadist at mizi.com>.
|
||||
|
||||
2003-08-24 Changwoo Ryu <cwryu@debian.org>
|
||||
@@ -1920,7 +2211,7 @@
|
||||
2003-08-18 Danilo Å egan <dsegan@gmx.net>
|
||||
|
||||
* be.po: Updated Belarusian translation by Ales Nyakhaychyk
|
||||
<nab@mail.by>.
|
||||
<nab@mail.by>.
|
||||
|
||||
2003-08-18 Metin Amiroff <metin@karegen.com>
|
||||
|
||||
@@ -2102,7 +2393,7 @@
|
||||
2003-05-30 Paul Duffy <dubhthach@frink.nuigalway.ie>
|
||||
|
||||
* ga.po: Updated Irish Translation.
|
||||
|
||||
|
||||
2003-05-30 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* zh_TW.po: Updated traditional Chinese translation.
|
||||
@@ -2121,7 +2412,7 @@
|
||||
|
||||
2003-05-19 Telsa Gwymme <hobbit@aloss.ukuu.org.uk>
|
||||
|
||||
* cy.po: Updated Welsh translation from
|
||||
* cy.po: Updated Welsh translation from
|
||||
Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
2003-05-19 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
@@ -2130,7 +2421,7 @@
|
||||
|
||||
2003-05-16 Telsa Gwynne <hobbit@aloss.ukuu.org.uk>
|
||||
|
||||
* cy.po: Added Welsh translation from
|
||||
* cy.po: Added Welsh translation from
|
||||
Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
2003-05-16 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
@@ -2150,7 +2441,7 @@
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-05-09 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
|
||||
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation.
|
||||
|
||||
2003-05-08 Christian Rose <menthos@menthos.com>
|
||||
@@ -2163,7 +2454,7 @@
|
||||
|
||||
2003-05-06 Danilo Å egan <dsegan@gmx.net>
|
||||
|
||||
* sr.po, sr@Latn.po: Added Serbian translation by
|
||||
* sr.po, sr@Latn.po: Added Serbian translation by
|
||||
http://Prevod.org/.
|
||||
|
||||
2003-04-29 Miloslav Trmac <mitr@volny.cz>
|
||||
@@ -2239,7 +2530,7 @@
|
||||
2003-02-03 Daniel Yacob <locales@geez.org>
|
||||
|
||||
* am.po: Updated Amharic translation.
|
||||
|
||||
|
||||
2003-01-30 Marius Andreiana <marius galuna.ro>
|
||||
|
||||
* ro.po: updated ( thanks to Mugurel Tudor )
|
||||
@@ -2252,7 +2543,7 @@
|
||||
2003-01-25 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmal) translation.
|
||||
|
||||
|
||||
2003-01-23 He Qiangqiang <carton@linux.net.cn>
|
||||
|
||||
* zh_CN.po: Updated Simplified Chinese translation by
|
||||
@@ -2280,7 +2571,7 @@
|
||||
2003-01-21 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmal) translation.
|
||||
|
||||
|
||||
2003-01-20 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
@@ -2325,7 +2616,7 @@
|
||||
2003-01-11 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmal) translation.
|
||||
|
||||
|
||||
2003-01-10 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
|
||||
|
||||
* nl.po: Dutch translation updated by Tino Meinen.
|
||||
@@ -2374,7 +2665,7 @@
|
||||
2003-01-03 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmal) translation.
|
||||
|
||||
|
||||
2003-01-02 Zbigniew Chyla <cyba@gnome.pl>
|
||||
|
||||
* pl.po: Updated Polish translation by
|
||||
@@ -2456,7 +2747,7 @@
|
||||
2002-12-14 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-12-13 Daniel Yacob <locales@geez.org>
|
||||
|
||||
* am.po: Added Amharic translation.
|
||||
@@ -2493,11 +2784,11 @@
|
||||
2002-11-25 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-11-25 Yanko Kaneti <yaneti@declera.com>
|
||||
|
||||
* *.po: Convert all to UTF-8.
|
||||
|
||||
|
||||
2002-11-24 Kostas Papadimas <pkst@gmx.net>
|
||||
|
||||
* el.po: Updated Greek translation.
|
||||
@@ -2513,7 +2804,7 @@
|
||||
2002-11-15 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-11-14 Gustavo Noronha Silva <kov@debian.org>
|
||||
|
||||
* pt_BR.po: Update translation.
|
||||
@@ -2580,7 +2871,7 @@
|
||||
2002-10-21 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-10-17 Andras Timar <timar@gnome.hu>
|
||||
|
||||
* hu.po: Added Hungarian translation.
|
||||
@@ -2604,7 +2895,7 @@
|
||||
2002-10-15 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-10-15 Ole Laursen <olau@hardworking.dk>
|
||||
|
||||
* da.po: Updated Danish translation.
|
||||
@@ -2668,7 +2959,7 @@
|
||||
2002-09-11 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-09-10 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
@@ -2835,7 +3126,7 @@
|
||||
|
||||
2002-08-05 He Qiangqiang <carton@linux.net.cn>
|
||||
|
||||
* zh_CN.po: Added simplified Chinese translation from
|
||||
* zh_CN.po: Added simplified Chinese translation from
|
||||
Sun G11n <gnome_int_l10n@ireland.sun.com>.
|
||||
|
||||
2002-08-05 Christian Rose <menthos@menthos.com>
|
||||
@@ -2845,7 +3136,7 @@
|
||||
2002-08-04 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-07-30 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
* vi.po: Updated Vietnamese file
|
||||
@@ -2902,7 +3193,7 @@
|
||||
2002-07-16 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-07-15 Ole Laursen <olau@hardworking.dk>
|
||||
|
||||
* da.po: Fixed a string.
|
||||
@@ -2951,7 +3242,7 @@
|
||||
2002-06-23 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-06-23 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
@@ -3029,7 +3320,7 @@
|
||||
2002-06-03 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-06-03 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
|
||||
|
||||
* sk.po: Updated Slovak translation.
|
||||
@@ -3054,7 +3345,7 @@
|
||||
2002-05-31 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-05-28 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
@@ -3101,7 +3392,7 @@
|
||||
2002-05-18 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-05-18 Ole Laursen <olau@hardworking.dk>
|
||||
|
||||
* da.po: Updated Danish translation.
|
||||
@@ -3127,7 +3418,7 @@
|
||||
2002-04-22 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-04-19 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
* ko.po: Updated Korean translation from Young-Ho Cha
|
||||
@@ -3155,11 +3446,11 @@
|
||||
2002-03-28 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-03-27 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-03-22 Zbigniew Chyla <cyba@gnome.pl>
|
||||
|
||||
* pl.po: Added Polish translation.
|
||||
@@ -3167,19 +3458,19 @@
|
||||
2002-02-22 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-02-17 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-02-16 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-02-12 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-02-11 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
@@ -3191,7 +3482,7 @@
|
||||
2002-02-10 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-02-08 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
@@ -3208,7 +3499,7 @@
|
||||
2002-02-02 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-01-31 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
@@ -3224,7 +3515,7 @@
|
||||
2002-01-29 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-01-27 Peteris Krisjanis <peteris.krisjanis@ttc.lv>
|
||||
|
||||
* lv.po: Added Latvian translation.
|
||||
@@ -3236,7 +3527,7 @@
|
||||
2002-01-11 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmål) translation.
|
||||
|
||||
|
||||
2002-01-09 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
|
||||
|
||||
* sk.po: Updated Slovak translation.
|
||||
@@ -3266,11 +3557,11 @@
|
||||
2001-12-26 Vasif Ismailogu MD <azerb_linux@hotmail.com>
|
||||
|
||||
* az.po: updating Azerbaijani translation file
|
||||
|
||||
|
||||
2001-12-16 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmï¿Å) translation.
|
||||
|
||||
|
||||
2001-12-15 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
@@ -3291,11 +3582,11 @@
|
||||
2001-10-29 Yuriy Syrota <rasta@renome.rovno.ua>
|
||||
|
||||
* uk.po: Added Ukrainian translation file.
|
||||
|
||||
|
||||
2001-10-28 Hï¿Åtor Garcᅧï¿Åvarez <hector@scouts-es.org>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
|
||||
2001-10-14 Hï¿Åtor Garcᅧï¿Åvarez <hector@scouts-es.org>
|
||||
|
||||
* es.po: Added Spanish translation.
|
||||
@@ -3314,4 +3605,3 @@
|
||||
* sv.po: Added Swedish translation.
|
||||
* POTFILES.in: Added files.
|
||||
* .cvsignore: Added messages and *.pot.
|
||||
|
||||
|
@@ -6,12 +6,14 @@ az
|
||||
be
|
||||
bg
|
||||
bn
|
||||
bn_IN
|
||||
bs
|
||||
ca
|
||||
cs
|
||||
cy
|
||||
da
|
||||
de
|
||||
dz
|
||||
el
|
||||
en_CA
|
||||
en_GB
|
||||
@@ -33,13 +35,16 @@ id
|
||||
is
|
||||
it
|
||||
ja
|
||||
ka
|
||||
ko
|
||||
ku
|
||||
lt
|
||||
lv
|
||||
mg
|
||||
mk
|
||||
ml
|
||||
mn
|
||||
mr
|
||||
ms
|
||||
nb
|
||||
ne
|
||||
@@ -53,8 +58,8 @@ pt_BR
|
||||
ro
|
||||
ru
|
||||
rw
|
||||
sl
|
||||
sk
|
||||
sl
|
||||
sq
|
||||
sr
|
||||
sr@Latn
|
||||
@@ -68,4 +73,5 @@ vi
|
||||
wa
|
||||
xh
|
||||
zh_CN
|
||||
zh_HK
|
||||
zh_TW
|
||||
|
2843
po/bn_IN.po
Normal file
2843
po/bn_IN.po
Normal file
File diff suppressed because it is too large
Load Diff
2571
po/en_GB.po
2571
po/en_GB.po
File diff suppressed because it is too large
Load Diff
51
po/et.po
51
po/et.po
@@ -12,7 +12,7 @@ msgstr ""
|
||||
"Project-Id-Version: metacity HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-03-11 23:18+0100\n"
|
||||
"PO-Revision-Date: 2006-03-20 20:35+0200\n"
|
||||
"PO-Revision-Date: 2006-09-08 08:00+0300\n"
|
||||
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
|
||||
"Language-Team: Estonian <gnome-et@linux.ee>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -412,7 +412,7 @@ msgstr "Pealkirjariba topeltklõpsamisel tehtav tegevus"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:4
|
||||
msgid "Activate window menu"
|
||||
msgstr "Aktiveeri aknamenüü"
|
||||
msgstr "Aknamenüü aktiveerimine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:5
|
||||
msgid "Arrangement of buttons on the titlebar"
|
||||
@@ -603,67 +603,67 @@ msgstr "Teisalda aken"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:40
|
||||
msgid "Move window one workspace down"
|
||||
msgstr ""
|
||||
msgstr "Akna tõstmine ühe tööala võrra allapoole"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:41
|
||||
msgid "Move window one workspace to the left"
|
||||
msgstr ""
|
||||
msgstr "Akna tõstmine ühe tööala võrra vasakule"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:42
|
||||
msgid "Move window one workspace to the right"
|
||||
msgstr ""
|
||||
msgstr "Akna tõstmine ühe tööala võrra paremale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:43
|
||||
msgid "Move window one workspace up"
|
||||
msgstr ""
|
||||
msgstr "Akna tõstmine ühe tööala võrra ülespoole"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:44
|
||||
msgid "Move window to workspace 1"
|
||||
msgstr "Tõsta aken 1. tööalale"
|
||||
msgstr "Akna tõstmine 1. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:45
|
||||
msgid "Move window to workspace 10"
|
||||
msgstr "Tõsta aken 10. tööalale"
|
||||
msgstr "Akna tõstmine 10. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:46
|
||||
msgid "Move window to workspace 11"
|
||||
msgstr "Tõsta aken 11. tööalale"
|
||||
msgstr "Akna tõstmine 11. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:47
|
||||
msgid "Move window to workspace 12"
|
||||
msgstr "Tõsta aken 12. tööalale"
|
||||
msgstr "Akna tõstmine 12. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:48
|
||||
msgid "Move window to workspace 2"
|
||||
msgstr "Tõsta aken 2. tööalale"
|
||||
msgstr "Akna tõstmine 2. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:49
|
||||
msgid "Move window to workspace 3"
|
||||
msgstr "Tõsta aken 3. tööalale"
|
||||
msgstr "Akna tõstmine 3. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:50
|
||||
msgid "Move window to workspace 4"
|
||||
msgstr "Tõsta aken 4. tööalale"
|
||||
msgstr "Akna tõstmine 4. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:51
|
||||
msgid "Move window to workspace 5"
|
||||
msgstr "Tõsta aken 5. tööalale"
|
||||
msgstr "Akna tõstmine 5. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:52
|
||||
msgid "Move window to workspace 6"
|
||||
msgstr "Tõsta aken 6. tööalale"
|
||||
msgstr "Akna tõstmine 6. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:53
|
||||
msgid "Move window to workspace 7"
|
||||
msgstr "Tõsta aken 7. tööalale"
|
||||
msgstr "Akna tõstmine 7. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:54
|
||||
msgid "Move window to workspace 8"
|
||||
msgstr "Tõsta aken 8. tööalale"
|
||||
msgstr "Akna tõstmine 8. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:55
|
||||
msgid "Move window to workspace 9"
|
||||
msgstr "Tõsta aken 9. tööalale"
|
||||
msgstr "Akna tõstmine 9. tööalale"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:56
|
||||
msgid "Name of workspace"
|
||||
@@ -701,7 +701,7 @@ msgstr "Käivita defineeritud käsk"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:63
|
||||
msgid "Run a terminal"
|
||||
msgstr "Käivita terminal"
|
||||
msgstr "Terminali käivitamine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:64
|
||||
msgid "Show the panel menu"
|
||||
@@ -709,7 +709,7 @@ msgstr "Paneelimenüü näitamine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:65
|
||||
msgid "Show the panel run application dialog"
|
||||
msgstr ""
|
||||
msgstr "Paneeli rakenduste käivitamise dialoogi näitamine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:66
|
||||
msgid ""
|
||||
@@ -1491,11 +1491,11 @@ msgstr ""
|
||||
|
||||
#: ../src/metacity.schemas.in.h:162
|
||||
msgid "Toggle fullscreen mode"
|
||||
msgstr ""
|
||||
msgstr "Täisekraanivaate sisse- ja väljalülitamine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:163
|
||||
msgid "Toggle maximization state"
|
||||
msgstr ""
|
||||
msgstr "Maksimeeritud oleku sisse- ja väljalülitamine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:164
|
||||
msgid "Toggle shaded state"
|
||||
@@ -2739,10 +2739,3 @@ msgstr ""
|
||||
msgid ""
|
||||
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "metacity [--sm-disable] [--sm-client-id=ID] [--sm-save-file=FILENAME] [--"
|
||||
#~ "display=DISPLAY] [--replace] [--version]\n"
|
||||
#~ msgstr ""
|
||||
#~ "metacity [--sm-disable] [--sm-client-id=ID] [--sm-save-file=FAILINIMI] [--"
|
||||
#~ "display=KUVA] [--replace] [--version]\n"
|
||||
|
173
po/gu.po
173
po/gu.po
@@ -4,8 +4,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity.HEAD.gu\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-04-20 06:45+0200\n"
|
||||
"PO-Revision-Date: 2006-04-20 13:00+0530\n"
|
||||
"POT-Creation-Date: 2006-09-13 00:49+0200\n"
|
||||
"PO-Revision-Date: 2006-09-13 11:27+0530\n"
|
||||
"Last-Translator: Ankit Patel <ankit644@yahoo.com>\n"
|
||||
"Language-Team: Gujarati <indianoss-gujarati@lists.sourceforge.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -19,6 +19,7 @@ msgstr ""
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
"\n"
|
||||
|
||||
#: ../src/tools/metacity-message.c:150
|
||||
#, c-format
|
||||
@@ -29,13 +30,13 @@ msgstr "વપરાશ: %s\n"
|
||||
msgid "Metacity was compiled without support for verbose mode\n"
|
||||
msgstr "મેટાસીટીને વર્ણનિય પદ્ધતિના આધાર વગર કમ્પાઈલ કરાયુ હતુ\n"
|
||||
|
||||
#: ../src/delete.c:64 ../src/delete.c:91 ../src/metacity-dialog.c:71
|
||||
#: ../src/delete.c:64 ../src/delete.c:91 ../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:71 ../src/delete.c:98 ../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\""
|
||||
@@ -61,7 +62,7 @@ msgstr "કાર્યક્રમને મૃત કરવા માટે
|
||||
msgid "Failed to get hostname: %s\n"
|
||||
msgstr "યજમાનનું નામ મેળવવામાં નિષ્ફળ: %s\n"
|
||||
|
||||
#: ../src/display.c:354
|
||||
#: ../src/display.c:344
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "X વિન્ડો સિસ્ટમ ડિસ્પ્લે '%s' ને ખોલવામાં નિષ્ફળ\n"
|
||||
@@ -82,48 +83,48 @@ msgstr ""
|
||||
msgid "Fatal IO error %d (%s) on display '%s'.\n"
|
||||
msgstr "ઘાતક IO ભૂલ %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"
|
||||
|
||||
#: ../src/main.c:70
|
||||
#: ../src/main.c:65
|
||||
#, c-format
|
||||
msgid ""
|
||||
"metacity %s\n"
|
||||
@@ -138,48 +139,48 @@ msgstr ""
|
||||
"એની કોઈ બાંયધરી નથી; વ્યાપારીપણાં માટે પણ નહિં કે પછી ચોક્કસ ઉદ્દેશની વ્યવસ્થા માટે પણ "
|
||||
"નહિં.\n"
|
||||
|
||||
#: ../src/main.c:258
|
||||
#: ../src/main.c:169
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "સત્ર વ્યવસ્થાપકનું જોડાણ નિષ્ક્રિય કરો"
|
||||
|
||||
#: ../src/main.c:264
|
||||
#: ../src/main.c:175
|
||||
msgid "Replace the running window manager with Metacity"
|
||||
msgstr "ચાલી રહેલ વિન્ડો વ્યવસ્થાપક મેટાસીટી વડે બદલો"
|
||||
|
||||
#: ../src/main.c:270
|
||||
#: ../src/main.c:181
|
||||
msgid "Specify session management ID"
|
||||
msgstr "સત્ર વ્યવસ્થાપન ID સ્પષ્ટ કરો"
|
||||
|
||||
#: ../src/main.c:275
|
||||
#: ../src/main.c:186
|
||||
msgid "X Display to use"
|
||||
msgstr "વાપરવા માટેનું X ડિસ્પ્લે"
|
||||
|
||||
#: ../src/main.c:281
|
||||
#: ../src/main.c:192
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "સંગ્રહાયેલ ફાઈલમાંથી સત્રનો પ્રારંભ કરો"
|
||||
|
||||
#: ../src/main.c:287
|
||||
#: ../src/main.c:198
|
||||
msgid "Print version"
|
||||
msgstr "છાપન આવૃત્તિ"
|
||||
|
||||
#: ../src/main.c:439
|
||||
#: ../src/main.c:350
|
||||
#, c-format
|
||||
msgid "Failed to scan themes directory: %s\n"
|
||||
msgstr "થીમની ડિરેક્ટરી જોવામાં નિષ્ફળ: %s\n"
|
||||
|
||||
#: ../src/main.c:455
|
||||
#: ../src/main.c:366
|
||||
#, c-format
|
||||
msgid "Could not find a theme! Be sure %s exists and contains the usual themes."
|
||||
msgstr "થીમ શોધી શકાઈ નહિં! ખાતરી કરો કે %s અસ્તિત્વ ધરાવે છે અને તેમાં સામાન્ય થીમ છે."
|
||||
|
||||
#: ../src/main.c:527
|
||||
#: ../src/main.c:424
|
||||
#, c-format
|
||||
msgid "Failed to restart: %s\n"
|
||||
msgstr "ફરીથી શરુ કરવામાં નિષ્ફળ: %s\n"
|
||||
|
||||
#: ../src/menu.c:55
|
||||
msgid "Mi_nimize"
|
||||
msgstr "ન્યૂનત્તમ કરો (_N)"
|
||||
msgstr "ન્યૂનત્તમ કરો (_n)"
|
||||
|
||||
#: ../src/menu.c:56
|
||||
msgid "Ma_ximize"
|
||||
@@ -187,7 +188,7 @@ msgstr "મહત્તમ કરો (_x)"
|
||||
|
||||
#: ../src/menu.c:57
|
||||
msgid "Unma_ximize"
|
||||
msgstr "મહત્તમમાંથી પાછા ફરો (_x)"
|
||||
msgstr "મહત્તમમાંથી પાછુ લાવો (_x)"
|
||||
|
||||
#: ../src/menu.c:58
|
||||
msgid "Roll _Up"
|
||||
@@ -199,11 +200,11 @@ msgstr "ખોલી કાઢો (_U)"
|
||||
|
||||
#: ../src/menu.c:60 ../src/menu.c:61
|
||||
msgid "On _Top"
|
||||
msgstr "ઉપરની બાજુએ (_T)"
|
||||
msgstr "ટોચ પર (_T)"
|
||||
|
||||
#: ../src/menu.c:62
|
||||
msgid "_Move"
|
||||
msgstr "ખસાડો (_M)"
|
||||
msgstr "ખસેડો (_M)"
|
||||
|
||||
#: ../src/menu.c:63
|
||||
msgid "_Resize"
|
||||
@@ -225,25 +226,25 @@ msgstr "હંમેશા દ્રશ્ય કામ કરવાની જ
|
||||
|
||||
#: ../src/menu.c:69
|
||||
msgid "_Only on This Workspace"
|
||||
msgstr "માત્ર આ કામ કરવાની જગ્યા પર જ (_O)"
|
||||
msgstr "માત્ર આ કામ કરવાની જગ્યા પર (_O)"
|
||||
|
||||
#: ../src/menu.c:70
|
||||
msgid "Move to Workspace _Left"
|
||||
msgstr "કામ કરવાની જગ્યાને ડાબે ખસેડો (_L)"
|
||||
msgstr "ડાબી કામ કરવાની જગ્યામાં ખસો (_L)"
|
||||
|
||||
#: ../src/menu.c:71
|
||||
msgid "Move to Workspace R_ight"
|
||||
msgstr "કામ કરવાની જગ્યાને જમણે ખસેડો (_i)"
|
||||
msgstr "જમણી કામ કરવાની જગ્યામાં ખસો (_i)"
|
||||
|
||||
#: ../src/menu.c:72
|
||||
msgid "Move to Workspace _Up"
|
||||
msgstr "કામ કરવાની જગ્યાને ઉપર ખસેડો (_U)"
|
||||
msgstr "ઉપરની કામ કરવાની જગ્યામાં ખસો (_U)"
|
||||
|
||||
#: ../src/menu.c:73
|
||||
msgid "Move to Workspace _Down"
|
||||
msgstr "કામ કરવાની જગ્યાને ડાબે ખસેડો (_D)"
|
||||
msgstr "ઉપરની કામ કરવાની જગ્યામાં ખસો (_D)"
|
||||
|
||||
#: ../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"
|
||||
@@ -351,31 +352,31 @@ 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 "જબરદસ્તી બહાર કાઢો (_F)"
|
||||
|
||||
# #-#-#-#-# libgnomeui.HEAD.hi.po (libgnomeui-2.0.hi) #-#-#-#-#
|
||||
# libgnomeui/gnome-druid-page-standard.c:121
|
||||
# libgnomeui/gnome-font-picker.c:155
|
||||
#: ../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."
|
||||
@@ -383,7 +384,7 @@ msgstr ""
|
||||
"આ બધી વિન્ડો \"વર્તમાન સુયોજનનો સંગ્રહ કરો\" ને આધાર આપતી નથી અને બીજી વખત તમે પ્રવેશ "
|
||||
"કરો ત્યારે જાતે જ ફરી શરુ કરવું પડશે."
|
||||
|
||||
#: ../src/metacity-dialog.c:331
|
||||
#: ../src/metacity-dialog.c:308
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There was an error running \"%s\":\n"
|
||||
@@ -2078,19 +2079,19 @@ msgstr "%d એ જીકોન્ફ કી %s માં સંગ્રહિ
|
||||
msgid "Error setting number of workspaces to %d: %s\n"
|
||||
msgstr "કામ કરવાની જગ્યાની સંખ્યા %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\" માટે રુપરેખાના ડેટાબેઝ \"%s\" માં મળેલ કિંમત યોગ્ય નથી\n"
|
||||
|
||||
#: ../src/prefs.c:2750
|
||||
#: ../src/prefs.c:2758
|
||||
#, c-format
|
||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||
msgstr "કામ કરવાની જગ્યા %d ને \"%s\" નું નામ બદલવામાં ભૂલ થઈ: %s\n"
|
||||
|
||||
#: ../src/resizepopup.c:123
|
||||
#: ../src/resizepopup.c:111
|
||||
#, c-format
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
@@ -2952,11 +2953,11 @@ msgstr "બટન માટે ધારેલુ પ્રમાણ %g એ વ
|
||||
msgid "Frame geometry does not specify size of buttons"
|
||||
msgstr "ચોકઠાની ભૂમિતિ બટનોનું માપ સ્પષ્ટ કરતી નથી"
|
||||
|
||||
#: ../src/theme.c:813
|
||||
#: ../src/theme.c:847
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr "ઢાળમાં ઓછામાં ઓછા બે રંગ હોવા જોઈએ"
|
||||
|
||||
#: ../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] "
|
||||
@@ -2965,7 +2966,7 @@ msgstr ""
|
||||
"GTK રંગના સ્પષ્ટીકરણમાં કૌંસમાં સ્થિતિ હોવી જોઈએ દા.ત. gtk:fg[NORMAL] જ્યાં NORMAL "
|
||||
"સ્થિતિ છે; \"%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:"
|
||||
@@ -2974,136 +2975,136 @@ msgstr ""
|
||||
"GTK રંગના સ્પષ્ટીકરણમાં સ્થિતિ પછી કૌંસ બંધ થવો જોઈએ દા.ત. gtk:fg[NORMAL] જ્યાં "
|
||||
"NORMAL સ્થિતિ છે; \"%s\" નો પદચ્છેદ કરી શકાય નહિં"
|
||||
|
||||
#: ../src/theme.c:964
|
||||
#: ../src/theme.c:998
|
||||
#, c-format
|
||||
msgid "Did not understand state \"%s\" in color specification"
|
||||
msgstr "રંગના સ્પષ્ટીકરણમાં સ્થિતિ \"%s\" સમજી શકાઈ નહિં"
|
||||
|
||||
#: ../src/theme.c:977
|
||||
#: ../src/theme.c:1011
|
||||
#, c-format
|
||||
msgid "Did not understand color component \"%s\" in color specification"
|
||||
msgstr "રંગના સ્પષ્ટીકરણમાં રંગની વસ્તુ \"%s\" સમજી શકાયો નહિં"
|
||||
|
||||
#: ../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/bg_color/fg_color/alpha\" એ મિશ્રિત માળખું છે, \"%s\" માળખામાં બેસતું નથી "
|
||||
|
||||
#: ../src/theme.c:1018
|
||||
#: ../src/theme.c:1052
|
||||
#, c-format
|
||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||
msgstr "મિશ્રિત રંગમાં આલ્ફાની કિંમત \"%s\" નું પદચ્છેદ કરી શકાતુ નથી"
|
||||
|
||||
#: ../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 "મિશ્રિત રંગમાં આલ્ફાની કિંમત \"%s\" ૦.૦ અને ૧.૦ ની વચ્ચે નથી"
|
||||
|
||||
#: ../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/base_color/factor\" છે, \"%s\" માળખામાં બેસતુ નથી"
|
||||
|
||||
#: ../src/theme.c:1086
|
||||
#: ../src/theme.c:1120
|
||||
#, c-format
|
||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||
msgstr "છાયાંકિત રંગમાં છાયાનો અવયવ \"%s\" નું પદચ્છેદ કરી શકાતુ નથી"
|
||||
|
||||
#: ../src/theme.c:1096
|
||||
#: ../src/theme.c:1130
|
||||
#, c-format
|
||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||
msgstr "છાયાનો અવયવ \"%s\" છાયાના રંગમાં ઋણ છે"
|
||||
|
||||
#: ../src/theme.c:1125
|
||||
#: ../src/theme.c:1159
|
||||
#, c-format
|
||||
msgid "Could not parse color \"%s\""
|
||||
msgstr "રંગ \"%s\" નુ પદચ્છેદ કરી શકાતુ નથી"
|
||||
|
||||
#: ../src/theme.c:1384
|
||||
#: ../src/theme.c:1418
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr "યામાક્ષ સમીકરણ અક્ષર '%s' ધરાવે છે જે સ્વીકાર્ય નથી"
|
||||
|
||||
#: ../src/theme.c:1411
|
||||
#: ../src/theme.c:1445
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
msgstr "યામાક્ષ સમીકરણ અપૂર્ણાંક સંખ્યા '%s' ધરાવે છે જેનું પદચ્છેદ કરી શકાતું નથી"
|
||||
|
||||
#: ../src/theme.c:1425
|
||||
#: ../src/theme.c:1459
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr "યામાક્ષ સમીકરણ પૂર્ણાંક સંખ્યા '%s' ધરાવે છે જેનું પદચ્છેદ કરી શકાતું નથી"
|
||||
|
||||
#: ../src/theme.c:1492
|
||||
#: ../src/theme.c:1526
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Coordinate expression contained unknown operator at the start of this text: "
|
||||
"\"%s\""
|
||||
msgstr "યામાક્ષ સમીકરણમાં આ લખાણની શરુઆતમાં અજાણ્યા કારકો ધરાવે છે: \"%s\""
|
||||
|
||||
#: ../src/theme.c:1549
|
||||
#: ../src/theme.c:1583
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr "યામાક્ષ સમીકરણ ખાલી છે અથવા સમજી શકાય એવું નથી"
|
||||
|
||||
#: ../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 "યામાક્ષ સમીકરણ શૂન્ય વડે ભાગાકારમાં પરિણમશે"
|
||||
|
||||
#: ../src/theme.c:1738
|
||||
#: ../src/theme.c:1772
|
||||
msgid "Coordinate expression tries to use mod operator on a floating-point number"
|
||||
msgstr "યામાક્ષ સમીકરણ અપૂર્ણાંક સંખ્યાની ઉપર શેષ કારકનો ઉપયોગ કરવાનો પ્રયત્ન કરે છે"
|
||||
|
||||
#: ../src/theme.c:1794
|
||||
#: ../src/theme.c:1828
|
||||
#, c-format
|
||||
msgid "Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||
msgstr "યામાક્ષ સમીકરણ માટે \"%s\" કારક છે જેના માટે ઓપરન્ડ હોવા જોઈએ"
|
||||
|
||||
#: ../src/theme.c:1803
|
||||
#: ../src/theme.c:1837
|
||||
msgid "Coordinate expression had an operand where an operator was expected"
|
||||
msgstr "યામાક્ષ સમીકરણમાં ઓપરન્ડ છે જ્યાં કારક હોવુ જોઈતું હતું"
|
||||
|
||||
#: ../src/theme.c:1811
|
||||
#: ../src/theme.c:1845
|
||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||
msgstr "યામાક્ષ સમીકરણનો અંત ઓપરન્ડની જગ્યાએ કારકથી થાય છે"
|
||||
|
||||
#: ../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 "યામાક્ષ સમીકરણમાં \"%c\" કારક પછી તરત જ \"%c\" કારક છે જેમની વચ્ચે કોઈ ઓપરન્ડ નથી"
|
||||
|
||||
#: ../src/theme.c:1939
|
||||
#: ../src/theme.c:1973
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr "યામાક્ષ સમીકરણ પદચ્છેદકે તેનું બફર ઓવરફ્લો કરી નાંખ્યું."
|
||||
|
||||
#: ../src/theme.c:1968
|
||||
#: ../src/theme.c:2002
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr "યામાક્ષ સમીકરણ પાસે ખુલ્લા કૌંસની વગર જ બંધ કૌંસ છે"
|
||||
|
||||
#: ../src/theme.c:2030
|
||||
#: ../src/theme.c:2064
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr "યામાક્ષ સમીકરણમાં અજાણ્યો ચલ કે અચલ \"%s\" છે"
|
||||
|
||||
#: ../src/theme.c:2085
|
||||
#: ../src/theme.c:2119
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr "યામાક્ષ સમીકરણ પાસે બંધ કૌંસની વગર જ ખુલ્લો કૌંસ હતો"
|
||||
|
||||
#: ../src/theme.c:2096
|
||||
#: ../src/theme.c:2130
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
msgstr "યામાક્ષ સમીકરણમાં કોઈ કારક કે ઓપરન્ડ હોય તેવુ લાગતુ નથી"
|
||||
|
||||
#: ../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"
|
||||
|
||||
#: ../src/theme.c:3826
|
||||
#: ../src/theme.c:3860
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
@@ -3112,23 +3113,23 @@ msgstr ""
|
||||
"આ માળખાની શૈલી માટે <button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/"
|
||||
"> સ્પષ્ટ કરેલી હોવી જરુરી છે"
|
||||
|
||||
#: ../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\"/> ખોવાય છે"
|
||||
|
||||
#: ../src/theme.c:4341
|
||||
#: ../src/theme.c:4375
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "થીમ \"%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\" માટે નથી"
|
||||
|
||||
#: ../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 "
|
||||
@@ -3137,7 +3138,7 @@ msgstr ""
|
||||
"થીમ \"%s\" માં વિન્ડોના પ્રકાર \"%s\" માટે કોઈ માળખાની શૈલી ગોઠવાયેલી નથી, <window "
|
||||
"type=\"%s\" style_set=\"whatever\"/> વસ્તુ ઊમેરો"
|
||||
|
||||
#: ../src/theme.c:4531
|
||||
#: ../src/theme.c:4565
|
||||
#, c-format
|
||||
msgid ""
|
||||
"<menu_icon function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||
@@ -3146,12 +3147,12 @@ msgstr ""
|
||||
"આ થીમ માટે <menu_icon function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> "
|
||||
"સ્પષ્ટ કરેલુ હોવુ જોઈએ"
|
||||
|
||||
#: ../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\" નહિં"
|
||||
|
||||
#: ../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\" પહેલેથી જ વ્યાખ્યાયિત છે"
|
||||
@@ -3192,18 +3193,18 @@ msgstr "વિન્ડો વ્યવસ્થાપકની ભૂલ: "
|
||||
msgid "Application set a bogus _NET_WM_PID %lu\n"
|
||||
msgstr "કાર્યક્રમ એ ખોટું _NET_WM_PID %lu સુયોજિત કર્યું છે\n"
|
||||
|
||||
#: ../src/window-props.c:233
|
||||
#: ../src/window-props.c:237
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (%s પર)"
|
||||
|
||||
#: ../src/window-props.c:1139
|
||||
#: ../src/window-props.c:1177
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "અયોગ્ય WM_TRANSIENT_FOR વિન્ડો 0x%lx એ %s માટે સ્પષ્ટ થયેલ છે.\n"
|
||||
|
||||
#. first time through
|
||||
#: ../src/window.c:5227
|
||||
#: ../src/window.c:5288
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@@ -3219,7 +3220,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/window.c:5823
|
||||
#: ../src/window.c:5884
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
||||
|
1046
po/sr@Latn.po
1046
po/sr@Latn.po
File diff suppressed because it is too large
Load Diff
70
po/th.po
70
po/th.po
@@ -11,8 +11,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-04-21 11:51+0700\n"
|
||||
"PO-Revision-Date: 2006-04-21 13:19+0700\n"
|
||||
"POT-Creation-Date: 2006-05-23 20:32+0700\n"
|
||||
"PO-Revision-Date: 2006-05-23 20:37+0700\n"
|
||||
"Last-Translator: Theppitak Karoonboonyanan <thep@linux.thai.net>\n"
|
||||
"Language-Team: Thai <L10n@opentle.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -62,7 +62,7 @@ msgstr "เกิดข้อผิดพลาด ขณะเปิดหน
|
||||
msgid "Failed to get hostname: %s\n"
|
||||
msgstr "ไม่สามารถอ่านชื่อโฮสต์: %s\n"
|
||||
|
||||
#: ../src/display.c:354
|
||||
#: ../src/display.c:344
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "ไม่สามารถเปิดดิสเพลย์ '%s' ของระบบ X Window\n"
|
||||
@@ -124,7 +124,7 @@ msgid "No terminal command has been defined.\n"
|
||||
msgstr "คำสั่งเปิดเทอร์มินัลยังไม่ได้ถูกกำหนด\n"
|
||||
|
||||
# FIXME: Get a lawer to translate the legal clause.
|
||||
#: ../src/main.c:70
|
||||
#: ../src/main.c:65
|
||||
#, c-format
|
||||
msgid ""
|
||||
"metacity %s\n"
|
||||
@@ -139,42 +139,42 @@ msgstr ""
|
||||
"ไม่รับผิดชอบข้อเสียหายใดๆ "
|
||||
"ไม่รับประกันความเหมาะสมในเชิงพาณิชย์หรือการใช้งานเฉพาะทางอย่างหนึ่งอย่างใด\n"
|
||||
|
||||
#: ../src/main.c:258
|
||||
#: ../src/main.c:169
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "ปิดการเชื่อมต่อไปยังโปรแกรมจัดการวาระ"
|
||||
|
||||
#: ../src/main.c:264
|
||||
#: ../src/main.c:175
|
||||
msgid "Replace the running window manager with Metacity"
|
||||
msgstr "แทนที่โปรแกรมจัดการหน้าต่างที่กำลังทำงานอยู่ด้วย Metacity"
|
||||
|
||||
#: ../src/main.c:270
|
||||
#: ../src/main.c:181
|
||||
msgid "Specify session management ID"
|
||||
msgstr "ระบุ ID ของการจัดการวาระ"
|
||||
|
||||
#: ../src/main.c:275
|
||||
#: ../src/main.c:186
|
||||
msgid "X Display to use"
|
||||
msgstr "ดิสเพลย์ X ที่จะใช้"
|
||||
|
||||
#: ../src/main.c:281
|
||||
#: ../src/main.c:192
|
||||
msgid "Initialize session from savefile"
|
||||
msgstr "ใช้ค่าเริ่มต้นของวาระจากแฟ้มที่บันทึกไว้"
|
||||
|
||||
#: ../src/main.c:287
|
||||
#: ../src/main.c:198
|
||||
msgid "Print version"
|
||||
msgstr "แสดงเลขรุ่น"
|
||||
|
||||
#: ../src/main.c:439
|
||||
#: ../src/main.c:350
|
||||
#, c-format
|
||||
msgid "Failed to scan themes directory: %s\n"
|
||||
msgstr "ไม่สามารถอ่านโฟลเดอร์ชุดตกแต่ง: %s\n"
|
||||
|
||||
#: ../src/main.c:455
|
||||
#: ../src/main.c:366
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not find a theme! Be sure %s exists and contains the usual themes."
|
||||
msgstr "ไม่พบชุดตกแต่ง โปรดตรวจดูว่า %s มีอยู่จริง และบรรจุชุดตกแต่งที่ควรจะมี"
|
||||
|
||||
#: ../src/main.c:527
|
||||
#: ../src/main.c:424
|
||||
#, c-format
|
||||
msgid "Failed to restart: %s\n"
|
||||
msgstr "ไม่สามารถเริ่มการทำงานใหม่ของ: %s\n"
|
||||
@@ -462,7 +462,7 @@ msgstr "คำสั่งที่จะกระทำเมื่อมีก
|
||||
|
||||
#: ../src/metacity.schemas.in.h:11
|
||||
msgid "Compositing Manager"
|
||||
msgstr ""
|
||||
msgstr "จัดการ Composite"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:12
|
||||
msgid "Control how new windows get focus"
|
||||
@@ -478,7 +478,7 @@ msgstr "การหน่วงเวลาในหน่วยมิลลิ
|
||||
|
||||
#: ../src/metacity.schemas.in.h:15
|
||||
msgid "Determines whether Metacity is a compositing manager."
|
||||
msgstr ""
|
||||
msgstr "กำหนดว่า จะให้ Metacity เป็นผู้จัดการ Composite หรือไม่"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:16
|
||||
msgid ""
|
||||
@@ -547,8 +547,8 @@ msgstr ""
|
||||
"แนวคิดนี้ค่อนข้างเป็นนามธรรม แต่โดยทั่วไปการตั้งค่าแบบนี้จะคล้าย Mac และต่างจากวินโดวส์ "
|
||||
"เมื่อคุณโฟกัสหน้าต่างหนึ่งในโหมดโปรแกรมประยุกต์ "
|
||||
"หน้าต่างทั้งหมดในโปรแกรมประยุกต์เดียวกันจะถูกยกขึ้นพร้อมกัน นอกจากนี้ ในโหมดโปรแกรมประยุกต์นี้ "
|
||||
"การคลิกเพื่อโฟกัสจะไม่ถูกส่งผ่านไปยังหน้าต่างของโปรแกรมประยุกต์อื่นด้วย "
|
||||
"อย่างไรก็ดี โหมดโปรแกรมประยุกต์ยังใช้การไม่ได้ในขณะนี้"
|
||||
"การคลิกเพื่อโฟกัสจะไม่ถูกส่งผ่านไปยังหน้าต่างของโปรแกรมประยุกต์อื่นด้วย อย่างไรก็ดี "
|
||||
"โหมดโปรแกรมประยุกต์ยังใช้การไม่ได้ในขณะนี้"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:24
|
||||
msgid "If true, trade off usability for less resource usage"
|
||||
@@ -571,8 +571,8 @@ msgstr ""
|
||||
"โดยปกติ ปฏิบัติการหลายอย่าง (เช่น การคลิกบนพื้นที่ภายในหน้าต่าง การย้ายหรือปรับขนาดหน้าต่าง) "
|
||||
"จะยกหน้าต่างขึ้นด้วย ถ้ากำหนดตัวเลือกนี้เป็นเท็จ จะไม่ยกหน้าต่างเมื่อมีปฏิสัมพันธ์กับผู้ใช้ "
|
||||
"แต่ยังสามารถยกขึ้นได้โดย alt-คลิกซ้าย ภายในพื้นที่หน้าต่าง หรือคลิกแบบธรรมดาที่กรอบหน้าต่าง "
|
||||
"หรือโดยข้อความพิเศษ เช่นการร้องขอกระตุ้นหน้าต่างจากโปรแกรมจัดหน้าพื้นโต๊ะ "
|
||||
"ขณะนี้ ตัวเลือกนี้จะไม่มีผลถ้าอยู่ในโหมดโฟกัสด้วยการคลิก"
|
||||
"หรือโดยข้อความพิเศษ เช่นการร้องขอกระตุ้นหน้าต่างจากโปรแกรมจัดหน้าพื้นโต๊ะ ขณะนี้ "
|
||||
"ตัวเลือกนี้จะไม่มีผลถ้าอยู่ในโหมดโฟกัสด้วยการคลิก"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:27
|
||||
msgid "Maximize window"
|
||||
@@ -1465,8 +1465,8 @@ msgid ""
|
||||
"\"disabled\", then there will be no keybinding for this action."
|
||||
msgstr ""
|
||||
"ปุ่มลัดสำหรับวนโฟกัส ระหว่างหน้าต่างทั้งหลายของโปรแกรมประยุกต์ในทิศย้อนกลับ "
|
||||
"โดยไม่ใช้หน้าต่างป๊อปอัพช่วย กด \"shift\" พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้ไปข้างหน้า "
|
||||
"รูปแบบคือ \"<Control>a\" หรือ \"<Shift><Alt>F1\" "
|
||||
"โดยไม่ใช้หน้าต่างป๊อปอัพช่วย กด \"shift\" พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้ไปข้างหน้า รูปแบบคือ "
|
||||
"\"<Control>a\" หรือ \"<Shift><Alt>F1\" "
|
||||
"ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ "
|
||||
"\"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
||||
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||
@@ -1482,8 +1482,8 @@ msgid ""
|
||||
"\"disabled\", then there will be no keybinding for this action."
|
||||
msgstr ""
|
||||
"ปุ่มลัดสำหรับวนโฟกัส ระหว่างหน้าต่างทั้งหลายของโปรแกรมประยุกต์ในทิศย้อนกลับ "
|
||||
"โดยใช้หน้าต่างป๊อปอัพช่วย กด \"shift\" พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้ไปข้างหน้า "
|
||||
"รูปแบบคือ \"<Control>a\" หรือ \"<Shift><Alt>F1\" "
|
||||
"โดยใช้หน้าต่างป๊อปอัพช่วย กด \"shift\" พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้ไปข้างหน้า รูปแบบคือ "
|
||||
"\"<Control>a\" หรือ \"<Shift><Alt>F1\" "
|
||||
"ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ "
|
||||
"\"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
||||
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||
@@ -1560,8 +1560,8 @@ msgid ""
|
||||
"\"<Ctrl>\". If you set the option to the special string \"disabled\", "
|
||||
"then there will be no keybinding for this action."
|
||||
msgstr ""
|
||||
"ปุ่มลัดสำหรับวนโฟกัส ระหว่างหน้าต่างทั้งหลายของโปรแกรมประยุกต์โดยไม่ใช้หน้าต่างป๊อปอัพช่วย "
|
||||
"กด \"shift\" พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้กลับคนละทาง รูปแบบคือ \"<Control>a\" "
|
||||
"ปุ่มลัดสำหรับวนโฟกัส ระหว่างหน้าต่างทั้งหลายของโปรแกรมประยุกต์โดยไม่ใช้หน้าต่างป๊อปอัพช่วย กด "
|
||||
"\"shift\" พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้กลับคนละทาง รูปแบบคือ \"<Control>a\" "
|
||||
"หรือ \"<Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก "
|
||||
"และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น "
|
||||
"\"disabled\" ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||
@@ -1577,11 +1577,11 @@ msgid ""
|
||||
"\"disabled\", then there will be no keybinding for this action."
|
||||
msgstr ""
|
||||
"ปุ่มลัดสำหรับวนโฟกัส ระหว่างหน้าต่างทั้งหลายของโปรแกรมประยุกต์โดยใช้หน้าต่างป๊อปอัพช่วย "
|
||||
"(โดยทั่วไปแล้วใช้ <Alt>F6) กด \"shift\" พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้กลับคนละทาง "
|
||||
"รูปแบบคือ \"<Control>a\" หรือ \"<Shift><Alt>F1\" "
|
||||
"ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ เช่น \"<Ctl>\" และ "
|
||||
"\"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" ได้ "
|
||||
"ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||
"(โดยทั่วไปแล้วใช้ <Alt>F6) กด \"shift\" "
|
||||
"พร้อมกับปุ่มลัดนี้ถ้าต้องการวนให้กลับคนละทาง รูปแบบคือ \"<Control>a\" หรือ \"<"
|
||||
"Shift><Alt>F1\" ตัวอ่านค่าคีย์ไม่สนใจว่าเป็นตัวพิมพ์ใหญ่หรือเล็ก และเข้าใจชื่อย่อ "
|
||||
"เช่น \"<Ctl>\" และ \"<Ctrl>\" คุณสามารถตั้งค่าตัวเลือกเป็น \"disabled\" "
|
||||
"ได้ ถ้าไม่ต้องการปุ่มลัดสำหรับปฏิบัติการนี้"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:145
|
||||
msgid ""
|
||||
@@ -2028,7 +2028,7 @@ msgstr "\"%s\" ที่พบในฐานข้อมูลค่าปร
|
||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||
msgstr "ไม่สามารถตั้งชื่อพื้นที่ทำงาน %d เป็น %s: %s\n"
|
||||
|
||||
#: ../src/resizepopup.c:123
|
||||
#: ../src/resizepopup.c:111
|
||||
#, c-format
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
@@ -3142,18 +3142,18 @@ msgstr "เกิดข้อผิดพลาดในโปรแกรมจ
|
||||
msgid "Application set a bogus _NET_WM_PID %lu\n"
|
||||
msgstr "โปรแกรมประยุกต์ตั้งค่า _NET_WM_PID เป็น %lu ซึ่งไม่มีอยู่จริง\n"
|
||||
|
||||
#: ../src/window-props.c:233
|
||||
#: ../src/window-props.c:237
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (ที่เครื่อง %s)"
|
||||
|
||||
#: ../src/window-props.c:1139
|
||||
#: ../src/window-props.c:1159
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "ค่า WM_TRANSIENT_FOR หน้าต่าง 0x%lx ที่กำหนดให้กับ %s ใช้ไม่ได้\n"
|
||||
|
||||
#. first time through
|
||||
#: ../src/window.c:5227
|
||||
#: ../src/window.c:5213
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@@ -3169,7 +3169,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/window.c:5823
|
||||
#: ../src/window.c:5809
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
||||
|
965
po/zh_CN.po
965
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
2830
po/zh_HK.po
Normal file
2830
po/zh_HK.po
Normal file
File diff suppressed because it is too large
Load Diff
1690
po/zh_TW.po
1690
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -50,6 +50,12 @@ Pointer warping:
|
||||
(Think about tasklist & window selector too; this would be a very bad idea)
|
||||
|
||||
|
||||
Bugs for easy dupe-finding that seem to be hard to find otherwise:
|
||||
===
|
||||
Applications opening in wrong workspace:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=160687
|
||||
|
||||
|
||||
Tracking bugs
|
||||
====
|
||||
|
||||
@@ -68,3 +74,6 @@ moving/resizing (constraints): http://bugzilla.gnome.org/show_bug.cgi?id=155458
|
||||
modal dialogs: http://bugzilla.gnome.org/show_bug.cgi?id=164841
|
||||
multi-head sans xinerama: http://bugzilla.gnome.org/show_bug.cgi?id=324772
|
||||
xinerama: http://bugzilla.gnome.org/show_bug.cgi?id=324773
|
||||
output-only windows: http://bugzilla.gnome.org/show_bug.cgi?id=340584
|
||||
allowed actions/window-type: http://bugzilla.gnome.org/show_bug.cgi?id=340682
|
||||
EWMH/ICCCM compliance: http://bugzilla.gnome.org/show_bug.cgi?id=340691
|
||||
|
@@ -2,11 +2,7 @@ lib_LTLIBRARIES = libmetacity-private.la
|
||||
|
||||
SUBDIRS=wm-tester tools themes
|
||||
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DMETACITY_LIBDIR=\"$(libdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
|
||||
EGGFILES= \
|
||||
eggaccelerators.c \
|
||||
eggaccelerators.h
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
|
||||
metacity_SOURCES= \
|
||||
async-getprop.c \
|
||||
@@ -18,6 +14,8 @@ metacity_SOURCES= \
|
||||
common.h \
|
||||
c-screen.c \
|
||||
c-screen.h \
|
||||
c-window.c \
|
||||
c-window.h \
|
||||
compositor.c \
|
||||
compositor.h \
|
||||
constraints.c \
|
||||
@@ -95,8 +93,7 @@ metacity_SOURCES= \
|
||||
workspace.c \
|
||||
workspace.h \
|
||||
xprops.c \
|
||||
xprops.h \
|
||||
$(EGGFILES)
|
||||
xprops.h
|
||||
|
||||
# by setting libmetacity_private_la_CFLAGS, the files shared with
|
||||
# metacity proper will be compiled with different names.
|
||||
@@ -122,6 +119,7 @@ libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
||||
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
|
||||
|
||||
libmetacityinclude_HEADERS = \
|
||||
boxes.h \
|
||||
common.h \
|
||||
gradient.h \
|
||||
preview-widget.h \
|
||||
@@ -190,13 +188,6 @@ pkgconfig_DATA = libmetacity-private.pc
|
||||
|
||||
EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) $(schema_DATA) \
|
||||
update-from-egg.sh \
|
||||
$(desktopfiles_in_files) \
|
||||
$(schema_in_files) \
|
||||
libmetacity-private.pc.in
|
||||
|
||||
|
||||
EGGDIR=$(srcdir)/../../libegg/libegg
|
||||
|
||||
regenerate-built-sources:
|
||||
EGGFILES="$(EGGFILES)" EGGDIR="$(EGGDIR)" $(srcdir)/update-from-egg.sh
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Asynchronous X property getting hack */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Asynchronous X property getting hack */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity visual bell */
|
||||
|
||||
/*
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/* Metacity visual bell */
|
||||
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2002 Sun Microsystems Inc.
|
||||
*
|
||||
|
21
src/boxes.c
21
src/boxes.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Simple box operations */
|
||||
|
||||
/*
|
||||
@@ -705,6 +707,25 @@ meta_rectangle_contained_in_region (const GList *spanning_rects,
|
||||
return contained;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_rectangle_overlaps_with_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
{
|
||||
const GList *temp;
|
||||
gboolean overlaps;
|
||||
|
||||
temp = spanning_rects;
|
||||
overlaps = FALSE;
|
||||
while (!overlaps && temp != NULL)
|
||||
{
|
||||
overlaps = overlaps || meta_rectangle_overlap (temp->data, rect);
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
return overlaps;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Simple box operations */
|
||||
|
||||
/*
|
||||
@@ -183,6 +185,9 @@ gboolean meta_rectangle_could_fit_in_region (
|
||||
gboolean meta_rectangle_contained_in_region (
|
||||
const GList *spanning_rects,
|
||||
const MetaRectangle *rect);
|
||||
gboolean meta_rectangle_overlaps_with_region (
|
||||
const GList *spanning_rects,
|
||||
const MetaRectangle *rect);
|
||||
|
||||
/* Make the rectangle small enough to fit into one of the spanning_rects,
|
||||
* but make it no smaller than min_size.
|
||||
|
997
src/c-screen.c
997
src/c-screen.c
File diff suppressed because it is too large
Load Diff
@@ -1,49 +1,53 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#include "screen.h"
|
||||
#include "c-window.h"
|
||||
|
||||
typedef struct MetaScreenInfo MetaScreenInfo;
|
||||
typedef struct MetaCompScreen MetaCompScreen;
|
||||
|
||||
MetaScreenInfo *meta_screen_info_new (WsDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaScreenInfo *meta_screen_info_get_by_xwindow (Window xwindow);
|
||||
void meta_screen_info_destroy (MetaScreenInfo *scr_info);
|
||||
void meta_screen_info_redirect (MetaScreenInfo *info);
|
||||
void meta_screen_info_unredirect (MetaScreenInfo *info);
|
||||
void meta_screen_info_add_window (MetaScreenInfo *scr_info,
|
||||
Window xwindow);
|
||||
void meta_screen_info_remove_window (MetaScreenInfo *scr_info,
|
||||
Window xwindow);
|
||||
void meta_screen_info_restack (MetaScreenInfo *scr_info,
|
||||
Window window,
|
||||
Window above_this);
|
||||
void meta_screen_info_set_size (MetaScreenInfo *info,
|
||||
Window window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void meta_screen_info_raise_window (MetaScreenInfo *scr_info,
|
||||
Window window);
|
||||
void meta_screen_info_queue_paint (MetaScreenInfo *info);
|
||||
void meta_screen_info_set_updates (MetaScreenInfo *info,
|
||||
Window xwindow,
|
||||
gboolean updates);
|
||||
void meta_screen_info_set_patch (MetaScreenInfo *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4]);
|
||||
void meta_screen_info_unset_patch (MetaScreenInfo *info,
|
||||
Window xwindow);
|
||||
void meta_screen_info_set_alpha (MetaScreenInfo *info,
|
||||
Window xwindow,
|
||||
gdouble alpha);
|
||||
void meta_screen_info_get_real_size (MetaScreenInfo *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size);
|
||||
void meta_screen_info_set_target_rect (MetaScreenInfo *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect);
|
||||
|
||||
void meta_screen_info_set_explode (MetaScreenInfo *info,
|
||||
Window xwindow,
|
||||
gdouble level);
|
||||
void meta_screen_info_hide_window (MetaScreenInfo *info,
|
||||
Window xwindow);
|
||||
MetaCompScreen *meta_comp_screen_new (WsDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaCompScreen *meta_comp_screen_get_by_xwindow (Window xwindow);
|
||||
void meta_comp_screen_destroy (MetaCompScreen *scr_info);
|
||||
void meta_comp_screen_redirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_unredirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_add_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_remove_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_restack (MetaCompScreen *scr_info,
|
||||
Window window,
|
||||
Window above_this);
|
||||
void meta_comp_screen_set_size (MetaCompScreen *info,
|
||||
Window window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void meta_comp_screen_raise_window (MetaCompScreen *scr_info,
|
||||
Window window);
|
||||
void meta_comp_screen_queue_paint (MetaCompScreen *info);
|
||||
void meta_comp_screen_set_updates (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gboolean updates);
|
||||
void meta_comp_screen_set_patch (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4]);
|
||||
void meta_comp_screen_unset_patch (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_set_alpha (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble alpha);
|
||||
void meta_comp_screen_get_real_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size);
|
||||
void meta_comp_screen_set_target_rect (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect);
|
||||
void meta_comp_screen_set_explode (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble level);
|
||||
void meta_comp_screen_unmap (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
MetaCompWindow *meta_comp_screen_lookup_window (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
|
1262
src/c-window.c
Normal file
1262
src/c-window.c
Normal file
File diff suppressed because it is too large
Load Diff
72
src/c-window.h
Normal file
72
src/c-window.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <cm/node.h>
|
||||
#include "display.h"
|
||||
#include "effects.h"
|
||||
|
||||
#ifndef C_WINDOW_H
|
||||
#define C_WINDOW_H
|
||||
|
||||
typedef struct _MetaCompWindow MetaCompWindow;
|
||||
|
||||
typedef void (* MetaCompWindowDestroy) (MetaCompWindow *window,
|
||||
gpointer closure);
|
||||
|
||||
MetaCompWindow *meta_comp_window_new (MetaScreen *screen,
|
||||
WsDrawable *drawable,
|
||||
MetaCompWindowDestroy destroy,
|
||||
gpointer data);
|
||||
CmNode *meta_comp_window_get_node (MetaCompWindow *window);
|
||||
gboolean meta_comp_window_free (MetaCompWindow *window);
|
||||
void meta_comp_window_set_size (MetaCompWindow *window,
|
||||
WsRectangle *size);
|
||||
|
||||
void meta_comp_window_hide (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_show (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_refresh_attrs (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_set_updates (MetaCompWindow *comp_window,
|
||||
gboolean updates);
|
||||
|
||||
void meta_comp_window_explode (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_shrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_unshrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_focus (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_restack (MetaCompWindow *comp_window,
|
||||
MetaCompWindow *above);
|
||||
void meta_comp_window_freeze_stack (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_thaw_stack (MetaCompWindow *comp_window);
|
||||
gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_run_minimize (MetaCompWindow *window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_unminimize (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
|
||||
#if 0
|
||||
void meta_comp_window_set_explode (MetaCompWindow *comp_window,
|
||||
double level);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity RGB color stuff */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity RGB color stuff */
|
||||
|
||||
/*
|
||||
|
25
src/common.h
25
src/common.h
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity common types shared by core.h and ui.h */
|
||||
|
||||
/*
|
||||
@@ -44,7 +46,8 @@ typedef enum
|
||||
META_FRAME_ALLOWS_SHADE = 1 << 10,
|
||||
META_FRAME_ALLOWS_MOVE = 1 << 11,
|
||||
META_FRAME_FULLSCREEN = 1 << 12,
|
||||
META_FRAME_IS_FLASHING = 1 << 13
|
||||
META_FRAME_IS_FLASHING = 1 << 13,
|
||||
META_FRAME_ABOVE = 1 << 14
|
||||
} MetaFrameFlags;
|
||||
|
||||
typedef enum
|
||||
@@ -74,7 +77,7 @@ typedef struct _MetaWindowMenu MetaWindowMenu;
|
||||
typedef void (* MetaWindowMenuFunc) (MetaWindowMenu *menu,
|
||||
Display *xdisplay,
|
||||
Window client_xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
MetaMenuOp op,
|
||||
int workspace,
|
||||
gpointer data);
|
||||
@@ -129,7 +132,13 @@ typedef enum
|
||||
META_GRAB_OP_CLICKING_MAXIMIZE,
|
||||
META_GRAB_OP_CLICKING_UNMAXIMIZE,
|
||||
META_GRAB_OP_CLICKING_DELETE,
|
||||
META_GRAB_OP_CLICKING_MENU
|
||||
META_GRAB_OP_CLICKING_MENU,
|
||||
META_GRAB_OP_CLICKING_SHADE,
|
||||
META_GRAB_OP_CLICKING_UNSHADE,
|
||||
META_GRAB_OP_CLICKING_ABOVE,
|
||||
META_GRAB_OP_CLICKING_UNABOVE,
|
||||
META_GRAB_OP_CLICKING_STICK,
|
||||
META_GRAB_OP_CLICKING_UNSTICK
|
||||
} MetaGrabOp;
|
||||
|
||||
typedef enum
|
||||
@@ -143,8 +152,7 @@ typedef enum
|
||||
META_CURSOR_SW_RESIZE,
|
||||
META_CURSOR_NE_RESIZE,
|
||||
META_CURSOR_NW_RESIZE,
|
||||
META_CURSOR_MOVE_WINDOW,
|
||||
META_CURSOR_RESIZE_WINDOW,
|
||||
META_CURSOR_MOVE_OR_RESIZE_WINDOW,
|
||||
META_CURSOR_BUSY
|
||||
|
||||
} MetaCursor;
|
||||
@@ -201,7 +209,6 @@ typedef enum
|
||||
|
||||
/* Relative directions or sides seem to come up all over the place... */
|
||||
/* FIXME: Replace
|
||||
* place.[ch]:MetaWindowEdgePosition,
|
||||
* screen.[ch]:MetaScreenDirection,
|
||||
* workspace.[ch]:MetaMotionDirection,
|
||||
* with the use of MetaDirection.
|
||||
@@ -226,6 +233,12 @@ typedef enum
|
||||
META_BUTTON_FUNCTION_MINIMIZE,
|
||||
META_BUTTON_FUNCTION_MAXIMIZE,
|
||||
META_BUTTON_FUNCTION_CLOSE,
|
||||
META_BUTTON_FUNCTION_SHADE,
|
||||
META_BUTTON_FUNCTION_ABOVE,
|
||||
META_BUTTON_FUNCTION_STICK,
|
||||
META_BUTTON_FUNCTION_UNSHADE,
|
||||
META_BUTTON_FUNCTION_UNABOVE,
|
||||
META_BUTTON_FUNCTION_UNSTICK,
|
||||
META_BUTTON_FUNCTION_LAST
|
||||
} MetaButtonFunction;
|
||||
|
||||
|
671
src/compositor.c
671
src/compositor.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2003, 2004, 2005, 2006 Red Hat, Inc.
|
||||
* Copyright (C) 2003 Keith Packard
|
||||
@@ -50,6 +52,8 @@
|
||||
#include "spring-model.h"
|
||||
#include <cm/state.h>
|
||||
|
||||
#include "effects.h"
|
||||
|
||||
#include "c-screen.h"
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
@@ -90,10 +94,70 @@ handle_error (Display *dpy, XErrorEvent *ev, gpointer data)
|
||||
{
|
||||
WsDisplay *display = data;
|
||||
|
||||
ws_display_process_error (display, ev);
|
||||
ws_display_process_xerror (display, ev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
static Window
|
||||
get_xid (MetaWindow *window)
|
||||
{
|
||||
if (window->frame)
|
||||
return window->frame->xwindow;
|
||||
else
|
||||
return window->xwindow;
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
static void
|
||||
do_effect (MetaEffect *effect,
|
||||
gpointer data)
|
||||
{
|
||||
MetaCompScreen *screen;
|
||||
MetaCompWindow *window;
|
||||
|
||||
screen = meta_comp_screen_get_by_xwindow (get_xid (effect->window));
|
||||
window = meta_comp_screen_lookup_window (screen, get_xid (effect->window));
|
||||
|
||||
switch (effect->type)
|
||||
{
|
||||
case META_EFFECT_MINIMIZE:
|
||||
if (!effect->window->frame)
|
||||
{
|
||||
meta_effect_end (effect);
|
||||
return;
|
||||
}
|
||||
|
||||
meta_comp_screen_raise_window (screen, effect->window->frame->xwindow);
|
||||
|
||||
meta_comp_window_run_minimize (window, effect);
|
||||
break;
|
||||
|
||||
case META_EFFECT_UNMINIMIZE:
|
||||
meta_comp_window_run_unminimize (window, effect);
|
||||
break;
|
||||
|
||||
case META_EFFECT_FOCUS:
|
||||
meta_comp_window_run_focus (window, effect);
|
||||
break;
|
||||
|
||||
case META_EFFECT_CLOSE:
|
||||
meta_comp_window_freeze_stack (window);
|
||||
meta_comp_window_set_updates (window, FALSE);
|
||||
meta_comp_window_explode (window, effect);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
MetaCompositor *
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
@@ -138,6 +202,8 @@ meta_compositor_new (MetaDisplay *display)
|
||||
|
||||
compositor->enabled = TRUE;
|
||||
|
||||
meta_push_effect_handler (do_effect, compositor);
|
||||
|
||||
return compositor;
|
||||
#else /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
return NULL;
|
||||
@@ -181,31 +247,12 @@ meta_compositor_unref (MetaCompositor *compositor)
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
draw_windows (MetaScreen *screen,
|
||||
GList *list)
|
||||
{
|
||||
CmNode *node;
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
node = list->data;
|
||||
|
||||
draw_windows (screen, list->next);
|
||||
|
||||
#if 0
|
||||
g_print ("rendering: %p\n", node);
|
||||
#endif
|
||||
|
||||
cm_node_render (node, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
process_configure_notify (MetaCompositor *compositor,
|
||||
XConfigureEvent *event)
|
||||
{
|
||||
MetaScreenInfo *minfo = meta_screen_info_get_by_xwindow (event->window);
|
||||
MetaCompScreen *minfo = meta_comp_screen_get_by_xwindow (event->window);
|
||||
|
||||
#if 0
|
||||
g_print ("minfo: %lx => %p\n", event->window, minfo);
|
||||
@@ -224,8 +271,8 @@ process_configure_notify (MetaCompositor *compositor,
|
||||
return;
|
||||
}
|
||||
|
||||
meta_screen_info_restack (minfo, event->window, event->above);
|
||||
meta_screen_info_set_size (minfo,
|
||||
meta_comp_screen_restack (minfo, event->window, event->above);
|
||||
meta_comp_screen_set_size (minfo,
|
||||
event->window,
|
||||
event->x, event->y,
|
||||
event->width, event->height);
|
||||
@@ -311,7 +358,7 @@ process_map (MetaCompositor *compositor,
|
||||
return;
|
||||
}
|
||||
|
||||
meta_screen_info_add_window (screen->compositor_data,
|
||||
meta_comp_screen_add_window (screen->compositor_data,
|
||||
event->window);
|
||||
}
|
||||
|
||||
@@ -338,7 +385,7 @@ process_unmap (MetaCompositor *compositor,
|
||||
return;
|
||||
}
|
||||
|
||||
meta_screen_info_unmap (screen->compositor_data, event->window);
|
||||
meta_comp_screen_unmap (screen->compositor_data, event->window);
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
@@ -453,7 +500,7 @@ process_reparent (MetaCompositor *compositor,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_screen_info_raise_window (parent_screen->compositor_data,
|
||||
meta_comp_screen_raise_window (parent_screen->compositor_data,
|
||||
event->window);
|
||||
}
|
||||
}
|
||||
@@ -511,147 +558,8 @@ meta_compositor_process_event (MetaCompositor *compositor,
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
wavy (double time,
|
||||
double in_x, double in_y,
|
||||
double *out_x, double *out_y,
|
||||
gpointer data)
|
||||
{
|
||||
static int m;
|
||||
time = time * 5;
|
||||
double dx = 0.0025 * sin (time + 35 * in_y);
|
||||
double dy = 0.0025 * cos (time + 35 * in_x);
|
||||
|
||||
*out_x = in_x + dx;
|
||||
*out_y = in_y + dy;
|
||||
|
||||
m++;
|
||||
}
|
||||
|
||||
static GTimer *timer;
|
||||
|
||||
#if 0
|
||||
static gboolean
|
||||
update (gpointer data)
|
||||
{
|
||||
MetaScreen *screen = data;
|
||||
ScreenInfo *scr_info = screen->compositor_data;
|
||||
WsWindow *gl_window = scr_info->glw;
|
||||
gdouble angle;
|
||||
|
||||
glViewport (0, 0, screen->rect.width, screen->rect.height);
|
||||
|
||||
if (!timer)
|
||||
timer = g_timer_new ();
|
||||
|
||||
#if 0
|
||||
g_print ("rotation: %f\n", 360 * g_timer_elapsed (timer, NULL));
|
||||
#endif
|
||||
|
||||
angle = g_timer_elapsed (timer, NULL) * 90;
|
||||
#if 0
|
||||
|
||||
angle = 180.0;
|
||||
#endif
|
||||
|
||||
cm_rotation_set_rotation (screen->display->compositor->rotation,
|
||||
angle,
|
||||
0.0, 1.0, 0.0);
|
||||
|
||||
glClearColor (0.0, 0.0, 0.0, 0.0);
|
||||
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
glDisable (GL_TEXTURE_2D);
|
||||
glDisable (GL_DEPTH_TEST);
|
||||
ws_window_raise (gl_window);
|
||||
|
||||
#if 0
|
||||
glMatrixMode (GL_MODELVIEW);
|
||||
|
||||
glLoadIdentity();
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
glTranslatef (-1.0, -1.0, 0.0);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
glMatrixMode (GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective( 45.0f, 1.0, 0.1f, 10.0f );
|
||||
|
||||
glMatrixMode (GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef (0, 0, -3);
|
||||
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
draw_windows (screen, scr_info->compositor_nodes);
|
||||
#endif
|
||||
|
||||
/* FIXME: we should probably grab the server around the raise/swap
|
||||
*/
|
||||
|
||||
CmState *state = cm_state_new ();
|
||||
|
||||
cm_state_disable_depth_buffer_update (state);
|
||||
|
||||
cm_node_render (CM_NODE (screen->display->compositor->stacker), state);
|
||||
|
||||
cm_state_enable_depth_buffer_update (state);
|
||||
|
||||
g_object_unref (state);
|
||||
|
||||
#if 0
|
||||
ws_display_grab (ws_drawable_get_display ((WsDrawable *)gl_window));
|
||||
#endif
|
||||
|
||||
ws_window_gl_swap_buffers (gl_window);
|
||||
glFinish();
|
||||
|
||||
update_frame_counter ();
|
||||
|
||||
scr_info->idle_id = 0;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static void
|
||||
queue_repaint (CmDrawableNode *node, gpointer data)
|
||||
{
|
||||
MetaScreen *screen = data;
|
||||
ScreenInfo *scr_info = screen->compositor_data;
|
||||
|
||||
#if 0
|
||||
g_print ("metacity queueing repaint for %p\n", node);
|
||||
#endif
|
||||
|
||||
if (!scr_info)
|
||||
{
|
||||
/* compositor has been turned off */
|
||||
return;
|
||||
}
|
||||
|
||||
if (!scr_info->idle_id)
|
||||
{
|
||||
scr_info->idle_id = g_idle_add (update, screen);
|
||||
#if 0
|
||||
g_print ("done\n");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
g_print ("one was queued already\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
@@ -679,9 +587,9 @@ meta_compositor_add_window (MetaCompositor *compositor,
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaScreen *screen = meta_screen_for_x_screen (attrs->screen);
|
||||
MetaScreenInfo *minfo = screen->compositor_data;
|
||||
MetaCompScreen *minfo = screen->compositor_data;
|
||||
|
||||
meta_screen_info_add_window (minfo, xwindow);
|
||||
meta_comp_screen_add_window (minfo, xwindow);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -690,12 +598,12 @@ meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaScreenInfo *minfo;
|
||||
|
||||
minfo = meta_screen_info_get_by_xwindow (xwindow);
|
||||
MetaCompScreen *minfo;
|
||||
|
||||
minfo = meta_comp_screen_get_by_xwindow (xwindow);
|
||||
|
||||
if (minfo)
|
||||
meta_screen_info_remove_window (minfo, xwindow);
|
||||
meta_comp_screen_remove_window (minfo, xwindow);
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
@@ -704,16 +612,16 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaScreenInfo *info;
|
||||
MetaCompScreen *info;
|
||||
|
||||
if (screen->compositor_data)
|
||||
return;
|
||||
|
||||
info = meta_screen_info_new (compositor->display, screen);
|
||||
info = meta_comp_screen_new (compositor->display, screen);
|
||||
|
||||
screen->compositor_data = info;
|
||||
|
||||
meta_screen_info_redirect (info);
|
||||
meta_comp_screen_redirect (info);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -722,9 +630,9 @@ meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaScreenInfo *info = screen->compositor_data;
|
||||
MetaCompScreen *info = screen->compositor_data;
|
||||
|
||||
meta_screen_info_unredirect (info);
|
||||
meta_comp_screen_unredirect (info);
|
||||
screen->compositor_data = NULL;
|
||||
#endif
|
||||
}
|
||||
@@ -799,412 +707,15 @@ minimize_deformation (gdouble time,
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
static gdouble
|
||||
interpolate (gdouble t, gdouble begin, gdouble end, double power)
|
||||
{
|
||||
return (begin + (end - begin) * pow (t, power));
|
||||
}
|
||||
|
||||
static void
|
||||
interpolate_rectangle (gdouble t,
|
||||
WsRectangle * from,
|
||||
WsRectangle * to,
|
||||
WsRectangle * result)
|
||||
{
|
||||
if (!result)
|
||||
return;
|
||||
|
||||
result->x = interpolate (t, from->x, to->x, 1);
|
||||
result->y = interpolate (t, from->y, to->y, 1);
|
||||
result->width = interpolate (t, from->width, to->width, 1);
|
||||
result->height = interpolate (t, from->height, to->height, 1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#define MINIMIZE_STYLE 1
|
||||
|
||||
#ifndef HAVE_COMPOSITE_EXTENSIONS
|
||||
#undef MINIMIZE_STYLE
|
||||
#define MINIMIZE_STYLE 0
|
||||
#endif
|
||||
|
||||
#if MINIMIZE_STYLE == 0
|
||||
|
||||
void
|
||||
meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished,
|
||||
gpointer data)
|
||||
{
|
||||
}
|
||||
|
||||
#elif MINIMIZE_STYLE == 1
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaWindow *window;
|
||||
GTimer *timer;
|
||||
|
||||
MetaCompositor *compositor;
|
||||
MetaScreenInfo *scr_info;
|
||||
|
||||
MetaAnimationFinishedFunc finished_func;
|
||||
gpointer finished_data;
|
||||
|
||||
gdouble aspect_ratio;
|
||||
|
||||
WsRectangle current_geometry;
|
||||
WsRectangle target_geometry;
|
||||
gdouble current_alpha;
|
||||
gdouble target_alpha;
|
||||
|
||||
int button_x;
|
||||
int button_y;
|
||||
int button_width;
|
||||
int button_height;
|
||||
|
||||
/* FIXME: maybe would be simpler if all of this was an array */
|
||||
gboolean phase_1_started;
|
||||
gboolean phase_2_started;
|
||||
gboolean phase_3_started;
|
||||
gboolean phase_4_started;
|
||||
gboolean phase_5_started;
|
||||
} MiniInfo;
|
||||
|
||||
static Window
|
||||
get_xid (MetaWindow *window)
|
||||
{
|
||||
if (window->frame)
|
||||
return window->frame->xwindow;
|
||||
else
|
||||
return window->xwindow;
|
||||
}
|
||||
|
||||
static void
|
||||
set_geometry (MiniInfo *info, gdouble elapsed)
|
||||
{
|
||||
WsRectangle rect;
|
||||
|
||||
interpolate_rectangle (elapsed, &info->current_geometry, &info->target_geometry, &rect);
|
||||
|
||||
g_print ("y: %d %d (%f => %d)\n", info->current_geometry.y, info->target_geometry.y,
|
||||
elapsed, rect.y);
|
||||
|
||||
g_print ("setting: %d %d %d %d\n", rect.x, rect.y, rect.width, rect.height);
|
||||
|
||||
meta_screen_info_set_target_rect (info->scr_info,
|
||||
get_xid (info->window), &rect);
|
||||
}
|
||||
|
||||
static int
|
||||
center (gdouble what, gdouble in)
|
||||
{
|
||||
return (in - what) / 2.0 + 0.5;
|
||||
}
|
||||
|
||||
static void
|
||||
run_phase_1 (MiniInfo *info, gdouble elapsed)
|
||||
{
|
||||
if (!info->phase_1_started)
|
||||
{
|
||||
#if 0
|
||||
g_print ("starting phase 1\n");
|
||||
#endif
|
||||
info->phase_1_started = TRUE;
|
||||
|
||||
meta_screen_info_get_real_size (info->scr_info, get_xid (info->window),
|
||||
&info->current_geometry);
|
||||
|
||||
#if 0
|
||||
info->current_geometry.x = info->node->real_x;
|
||||
info->current_geometry.y = info->node->real_y;
|
||||
info->current_geometry.width = info->node->real_width;
|
||||
info->current_geometry.height = info->node->real_height;
|
||||
#endif
|
||||
|
||||
info->target_geometry.height = info->button_height;
|
||||
info->target_geometry.width = info->button_height * info->aspect_ratio;
|
||||
info->target_geometry.x = info->button_x + center (info->target_geometry.width, info->button_width);
|
||||
info->target_geometry.y = info->current_geometry.y + center (info->button_height, info->current_geometry.height);
|
||||
}
|
||||
|
||||
set_geometry (info, elapsed);
|
||||
}
|
||||
|
||||
static void
|
||||
run_phase_2 (MiniInfo *info, gdouble elapsed)
|
||||
{
|
||||
#define WOBBLE_FACTOR 3
|
||||
|
||||
if (!info->phase_2_started)
|
||||
{
|
||||
WsRectangle cur = info->target_geometry;
|
||||
|
||||
g_print ("starting phase 2\n");
|
||||
|
||||
info->phase_2_started = TRUE;
|
||||
|
||||
info->current_geometry = cur;
|
||||
|
||||
info->target_geometry.x = cur.x + center (WOBBLE_FACTOR * cur.width, cur.width);
|
||||
info->target_geometry.y = cur.y + center (WOBBLE_FACTOR * cur.height, cur.height);
|
||||
info->target_geometry.width = cur.width * WOBBLE_FACTOR;
|
||||
info->target_geometry.height = cur.height * WOBBLE_FACTOR;
|
||||
}
|
||||
|
||||
set_geometry (info, elapsed);
|
||||
}
|
||||
|
||||
static void
|
||||
run_phase_3 (MiniInfo *info, gdouble elapsed)
|
||||
{
|
||||
if (!info->phase_3_started)
|
||||
{
|
||||
WsRectangle cur = info->target_geometry;
|
||||
WsRectangle real;
|
||||
|
||||
meta_screen_info_get_real_size (info->scr_info, get_xid (info->window),
|
||||
&real);
|
||||
|
||||
g_print ("starting phase 3\n");
|
||||
info->phase_3_started = TRUE;
|
||||
|
||||
info->current_geometry = cur;
|
||||
|
||||
info->target_geometry.height = info->button_height;
|
||||
info->target_geometry.width = info->button_height * info->aspect_ratio;
|
||||
info->target_geometry.x = info->button_x + center (info->target_geometry.width, info->button_width);
|
||||
info->target_geometry.y = real.y + center (info->button_height, real.height);
|
||||
}
|
||||
|
||||
set_geometry (info, elapsed);
|
||||
}
|
||||
|
||||
static void
|
||||
run_phase_4 (MiniInfo *info, gdouble elapsed)
|
||||
{
|
||||
if (!info->phase_4_started)
|
||||
{
|
||||
WsRectangle cur = info->target_geometry;
|
||||
|
||||
g_print ("starting phase 4\n");
|
||||
info->phase_4_started = TRUE;
|
||||
|
||||
info->current_geometry = cur;
|
||||
|
||||
info->target_geometry.height = info->button_height;
|
||||
info->target_geometry.width = info->button_height * info->aspect_ratio;
|
||||
info->target_geometry.x = cur.x;
|
||||
g_print ("button y: %d\n", info->button_y);
|
||||
info->target_geometry.y = info->button_y;
|
||||
}
|
||||
|
||||
set_geometry (info, elapsed);
|
||||
}
|
||||
|
||||
static void
|
||||
run_phase_5 (MiniInfo *info, gdouble elapsed)
|
||||
{
|
||||
if (!info->phase_5_started)
|
||||
{
|
||||
WsRectangle cur = info->target_geometry;
|
||||
|
||||
g_print ("starting phase 5\n");
|
||||
info->phase_5_started = TRUE;
|
||||
|
||||
info->current_geometry = cur;
|
||||
info->target_geometry.x = info->button_x;
|
||||
info->target_geometry.y = info->button_y;
|
||||
info->target_geometry.width = info->button_width;
|
||||
info->target_geometry.height = info->button_height;
|
||||
}
|
||||
|
||||
set_geometry (info, elapsed);
|
||||
|
||||
meta_screen_info_set_alpha (info->scr_info,
|
||||
get_xid (info->window), 1 - elapsed);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
run_animation_01 (gpointer data)
|
||||
{
|
||||
MiniInfo *info = data;
|
||||
gdouble elapsed;
|
||||
|
||||
elapsed = g_timer_elapsed (info->timer, NULL);
|
||||
|
||||
#define PHASE_0 0.0
|
||||
#define PHASE_1 0.225 /* scale to size of button */
|
||||
#define PHASE_2 0.325 /* scale up a little */
|
||||
#define PHASE_3 0.425 /* scale back a little */
|
||||
#define PHASE_4 0.650 /* move to button */
|
||||
#define PHASE_5 1.0 /* fade out */
|
||||
|
||||
if (elapsed < PHASE_1)
|
||||
{
|
||||
/* phase one */
|
||||
run_phase_1 (info, (elapsed - PHASE_0)/(PHASE_1 - PHASE_0));
|
||||
}
|
||||
else if (elapsed < PHASE_2)
|
||||
{
|
||||
/* phase two */
|
||||
run_phase_2 (info, (elapsed - PHASE_1)/(PHASE_2 - PHASE_1));
|
||||
}
|
||||
else if (elapsed < PHASE_3)
|
||||
{
|
||||
/* phase three */
|
||||
run_phase_3 (info, (elapsed - PHASE_2)/(PHASE_3 - PHASE_2));
|
||||
}
|
||||
else if (elapsed < PHASE_4)
|
||||
{
|
||||
/* phase four */
|
||||
run_phase_4 (info, (elapsed - PHASE_3)/(PHASE_4 - PHASE_3));
|
||||
}
|
||||
else if (elapsed < PHASE_5)
|
||||
{
|
||||
/* phase five */
|
||||
run_phase_5 (info, (elapsed - PHASE_4)/(PHASE_5 - PHASE_4));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (info->finished_func)
|
||||
info->finished_func (info->finished_data);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define EXPLODE_TIME 1.0
|
||||
|
||||
#define BASE 0.5
|
||||
|
||||
static double
|
||||
transform (double in)
|
||||
{
|
||||
return (pow (BASE, in) - 1) / (BASE - 1);
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaWindow * window;
|
||||
gdouble level;
|
||||
GTimer * timer;
|
||||
MetaAnimationFinishedFunc func;
|
||||
gpointer data;
|
||||
MetaScreenInfo * minfo;
|
||||
} ExplodeInfo;
|
||||
|
||||
static gboolean
|
||||
update_explosion (gpointer data)
|
||||
{
|
||||
ExplodeInfo *info = data;
|
||||
gdouble elapsed = g_timer_elapsed (info->timer, NULL);
|
||||
gdouble t = elapsed / EXPLODE_TIME;
|
||||
|
||||
meta_screen_info_set_explode (info->minfo, get_xid (info->window), transform (t));
|
||||
|
||||
if (elapsed > EXPLODE_TIME)
|
||||
{
|
||||
if (info->func)
|
||||
info->func (info->data);
|
||||
|
||||
meta_screen_info_hide_window (info->minfo, get_xid (info->window));
|
||||
meta_screen_info_set_explode (info->minfo, get_xid (info->window), 0.0);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished,
|
||||
gpointer data)
|
||||
{
|
||||
ExplodeInfo *info = g_new0 (ExplodeInfo, 1);
|
||||
|
||||
info->window = window;
|
||||
info->level = 0.0;
|
||||
info->timer = g_timer_new ();
|
||||
info->func = finished;
|
||||
info->data = data;
|
||||
info->minfo = meta_screen_info_get_by_xwindow (get_xid (window));
|
||||
|
||||
g_idle_add (update_explosion, info);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void
|
||||
meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished,
|
||||
gpointer data)
|
||||
{
|
||||
MiniInfo *info = g_new (MiniInfo, 1);
|
||||
WsRectangle start;
|
||||
MetaScreen *screen = window->screen;
|
||||
|
||||
info->window = window;
|
||||
info->timer = g_timer_new ();
|
||||
|
||||
info->finished_func = finished;
|
||||
info->finished_data = data;
|
||||
|
||||
info->phase_1_started = FALSE;
|
||||
info->phase_2_started = FALSE;
|
||||
info->phase_3_started = FALSE;
|
||||
info->phase_4_started = FALSE;
|
||||
info->phase_5_started = FALSE;
|
||||
|
||||
info->button_x = x;
|
||||
info->button_y = y;
|
||||
info->button_width = width;
|
||||
info->button_height = height;
|
||||
|
||||
info->compositor = compositor;
|
||||
info->scr_info = screen->compositor_data;
|
||||
|
||||
#if 0
|
||||
cm_drawable_node_set_deformation_func (node, minimize_deformation, info);
|
||||
#endif
|
||||
|
||||
info->aspect_ratio = 1.3;
|
||||
|
||||
g_idle_add (run_animation_01, info);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaScreenInfo *info = window->screen->compositor_data;
|
||||
MetaCompScreen *info = window->screen->compositor_data;
|
||||
|
||||
meta_screen_info_set_updates (info, get_xid (window), updates);
|
||||
meta_comp_screen_set_updates (info, get_xid (window), updates);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1248,7 +759,7 @@ struct MoveInfo
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
static void
|
||||
void
|
||||
get_patch_points (Model *model,
|
||||
CmPoint points[4][4])
|
||||
{
|
||||
@@ -1274,7 +785,7 @@ static gboolean
|
||||
wobble (gpointer data)
|
||||
{
|
||||
MoveInfo *info = data;
|
||||
MetaScreenInfo *minfo = info->screen->compositor_data;
|
||||
MetaCompScreen *minfo = info->screen->compositor_data;
|
||||
double t = g_timer_elapsed (info->timer, NULL);
|
||||
|
||||
#if 0
|
||||
@@ -1285,7 +796,7 @@ wobble (gpointer data)
|
||||
info->window_destroyed)
|
||||
{
|
||||
if (!info->window_destroyed)
|
||||
meta_screen_info_unset_patch (minfo, get_xid (info->window));
|
||||
meta_comp_screen_unset_patch (minfo, get_xid (info->window));
|
||||
|
||||
move_infos = g_list_remove (move_infos, info);
|
||||
g_free (info);
|
||||
@@ -1308,7 +819,7 @@ wobble (gpointer data)
|
||||
info->last_time = t;
|
||||
|
||||
get_patch_points (info->model, points);
|
||||
meta_screen_info_set_patch (minfo,
|
||||
meta_comp_screen_set_patch (minfo,
|
||||
get_xid (info->window),
|
||||
points);
|
||||
|
||||
@@ -1318,7 +829,7 @@ wobble (gpointer data)
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
void
|
||||
compute_window_rect (MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
{
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity compositing manager */
|
||||
|
||||
/*
|
||||
@@ -27,6 +29,9 @@
|
||||
|
||||
typedef void (* MetaAnimationFinishedFunc) (gpointer data);
|
||||
|
||||
/* XXX namespace me */
|
||||
void compute_window_rect (MetaWindow *window, MetaRectangle *rect);
|
||||
|
||||
MetaCompositor* meta_compositor_new (MetaDisplay *display);
|
||||
void meta_compositor_unref (MetaCompositor *compositor);
|
||||
void meta_compositor_process_event (MetaCompositor *compositor,
|
||||
@@ -45,6 +50,7 @@ void meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
|
||||
#if 0
|
||||
void meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
@@ -53,6 +59,7 @@ void meta_compositor_minimize (MetaCompositor *compositor,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished_cb,
|
||||
gpointer finished_data);
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity size/position constraints */
|
||||
|
||||
/*
|
||||
@@ -97,6 +99,7 @@ typedef enum
|
||||
PRIORITY_MAXIMIZATION = 2,
|
||||
PRIORITY_FULLSCREEN = 2,
|
||||
PRIORITY_SIZE_HINTS_LIMITS = 3,
|
||||
PRIORITY_TITLEBAR_VISIBLE = 4,
|
||||
PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA = 4,
|
||||
PRIORITY_MAXIMUM = 4 // Dummy value used for loop end = max(all priorities)
|
||||
} ConstraintPriority;
|
||||
@@ -165,6 +168,10 @@ static gboolean constrain_fully_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
static gboolean constrain_titlebar_visible (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
static gboolean constrain_partially_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
@@ -209,6 +216,7 @@ static const Constraint all_constraints[] = {
|
||||
{constrain_aspect_ratio, "constrain_aspect_ratio"},
|
||||
{constrain_to_single_xinerama, "constrain_to_single_xinerama"},
|
||||
{constrain_fully_onscreen, "constrain_fully_onscreen"},
|
||||
{constrain_titlebar_visible, "constrain_titlebar_visible"},
|
||||
{constrain_partially_onscreen, "constrain_partially_onscreen"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
@@ -379,10 +387,11 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
if (!info->is_user_action)
|
||||
info->fixed_directions = 0;
|
||||
|
||||
meta_window_get_work_area_current_xinerama (window, &info->work_area_xinerama);
|
||||
|
||||
xinerama_info =
|
||||
meta_screen_get_xinerama_for_window (window->screen, window);
|
||||
meta_screen_get_xinerama_for_rect (window->screen, &info->current);
|
||||
meta_window_get_work_area_for_xinerama (window,
|
||||
xinerama_info->number,
|
||||
&info->work_area_xinerama);
|
||||
info->entire_xinerama = xinerama_info->rect;
|
||||
|
||||
cur_workspace = window->screen->active_workspace;
|
||||
@@ -392,6 +401,23 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
meta_workspace_get_onxinerama_region (cur_workspace,
|
||||
xinerama_info->number);
|
||||
|
||||
/* Workaround braindead legacy apps that don't know how to
|
||||
* fullscreen themselves properly.
|
||||
*/
|
||||
if (meta_rectangle_equal (new, &xinerama_info->rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
/*
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
*/
|
||||
meta_warning (
|
||||
"Treating resize request of legacy application %s as a "
|
||||
"fullscreen request\n",
|
||||
window->desc);
|
||||
meta_window_make_fullscreen_internal (window);
|
||||
}
|
||||
|
||||
/* Log all this information for debugging */
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Setting up constraint info:\n"
|
||||
@@ -434,13 +460,15 @@ place_window_if_needed(MetaWindow *window,
|
||||
|
||||
/* Do placement if any, so we go ahead and apply position
|
||||
* constraints in a move-only context. Don't place
|
||||
* maximized/fullscreen windows until they are unmaximized
|
||||
* and unfullscreened
|
||||
* maximized/minimized/fullscreen windows until they are
|
||||
* unmaximized, unminimized and unfullscreened.
|
||||
*/
|
||||
did_placement = FALSE;
|
||||
if (!window->placed &&
|
||||
window->calc_placement &&
|
||||
!META_WINDOW_MAXIMIZED (window) &&
|
||||
!(window->maximized_horizontally ||
|
||||
window->maximized_vertically) &&
|
||||
!window->minimized &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
MetaRectangle placed_rect = info->orig;
|
||||
@@ -475,53 +503,47 @@ place_window_if_needed(MetaWindow *window,
|
||||
info->fixed_directions = 0;
|
||||
}
|
||||
|
||||
if ((window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement) &&
|
||||
(window->placed || did_placement))
|
||||
if (window->placed || did_placement)
|
||||
{
|
||||
/* define a sane saved_rect so that the user can unmaximize to
|
||||
* something reasonable.
|
||||
*/
|
||||
if (info->current.width >= info->work_area_xinerama.width)
|
||||
{
|
||||
info->current.width = .75 * info->work_area_xinerama.width;
|
||||
info->current.x = info->work_area_xinerama.x +
|
||||
.125 * info->work_area_xinerama.width;
|
||||
}
|
||||
if (info->current.height >= info->work_area_xinerama.height)
|
||||
{
|
||||
info->current.height = .75 * info->work_area_xinerama.height;
|
||||
info->current.y = info->work_area_xinerama.y +
|
||||
.083 * info->work_area_xinerama.height;
|
||||
}
|
||||
|
||||
if (window->maximize_horizontally_after_placement &&
|
||||
if (window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement)
|
||||
meta_window_maximize_internal (window,
|
||||
META_MAXIMIZE_HORIZONTAL |
|
||||
META_MAXIMIZE_VERTICAL,
|
||||
&info->current);
|
||||
else if (window->maximize_horizontally_after_placement)
|
||||
{
|
||||
info->current.x = info->work_area_xinerama.x
|
||||
+ info->fgeom->left_width;
|
||||
info->current.width = info->work_area_xinerama.width
|
||||
- info->fgeom->left_width - info->fgeom->right_width;
|
||||
/* define a sane saved_rect so that the user can unmaximize to
|
||||
* something reasonable.
|
||||
*/
|
||||
if (info->current.width >= info->work_area_xinerama.width)
|
||||
{
|
||||
info->current.width = .75 * info->work_area_xinerama.width;
|
||||
info->current.x = info->work_area_xinerama.x +
|
||||
.125 * info->work_area_xinerama.width;
|
||||
}
|
||||
if (info->current.height >= info->work_area_xinerama.height)
|
||||
{
|
||||
info->current.height = .75 * info->work_area_xinerama.height;
|
||||
info->current.y = info->work_area_xinerama.y +
|
||||
.083 * info->work_area_xinerama.height;
|
||||
}
|
||||
|
||||
if (window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement)
|
||||
meta_window_maximize_internal (window,
|
||||
(window->maximize_horizontally_after_placement ?
|
||||
META_MAXIMIZE_HORIZONTAL : 0 ) |
|
||||
(window->maximize_vertically_after_placement ?
|
||||
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (window->frame && !window->fullscreen)
|
||||
meta_frame_calc_geometry (window->frame, info->fgeom);
|
||||
|
||||
window->maximize_horizontally_after_placement = FALSE;
|
||||
window->maximize_vertically_after_placement = FALSE;
|
||||
}
|
||||
else if (window->maximize_vertically_after_placement);
|
||||
if (window->minimize_after_placement)
|
||||
{
|
||||
info->current.y = info->work_area_xinerama.y
|
||||
+ info->fgeom->top_height;
|
||||
info->current.height = info->work_area_xinerama.height
|
||||
- info->fgeom->top_height - info->fgeom->bottom_height;
|
||||
meta_window_minimize (window);
|
||||
window->minimize_after_placement = FALSE;
|
||||
}
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (window->frame && !window->fullscreen)
|
||||
meta_frame_calc_geometry (window->frame, info->fgeom);
|
||||
|
||||
window->maximize_horizontally_after_placement = FALSE;
|
||||
window->maximize_vertically_after_placement = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,23 +558,33 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
window->type == META_WINDOW_DOCK)
|
||||
return;
|
||||
|
||||
/* USABILITY NOTE: Naturally, I only want the require_fully_onscreen and
|
||||
* require_on_single_xinerama flags to *become false* due to user
|
||||
* interactions (which is allowed since certain constraints are ignored
|
||||
* for user interactions regardless of the setting of these flags).
|
||||
* However, whether to make these flags *become true* due to just an
|
||||
* application interaction is a little trickier. It's possible that
|
||||
* users may find not doing that strange since two application
|
||||
* interactions that resize in opposite ways don't necessarily end up
|
||||
* cancelling--but it may also be strange for the user to have an
|
||||
* application resize the window so that it's onscreen, the user forgets
|
||||
* about it, and then later the app is able to resize itself off the
|
||||
* screen. Anyway, for now, I'm think the latter is the more problematic
|
||||
* case but this may need to be revisited.
|
||||
/* We don't want to update the requirements for fullscreen windows;
|
||||
* fullscreen windows are specially handled anyway, and it updating
|
||||
* the requirements when windows enter fullscreen mode mess up the
|
||||
* handling of the window when it leaves that mode (especially when
|
||||
* the application sends a bunch of configurerequest events). See
|
||||
* #353699.
|
||||
*/
|
||||
if (window->fullscreen)
|
||||
return;
|
||||
|
||||
/* USABILITY NOTE: Naturally, I only want the require_fully_onscreen,
|
||||
* require_on_single_xinerama, and require_titlebar_visible flags to
|
||||
* *become false* due to user interactions (which is allowed since
|
||||
* certain constraints are ignored for user interactions regardless of
|
||||
* the setting of these flags). However, whether to make these flags
|
||||
* *become true* due to just an application interaction is a little
|
||||
* trickier. It's possible that users may find not doing that strange
|
||||
* since two application interactions that resize in opposite ways don't
|
||||
* necessarily end up cancelling--but it may also be strange for the user
|
||||
* to have an application resize the window so that it's onscreen, the
|
||||
* user forgets about it, and then later the app is able to resize itself
|
||||
* off the screen. Anyway, for now, I think the latter is the more
|
||||
* problematic case but this may need to be revisited.
|
||||
*/
|
||||
|
||||
/* The require onscreen/on-single-xinerama stuff is relative to the
|
||||
* outer window, not the inner
|
||||
/* The require onscreen/on-single-xinerama and titlebar_visible
|
||||
* stuff is relative to the outer window, not the inner
|
||||
*/
|
||||
extend_by_frame (&info->current, info->fgeom);
|
||||
|
||||
@@ -582,6 +614,26 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
window->desc,
|
||||
window->require_on_single_xinerama ? "TRUE" : "FALSE");
|
||||
|
||||
/* Update whether we want future constraint runs to require the
|
||||
* titlebar to be visible.
|
||||
*/
|
||||
if (window->frame && window->decorated)
|
||||
{
|
||||
MetaRectangle titlebar_rect;
|
||||
|
||||
titlebar_rect = info->current;
|
||||
titlebar_rect.height = info->fgeom->top_height;
|
||||
old = window->require_titlebar_visible;
|
||||
window->require_titlebar_visible =
|
||||
meta_rectangle_overlaps_with_region (info->usable_screen_region,
|
||||
&titlebar_rect);
|
||||
if (old ^ window->require_titlebar_visible)
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"require_titlebar_visible for %s toggled to %s\n",
|
||||
window->desc,
|
||||
window->require_titlebar_visible ? "TRUE" : "FALSE");
|
||||
}
|
||||
|
||||
/* Don't forget to restore the position of the window */
|
||||
unextend_by_frame (&info->current, info->fgeom);
|
||||
}
|
||||
@@ -640,7 +692,7 @@ constrain_maximization (MetaWindow *window,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size, work_area;
|
||||
gboolean hminbad, vminbad, hmaxbad, vmaxbad;
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
@@ -657,9 +709,7 @@ constrain_maximization (MetaWindow *window,
|
||||
|
||||
hminbad = work_area.width < min_size.width && window->maximized_horizontally;
|
||||
vminbad = work_area.height < min_size.height && window->maximized_vertically;
|
||||
hmaxbad = work_area.width > max_size.width && window->maximized_horizontally;
|
||||
vmaxbad = work_area.height > max_size.height && window->maximized_vertically;
|
||||
if (hminbad || vminbad || hmaxbad || vmaxbad)
|
||||
if (hminbad || vminbad)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
@@ -787,8 +837,13 @@ constrain_size_limits (MetaWindow *window,
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
too_big = !meta_rectangle_could_fit_rect (&info->current, &min_size);
|
||||
too_small = !meta_rectangle_could_fit_rect (&max_size, &info->current);
|
||||
/* We ignore max-size limits for maximized windows; see #327543 */
|
||||
if (window->maximized_horizontally)
|
||||
max_size.width = MAX (max_size.width, info->current.width);
|
||||
if (window->maximized_vertically)
|
||||
max_size.height = MAX (max_size.height, info->current.height);
|
||||
too_small = !meta_rectangle_could_fit_rect (&info->current, &min_size);
|
||||
too_big = !meta_rectangle_could_fit_rect (&max_size, &info->current);
|
||||
constraint_already_satisfied = !too_big && !too_small;
|
||||
if (check_only || constraint_already_satisfied)
|
||||
return constraint_already_satisfied;
|
||||
@@ -1042,6 +1097,7 @@ constrain_fully_onscreen (MetaWindow *window,
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->fullscreen ||
|
||||
!window->require_fully_onscreen ||
|
||||
info->is_user_action)
|
||||
return TRUE;
|
||||
@@ -1053,6 +1109,94 @@ constrain_fully_onscreen (MetaWindow *window,
|
||||
check_only);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_titlebar_visible (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
gboolean unconstrained_user_action;
|
||||
gboolean retval;
|
||||
int bottom_amount;
|
||||
int horiz_amount_offscreen, vert_amount_offscreen;
|
||||
int horiz_amount_onscreen, vert_amount_onscreen;
|
||||
|
||||
if (priority > PRIORITY_TITLEBAR_VISIBLE)
|
||||
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.
|
||||
*/
|
||||
unconstrained_user_action =
|
||||
info->is_user_action &&
|
||||
window->display->grab_anchor_root_y >= window->display->grab_initial_window_pos.y;
|
||||
|
||||
/* 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
|
||||
* "onscreen" by their own strut).
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->fullscreen ||
|
||||
!window->require_titlebar_visible ||
|
||||
!window->decorated ||
|
||||
unconstrained_user_action)
|
||||
return TRUE;
|
||||
|
||||
/* Determine how much offscreen things are allowed. We first need to
|
||||
* figure out how much must remain on the screen. For that, we use 25%
|
||||
* window width/height but clamp to the range of (10,75) pixels. This is
|
||||
* somewhat of a seat of my pants random guess at what might look good.
|
||||
* Then, the amount that is allowed off is just the window size minus
|
||||
* this amount (but no less than 0 for tiny windows).
|
||||
*/
|
||||
horiz_amount_onscreen = info->current.width / 4;
|
||||
vert_amount_onscreen = info->current.height / 4;
|
||||
horiz_amount_onscreen = CLAMP (horiz_amount_onscreen, 10, 75);
|
||||
vert_amount_onscreen = CLAMP (vert_amount_onscreen, 10, 75);
|
||||
horiz_amount_offscreen = info->current.width - horiz_amount_onscreen;
|
||||
vert_amount_offscreen = info->current.height - vert_amount_onscreen;
|
||||
horiz_amount_offscreen = MAX (horiz_amount_offscreen, 0);
|
||||
vert_amount_offscreen = MAX (vert_amount_offscreen, 0);
|
||||
/* Allow the titlebar to touch the bottom panel; If there is no titlebar,
|
||||
* require vert_amount to remain on the screen.
|
||||
*/
|
||||
if (window->frame)
|
||||
{
|
||||
bottom_amount = info->current.height + info->fgeom->bottom_height;
|
||||
vert_amount_onscreen = info->fgeom->top_height;
|
||||
}
|
||||
else
|
||||
bottom_amount = vert_amount_offscreen;
|
||||
|
||||
/* Extend the region, have a helper function handle the constraint,
|
||||
* then return the region to its original size.
|
||||
*/
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
horiz_amount_offscreen,
|
||||
horiz_amount_offscreen,
|
||||
0, /* Don't let titlebar off */
|
||||
bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
retval =
|
||||
do_screen_and_xinerama_relative_constraints (window,
|
||||
info->usable_screen_region,
|
||||
info,
|
||||
check_only);
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
-horiz_amount_offscreen,
|
||||
-horiz_amount_offscreen,
|
||||
0, /* Don't let titlebar off */
|
||||
-bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_partially_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity size/position constraints */
|
||||
|
||||
/*
|
||||
|
376
src/core.c
376
src/core.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity interface used by GTK+ UI to talk to core */
|
||||
|
||||
/*
|
||||
@@ -27,11 +29,20 @@
|
||||
#include "workspace.h"
|
||||
#include "prefs.h"
|
||||
|
||||
void
|
||||
meta_core_get_client_size (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *width,
|
||||
int *height)
|
||||
/* Looks up the MetaWindow representing the frame of the given X window.
|
||||
* Used as a helper function by a bunch of the functions below.
|
||||
*
|
||||
* FIXME: The functions that use this function throw the result away
|
||||
* after use. Many of these functions tend to be called in small groups,
|
||||
* which results in get_window() getting called several times in succession
|
||||
* with the same parameters. We should profile to see whether this wastes
|
||||
* much time, and if it does we should look into a generalised
|
||||
* meta_core_get_window_info() which takes a bunch of pointers to variables
|
||||
* to put its results in, and only fills in the non-null ones.
|
||||
*/
|
||||
static MetaWindow *
|
||||
get_window (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
@@ -40,7 +51,21 @@ meta_core_get_client_size (Display *xdisplay,
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
{
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_client_size (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (width)
|
||||
*width = window->rect.width;
|
||||
@@ -49,8 +74,8 @@ meta_core_get_client_size (Display *xdisplay,
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
meta_core_window_has_frame (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
@@ -58,25 +83,23 @@ meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
return window != NULL && window->frame != NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return meta_window_titlebar_is_onscreen (window);
|
||||
}
|
||||
|
||||
|
||||
Window
|
||||
meta_core_get_client_xwindow (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->xwindow;
|
||||
}
|
||||
@@ -85,15 +108,8 @@ MetaFrameFlags
|
||||
meta_core_get_frame_flags (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
return meta_frame_get_flags (window->frame);
|
||||
}
|
||||
|
||||
@@ -101,15 +117,10 @@ MetaFrameType
|
||||
meta_core_get_frame_type (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaFrameType base_type;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
base_type = META_FRAME_TYPE_LAST;
|
||||
|
||||
@@ -156,14 +167,7 @@ GdkPixbuf*
|
||||
meta_core_get_mini_icon (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->mini_icon;
|
||||
}
|
||||
@@ -172,14 +176,7 @@ GdkPixbuf*
|
||||
meta_core_get_icon (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->icon;
|
||||
}
|
||||
@@ -188,14 +185,7 @@ void
|
||||
meta_core_queue_frame_resize (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_queue_move_resize (window);
|
||||
}
|
||||
@@ -206,14 +196,7 @@ meta_core_user_move (Display *xdisplay,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_move (window, TRUE, x, y);
|
||||
}
|
||||
@@ -225,14 +208,7 @@ meta_core_user_resize (Display *xdisplay,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_resize_with_gravity (window, TRUE, width, height, gravity);
|
||||
}
|
||||
@@ -241,14 +217,7 @@ void
|
||||
meta_core_user_raise (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_raise (window);
|
||||
}
|
||||
@@ -256,16 +225,9 @@ meta_core_user_raise (Display *xdisplay,
|
||||
void
|
||||
meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_lower (window);
|
||||
|
||||
@@ -306,16 +268,9 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
void
|
||||
meta_core_user_focus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_focus (window, timestamp);
|
||||
}
|
||||
@@ -326,14 +281,7 @@ meta_core_get_position (Display *xdisplay,
|
||||
int *x,
|
||||
int *y)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_get_position (window, x, y);
|
||||
}
|
||||
@@ -344,14 +292,7 @@ meta_core_get_size (Display *xdisplay,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (width)
|
||||
*width = window->rect.width;
|
||||
@@ -364,14 +305,7 @@ void
|
||||
meta_core_minimize (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_minimize (window);
|
||||
}
|
||||
@@ -380,14 +314,7 @@ void
|
||||
meta_core_maximize (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
@@ -400,14 +327,7 @@ void
|
||||
meta_core_toggle_maximize (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
@@ -424,14 +344,7 @@ void
|
||||
meta_core_unmaximize (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
@@ -445,78 +358,63 @@ meta_core_delete (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_delete (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_unshade (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
meta_window_unshade (window);
|
||||
meta_window_unshade (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_shade (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
meta_window_shade (window);
|
||||
meta_window_shade (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_unstick (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_unstick (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_make_above (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_make_above (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_unmake_above (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_unmake_above (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_stick (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_stick (window);
|
||||
}
|
||||
@@ -526,14 +424,7 @@ meta_core_change_workspace (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int new_workspace)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_change_workspace (window,
|
||||
meta_screen_get_workspace_by_index (window->screen,
|
||||
@@ -564,14 +455,7 @@ int
|
||||
meta_core_get_frame_workspace (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);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return meta_window_get_net_wm_desktop (window);
|
||||
}
|
||||
@@ -584,14 +468,7 @@ meta_core_get_frame_extents (Display *xdisplay,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (x)
|
||||
*x = window->frame->rect.x;
|
||||
@@ -610,17 +487,10 @@ meta_core_show_window_menu (Display *xdisplay,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
meta_window_focus (window, timestamp);
|
||||
@@ -763,23 +633,19 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaScreen *screen;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
screen = meta_display_screen_for_xwindow (display, frame_xwindow);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
g_assert (screen != NULL);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
op, pointer_already_grabbed,
|
||||
event_serial,
|
||||
@@ -789,7 +655,7 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
|
||||
void
|
||||
meta_core_end_grab_op (Display *xdisplay,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
@@ -847,7 +713,7 @@ meta_core_grab_buttons (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
|
||||
meta_verbose ("Grabbing buttons on frame 0x%lx\n", frame_xwindow);
|
||||
@@ -859,14 +725,7 @@ meta_core_set_screen_cursor (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_on_screen);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_on_screen);
|
||||
MetaWindow *window = get_window (xdisplay, frame_on_screen);
|
||||
|
||||
meta_frame_set_screen_cursor (window->frame, cursor);
|
||||
}
|
||||
@@ -877,14 +736,7 @@ meta_core_get_screen_size (Display *xdisplay,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_on_screen);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_on_screen);
|
||||
MetaWindow *window = get_window (xdisplay, frame_on_screen);
|
||||
|
||||
if (width)
|
||||
*width = window->screen->rect.width;
|
||||
@@ -902,3 +754,31 @@ meta_core_increment_event_serial (Display *xdisplay)
|
||||
meta_display_increment_event_serial (display);
|
||||
}
|
||||
|
||||
void
|
||||
meta_invalidate_default_icons (void)
|
||||
{
|
||||
GSList *displays, *windows;
|
||||
|
||||
for (displays = meta_displays_list ();
|
||||
displays != NULL;
|
||||
displays = displays->next)
|
||||
{
|
||||
|
||||
for (windows = meta_display_list_windows (displays->data);
|
||||
windows != NULL;
|
||||
windows = windows->next)
|
||||
{
|
||||
|
||||
MetaWindow *window = (MetaWindow*)windows->data;
|
||||
|
||||
if (window->icon_cache.origin == USING_FALLBACK_ICON)
|
||||
{
|
||||
meta_icon_cache_free (&(window->icon_cache));
|
||||
meta_window_update_icon_now (window);
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
}
|
||||
|
||||
|
28
src/core.h
28
src/core.h
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity interface used by GTK+ UI to talk to core */
|
||||
|
||||
/*
|
||||
@@ -35,6 +37,10 @@ void meta_core_get_client_size (Display *xdisplay,
|
||||
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);
|
||||
|
||||
@@ -66,11 +72,11 @@ void meta_core_user_raise (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_core_user_focus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
/* get position of client, same coord space expected by move */
|
||||
void meta_core_get_position (Display *xdisplay,
|
||||
@@ -95,13 +101,19 @@ void meta_core_delete (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp);
|
||||
void meta_core_unshade (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp);
|
||||
void meta_core_shade (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp);
|
||||
void meta_core_unstick (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_stick (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_unmake_above (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_make_above (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_change_workspace (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int new_workspace);
|
||||
@@ -127,7 +139,7 @@ void meta_core_show_window_menu (Display *xdisplay,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
int workspace,
|
||||
@@ -141,11 +153,11 @@ gboolean meta_core_begin_grab_op (Display *xdisplay,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y);
|
||||
void meta_core_end_grab_op (Display *xdisplay,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
MetaGrabOp meta_core_get_grab_op (Display *xdisplay);
|
||||
Window meta_core_get_grab_frame (Display *xdisplay);
|
||||
int meta_core_get_grab_button (Display *xdisplay);
|
||||
@@ -171,6 +183,8 @@ void meta_core_increment_event_serial (Display *display);
|
||||
|
||||
int meta_ui_get_last_event_serial (Display *xdisplay);
|
||||
|
||||
void meta_invalidate_default_icons (void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
20
src/delete.c
20
src/delete.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity window deletion */
|
||||
|
||||
/*
|
||||
@@ -34,12 +36,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void meta_window_present_delete_dialog (MetaWindow *window);
|
||||
static void meta_window_present_delete_dialog (MetaWindow *window,
|
||||
guint32 timestamp);
|
||||
|
||||
static void
|
||||
delete_ping_reply_func (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
void *user_data)
|
||||
{
|
||||
meta_topic (META_DEBUG_PING,
|
||||
@@ -292,7 +295,7 @@ io_from_ping_dialog (GIOChannel *channel,
|
||||
static void
|
||||
delete_ping_timeout_func (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
void *user_data)
|
||||
{
|
||||
MetaWindow *window = user_data;
|
||||
@@ -311,14 +314,14 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
|
||||
if (window->dialog_pid >= 0)
|
||||
{
|
||||
meta_window_present_delete_dialog (window);
|
||||
meta_window_present_delete_dialog (window, timestamp);
|
||||
return;
|
||||
}
|
||||
|
||||
window_id_str = g_strdup_printf ("0x%lx", window->xwindow);
|
||||
|
||||
sprintf (numbuf, "%d", window->screen->number);
|
||||
sprintf (timestampbuf, "%lu", timestamp);
|
||||
sprintf (timestampbuf, "%u", timestamp);
|
||||
|
||||
argv[0] = METACITY_LIBEXECDIR"/metacity-dialog";
|
||||
argv[1] = "--screen";
|
||||
@@ -364,7 +367,7 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
|
||||
void
|
||||
meta_window_delete (MetaWindow *window,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
meta_error_trap_push (window->display);
|
||||
if (window->delete_window)
|
||||
@@ -476,7 +479,7 @@ meta_window_free_delete_dialog (MetaWindow *window)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_present_delete_dialog (MetaWindow *window)
|
||||
meta_window_present_delete_dialog (MetaWindow *window, guint32 timestamp)
|
||||
{
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Presenting existing ping dialog for %s\n",
|
||||
@@ -501,8 +504,7 @@ meta_window_present_delete_dialog (MetaWindow *window)
|
||||
w->res_class &&
|
||||
g_strcasecmp (w->res_class, "metacity-dialog") == 0)
|
||||
{
|
||||
meta_window_activate (w,
|
||||
meta_display_get_current_time (w->display));
|
||||
meta_window_activate (w, timestamp);
|
||||
break;
|
||||
}
|
||||
|
||||
|
382
src/display.c
382
src/display.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X display handler */
|
||||
|
||||
/*
|
||||
@@ -65,8 +67,6 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#define USE_GDK_DISPLAY
|
||||
|
||||
#define GRAB_OP_IS_WINDOW_SWITCH(g) \
|
||||
(g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
|
||||
g == META_GRAB_OP_KEYBOARD_TABBING_DOCK || \
|
||||
@@ -78,12 +78,12 @@
|
||||
typedef struct
|
||||
{
|
||||
MetaDisplay *display;
|
||||
Window xwindow;
|
||||
Time timestamp;
|
||||
Window xwindow;
|
||||
guint32 timestamp;
|
||||
MetaWindowPingFunc ping_reply_func;
|
||||
MetaWindowPingFunc ping_timeout_func;
|
||||
void *user_data;
|
||||
guint ping_timeout_id;
|
||||
void *user_data;
|
||||
guint ping_timeout_id;
|
||||
} MetaPingData;
|
||||
|
||||
typedef struct
|
||||
@@ -96,10 +96,6 @@ static GSList *all_displays = NULL;
|
||||
|
||||
static void meta_spew_event (MetaDisplay *display,
|
||||
XEvent *event);
|
||||
#ifndef USE_GDK_DISPLAY
|
||||
static void event_queue_callback (XEvent *event,
|
||||
gpointer data);
|
||||
#endif
|
||||
|
||||
static gboolean event_callback (XEvent *event,
|
||||
gpointer data);
|
||||
@@ -122,7 +118,7 @@ static void prefs_changed_callback (MetaPreference pref,
|
||||
void *data);
|
||||
|
||||
static void sanity_check_timestamps (MetaDisplay *display,
|
||||
Time known_good_timestamp);
|
||||
guint32 known_good_timestamp);
|
||||
|
||||
MetaGroup* get_focussed_group (MetaDisplay *display);
|
||||
|
||||
@@ -232,14 +228,14 @@ disable_compositor (MetaDisplay *display)
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_display_open (const char *name)
|
||||
meta_display_open (void)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
Display *xdisplay;
|
||||
GSList *screens;
|
||||
GSList *tmp;
|
||||
int i;
|
||||
Time timestamp;
|
||||
guint32 timestamp;
|
||||
/* Remember to edit code that assigns each atom to display struct
|
||||
* when adding an atom name here.
|
||||
*/
|
||||
@@ -341,18 +337,14 @@ meta_display_open (const char *name)
|
||||
};
|
||||
Atom atoms[G_N_ELEMENTS(atom_names)];
|
||||
|
||||
meta_verbose ("Opening display '%s'\n", XDisplayName (name));
|
||||
meta_verbose ("Opening display '%s'\n", XDisplayName (NULL));
|
||||
|
||||
#ifdef USE_GDK_DISPLAY
|
||||
xdisplay = meta_ui_get_display (name);
|
||||
#else
|
||||
xdisplay = XOpenDisplay (name);
|
||||
#endif
|
||||
xdisplay = meta_ui_get_display ();
|
||||
|
||||
if (xdisplay == NULL)
|
||||
{
|
||||
meta_warning (_("Failed to open X Window System display '%s'\n"),
|
||||
XDisplayName (name));
|
||||
XDisplayName (NULL));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -367,12 +359,13 @@ meta_display_open (const char *name)
|
||||
* probably put in, vs. DisplayString(display) which is
|
||||
* canonicalized by XOpenDisplay()
|
||||
*/
|
||||
display->name = g_strdup (XDisplayName (name));
|
||||
display->name = g_strdup (XDisplayName (NULL));
|
||||
display->xdisplay = xdisplay;
|
||||
display->error_trap_synced_at_last_pop = TRUE;
|
||||
display->error_traps = 0;
|
||||
display->error_trap_handler = NULL;
|
||||
display->server_grab_count = 0;
|
||||
display->display_opening = TRUE;
|
||||
|
||||
display->pending_pings = NULL;
|
||||
display->autoraise_timeout_id = 0;
|
||||
@@ -526,18 +519,12 @@ meta_display_open (const char *name)
|
||||
sn_error_trap_pop);
|
||||
#endif
|
||||
|
||||
#ifdef USE_GDK_DISPLAY
|
||||
display->events = NULL;
|
||||
|
||||
/* Get events */
|
||||
meta_ui_add_event_func (display->xdisplay,
|
||||
event_callback,
|
||||
display);
|
||||
#else
|
||||
display->events = meta_event_queue_new (display->xdisplay,
|
||||
event_queue_callback,
|
||||
display);
|
||||
#endif
|
||||
|
||||
display->window_ids = g_hash_table_new (meta_unsigned_long_hash,
|
||||
meta_unsigned_long_equal);
|
||||
@@ -556,7 +543,9 @@ meta_display_open (const char *name)
|
||||
display->grab_resize_timeout_id = 0;
|
||||
display->grab_have_keyboard = FALSE;
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
display->last_bell_time = 0;
|
||||
#endif
|
||||
|
||||
display->grab_op = META_GRAB_OP_NONE;
|
||||
display->grab_wireframe_active = FALSE;
|
||||
@@ -721,7 +710,7 @@ meta_display_open (const char *name)
|
||||
/* This would typically happen because all the screens already
|
||||
* have window managers.
|
||||
*/
|
||||
meta_display_close (display);
|
||||
meta_display_close (display, timestamp);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -781,6 +770,9 @@ meta_display_open (const char *name)
|
||||
if (meta_prefs_get_compositing_manager ())
|
||||
enable_compositor (display);
|
||||
|
||||
/* Done opening new display */
|
||||
display->display_opening = FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -856,7 +848,8 @@ meta_display_list_windows (MetaDisplay *display)
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_close (MetaDisplay *display)
|
||||
meta_display_close (MetaDisplay *display,
|
||||
guint32 timestamp)
|
||||
{
|
||||
GSList *tmp;
|
||||
|
||||
@@ -872,19 +865,17 @@ meta_display_close (MetaDisplay *display)
|
||||
if (display->grab_old_window_stacking)
|
||||
g_list_free (display->grab_old_window_stacking);
|
||||
|
||||
#ifdef USE_GDK_DISPLAY
|
||||
/* Stop caring about events */
|
||||
meta_ui_remove_event_func (display->xdisplay,
|
||||
event_callback,
|
||||
display);
|
||||
#endif
|
||||
|
||||
/* Free all screens */
|
||||
tmp = display->screens;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaScreen *screen = tmp->data;
|
||||
meta_screen_free (screen);
|
||||
meta_screen_free (screen, timestamp);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
@@ -912,17 +903,14 @@ meta_display_close (MetaDisplay *display)
|
||||
meta_display_free_window_prop_hooks (display);
|
||||
meta_display_free_group_prop_hooks (display);
|
||||
|
||||
#ifndef USE_GDK_DISPLAY
|
||||
meta_event_queue_free (display->events);
|
||||
XCloseDisplay (display->xdisplay);
|
||||
#endif
|
||||
g_free (display->name);
|
||||
|
||||
all_displays = g_slist_remove (all_displays, display);
|
||||
|
||||
meta_display_shutdown_keys (display);
|
||||
|
||||
meta_compositor_unref (display->compositor);
|
||||
if (display->compositor)
|
||||
meta_compositor_unref (display->compositor);
|
||||
|
||||
g_free (display);
|
||||
|
||||
@@ -1058,14 +1046,26 @@ meta_displays_list (void)
|
||||
|
||||
static gboolean dump_events = TRUE;
|
||||
|
||||
#ifndef USE_GDK_DISPLAY
|
||||
static void
|
||||
event_queue_callback (XEvent *event,
|
||||
gpointer data)
|
||||
static gboolean
|
||||
grab_op_is_mouse_only (MetaGrabOp op)
|
||||
{
|
||||
event_callback (event, data);
|
||||
switch (op)
|
||||
{
|
||||
case META_GRAB_OP_MOVING:
|
||||
case META_GRAB_OP_RESIZING_SE:
|
||||
case META_GRAB_OP_RESIZING_S:
|
||||
case META_GRAB_OP_RESIZING_SW:
|
||||
case META_GRAB_OP_RESIZING_N:
|
||||
case META_GRAB_OP_RESIZING_NE:
|
||||
case META_GRAB_OP_RESIZING_NW:
|
||||
case META_GRAB_OP_RESIZING_W:
|
||||
case META_GRAB_OP_RESIZING_E:
|
||||
return TRUE;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
grab_op_is_mouse (MetaGrabOp op)
|
||||
@@ -1780,9 +1780,9 @@ event_callback (XEvent *event,
|
||||
else
|
||||
mode = ReplayPointer; /* give event back */
|
||||
|
||||
meta_verbose ("Allowing events mode %s time %lu\n",
|
||||
meta_verbose ("Allowing events mode %s time %u\n",
|
||||
mode == AsyncPointer ? "AsyncPointer" : "ReplayPointer",
|
||||
(unsigned long) event->xbutton.time);
|
||||
(unsigned int)event->xbutton.time);
|
||||
|
||||
XAllowEvents (display->xdisplay,
|
||||
mode, event->xbutton.time);
|
||||
@@ -1853,6 +1853,7 @@ event_callback (XEvent *event,
|
||||
{
|
||||
case META_FOCUS_MODE_SLOPPY:
|
||||
case META_FOCUS_MODE_MOUSE:
|
||||
display->mouse_mode = TRUE;
|
||||
if (window->type != META_WINDOW_DOCK &&
|
||||
window->type != META_WINDOW_DESKTOP)
|
||||
{
|
||||
@@ -1864,21 +1865,41 @@ event_callback (XEvent *event,
|
||||
event->xany.serial,
|
||||
event->xcrossing.time);
|
||||
|
||||
display->mouse_mode = TRUE;
|
||||
meta_window_focus (window, event->xcrossing.time);
|
||||
|
||||
/* stop ignoring stuff */
|
||||
reset_ignores (display);
|
||||
|
||||
if (meta_prefs_get_auto_raise ())
|
||||
{
|
||||
/* stop ignoring stuff */
|
||||
reset_ignores (display);
|
||||
|
||||
if (meta_prefs_get_auto_raise ())
|
||||
{
|
||||
meta_display_queue_autoraise_callback (display, window);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Auto raise is disabled\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Auto raise is disabled\n");
|
||||
}
|
||||
}
|
||||
/* In mouse focus mode, we defocus when the mouse *enters*
|
||||
* the DESKTOP window, instead of defocusing on LeaveNotify.
|
||||
* This is because having the mouse enter override-redirect
|
||||
* child windows unfortunately causes LeaveNotify events that
|
||||
* we can't distinguish from the mouse actually leaving the
|
||||
* toplevel window as we expect. But, since we filter out
|
||||
* EnterNotify events on override-redirect windows, this
|
||||
* alternative mechanism works great.
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP &&
|
||||
meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE &&
|
||||
display->expected_focus_window != NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Unsetting focus from %s due to mouse entering "
|
||||
"the DESKTOP window\n",
|
||||
display->expected_focus_window->desc);
|
||||
meta_display_focus_the_no_focus_window (display,
|
||||
window->screen,
|
||||
event->xcrossing.time);
|
||||
}
|
||||
break;
|
||||
case META_FOCUS_MODE_CLICK:
|
||||
@@ -1896,40 +1917,6 @@ event_callback (XEvent *event,
|
||||
meta_window_handle_mouse_grab_op_event (window, event);
|
||||
else if (window != NULL)
|
||||
{
|
||||
switch (meta_prefs_get_focus_mode ())
|
||||
{
|
||||
case META_FOCUS_MODE_MOUSE:
|
||||
if ((window->frame == NULL || frame_was_receiver) &&
|
||||
event->xcrossing.mode != NotifyGrab &&
|
||||
event->xcrossing.mode != NotifyUngrab &&
|
||||
event->xcrossing.detail != NotifyInferior &&
|
||||
meta_display_focus_sentinel_clear (display))
|
||||
{
|
||||
if (window == display->expected_focus_window)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Unsetting focus from %s due to LeaveNotify\n",
|
||||
window->desc);
|
||||
meta_display_focus_the_no_focus_window (display,
|
||||
window->screen,
|
||||
event->xcrossing.time);
|
||||
}
|
||||
if (window->type != META_WINDOW_DOCK &&
|
||||
window->type != META_WINDOW_DESKTOP)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Setting display->mouse_mode to TRUE due to "
|
||||
"LeaveNotify at time %lu.\n",
|
||||
event->xcrossing.time);
|
||||
display->mouse_mode = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case META_FOCUS_MODE_SLOPPY:
|
||||
case META_FOCUS_MODE_CLICK:
|
||||
break;
|
||||
}
|
||||
|
||||
if (window->type == META_WINDOW_DOCK &&
|
||||
event->xcrossing.mode != NotifyGrab &&
|
||||
event->xcrossing.mode != NotifyUngrab &&
|
||||
@@ -2007,9 +1994,16 @@ event_callback (XEvent *event,
|
||||
case DestroyNotify:
|
||||
if (window)
|
||||
{
|
||||
/* FIXME: It sucks that DestroyNotify events don't come with
|
||||
* a timestamp; could we do something better here? Maybe X
|
||||
* will change one day?
|
||||
*/
|
||||
guint32 timestamp;
|
||||
timestamp = meta_display_get_current_time_roundtrip (display);
|
||||
|
||||
if (display->grab_op != META_GRAB_OP_NONE &&
|
||||
display->grab_window == window)
|
||||
meta_display_end_grab_op (display, CurrentTime);
|
||||
meta_display_end_grab_op (display, timestamp);
|
||||
|
||||
if (frame_was_receiver)
|
||||
{
|
||||
@@ -2021,7 +2015,8 @@ event_callback (XEvent *event,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_window_free (window); /* Unmanage destroyed window */
|
||||
/* Unmanage destroyed window */
|
||||
meta_window_free (window, timestamp);
|
||||
window = NULL;
|
||||
}
|
||||
}
|
||||
@@ -2029,10 +2024,17 @@ event_callback (XEvent *event,
|
||||
case UnmapNotify:
|
||||
if (window)
|
||||
{
|
||||
/* FIXME: It sucks that UnmapNotify events don't come with
|
||||
* a timestamp; could we do something better here? Maybe X
|
||||
* will change one day?
|
||||
*/
|
||||
guint32 timestamp;
|
||||
timestamp = meta_display_get_current_time_roundtrip (display);
|
||||
|
||||
if (display->grab_op != META_GRAB_OP_NONE &&
|
||||
display->grab_window == window &&
|
||||
((window->frame == NULL) || !window->frame->mapped))
|
||||
meta_display_end_grab_op (display, CurrentTime);
|
||||
meta_display_end_grab_op (display, timestamp);
|
||||
|
||||
if (!frame_was_receiver)
|
||||
{
|
||||
@@ -2041,8 +2043,12 @@ event_callback (XEvent *event,
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Window %s withdrawn\n",
|
||||
window->desc);
|
||||
|
||||
meta_effect_run_close (window, NULL, NULL);
|
||||
|
||||
/* Unmanage withdrawn window */
|
||||
window->withdrawn = TRUE;
|
||||
meta_window_free (window); /* Unmanage withdrawn window */
|
||||
meta_window_free (window, timestamp);
|
||||
window = NULL;
|
||||
}
|
||||
else
|
||||
@@ -2210,7 +2216,12 @@ event_callback (XEvent *event,
|
||||
/* do this here instead of at end of function
|
||||
* so we can return
|
||||
*/
|
||||
|
||||
/* FIXME: Clearing display->current_time here makes no sense to
|
||||
* me; who put this here and why?
|
||||
*/
|
||||
display->current_time = CurrentTime;
|
||||
|
||||
process_selection_clear (display, event);
|
||||
/* Note that processing that may have resulted in
|
||||
* closing the display... so return right away.
|
||||
@@ -2251,8 +2262,8 @@ event_callback (XEvent *event,
|
||||
time = event->xclient.data.l[1];
|
||||
|
||||
meta_verbose ("Request to change current workspace to %d with "
|
||||
"specified timestamp of %lu\n",
|
||||
space, (unsigned long)time);
|
||||
"specified timestamp of %u\n",
|
||||
space, time);
|
||||
|
||||
workspace =
|
||||
meta_screen_get_workspace_by_index (screen,
|
||||
@@ -2260,7 +2271,12 @@ event_callback (XEvent *event,
|
||||
|
||||
/* Handle clients using the older version of the spec... */
|
||||
if (time == 0 && workspace)
|
||||
time = meta_display_get_current_time_roundtrip (display);
|
||||
{
|
||||
meta_warning ("Received a NET_CURRENT_DESKTOP message "
|
||||
"from a broken (outdated) client who sent "
|
||||
"a 0 timestamp\n");
|
||||
time = meta_display_get_current_time_roundtrip (display);
|
||||
}
|
||||
|
||||
if (workspace)
|
||||
meta_workspace_activate (workspace, time);
|
||||
@@ -2279,22 +2295,26 @@ event_callback (XEvent *event,
|
||||
|
||||
meta_prefs_set_num_workspaces (num_spaces);
|
||||
}
|
||||
else if (event->xclient.message_type ==
|
||||
display->atom_net_showing_desktop)
|
||||
{
|
||||
gboolean showing_desktop;
|
||||
else if (event->xclient.message_type ==
|
||||
display->atom_net_showing_desktop)
|
||||
{
|
||||
gboolean showing_desktop;
|
||||
guint32 timestamp;
|
||||
|
||||
showing_desktop = event->xclient.data.l[0] != 0;
|
||||
meta_verbose ("Request to %s desktop\n", showing_desktop ? "show" : "hide");
|
||||
showing_desktop = event->xclient.data.l[0] != 0;
|
||||
/* FIXME: Braindead protocol doesn't have a timestamp */
|
||||
timestamp = meta_display_get_current_time_roundtrip (display);
|
||||
meta_verbose ("Request to %s desktop\n",
|
||||
showing_desktop ? "show" : "hide");
|
||||
|
||||
if (showing_desktop)
|
||||
meta_screen_show_desktop (screen, meta_display_get_current_time_roundtrip (display));
|
||||
else
|
||||
{
|
||||
meta_screen_unshow_desktop (screen);
|
||||
meta_workspace_focus_default_window (screen->active_workspace, NULL, meta_display_get_current_time_roundtrip (display));
|
||||
}
|
||||
}
|
||||
if (showing_desktop)
|
||||
meta_screen_show_desktop (screen, timestamp);
|
||||
else
|
||||
{
|
||||
meta_screen_unshow_desktop (screen);
|
||||
meta_workspace_focus_default_window (screen->active_workspace, NULL, timestamp);
|
||||
}
|
||||
}
|
||||
else if (event->xclient.message_type ==
|
||||
display->atom_metacity_restart_message)
|
||||
{
|
||||
@@ -2959,7 +2979,7 @@ meta_spew_event (MetaDisplay *display,
|
||||
aevent->alarm,
|
||||
(gint64) sync_value_to_64 (&aevent->counter_value),
|
||||
(gint64) sync_value_to_64 (&aevent->alarm_value),
|
||||
(unsigned int) aevent->time,
|
||||
(unsigned int)aevent->time,
|
||||
alarm_state_to_string (aevent->state));
|
||||
}
|
||||
else
|
||||
@@ -3095,10 +3115,7 @@ meta_display_create_x_cursor (MetaDisplay *display,
|
||||
case META_CURSOR_NW_RESIZE:
|
||||
glyph = XC_top_left_corner;
|
||||
break;
|
||||
case META_CURSOR_MOVE_WINDOW:
|
||||
glyph = XC_plus;
|
||||
break;
|
||||
case META_CURSOR_RESIZE_WINDOW:
|
||||
case META_CURSOR_MOVE_OR_RESIZE_WINDOW:
|
||||
glyph = XC_fleur;
|
||||
break;
|
||||
case META_CURSOR_BUSY:
|
||||
@@ -3158,10 +3175,8 @@ xcursor_for_op (MetaDisplay *display,
|
||||
break;
|
||||
case META_GRAB_OP_MOVING:
|
||||
case META_GRAB_OP_KEYBOARD_MOVING:
|
||||
cursor = META_CURSOR_MOVE_WINDOW;
|
||||
break;
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_UNKNOWN:
|
||||
cursor = META_CURSOR_RESIZE_WINDOW;
|
||||
cursor = META_CURSOR_MOVE_OR_RESIZE_WINDOW;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -3179,7 +3194,7 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
MetaGrabOp op,
|
||||
gboolean change_pointer,
|
||||
Window grab_xwindow,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
Cursor cursor;
|
||||
|
||||
@@ -3224,13 +3239,13 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
{
|
||||
display->grab_have_pointer = TRUE;
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"XGrabPointer() returned GrabSuccess time 0x%lu\n",
|
||||
"XGrabPointer() returned GrabSuccess time %u\n",
|
||||
timestamp);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"XGrabPointer() failed time 0x%lu\n",
|
||||
"XGrabPointer() failed time %u\n",
|
||||
timestamp);
|
||||
}
|
||||
meta_error_trap_pop (display, TRUE);
|
||||
@@ -3251,7 +3266,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
@@ -3325,22 +3340,23 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (grab_op_is_keyboard (op))
|
||||
/* Grab keys for keyboard ops and mouse move/resizes; see #126497 */
|
||||
if (grab_op_is_keyboard (op) || grab_op_is_mouse_only (op))
|
||||
{
|
||||
if (window)
|
||||
display->grab_have_keyboard =
|
||||
meta_window_grab_all_keys (window);
|
||||
meta_window_grab_all_keys (window, timestamp);
|
||||
|
||||
else
|
||||
display->grab_have_keyboard =
|
||||
meta_screen_grab_all_keys (screen);
|
||||
meta_screen_grab_all_keys (screen, timestamp);
|
||||
|
||||
if (!display->grab_have_keyboard)
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"grabbing all keys failed, ungrabbing pointer\n");
|
||||
XUngrabPointer (display->xdisplay, CurrentTime);
|
||||
display->grab_have_pointer = FALSE;
|
||||
XUngrabPointer (display->xdisplay, timestamp);
|
||||
display->grab_have_pointer = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -3527,11 +3543,10 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
|
||||
void
|
||||
meta_display_end_grab_op (MetaDisplay *display,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Ending grab op %u at time %lu\n", display->grab_op,
|
||||
(unsigned long) timestamp);
|
||||
"Ending grab op %u at time %u\n", display->grab_op, timestamp);
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
return;
|
||||
@@ -3618,19 +3633,18 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
if (display->grab_have_pointer)
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Ungrabbing pointer with timestamp %lu\n",
|
||||
timestamp);
|
||||
"Ungrabbing pointer with timestamp %u\n", timestamp);
|
||||
XUngrabPointer (display->xdisplay, timestamp);
|
||||
}
|
||||
|
||||
if (display->grab_have_keyboard)
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Ungrabbing all keys timestamp %lu\n", timestamp);
|
||||
"Ungrabbing all keys timestamp %u\n", timestamp);
|
||||
if (display->grab_window)
|
||||
meta_window_ungrab_all_keys (display->grab_window);
|
||||
meta_window_ungrab_all_keys (display->grab_window, timestamp);
|
||||
else
|
||||
meta_screen_ungrab_all_keys (display->grab_screen);
|
||||
meta_screen_ungrab_all_keys (display->grab_screen, timestamp);
|
||||
}
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
@@ -3743,8 +3757,10 @@ void
|
||||
meta_display_grab_window_buttons (MetaDisplay *display,
|
||||
Window xwindow)
|
||||
{
|
||||
/* Grab Alt + button1 and Alt + button2 for moving window,
|
||||
* and Alt + button3 for popping up window menu.
|
||||
/* Grab Alt + button1 for moving window.
|
||||
* Grab Alt + button2 for resizing window.
|
||||
* Grab Alt + button3 for popping up window menu.
|
||||
* Grab Alt + Shift + button1 for snap-moving window.
|
||||
*/
|
||||
meta_verbose ("Grabbing window buttons for 0x%lx\n", xwindow);
|
||||
|
||||
@@ -3756,11 +3772,10 @@ meta_display_grab_window_buttons (MetaDisplay *display,
|
||||
if (display->window_grab_modifiers != 0)
|
||||
{
|
||||
gboolean debug = g_getenv ("METACITY_DEBUG_BUTTON_GRABS") != NULL;
|
||||
int i = 1;
|
||||
while (i < 4)
|
||||
int i;
|
||||
for (i = 1; i < 4; i++)
|
||||
{
|
||||
meta_change_button_grab (display,
|
||||
xwindow,
|
||||
meta_change_button_grab (display, xwindow,
|
||||
TRUE,
|
||||
FALSE,
|
||||
i, display->window_grab_modifiers);
|
||||
@@ -3773,9 +3788,18 @@ meta_display_grab_window_buttons (MetaDisplay *display,
|
||||
TRUE,
|
||||
FALSE,
|
||||
i, ControlMask);
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
/* In addition to grabbing Alt+Button1 for moving the window,
|
||||
* grab Alt+Shift+Button1 for snap-moving the window. See bug
|
||||
* 112478. Unfortunately, this doesn't work with
|
||||
* Shift+Alt+Button1 for some reason; so at least part of the
|
||||
* order still matters, which sucks (please FIXME).
|
||||
*/
|
||||
meta_change_button_grab (display, xwindow,
|
||||
TRUE,
|
||||
FALSE,
|
||||
1, display->window_grab_modifiers | ShiftMask);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4025,7 +4049,7 @@ meta_display_ping_timeout (gpointer data)
|
||||
ping_data->ping_timeout_id = 0;
|
||||
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Ping %lu on window %lx timed out\n",
|
||||
"Ping %u on window %lx timed out\n",
|
||||
ping_data->timestamp, ping_data->xwindow);
|
||||
|
||||
(* ping_data->ping_timeout_func) (ping_data->display, ping_data->xwindow,
|
||||
@@ -4042,7 +4066,7 @@ meta_display_ping_timeout (gpointer data)
|
||||
void
|
||||
meta_display_ping_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
MetaWindowPingFunc ping_reply_func,
|
||||
MetaWindowPingFunc ping_timeout_func,
|
||||
gpointer user_data)
|
||||
@@ -4077,7 +4101,7 @@ meta_display_ping_window (MetaDisplay *display,
|
||||
display->pending_pings = g_slist_prepend (display->pending_pings, ping_data);
|
||||
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Sending ping with timestamp %lu to window %s\n",
|
||||
"Sending ping with timestamp %u to window %s\n",
|
||||
timestamp, window->desc);
|
||||
meta_window_send_icccm_message (window,
|
||||
display->atom_net_wm_ping,
|
||||
@@ -4158,18 +4182,19 @@ process_pong_message (MetaDisplay *display,
|
||||
XEvent *event)
|
||||
{
|
||||
GSList *tmp;
|
||||
guint32 timestamp = event->xclient.data.l[1];
|
||||
|
||||
meta_topic (META_DEBUG_PING, "Received a pong with timestamp %lu\n",
|
||||
(Time) event->xclient.data.l[1]);
|
||||
meta_topic (META_DEBUG_PING, "Received a pong with timestamp %u\n",
|
||||
timestamp);
|
||||
|
||||
for (tmp = display->pending_pings; tmp; tmp = tmp->next)
|
||||
{
|
||||
MetaPingData *ping_data = tmp->data;
|
||||
|
||||
if ((Time)event->xclient.data.l[1] == ping_data->timestamp)
|
||||
if (timestamp == ping_data->timestamp)
|
||||
{
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Matching ping found for pong %lu\n",
|
||||
"Matching ping found for pong %u\n",
|
||||
ping_data->timestamp);
|
||||
|
||||
/* Remove the ping data from the list */
|
||||
@@ -4674,7 +4699,9 @@ process_selection_clear (MetaDisplay *display,
|
||||
meta_verbose ("Got selection clear for screen %d on display %s\n",
|
||||
screen->number, display->name);
|
||||
|
||||
meta_display_unmanage_screen (display, screen);
|
||||
meta_display_unmanage_screen (display,
|
||||
screen,
|
||||
event->xselectionclear.time);
|
||||
|
||||
/* display and screen may both be invalid memory... */
|
||||
|
||||
@@ -4698,23 +4725,25 @@ process_selection_clear (MetaDisplay *display,
|
||||
|
||||
void
|
||||
meta_display_unmanage_screen (MetaDisplay *display,
|
||||
MetaScreen *screen)
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
meta_verbose ("Unmanaging screen %d on display %s\n",
|
||||
screen->number, display->name);
|
||||
|
||||
g_return_if_fail (g_slist_find (display->screens, screen) != NULL);
|
||||
|
||||
meta_screen_free (screen);
|
||||
meta_screen_free (screen, timestamp);
|
||||
display->screens = g_slist_remove (display->screens, screen);
|
||||
|
||||
if (display->screens == NULL)
|
||||
meta_display_close (display);
|
||||
meta_display_close (display, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||
MetaScreen *screen)
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
GSList *tmp;
|
||||
GSList *winlist;
|
||||
@@ -4724,8 +4753,8 @@ meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||
/* Unmanage all windows */
|
||||
tmp = winlist;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
meta_window_free (tmp->data);
|
||||
{
|
||||
meta_window_free (tmp->data, timestamp);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
@@ -4868,15 +4897,15 @@ meta_display_focus_sentinel_clear (MetaDisplay *display)
|
||||
|
||||
static void
|
||||
sanity_check_timestamps (MetaDisplay *display,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_focus_time))
|
||||
{
|
||||
meta_warning ("last_focus_time (%lu) is greater than comparison "
|
||||
"timestamp (%lu). This most likely represents a buggy "
|
||||
meta_warning ("last_focus_time (%u) is greater than comparison "
|
||||
"timestamp (%u). This most likely represents a buggy "
|
||||
"client sending inaccurate timestamps in messages such as "
|
||||
"_NET_ACTIVE_WINDOW. Trying to work around...\n",
|
||||
display->last_focus_time, (unsigned long)timestamp);
|
||||
display->last_focus_time, timestamp);
|
||||
display->last_focus_time = timestamp;
|
||||
}
|
||||
if (XSERVER_TIME_IS_BEFORE (timestamp, display->last_user_time))
|
||||
@@ -4884,11 +4913,11 @@ sanity_check_timestamps (MetaDisplay *display,
|
||||
GSList *windows;
|
||||
GSList *tmp;
|
||||
|
||||
meta_warning ("last_user_time (%lu) is greater than comparison "
|
||||
"timestamp (%lu). This most likely represents a buggy "
|
||||
meta_warning ("last_user_time (%u) is greater than comparison "
|
||||
"timestamp (%u). This most likely represents a buggy "
|
||||
"client sending inaccurate timestamps in messages such as "
|
||||
"_NET_ACTIVE_WINDOW. Trying to work around...\n",
|
||||
display->last_user_time, (unsigned long)timestamp);
|
||||
display->last_user_time, timestamp);
|
||||
display->last_user_time = timestamp;
|
||||
|
||||
windows = meta_display_list_windows (display);
|
||||
@@ -4900,7 +4929,7 @@ sanity_check_timestamps (MetaDisplay *display,
|
||||
if (XSERVER_TIME_IS_BEFORE (timestamp, window->net_wm_user_time))
|
||||
{
|
||||
meta_warning ("%s appears to be one of the offending windows "
|
||||
"with a timestamp of %lu. Working around...\n",
|
||||
"with a timestamp of %u. Working around...\n",
|
||||
window->desc, window->net_wm_user_time);
|
||||
window->net_wm_user_time = timestamp;
|
||||
}
|
||||
@@ -4915,7 +4944,7 @@ sanity_check_timestamps (MetaDisplay *display,
|
||||
static gboolean
|
||||
timestamp_too_old (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
Time *timestamp)
|
||||
guint32 *timestamp)
|
||||
{
|
||||
/* FIXME: If Soeren's suggestion in bug 151984 is implemented, it will allow
|
||||
* us to sanity check the timestamp here and ensure it doesn't correspond to
|
||||
@@ -4937,12 +4966,12 @@ timestamp_too_old (MetaDisplay *display,
|
||||
if (XSERVER_TIME_IS_BEFORE (*timestamp, display->last_user_time))
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Ignoring focus request for %s since %lu "
|
||||
"is less than %lu and %lu.\n",
|
||||
"Ignoring focus request for %s since %u "
|
||||
"is less than %u and %u.\n",
|
||||
window ? window->desc : "the no_focus_window",
|
||||
*timestamp,
|
||||
(unsigned long) display->last_user_time,
|
||||
(unsigned long) display->last_focus_time);
|
||||
display->last_user_time,
|
||||
display->last_focus_time);
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
@@ -4950,7 +4979,7 @@ timestamp_too_old (MetaDisplay *display,
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Received focus request for %s which is newer than most "
|
||||
"recent user_time, but less recent than "
|
||||
"last_focus_time (%lu < %lu < %lu); adjusting "
|
||||
"last_focus_time (%u < %u < %u); adjusting "
|
||||
"accordingly. (See bug 167358)\n",
|
||||
window ? window->desc : "the no_focus_window",
|
||||
display->last_user_time,
|
||||
@@ -4968,15 +4997,18 @@ void
|
||||
meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
gboolean focus_frame,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
if (timestamp_too_old (display, window, ×tamp))
|
||||
return;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
XSetInputFocus (display->xdisplay,
|
||||
focus_frame ? window->frame->xwindow : window->xwindow,
|
||||
RevertToPointerRoot,
|
||||
timestamp);
|
||||
meta_error_trap_pop (display, FALSE);
|
||||
|
||||
display->expected_focus_window = window;
|
||||
display->last_focus_time = timestamp;
|
||||
display->active_screen = window->screen;
|
||||
@@ -4988,7 +5020,7 @@ meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
void
|
||||
meta_display_focus_the_no_focus_window (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
if (timestamp_too_old (display, NULL, ×tamp))
|
||||
return;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X display handler */
|
||||
|
||||
/*
|
||||
@@ -62,7 +64,7 @@ typedef struct MetaEdgeResistanceData MetaEdgeResistanceData;
|
||||
|
||||
typedef void (* MetaWindowPingFunc) (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
@@ -194,10 +196,10 @@ struct _MetaDisplay
|
||||
MetaWindow *expected_focus_window;
|
||||
|
||||
/* last timestamp passed to XSetInputFocus */
|
||||
Time last_focus_time;
|
||||
guint32 last_focus_time;
|
||||
|
||||
/* last user interaction time in any app */
|
||||
Time last_user_time;
|
||||
guint32 last_user_time;
|
||||
|
||||
/* whether we're using mousenav (only relevant for sloppy&mouse focus modes;
|
||||
* !mouse_mode means "keynav mode")
|
||||
@@ -261,7 +263,7 @@ struct _MetaDisplay
|
||||
guint grab_have_pointer : 1;
|
||||
guint grab_have_keyboard : 1;
|
||||
guint grab_wireframe_active : 1;
|
||||
guint grab_was_cancelled : 1;
|
||||
guint grab_was_cancelled : 1; /* Only used in wireframe mode */
|
||||
MetaRectangle grab_wireframe_rect;
|
||||
MetaRectangle grab_wireframe_last_xor_rect;
|
||||
MetaRectangle grab_initial_window_pos;
|
||||
@@ -269,7 +271,7 @@ struct _MetaDisplay
|
||||
gboolean grab_threshold_movement_reached; /* raise_on_click == FALSE. */
|
||||
MetaResizePopup *grab_resize_popup;
|
||||
GTimeVal grab_last_moveresize_time;
|
||||
Time grab_motion_notify_time;
|
||||
guint32 grab_motion_notify_time;
|
||||
int grab_wireframe_last_display_width;
|
||||
int grab_wireframe_last_display_height;
|
||||
GList* grab_old_window_stacking;
|
||||
@@ -283,7 +285,7 @@ struct _MetaDisplay
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
int xkb_base_event_type;
|
||||
Time last_bell_time;
|
||||
guint32 last_bell_time;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
/* alarm monitoring client's _NET_WM_SYNC_REQUEST_COUNTER */
|
||||
@@ -311,6 +313,9 @@ struct _MetaDisplay
|
||||
/* Xinerama cache */
|
||||
unsigned int xinerama_cache_invalidated : 1;
|
||||
|
||||
/* Opening the display */
|
||||
unsigned int display_opening : 1;
|
||||
|
||||
/* Closing down the display */
|
||||
int closing;
|
||||
|
||||
@@ -387,8 +392,9 @@ struct _MetaDisplay
|
||||
(time2) != 0) \
|
||||
)
|
||||
|
||||
gboolean meta_display_open (const char *name);
|
||||
void meta_display_close (MetaDisplay *display);
|
||||
gboolean meta_display_open (void);
|
||||
void meta_display_close (MetaDisplay *display,
|
||||
guint32 timestamp);
|
||||
MetaScreen* meta_display_screen_for_root (MetaDisplay *display,
|
||||
Window xroot);
|
||||
MetaScreen* meta_display_screen_for_x_screen (MetaDisplay *display,
|
||||
@@ -399,10 +405,12 @@ void meta_display_grab (MetaDisplay *display);
|
||||
void meta_display_ungrab (MetaDisplay *display);
|
||||
|
||||
void meta_display_unmanage_screen (MetaDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
/* A given MetaWindow may have various X windows that "belong"
|
||||
* to it, such as the frame window.
|
||||
@@ -431,7 +439,7 @@ void meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
MetaGrabOp op,
|
||||
gboolean change_pointer,
|
||||
Window grab_xwindow,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -441,11 +449,11 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y);
|
||||
void meta_display_end_grab_op (MetaDisplay *display,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_check_threshold_reached (MetaDisplay *display,
|
||||
int x,
|
||||
@@ -482,12 +490,12 @@ void meta_display_retheme_all (void);
|
||||
void meta_display_set_cursor_theme (const char *theme,
|
||||
int size);
|
||||
|
||||
void meta_display_ping_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
Time timestamp,
|
||||
MetaWindowPingFunc ping_reply_func,
|
||||
MetaWindowPingFunc ping_timeout_func,
|
||||
void *user_data);
|
||||
void meta_display_ping_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
guint32 timestamp,
|
||||
MetaWindowPingFunc ping_reply_func,
|
||||
MetaWindowPingFunc ping_timeout_func,
|
||||
void *user_data);
|
||||
gboolean meta_display_window_has_pending_pings (MetaDisplay *display,
|
||||
MetaWindow *window);
|
||||
|
||||
@@ -546,7 +554,7 @@ gboolean meta_display_focus_sentinel_clear (MetaDisplay *display);
|
||||
void meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
gboolean focus_frame,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
/* meta_display_focus_the_no_focus_window is called when the
|
||||
* designated no_focus_window should be focused, but is otherwise the
|
||||
@@ -554,7 +562,7 @@ void meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
*/
|
||||
void meta_display_focus_the_no_focus_window (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_queue_autoraise_callback (MetaDisplay *display,
|
||||
MetaWindow *window);
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Draw a workspace */
|
||||
|
||||
/* This file should not be modified to depend on other files in
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Draw a workspace */
|
||||
|
||||
/* This file should not be modified to depend on other files in
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Edge resistance for move/resize operations */
|
||||
|
||||
/*
|
||||
@@ -44,7 +46,6 @@ struct ResistanceDataForAnEdge
|
||||
GSourceFunc timeout_func;
|
||||
MetaWindow *window;
|
||||
int keyboard_buildup;
|
||||
gboolean allow_past_screen_edge;
|
||||
};
|
||||
typedef struct ResistanceDataForAnEdge ResistanceDataForAnEdge;
|
||||
|
||||
@@ -397,18 +398,6 @@ apply_edge_resistance (MetaWindow *window,
|
||||
{
|
||||
int threshold;
|
||||
|
||||
/* INFINITE RESISTANCE for screen edges under certain cases; If
|
||||
* the edge is relevant and we're moving towards it and it's a
|
||||
* screen edge and infinite resistance has been requested for
|
||||
* this particular grab op then don't allow movement past it.
|
||||
*/
|
||||
if (edge->edge_type == META_EDGE_SCREEN &&
|
||||
!resistance_data->allow_past_screen_edge &&
|
||||
movement_towards_edge (edge->side_type, increment))
|
||||
{
|
||||
return compare;
|
||||
}
|
||||
|
||||
/* TIMEOUT RESISTANCE: If the edge is relevant and we're moving
|
||||
* towards it, then we may want to have some kind of time delay
|
||||
* before the user can move past this edge.
|
||||
@@ -541,7 +530,8 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
MetaRectangle *new_outer,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean auto_snap,
|
||||
gboolean keyboard_op)
|
||||
gboolean keyboard_op,
|
||||
gboolean is_resize)
|
||||
{
|
||||
MetaEdgeResistanceData *edge_data;
|
||||
MetaRectangle modified_rect;
|
||||
@@ -588,47 +578,68 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Now, apply the normal edge resistance */
|
||||
new_left = apply_edge_resistance (window,
|
||||
BOX_LEFT (*old_outer),
|
||||
BOX_LEFT (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->left_edges,
|
||||
&edge_data->left_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
new_right = apply_edge_resistance (window,
|
||||
BOX_RIGHT (*old_outer),
|
||||
BOX_RIGHT (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->right_edges,
|
||||
&edge_data->right_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
new_top = apply_edge_resistance (window,
|
||||
BOX_TOP (*old_outer),
|
||||
BOX_TOP (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->top_edges,
|
||||
&edge_data->top_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
new_bottom = apply_edge_resistance (window,
|
||||
BOX_BOTTOM (*old_outer),
|
||||
BOX_BOTTOM (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->bottom_edges,
|
||||
&edge_data->bottom_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
/* Disable edge resistance for resizes when windows have size
|
||||
* increment hints; see #346782. For all other cases, apply
|
||||
* them.
|
||||
*/
|
||||
if (!is_resize || window->size_hints.width_inc == 1)
|
||||
{
|
||||
/* Now, apply the normal horizontal edge resistance */
|
||||
new_left = apply_edge_resistance (window,
|
||||
BOX_LEFT (*old_outer),
|
||||
BOX_LEFT (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->left_edges,
|
||||
&edge_data->left_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
new_right = apply_edge_resistance (window,
|
||||
BOX_RIGHT (*old_outer),
|
||||
BOX_RIGHT (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->right_edges,
|
||||
&edge_data->right_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
}
|
||||
else
|
||||
{
|
||||
new_left = new_outer->x;
|
||||
new_right = new_outer->x + new_outer->width;
|
||||
}
|
||||
/* Same for vertical resizes... */
|
||||
if (!is_resize || window->size_hints.height_inc == 1)
|
||||
{
|
||||
new_top = apply_edge_resistance (window,
|
||||
BOX_TOP (*old_outer),
|
||||
BOX_TOP (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->top_edges,
|
||||
&edge_data->top_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
new_bottom = apply_edge_resistance (window,
|
||||
BOX_BOTTOM (*old_outer),
|
||||
BOX_BOTTOM (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->bottom_edges,
|
||||
&edge_data->bottom_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
}
|
||||
else
|
||||
{
|
||||
new_top = new_outer->y;
|
||||
new_bottom = new_outer->y + new_outer->height;
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine whether anything changed, and save the changes */
|
||||
@@ -913,12 +924,6 @@ initialize_grab_edge_resistance_data (MetaDisplay *display)
|
||||
edge_data->right_data.keyboard_buildup = 0;
|
||||
edge_data->top_data.keyboard_buildup = 0;
|
||||
edge_data->bottom_data.keyboard_buildup = 0;
|
||||
|
||||
edge_data->left_data.allow_past_screen_edge = TRUE;
|
||||
edge_data->right_data.allow_past_screen_edge = TRUE;
|
||||
edge_data->bottom_data.allow_past_screen_edge = TRUE;
|
||||
edge_data->top_data.allow_past_screen_edge =
|
||||
display->grab_anchor_root_y >= display->grab_initial_window_pos.y;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1121,6 +1126,7 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
gboolean is_keyboard_op)
|
||||
{
|
||||
MetaRectangle old_outer, proposed_outer, new_outer;
|
||||
gboolean is_resize;
|
||||
|
||||
if (window == window->display->grab_window &&
|
||||
window->display->grab_wireframe_active)
|
||||
@@ -1139,13 +1145,15 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
new_outer = proposed_outer;
|
||||
|
||||
window->display->grab_last_user_action_was_snap = snap;
|
||||
is_resize = FALSE;
|
||||
if (apply_edge_resistance_to_each_side (window->display,
|
||||
window,
|
||||
&old_outer,
|
||||
&new_outer,
|
||||
timeout_func,
|
||||
snap,
|
||||
is_keyboard_op))
|
||||
is_keyboard_op,
|
||||
is_resize))
|
||||
{
|
||||
/* apply_edge_resistance_to_each_side independently applies
|
||||
* resistance to both the right and left edges of new_outer as both
|
||||
@@ -1213,6 +1221,7 @@ meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
{
|
||||
MetaRectangle old_outer, new_outer;
|
||||
int proposed_outer_width, proposed_outer_height;
|
||||
gboolean is_resize;
|
||||
|
||||
if (window == window->display->grab_window &&
|
||||
window->display->grab_wireframe_active)
|
||||
@@ -1234,13 +1243,15 @@ meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
proposed_outer_height);
|
||||
|
||||
window->display->grab_last_user_action_was_snap = snap;
|
||||
is_resize = TRUE;
|
||||
if (apply_edge_resistance_to_each_side (window->display,
|
||||
window,
|
||||
&old_outer,
|
||||
&new_outer,
|
||||
timeout_func,
|
||||
snap,
|
||||
is_keyboard_op))
|
||||
is_keyboard_op,
|
||||
is_resize))
|
||||
{
|
||||
*new_width = old_width + (new_outer.width - old_outer.width);
|
||||
*new_height = old_height + (new_outer.height - old_outer.height);
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Edge resistance for move/resize operations */
|
||||
|
||||
/*
|
||||
|
162
src/effects.c
162
src/effects.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity animation effects */
|
||||
|
||||
/*
|
||||
@@ -23,6 +25,7 @@
|
||||
#include "effects.h"
|
||||
#include "display.h"
|
||||
#include "ui.h"
|
||||
#include "window.h"
|
||||
|
||||
#ifdef HAVE_SHAPE
|
||||
#include <X11/extensions/shape.h>
|
||||
@@ -72,6 +75,132 @@ typedef struct
|
||||
|
||||
} BoxAnimationContext;
|
||||
|
||||
struct MetaEffectPriv
|
||||
{
|
||||
MetaEffectFinished finished;
|
||||
gpointer finished_data;
|
||||
};
|
||||
|
||||
static void run_default_effect_handler (MetaEffect *effect);
|
||||
static void run_handler (MetaEffect *effect);
|
||||
|
||||
static MetaEffectHandler effect_handler;
|
||||
static gpointer effect_handler_data;
|
||||
|
||||
void
|
||||
meta_push_effect_handler (MetaEffectHandler handler,
|
||||
gpointer data)
|
||||
{
|
||||
effect_handler = handler;
|
||||
effect_handler_data = data;
|
||||
}
|
||||
|
||||
void
|
||||
meta_pop_effect_handler (void)
|
||||
{
|
||||
/* FIXME: not implemented yet */
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
static MetaEffect *
|
||||
create_effect (MetaEffectType type,
|
||||
MetaWindow *window,
|
||||
MetaEffectFinished finished,
|
||||
gpointer finished_data)
|
||||
{
|
||||
MetaEffect *effect = g_new (MetaEffect, 1);
|
||||
|
||||
effect->type = type;
|
||||
effect->window = window;
|
||||
effect->priv = g_new (MetaEffectPriv, 1);
|
||||
effect->priv->finished = finished;
|
||||
effect->priv->finished_data = finished_data;
|
||||
|
||||
return effect;
|
||||
}
|
||||
|
||||
void
|
||||
meta_effect_end (MetaEffect *effect)
|
||||
{
|
||||
if (effect->priv->finished)
|
||||
effect->priv->finished (effect, effect->priv->finished_data);
|
||||
|
||||
g_free (effect->priv);
|
||||
g_free (effect);
|
||||
}
|
||||
|
||||
void
|
||||
meta_effect_run_focus (MetaWindow *window,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data)
|
||||
{
|
||||
MetaEffect *effect;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
effect = create_effect (META_EFFECT_FOCUS, window, finished, data);
|
||||
|
||||
run_handler (effect);
|
||||
}
|
||||
|
||||
void
|
||||
meta_effect_run_minimize (MetaWindow *window,
|
||||
MetaRectangle *window_rect,
|
||||
MetaRectangle *icon_rect,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data)
|
||||
{
|
||||
MetaEffect *effect;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (icon_rect != NULL);
|
||||
|
||||
effect = create_effect (META_EFFECT_MINIMIZE, window, finished, data);
|
||||
|
||||
effect->u.minimize.window_rect = *window_rect;
|
||||
effect->u.minimize.icon_rect = *icon_rect;
|
||||
|
||||
run_handler (effect);
|
||||
}
|
||||
|
||||
void
|
||||
meta_effect_run_unminimize (MetaWindow *window,
|
||||
MetaRectangle *window_rect,
|
||||
MetaRectangle *icon_rect,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data)
|
||||
{
|
||||
MetaEffect *effect;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
g_return_if_fail (icon_rect != NULL);
|
||||
|
||||
effect = create_effect (META_EFFECT_UNMINIMIZE, window, finished, data);
|
||||
|
||||
effect->u.minimize.window_rect = *window_rect;
|
||||
effect->u.minimize.icon_rect = *icon_rect;
|
||||
|
||||
run_handler (effect);
|
||||
}
|
||||
|
||||
void
|
||||
meta_effect_run_close (MetaWindow *window,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data)
|
||||
{
|
||||
MetaEffect *effect;
|
||||
|
||||
g_return_if_fail (window != NULL);
|
||||
|
||||
effect = create_effect (META_EFFECT_CLOSE, window,
|
||||
finished, data);
|
||||
|
||||
run_handler (effect);
|
||||
}
|
||||
|
||||
|
||||
/* old ugly minimization effect */
|
||||
|
||||
static void
|
||||
update_wireframe_window (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
@@ -374,7 +503,7 @@ meta_effects_draw_box_animation (MetaScreen *screen,
|
||||
attrs.override_redirect = True;
|
||||
attrs.background_pixel = BlackPixel (screen->display->xdisplay,
|
||||
screen->number);
|
||||
|
||||
|
||||
context->wireframe_xwindow = XCreateWindow (screen->display->xdisplay,
|
||||
screen->xroot,
|
||||
initial_rect->x,
|
||||
@@ -624,3 +753,34 @@ meta_effects_end_wireframe (MetaScreen *screen,
|
||||
meta_ui_pop_delay_exposes (screen->ui);
|
||||
}
|
||||
|
||||
static void
|
||||
run_default_effect_handler (MetaEffect *effect)
|
||||
{
|
||||
switch (effect->type)
|
||||
{
|
||||
case META_EFFECT_MINIMIZE:
|
||||
meta_effects_draw_box_animation (effect->window->screen,
|
||||
&(effect->u.minimize.window_rect),
|
||||
&(effect->u.minimize.icon_rect),
|
||||
META_MINIMIZE_ANIMATION_LENGTH,
|
||||
META_BOX_ANIM_SCALE);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
run_handler (MetaEffect *effect)
|
||||
{
|
||||
if (effect_handler)
|
||||
{
|
||||
effect_handler (effect, effect_handler_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
run_default_effect_handler (effect);
|
||||
meta_effect_end (effect);
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity animation effects */
|
||||
|
||||
/*
|
||||
@@ -25,6 +27,9 @@
|
||||
#include "util.h"
|
||||
#include "screen.h"
|
||||
|
||||
typedef struct MetaEffect MetaEffect;
|
||||
typedef struct MetaEffectPriv MetaEffectPriv;
|
||||
|
||||
#define META_MINIMIZE_ANIMATION_LENGTH 0.25
|
||||
#define META_SHADE_ANIMATION_LENGTH 0.2
|
||||
|
||||
@@ -35,6 +40,87 @@ typedef enum
|
||||
|
||||
} MetaBoxAnimType;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_EFFECT_MINIMIZE,
|
||||
META_EFFECT_UNMINIMIZE,
|
||||
META_EFFECT_MENU_MAP,
|
||||
META_EFFECT_MENU_UNMAP,
|
||||
META_EFFECT_DIALOG_MAP,
|
||||
META_EFFECT_DIALOG_UNMAP,
|
||||
META_EFFECT_TOPLEVEL_MAP,
|
||||
META_EFFECT_TOPLEVEL_UNMAP,
|
||||
META_EFFECT_WIREFRAME_BEGIN,
|
||||
META_EFFECT_WIREFRAME_UPDATE,
|
||||
META_EFFECT_WIREFRAME_END,
|
||||
META_EFFECT_FOCUS,
|
||||
META_EFFECT_CLOSE,
|
||||
META_NUM_EFFECTS
|
||||
} MetaEffectType;
|
||||
|
||||
typedef void (* MetaEffectHandler) (MetaEffect *effect,
|
||||
gpointer data);
|
||||
typedef void (* MetaEffectFinished) (const MetaEffect *effect,
|
||||
gpointer data);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaRectangle window_rect;
|
||||
MetaRectangle icon_rect;
|
||||
} MetaMinimizeEffect, MetaUnminimizeEffect;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
||||
} MetaCloseEffect;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
} MetaFocusEffect;
|
||||
|
||||
struct MetaEffect
|
||||
{
|
||||
MetaWindow *window;
|
||||
MetaEffectType type;
|
||||
gpointer info; /* effect handler can hang data here */
|
||||
|
||||
union
|
||||
{
|
||||
MetaMinimizeEffect minimize;
|
||||
MetaUnminimizeEffect unminimize;
|
||||
MetaCloseEffect close;
|
||||
MetaFocusEffect focus;
|
||||
} u;
|
||||
|
||||
MetaEffectPriv *priv;
|
||||
};
|
||||
|
||||
void meta_push_effect_handler (MetaEffectHandler handler,
|
||||
gpointer data);
|
||||
void meta_pop_effect_handler (void);
|
||||
|
||||
void meta_effect_run_minimize (MetaWindow *window,
|
||||
MetaRectangle *window_rect,
|
||||
MetaRectangle *target,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data);
|
||||
void meta_effect_run_unminimize (MetaWindow *window,
|
||||
MetaRectangle *window_rect,
|
||||
MetaRectangle *icon_rect,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data);
|
||||
void meta_effect_run_close (MetaWindow *window,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data);
|
||||
void meta_effect_run_focus (MetaWindow *window,
|
||||
MetaEffectFinished finished,
|
||||
gpointer data);
|
||||
void meta_effect_end (MetaEffect *effect);
|
||||
|
||||
|
||||
|
||||
/* Stuff that should become static functions */
|
||||
|
||||
void meta_effects_draw_box_animation (MetaScreen *screen,
|
||||
MetaRectangle *initial_rect,
|
||||
MetaRectangle *destination_rect,
|
||||
|
@@ -1,657 +0,0 @@
|
||||
/* eggaccelerators.c
|
||||
* Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik
|
||||
* Developed by Havoc Pennington, Tim Janik
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "eggaccelerators.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
enum
|
||||
{
|
||||
EGG_MODMAP_ENTRY_SHIFT = 0,
|
||||
EGG_MODMAP_ENTRY_LOCK = 1,
|
||||
EGG_MODMAP_ENTRY_CONTROL = 2,
|
||||
EGG_MODMAP_ENTRY_MOD1 = 3,
|
||||
EGG_MODMAP_ENTRY_MOD2 = 4,
|
||||
EGG_MODMAP_ENTRY_MOD3 = 5,
|
||||
EGG_MODMAP_ENTRY_MOD4 = 6,
|
||||
EGG_MODMAP_ENTRY_MOD5 = 7,
|
||||
EGG_MODMAP_ENTRY_LAST = 8
|
||||
};
|
||||
|
||||
#define MODMAP_ENTRY_TO_MODIFIER(x) (1 << (x))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
EggVirtualModifierType mapping[EGG_MODMAP_ENTRY_LAST];
|
||||
|
||||
} EggModmap;
|
||||
|
||||
static const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap);
|
||||
|
||||
static inline gboolean
|
||||
is_alt (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'a' || string[1] == 'A') &&
|
||||
(string[2] == 'l' || string[2] == 'L') &&
|
||||
(string[3] == 't' || string[3] == 'T') &&
|
||||
(string[4] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_ctl (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'c' || string[1] == 'C') &&
|
||||
(string[2] == 't' || string[2] == 'T') &&
|
||||
(string[3] == 'l' || string[3] == 'L') &&
|
||||
(string[4] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_modx (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'm' || string[1] == 'M') &&
|
||||
(string[2] == 'o' || string[2] == 'O') &&
|
||||
(string[3] == 'd' || string[3] == 'D') &&
|
||||
(string[4] >= '1' && string[4] <= '5') &&
|
||||
(string[5] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_ctrl (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'c' || string[1] == 'C') &&
|
||||
(string[2] == 't' || string[2] == 'T') &&
|
||||
(string[3] == 'r' || string[3] == 'R') &&
|
||||
(string[4] == 'l' || string[4] == 'L') &&
|
||||
(string[5] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_shft (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 's' || string[1] == 'S') &&
|
||||
(string[2] == 'h' || string[2] == 'H') &&
|
||||
(string[3] == 'f' || string[3] == 'F') &&
|
||||
(string[4] == 't' || string[4] == 'T') &&
|
||||
(string[5] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_shift (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 's' || string[1] == 'S') &&
|
||||
(string[2] == 'h' || string[2] == 'H') &&
|
||||
(string[3] == 'i' || string[3] == 'I') &&
|
||||
(string[4] == 'f' || string[4] == 'F') &&
|
||||
(string[5] == 't' || string[5] == 'T') &&
|
||||
(string[6] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_control (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'c' || string[1] == 'C') &&
|
||||
(string[2] == 'o' || string[2] == 'O') &&
|
||||
(string[3] == 'n' || string[3] == 'N') &&
|
||||
(string[4] == 't' || string[4] == 'T') &&
|
||||
(string[5] == 'r' || string[5] == 'R') &&
|
||||
(string[6] == 'o' || string[6] == 'O') &&
|
||||
(string[7] == 'l' || string[7] == 'L') &&
|
||||
(string[8] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_release (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'r' || string[1] == 'R') &&
|
||||
(string[2] == 'e' || string[2] == 'E') &&
|
||||
(string[3] == 'l' || string[3] == 'L') &&
|
||||
(string[4] == 'e' || string[4] == 'E') &&
|
||||
(string[5] == 'a' || string[5] == 'A') &&
|
||||
(string[6] == 's' || string[6] == 'S') &&
|
||||
(string[7] == 'e' || string[7] == 'E') &&
|
||||
(string[8] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_meta (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'm' || string[1] == 'M') &&
|
||||
(string[2] == 'e' || string[2] == 'E') &&
|
||||
(string[3] == 't' || string[3] == 'T') &&
|
||||
(string[4] == 'a' || string[4] == 'A') &&
|
||||
(string[5] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_super (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 's' || string[1] == 'S') &&
|
||||
(string[2] == 'u' || string[2] == 'U') &&
|
||||
(string[3] == 'p' || string[3] == 'P') &&
|
||||
(string[4] == 'e' || string[4] == 'E') &&
|
||||
(string[5] == 'r' || string[5] == 'R') &&
|
||||
(string[6] == '>'));
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
is_hyper (const gchar *string)
|
||||
{
|
||||
return ((string[0] == '<') &&
|
||||
(string[1] == 'h' || string[1] == 'H') &&
|
||||
(string[2] == 'y' || string[2] == 'Y') &&
|
||||
(string[3] == 'p' || string[3] == 'P') &&
|
||||
(string[4] == 'e' || string[4] == 'E') &&
|
||||
(string[5] == 'r' || string[5] == 'R') &&
|
||||
(string[6] == '>'));
|
||||
}
|
||||
|
||||
/**
|
||||
* egg_accelerator_parse_virtual:
|
||||
* @accelerator: string representing an accelerator
|
||||
* @accelerator_key: return location for accelerator keyval
|
||||
* @accelerator_mods: return location for accelerator modifier mask
|
||||
*
|
||||
* Parses a string representing a virtual accelerator. The format
|
||||
* looks like "<Control>a" or "<Shift><Alt>F1" or
|
||||
* "<Release>z" (the last one is for key release). The parser
|
||||
* is fairly liberal and allows lower or upper case, and also
|
||||
* abbreviations such as "<Ctl>" and "<Ctrl>".
|
||||
*
|
||||
* If the parse fails, @accelerator_key and @accelerator_mods will
|
||||
* be set to 0 (zero) and %FALSE will be returned. If the string contains
|
||||
* only modifiers, @accelerator_key will be set to 0 but %TRUE will be
|
||||
* returned.
|
||||
*
|
||||
* The virtual vs. concrete accelerator distinction is a relic of
|
||||
* how the X Window System works; there are modifiers Mod2-Mod5 that
|
||||
* can represent various keyboard keys (numlock, meta, hyper, etc.),
|
||||
* the virtual modifier represents the keyboard key, the concrete
|
||||
* modifier the actual Mod2-Mod5 bits in the key press event.
|
||||
*
|
||||
* Returns: %TRUE on success.
|
||||
*/
|
||||
gboolean
|
||||
egg_accelerator_parse_virtual (const gchar *accelerator,
|
||||
guint *accelerator_key,
|
||||
EggVirtualModifierType *accelerator_mods)
|
||||
{
|
||||
guint keyval;
|
||||
GdkModifierType mods;
|
||||
gint len;
|
||||
gboolean bad_keyval;
|
||||
|
||||
if (accelerator_key)
|
||||
*accelerator_key = 0;
|
||||
if (accelerator_mods)
|
||||
*accelerator_mods = 0;
|
||||
|
||||
g_return_val_if_fail (accelerator != NULL, FALSE);
|
||||
|
||||
bad_keyval = FALSE;
|
||||
|
||||
keyval = 0;
|
||||
mods = 0;
|
||||
len = strlen (accelerator);
|
||||
while (len)
|
||||
{
|
||||
if (*accelerator == '<')
|
||||
{
|
||||
if (len >= 9 && is_release (accelerator))
|
||||
{
|
||||
accelerator += 9;
|
||||
len -= 9;
|
||||
mods |= EGG_VIRTUAL_RELEASE_MASK;
|
||||
}
|
||||
else if (len >= 9 && is_control (accelerator))
|
||||
{
|
||||
accelerator += 9;
|
||||
len -= 9;
|
||||
mods |= EGG_VIRTUAL_CONTROL_MASK;
|
||||
}
|
||||
else if (len >= 7 && is_shift (accelerator))
|
||||
{
|
||||
accelerator += 7;
|
||||
len -= 7;
|
||||
mods |= EGG_VIRTUAL_SHIFT_MASK;
|
||||
}
|
||||
else if (len >= 6 && is_shft (accelerator))
|
||||
{
|
||||
accelerator += 6;
|
||||
len -= 6;
|
||||
mods |= EGG_VIRTUAL_SHIFT_MASK;
|
||||
}
|
||||
else if (len >= 6 && is_ctrl (accelerator))
|
||||
{
|
||||
accelerator += 6;
|
||||
len -= 6;
|
||||
mods |= EGG_VIRTUAL_CONTROL_MASK;
|
||||
}
|
||||
else if (len >= 6 && is_modx (accelerator))
|
||||
{
|
||||
static const guint mod_vals[] = {
|
||||
EGG_VIRTUAL_ALT_MASK, EGG_VIRTUAL_MOD2_MASK, EGG_VIRTUAL_MOD3_MASK,
|
||||
EGG_VIRTUAL_MOD4_MASK, EGG_VIRTUAL_MOD5_MASK
|
||||
};
|
||||
|
||||
len -= 6;
|
||||
accelerator += 4;
|
||||
mods |= mod_vals[*accelerator - '1'];
|
||||
accelerator += 2;
|
||||
}
|
||||
else if (len >= 5 && is_ctl (accelerator))
|
||||
{
|
||||
accelerator += 5;
|
||||
len -= 5;
|
||||
mods |= EGG_VIRTUAL_CONTROL_MASK;
|
||||
}
|
||||
else if (len >= 5 && is_alt (accelerator))
|
||||
{
|
||||
accelerator += 5;
|
||||
len -= 5;
|
||||
mods |= EGG_VIRTUAL_ALT_MASK;
|
||||
}
|
||||
else if (len >= 6 && is_meta (accelerator))
|
||||
{
|
||||
accelerator += 6;
|
||||
len -= 6;
|
||||
mods |= EGG_VIRTUAL_META_MASK;
|
||||
}
|
||||
else if (len >= 7 && is_hyper (accelerator))
|
||||
{
|
||||
accelerator += 7;
|
||||
len -= 7;
|
||||
mods |= EGG_VIRTUAL_HYPER_MASK;
|
||||
}
|
||||
else if (len >= 7 && is_super (accelerator))
|
||||
{
|
||||
accelerator += 7;
|
||||
len -= 7;
|
||||
mods |= EGG_VIRTUAL_SUPER_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar last_ch;
|
||||
|
||||
last_ch = *accelerator;
|
||||
while (last_ch && last_ch != '>')
|
||||
{
|
||||
last_ch = *accelerator;
|
||||
accelerator += 1;
|
||||
len -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
keyval = gdk_keyval_from_name (accelerator);
|
||||
|
||||
if (keyval == 0)
|
||||
bad_keyval = TRUE;
|
||||
|
||||
accelerator += len;
|
||||
len -= len;
|
||||
}
|
||||
}
|
||||
|
||||
if (accelerator_key)
|
||||
*accelerator_key = gdk_keyval_to_lower (keyval);
|
||||
if (accelerator_mods)
|
||||
*accelerator_mods = mods;
|
||||
|
||||
return !bad_keyval;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* egg_virtual_accelerator_name:
|
||||
* @accelerator_key: accelerator keyval
|
||||
* @accelerator_mods: accelerator modifier mask
|
||||
* @returns: a newly-allocated accelerator name
|
||||
*
|
||||
* Converts an accelerator keyval and modifier mask
|
||||
* into a string parseable by egg_accelerator_parse_virtual().
|
||||
* For example, if you pass in #GDK_q and #EGG_VIRTUAL_CONTROL_MASK,
|
||||
* this function returns "<Control>q".
|
||||
*
|
||||
* The caller of this function must free the returned string.
|
||||
*/
|
||||
gchar*
|
||||
egg_virtual_accelerator_name (guint accelerator_key,
|
||||
EggVirtualModifierType accelerator_mods)
|
||||
{
|
||||
static const gchar text_release[] = "<Release>";
|
||||
static const gchar text_shift[] = "<Shift>";
|
||||
static const gchar text_control[] = "<Control>";
|
||||
static const gchar text_mod1[] = "<Alt>";
|
||||
static const gchar text_mod2[] = "<Mod2>";
|
||||
static const gchar text_mod3[] = "<Mod3>";
|
||||
static const gchar text_mod4[] = "<Mod4>";
|
||||
static const gchar text_mod5[] = "<Mod5>";
|
||||
static const gchar text_meta[] = "<Meta>";
|
||||
static const gchar text_super[] = "<Super>";
|
||||
static const gchar text_hyper[] = "<Hyper>";
|
||||
guint l;
|
||||
gchar *keyval_name;
|
||||
gchar *accelerator;
|
||||
|
||||
accelerator_mods &= EGG_VIRTUAL_MODIFIER_MASK;
|
||||
|
||||
keyval_name = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
|
||||
if (!keyval_name)
|
||||
keyval_name = "";
|
||||
|
||||
l = 0;
|
||||
if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
|
||||
l += sizeof (text_release) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
|
||||
l += sizeof (text_shift) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
|
||||
l += sizeof (text_control) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
|
||||
l += sizeof (text_mod1) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
|
||||
l += sizeof (text_mod2) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
|
||||
l += sizeof (text_mod3) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
|
||||
l += sizeof (text_mod4) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
|
||||
l += sizeof (text_mod5) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_META_MASK)
|
||||
l += sizeof (text_meta) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
|
||||
l += sizeof (text_hyper) - 1;
|
||||
if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
|
||||
l += sizeof (text_super) - 1;
|
||||
l += strlen (keyval_name);
|
||||
|
||||
accelerator = g_new (gchar, l + 1);
|
||||
|
||||
l = 0;
|
||||
accelerator[l] = 0;
|
||||
if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_release);
|
||||
l += sizeof (text_release) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_shift);
|
||||
l += sizeof (text_shift) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_control);
|
||||
l += sizeof (text_control) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_mod1);
|
||||
l += sizeof (text_mod1) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_mod2);
|
||||
l += sizeof (text_mod2) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_mod3);
|
||||
l += sizeof (text_mod3) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_mod4);
|
||||
l += sizeof (text_mod4) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_mod5);
|
||||
l += sizeof (text_mod5) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_META_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_meta);
|
||||
l += sizeof (text_meta) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_hyper);
|
||||
l += sizeof (text_hyper) - 1;
|
||||
}
|
||||
if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
|
||||
{
|
||||
strcpy (accelerator + l, text_super);
|
||||
l += sizeof (text_super) - 1;
|
||||
}
|
||||
|
||||
strcpy (accelerator + l, keyval_name);
|
||||
|
||||
return accelerator;
|
||||
}
|
||||
|
||||
void
|
||||
egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
|
||||
EggVirtualModifierType virtual_mods,
|
||||
GdkModifierType *concrete_mods)
|
||||
{
|
||||
GdkModifierType concrete;
|
||||
int i;
|
||||
const EggModmap *modmap;
|
||||
|
||||
g_return_if_fail (GDK_IS_KEYMAP (keymap));
|
||||
g_return_if_fail (concrete_mods != NULL);
|
||||
|
||||
modmap = egg_keymap_get_modmap (keymap);
|
||||
|
||||
/* Not so sure about this algorithm. */
|
||||
|
||||
concrete = 0;
|
||||
i = 0;
|
||||
while (i < EGG_MODMAP_ENTRY_LAST)
|
||||
{
|
||||
if (modmap->mapping[i] & virtual_mods)
|
||||
concrete |= (1 << i);
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
*concrete_mods = concrete;
|
||||
}
|
||||
|
||||
void
|
||||
egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType concrete_mods,
|
||||
EggVirtualModifierType *virtual_mods)
|
||||
{
|
||||
GdkModifierType virtual;
|
||||
int i;
|
||||
const EggModmap *modmap;
|
||||
|
||||
g_return_if_fail (GDK_IS_KEYMAP (keymap));
|
||||
g_return_if_fail (virtual_mods != NULL);
|
||||
|
||||
modmap = egg_keymap_get_modmap (keymap);
|
||||
|
||||
/* Not so sure about this algorithm. */
|
||||
|
||||
virtual = 0;
|
||||
i = 0;
|
||||
while (i < EGG_MODMAP_ENTRY_LAST)
|
||||
{
|
||||
if ((1 << i) & concrete_mods)
|
||||
{
|
||||
EggVirtualModifierType cleaned;
|
||||
|
||||
cleaned = modmap->mapping[i] & ~(EGG_VIRTUAL_MOD2_MASK |
|
||||
EGG_VIRTUAL_MOD3_MASK |
|
||||
EGG_VIRTUAL_MOD4_MASK |
|
||||
EGG_VIRTUAL_MOD5_MASK);
|
||||
|
||||
if (cleaned != 0)
|
||||
{
|
||||
virtual |= cleaned;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Rather than dropping mod2->mod5 if not bound,
|
||||
* go ahead and use the concrete names
|
||||
*/
|
||||
virtual |= modmap->mapping[i];
|
||||
}
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
*virtual_mods = virtual;
|
||||
}
|
||||
|
||||
static void
|
||||
reload_modmap (GdkKeymap *keymap,
|
||||
EggModmap *modmap)
|
||||
{
|
||||
XModifierKeymap *xmodmap;
|
||||
int map_size;
|
||||
int i;
|
||||
|
||||
/* FIXME multihead */
|
||||
xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ());
|
||||
|
||||
memset (modmap->mapping, 0, sizeof (modmap->mapping));
|
||||
|
||||
/* there are 8 modifiers, and the first 3 are shift, shift lock,
|
||||
* and control
|
||||
*/
|
||||
map_size = 8 * xmodmap->max_keypermod;
|
||||
i = 3 * xmodmap->max_keypermod;
|
||||
while (i < map_size)
|
||||
{
|
||||
/* get the key code at this point in the map,
|
||||
* see if its keysym is one we're interested in
|
||||
*/
|
||||
int keycode = xmodmap->modifiermap[i];
|
||||
GdkKeymapKey *keys;
|
||||
guint *keyvals;
|
||||
int n_entries;
|
||||
int j;
|
||||
EggVirtualModifierType mask;
|
||||
|
||||
keys = NULL;
|
||||
keyvals = NULL;
|
||||
n_entries = 0;
|
||||
|
||||
gdk_keymap_get_entries_for_keycode (keymap,
|
||||
keycode,
|
||||
&keys, &keyvals, &n_entries);
|
||||
|
||||
mask = 0;
|
||||
j = 0;
|
||||
while (j < n_entries)
|
||||
{
|
||||
if (keyvals[j] == GDK_Num_Lock)
|
||||
mask |= EGG_VIRTUAL_NUM_LOCK_MASK;
|
||||
else if (keyvals[j] == GDK_Scroll_Lock)
|
||||
mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK;
|
||||
else if (keyvals[j] == GDK_Meta_L ||
|
||||
keyvals[j] == GDK_Meta_R)
|
||||
mask |= EGG_VIRTUAL_META_MASK;
|
||||
else if (keyvals[j] == GDK_Hyper_L ||
|
||||
keyvals[j] == GDK_Hyper_R)
|
||||
mask |= EGG_VIRTUAL_HYPER_MASK;
|
||||
else if (keyvals[j] == GDK_Super_L ||
|
||||
keyvals[j] == GDK_Super_R)
|
||||
mask |= EGG_VIRTUAL_SUPER_MASK;
|
||||
else if (keyvals[j] == GDK_Mode_switch)
|
||||
mask |= EGG_VIRTUAL_MODE_SWITCH_MASK;
|
||||
|
||||
++j;
|
||||
}
|
||||
|
||||
/* Mod1Mask is 1 << 3 for example, i.e. the
|
||||
* fourth modifier, i / keyspermod is the modifier
|
||||
* index
|
||||
*/
|
||||
modmap->mapping[i/xmodmap->max_keypermod] |= mask;
|
||||
|
||||
g_free (keyvals);
|
||||
g_free (keys);
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
/* Add in the not-really-virtual fixed entries */
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_SHIFT] |= EGG_VIRTUAL_SHIFT_MASK;
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_CONTROL] |= EGG_VIRTUAL_CONTROL_MASK;
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_LOCK] |= EGG_VIRTUAL_LOCK_MASK;
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_MOD1] |= EGG_VIRTUAL_ALT_MASK;
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_MOD2] |= EGG_VIRTUAL_MOD2_MASK;
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_MOD3] |= EGG_VIRTUAL_MOD3_MASK;
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_MOD4] |= EGG_VIRTUAL_MOD4_MASK;
|
||||
modmap->mapping[EGG_MODMAP_ENTRY_MOD5] |= EGG_VIRTUAL_MOD5_MASK;
|
||||
|
||||
XFreeModifiermap (xmodmap);
|
||||
}
|
||||
|
||||
const EggModmap*
|
||||
egg_keymap_get_modmap (GdkKeymap *keymap)
|
||||
{
|
||||
EggModmap *modmap;
|
||||
|
||||
/* This is all a hack, much simpler when we can just
|
||||
* modify GDK directly.
|
||||
*/
|
||||
|
||||
modmap = g_object_get_data (G_OBJECT (keymap),
|
||||
"egg-modmap");
|
||||
|
||||
if (modmap == NULL)
|
||||
{
|
||||
modmap = g_new0 (EggModmap, 1);
|
||||
|
||||
/* FIXME modify keymap change events with an event filter
|
||||
* and force a reload if we get one
|
||||
*/
|
||||
|
||||
reload_modmap (keymap, modmap);
|
||||
|
||||
g_object_set_data_full (G_OBJECT (keymap),
|
||||
"egg-modmap",
|
||||
modmap,
|
||||
g_free);
|
||||
}
|
||||
|
||||
g_assert (modmap != NULL);
|
||||
|
||||
return modmap;
|
||||
}
|
@@ -1,87 +0,0 @@
|
||||
/* eggaccelerators.h
|
||||
* Copyright (C) 2002 Red Hat, Inc.
|
||||
* Developed by Havoc Pennington
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __EGG_ACCELERATORS_H__
|
||||
#define __EGG_ACCELERATORS_H__
|
||||
|
||||
#include <gtk/gtkaccelgroup.h>
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Where a value is also in GdkModifierType we coincide,
|
||||
* otherwise we don't overlap.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
EGG_VIRTUAL_SHIFT_MASK = 1 << 0,
|
||||
EGG_VIRTUAL_LOCK_MASK = 1 << 1,
|
||||
EGG_VIRTUAL_CONTROL_MASK = 1 << 2,
|
||||
|
||||
EGG_VIRTUAL_ALT_MASK = 1 << 3, /* fixed as Mod1 */
|
||||
|
||||
EGG_VIRTUAL_MOD2_MASK = 1 << 4,
|
||||
EGG_VIRTUAL_MOD3_MASK = 1 << 5,
|
||||
EGG_VIRTUAL_MOD4_MASK = 1 << 6,
|
||||
EGG_VIRTUAL_MOD5_MASK = 1 << 7,
|
||||
|
||||
#if 0
|
||||
GDK_BUTTON1_MASK = 1 << 8,
|
||||
GDK_BUTTON2_MASK = 1 << 9,
|
||||
GDK_BUTTON3_MASK = 1 << 10,
|
||||
GDK_BUTTON4_MASK = 1 << 11,
|
||||
GDK_BUTTON5_MASK = 1 << 12,
|
||||
/* 13, 14 are used by Xkb for the keyboard group */
|
||||
#endif
|
||||
|
||||
EGG_VIRTUAL_META_MASK = 1 << 24,
|
||||
EGG_VIRTUAL_SUPER_MASK = 1 << 25,
|
||||
EGG_VIRTUAL_HYPER_MASK = 1 << 26,
|
||||
EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27,
|
||||
EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28,
|
||||
EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29,
|
||||
|
||||
/* Also in GdkModifierType */
|
||||
EGG_VIRTUAL_RELEASE_MASK = 1 << 30,
|
||||
|
||||
/* 28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3
|
||||
* 7 f 0 0 0 0 f f
|
||||
*/
|
||||
EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff
|
||||
|
||||
} EggVirtualModifierType;
|
||||
|
||||
gboolean egg_accelerator_parse_virtual (const gchar *accelerator,
|
||||
guint *accelerator_key,
|
||||
EggVirtualModifierType *accelerator_mods);
|
||||
void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
|
||||
EggVirtualModifierType virtual_mods,
|
||||
GdkModifierType *concrete_mods);
|
||||
void egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
|
||||
GdkModifierType concrete_mods,
|
||||
EggVirtualModifierType *virtual_mods);
|
||||
|
||||
gchar* egg_virtual_accelerator_name (guint accelerator_key,
|
||||
EggVirtualModifierType accelerator_mods);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
||||
#endif /* __EGG_ACCELERATORS_H__ */
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X error handling */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X error handling */
|
||||
|
||||
/*
|
||||
@@ -26,8 +28,8 @@
|
||||
#include "display.h"
|
||||
|
||||
typedef void (* ErrorHandler) (Display *dpy,
|
||||
XErrorEvent *error,
|
||||
gpointer data);
|
||||
XErrorEvent *error,
|
||||
gpointer data);
|
||||
|
||||
void meta_errors_init (void);
|
||||
void meta_errors_register_foreign_display (Display *foreign_dpy,
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X event source for main loop */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X event source for main loop */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity fixed tooltip routine */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity fixed tooltip routine */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X window decorations */
|
||||
|
||||
/*
|
||||
@@ -277,6 +279,9 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
if (frame->is_flashing)
|
||||
flags |= META_FRAME_IS_FLASHING;
|
||||
|
||||
if (frame->window->wm_state_above)
|
||||
flags |= META_FRAME_ABOVE;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X window decorations */
|
||||
|
||||
/*
|
||||
|
515
src/frames.c
515
src/frames.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity window frame manager widget */
|
||||
|
||||
/*
|
||||
@@ -22,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <math.h>
|
||||
#include "boxes.h"
|
||||
#include "frames.h"
|
||||
#include "util.h"
|
||||
@@ -46,6 +49,9 @@ static void meta_frames_style_set (GtkWidget *widget,
|
||||
static void meta_frames_realize (GtkWidget *widget);
|
||||
static void meta_frames_unrealize (GtkWidget *widget);
|
||||
|
||||
static void meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
MetaFrameControl control);
|
||||
static gboolean meta_frames_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event);
|
||||
static gboolean meta_frames_button_release_event (GtkWidget *widget,
|
||||
@@ -752,10 +758,10 @@ meta_frames_apply_shapes (MetaFrames *frames,
|
||||
|
||||
meta_frames_calc_geometry (frames, frame, &fgeom);
|
||||
|
||||
if (!(fgeom.top_left_corner_rounded ||
|
||||
fgeom.top_right_corner_rounded ||
|
||||
fgeom.bottom_left_corner_rounded ||
|
||||
fgeom.bottom_right_corner_rounded ||
|
||||
if (!(fgeom.top_left_corner_rounded_radius != 0 ||
|
||||
fgeom.top_right_corner_rounded_radius != 0 ||
|
||||
fgeom.bottom_left_corner_rounded_radius != 0 ||
|
||||
fgeom.bottom_right_corner_rounded_radius != 0 ||
|
||||
window_has_shape))
|
||||
{
|
||||
if (frame->shape_applied)
|
||||
@@ -780,102 +786,72 @@ meta_frames_apply_shapes (MetaFrames *frames,
|
||||
|
||||
corners_xregion = XCreateRegion ();
|
||||
|
||||
if (fgeom.top_left_corner_rounded)
|
||||
if (fgeom.top_left_corner_rounded_radius != 0)
|
||||
{
|
||||
xrect.x = 0;
|
||||
xrect.y = 0;
|
||||
xrect.width = 5;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
const int radius = fgeom.top_left_corner_rounded_radius;
|
||||
int i;
|
||||
|
||||
xrect.y = 1;
|
||||
xrect.width = 3;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = 2;
|
||||
xrect.width = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = 3;
|
||||
xrect.width = 1;
|
||||
xrect.height = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
for (i=0; i<radius; i++)
|
||||
{
|
||||
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i))));
|
||||
xrect.x = 0;
|
||||
xrect.y = i;
|
||||
xrect.width = width;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
}
|
||||
}
|
||||
|
||||
if (fgeom.top_right_corner_rounded)
|
||||
if (fgeom.top_right_corner_rounded_radius != 0)
|
||||
{
|
||||
xrect.x = new_window_width - 5;
|
||||
xrect.y = 0;
|
||||
xrect.width = 5;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
const int radius = fgeom.top_right_corner_rounded_radius;
|
||||
int i;
|
||||
|
||||
xrect.y = 1;
|
||||
xrect.x = new_window_width - 3;
|
||||
xrect.width = 3;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = 2;
|
||||
xrect.x = new_window_width - 2;
|
||||
xrect.width = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = 3;
|
||||
xrect.x = new_window_width - 1;
|
||||
xrect.width = 1;
|
||||
xrect.height = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
for (i=0; i<radius; i++)
|
||||
{
|
||||
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i))));
|
||||
xrect.x = new_window_width - width;
|
||||
xrect.y = i;
|
||||
xrect.width = width;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
}
|
||||
}
|
||||
|
||||
if (fgeom.bottom_left_corner_rounded)
|
||||
if (fgeom.bottom_left_corner_rounded_radius != 0)
|
||||
{
|
||||
xrect.x = 0;
|
||||
xrect.y = new_window_height - 1;
|
||||
xrect.width = 5;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = new_window_height - 2;
|
||||
xrect.width = 3;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = new_window_height - 3;
|
||||
xrect.width = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
const int radius = fgeom.bottom_left_corner_rounded_radius;
|
||||
int i;
|
||||
|
||||
xrect.y = new_window_height - 5;
|
||||
xrect.width = 1;
|
||||
xrect.height = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
for (i=0; i<radius; i++)
|
||||
{
|
||||
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i))));
|
||||
xrect.x = 0;
|
||||
xrect.y = new_window_height - i;
|
||||
xrect.width = width;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
}
|
||||
}
|
||||
|
||||
if (fgeom.bottom_right_corner_rounded)
|
||||
if (fgeom.bottom_right_corner_rounded_radius != 0)
|
||||
{
|
||||
xrect.x = new_window_width - 5;
|
||||
xrect.y = new_window_height - 1;
|
||||
xrect.width = 5;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = new_window_height - 2;
|
||||
xrect.x = new_window_width - 3;
|
||||
xrect.width = 3;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
|
||||
xrect.y = new_window_height - 3;
|
||||
xrect.x = new_window_width - 2;
|
||||
xrect.width = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
const int radius = fgeom.bottom_right_corner_rounded_radius;
|
||||
int i;
|
||||
|
||||
xrect.y = new_window_height - 5;
|
||||
xrect.x = new_window_width - 1;
|
||||
xrect.width = 1;
|
||||
xrect.height = 2;
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
for (i=0; i<radius; i++)
|
||||
{
|
||||
const int width = 1 + (radius - floor(sqrt(radius*radius - (radius-i)*(radius-i))));
|
||||
xrect.x = new_window_width - width;
|
||||
xrect.y = new_window_height - i;
|
||||
xrect.width = width;
|
||||
xrect.height = 1;
|
||||
|
||||
XUnionRectWithRegion (&xrect, corners_xregion, corners_xregion);
|
||||
}
|
||||
}
|
||||
|
||||
window_xregion = XCreateRegion ();
|
||||
@@ -1097,6 +1073,24 @@ show_tip_now (MetaFrames *frames)
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
tiptext = _("Unmaximize Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
tiptext = _("Roll Up Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
tiptext = _("Unroll Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
tiptext = _("Keep Window On Top");
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
tiptext = _("Remove Window From Top");
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
tiptext = _("Always On Visible Workspace");
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
tiptext = _("Put Window On Only One Workspace");
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_S:
|
||||
@@ -1193,15 +1187,6 @@ redraw_control (MetaFrames *frames,
|
||||
invalidate_cache (frames, frame);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
point_in_control (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
MetaFrameControl control,
|
||||
int x, int y)
|
||||
{
|
||||
return control == get_control (frames, frame, x, y);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_button_press_event (GtkWidget *widget,
|
||||
GdkEventButton *event)
|
||||
@@ -1260,10 +1245,12 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
{
|
||||
if (flags & META_FRAME_SHADED)
|
||||
meta_core_unshade (gdk_display,
|
||||
frame->xwindow);
|
||||
frame->xwindow,
|
||||
event->time);
|
||||
else
|
||||
meta_core_shade (gdk_display,
|
||||
frame->xwindow);
|
||||
frame->xwindow,
|
||||
event->time);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1281,9 +1268,14 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
|
||||
case META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE:
|
||||
{
|
||||
meta_core_minimize (gdk_display, frame->xwindow);
|
||||
break;
|
||||
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! */
|
||||
@@ -1305,6 +1297,12 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
control == META_FRAME_CONTROL_UNMAXIMIZE ||
|
||||
control == META_FRAME_CONTROL_MINIMIZE ||
|
||||
control == META_FRAME_CONTROL_DELETE ||
|
||||
control == META_FRAME_CONTROL_SHADE ||
|
||||
control == META_FRAME_CONTROL_UNSHADE ||
|
||||
control == META_FRAME_CONTROL_ABOVE ||
|
||||
control == META_FRAME_CONTROL_UNABOVE ||
|
||||
control == META_FRAME_CONTROL_STICK ||
|
||||
control == META_FRAME_CONTROL_UNSTICK ||
|
||||
control == META_FRAME_CONTROL_MENU))
|
||||
{
|
||||
MetaGrabOp op = META_GRAB_OP_NONE;
|
||||
@@ -1326,6 +1324,24 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
case META_FRAME_CONTROL_MENU:
|
||||
op = META_GRAB_OP_CLICKING_MENU;
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
op = META_GRAB_OP_CLICKING_SHADE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
op = META_GRAB_OP_CLICKING_UNSHADE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
op = META_GRAB_OP_CLICKING_ABOVE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
op = META_GRAB_OP_CLICKING_UNABOVE;
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
op = META_GRAB_OP_CLICKING_STICK;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
op = META_GRAB_OP_CLICKING_UNSTICK;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
@@ -1342,6 +1358,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
event->x_root,
|
||||
event->y_root);
|
||||
|
||||
frame->prelit_control = control;
|
||||
redraw_control (frames, frame, control);
|
||||
|
||||
if (op == META_GRAB_OP_CLICKING_MENU)
|
||||
@@ -1525,67 +1542,96 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
if (frame->xwindow == meta_core_get_grab_frame (gdk_display) &&
|
||||
((int) event->button) == meta_core_get_grab_button (gdk_display))
|
||||
{
|
||||
gboolean end_grab;
|
||||
|
||||
end_grab = FALSE;
|
||||
MetaFrameControl control;
|
||||
|
||||
control = get_control (frames, frame, event->x, event->y);
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case META_GRAB_OP_CLICKING_MINIMIZE:
|
||||
if (point_in_control (frames, frame,
|
||||
META_FRAME_CONTROL_MINIMIZE,
|
||||
event->x, event->y))
|
||||
if (control == META_FRAME_CONTROL_MINIMIZE)
|
||||
meta_core_minimize (gdk_display, frame->xwindow);
|
||||
|
||||
redraw_control (frames, frame,
|
||||
META_FRAME_CONTROL_MINIMIZE);
|
||||
end_grab = TRUE;
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_MAXIMIZE:
|
||||
if (point_in_control (frames, frame,
|
||||
META_FRAME_CONTROL_MAXIMIZE,
|
||||
event->x, event->y))
|
||||
if (control == META_FRAME_CONTROL_MAXIMIZE)
|
||||
meta_core_maximize (gdk_display, frame->xwindow);
|
||||
|
||||
redraw_control (frames, frame,
|
||||
META_FRAME_CONTROL_MAXIMIZE);
|
||||
end_grab = TRUE;
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
|
||||
if (point_in_control (frames, frame,
|
||||
META_FRAME_CONTROL_UNMAXIMIZE,
|
||||
event->x, event->y))
|
||||
if (control == META_FRAME_CONTROL_UNMAXIMIZE)
|
||||
meta_core_unmaximize (gdk_display, frame->xwindow);
|
||||
|
||||
redraw_control (frames, frame,
|
||||
META_FRAME_CONTROL_MAXIMIZE);
|
||||
end_grab = TRUE;
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_DELETE:
|
||||
if (point_in_control (frames, frame,
|
||||
META_FRAME_CONTROL_DELETE,
|
||||
event->x, event->y))
|
||||
if (control == META_FRAME_CONTROL_DELETE)
|
||||
meta_core_delete (gdk_display, frame->xwindow, event->time);
|
||||
redraw_control (frames, frame,
|
||||
META_FRAME_CONTROL_DELETE);
|
||||
end_grab = TRUE;
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_MENU:
|
||||
redraw_control (frames, frame,
|
||||
META_FRAME_CONTROL_MENU);
|
||||
end_grab = TRUE;
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_SHADE:
|
||||
if (control == META_FRAME_CONTROL_SHADE)
|
||||
meta_core_shade (gdk_display, frame->xwindow, event->time);
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNSHADE:
|
||||
if (control == META_FRAME_CONTROL_UNSHADE)
|
||||
meta_core_unshade (gdk_display, frame->xwindow, event->time);
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_ABOVE:
|
||||
if (control == META_FRAME_CONTROL_ABOVE)
|
||||
meta_core_make_above (gdk_display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNABOVE:
|
||||
if (control == META_FRAME_CONTROL_UNABOVE)
|
||||
meta_core_unmake_above (gdk_display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_STICK:
|
||||
if (control == META_FRAME_CONTROL_STICK)
|
||||
meta_core_stick (gdk_display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_CLICKING_UNSTICK:
|
||||
if (control == META_FRAME_CONTROL_UNSTICK)
|
||||
meta_core_unstick (gdk_display, frame->xwindow);
|
||||
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (end_grab)
|
||||
meta_core_end_grab_op (gdk_display, event->time);
|
||||
/* Update the prelit control regardless of what button the mouse
|
||||
* was released over; needed so that the new button can become
|
||||
* prelit so to let the user know that it can now be pressed.
|
||||
* :)
|
||||
*/
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
@@ -1599,6 +1645,7 @@ meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
MetaFrameControl old_control;
|
||||
MetaCursor cursor;
|
||||
|
||||
|
||||
meta_verbose ("Updating prelit control from %u to %u\n",
|
||||
frame->prelit_control, control);
|
||||
|
||||
@@ -1622,6 +1669,18 @@ meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
cursor = META_CURSOR_SE_RESIZE;
|
||||
break;
|
||||
@@ -1659,6 +1718,12 @@ meta_frames_update_prelit_control (MetaFrames *frames,
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
/* leave control set */
|
||||
break;
|
||||
@@ -1707,6 +1772,12 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
case META_GRAB_OP_CLICKING_MINIMIZE:
|
||||
case META_GRAB_OP_CLICKING_MAXIMIZE:
|
||||
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
|
||||
case META_GRAB_OP_CLICKING_SHADE:
|
||||
case META_GRAB_OP_CLICKING_UNSHADE:
|
||||
case META_GRAB_OP_CLICKING_ABOVE:
|
||||
case META_GRAB_OP_CLICKING_UNABOVE:
|
||||
case META_GRAB_OP_CLICKING_STICK:
|
||||
case META_GRAB_OP_CLICKING_UNSTICK:
|
||||
{
|
||||
MetaFrameControl control;
|
||||
int x, y;
|
||||
@@ -1725,8 +1796,20 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
grab_op == META_GRAB_OP_CLICKING_MINIMIZE) ||
|
||||
(control == META_FRAME_CONTROL_MAXIMIZE &&
|
||||
(grab_op == META_GRAB_OP_CLICKING_MAXIMIZE ||
|
||||
grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE))))
|
||||
control = META_FRAME_CONTROL_NONE;
|
||||
grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE)) ||
|
||||
(control == META_FRAME_CONTROL_SHADE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_SHADE) ||
|
||||
(control == META_FRAME_CONTROL_UNSHADE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_UNSHADE) ||
|
||||
(control == META_FRAME_CONTROL_ABOVE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_ABOVE) ||
|
||||
(control == META_FRAME_CONTROL_UNABOVE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_UNABOVE) ||
|
||||
(control == META_FRAME_CONTROL_STICK &&
|
||||
grab_op == META_GRAB_OP_CLICKING_STICK) ||
|
||||
(control == META_FRAME_CONTROL_UNSTICK &&
|
||||
grab_op == META_GRAB_OP_CLICKING_UNSTICK)))
|
||||
control = META_FRAME_CONTROL_NONE;
|
||||
|
||||
/* Update prelit control and cursor */
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
@@ -2106,6 +2189,42 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_SHADE)
|
||||
button_states[META_BUTTON_TYPE_SHADE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_SHADE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_UNSHADE)
|
||||
button_states[META_BUTTON_TYPE_UNSHADE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_UNSHADE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_ABOVE)
|
||||
button_states[META_BUTTON_TYPE_ABOVE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_ABOVE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_UNABOVE)
|
||||
button_states[META_BUTTON_TYPE_UNABOVE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_UNABOVE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_STICK)
|
||||
button_states[META_BUTTON_TYPE_STICK] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_STICK] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_UNSTICK)
|
||||
button_states[META_BUTTON_TYPE_UNSTICK] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_UNSTICK] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_DELETE)
|
||||
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRESSED;
|
||||
@@ -2191,17 +2310,52 @@ static void
|
||||
meta_frames_set_window_background (MetaFrames *frames,
|
||||
MetaUIFrame *frame)
|
||||
{
|
||||
gtk_style_set_background (GTK_WIDGET (frames)->style,
|
||||
frame->window, GTK_STATE_NORMAL);
|
||||
MetaFrameFlags flags;
|
||||
MetaFrameType type;
|
||||
MetaFrameStyle *style;
|
||||
gboolean frame_exists;
|
||||
|
||||
#if 0
|
||||
/* This is what we want for transparent background */
|
||||
{
|
||||
col.pixel = 0;
|
||||
gdk_window_set_background (window, &col);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
frame_exists = meta_core_window_has_frame (gdk_display, frame->xwindow);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
if (frame_exists && style->window_background_color != NULL)
|
||||
{
|
||||
GdkColor color;
|
||||
GdkVisual *visual;
|
||||
|
||||
meta_color_spec_render (style->window_background_color,
|
||||
GTK_WIDGET (frames),
|
||||
&color);
|
||||
|
||||
/* Fill in color.pixel */
|
||||
|
||||
gdk_rgb_find_color (gtk_widget_get_colormap (GTK_WIDGET (frames)),
|
||||
&color);
|
||||
|
||||
/* Set A in ARGB to window_background_alpha, if we have ARGB */
|
||||
|
||||
visual = gtk_widget_get_visual (GTK_WIDGET (frames));
|
||||
if (visual->depth == 32) /* we have ARGB */
|
||||
{
|
||||
color.pixel = (color.pixel & 0xffffff) &
|
||||
style->window_background_alpha << 24;
|
||||
}
|
||||
|
||||
gdk_window_set_background (frame->window, &color);
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_style_set_background (GTK_WIDGET (frames)->style,
|
||||
frame->window, GTK_STATE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_enter_notify_event (GtkWidget *widget,
|
||||
@@ -2256,17 +2410,35 @@ control_rect (MetaFrameControl control,
|
||||
rect = &fgeom->title_rect;
|
||||
break;
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
rect = &fgeom->close_rect;
|
||||
rect = &fgeom->close_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_MENU:
|
||||
rect = &fgeom->menu_rect;
|
||||
rect = &fgeom->menu_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
rect = &fgeom->min_rect;
|
||||
rect = &fgeom->min_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
rect = &fgeom->max_rect;
|
||||
rect = &fgeom->max_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
rect = &fgeom->shade_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
rect = &fgeom->unshade_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
rect = &fgeom->above_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
rect = &fgeom->unabove_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
rect = &fgeom->stick_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
rect = &fgeom->unstick_rect.visible;
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
break;
|
||||
@@ -2304,7 +2476,6 @@ get_control (MetaFrames *frames,
|
||||
MetaFrameFlags flags;
|
||||
gboolean has_vert, has_horiz;
|
||||
GdkRectangle client;
|
||||
int bottom_of_titlebar;
|
||||
|
||||
meta_frames_calc_geometry (frames, frame, &fgeom);
|
||||
|
||||
@@ -2313,18 +2484,16 @@ get_control (MetaFrames *frames,
|
||||
client.width = fgeom.width - fgeom.left_width - fgeom.right_width;
|
||||
client.height = fgeom.height - fgeom.top_height - fgeom.bottom_height;
|
||||
|
||||
bottom_of_titlebar = fgeom.title_rect.y + fgeom.title_rect.height;
|
||||
|
||||
if (POINT_IN_RECT (x, y, client))
|
||||
return META_FRAME_CONTROL_CLIENT_AREA;
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.close_rect))
|
||||
if (POINT_IN_RECT (x, y, fgeom.close_rect.clickable))
|
||||
return META_FRAME_CONTROL_DELETE;
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.min_rect))
|
||||
if (POINT_IN_RECT (x, y, fgeom.min_rect.clickable))
|
||||
return META_FRAME_CONTROL_MINIMIZE;
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.menu_rect))
|
||||
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);
|
||||
@@ -2340,7 +2509,7 @@ get_control (MetaFrames *frames,
|
||||
return META_FRAME_CONTROL_TITLE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.max_rect))
|
||||
if (POINT_IN_RECT (x, y, fgeom.max_rect.clickable))
|
||||
{
|
||||
if (flags & META_FRAME_MAXIMIZED)
|
||||
return META_FRAME_CONTROL_UNMAXIMIZE;
|
||||
@@ -2348,6 +2517,36 @@ get_control (MetaFrames *frames,
|
||||
return META_FRAME_CONTROL_MAXIMIZE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.shade_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_SHADE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unshade_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNSHADE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.above_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_ABOVE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unabove_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNABOVE;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.stick_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_STICK;
|
||||
}
|
||||
|
||||
if (POINT_IN_RECT (x, y, fgeom.unstick_rect.clickable))
|
||||
{
|
||||
return META_FRAME_CONTROL_UNSTICK;
|
||||
}
|
||||
|
||||
/* South resize always has priority over north resize,
|
||||
* in case of overlap.
|
||||
*/
|
||||
@@ -2415,7 +2614,7 @@ get_control (MetaFrames *frames,
|
||||
return META_FRAME_CONTROL_RESIZE_E;
|
||||
}
|
||||
|
||||
if (y >= bottom_of_titlebar)
|
||||
if (y >= fgeom.top_height)
|
||||
return META_FRAME_CONTROL_NONE;
|
||||
else
|
||||
return META_FRAME_CONTROL_TITLE;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity window frame manager widget */
|
||||
|
||||
/*
|
||||
@@ -36,6 +38,12 @@ typedef enum
|
||||
META_FRAME_CONTROL_MINIMIZE,
|
||||
META_FRAME_CONTROL_MAXIMIZE,
|
||||
META_FRAME_CONTROL_UNMAXIMIZE,
|
||||
META_FRAME_CONTROL_SHADE,
|
||||
META_FRAME_CONTROL_UNSHADE,
|
||||
META_FRAME_CONTROL_ABOVE,
|
||||
META_FRAME_CONTROL_UNABOVE,
|
||||
META_FRAME_CONTROL_STICK,
|
||||
META_FRAME_CONTROL_UNSTICK,
|
||||
META_FRAME_CONTROL_RESIZE_SE,
|
||||
META_FRAME_CONTROL_RESIZE_S,
|
||||
META_FRAME_CONTROL_RESIZE_SW,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user