Compare commits
484 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d341b8ea5e | ||
![]() |
795d2caf8b | ||
![]() |
f6036b9860 | ||
![]() |
82cefd12ad | ||
![]() |
7ab715fa71 | ||
![]() |
163e236cd0 | ||
![]() |
0107da404c | ||
![]() |
c94c482283 | ||
![]() |
09501c9fab | ||
![]() |
941e4bf967 | ||
![]() |
60d710a71f | ||
![]() |
5dbe941495 | ||
![]() |
e9388f4345 | ||
![]() |
a8c5c002fb | ||
![]() |
327e3cb6b5 | ||
![]() |
0bdfa0f494 | ||
![]() |
c500de4e38 | ||
![]() |
b55dbe10bb | ||
![]() |
01c0a95136 | ||
![]() |
8fea7a4128 | ||
![]() |
4f93a1a273 | ||
![]() |
c5c68fcbe8 | ||
![]() |
0c7be52675 | ||
![]() |
fff75cd9ae | ||
![]() |
76735c18a1 | ||
![]() |
1f435cc1fc | ||
![]() |
a5d2bdea55 | ||
![]() |
565a04793e | ||
![]() |
f167d55625 | ||
![]() |
3405f3d8c8 | ||
![]() |
f141692ca2 | ||
![]() |
fe292078fe | ||
![]() |
224040cd1a | ||
![]() |
4026ea7b42 | ||
![]() |
53b9e49ca4 | ||
![]() |
8547d1e8ed | ||
![]() |
b095ecc195 | ||
![]() |
3bbf402684 | ||
![]() |
f8ff76efdd | ||
![]() |
3673472cd7 | ||
![]() |
b455ac62d2 | ||
![]() |
4916fedc28 | ||
![]() |
81eeb9c0d5 | ||
![]() |
2d895ce875 | ||
![]() |
eacd442787 | ||
![]() |
b8a9ed1d3a | ||
![]() |
117f0e5663 | ||
![]() |
f13a8e6ab9 | ||
![]() |
fa1195b7f1 | ||
![]() |
3d9f2868fc | ||
![]() |
17bf5ea13a | ||
![]() |
8d3432b8b7 | ||
![]() |
3fcbbfbbd2 | ||
![]() |
2caa49bca8 | ||
![]() |
a8912c4fb9 | ||
![]() |
7f8ad91af6 | ||
![]() |
53a7cbe6af | ||
![]() |
b9c6ba8536 | ||
![]() |
4e653cc49f | ||
![]() |
c17d58237e | ||
![]() |
48261330de | ||
![]() |
300be6e03b | ||
![]() |
0c83442709 | ||
![]() |
d372cf598a | ||
![]() |
5fa7c76ba0 | ||
![]() |
77644a32d7 | ||
![]() |
fb588c6075 | ||
![]() |
6a586e8929 | ||
![]() |
58ef1592a5 | ||
![]() |
9730f15411 | ||
![]() |
f3e64f181d | ||
![]() |
0130c0d5b6 | ||
![]() |
1e325bcbdf | ||
![]() |
941a9a9a7f | ||
![]() |
38b4f08b2b | ||
![]() |
fe1ea6ac34 | ||
![]() |
932fb56ea9 | ||
![]() |
18dfce2873 | ||
![]() |
915192ca9f | ||
![]() |
f2b400b82c | ||
![]() |
e629364582 | ||
![]() |
3299427097 | ||
![]() |
7d239b0d45 | ||
![]() |
9836007f5e | ||
![]() |
87cceaf992 | ||
![]() |
f77dba7ac2 | ||
![]() |
d19de0c1ee | ||
![]() |
142b64fff9 | ||
![]() |
a9b20427a5 | ||
![]() |
0e02cf9b07 | ||
![]() |
5f4c3f817b | ||
![]() |
80e838aed5 | ||
![]() |
b4c369931d | ||
![]() |
1b00ca6158 | ||
![]() |
4b8a05b803 | ||
![]() |
fe816afa1d | ||
![]() |
b93a94506b | ||
![]() |
d1ef896c73 | ||
![]() |
ed5c34d335 | ||
![]() |
429a8ccd15 | ||
![]() |
a8c3d1614f | ||
![]() |
ac10c309ea | ||
![]() |
e021e06178 | ||
![]() |
8c6f3853b0 | ||
![]() |
e7196621bc | ||
![]() |
f8a5ef7c9f | ||
![]() |
85631aec0f | ||
![]() |
401b716cf5 | ||
![]() |
3d4adc8be9 | ||
![]() |
210206b699 | ||
![]() |
c0c05d51ea | ||
![]() |
9d9576612b | ||
![]() |
abdb3fd8b9 | ||
![]() |
b3f766c618 | ||
![]() |
41e93f71be | ||
![]() |
79076b2997 | ||
![]() |
3684bd2da4 | ||
![]() |
d0e22bf63d | ||
![]() |
8450d97341 | ||
![]() |
3043d2a2be | ||
![]() |
3ca31c7b04 | ||
![]() |
8802ac2fe9 | ||
![]() |
61c7487172 | ||
![]() |
3782c482ef | ||
![]() |
8c487ddbb2 | ||
![]() |
07939f235f | ||
![]() |
abfccf5002 | ||
![]() |
df83c15583 | ||
![]() |
83010879f1 | ||
![]() |
c35fd86b3b | ||
![]() |
932fd0dcff | ||
![]() |
2a53302ab9 | ||
![]() |
44a4c1c9fb | ||
![]() |
04956ecf18 | ||
![]() |
2d41d65cf2 | ||
![]() |
7e41ffdda5 | ||
![]() |
54c15a2583 | ||
![]() |
8aae0a7723 | ||
![]() |
f23d8a3774 | ||
![]() |
aad6f37f8a | ||
![]() |
404a61b571 | ||
![]() |
0312a3e474 | ||
![]() |
c25a5c99ec | ||
![]() |
ac5759af24 | ||
![]() |
9bee48dcd2 | ||
![]() |
73d9143d76 | ||
![]() |
230d78d8b4 | ||
![]() |
fbc3563b21 | ||
![]() |
4c8557055c | ||
![]() |
2f43d436c8 | ||
![]() |
a9a69ac807 | ||
![]() |
8e7fe42b5e | ||
![]() |
d70219b88d | ||
![]() |
806fa75a70 | ||
![]() |
1177b13338 | ||
![]() |
ea2d79fbfb | ||
![]() |
f60624ac5b | ||
![]() |
836a1f7b08 | ||
![]() |
a660fd3805 | ||
![]() |
d5cea091bf | ||
![]() |
0bd1727eab | ||
![]() |
8bd2822e69 | ||
![]() |
7a340792c9 | ||
![]() |
8e77d5b28d | ||
![]() |
8e79100b92 | ||
![]() |
18b63e9b5f | ||
![]() |
48b6e8dd67 | ||
![]() |
fb872b8f1e | ||
![]() |
94be13a003 | ||
![]() |
ea1c807d69 | ||
![]() |
1df98bd6a4 | ||
![]() |
6c192b67a9 | ||
![]() |
4a792d207c | ||
![]() |
1daf7543eb | ||
![]() |
b4890a3d22 | ||
![]() |
7b031a1c28 | ||
![]() |
ca098b2416 | ||
![]() |
cb5134de8d | ||
![]() |
e5009396f8 | ||
![]() |
53a116333c | ||
![]() |
13918cea25 | ||
![]() |
03f14bd5dd | ||
![]() |
8828532d14 | ||
![]() |
146ad60c7f | ||
![]() |
6da40d919b | ||
![]() |
a4d657a324 | ||
![]() |
4419430a57 | ||
![]() |
11ba3be6b9 | ||
![]() |
286af99def | ||
![]() |
a409a0a098 | ||
![]() |
ee7cfc8824 | ||
![]() |
af8d3c16bf | ||
![]() |
9d1549e1ff | ||
![]() |
845ecdc3af | ||
![]() |
1c5ef4a50f | ||
![]() |
212a9f26ab | ||
![]() |
e61015cb42 | ||
![]() |
c96ae75437 | ||
![]() |
a8e2f45b1c | ||
![]() |
33383e1f4f | ||
![]() |
b9e1a9159e | ||
![]() |
5dc41f8c94 | ||
![]() |
4aaf053760 | ||
![]() |
b718f79c47 | ||
![]() |
72b08c82b1 | ||
![]() |
3880951458 | ||
![]() |
3229882183 | ||
![]() |
f4cc847f83 | ||
![]() |
a63d5801ae | ||
![]() |
4b774eb18e | ||
![]() |
d052782caf | ||
![]() |
c2a6eeaf5e | ||
![]() |
931d70d87f | ||
![]() |
f28cd718f8 | ||
![]() |
623e4dc05c | ||
![]() |
89e47e2431 | ||
![]() |
83e18f8da4 | ||
![]() |
42951ec68f | ||
![]() |
a99ece5a5e | ||
![]() |
6bb78dcb0b | ||
![]() |
855de7253d | ||
![]() |
e7dc04d28e | ||
![]() |
4564236abf | ||
![]() |
e7758d64d8 | ||
![]() |
71c83da805 | ||
![]() |
2891388813 | ||
![]() |
194c514b45 | ||
![]() |
69255114d9 | ||
![]() |
43f0c34cf8 | ||
![]() |
aa2af695d7 | ||
![]() |
539285ca78 | ||
![]() |
dda8866f30 | ||
![]() |
618115931e | ||
![]() |
20d599819b | ||
![]() |
a8583668eb | ||
![]() |
4b0fd1b7d8 | ||
![]() |
3789229a70 | ||
![]() |
14c046d18d | ||
![]() |
386ffb4752 | ||
![]() |
fa51a94a69 | ||
![]() |
ef3f8c18a1 | ||
![]() |
f4e327f69c | ||
![]() |
b61359506c | ||
![]() |
2a9dc7272b | ||
![]() |
bcc3f56193 | ||
![]() |
6bec74017f | ||
![]() |
618a9f03b3 | ||
![]() |
98886f3d94 | ||
![]() |
7b690d6bc1 | ||
![]() |
67ce5927e1 | ||
![]() |
f29afe115d | ||
![]() |
6fa4345514 | ||
![]() |
d0523744b7 | ||
![]() |
848ccb3249 | ||
![]() |
988e5f49dd | ||
![]() |
118d962b2d | ||
![]() |
1bf37776c3 | ||
![]() |
908715bd84 | ||
![]() |
c241036c06 | ||
![]() |
280a01c5de | ||
![]() |
4ef11cfbd3 | ||
![]() |
8a023b00f2 | ||
![]() |
ab9ff657c7 | ||
![]() |
34cfd6fafd | ||
![]() |
c691288b14 | ||
![]() |
46c9134992 | ||
![]() |
eb3449f5c7 | ||
![]() |
211de6cfac | ||
![]() |
4e2434c082 | ||
![]() |
2d60c6b878 | ||
![]() |
f71386bdb5 | ||
![]() |
4e3a658b8e | ||
![]() |
bf683f6e50 | ||
![]() |
cb8b2fd433 | ||
![]() |
8780fd5e44 | ||
![]() |
0fd533eee1 | ||
![]() |
dc7e1007b0 | ||
![]() |
976968e07e | ||
![]() |
d986898234 | ||
![]() |
1d8db8825f | ||
![]() |
7c377a0193 | ||
![]() |
fe9e1cdb05 | ||
![]() |
d6e8c6c3ed | ||
![]() |
029e3fc0ae | ||
![]() |
c27cdff29c | ||
![]() |
cf2da99859 | ||
![]() |
3fe42e647a | ||
![]() |
1d06b1f5e8 | ||
![]() |
20479df535 | ||
![]() |
c585fa5036 | ||
![]() |
1aed84c9d7 | ||
![]() |
8cacb2afef | ||
![]() |
2cfd418b03 | ||
![]() |
e4c4d8b4d8 | ||
![]() |
fc74911256 | ||
![]() |
3d0535569d | ||
![]() |
4dc7e6a4ed | ||
![]() |
e84b5bfed0 | ||
![]() |
c9366989a0 | ||
![]() |
eb3c38e3ad | ||
![]() |
5196fb1ec5 | ||
![]() |
353408e30b | ||
![]() |
cc6b0e03fb | ||
![]() |
38cd0f28ef | ||
![]() |
3d118513c5 | ||
![]() |
d35c086240 | ||
![]() |
27e7d0c529 | ||
![]() |
a9294e2906 | ||
![]() |
446cc65f5d | ||
![]() |
0a94728234 | ||
![]() |
aa87fe4140 | ||
![]() |
5944e94710 | ||
![]() |
2b468a45b3 | ||
![]() |
d7cff41d1b | ||
![]() |
b4d0db909b | ||
![]() |
b595f1e99c | ||
![]() |
ed467aad59 | ||
![]() |
73224faec0 | ||
![]() |
bd5436097e | ||
![]() |
a462ba5798 | ||
![]() |
b1ff50f45f | ||
![]() |
5a6bbef8ac | ||
![]() |
309e254b1d | ||
![]() |
10dd09687b | ||
![]() |
69bbbbc6ca | ||
![]() |
1a6c98c79b | ||
![]() |
952e883456 | ||
![]() |
c652788542 | ||
![]() |
696ef85e64 | ||
![]() |
007e8c013c | ||
![]() |
cd07c25706 | ||
![]() |
3802f157b6 | ||
![]() |
a871830927 | ||
![]() |
5545e49581 | ||
![]() |
e98e38d32e | ||
![]() |
2d74cdc026 | ||
![]() |
7c343fc22d | ||
![]() |
1dc74bbc8c | ||
![]() |
618a6b38c3 | ||
![]() |
e8b016984b | ||
![]() |
8bbccb91f7 | ||
![]() |
9c2e546f53 | ||
![]() |
12ac1d6a4b | ||
![]() |
2ccb7f7bfa | ||
![]() |
389eb410c7 | ||
![]() |
f0c4d2c57b | ||
![]() |
4c4943312a | ||
![]() |
d616aeb828 | ||
![]() |
92c63dfdc5 | ||
![]() |
f9678266c7 | ||
![]() |
e3db5a0be6 | ||
![]() |
49e1802c7a | ||
![]() |
eb4941d005 | ||
![]() |
371f0b732f | ||
![]() |
bdd9e28878 | ||
![]() |
1f05ddcd0e | ||
![]() |
78604b64bc | ||
![]() |
7c4af65ec1 | ||
![]() |
e6083f64fb | ||
![]() |
b996cd03be | ||
![]() |
36287b9417 | ||
![]() |
6d8efc90e0 | ||
![]() |
d53af7196c | ||
![]() |
667c74bc4d | ||
![]() |
c5c59b1761 | ||
![]() |
5fb20624c4 | ||
![]() |
8f2b9cb4a9 | ||
![]() |
0418146249 | ||
![]() |
6e70013412 | ||
![]() |
ff33209e1f | ||
![]() |
98791271e1 | ||
![]() |
8eac4fa3ce | ||
![]() |
0666e2c038 | ||
![]() |
1004bd8b60 | ||
![]() |
45966f581b | ||
![]() |
5194df842c | ||
![]() |
a7053d3d47 | ||
![]() |
8ead622f8f | ||
![]() |
7759644304 | ||
![]() |
526dd959ed | ||
![]() |
cb5c112166 | ||
![]() |
fb3b32a2bd | ||
![]() |
0e25c6eff6 | ||
![]() |
1724fa36f1 | ||
![]() |
a50b3c7a2b | ||
![]() |
c8d33dc86b | ||
![]() |
aae4472a63 | ||
![]() |
18c9101a4f | ||
![]() |
b10626c5d8 | ||
![]() |
50310c5870 | ||
![]() |
e03de727db | ||
![]() |
7f6b23a90d | ||
![]() |
e66919510f | ||
![]() |
966e36b9f6 | ||
![]() |
ee3ae1584f | ||
![]() |
128cda50bf | ||
![]() |
3f7d729978 | ||
![]() |
6de7271ab6 | ||
![]() |
6fa4dee13e | ||
![]() |
bc6996b171 | ||
![]() |
9ec6dbd5ca | ||
![]() |
2034a309e5 | ||
![]() |
7626f74b85 | ||
![]() |
eb639a4650 | ||
![]() |
dc9920b883 | ||
![]() |
b8f89db4d1 | ||
![]() |
63ca4e8bde | ||
![]() |
4d8a7a2045 | ||
![]() |
ebfbef86a0 | ||
![]() |
addf369006 | ||
![]() |
82c56cb5d7 | ||
![]() |
0a8bdcdcb3 | ||
![]() |
745906b7db | ||
![]() |
8fe344db51 | ||
![]() |
f32712937b | ||
![]() |
43d4ea3f3b | ||
![]() |
8d00f13dc7 | ||
![]() |
6753584e80 | ||
![]() |
9b85e7ee7f | ||
![]() |
dda3c2bee6 | ||
![]() |
921661e91d | ||
![]() |
7a799b3a63 | ||
![]() |
b01dcaa338 | ||
![]() |
9cae11fd9e | ||
![]() |
da7d198757 | ||
![]() |
350225ea37 | ||
![]() |
930c7ea270 | ||
![]() |
ec51e41c62 | ||
![]() |
08f51fdf94 | ||
![]() |
e82ce26425 | ||
![]() |
8a4c3c81a1 | ||
![]() |
0bb8bd4370 | ||
![]() |
81e32cfa32 | ||
![]() |
6e007baaa8 | ||
![]() |
55899b5ab7 | ||
![]() |
5c06f103ca | ||
![]() |
e6b1bd9922 | ||
![]() |
44b86d468e | ||
![]() |
44ef3b3a51 | ||
![]() |
11a90c53ed | ||
![]() |
88b91199d2 | ||
![]() |
15d871023e | ||
![]() |
fc00da1099 | ||
![]() |
db3d6725a2 | ||
![]() |
f94d12a991 | ||
![]() |
c7cb503003 | ||
![]() |
dc9880ea7e | ||
![]() |
7eb85e6e9c | ||
![]() |
6ab8fb150f | ||
![]() |
e179b813f4 | ||
![]() |
24a6a105e3 | ||
![]() |
9d6fed2aa0 | ||
![]() |
8090d192e3 | ||
![]() |
36b9a3a974 | ||
![]() |
f145337a8b | ||
![]() |
0d7d821343 | ||
![]() |
7211cc21c3 | ||
![]() |
f4277e3235 | ||
![]() |
47bb79adb2 | ||
![]() |
39a6707a06 | ||
![]() |
f6f968a545 | ||
![]() |
10ad03db76 | ||
![]() |
ae441010b9 | ||
![]() |
a877cbc80d | ||
![]() |
b40993fab9 | ||
![]() |
b86d678c4c | ||
![]() |
56b59faf87 | ||
![]() |
90e6198401 | ||
![]() |
cd748a2e97 | ||
![]() |
c73a198f94 | ||
![]() |
4e478159b6 | ||
![]() |
85e43a402f | ||
![]() |
c1fcc4bb6b | ||
![]() |
a850771e04 | ||
![]() |
6126940518 | ||
![]() |
82267f5afb | ||
![]() |
22e6c6f7c9 | ||
![]() |
fe75a334b1 | ||
![]() |
2774292561 | ||
![]() |
e9f578b511 | ||
![]() |
2ee754ddaf | ||
![]() |
f7a45f10ea | ||
![]() |
9626780635 | ||
![]() |
e3249d6e1b |
23
HACKING
23
HACKING
@@ -42,18 +42,17 @@ Minimal Building/Testing Environment
|
||||
build a development version of Metacity -- odds are, you may be able
|
||||
to build metacity from CVS without building any other modules.
|
||||
|
||||
As long as you have gtk+ >= 2.10 with your distro (gtk+ >= 2.6 if
|
||||
you manually revert the change from bug 348633), you should be able
|
||||
to install your distro's development packages (e.g. gtk2-devel,
|
||||
GConf2-devel, startup-notification-devel on Fedora; also, remember
|
||||
to install the gnome-common package which is needed for building cvs
|
||||
versions of Gnome modules like Metacity) as well as the standard
|
||||
development tools (gcc, autoconf, automake, pkg-config, intltool,
|
||||
and libtool) and be ready to build and test Metacity. Steps to do
|
||||
so:
|
||||
As long as you have gtk+ >= 2.10 and GConf with your distro (gtk+ >=
|
||||
2.6 if you manually revert the change from bug 348633), you should
|
||||
be able to install your distro's development packages
|
||||
(e.g. gtk2-devel, GConf2-devel, startup-notification-devel on
|
||||
Fedora; also, remember to install the gnome-common package which is
|
||||
needed for building cvs versions of Gnome modules like Metacity) as
|
||||
well as the standard development tools (gcc, autoconf, automake,
|
||||
pkg-config, intltool, and libtool) and be ready to build and test
|
||||
Metacity. Steps to do so:
|
||||
|
||||
$ cvs -q -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome \
|
||||
checkout metacity
|
||||
$ svn checkout http://svn.gnome.org/svn/metacity/trunk metacity
|
||||
$ cd metacity
|
||||
$ ./autogen.sh --prefix /usr
|
||||
$ make
|
||||
@@ -183,7 +182,7 @@ Debugging information
|
||||
|
||||
To run metacity under valgrind, use options typical for any Gnome
|
||||
program, such as
|
||||
valgrind --logfile=metacity.log --tool=memcheck --num-callers=48 \
|
||||
valgrind --log-file=metacity.log --tool=memcheck --num-callers=48 \
|
||||
--leak-check=yes --leak-resolution=high --show-reachable=yes \
|
||||
./src/metacity --replace
|
||||
where, again, the backslashes mean to join all the stuff on the following
|
||||
|
45
MAINTAINERS
45
MAINTAINERS
@@ -1,14 +1,43 @@
|
||||
Currently active maintainers
|
||||
----------------------------
|
||||
|
||||
Havoc Pennington
|
||||
E-mail: hp@redhat.com
|
||||
--------------------------------
|
||||
|
||||
Elijah Newren
|
||||
E-mail: newren@gmail.com
|
||||
Email: newren gmail com
|
||||
Userid: newren
|
||||
|
||||
Søren Sandmann
|
||||
E-mail: sandmann@redhat.com
|
||||
- Usually won't touch the theme bugs (isn't interested) or the
|
||||
compositor (until open source nvidia drivers are up to snuff).
|
||||
Tends to be most interested in libwnck/gtk interactions, focus
|
||||
issues, constraints problems, and raising/stacking, but works on
|
||||
just about anything other than themes and the compositor.
|
||||
|
||||
Thomas Thurman
|
||||
E-mail: thomas@thurman.org.uk
|
||||
Email: thomas thurman org uk
|
||||
Userid: tthurman
|
||||
|
||||
- Responsible for all theme bugs and the compositor (thank goodness
|
||||
Thomas got involved, eh?). I'm sure he'll replace this sentence
|
||||
with his interests when he reads it. ;-)
|
||||
|
||||
|
||||
Semi-active maintainers
|
||||
--------------------------------
|
||||
|
||||
Havoc Pennington
|
||||
Email: hp redhat com
|
||||
Userid: hp
|
||||
- Original author. Doesn't patch metacity anymore, but is active in
|
||||
answering questions, responding to bugs, providing very helpful
|
||||
suggestions and insight, and even assisting with debugging.
|
||||
|
||||
|
||||
Important historical figureheads
|
||||
--------------------------------
|
||||
|
||||
Rob Adams (readams readams net)
|
||||
- Was the main maintainer of metacity for a while; particular areas
|
||||
of focus included xinerama, placement, and an older version of the
|
||||
constraints code. Still responds to bugs every once in a while.
|
||||
|
||||
Søren Sandmann (sandmann redhat com)
|
||||
- Wrote most of the current compositing manager code + libcm
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
SUBDIRS=src po doc
|
||||
|
||||
EXTRA_DIST=HACKING rationales.txt \
|
||||
EXTRA_DIST = HACKING MAINTAINERS rationales.txt \
|
||||
intltool-extract.in intltool-merge.in intltool-update.in
|
||||
|
||||
DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache
|
||||
|
530
NEWS
530
NEWS
@@ -1,13 +1,528 @@
|
||||
|
||||
2.23.34
|
||||
=======
|
||||
|
||||
Thanks to Thomas Thurman for improvements in this version.
|
||||
|
||||
- Commenting and tidying (Thomas)
|
||||
- Fix possible compositor crash (Thomas) (#530702)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Yavor Doganov (bg), Jorge González (es), Kjartan Maraas (nb),
|
||||
Yannig Marchegay (Kokoyaya) (oc), Theppitak Karoonboonyanan (th), Clytie
|
||||
Siddall (vi)
|
||||
|
||||
2.23.34
|
||||
=======
|
||||
|
||||
Thanks to Thomas Thurman for improvements in this version.
|
||||
|
||||
- Commenting and tidying (Thomas)
|
||||
- Fix possible compositor crash (Thomas) (#530702)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Yavor Doganov (bg), Jorge González (es), Kjartan Maraas (nb),
|
||||
Yannig Marchegay (Kokoyaya) (oc), Theppitak Karoonboonyanan (th), Clytie
|
||||
Siddall (vi)
|
||||
|
||||
2.23.34
|
||||
=======
|
||||
|
||||
Thanks to Thomas Thurman for improvements in this version.
|
||||
|
||||
- Various commenting (Thomas)
|
||||
- Ensure you can turn off compositor with "configure" (Thomas)
|
||||
- Ensure you can turn off gconf with "configure" (Thomas) (#530870)
|
||||
|
||||
Translations
|
||||
Clytie Siddall (vi)
|
||||
|
||||
2.23.21
|
||||
=======
|
||||
|
||||
Thanks to Robert Escriva, Iain Holmes, Matt Krai, Thomas Thurman,
|
||||
and Chris Wang for improvements in this version.
|
||||
|
||||
- Add shadow ability for menus and tooltips (Iain) (#517442) (#517524)
|
||||
- Fix possible crashes in compositor (Iain) (#534569) (#528787)
|
||||
- Major reorganisation of compositor code (Iain)
|
||||
- Initial version of XRender backend for the compositor (Iain)
|
||||
- New basic public API for compositor (Iain)
|
||||
- Window decoration updates colour when GTK theme changes (Robert) (#511826)
|
||||
- Minor code cleanup for pedantic compilers (Thomas)
|
||||
- Further code cleanup for pedantic compilers (Matt) (#526049)
|
||||
- The atom list appears only once in the code (Thomas) (#530843)
|
||||
- Don't attempt to read attributes of invalid windows (Chris) (#530485)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Gabor Kelemen (hu), Kjartan Maraas (nb), Tino Meinen (nl),
|
||||
Theppitak Karoonboonyanan (th)
|
||||
2.23.13
|
||||
=======
|
||||
|
||||
Thanks to Erwann Chenede and Carlos Garnacho for improvements
|
||||
in this version.
|
||||
|
||||
- Re-enable cascading (Erwann) (#529925)
|
||||
- Propagate opacity to frame windows (spec compliance!) (Carlos)
|
||||
|
||||
Translations
|
||||
- None this time!
|
||||
|
||||
2.23.8
|
||||
======
|
||||
|
||||
Thanks to Lucas Rocha, Iain Holmes, and Jens Granseuer for improvements
|
||||
in this version.
|
||||
|
||||
* No need to symlink to .desktop files (Lucas)
|
||||
* Fixes to compositor's dealings with overlay windows (Iain)
|
||||
* C89 fixes (Jens)
|
||||
|
||||
Translators:
|
||||
Khaled Hosny (ar), Amitakhya Phukan (as), Ihar Hrachyshka (be@latin),
|
||||
Petr Kovar (cs), Rhys Jones (cy), Kenneth Nielsen (da), Andre Klapper (de),
|
||||
Jorge González (es), Iñaki Larrañaga Murgoitio (eu), Ilkka Tuohela (fi),
|
||||
Claude Paroz (fr), Seán de Búrca (ga), Ignacio Casal Quinteiro (gl),
|
||||
Yuval Tanny (he), Gabor Kelemen (hu), Luca Ferretti (it), Takeshi AIHANA (ja),
|
||||
Shankar Prasad (kn), Changwoo Ryu (ko), Arangel Angov (mk), sandeep shedmake (mr),
|
||||
Kjartan Maraas (nb), Nabin Gautam (ne), Wouter Bolsterlee (nl),
|
||||
Eskild Hustvedt (nn), Yannig Marchegay (Kokoyaya) (oc), Tomasz Dominikowski (pl),
|
||||
Duarte Loreto (pt), Vasiliy Faronov (ru), Daniel Nylander (sv),
|
||||
Theppitak Karoonboonyanan (th), Baris Cicek (tr), Maxim Dziumanenko (uk),
|
||||
Clytie Siddall (vi), Woodman Tuen (zh_HK), Woodman Tuen (zh_TW)
|
||||
2.23.5
|
||||
======
|
||||
|
||||
Thanks to Lucas Rocha, Owen Taylor, and Thomas Thurman for improvements in this
|
||||
version.
|
||||
|
||||
- Updates of useless preferences don't crash (Thomas) (#526016)
|
||||
- Compliance with new gnome-session (Lucas) (#525051)
|
||||
- Preview widget doesn't crash on broken themes (Thomas) (Launchpad 199402)
|
||||
- Initially iconic windows don't unminimise (Owen) (#491090)
|
||||
- Move ~/.metacity to ~/.config/metacity (Thomas) (#518596)
|
||||
- Metacity doesn't stay around when replaced (Thomas)
|
||||
- Extra check for null return in a function (Thomas)
|
||||
- Displays are singletons, simplifying code (Thomas) (#499301)
|
||||
|
||||
Translations
|
||||
Jorge González (es), Eskild Hustvedt (nn), Baris Cicek (tr), Clytie Siddall (vi)
|
||||
|
||||
2.23.3
|
||||
======
|
||||
|
||||
Thanks to Marco Pesenti Gritti, Iain Holmes, Josh Lee, Thomas Thurman, and
|
||||
Matthew Wilson for improvements in this version.
|
||||
|
||||
- Workspaces whose name is the same as the standard name, plus some string,
|
||||
are not cut off. (Thomas) (#453678)
|
||||
- Improve compositor performance (Iain) (#522166)
|
||||
- Draw wallpaper correctly when we start up with compositor
|
||||
(Iain) (#522599)
|
||||
- Several other smaller compositor fixes (Iain)
|
||||
- Don't draw shadows on shaped windows unless they have frames
|
||||
(Iain) (#505333)
|
||||
- Newly-created keep-above windows get focus (Marco) (#519188)
|
||||
- Allow moving workspace when dragging with modifier key (Matthew)
|
||||
(#474195)
|
||||
|
||||
Translations
|
||||
Kenneth Nielsen (da), Gabor Kelemen (hu), Vasiliy Faronov (ru), Daniel
|
||||
Nylander (sv), Maxim Dziumanenko (uk), Woodman Tuen (zh_HK)
|
||||
|
||||
2.23.2
|
||||
======
|
||||
|
||||
Removed some debug statements introduced in 2.23.1. Brown paper bag release.
|
||||
|
||||
|
||||
2.23.1
|
||||
======
|
||||
|
||||
Thanks to Cosimo Cecchi, Jens Granseuer, Jim Huang, Andrea Del Signore, and
|
||||
Thomas Thurman for improvements in this version.
|
||||
|
||||
(Cosimo's patch was very similar to another received from Jason Ribero.)
|
||||
|
||||
- Allow horizontal and vertical maximisation using the mouse (Cosimo/Jason)
|
||||
(#358674)
|
||||
- Allow "spacer" as a value for buttons, for blank space (Andrea) (#509165)
|
||||
- Remove unused code (Jim)
|
||||
- refactor preferences handling (Thomas)
|
||||
- make sure we're valid C89 (Jens) (#518917)
|
||||
- some messing with tool scripts (Thomas)
|
||||
|
||||
Translations
|
||||
Jorge González (es), Claude Paroz (fr), Woodman Tuen (zh_HK), Woodman
|
||||
Tuen (zh_TW)
|
||||
|
||||
2.23.0
|
||||
======
|
||||
|
||||
Thanks to Matthias Clasen, Mikkel Kamstrup Erlandsen, Jim Huang, Thomas Thurman,
|
||||
and Thomas Wood for improvements in this version.
|
||||
|
||||
- the preview widget can draw shaped windows properly! (Thomas W, #460018)
|
||||
- refactored handling of boolean and enumerated gconf preferences;
|
||||
refactoring of string and integer preferences will follow shortly (Thomas T)
|
||||
- Applications asking to move and resize windows at the same time have
|
||||
both their requests granted (Mikkel) (#448183)
|
||||
- Windows marked "skip taskbar" don't appear in the ctrl-alt-tab list
|
||||
(Matthias) (#106249)
|
||||
- fix session management detection (Thomas T) (#328210)
|
||||
- when resizing with the keyboard, the cursor stays on a window edge if
|
||||
you escape, whichever direction you were going (Thomas T) (#436257)
|
||||
- fix major breakage when gconf was turned off in configure (Jim) (#515019)
|
||||
- fix major breakage when verbose was turned off in configure (Jim) (#515152)
|
||||
- fix name of verbose option in help (Thomas T)
|
||||
- various bits of messing around with release scripts (Thomas T)
|
||||
|
||||
Translations
|
||||
Ihar Hrachyshka (be@latin), Ilkka Tuohela (fi), Ignacio Casal Quinteiro (gl),
|
||||
Shankar Prasad (kn), Changwoo Ryu (ko), Nabin Gautam (ne), Wouter Bolsterlee (nl)
|
||||
|
||||
2.21.13
|
||||
=======
|
||||
|
||||
Thanks to Michael Meeks and Thomas Thurman for improvements in this version.
|
||||
|
||||
- Only use compositor version if we have a compositor (Thomas) (#514453)
|
||||
- Remove workaround for a problem in an ancient GTK version (Thomas) (#513737)
|
||||
- Compositor efficiency fixes (Michael)
|
||||
- Various tools added (Thomas)
|
||||
|
||||
Translations
|
||||
Amitakhya Phukan (as), Rhys Jones (cy), Andre Klapper (de), Takeshi AIHANA (ja),
|
||||
Arangel Angov (mk), Tomasz Dominikowski (pl), Duarte Loreto (pt)
|
||||
|
||||
2.21.8
|
||||
======
|
||||
|
||||
Thanks to Paolo Borelli, Iain Holmes, Havoc Pennington, Christian Persch, Thomas
|
||||
Thurman, and Alex R.M. Turner for improvements in this version.
|
||||
|
||||
- Windows on other workspaces which need attention appear in the alt-tab
|
||||
list too (Alex) (#333548)
|
||||
- Remove deprecated function call (Christian) (#512561)
|
||||
- New release script (Thomas)
|
||||
- Made a start at improving the general number of comments (Thomas)
|
||||
- Updated copyright year to 2008, and some other tiny fixes (Thomas)
|
||||
- Don't do anything unusual when the compositor frees a window (Iain)
|
||||
- Mapping windows doesn't mark them as damaged (Iain)
|
||||
- Compositor uses the overlay window and not the root window (Iain)
|
||||
- Fixed several list leaks (Paolo)
|
||||
- Fixed warnings about printf formats (Havoc)
|
||||
- Move source files into subdirectories of the src directory (Havoc)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Ihar Hrachyshka (be@latin), Petr Kovar (cs), Andre
|
||||
Klapper (de), Jorge González (es), Iñaki Larrañaga Murgoitio (eu), Seán de
|
||||
Búrca (ga), Yuval Tanny (he), Luca Ferretti (it), Takeshi AIHANA (ja), Arangel
|
||||
Angov (mk), sandeep shedmake (mr), Kjartan Maraas (nb), Yannig
|
||||
Marchegay (Kokoyaya) (oc), Daniel Nylander (sv), Theppitak Karoonboonyanan (th),
|
||||
Baris Cicek (tr), Clytie Siddall (vi)
|
||||
2.21.5
|
||||
======
|
||||
|
||||
Thanks to Iain Holmes and Thomas Thurman for improvements in this version.
|
||||
This contains the new compositor; downstream maintainers should note that
|
||||
its GConf key is initially turned off in src/metacity.schemas.in and consider
|
||||
whether to turn it on by default in their packages.
|
||||
|
||||
- merge compositor branch! (Iain) (499081)
|
||||
- print "Subversion" and not "CVS" when building (Thomas)
|
||||
|
||||
Translations
|
||||
Jorge González (es), Kjartan Maraas (nb), Daniel Nylander (sv)
|
||||
|
||||
2.21.3
|
||||
======
|
||||
|
||||
Thanks to Matthias Clasen, Martin Meyer, Kjartan Maraas, Thomas Thurman,
|
||||
and Lucas Rocha for improvements in this version.
|
||||
|
||||
- remove dead code (pointed out by Kjartan) (501365)
|
||||
- rewrote long key binding description for the sake of
|
||||
the translators (Thomas) (474889)
|
||||
- check for null before adding menu (Matthias) (496054)
|
||||
- let keys which end a grab also begin a grab (Thomas) (112560)
|
||||
- check the right variable in theme sanity check (Martin) (501362)
|
||||
- get session ID from environment if it's not passed in on the command
|
||||
line (Lucas) (498033)
|
||||
|
||||
Translations
|
||||
Ihar Hrachyshka (be@latin), Petr Kovar (cs), Jorge González (es),
|
||||
Ignacio Casal Quinteiro (gl), Rodrigo Flores (pt_BR), Pavol Šimo (sk),
|
||||
Matej Urbančič (sl)
|
||||
|
||||
2.21.2
|
||||
======
|
||||
|
||||
Thanks to Benjamin Gramlich, Thomas Thurman, and Peter Bloomfield
|
||||
for improvements in this release.
|
||||
|
||||
- Theme parser is compliant to XDG Base Directory Specification
|
||||
in searching for theme files. (Benjamin) (#480026)
|
||||
- Some source files which didn't get used were removed (Thomas)
|
||||
(#496947)
|
||||
- Fullscreen and maximise windows don't try to save their position
|
||||
(Peter) (#461927)
|
||||
|
||||
Translations
|
||||
Matej Urbančič (sl)
|
||||
|
||||
2.21.1
|
||||
======
|
||||
|
||||
Thanks to Elijah Newren, Alex R.M. Turner, Peter Bloomfield, Iain Holmes,
|
||||
Jans Granseuer, Federico Mena Quintero and Thomas Thurman for improvements
|
||||
in this release.
|
||||
|
||||
- Add --sync option, like all other GTK apps (Iain)
|
||||
- Don't save window's position if it's maximised (Peter) (#461927)
|
||||
- Memory leak fix in preview (Jans) (#469682)
|
||||
- Truncate tab popup string correctly, and refactor function (Alex)
|
||||
- Windows which pop up under always-on-top windows don't get the
|
||||
focus, but do get the "needs attention" hint (Thomas) (#486445)
|
||||
- Fix error in function call which caused focus problems (Federico)
|
||||
(partial fix of #488468)
|
||||
|
||||
Translations
|
||||
Djihed Afifi (ar), Metin Amiroff (az), Alexander Shopov (bg),
|
||||
Jordi Mallach (ca), David Lodge (en_GB), Jorge González (es),
|
||||
Iñaki Larrañaga Murgoitio (eu), Vincent Untz (fr), Alastair McKinstry (ga),
|
||||
Ankit Patel (gu), Rajesh Ranjan (hi), auto (hr), Changwoo Ryu (ko),
|
||||
Raivis Dejus (lv), Wouter Bolsterlee (nl), Gora Mohanty (or),
|
||||
ASB (pa), wadim dziedzic (pl), Duarte Loreto (pt),
|
||||
Og Maciel (pt_BR), Peter Tuhársky (sk), Matej Urbančič (sl),
|
||||
Daniel Nylander (sv), Maxim Dziumanenko (uk), Funda Wang (zh_CN)
|
||||
|
||||
2.20.0
|
||||
======
|
||||
|
||||
Thanks to Alexey Rusakov for the fix in this release.
|
||||
|
||||
- prevent a crash on logout with metacity subsequently not being
|
||||
restored in future sessions (Alexey) [#433253]
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Ihar Hrachyshka (be@latin), Ask Hjorth Larsen (da),
|
||||
Adam Weinberger (en_CA), Iñaki Larrañaga Murgoitio (eu), Ilkka
|
||||
Tuohela (fi), Vincent Untz (fr), Ankit Patel (gu), Gabor Kelemen (hu),
|
||||
Luca Ferretti (it), Takeshi AIHANA (ja), Žygimantas Beručka (lt), Jovan
|
||||
Naumovski (mk), Ani Peter (ml), Og Maciel (pt_BR), Duarte Loreto (pt),
|
||||
Mugurel Tudor (ro), Nickolay V. Shmyrev (ru), Peter Tuhársky (sk), Горан
|
||||
Ракић (sr), Daniel Nylander (sv), Dr.T.Vasudevan (ta), Maxim
|
||||
Dziumanenko (uk), Clytie Siddall (vi)
|
||||
|
||||
2.19.55
|
||||
=======
|
||||
|
||||
Thanks to Frederic Crozat, Matthias Clasen, and Thomas Thurman for improvements
|
||||
in this release.
|
||||
|
||||
- Noninteger auto-raise delay is not assumed to be zero (Thomas) (#377491)
|
||||
- Fix mangled window title in "Force Quit" (Frederic) (#462734)
|
||||
- "Close" can appear at any point in the window menu, and now appears
|
||||
at the bottom (Thomas) (#104026)
|
||||
- Windows which are always on top have "stick" insensitive (Thomas) (#460997)
|
||||
- All bitfields in window structure are together for optimisation (Thomas)
|
||||
(#450271)
|
||||
- Use the correct directory when installing keybindings (Matthias) (#454055)
|
||||
|
||||
Translations
|
||||
Alexander Shopov (bg), Jorge González (es), Iñaki Larrañaga Murgoitio (eu),
|
||||
Ilkka Tuohela (fi), Theppitak Karoonboonyanan (th)
|
||||
|
||||
2.19.34
|
||||
=======
|
||||
|
||||
Thanks to Rob Bradford, Cosimo Cecchi, Yair Hershkovitz and Thomas Thurman
|
||||
for improvements in this release.
|
||||
|
||||
- Fix a bug where the window can be focused without being raised
|
||||
if the maximize is aborted. (Rob) [#459027]
|
||||
- Unset fullscreen is an allowed action where relevant. (Cosimo) [#449427]
|
||||
- Reverse window buttons and align them to the left for RTL locales.
|
||||
(Yair) [#92212]
|
||||
- Put all bitfields in window data together to help with optimisation.
|
||||
(Thomas) [#450271]
|
||||
|
||||
Translations
|
||||
Jorge Gonzalez (es), Ilkka Tyohela (fi), Gabor Kelemen (hu),
|
||||
Takeshi AIHANA (ja), Kjartan Maraas (nb), Vincent van Adrighem (nl),
|
||||
Daniel Nylander (sv), Theppitak Karoonbooyana (th),
|
||||
Nguyễn Thái Ngọc Duy (vi)
|
||||
|
||||
2.19.21
|
||||
=======
|
||||
|
||||
Thanks to Damien Carbery and Thomas Thurman for improvements in
|
||||
this release.
|
||||
|
||||
- Fixed build on Solaris (Damien) [#397296, #446535]
|
||||
- Only activate windows which change their startup ID if the
|
||||
new ID differs from the old. (This fixes the bug where KDE
|
||||
apps gained the attention hint when switching workspaces.)
|
||||
(Thomas) [#400167]
|
||||
- Open new windows on the current xinerama. (Thomas) [#145503].
|
||||
|
||||
Translations
|
||||
Tshewang Norbu (dz), Jorge González (es), Funda Wang (zh_CN)
|
||||
|
||||
2.19.13
|
||||
=======
|
||||
|
||||
Thanks to Elijah Newren and Thomas Thurman for improvements in
|
||||
this release.
|
||||
|
||||
- Updated the description of raise_on_click (Elijah) [#445447,
|
||||
#389923]
|
||||
- Refactor queueing code in window.c (Thomas) [#376760]
|
||||
- Added switch_group to the keybindings file (Thomas) [#444879]
|
||||
- New window information accessor function (Thomas) [#377495]
|
||||
|
||||
2.19.8
|
||||
======
|
||||
|
||||
Thanks to Linus Torvalds, Yair Hershkovitz and Thomas Thurman for
|
||||
improvements in this release.
|
||||
|
||||
- Lots of fixups for various alignments in RTL locales (Yair)
|
||||
[#387893]
|
||||
- Add code to configure what happens on right or middle click
|
||||
of titlebar (Linus) [#408904]
|
||||
- Fix layout for titlebars with mixed LTR/RTL scripts (Thomas)
|
||||
[#433400]
|
||||
- Fix window menu layout for RTL scripts (Thomas) [#433400]
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Ihar Hrachyshka (be@latin), Jovan Naumovski (mk),
|
||||
Theppitak Karoonboonyanan (th)
|
||||
|
||||
[ Apologies to these translators who didn't get credited in the
|
||||
version of 2.19.8 that shipped. ]
|
||||
|
||||
2.19.5
|
||||
======
|
||||
|
||||
- Prevent metacity from "forgetting" which machine a window is on
|
||||
(Elijah) [#418552]
|
||||
- Prevent nasty flickering an placement problem introduced in
|
||||
metacity 2.19.2 (Elijah) [fix side-effect of change in #426519]
|
||||
- Fix some uninitialized memory usage errors (Elijah) [#427385]
|
||||
|
||||
Translations
|
||||
David Lodge (en_GB), Jorge González (es), Ignacio Casal Quinteiro (gl),
|
||||
Daniel Nylander (sv)
|
||||
|
||||
2.19.3
|
||||
======
|
||||
|
||||
Thanks to Magnus Therning, Elijah Newren, Thomas Thurman, and Bruno
|
||||
Boaventura for improvements in this release.
|
||||
|
||||
- Add support for _NET_MOVERESIZE_WINDOW (Magnus, Elijah) [#344521]
|
||||
- EWMH compliance: set _NET_WM_ALLOWED_ACTIONS so that pagers know
|
||||
which actions we support (Elijah) [#115247]
|
||||
- Fix crash with apps trying to open an insanely huge window
|
||||
(Thomas) [#399529]
|
||||
- Fix temporary hang/pause with libXt by making sure apps get a
|
||||
ConfigureNotify on unmap (Elijah) [#399552]
|
||||
- do not auto-maximize windows larger than the workarea in only a
|
||||
single direction (Elijah) [#419810]
|
||||
- Don't show the current workspace as a possible workspace to switch
|
||||
to (Bruno) [#426791]
|
||||
- Preserve stacking order across restarts (Elijah)
|
||||
|
||||
Translations
|
||||
Khaled Hosny (ar), Kjartan Maraas (nb)
|
||||
|
||||
2.19.2
|
||||
======
|
||||
|
||||
Thanks to Bastien Nocera, Thomas Thurman, and Elijah Newren for
|
||||
improvements in this release.
|
||||
|
||||
- Add new control-center key bindings definitions (Bastien) [#420145]
|
||||
- Prevent metacity from crashing when trying to use invalid themes
|
||||
(Thomas) [#423855]
|
||||
- Fix invalid free causing crash on metacity close introduced in
|
||||
2.19.1 (Elijah) [#427385]
|
||||
- Add special keybinding just for debugging spew marks, unbound and
|
||||
not even listed in schemas (Elijah)
|
||||
- Fix move/resize events in relation to combinations of
|
||||
ConfigureRequest and WM_NORMAL_HINTS change notifications (Elijah)
|
||||
[#426519]
|
||||
- Remove what we believe to be an ancient attempt at working around
|
||||
sloppy/mouse focus bugs that we believe have since been correctly
|
||||
fixed. May fix some ugly race conditions. May also cause nasty
|
||||
bugs in sloppy/mouse focus modes. Only one way to find
|
||||
out... (Elijah) [#304430]
|
||||
|
||||
Translations
|
||||
Raivis Dejus (lv)
|
||||
|
||||
2.19.1
|
||||
======
|
||||
|
||||
Thanks to Jaap Haitsma, Linus Torvalds, Charlie Brej, Kjartan Maraas,
|
||||
Arthur Taylor, Elijah Newren, Josselin Mouette, Havoc Pennington,
|
||||
Benjamin Berg, and Carlo Wood for improvements in this release.
|
||||
|
||||
- new icon for the force-quit dialog (Jaap) [#396655]
|
||||
- add configureable mouse click action abilities, and clean up lots of
|
||||
related code (Linus) [#408899, #408902, others]
|
||||
- add schemeas for middle and right click titlebar actions (Charlie)
|
||||
[#408903]
|
||||
- remove pango/pangox.h include since it's not needed and not
|
||||
installed anymore (Kjartan)
|
||||
- adjust rounded corners so that they fit nicely with the arcs
|
||||
around them (Arthur) [#399373]
|
||||
- fix session hang when metacity .sm file is missing (Josselin)
|
||||
[#407981]
|
||||
- add support for _NET_WM_USER_TIME_WINDOW in order to cut down on
|
||||
context switches (Elijah, Havoc) [#354213]
|
||||
- prevent nasty metacity/gdk interactions causing hangs with gtk
|
||||
trunk (Elijah) [offshoots of #354213]
|
||||
- fix button middle fallback and the prelight state (Benjamin) [#419043]
|
||||
- Lots of code cleanup for the strut lists (Elijah)
|
||||
- fix handling of unidirectional maximization and partial struts +
|
||||
some miscellaneous cleanups (Carlo) [#358311]
|
||||
- avoid some crashes when dragging windows partially offscreen
|
||||
(Elijah) [#353513]
|
||||
- avoid mousenav vs. keynav focus problems with the run application
|
||||
dialog in mouse/sloppy focus modes (Elijah) [#374752]
|
||||
- _NET_ACTIVE_WINDOW property on the root window should be a single
|
||||
xwindow id, not two (Elijah)
|
||||
- Fix unidirection unmaximization causing jumps (Elijah) [#355497]
|
||||
- fix unfullscreening and unmaximizing with size increment/size
|
||||
constraint windows (such as gnome-terminal) possibly not returning
|
||||
to their "original position" (Elijah) [#329152]
|
||||
- fix some issues with min/max and size increment constraints
|
||||
(Elijah) [#418395]
|
||||
- send synthetic configure notify events in response to appropriate
|
||||
MapRequest events too (Elijah) [#322840]
|
||||
|
||||
Translations
|
||||
Ihar Hrachyshka (be@latin), Jordi Mallach (ca), Jakub Friedl (cs),
|
||||
norbu (dz), David Lodge (en_GB), Ivar Smolin (et), Gabor Kelemen (hu),
|
||||
Luca Ferretti (it), Takeshi AIHANA (ja), Erdal Ronahi (ku), Gintautas
|
||||
Miliauskas (lt), Jovan Naumovski (mk), Kjartan Maraas (nb), Reinout van
|
||||
Schouwen (nl), wadim dziedzic (pl), raulpereira (pt_BR), Nickolay V.
|
||||
Shmyrev (ru), Горан Ракић (sr), Woodman Tuen (zh_HK), Woodman Tuen (zh_TW)
|
||||
|
||||
2.17.5
|
||||
======
|
||||
|
||||
Thanks to Bruno Boaventura, Mad Alex, and Thomas Thurman for
|
||||
improvements in this release.
|
||||
|
||||
- make window menu arrangement more sensible. (#382962, Bruno)
|
||||
- make window menu arrangement more sensible. (Bruno) [#382962]
|
||||
- unmaximise button keeps pressed appearance when moved off and
|
||||
back. (#395560, Alex)
|
||||
- fix a couple of compositor crashes (#387761, Thomas)
|
||||
back. (Alex) [#395560]
|
||||
- fix a couple of compositor crashes (Thomas) [#387761]
|
||||
- new environment variables checked if the compositor is enabled;
|
||||
see the new file doc/compositor-control.txt for details. (Thomas)
|
||||
|
||||
@@ -19,14 +534,15 @@ Translations
|
||||
|
||||
2.17.3
|
||||
======
|
||||
|
||||
Thanks to Christof Krüger, Federico Mena Quintero, Bruno Boaventura,
|
||||
and Björn Lindqvist for improvements in this release.
|
||||
|
||||
- fix longstanding problem about windows flickering in and out of
|
||||
maximised state when dragging between xineramas (#358715) (Christof)
|
||||
- grab server when switching workspaces (#381127) (Federico)
|
||||
maximised state when dragging between xineramas (Christof) [#358715]
|
||||
- grab server when switching workspaces (Federico) [#381127]
|
||||
- replace changing text on window menu with pairs of radio buttons
|
||||
and checkboxes (#343108) (Bruno, Björn)
|
||||
and checkboxes (Bruno, Björn) [#343108]
|
||||
|
||||
Translations
|
||||
Kjartan Maraas (nb), Jakub Friedl (cs), Yuval Tanny (he), Ivar Smolin (et),
|
||||
@@ -39,7 +555,7 @@ Thanks to Priit Laes, Bruno Boaventura, Kjartan Maraas, Justin Mason,
|
||||
Elijah Newren and Dan Mick for improvements in this release.
|
||||
|
||||
- implement handle_move_to_{side|corner}_* to allow the user to flip a
|
||||
window to the side or corner of the screen. (Justin) [#317884]
|
||||
window to the side or corner of the screen. (Justin) [#317884]
|
||||
- fix strict focus mode by picking up on res_class (Dan) [#361054]
|
||||
- remove deprecated gtk stuff (Priit, Bruno)
|
||||
- string fixes (Kjartan) [#363354, #363355]
|
||||
|
@@ -5,7 +5,7 @@ srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="metacity"
|
||||
REQUIRED_AUTOMAKE_VERSION=1.7
|
||||
REQUIRED_AUTOMAKE_VERSION=1.10
|
||||
|
||||
(test -f $srcdir/configure.in \
|
||||
&& test -d $srcdir/src) || {
|
||||
|
34
configure.in
34
configure.in
@@ -1,17 +1,17 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([metacity_major_version], [2])
|
||||
m4_define([metacity_minor_version], [17])
|
||||
m4_define([metacity_minor_version], [23])
|
||||
# Fibonacci sequence for micro version numbering:
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
m4_define([metacity_micro_version], [5])
|
||||
m4_define([metacity_micro_version], [34])
|
||||
|
||||
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)
|
||||
AC_CONFIG_SRCDIR(src/core/display.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
@@ -120,7 +120,7 @@ if test x$enable_gconf = xyes; then
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(verbose-mode,
|
||||
AC_HELP_STRING([--disable-verbose],
|
||||
AC_HELP_STRING([--disable-verbose-mode],
|
||||
[disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds]),,
|
||||
enable_verbose_mode=yes)
|
||||
|
||||
@@ -176,6 +176,10 @@ else
|
||||
AC_MSG_ERROR("Pango 1.2.0 or greater based on Xft2 is required")
|
||||
fi
|
||||
|
||||
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
||||
AC_SUBST(GNOME_KEYBINDINGS_KEYSDIR)
|
||||
|
||||
STARTUP_NOTIFICATION_VERSION=0.7
|
||||
AC_MSG_CHECKING([Startup notification library >= $STARTUP_NOTIFICATION_VERSION])
|
||||
if $PKG_CONFIG --atleast-version $STARTUP_NOTIFICATION_VERSION libstartup-notification-1.0; then
|
||||
@@ -219,15 +223,15 @@ if test x$enable_compositor = xyes; then
|
||||
have_xcomposite=yes
|
||||
echo "CompositeExt support forced on"
|
||||
elif test x$enable_compositor = xauto; then
|
||||
echo "Not building compositing manager by default now, must enable explicitly to get it. And it doesn't work, so don't bother unless you want to hack on it..."
|
||||
have_xcomposite=no
|
||||
echo "Building compositing manager by default now."
|
||||
have_xcomposite=yes
|
||||
else
|
||||
have_xcomposite=no
|
||||
fi
|
||||
|
||||
if test x$have_xcomposite = xyes; then
|
||||
echo "Building with CompositeExt"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage cm"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
||||
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
|
||||
|
||||
## force on render also
|
||||
@@ -422,7 +426,7 @@ case "$METACITY_LIBS" in
|
||||
*)
|
||||
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
|
||||
[AC_CHECK_HEADERS(X11/SM/SMlib.h,
|
||||
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=no)],
|
||||
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=yes)],
|
||||
, $METACITY_LIBS)
|
||||
;;
|
||||
esac
|
||||
@@ -455,12 +459,6 @@ fi
|
||||
|
||||
AC_SUBST(GDK_PIXBUF_CSOURCE)
|
||||
|
||||
## hack to work with old GTK versions for now
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$METACITY_LIBS $LDFLAGS"
|
||||
AC_CHECK_FUNCS(gdk_pixbuf_new_from_stream)
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
|
||||
if test x$enable_gconf = xyes; then
|
||||
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
|
||||
if test x"$GCONFTOOL" = xno; then
|
||||
@@ -473,6 +471,12 @@ else
|
||||
GCONF_SCHEMAS_INSTALL_FALSE=
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(debug,
|
||||
[ --enable-debug enable debugging],,
|
||||
enable_debug=no)
|
||||
if test "x$enable_debug" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -g -O -Wall"
|
||||
fi
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
doc/Makefile
|
||||
@@ -528,7 +532,7 @@ if test $(( $(echo $METACITY_MINOR_VERSION) %2)) == "1"; then
|
||||
stable_version=$(( ($METACITY_MINOR_VERSION / 2) * 2))
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo -n "Use 2.$stable_version.x for stable "
|
||||
echo "(gnome-2-$stable_version branch in CVS)"
|
||||
echo "(gnome-2-$stable_version branch in Subversion)"
|
||||
else
|
||||
echo "This is the stable branch of metacity"
|
||||
fi
|
||||
|
@@ -1,5 +1,5 @@
|
||||
The compositor is the box of tricks inside the window manager which performs
|
||||
special effects on the windows on your screen. Metacity's window manager is
|
||||
special effects on the windows on your screen. Metacity's compositor is
|
||||
under development. Your help is requested in finding and fixing bugs. This
|
||||
document tells you how to configure Metacity so that you can use compositing.
|
||||
|
||||
|
@@ -21,7 +21,6 @@ Focus method Invariant
|
||||
sloppy If the mouse is in a window, then it is focused; if the
|
||||
mouse is not in a window, then the most recently used
|
||||
window is focused.
|
||||
|
||||
mouse If the mouse is in a non-DESKTOP window, then it is focused;
|
||||
otherwise, the designated "no_focus_window" is focused
|
||||
|
||||
@@ -36,7 +35,6 @@ Focus method Behavior
|
||||
on top)
|
||||
sloppy Focus the window containing the pointer if there is such
|
||||
a window, otherwise focus the most recently used window.
|
||||
|
||||
mouse Focus the non-DESKTOP window containing the pointer if
|
||||
there is one, otherwise focus the designated
|
||||
"no_focus_window".
|
||||
@@ -66,9 +64,9 @@ cases in which a new window shouldn't be focused:
|
||||
|
||||
To handle these cases, Metacity compares timestamps of the event that
|
||||
caused the launch and the timestamp of the last interaction with the
|
||||
focused window. (Case 2 is handled by providing a special timestamp
|
||||
of 0 for the launch time, which ensures that the window that appears
|
||||
doesn't get focus)
|
||||
focused window. (Case 2 is handled by the application providing a
|
||||
special timestamp of 0 for the launch time, which ensures that the
|
||||
window that appears doesn't get focus)
|
||||
|
||||
If the newly launched window isn't focused, some things should be done
|
||||
to alert the user that there is a window to work with:
|
||||
@@ -88,10 +86,10 @@ attempt to handle the INHERENTLY CONFLICTING CONSTRAINTS. Metacity does
|
||||
this by having a mouse_mode boolean used to determine which of the two
|
||||
sets of invariants holds. This mode is set according to which method was
|
||||
most recently used to choose a focus window:
|
||||
1) When receiving EnterNotify/LeaveNotify events from mouse movement, set
|
||||
1) When receiving EnterNotify events from mouse movement, set
|
||||
mouse_mode to TRUE.
|
||||
2) When using keynav to choose a focus window (e.g. alt-tab, alt-esc,
|
||||
move-window-to-workspace keybindings), set mouse_mode to FALSE.
|
||||
alt-f2, move-window-to-workspace keybindings), set mouse_mode to FALSE.
|
||||
3) When handling events that don't choose a focus window but rather need
|
||||
a focus_window chosen for them (e.g. switch-to-workspace keybindings),
|
||||
don't change the mouse_mode and just use the current value.
|
||||
|
896
po/ChangeLog
896
po/ChangeLog
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,10 @@
|
||||
#
|
||||
am
|
||||
ar
|
||||
as
|
||||
az
|
||||
be
|
||||
be@latin
|
||||
bg
|
||||
bn
|
||||
bn_IN
|
||||
@@ -36,6 +38,7 @@ is
|
||||
it
|
||||
ja
|
||||
ka
|
||||
kn
|
||||
ko
|
||||
ku
|
||||
lt
|
||||
@@ -50,6 +53,7 @@ nb
|
||||
ne
|
||||
nl
|
||||
nn
|
||||
oc
|
||||
or
|
||||
pa
|
||||
pl
|
||||
@@ -58,6 +62,7 @@ pt_BR
|
||||
ro
|
||||
ru
|
||||
rw
|
||||
si
|
||||
sk
|
||||
sl
|
||||
sq
|
||||
|
@@ -1,26 +1,29 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Please keep this file sorted alphabetically.
|
||||
src/tools/metacity-message.c
|
||||
src/delete.c
|
||||
src/display.c
|
||||
src/errors.c
|
||||
src/frames.c
|
||||
src/keybindings.c
|
||||
src/main.c
|
||||
src/menu.c
|
||||
src/metaaccellabel.c
|
||||
src/metacity-dialog.c
|
||||
src/50-metacity-desktop-key.xml.in
|
||||
src/50-metacity-key.xml.in
|
||||
src/core/core.c
|
||||
src/core/delete.c
|
||||
src/core/display.c
|
||||
src/core/errors.c
|
||||
src/core/keybindings.c
|
||||
src/core/main.c
|
||||
src/core/prefs.c
|
||||
src/core/screen.c
|
||||
src/core/session.c
|
||||
src/core/util.c
|
||||
src/core/window-props.c
|
||||
src/core/window.c
|
||||
src/core/xprops.c
|
||||
src/metacity.desktop.in
|
||||
src/metacity.schemas.in
|
||||
src/prefs.c
|
||||
src/resizepopup.c
|
||||
src/screen.c
|
||||
src/session.c
|
||||
src/theme-parser.c
|
||||
src/theme-viewer.c
|
||||
src/theme.c
|
||||
src/util.c
|
||||
src/window-props.c
|
||||
src/window.c
|
||||
src/workspace.c
|
||||
src/xprops.c
|
||||
src/ui/frames.c
|
||||
src/ui/menu.c
|
||||
src/ui/metaaccellabel.c
|
||||
src/ui/metacity-dialog.c
|
||||
src/ui/resizepopup.c
|
||||
src/ui/theme-parser.c
|
||||
src/ui/theme-viewer.c
|
||||
src/ui/theme.c
|
||||
src/tools/metacity-message.c
|
||||
|
||||
|
3808
po/be@latin.po
Normal file
3808
po/be@latin.po
Normal file
File diff suppressed because it is too large
Load Diff
2814
po/en_CA.po
2814
po/en_CA.po
File diff suppressed because it is too large
Load Diff
617
po/en_GB.po
617
po/en_GB.po
File diff suppressed because it is too large
Load Diff
45
po/et.po
45
po/et.po
@@ -2,6 +2,7 @@
|
||||
# Estonian translation of Metacity
|
||||
#
|
||||
# Copyright (C) 2004-2005 The Free Software Foundation
|
||||
# Copyright (C) 2007 The GNOME Project.
|
||||
# This file is distributed under the same license as the metacity package.
|
||||
#
|
||||
# Tõivo Leedjärv <toivo@linux.ee>, 2004.
|
||||
@@ -12,7 +13,7 @@ msgstr ""
|
||||
"Project-Id-Version: metacity HEAD\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2006-11-18 21:11+0200\n"
|
||||
"PO-Revision-Date: 2006-11-19 22:09+0200\n"
|
||||
"PO-Revision-Date: 2007-03-25 09:22+0300\n"
|
||||
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
|
||||
"Language-Team: Estonian <gnome-et@linux.ee>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -156,7 +157,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"metacity %s\n"
|
||||
"Autoriõigused (C) 2001-2002 Havoc Pennington, Red Hat, Inc., ja teised\n"
|
||||
"See protgramm on vaba tarkvara; kopeerimistingimuste kohta vaata\n"
|
||||
"See programm on vaba tarkvara; kopeerimistingimuste kohta vaata\n"
|
||||
"programmi lähteteksti. Sellel programmil pole MINGISUGUST GARANTIID;\n"
|
||||
"isegi KESKMISE/TAVALISE KVALITEEDI GARANTIID või GARANTIID SOBIVUSELE\n"
|
||||
"TEATUD KINDLAKS EESMÄRGIKS.\n"
|
||||
@@ -582,7 +583,7 @@ msgstr ""
|
||||
|
||||
#: ../src/metacity.schemas.in.h:27
|
||||
msgid "Maximize window"
|
||||
msgstr "Maksimeeri aken"
|
||||
msgstr "Akna maksimeerimine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:28
|
||||
msgid "Maximize window horizontally"
|
||||
@@ -594,7 +595,7 @@ msgstr "Maksimeeri aken vertikaalselt"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:30
|
||||
msgid "Minimize window"
|
||||
msgstr "Minimeeri aken"
|
||||
msgstr "Akna minimeerimine"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:31
|
||||
msgid "Modifier to use for modified window click actions"
|
||||
@@ -2963,7 +2964,7 @@ msgstr "Värvust \"%s\" pole võimalik analüüsida"
|
||||
#: ../src/theme.c:1499
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||
msgstr ""
|
||||
msgstr "Koordinaatide avaldis sisaldab lubamatut märki '%s'"
|
||||
|
||||
#: ../src/theme.c:1526
|
||||
#, c-format
|
||||
@@ -2971,11 +2972,15 @@ msgid ""
|
||||
"Coordinate expression contains floating point number '%s' which could not be "
|
||||
"parsed"
|
||||
msgstr ""
|
||||
"Koordinaatide avaldis sisaldab ujukomaarvu '%s', seda aga pole võimalik "
|
||||
"analüüsida"
|
||||
|
||||
#: ../src/theme.c:1540
|
||||
#, c-format
|
||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||
msgstr ""
|
||||
"Koordinaatide avaldis sisaldab täisarvu '%s', seda aga pole võimalik "
|
||||
"analüüsida"
|
||||
|
||||
#: ../src/theme.c:1607
|
||||
#, c-format
|
||||
@@ -2986,11 +2991,11 @@ msgstr ""
|
||||
|
||||
#: ../src/theme.c:1664
|
||||
msgid "Coordinate expression was empty or not understood"
|
||||
msgstr ""
|
||||
msgstr "Koordinaatide avaldis on tühi või arusaamatult koostatud"
|
||||
|
||||
#: ../src/theme.c:1801 ../src/theme.c:1811 ../src/theme.c:1845
|
||||
msgid "Coordinate expression results in division by zero"
|
||||
msgstr ""
|
||||
msgstr "Koordinaatide avaldise tulemuseks on nulliga jagamine"
|
||||
|
||||
#: ../src/theme.c:1853
|
||||
msgid ""
|
||||
@@ -3020,20 +3025,21 @@ msgstr ""
|
||||
|
||||
#: ../src/theme.c:2054
|
||||
msgid "Coordinate expression parser overflowed its buffer."
|
||||
msgstr ""
|
||||
msgstr "Koordinaatide avaldise analüsaatoril tekkis puhvri ületäitumine."
|
||||
|
||||
#: ../src/theme.c:2083
|
||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||
msgstr ""
|
||||
msgstr "Koordinaatide avaldises on sulgevad sulud ilma avavate sulgudeta"
|
||||
|
||||
#: ../src/theme.c:2145
|
||||
#, c-format
|
||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||
msgstr ""
|
||||
"Koordinaatide avaldis sisaldab tundmatut muutujat või konstanti \"%s\""
|
||||
|
||||
#: ../src/theme.c:2200
|
||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||
msgstr ""
|
||||
msgstr "Koordinaatide avaldises on avavad sulud ilma sulgevate sulgudeta"
|
||||
|
||||
#: ../src/theme.c:2211
|
||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||
@@ -3094,7 +3100,7 @@ msgstr "Tõrge silumislogi avamisel: %s\n"
|
||||
#: ../src/util.c:108
|
||||
#, c-format
|
||||
msgid "Failed to fdopen() log file %s: %s\n"
|
||||
msgstr ""
|
||||
msgstr "Tõrge logifaili %s avamisel funktsiooniga fdopen(): %s\n"
|
||||
|
||||
#: ../src/util.c:114
|
||||
#, c-format
|
||||
@@ -3175,15 +3181,8 @@ msgid ""
|
||||
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Forcing this application to quit will cause you to lose any unsaved "
|
||||
#~ "changes."
|
||||
#~ msgstr ""
|
||||
#~ "Sellest rakendusest jõuga väljumine põhjustab kõigi salvestamata andmete "
|
||||
#~ "hävimise."
|
||||
|
||||
#~ msgid "Unknown function \"%s\" for menu icon"
|
||||
#~ msgstr "Tundmatu funktsioon \"%s\" menüüikoonile"
|
||||
|
||||
#~ msgid "Failed to read theme from file %s: %s\n"
|
||||
#~ msgstr "Tõrge teema lugemisel failist %s: %s\n"
|
||||
#. separator
|
||||
#. Translators: Translate this string the same way as you do in libwnck!
|
||||
#: ../src/menu.c:88
|
||||
msgid "Always on _Top"
|
||||
msgstr "Alati _pealmine"
|
||||
|
3603
po/pt_BR.po
3603
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1489
po/sr@Latn.po
1489
po/sr@Latn.po
File diff suppressed because it is too large
Load Diff
2221
po/zh_CN.po
2221
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
2273
po/zh_HK.po
2273
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
2846
po/zh_TW.po
2846
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
20
src/50-metacity-desktop-key.xml.in
Normal file
20
src/50-metacity-desktop-key.xml.in
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<KeyListEntries _name="Desktop" wm_name="Metacity" package="metacity">
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/panel_run_dialog" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/panel_main_menu" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/run_command_screenshot" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/run_command_window_screenshot" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/run_command_terminal" />
|
||||
|
||||
</KeyListEntries>
|
||||
|
269
src/50-metacity-key.xml.in
Normal file
269
src/50-metacity-key.xml.in
Normal file
@@ -0,0 +1,269 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<KeyListEntries _name="Window Management" wm_name="Metacity" package="metacity">
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/activate_window_menu" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_fullscreen" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_maximized" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/maximize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/unmaximize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_shaded" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/close" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/minimize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/begin_move" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/begin_resize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_on_all_workspaces"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/raise_or_lower" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/raise" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/lower" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/maximize_vertically" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/maximize_horizontally" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_1"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_2"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_3"
|
||||
value="2"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_4"
|
||||
value="3"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_5"
|
||||
value="4"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_6"
|
||||
value="5"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_7"
|
||||
value="6"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_8"
|
||||
value="7"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_9"
|
||||
value="8"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_10"
|
||||
value="9"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_11"
|
||||
value="10"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_12"
|
||||
value="11"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_left"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_right"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_up"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_down"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_windows" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_group" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_panels" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/cycle_windows" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/cycle_group" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/cycle_panels" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/show_desktop" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_1"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_2"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_3"
|
||||
value="2"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_4"
|
||||
value="3"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_5"
|
||||
value="4"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_6"
|
||||
value="5"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_7"
|
||||
value="6"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_8"
|
||||
value="7"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_9"
|
||||
value="8"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_10"
|
||||
value="9"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_11"
|
||||
value="10"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_12"
|
||||
value="11"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_left"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_right"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_up"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_down"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
</KeyListEntries>
|
||||
|
248
src/Makefile.am
248
src/Makefile.am
@@ -2,136 +2,139 @@ lib_LTLIBRARIES = libmetacity-private.la
|
||||
|
||||
SUBDIRS=wm-tester tools themes
|
||||
|
||||
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
|
||||
INCLUDES=@METACITY_CFLAGS@ -I $(srcdir)/include -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 \
|
||||
async-getprop.h \
|
||||
bell.h \
|
||||
bell.c \
|
||||
boxes.h \
|
||||
boxes.c \
|
||||
common.h \
|
||||
c-screen.c \
|
||||
c-screen.h \
|
||||
c-window.c \
|
||||
c-window.h \
|
||||
compositor.c \
|
||||
compositor.h \
|
||||
constraints.c \
|
||||
constraints.h \
|
||||
core.c \
|
||||
core.h \
|
||||
delete.c \
|
||||
display.c \
|
||||
display.h \
|
||||
draw-workspace.c \
|
||||
draw-workspace.h \
|
||||
edge-resistance.c \
|
||||
edge-resistance.h \
|
||||
effects.c \
|
||||
effects.h \
|
||||
errors.c \
|
||||
errors.h \
|
||||
eventqueue.c \
|
||||
eventqueue.h \
|
||||
fixedtip.c \
|
||||
fixedtip.h \
|
||||
frame.c \
|
||||
frame.h \
|
||||
frames.c \
|
||||
frames.h \
|
||||
gradient.c \
|
||||
gradient.h \
|
||||
group.c \
|
||||
group.h \
|
||||
group-private.h \
|
||||
group-props.c \
|
||||
group-props.h \
|
||||
iconcache.c \
|
||||
iconcache.h \
|
||||
core/async-getprop.c \
|
||||
core/async-getprop.h \
|
||||
core/atomnames.h \
|
||||
core/bell.c \
|
||||
core/bell.h \
|
||||
core/boxes.c \
|
||||
include/boxes.h \
|
||||
compositor/compositor.c \
|
||||
compositor/compositor-private.h \
|
||||
compositor/compositor-xrender.c \
|
||||
compositor/compositor-xrender.h \
|
||||
include/compositor.h \
|
||||
core/constraints.c \
|
||||
core/constraints.h \
|
||||
core/core.c \
|
||||
core/delete.c \
|
||||
core/display.c \
|
||||
core/display-private.h \
|
||||
include/display.h \
|
||||
ui/draw-workspace.c \
|
||||
ui/draw-workspace.h \
|
||||
core/edge-resistance.c \
|
||||
core/edge-resistance.h \
|
||||
core/effects.c \
|
||||
core/effects.h \
|
||||
core/errors.c \
|
||||
include/errors.h \
|
||||
core/eventqueue.c \
|
||||
core/eventqueue.h \
|
||||
core/frame.c \
|
||||
core/frame-private.h \
|
||||
include/frame.h \
|
||||
ui/gradient.c \
|
||||
ui/gradient.h \
|
||||
core/group-private.h \
|
||||
core/group-props.c \
|
||||
core/group-props.h \
|
||||
core/group.c \
|
||||
core/group.h \
|
||||
core/iconcache.c \
|
||||
core/iconcache.h \
|
||||
core/keybindings.c \
|
||||
core/keybindings.h \
|
||||
core/main.c \
|
||||
include/main.h \
|
||||
core/metacity-Xatomtype.h \
|
||||
core/place.c \
|
||||
core/place.h \
|
||||
core/prefs.c \
|
||||
include/prefs.h \
|
||||
core/screen.c \
|
||||
core/screen-private.h \
|
||||
include/screen.h \
|
||||
include/types.h \
|
||||
core/session.c \
|
||||
core/session.h \
|
||||
core/stack.c \
|
||||
core/stack.h \
|
||||
core/util.c \
|
||||
include/util.h \
|
||||
core/window-props.c \
|
||||
core/window-props.h \
|
||||
core/window.c \
|
||||
core/window-private.h \
|
||||
include/window.h \
|
||||
core/workspace.c \
|
||||
core/workspace.h \
|
||||
core/xprops.c \
|
||||
include/xprops.h \
|
||||
include/common.h \
|
||||
include/core.h \
|
||||
include/ui.h \
|
||||
inlinepixbufs.h \
|
||||
keybindings.c \
|
||||
keybindings.h \
|
||||
main.c \
|
||||
main.h \
|
||||
menu.c \
|
||||
menu.h \
|
||||
metaaccellabel.c \
|
||||
metaaccellabel.h \
|
||||
metacity-Xatomtype.h \
|
||||
place.c \
|
||||
place.h \
|
||||
prefs.c \
|
||||
prefs.h \
|
||||
resizepopup.c \
|
||||
resizepopup.h \
|
||||
screen.c \
|
||||
screen.h \
|
||||
session.c \
|
||||
session.h \
|
||||
spring-model.c \
|
||||
spring-model.h \
|
||||
stack.c \
|
||||
stack.h \
|
||||
tabpopup.c \
|
||||
tabpopup.h \
|
||||
theme.c \
|
||||
theme.h \
|
||||
theme-parser.c \
|
||||
theme-parser.h \
|
||||
themewidget.c \
|
||||
themewidget.h \
|
||||
ui.c \
|
||||
ui.h \
|
||||
util.c \
|
||||
util.h \
|
||||
window.c \
|
||||
window.h \
|
||||
window-props.c \
|
||||
window-props.h \
|
||||
workspace.c \
|
||||
workspace.h \
|
||||
xprops.c \
|
||||
xprops.h
|
||||
ui/fixedtip.c \
|
||||
ui/fixedtip.h \
|
||||
ui/frames.c \
|
||||
ui/frames.h \
|
||||
ui/menu.c \
|
||||
ui/menu.h \
|
||||
ui/metaaccellabel.c \
|
||||
ui/metaaccellabel.h \
|
||||
ui/resizepopup.c \
|
||||
include/resizepopup.h \
|
||||
ui/tabpopup.c \
|
||||
include/tabpopup.h \
|
||||
ui/theme-parser.c \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.c \
|
||||
ui/theme.h \
|
||||
ui/themewidget.c \
|
||||
ui/themewidget.h \
|
||||
ui/ui.c
|
||||
|
||||
# by setting libmetacity_private_la_CFLAGS, the files shared with
|
||||
# metacity proper will be compiled with different names.
|
||||
libmetacity_private_la_CFLAGS =
|
||||
libmetacity_private_la_SOURCES= \
|
||||
boxes.c \
|
||||
boxes.h \
|
||||
gradient.c \
|
||||
gradient.h \
|
||||
preview-widget.c \
|
||||
preview-widget.h \
|
||||
theme.c \
|
||||
theme.h \
|
||||
theme-parser.c \
|
||||
theme-parser.h \
|
||||
util.c \
|
||||
util.h \
|
||||
common.h
|
||||
libmetacity_private_la_SOURCES= \
|
||||
core/boxes.c \
|
||||
include/boxes.h \
|
||||
ui/gradient.c \
|
||||
ui/gradient.h \
|
||||
core/util.c \
|
||||
include/util.h \
|
||||
include/common.h \
|
||||
ui/preview-widget.c \
|
||||
ui/preview-widget.h \
|
||||
ui/theme-parser.c \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.c \
|
||||
ui/theme.h
|
||||
|
||||
libmetacity_private_la_LDFLAGS = -no-undefined
|
||||
libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
||||
|
||||
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
|
||||
|
||||
libmetacityinclude_HEADERS = \
|
||||
boxes.h \
|
||||
common.h \
|
||||
gradient.h \
|
||||
preview-widget.h \
|
||||
theme.h \
|
||||
theme-parser.h \
|
||||
util.h
|
||||
libmetacityinclude_HEADERS = \
|
||||
include/boxes.h \
|
||||
ui/gradient.h \
|
||||
include/util.h \
|
||||
include/common.h \
|
||||
ui/preview-widget.h \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.h
|
||||
|
||||
metacity_theme_viewer_SOURCES= \
|
||||
theme-viewer.c
|
||||
ui/theme-viewer.c
|
||||
|
||||
metacity_dialog_SOURCES= \
|
||||
metacity-dialog.c
|
||||
ui/metacity-dialog.c
|
||||
|
||||
bin_PROGRAMS=metacity metacity-theme-viewer
|
||||
libexec_PROGRAMS=metacity-dialog
|
||||
@@ -141,9 +144,9 @@ metacity_LDADD=@METACITY_LIBS@ $(EFENCE)
|
||||
metacity_theme_viewer_LDADD= @METACITY_LIBS@ libmetacity-private.la
|
||||
metacity_dialog_LDADD=@METACITY_LIBS@
|
||||
|
||||
testboxes_SOURCES=util.h util.c boxes.h boxes.c testboxes.c
|
||||
testgradient_SOURCES=gradient.h gradient.c testgradient.c
|
||||
testasyncgetprop_SOURCES=async-getprop.h async-getprop.c testasyncgetprop.c
|
||||
testboxes_SOURCES=include/util.h core/util.c include/boxes.h core/boxes.c core/testboxes.c
|
||||
testgradient_SOURCES=ui/gradient.h ui/gradient.c ui/testgradient.c
|
||||
testasyncgetprop_SOURCES=core/async-getprop.h core/async-getprop.c core/testasyncgetprop.c
|
||||
|
||||
noinst_PROGRAMS=testboxes testgradient testasyncgetprop
|
||||
|
||||
@@ -155,12 +158,19 @@ desktopfilesdir=$(datadir)/gnome/wm-properties
|
||||
desktopfiles_in_files=metacity.desktop.in
|
||||
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
|
||||
desktopfiles_DATA = $(desktopfiles_files)
|
||||
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
schemadir = @GCONF_SCHEMA_FILE_DIR@
|
||||
schema_in_files = metacity.schemas.in
|
||||
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
|
||||
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
|
||||
xml_in_files = 50-metacity-desktop-key.xml.in 50-metacity-key.xml.in
|
||||
xml_DATA = $(xml_in_files:.xml.in=.xml)
|
||||
|
||||
@INTLTOOL_SCHEMAS_RULE@
|
||||
|
||||
if GCONF_SCHEMAS_INSTALL
|
||||
@@ -177,10 +187,10 @@ VARIABLES=default_icon_data $(srcdir)/default_icon.png \
|
||||
stock_delete_data $(srcdir)/stock_delete.png
|
||||
|
||||
BUILT_SOURCES = inlinepixbufs.h
|
||||
CLEANFILES = inlinepixbufs.h metacity.desktop metacity.schemas
|
||||
CLEANFILES = inlinepixbufs.h metacity.desktop metacity.schemas 50-metacity-desktop-key.xml 50-metacity-key.xml
|
||||
|
||||
inlinepixbufs.h: $(IMAGES)
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
@@ -190,4 +200,6 @@ EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) $(schema_DATA) \
|
||||
$(desktopfiles_in_files) \
|
||||
$(schema_in_files) \
|
||||
$(xml_in_files) \
|
||||
libmetacity-private.pc.in
|
||||
|
||||
|
55
src/api.c
55
src/api.c
@@ -1,55 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "api.h"
|
||||
#include "display.h"
|
||||
#include "colors.h"
|
||||
|
||||
PangoContext*
|
||||
meta_get_pango_context (Screen *xscreen,
|
||||
const PangoFontDescription *desc)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
screen = meta_screen_for_x_screen (xscreen);
|
||||
|
||||
g_return_val_if_fail (screen != NULL, NULL);
|
||||
|
||||
return meta_screen_get_pango_context (screen,
|
||||
desc,
|
||||
/* FIXME, from the frame window */
|
||||
PANGO_DIRECTION_LTR);
|
||||
}
|
||||
|
||||
gulong
|
||||
meta_get_x_pixel (Screen *xscreen, const PangoColor *color)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
screen = meta_screen_for_x_screen (xscreen);
|
||||
|
||||
g_return_val_if_fail (screen != NULL, 0);
|
||||
|
||||
return meta_screen_get_x_pixel (screen, color);
|
||||
}
|
||||
|
64
src/api.h
64
src/api.h
@@ -1,64 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_API_H
|
||||
#define META_API_H
|
||||
|
||||
/* don't add any internal headers here; api.h is an installed/public
|
||||
* header. Only theme.h is also installed.
|
||||
*/
|
||||
#include <X11/Xlib.h>
|
||||
#include <pango/pangox.h>
|
||||
|
||||
/* Colors/state stuff matches GTK since we get the info from
|
||||
* the GTK UI slave
|
||||
*/
|
||||
typedef struct _MetaUIColors MetaUIColors;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_STATE_NORMAL,
|
||||
META_STATE_ACTIVE,
|
||||
META_STATE_PRELIGHT,
|
||||
META_STATE_SELECTED,
|
||||
META_STATE_INSENSITIVE
|
||||
} MetaUIState;
|
||||
|
||||
struct _MetaUIColors
|
||||
{
|
||||
PangoColor fg[5];
|
||||
PangoColor bg[5];
|
||||
PangoColor light[5];
|
||||
PangoColor dark[5];
|
||||
PangoColor mid[5];
|
||||
PangoColor text[5];
|
||||
PangoColor base[5];
|
||||
PangoColor text_aa[5];
|
||||
};
|
||||
|
||||
PangoContext* meta_get_pango_context (Screen *xscreen,
|
||||
const PangoFontDescription *desc);
|
||||
gulong meta_get_x_pixel (Screen *xscreen,
|
||||
const PangoColor *color);
|
||||
|
||||
#endif
|
677
src/c-screen.c
677
src/c-screen.c
@@ -1,677 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#include <cm/ws.h>
|
||||
#include <cm/stacker.h>
|
||||
#include <cm/wsint.h>
|
||||
#include <cm/drawable-node.h>
|
||||
#include <cm/state.h>
|
||||
#include <cm/magnifier.h>
|
||||
#include <cm/square.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "screen.h"
|
||||
#include "c-screen.h"
|
||||
#include "c-window.h"
|
||||
|
||||
struct MetaCompScreen
|
||||
{
|
||||
WsDisplay *display;
|
||||
CmStacker *stacker;
|
||||
CmMagnifier *magnifier;
|
||||
|
||||
WsWindow *gl_window;
|
||||
WsWindow *root_window;
|
||||
|
||||
WsScreen *screen;
|
||||
MetaScreen *meta_screen;
|
||||
|
||||
int repaint_id;
|
||||
int idle_id;
|
||||
|
||||
WsWindow *selection_window;
|
||||
|
||||
GHashTable *windows_by_xid;
|
||||
};
|
||||
|
||||
static MetaCompWindow *
|
||||
meta_comp_window_lookup (MetaCompScreen *info,
|
||||
Window xid)
|
||||
{
|
||||
MetaCompWindow *window;
|
||||
|
||||
window = g_hash_table_lookup (info->windows_by_xid, (gpointer)xid);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
MetaCompWindow *
|
||||
meta_comp_screen_lookup_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
return meta_comp_window_lookup (info, xwindow);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
update_frame_counter (void)
|
||||
{
|
||||
#define BUFSIZE 128
|
||||
static GTimer *timer;
|
||||
static double buffer [BUFSIZE];
|
||||
static int next = 0;
|
||||
|
||||
if (!timer)
|
||||
timer = g_timer_new ();
|
||||
|
||||
buffer[next++] = g_timer_elapsed (timer, NULL);
|
||||
|
||||
if (next == BUFSIZE)
|
||||
{
|
||||
int i;
|
||||
double total;
|
||||
|
||||
next = 0;
|
||||
|
||||
total = 0.0;
|
||||
for (i = 1; i < BUFSIZE; ++i)
|
||||
total += buffer[i] - buffer[i - 1];
|
||||
|
||||
g_print ("frames per second: %f\n", 1 / (total / (BUFSIZE - 1)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
dump_stacking_order (GList *nodes)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = nodes; list != NULL; list = list->next)
|
||||
{
|
||||
CmDrawableNode *node = list->data;
|
||||
|
||||
if (node)
|
||||
g_print ("%lx, ", WS_RESOURCE_XID (node->drawable));
|
||||
}
|
||||
g_print ("\n");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
repaint (gpointer data)
|
||||
{
|
||||
MetaCompScreen *info = data;
|
||||
CmState *state;
|
||||
#if 0
|
||||
g_print ("repaint\n");
|
||||
#endif
|
||||
glViewport (0, 0,
|
||||
info->meta_screen->rect.width,
|
||||
info->meta_screen->rect.height);
|
||||
|
||||
glLoadIdentity();
|
||||
|
||||
#if 0
|
||||
glClearColor (0, 0, 0, 1.0);
|
||||
glClear (GL_COLOR_BUFFER_BIT);
|
||||
#endif
|
||||
|
||||
ws_window_raise (info->gl_window);
|
||||
|
||||
#if 0
|
||||
glDisable (GL_TEXTURE_2D);
|
||||
glDisable (GL_TEXTURE_RECTANGLE_ARB);
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
||||
glColor4f (0.0, 1.0, 0.0, 1.0);
|
||||
glRectf (-1.0, -1.0, 1.0, 1.0);
|
||||
glFinish();
|
||||
#endif
|
||||
|
||||
state = cm_state_new ();
|
||||
|
||||
cm_state_disable_depth_buffer_update (state);
|
||||
|
||||
cm_node_render (CM_NODE (info->magnifier), state);
|
||||
|
||||
cm_state_enable_depth_buffer_update (state);
|
||||
|
||||
g_object_unref (state);
|
||||
|
||||
ws_window_gl_swap_buffers (info->gl_window);
|
||||
glFinish();
|
||||
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
info->idle_id = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static MetaCompWindow *
|
||||
find_comp_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
return meta_comp_window_lookup (info, xwindow);
|
||||
}
|
||||
|
||||
static CmNode *
|
||||
find_node (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (window)
|
||||
return meta_comp_window_get_node (window);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GList *all_screen_infos;
|
||||
|
||||
MetaCompScreen *
|
||||
meta_comp_screen_get_by_xwindow (Window xwindow)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = all_screen_infos; list != NULL; list = list->next)
|
||||
{
|
||||
MetaCompScreen *info = list->data;
|
||||
|
||||
if (find_node (info, xwindow))
|
||||
return info;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MetaCompScreen *
|
||||
meta_comp_screen_new (WsDisplay *display,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
MetaCompScreen *scr_info = g_new0 (MetaCompScreen, 1);
|
||||
|
||||
scr_info->screen = ws_display_get_screen_from_number (
|
||||
display, screen->number);
|
||||
scr_info->root_window = ws_screen_get_root_window (scr_info->screen);
|
||||
scr_info->display = display;
|
||||
scr_info->meta_screen = screen;
|
||||
scr_info->windows_by_xid = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
|
||||
all_screen_infos = g_list_prepend (all_screen_infos, scr_info);
|
||||
|
||||
return scr_info;
|
||||
}
|
||||
|
||||
static char *
|
||||
make_selection_name (MetaCompScreen *info)
|
||||
{
|
||||
char *buffer;
|
||||
|
||||
buffer = g_strdup_printf ("_NET_WM_CM_S%d", info->meta_screen->number);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void
|
||||
on_selection_clear (WsWindow *window,
|
||||
WsSelectionClearEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
MetaCompScreen *info = data;
|
||||
char *buffer = make_selection_name (info);
|
||||
|
||||
if (strcmp (event->selection, buffer))
|
||||
{
|
||||
/* We lost the selection */
|
||||
meta_comp_screen_unredirect (info);
|
||||
}
|
||||
}
|
||||
|
||||
static WsWindow *
|
||||
claim_selection (MetaCompScreen *info)
|
||||
{
|
||||
WsWindow *window = ws_window_new (info->root_window);
|
||||
char *buffer = make_selection_name (info);
|
||||
|
||||
#if 0
|
||||
g_print ("selection window: %lx\n", WS_RESOURCE_XID (window));
|
||||
#endif
|
||||
|
||||
ws_window_own_selection (window, buffer, WS_CURRENT_TIME);
|
||||
|
||||
g_signal_connect (window, "selection_clear_event", G_CALLBACK (on_selection_clear), info);
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
static void
|
||||
queue_paint (CmNode *node,
|
||||
MetaCompScreen *info)
|
||||
{
|
||||
#if 0
|
||||
g_print ("queueing %s\n", G_OBJECT_TYPE_NAME (node));
|
||||
#endif
|
||||
meta_comp_screen_queue_paint (info);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_redirect (MetaCompScreen *info)
|
||||
{
|
||||
WsWindow *root = ws_screen_get_root_window (info->screen);
|
||||
WsRectangle source;
|
||||
WsRectangle target;
|
||||
WsServerRegion *region;
|
||||
int screen_w;
|
||||
int screen_h;
|
||||
CmSquare *square;
|
||||
|
||||
#if 0
|
||||
g_print ("redirecting %lx\n", WS_RESOURCE_XID (root));
|
||||
#endif
|
||||
|
||||
ws_window_redirect_subwindows (root);
|
||||
info->gl_window = ws_screen_get_gl_window (info->screen);
|
||||
/* FIXME: This should probably happen in libcm */
|
||||
ws_window_set_override_redirect (info->gl_window, TRUE);
|
||||
region = ws_server_region_new (info->display);
|
||||
ws_window_set_input_shape (info->gl_window, region);
|
||||
g_object_unref (G_OBJECT (region));
|
||||
|
||||
ws_display_begin_error_trap (info->display);
|
||||
|
||||
ws_window_unredirect (info->gl_window);
|
||||
|
||||
ws_display_end_error_trap (info->display);
|
||||
|
||||
info->selection_window = claim_selection (info);
|
||||
|
||||
ws_window_map (info->gl_window);
|
||||
|
||||
info->stacker = cm_stacker_new ();
|
||||
|
||||
square = cm_square_new (0.3, 0.3, 0.8, 1.0);
|
||||
|
||||
cm_stacker_add_child (info->stacker, CM_NODE (square));
|
||||
|
||||
g_object_unref (square);
|
||||
|
||||
screen_w = ws_screen_get_width (info->screen);
|
||||
screen_h = ws_screen_get_height (info->screen);
|
||||
|
||||
#if 0
|
||||
g_print ("width: %d height %d\n", screen_w, screen_h);
|
||||
#endif
|
||||
|
||||
source.x = (screen_w - (screen_w / 4)) / 2;
|
||||
source.y = screen_h / 16;
|
||||
source.width = screen_w / 4;
|
||||
source.height = screen_h / 16;
|
||||
|
||||
target.x = 0;
|
||||
target.y = screen_h - screen_h / 4;
|
||||
target.width = screen_w;
|
||||
target.height = screen_h / 4;
|
||||
|
||||
info->magnifier = cm_magnifier_new (CM_NODE (info->stacker), &source, &target);
|
||||
|
||||
if (g_getenv ("USE_MAGNIFIER"))
|
||||
cm_magnifier_set_active (info->magnifier, TRUE);
|
||||
else
|
||||
cm_magnifier_set_active (info->magnifier, FALSE);
|
||||
|
||||
info->repaint_id =
|
||||
g_signal_connect (info->magnifier, "need_repaint",
|
||||
G_CALLBACK (queue_paint), info);
|
||||
|
||||
ws_display_sync (info->display);
|
||||
}
|
||||
|
||||
static void
|
||||
listify (gpointer key,
|
||||
gpointer value,
|
||||
gpointer data)
|
||||
{
|
||||
GList **windows = data;
|
||||
|
||||
*windows = g_list_prepend (*windows, (gpointer)value);
|
||||
}
|
||||
|
||||
static void
|
||||
free_all_windows (MetaCompScreen *info)
|
||||
{
|
||||
GList *windows = NULL, *list;
|
||||
|
||||
g_hash_table_foreach (info->windows_by_xid, listify, &windows);
|
||||
|
||||
for (list = windows; list != NULL; list = list->next)
|
||||
{
|
||||
MetaCompWindow *window = list->data;
|
||||
|
||||
meta_comp_window_free (window);
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unredirect (MetaCompScreen *info)
|
||||
{
|
||||
WsScreen *ws_screen = info->screen;
|
||||
WsWindow *root = ws_screen_get_root_window (ws_screen);
|
||||
|
||||
g_signal_handler_disconnect (info->magnifier, info->repaint_id);
|
||||
g_object_unref (info->magnifier);
|
||||
|
||||
ws_window_unredirect_subwindows (root);
|
||||
ws_screen_release_gl_window (ws_screen);
|
||||
|
||||
free_all_windows (info);
|
||||
|
||||
ws_display_sync (info->display);
|
||||
|
||||
/* FIXME: libcm needs a way to guarantee that a window is destroyed,
|
||||
* without relying on ref counting having it as a side effect
|
||||
*/
|
||||
g_object_unref (info->selection_window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_queue_paint (MetaCompScreen *info)
|
||||
{
|
||||
#if 0
|
||||
g_print ("queuing\n");
|
||||
#endif
|
||||
if (!info->idle_id)
|
||||
info->idle_id = g_idle_add (repaint, info);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_restack (MetaCompScreen *info,
|
||||
Window window,
|
||||
Window above_this)
|
||||
{
|
||||
MetaCompWindow *comp_window = find_comp_window (info, window);
|
||||
MetaCompWindow *above_comp_window = find_comp_window (info, above_this);
|
||||
CmNode *window_node = find_node (info, window);
|
||||
CmNode *above_node = find_node (info, above_this);
|
||||
|
||||
if ((comp_window && meta_comp_window_stack_frozen (comp_window)) ||
|
||||
(above_comp_window && meta_comp_window_stack_frozen (above_comp_window)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
if (window_node == above_node)
|
||||
return;
|
||||
|
||||
if (window_node && above_this == WS_RESOURCE_XID (info->gl_window))
|
||||
{
|
||||
cm_stacker_raise_child (info->stacker, window_node);
|
||||
}
|
||||
else if (window_node && above_this == None)
|
||||
{
|
||||
cm_stacker_lower_child (info->stacker, window_node);
|
||||
}
|
||||
else if (window_node && above_node)
|
||||
{
|
||||
cm_stacker_restack_child (info->stacker, window_node, above_node);
|
||||
}
|
||||
#if 0
|
||||
else
|
||||
g_print ("nothing happened\n");
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
g_print ("done restacking; new order:\n");
|
||||
#endif
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_raise_window (MetaCompScreen *info,
|
||||
Window window)
|
||||
{
|
||||
CmNode *node = find_node (info, window);
|
||||
|
||||
if (node)
|
||||
cm_stacker_raise_child (info->stacker, node);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
{
|
||||
WsRectangle rect;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
meta_comp_window_set_size (comp_window, &rect);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_child_titles (WsWindow *window)
|
||||
{
|
||||
GList *children = ws_window_query_subwindows (window);
|
||||
GList *list;
|
||||
int i;
|
||||
|
||||
g_print ("window: %lx %s\n", WS_RESOURCE_XID (window), ws_window_query_title (window));
|
||||
|
||||
i = 0;
|
||||
for (list = children; list != NULL; list = list->next)
|
||||
{
|
||||
WsWindow *child = list->data;
|
||||
|
||||
g_print (" %d adding: %lx %s\n", i++, WS_RESOURCE_XID (child), ws_window_query_title (child));
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaCompScreen *cscreen;
|
||||
XID xid;
|
||||
} DestroyData;
|
||||
|
||||
static void
|
||||
on_window_destroy (MetaCompWindow *comp_window,
|
||||
gpointer closure)
|
||||
{
|
||||
DestroyData *data = closure;
|
||||
CmNode *node = meta_comp_window_get_node (comp_window);
|
||||
|
||||
cm_stacker_remove_child (data->cscreen->stacker, node);
|
||||
g_hash_table_remove (data->cscreen->windows_by_xid, (gpointer)data->xid);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_add_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
WsDrawable *drawable;
|
||||
MetaCompWindow *comp_window;
|
||||
DestroyData *data;
|
||||
|
||||
ws_display_begin_error_trap (info->display);
|
||||
|
||||
comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
goto out;
|
||||
|
||||
drawable = WS_DRAWABLE (ws_window_lookup (info->display, xwindow));
|
||||
|
||||
if (ws_window_query_input_only (WS_WINDOW (drawable)))
|
||||
goto out;
|
||||
|
||||
if (WS_WINDOW (drawable) == info->gl_window ||
|
||||
WS_WINDOW (drawable) == info->screen->overlay_window)
|
||||
{
|
||||
#if 0
|
||||
g_print ("gl window\n");
|
||||
#endif
|
||||
goto out;
|
||||
}
|
||||
|
||||
data = g_new (DestroyData, 1);
|
||||
data->cscreen = info;
|
||||
data->xid = WS_RESOURCE_XID (drawable);
|
||||
|
||||
comp_window = meta_comp_window_new (info->meta_screen, drawable,
|
||||
on_window_destroy, data);
|
||||
|
||||
g_hash_table_insert (info->windows_by_xid, (gpointer)WS_RESOURCE_XID (drawable), comp_window);
|
||||
|
||||
cm_stacker_add_child (info->stacker, meta_comp_window_get_node (comp_window));
|
||||
|
||||
out:
|
||||
if (comp_window)
|
||||
{
|
||||
/* This function is called both when windows are created and when they
|
||||
* are mapped, so for now we have this silly function.
|
||||
*/
|
||||
meta_comp_window_refresh_attrs (comp_window);
|
||||
}
|
||||
|
||||
ws_display_end_error_trap (info->display);
|
||||
|
||||
#if 0
|
||||
g_print ("done checking\n");
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_comp_screen_remove_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
meta_comp_window_free (comp_window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_updates (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gboolean updates)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
meta_comp_window_set_updates (comp_window, updates);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_comp_screen_set_patch (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4])
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_set_patch (node, points);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unset_patch (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_unset_patch (node);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_alpha (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble alpha)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
#if 0
|
||||
g_print ("alpha: %f\n", alpha);
|
||||
#endif
|
||||
cm_drawable_node_set_alpha (node, alpha);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_get_real_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
cm_drawable_node_get_clipbox (node, size);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unmap (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *window = find_comp_window (info, xwindow);
|
||||
|
||||
if (window)
|
||||
meta_comp_window_hide (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_target_rect (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_set_scale_rect (node, rect);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -1,53 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#include "screen.h"
|
||||
#include "c-window.h"
|
||||
|
||||
typedef struct MetaCompScreen MetaCompScreen;
|
||||
|
||||
MetaCompScreen *meta_comp_screen_new (WsDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaCompScreen *meta_comp_screen_get_by_xwindow (Window xwindow);
|
||||
void meta_comp_screen_destroy (MetaCompScreen *scr_info);
|
||||
void meta_comp_screen_redirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_unredirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_add_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_remove_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_restack (MetaCompScreen *scr_info,
|
||||
Window window,
|
||||
Window above_this);
|
||||
void meta_comp_screen_set_size (MetaCompScreen *info,
|
||||
Window window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void meta_comp_screen_raise_window (MetaCompScreen *scr_info,
|
||||
Window window);
|
||||
void meta_comp_screen_queue_paint (MetaCompScreen *info);
|
||||
void meta_comp_screen_set_updates (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gboolean updates);
|
||||
void meta_comp_screen_set_patch (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4]);
|
||||
void meta_comp_screen_unset_patch (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_set_alpha (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble alpha);
|
||||
void meta_comp_screen_get_real_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size);
|
||||
void meta_comp_screen_set_target_rect (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect);
|
||||
void meta_comp_screen_set_explode (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble level);
|
||||
void meta_comp_screen_unmap (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
MetaCompWindow *meta_comp_screen_lookup_window (MetaCompScreen *info,
|
||||
Window xwindow);
|
1259
src/c-window.c
1259
src/c-window.c
File diff suppressed because it is too large
Load Diff
@@ -1,72 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <cm/node.h>
|
||||
#include "display.h"
|
||||
#include "effects.h"
|
||||
|
||||
#ifndef C_WINDOW_H
|
||||
#define C_WINDOW_H
|
||||
|
||||
typedef struct _MetaCompWindow MetaCompWindow;
|
||||
|
||||
typedef void (* MetaCompWindowDestroy) (MetaCompWindow *window,
|
||||
gpointer closure);
|
||||
|
||||
MetaCompWindow *meta_comp_window_new (MetaScreen *screen,
|
||||
WsDrawable *drawable,
|
||||
MetaCompWindowDestroy destroy,
|
||||
gpointer data);
|
||||
CmNode *meta_comp_window_get_node (MetaCompWindow *window);
|
||||
gboolean meta_comp_window_free (MetaCompWindow *window);
|
||||
void meta_comp_window_set_size (MetaCompWindow *window,
|
||||
WsRectangle *size);
|
||||
|
||||
void meta_comp_window_hide (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_show (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_refresh_attrs (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_set_updates (MetaCompWindow *comp_window,
|
||||
gboolean updates);
|
||||
|
||||
void meta_comp_window_explode (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_shrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_unshrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_focus (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_restack (MetaCompWindow *comp_window,
|
||||
MetaCompWindow *above);
|
||||
void meta_comp_window_freeze_stack (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_thaw_stack (MetaCompWindow *comp_window);
|
||||
gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_run_minimize (MetaCompWindow *window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_unminimize (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
|
||||
#if 0
|
||||
void meta_comp_window_set_explode (MetaCompWindow *comp_window,
|
||||
double level);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
370
src/colors.c
370
src/colors.c
@@ -1,370 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity RGB color stuff */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "colors.h"
|
||||
|
||||
|
||||
static void
|
||||
visual_decompose_mask (gulong mask,
|
||||
gint *shift,
|
||||
gint *prec)
|
||||
{
|
||||
/* This code is from GTK+, (C) GTK+ Team */
|
||||
*shift = 0;
|
||||
*prec = 0;
|
||||
|
||||
while (!(mask & 0x1))
|
||||
{
|
||||
(*shift)++;
|
||||
mask >>= 1;
|
||||
}
|
||||
|
||||
while (mask & 0x1)
|
||||
{
|
||||
(*prec)++;
|
||||
mask >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_init_visual_info (MetaScreen *screen)
|
||||
{
|
||||
Visual *xvisual;
|
||||
int nxvisuals;
|
||||
XVisualInfo *visual_list;
|
||||
XVisualInfo visual_template;
|
||||
|
||||
/* root window visual */
|
||||
xvisual = DefaultVisual (screen->display->xdisplay,
|
||||
screen->number);
|
||||
|
||||
visual_template.visualid = XVisualIDFromVisual (xvisual);
|
||||
visual_list = XGetVisualInfo (screen->display->xdisplay,
|
||||
VisualIDMask, &visual_template, &nxvisuals);
|
||||
|
||||
if (nxvisuals != 1)
|
||||
meta_warning ("Matched weird number of visuals %d\n", nxvisuals);
|
||||
|
||||
screen->visual_info = *visual_list;
|
||||
|
||||
meta_verbose ("Using visual class %d\n", screen->visual_info.class);
|
||||
|
||||
XFree (visual_list);
|
||||
}
|
||||
|
||||
gulong
|
||||
meta_screen_get_x_pixel (MetaScreen *screen,
|
||||
const PangoColor *color)
|
||||
{
|
||||
/* This code is derived from GTK+, (C) GTK+ Team */
|
||||
gulong pixel;
|
||||
|
||||
if (screen->visual_info.class == TrueColor ||
|
||||
screen->visual_info.class == DirectColor)
|
||||
{
|
||||
int red_prec, red_shift, green_prec, green_shift, blue_prec, blue_shift;
|
||||
|
||||
visual_decompose_mask (screen->visual_info.red_mask,
|
||||
&red_shift, &red_prec);
|
||||
visual_decompose_mask (screen->visual_info.green_mask,
|
||||
&green_shift, &green_prec);
|
||||
visual_decompose_mask (screen->visual_info.blue_mask,
|
||||
&blue_shift, &blue_prec);
|
||||
|
||||
pixel = (((color->red >> (16 - red_prec)) << red_shift) +
|
||||
((color->green >> (16 - green_prec)) << green_shift) +
|
||||
((color->blue >> (16 - blue_prec)) << blue_shift));
|
||||
}
|
||||
else
|
||||
{
|
||||
#define INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11)
|
||||
double r, g, b;
|
||||
|
||||
r = color->red / (double) 0xffff;
|
||||
g = color->green / (double) 0xffff;
|
||||
b = color->blue / (double) 0xffff;
|
||||
|
||||
/* Now this is a low-bloat GdkRGB replacement! */
|
||||
if (INTENSITY (r, g, b) > 0.5)
|
||||
pixel = WhitePixel (screen->display->xdisplay, screen->number);
|
||||
else
|
||||
pixel = BlackPixel (screen->display->xdisplay, screen->number);
|
||||
#undef INTENSITY
|
||||
}
|
||||
|
||||
return pixel;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_set_ui_colors (MetaScreen *screen,
|
||||
const MetaUIColors *colors)
|
||||
{
|
||||
screen->colors = *colors;
|
||||
meta_screen_queue_frame_redraws (screen);
|
||||
}
|
||||
|
||||
/* Straight out of gtkstyle.c */
|
||||
static PangoColor meta_default_normal_fg = { 0, 0, 0 };
|
||||
static PangoColor meta_default_active_fg = { 0, 0, 0 };
|
||||
static PangoColor meta_default_prelight_fg = { 0, 0, 0 };
|
||||
static PangoColor meta_default_selected_fg = { 0xffff, 0xffff, 0xffff };
|
||||
static PangoColor meta_default_insensitive_fg = { 0x7530, 0x7530, 0x7530 };
|
||||
|
||||
static PangoColor meta_default_normal_bg = { 0xd6d6, 0xd6d6, 0xd6d6 };
|
||||
static PangoColor meta_default_active_bg = { 0xc350, 0xc350, 0xc350 };
|
||||
static PangoColor meta_default_prelight_bg = { 0xea60, 0xea60, 0xea60 };
|
||||
static PangoColor meta_default_selected_bg = { 0, 0, 0x9c40 };
|
||||
static PangoColor meta_default_insensitive_bg = { 0xd6d6, 0xd6d6, 0xd6d6 };
|
||||
|
||||
static void
|
||||
rgb_to_hls (gdouble *r,
|
||||
gdouble *g,
|
||||
gdouble *b)
|
||||
{
|
||||
gdouble min;
|
||||
gdouble max;
|
||||
gdouble red;
|
||||
gdouble green;
|
||||
gdouble blue;
|
||||
gdouble h, l, s;
|
||||
gdouble delta;
|
||||
|
||||
red = *r;
|
||||
green = *g;
|
||||
blue = *b;
|
||||
|
||||
if (red > green)
|
||||
{
|
||||
if (red > blue)
|
||||
max = red;
|
||||
else
|
||||
max = blue;
|
||||
|
||||
if (green < blue)
|
||||
min = green;
|
||||
else
|
||||
min = blue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (green > blue)
|
||||
max = green;
|
||||
else
|
||||
max = blue;
|
||||
|
||||
if (red < blue)
|
||||
min = red;
|
||||
else
|
||||
min = blue;
|
||||
}
|
||||
|
||||
l = (max + min) / 2;
|
||||
s = 0;
|
||||
h = 0;
|
||||
|
||||
if (max != min)
|
||||
{
|
||||
if (l <= 0.5)
|
||||
s = (max - min) / (max + min);
|
||||
else
|
||||
s = (max - min) / (2 - max - min);
|
||||
|
||||
delta = max -min;
|
||||
if (red == max)
|
||||
h = (green - blue) / delta;
|
||||
else if (green == max)
|
||||
h = 2 + (blue - red) / delta;
|
||||
else if (blue == max)
|
||||
h = 4 + (red - green) / delta;
|
||||
|
||||
h *= 60;
|
||||
if (h < 0.0)
|
||||
h += 360;
|
||||
}
|
||||
|
||||
*r = h;
|
||||
*g = l;
|
||||
*b = s;
|
||||
}
|
||||
|
||||
static void
|
||||
hls_to_rgb (gdouble *h,
|
||||
gdouble *l,
|
||||
gdouble *s)
|
||||
{
|
||||
gdouble hue;
|
||||
gdouble lightness;
|
||||
gdouble saturation;
|
||||
gdouble m1, m2;
|
||||
gdouble r, g, b;
|
||||
|
||||
lightness = *l;
|
||||
saturation = *s;
|
||||
|
||||
if (lightness <= 0.5)
|
||||
m2 = lightness * (1 + saturation);
|
||||
else
|
||||
m2 = lightness + saturation - lightness * saturation;
|
||||
m1 = 2 * lightness - m2;
|
||||
|
||||
if (saturation == 0)
|
||||
{
|
||||
*h = lightness;
|
||||
*l = lightness;
|
||||
*s = lightness;
|
||||
}
|
||||
else
|
||||
{
|
||||
hue = *h + 120;
|
||||
while (hue > 360)
|
||||
hue -= 360;
|
||||
while (hue < 0)
|
||||
hue += 360;
|
||||
|
||||
if (hue < 60)
|
||||
r = m1 + (m2 - m1) * hue / 60;
|
||||
else if (hue < 180)
|
||||
r = m2;
|
||||
else if (hue < 240)
|
||||
r = m1 + (m2 - m1) * (240 - hue) / 60;
|
||||
else
|
||||
r = m1;
|
||||
|
||||
hue = *h;
|
||||
while (hue > 360)
|
||||
hue -= 360;
|
||||
while (hue < 0)
|
||||
hue += 360;
|
||||
|
||||
if (hue < 60)
|
||||
g = m1 + (m2 - m1) * hue / 60;
|
||||
else if (hue < 180)
|
||||
g = m2;
|
||||
else if (hue < 240)
|
||||
g = m1 + (m2 - m1) * (240 - hue) / 60;
|
||||
else
|
||||
g = m1;
|
||||
|
||||
hue = *h - 120;
|
||||
while (hue > 360)
|
||||
hue -= 360;
|
||||
while (hue < 0)
|
||||
hue += 360;
|
||||
|
||||
if (hue < 60)
|
||||
b = m1 + (m2 - m1) * hue / 60;
|
||||
else if (hue < 180)
|
||||
b = m2;
|
||||
else if (hue < 240)
|
||||
b = m1 + (m2 - m1) * (240 - hue) / 60;
|
||||
else
|
||||
b = m1;
|
||||
|
||||
*h = r;
|
||||
*l = g;
|
||||
*s = b;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
style_shade (PangoColor *a,
|
||||
PangoColor *b,
|
||||
gdouble k)
|
||||
{
|
||||
gdouble red;
|
||||
gdouble green;
|
||||
gdouble blue;
|
||||
|
||||
red = (gdouble) a->red / 65535.0;
|
||||
green = (gdouble) a->green / 65535.0;
|
||||
blue = (gdouble) a->blue / 65535.0;
|
||||
|
||||
rgb_to_hls (&red, &green, &blue);
|
||||
|
||||
green *= k;
|
||||
if (green > 1.0)
|
||||
green = 1.0;
|
||||
else if (green < 0.0)
|
||||
green = 0.0;
|
||||
|
||||
blue *= k;
|
||||
if (blue > 1.0)
|
||||
blue = 1.0;
|
||||
else if (blue < 0.0)
|
||||
blue = 0.0;
|
||||
|
||||
hls_to_rgb (&red, &green, &blue);
|
||||
|
||||
b->red = red * 65535.0;
|
||||
b->green = green * 65535.0;
|
||||
b->blue = blue * 65535.0;
|
||||
}
|
||||
|
||||
#define LIGHTNESS_MULT 1.3
|
||||
#define DARKNESS_MULT 0.7
|
||||
void
|
||||
meta_screen_init_ui_colors (MetaScreen *screen)
|
||||
{
|
||||
int i;
|
||||
MetaUIColors *colors;
|
||||
|
||||
colors = &screen->colors;
|
||||
|
||||
colors->fg[META_STATE_NORMAL] = meta_default_normal_fg;
|
||||
colors->fg[META_STATE_ACTIVE] = meta_default_active_fg;
|
||||
colors->fg[META_STATE_PRELIGHT] = meta_default_prelight_fg;
|
||||
colors->fg[META_STATE_SELECTED] = meta_default_selected_fg;
|
||||
colors->fg[META_STATE_INSENSITIVE] = meta_default_insensitive_fg;
|
||||
|
||||
colors->bg[META_STATE_NORMAL] = meta_default_normal_bg;
|
||||
colors->bg[META_STATE_ACTIVE] = meta_default_active_bg;
|
||||
colors->bg[META_STATE_PRELIGHT] = meta_default_prelight_bg;
|
||||
colors->bg[META_STATE_SELECTED] = meta_default_selected_bg;
|
||||
colors->bg[META_STATE_INSENSITIVE] = meta_default_insensitive_bg;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
colors->text[i] = colors->fg[i];
|
||||
colors->base[i].red = G_MAXUSHORT;
|
||||
colors->base[i].green = G_MAXUSHORT;
|
||||
colors->base[i].blue = G_MAXUSHORT;
|
||||
}
|
||||
|
||||
colors->base[META_STATE_SELECTED] = meta_default_selected_bg;
|
||||
colors->base[META_STATE_INSENSITIVE] = meta_default_prelight_bg;
|
||||
colors->text[META_STATE_INSENSITIVE] = meta_default_insensitive_fg;
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
style_shade (&colors->bg[i], &colors->light[i], LIGHTNESS_MULT);
|
||||
style_shade (&colors->bg[i], &colors->dark[i], DARKNESS_MULT);
|
||||
|
||||
colors->mid[i].red = (colors->light[i].red + colors->dark[i].red) / 2;
|
||||
colors->mid[i].green = (colors->light[i].green + colors->dark[i].green) / 2;
|
||||
colors->mid[i].blue = (colors->light[i].blue + colors->dark[i].blue) / 2;
|
||||
|
||||
colors->text_aa[i].red = (colors->text[i].red + colors->base[i].red) / 2;
|
||||
colors->text_aa[i].green = (colors->text[i].green + colors->base[i].green) / 2;
|
||||
colors->text_aa[i].blue = (colors->text[i].blue + colors->base[i].blue) / 2;
|
||||
}
|
||||
}
|
1024
src/compositor.c
1024
src/compositor.c
File diff suppressed because it is too large
Load Diff
@@ -1,92 +0,0 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity compositing manager */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2003 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.
|
||||
*/
|
||||
|
||||
#ifndef META_COMPOSITOR_H
|
||||
#define META_COMPOSITOR_H
|
||||
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
#include "spring-model.h"
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#include "cm/deform.h"
|
||||
/* FIXME: Needs namespacing. */
|
||||
void get_patch_points (Model *model, CmPoint points[4][4]);
|
||||
#endif
|
||||
|
||||
typedef void (* MetaAnimationFinishedFunc) (gpointer data);
|
||||
|
||||
/* XXX namespace me */
|
||||
void compute_window_rect (MetaWindow *window, MetaRectangle *rect);
|
||||
|
||||
MetaCompositor* meta_compositor_new (MetaDisplay *display);
|
||||
void meta_compositor_unref (MetaCompositor *compositor);
|
||||
void meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *xevent,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_add_window (MetaCompositor *compositor,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs);
|
||||
void meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow);
|
||||
void meta_compositor_set_debug_updates (MetaCompositor *compositor,
|
||||
gboolean debug_updates);
|
||||
|
||||
void meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
|
||||
#if 0
|
||||
void meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished_cb,
|
||||
gpointer finished_data);
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates);
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor);
|
||||
|
||||
void meta_compositor_begin_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *initial,
|
||||
int grab_x, int grab_y);
|
||||
void meta_compositor_update_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x, int y);
|
||||
void meta_compositor_end_move (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
|
||||
#endif /* META_COMPOSITOR_H */
|
54
src/compositor/compositor-private.h
Normal file
54
src/compositor/compositor-private.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008 Iain Holmes
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_COMPOSITOR_PRIVATE_H
|
||||
#define META_COMPOSITOR_PRIVATE_H
|
||||
|
||||
#include "compositor.h"
|
||||
|
||||
struct _MetaCompositor
|
||||
{
|
||||
void (* destroy) (MetaCompositor *compositor);
|
||||
|
||||
void (*manage_screen) (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void (*unmanage_screen) (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void (*add_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs);
|
||||
void (*remove_window) (MetaCompositor *compositor,
|
||||
Window xwindow);
|
||||
void (*set_updates) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean update);
|
||||
void (*process_event) (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
MetaWindow *window);
|
||||
Pixmap (*get_window_pixmap) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*set_active_window) (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window);
|
||||
};
|
||||
|
||||
#endif
|
3065
src/compositor/compositor-xrender.c
Normal file
3065
src/compositor/compositor-xrender.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity fixed tooltip routine */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2007 Iain Holmes
|
||||
* Based on xcompmgr - (c) 2003 Keith Packard
|
||||
* xfwm4 - (c) 2005-2007 Olivier Fourdan
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -21,16 +21,11 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_FIXED_TIP_H
|
||||
#define META_FIXED_TIP_H
|
||||
#ifndef META_COMPOSITOR_XRENDER_H_
|
||||
#define META_COMPOSITOR_XRENDER_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
void meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
int root_x, int root_y,
|
||||
const char *markup_text);
|
||||
void meta_fixed_tip_hide (void);
|
||||
#include "types.h"
|
||||
|
||||
MetaCompositor *meta_compositor_xrender_new (MetaDisplay *display);
|
||||
|
||||
#endif
|
159
src/compositor/compositor.c
Normal file
159
src/compositor/compositor.c
Normal file
@@ -0,0 +1,159 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008 Iain Holmes
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "compositor-private.h"
|
||||
#include "compositor-xrender.h"
|
||||
|
||||
MetaCompositor *
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* At some point we would have a way to select between backends */
|
||||
return meta_compositor_xrender_new (display);
|
||||
#else
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->destroy)
|
||||
compositor->destroy (compositor);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_add_window (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->add_window)
|
||||
compositor->add_window (compositor, window, xwindow, attrs);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->remove_window)
|
||||
compositor->remove_window (compositor, xwindow);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->manage_screen)
|
||||
compositor->manage_screen (compositor, screen);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->unmanage_screen)
|
||||
compositor->unmanage_screen (compositor, screen);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->set_updates)
|
||||
compositor->set_updates (compositor, window, updates);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->process_event)
|
||||
compositor->process_event (compositor, event, window);
|
||||
#endif
|
||||
}
|
||||
|
||||
Pixmap
|
||||
meta_compositor_get_window_pixmap (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->get_window_pixmap)
|
||||
return compositor->get_window_pixmap (compositor, window);
|
||||
else
|
||||
return None;
|
||||
#else
|
||||
return None;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_set_active_window (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (compositor && compositor->set_active_window)
|
||||
compositor->set_active_window (compositor, screen, window);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* These functions are unused at the moment */
|
||||
void meta_compositor_begin_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *initial,
|
||||
int grab_x,
|
||||
int grab_y)
|
||||
{
|
||||
}
|
||||
|
||||
void meta_compositor_update_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
}
|
||||
|
||||
void meta_compositor_end_move (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
}
|
||||
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
}
|
164
src/core/atomnames.h
Normal file
164
src/core/atomnames.h
Normal file
@@ -0,0 +1,164 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2002, 2003, 2004 Red Hat, Inc.
|
||||
* Copyright (C) 2003, 2004 Rob Adams
|
||||
* Copyright (C) 2004-2006 Elijah Newren
|
||||
* Copyright (C) 2008 Thomas Thurman
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file atomnames.h A list of atom names.
|
||||
*
|
||||
* This is a list of the names of all the X atoms that Metacity uses.
|
||||
* Each is wrapped in a macro "item()" which is undefined here; the
|
||||
* idea is that when you need to make a big list of all the X atoms,
|
||||
* you can define item(), include this file, and then undefine it
|
||||
* again.
|
||||
*
|
||||
* If you also define EWMH_ATOMS_ONLY then you will only get _NET_WM_*
|
||||
* hints rather than all of them.
|
||||
*/
|
||||
|
||||
#ifndef item
|
||||
#error "item(x) must be defined when you include atomnames.h"
|
||||
#endif
|
||||
|
||||
#ifndef EWMH_ATOMS_ONLY
|
||||
|
||||
item(WM_PROTOCOLS)
|
||||
item(WM_TAKE_FOCUS)
|
||||
item(WM_DELETE_WINDOW)
|
||||
item(WM_STATE)
|
||||
item(_MOTIF_WM_HINTS)
|
||||
item(WM_CHANGE_STATE)
|
||||
item(SM_CLIENT_ID)
|
||||
item(WM_CLIENT_LEADER)
|
||||
item(WM_WINDOW_ROLE)
|
||||
item(UTF8_STRING)
|
||||
item(WM_ICON_SIZE)
|
||||
item(_KWM_WIN_ICON)
|
||||
item(_METACITY_RESTART_MESSAGE)
|
||||
item(_METACITY_RELOAD_THEME_MESSAGE)
|
||||
item(_METACITY_SET_KEYBINDINGS_MESSAGE)
|
||||
item(_METACITY_TOGGLE_VERBOSE)
|
||||
item(_GNOME_PANEL_ACTION)
|
||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||
item(_GNOME_PANEL_ACTION_RUN_DIALOG)
|
||||
item(_METACITY_SENTINEL)
|
||||
item(_METACITY_VERSION)
|
||||
item(WM_CLIENT_MACHINE)
|
||||
item(MANAGER)
|
||||
item(TARGETS)
|
||||
item(MULTIPLE)
|
||||
item(TIMESTAMP)
|
||||
item(VERSION)
|
||||
item(ATOM_PAIR)
|
||||
|
||||
/* Oddities: These are used, and we need atoms for them,
|
||||
* but when we need all _NET_WM hints (i.e. when we're making
|
||||
* lists of which _NET_WM hints we support in order to advertise
|
||||
* it) we haven't historically listed them. I don't know what
|
||||
* the reason for this is. It may be a bug.
|
||||
*/
|
||||
item(_NET_WM_SYNC_REQUEST)
|
||||
item(_NET_WM_SYNC_REQUEST_COUNTER)
|
||||
item(_NET_WM_VISIBLE_NAME)
|
||||
item(_NET_WM_VISIBLE_ICON_NAME)
|
||||
item(_NET_SUPPORTING_WM_CHECK)
|
||||
|
||||
/* But I suppose it's quite reasonable not to advertise using
|
||||
* _NET_SUPPORTED that we support _NET_SUPPORTED :)
|
||||
*/
|
||||
item(_NET_SUPPORTED)
|
||||
|
||||
#endif /* !EWMH_ATOMS_ONLY */
|
||||
|
||||
/**************************************************************************/
|
||||
|
||||
item(_NET_WM_NAME)
|
||||
item(_NET_CLOSE_WINDOW)
|
||||
item(_NET_WM_STATE)
|
||||
item(_NET_WM_STATE_SHADED)
|
||||
item(_NET_WM_STATE_MAXIMIZED_HORZ)
|
||||
item(_NET_WM_STATE_MAXIMIZED_VERT)
|
||||
item(_NET_WM_DESKTOP)
|
||||
item(_NET_NUMBER_OF_DESKTOPS)
|
||||
item(_NET_CURRENT_DESKTOP)
|
||||
item(_NET_WM_WINDOW_TYPE)
|
||||
item(_NET_WM_WINDOW_TYPE_DESKTOP)
|
||||
item(_NET_WM_WINDOW_TYPE_DOCK)
|
||||
item(_NET_WM_WINDOW_TYPE_TOOLBAR)
|
||||
item(_NET_WM_WINDOW_TYPE_MENU)
|
||||
item(_NET_WM_WINDOW_TYPE_DIALOG)
|
||||
item(_NET_WM_WINDOW_TYPE_NORMAL)
|
||||
item(_NET_WM_STATE_MODAL)
|
||||
item(_NET_CLIENT_LIST)
|
||||
item(_NET_CLIENT_LIST_STACKING)
|
||||
item(_NET_WM_STATE_SKIP_TASKBAR)
|
||||
item(_NET_WM_STATE_SKIP_PAGER)
|
||||
item(_NET_WM_ICON_NAME)
|
||||
item(_NET_WM_ICON)
|
||||
item(_NET_WM_ICON_GEOMETRY)
|
||||
item(_NET_WM_MOVERESIZE)
|
||||
item(_NET_ACTIVE_WINDOW)
|
||||
item(_NET_WM_STRUT)
|
||||
item(_NET_WM_STATE_HIDDEN)
|
||||
item(_NET_WM_WINDOW_TYPE_UTILITY)
|
||||
item(_NET_WM_WINDOW_TYPE_SPLASH)
|
||||
item(_NET_WM_STATE_FULLSCREEN)
|
||||
item(_NET_WM_PING)
|
||||
item(_NET_WM_PID)
|
||||
item(_NET_WORKAREA)
|
||||
item(_NET_SHOWING_DESKTOP)
|
||||
item(_NET_DESKTOP_LAYOUT)
|
||||
item(_NET_DESKTOP_NAMES)
|
||||
item(_NET_WM_ALLOWED_ACTIONS)
|
||||
item(_NET_WM_ACTION_MOVE)
|
||||
item(_NET_WM_ACTION_RESIZE)
|
||||
item(_NET_WM_ACTION_SHADE)
|
||||
item(_NET_WM_ACTION_STICK)
|
||||
item(_NET_WM_ACTION_MAXIMIZE_HORZ)
|
||||
item(_NET_WM_ACTION_MAXIMIZE_VERT)
|
||||
item(_NET_WM_ACTION_CHANGE_DESKTOP)
|
||||
item(_NET_WM_ACTION_CLOSE)
|
||||
item(_NET_WM_STATE_ABOVE)
|
||||
item(_NET_WM_STATE_BELOW)
|
||||
item(_NET_STARTUP_ID)
|
||||
item(_NET_WM_STRUT_PARTIAL)
|
||||
item(_NET_WM_ACTION_FULLSCREEN)
|
||||
item(_NET_WM_ACTION_MINIMIZE)
|
||||
item(_NET_FRAME_EXTENTS)
|
||||
item(_NET_REQUEST_FRAME_EXTENTS)
|
||||
item(_NET_WM_USER_TIME)
|
||||
item(_NET_WM_STATE_DEMANDS_ATTENTION)
|
||||
item(_NET_MOVERESIZE_WINDOW)
|
||||
item(_NET_DESKTOP_GEOMETRY)
|
||||
item(_NET_DESKTOP_VIEWPORT)
|
||||
item(_NET_WM_USER_TIME_WINDOW)
|
||||
item(_NET_WM_ACTION_ABOVE)
|
||||
item(_NET_WM_ACTION_BELOW)
|
||||
|
||||
#if 0
|
||||
/* We apparently never use: */
|
||||
/* item(_NET_RESTACK_WINDOW) */
|
||||
#endif
|
||||
|
||||
/* eof atomnames.h */
|
||||
|
@@ -22,11 +22,57 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file core/bell.c Ring the bell or flash the screen
|
||||
*
|
||||
* Sometimes, X programs "ring the bell", whatever that means. Metacity lets
|
||||
* the user configure the bell to be audible or visible (aka visual), and
|
||||
* if it's visual it can be configured to be frame-flash or fullscreen-flash.
|
||||
* We never get told about audible bells; X handles them just fine by itself.
|
||||
*
|
||||
* Visual bells come in at meta_bell_notify(), which checks we are actually
|
||||
* in visual mode and calls through to meta_bell_visual_notify(). That
|
||||
* function then checks what kind of visual flash you like, and calls either
|
||||
* meta_bell_flash_fullscreen()-- which calls meta_bell_flash_screen() to do
|
||||
* its work-- or meta_bell_flash_frame(), which flashes the focussed window
|
||||
* using meta_bell_flash_window_frame(), unless there is no such window, in
|
||||
* which case it flashes the screen instead. meta_bell_flash_window_frame()
|
||||
* flashes the frame and calls meta_bell_unflash_frame() as a timeout to
|
||||
* remove the flash.
|
||||
*
|
||||
* The visual bell was the result of a discussion in Bugzilla here:
|
||||
* <http://bugzilla.gnome.org/show_bug.cgi?id=99886>.
|
||||
*
|
||||
* Several of the functions in this file are ifdeffed out entirely if we are
|
||||
* found not to have the XKB extension, which is required to do these clever
|
||||
* things with bells; some others are entirely no-ops in that case.
|
||||
*
|
||||
* \bug Static functions should not be called meta_*.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "bell.h"
|
||||
#include "screen.h"
|
||||
#include "screen-private.h"
|
||||
#include "prefs.h"
|
||||
|
||||
/**
|
||||
* Flashes one entire screen. This is done by making a window the size of the
|
||||
* whole screen (or reusing the old one, if it's still around), mapping it,
|
||||
* painting it white and then black, and then unmapping it. We set saveunder so
|
||||
* that all the windows behind it come back immediately.
|
||||
*
|
||||
* Unlike frame flashes, we don't do fullscreen flashes with a timeout; rather,
|
||||
* we do them in one go, because we don't have to rely on the theme code
|
||||
* redrawing the frame for us in order to do the flash.
|
||||
*
|
||||
* \param display The display which owns the screen (rather redundant)
|
||||
* \param screen The screen to flash
|
||||
*
|
||||
* \bug The way I read it, this appears not to do the flash
|
||||
* the first time we flash a particular display. Am I wrong?
|
||||
*
|
||||
* \bug This appears to destroy our current XSync status.
|
||||
*/
|
||||
static void
|
||||
meta_bell_flash_screen (MetaDisplay *display,
|
||||
MetaScreen *screen)
|
||||
@@ -89,6 +135,16 @@ meta_bell_flash_screen (MetaDisplay *display,
|
||||
XFlush (display->xdisplay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flashes one screen, or all screens, in response to a bell event.
|
||||
* If the event is on a particular window, flash the screen that
|
||||
* window is on. Otherwise, flash every screen on this display.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param display The display the event came in on
|
||||
* \param xkb_ev The bell event
|
||||
*/
|
||||
#ifdef HAVE_XKB
|
||||
static void
|
||||
meta_bell_flash_fullscreen (MetaDisplay *display,
|
||||
@@ -116,6 +172,20 @@ meta_bell_flash_fullscreen (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a frame be not flashed; this is the timeout half of
|
||||
* meta_bell_flash_window_frame(). This is done simply by clearing the
|
||||
* flash flag and queuing a redraw of the frame.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param data The frame to unflash, cast to a gpointer so it can go into
|
||||
* a callback function.
|
||||
* \return Always FALSE, so we don't get called again.
|
||||
*
|
||||
* \bug This is the parallel to meta_bell_flash_window_frame(), so it should
|
||||
* really be called meta_bell_unflash_window_frame().
|
||||
*/
|
||||
static gboolean
|
||||
meta_bell_unflash_frame (gpointer data)
|
||||
{
|
||||
@@ -125,6 +195,17 @@ meta_bell_unflash_frame (gpointer data)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes a frame flash and then return to normal shortly afterwards.
|
||||
* This is done by setting a flag so that the theme
|
||||
* code will temporarily draw the frame as focussed if it's unfocussed and
|
||||
* vice versa, and then queueing a redraw. Lastly, we create a timeout so
|
||||
* that the flag can be unset and the frame re-redrawn.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param window The window to flash
|
||||
*/
|
||||
static void
|
||||
meta_bell_flash_window_frame (MetaWindow *window)
|
||||
{
|
||||
@@ -135,6 +216,13 @@ meta_bell_flash_window_frame (MetaWindow *window)
|
||||
meta_bell_unflash_frame, window->frame, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flashes the frame of the focussed window. If there is no focussed window,
|
||||
* flashes the screen.
|
||||
*
|
||||
* \param display The display the bell event came in on
|
||||
* \param xkb_ev The bell event we just received
|
||||
*/
|
||||
static void
|
||||
meta_bell_flash_frame (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
@@ -158,6 +246,17 @@ meta_bell_flash_frame (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives the user some kind of visual bell substitute, in response to a
|
||||
* bell event. What this is depends on the "visual bell type" pref.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param display The display the bell event came in on
|
||||
* \param xkb_ev The bell event we just received
|
||||
*
|
||||
* \bug This should be merged with meta_bell_notify().
|
||||
*/
|
||||
static void
|
||||
meta_bell_visual_notify (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
@@ -176,6 +275,16 @@ meta_bell_visual_notify (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gives the user some kind of visual bell; in fact, this is our response
|
||||
* to any kind of bell request, but we set it up so that we only get
|
||||
* notified about visual bells, and X deals with audible ones.
|
||||
*
|
||||
* If the configure script found we had no XKB, this does not exist.
|
||||
*
|
||||
* \param display The display the bell event came in on
|
||||
* \param xkb_ev The bell event we just received
|
||||
*/
|
||||
void
|
||||
meta_bell_notify (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
@@ -184,8 +293,17 @@ meta_bell_notify (MetaDisplay *display,
|
||||
if (meta_prefs_get_visual_bell ())
|
||||
meta_bell_visual_notify (display, xkb_ev);
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_XKB */
|
||||
|
||||
/**
|
||||
* Turns the bell to audible or visual. This tells X what to do, but
|
||||
* not Metacity; you will need to set the "visual bell" pref for that.
|
||||
*
|
||||
* If the configure script found we had no XKB, this is a no-op.
|
||||
*
|
||||
* \param display The display we're configuring
|
||||
* \param audible True for an audible bell, false for a visual bell
|
||||
*/
|
||||
void
|
||||
meta_bell_set_audible (MetaDisplay *display, gboolean audible)
|
||||
{
|
||||
@@ -197,6 +315,27 @@ meta_bell_set_audible (MetaDisplay *display, gboolean audible)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialises the bell subsystem. This involves intialising
|
||||
* XKB (which, despite being a keyboard extension, is the
|
||||
* place to look for bell notifications), then asking it
|
||||
* to send us bell notifications, and then also switching
|
||||
* off the audible bell if we're using a visual one ourselves.
|
||||
*
|
||||
* Unlike most X extensions we use, we only initialise XKB here
|
||||
* (rather than in main()). It's possible that XKB is not
|
||||
* installed at all, but if that was known at build time
|
||||
* we will have HAVE_XKB undefined, which will cause this
|
||||
* function to be a no-op.
|
||||
*
|
||||
* \param display The display which is opening
|
||||
*
|
||||
* \bug There is a line of code that's never run that tells
|
||||
* XKB to reset the bell status after we quit. Bill H said
|
||||
* (<http://bugzilla.gnome.org/show_bug.cgi?id=99886#c12>)
|
||||
* that XFree86's implementation is broken so we shouldn't
|
||||
* call it, but that was in 2002. Is it working now?
|
||||
*/
|
||||
gboolean
|
||||
meta_bell_init (MetaDisplay *display)
|
||||
{
|
||||
@@ -238,6 +377,15 @@ meta_bell_init (MetaDisplay *display)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shuts down the bell subsystem.
|
||||
*
|
||||
* \param display The display which is closing
|
||||
*
|
||||
* \bug This is never called! If we had XkbSetAutoResetControls
|
||||
* enabled in meta_bell_init(), this wouldn't be a problem, but
|
||||
* we don't.
|
||||
*/
|
||||
void
|
||||
meta_bell_shutdown (MetaDisplay *display)
|
||||
{
|
||||
@@ -250,6 +398,14 @@ meta_bell_shutdown (MetaDisplay *display)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Deals with a frame being destroyed. This is important because if we're
|
||||
* using a visual bell, we might be flashing the edges of the frame, and
|
||||
* so we'd have a timeout function waiting ready to un-flash them. If the
|
||||
* frame's going away, we can tell the timeout not to bother.
|
||||
*
|
||||
* \param frame The frame which is being destroyed
|
||||
*/
|
||||
void
|
||||
meta_bell_notify_frame_destroy (MetaFrame *frame)
|
||||
{
|
@@ -24,8 +24,8 @@
|
||||
#ifdef HAVE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
#include "display.h"
|
||||
#include "frame.h"
|
||||
#include "display-private.h"
|
||||
#include "frame-private.h"
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
void meta_bell_notify (MetaDisplay *display, XkbAnyEvent *xkb_ev);
|
@@ -29,7 +29,6 @@
|
||||
#include "boxes.h"
|
||||
#include "util.h"
|
||||
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
|
||||
#include <stdio.h> /* For snprintf */
|
||||
|
||||
char*
|
||||
meta_rectangle_to_string (const MetaRectangle *rect,
|
||||
@@ -61,7 +60,7 @@ meta_rectangle_region_to_string (GList *region,
|
||||
char *cur = output;
|
||||
|
||||
if (region == NULL)
|
||||
snprintf (output, 10, "(EMPTY)");
|
||||
g_snprintf (output, 10, "(EMPTY)");
|
||||
|
||||
while (tmp)
|
||||
{
|
||||
@@ -114,7 +113,7 @@ meta_rectangle_edge_list_to_string (GList *edge_list,
|
||||
GList *tmp = edge_list;
|
||||
|
||||
if (edge_list == NULL)
|
||||
snprintf (output, 10, "(EMPTY)");
|
||||
g_snprintf (output, 10, "(EMPTY)");
|
||||
|
||||
while (tmp)
|
||||
{
|
||||
@@ -547,10 +546,10 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
ret = g_list_prepend (NULL, temp_rect);
|
||||
|
||||
strut_iter = all_struts;
|
||||
while (strut_iter)
|
||||
for (strut_iter = all_struts; strut_iter; strut_iter = strut_iter->next)
|
||||
{
|
||||
GList *rect_iter;
|
||||
MetaRectangle *strut = (MetaRectangle*) strut_iter->data;
|
||||
MetaRectangle *strut_rect = &((MetaStrut*)strut_iter->data)->rect;
|
||||
|
||||
tmp_list = ret;
|
||||
ret = NULL;
|
||||
@@ -558,45 +557,45 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
while (rect_iter)
|
||||
{
|
||||
MetaRectangle *rect = (MetaRectangle*) rect_iter->data;
|
||||
if (!meta_rectangle_overlap (rect, strut))
|
||||
if (!meta_rectangle_overlap (rect, strut_rect))
|
||||
ret = g_list_prepend (ret, rect);
|
||||
else
|
||||
{
|
||||
/* If there is area in rect left of strut */
|
||||
if (rect->x < strut->x)
|
||||
if (BOX_LEFT (*rect) < BOX_LEFT (*strut_rect))
|
||||
{
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
temp_rect->width = strut->x - rect->x;
|
||||
temp_rect->width = BOX_LEFT (*strut_rect) - BOX_LEFT (*rect);
|
||||
ret = g_list_prepend (ret, temp_rect);
|
||||
}
|
||||
/* If there is area in rect right of strut */
|
||||
if (rect->x + rect->width > strut->x + strut->width)
|
||||
if (BOX_RIGHT (*rect) > BOX_RIGHT (*strut_rect))
|
||||
{
|
||||
int new_x;
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
new_x = strut->x + strut->width;
|
||||
temp_rect->width = rect->x + rect->width - new_x;
|
||||
new_x = BOX_RIGHT (*strut_rect);
|
||||
temp_rect->width = BOX_RIGHT(*rect) - new_x;
|
||||
temp_rect->x = new_x;
|
||||
ret = g_list_prepend (ret, temp_rect);
|
||||
}
|
||||
/* If there is area in rect above strut */
|
||||
if (rect->y < strut->y)
|
||||
if (BOX_TOP (*rect) < BOX_TOP (*strut_rect))
|
||||
{
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
temp_rect->height = strut->y - rect->y;
|
||||
temp_rect->height = BOX_TOP (*strut_rect) - BOX_TOP (*rect);
|
||||
ret = g_list_prepend (ret, temp_rect);
|
||||
}
|
||||
/* If there is area in rect below strut */
|
||||
if (rect->y + rect->height > strut->y + strut->height)
|
||||
if (BOX_BOTTOM (*rect) > BOX_BOTTOM (*strut_rect))
|
||||
{
|
||||
int new_y;
|
||||
temp_rect = g_new (MetaRectangle, 1);
|
||||
*temp_rect = *rect;
|
||||
new_y = strut->y + strut->height;
|
||||
temp_rect->height = rect->y + rect->height - new_y;
|
||||
new_y = BOX_BOTTOM (*strut_rect);
|
||||
temp_rect->height = BOX_BOTTOM (*rect) - new_y;
|
||||
temp_rect->y = new_y;
|
||||
ret = g_list_prepend (ret, temp_rect);
|
||||
}
|
||||
@@ -605,7 +604,6 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
rect_iter = rect_iter->next;
|
||||
}
|
||||
g_list_free (tmp_list);
|
||||
strut_iter = strut_iter->next;
|
||||
}
|
||||
|
||||
/* Sort by maximal area, just because I feel like it... */
|
||||
@@ -662,6 +660,76 @@ meta_rectangle_expand_region_conditionally (GList *region,
|
||||
return region;
|
||||
}
|
||||
|
||||
void
|
||||
meta_rectangle_expand_to_avoiding_struts (MetaRectangle *rect,
|
||||
const MetaRectangle *expand_to,
|
||||
const MetaDirection direction,
|
||||
const GSList *all_struts)
|
||||
{
|
||||
const GSList *strut_iter;
|
||||
|
||||
/* If someone wants this function to handle more fine-grained
|
||||
* direction expanding in the future (e.g. only left, or fully
|
||||
* horizontal plus upward), feel free. But I'm hard-coding for both
|
||||
* horizontal directions (exclusive-)or both vertical directions.
|
||||
*/
|
||||
g_assert ((direction == META_DIRECTION_HORIZONTAL) ^
|
||||
(direction == META_DIRECTION_VERTICAL ));
|
||||
|
||||
if (direction == META_DIRECTION_HORIZONTAL)
|
||||
{
|
||||
rect->x = expand_to->x;
|
||||
rect->width = expand_to->width;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect->y = expand_to->y;
|
||||
rect->height = expand_to->height;
|
||||
}
|
||||
|
||||
|
||||
/* Run over all struts */
|
||||
for (strut_iter = all_struts; strut_iter; strut_iter = strut_iter->next)
|
||||
{
|
||||
MetaStrut *strut = (MetaStrut*) strut_iter->data;
|
||||
|
||||
/* Skip struts that don't overlap */
|
||||
if (!meta_rectangle_overlap (&strut->rect, rect))
|
||||
continue;
|
||||
|
||||
if (direction == META_DIRECTION_HORIZONTAL)
|
||||
{
|
||||
if (strut->side == META_SIDE_LEFT)
|
||||
{
|
||||
int offset = BOX_RIGHT(strut->rect) - BOX_LEFT(*rect);
|
||||
rect->x += offset;
|
||||
rect->width -= offset;
|
||||
}
|
||||
else if (strut->side == META_SIDE_RIGHT)
|
||||
{
|
||||
int offset = BOX_RIGHT (*rect) - BOX_LEFT(strut->rect);
|
||||
rect->width -= offset;
|
||||
}
|
||||
/* else ignore the strut */
|
||||
}
|
||||
else /* direction == META_DIRECTION_VERTICAL */
|
||||
{
|
||||
if (strut->side == META_SIDE_TOP)
|
||||
{
|
||||
int offset = BOX_BOTTOM(strut->rect) - BOX_TOP(*rect);
|
||||
rect->y += offset;
|
||||
rect->height -= offset;
|
||||
}
|
||||
else if (strut->side == META_SIDE_BOTTOM)
|
||||
{
|
||||
int offset = BOX_BOTTOM(*rect) - BOX_TOP(strut->rect);
|
||||
rect->height -= offset;
|
||||
}
|
||||
/* else ignore the strut */
|
||||
}
|
||||
} /* end loop over struts */
|
||||
} /* end meta_rectangle_expand_to_avoiding_struts */
|
||||
|
||||
void
|
||||
meta_rectangle_free_list_and_elements (GList *filled_list)
|
||||
{
|
||||
@@ -739,39 +807,36 @@ meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
/* First, find best rectangle from spanning_rects to which we can clamp
|
||||
* rect to fit into.
|
||||
*/
|
||||
temp = spanning_rects;
|
||||
while (temp)
|
||||
for (temp = spanning_rects; temp; temp = temp->next)
|
||||
{
|
||||
int factor = 1;
|
||||
MetaRectangle *compare_rect = temp->data;
|
||||
int maximal_overlap_amount_for_compare;
|
||||
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare, set
|
||||
* factor to 0.
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare,
|
||||
* skip this rectangle.
|
||||
*/
|
||||
if ((fixed_directions & FIXED_DIRECTION_X) &&
|
||||
(compare_rect->x > rect->x ||
|
||||
compare_rect->x + compare_rect->width < rect->x + rect->width))
|
||||
factor = 0;
|
||||
continue;
|
||||
|
||||
/* If y is fixed and the entire height of rect doesn't fit in compare, set
|
||||
* factor to 0.
|
||||
/* If y is fixed and the entire height of rect doesn't fit in compare,
|
||||
* skip this rectangle.
|
||||
*/
|
||||
if ((fixed_directions & FIXED_DIRECTION_Y) &&
|
||||
(compare_rect->y > rect->y ||
|
||||
compare_rect->y + compare_rect->height < rect->y + rect->height))
|
||||
factor = 0;
|
||||
continue;
|
||||
|
||||
/* If compare can't hold the min_size window, set factor to 0 */
|
||||
/* If compare can't hold the min_size window, skip this rectangle. */
|
||||
if (compare_rect->width < min_size->width ||
|
||||
compare_rect->height < min_size->height)
|
||||
factor = 0;
|
||||
continue;
|
||||
|
||||
/* Determine maximal overlap amount */
|
||||
maximal_overlap_amount_for_compare =
|
||||
MIN (rect->width, compare_rect->width) *
|
||||
MIN (rect->height, compare_rect->height);
|
||||
maximal_overlap_amount_for_compare *= factor;
|
||||
|
||||
/* See if this is the best rect so far */
|
||||
if (maximal_overlap_amount_for_compare > best_overlap)
|
||||
@@ -779,8 +844,6 @@ meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
best_rect = compare_rect;
|
||||
best_overlap = maximal_overlap_amount_for_compare;
|
||||
}
|
||||
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
/* Clamp rect appropriately */
|
||||
@@ -813,34 +876,31 @@ meta_rectangle_clip_to_region (const GList *spanning_rects,
|
||||
/* First, find best rectangle from spanning_rects to which we will clip
|
||||
* rect into.
|
||||
*/
|
||||
temp = spanning_rects;
|
||||
while (temp)
|
||||
for (temp = spanning_rects; temp; temp = temp->next)
|
||||
{
|
||||
int factor = 1;
|
||||
MetaRectangle *compare_rect = temp->data;
|
||||
MetaRectangle overlap;
|
||||
int maximal_overlap_amount_for_compare;
|
||||
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare, set
|
||||
* factor to 0.
|
||||
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare,
|
||||
* skip the rectangle.
|
||||
*/
|
||||
if ((fixed_directions & FIXED_DIRECTION_X) &&
|
||||
(compare_rect->x > rect->x ||
|
||||
compare_rect->x + compare_rect->width < rect->x + rect->width))
|
||||
factor = 0;
|
||||
continue;
|
||||
|
||||
/* If y is fixed and the entire height of rect doesn't fit in compare, set
|
||||
* factor to 0.
|
||||
/* If y is fixed and the entire height of rect doesn't fit in compare,
|
||||
* skip the rectangle.
|
||||
*/
|
||||
if ((fixed_directions & FIXED_DIRECTION_Y) &&
|
||||
(compare_rect->y > rect->y ||
|
||||
compare_rect->y + compare_rect->height < rect->y + rect->height))
|
||||
factor = 0;
|
||||
continue;
|
||||
|
||||
/* Determine maximal overlap amount */
|
||||
meta_rectangle_intersect (rect, compare_rect, &overlap);
|
||||
maximal_overlap_amount_for_compare = meta_rectangle_area (&overlap);
|
||||
maximal_overlap_amount_for_compare *= factor;
|
||||
|
||||
/* See if this is the best rect so far */
|
||||
if (maximal_overlap_amount_for_compare > best_overlap)
|
||||
@@ -848,8 +908,6 @@ meta_rectangle_clip_to_region (const GList *spanning_rects,
|
||||
best_rect = compare_rect;
|
||||
best_overlap = maximal_overlap_amount_for_compare;
|
||||
}
|
||||
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
/* Clip rect appropriately */
|
||||
@@ -896,36 +954,35 @@ meta_rectangle_shove_into_region (const GList *spanning_rects,
|
||||
/* First, find best rectangle from spanning_rects to which we will shove
|
||||
* rect into.
|
||||
*/
|
||||
temp = spanning_rects;
|
||||
while (temp)
|
||||
|
||||
for (temp = spanning_rects; temp; temp = temp->next)
|
||||
{
|
||||
int factor = 1;
|
||||
MetaRectangle *compare_rect = temp->data;
|
||||
int maximal_overlap_amount_for_compare;
|
||||
int dist_to_compare;
|
||||
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare, set
|
||||
* factor to 0.
|
||||
/* If x is fixed and the entire width of rect doesn't fit in compare,
|
||||
* skip this rectangle.
|
||||
*/
|
||||
if ((fixed_directions & FIXED_DIRECTION_X) &&
|
||||
(compare_rect->x > rect->x ||
|
||||
compare_rect->x + compare_rect->width < rect->x + rect->width))
|
||||
factor = 0;
|
||||
continue;
|
||||
|
||||
/* If y is fixed and the entire height of rect doesn't fit in compare, set
|
||||
* factor to 0.
|
||||
/* If y is fixed and the entire height of rect doesn't fit in compare,
|
||||
* skip this rectangle.
|
||||
*/
|
||||
if ((fixed_directions & FIXED_DIRECTION_Y) &&
|
||||
(compare_rect->y > rect->y ||
|
||||
compare_rect->y + compare_rect->height < rect->y + rect->height))
|
||||
factor = 0;
|
||||
continue;
|
||||
|
||||
/* Determine maximal overlap amount between rect & compare_rect */
|
||||
maximal_overlap_amount_for_compare =
|
||||
MIN (rect->width, compare_rect->width) *
|
||||
MIN (rect->height, compare_rect->height);
|
||||
|
||||
/* Determine distance necessary to put rect into comapre_rect */
|
||||
/* Determine distance necessary to put rect into compare_rect */
|
||||
dist_to_compare = 0;
|
||||
if (compare_rect->x > rect->x)
|
||||
dist_to_compare += compare_rect->x - rect->x;
|
||||
@@ -938,13 +995,6 @@ meta_rectangle_shove_into_region (const GList *spanning_rects,
|
||||
dist_to_compare += (rect->y + rect->height) -
|
||||
(compare_rect->y + compare_rect->height);
|
||||
|
||||
/* If we'd have to move in the wrong direction, disqualify compare_rect */
|
||||
if (factor == 0)
|
||||
{
|
||||
maximal_overlap_amount_for_compare = 0;
|
||||
dist_to_compare = G_MAXINT;
|
||||
}
|
||||
|
||||
/* See if this is the best rect so far */
|
||||
if ((maximal_overlap_amount_for_compare > best_overlap) ||
|
||||
(maximal_overlap_amount_for_compare == best_overlap &&
|
||||
@@ -954,8 +1004,6 @@ meta_rectangle_shove_into_region (const GList *spanning_rects,
|
||||
best_overlap = maximal_overlap_amount_for_compare;
|
||||
shortest_distance = dist_to_compare;
|
||||
}
|
||||
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
/* Shove rect appropriately */
|
||||
@@ -1075,9 +1123,9 @@ meta_rectangle_edge_aligns (const MetaRectangle *rect, const MetaEdge *edge)
|
||||
case META_DIRECTION_BOTTOM:
|
||||
return BOX_LEFT (*rect) <= BOX_RIGHT (edge->rect) &&
|
||||
BOX_LEFT (edge->rect) <= BOX_RIGHT (*rect);
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
static GList*
|
||||
@@ -1161,27 +1209,27 @@ replace_rect_with_list (GList *old_element,
|
||||
}
|
||||
|
||||
/* Make a copy of the strut list, make sure that copy only contains parts
|
||||
* of the old_struts that intersect with the rection rect, and then do some
|
||||
* of the old_struts that intersect with the region rect, and then do some
|
||||
* magic to make all the new struts disjoint (okay, we we break up struts
|
||||
* that aren't disjoint in a way that the overlapping part is only included
|
||||
* once, so it's not really magic...).
|
||||
*/
|
||||
static GList*
|
||||
get_disjoint_strut_list_in_region (const GSList *old_struts,
|
||||
const MetaRectangle *region)
|
||||
get_disjoint_strut_rect_list_in_region (const GSList *old_struts,
|
||||
const MetaRectangle *region)
|
||||
{
|
||||
GList *struts;
|
||||
GList *strut_rects;
|
||||
GList *tmp;
|
||||
|
||||
/* First, copy the list */
|
||||
struts = NULL;
|
||||
strut_rects = NULL;
|
||||
while (old_struts)
|
||||
{
|
||||
MetaRectangle *cur = old_struts->data;
|
||||
MetaRectangle *cur = &((MetaStrut*)old_struts->data)->rect;
|
||||
MetaRectangle *copy = g_new (MetaRectangle, 1);
|
||||
*copy = *cur;
|
||||
if (meta_rectangle_intersect (copy, region, copy))
|
||||
struts = g_list_prepend (struts, copy);
|
||||
strut_rects = g_list_prepend (strut_rects, copy);
|
||||
else
|
||||
g_free (copy);
|
||||
|
||||
@@ -1191,7 +1239,7 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
|
||||
/* Now, loop over the list and check for intersections, fixing things up
|
||||
* where they do intersect.
|
||||
*/
|
||||
tmp = struts;
|
||||
tmp = strut_rects;
|
||||
while (tmp)
|
||||
{
|
||||
GList *compare;
|
||||
@@ -1218,10 +1266,10 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
|
||||
cur_leftover = g_list_prepend (cur_leftover, overlap_allocated);
|
||||
|
||||
/* Fix up tmp, compare, and cur -- maybe struts too */
|
||||
if (struts == tmp)
|
||||
if (strut_rects == tmp)
|
||||
{
|
||||
struts = replace_rect_with_list (tmp, cur_leftover);
|
||||
tmp = struts;
|
||||
strut_rects = replace_rect_with_list (tmp, cur_leftover);
|
||||
tmp = strut_rects;
|
||||
}
|
||||
else
|
||||
tmp = replace_rect_with_list (tmp, cur_leftover);
|
||||
@@ -1239,7 +1287,7 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
return struts;
|
||||
return strut_rects;
|
||||
}
|
||||
|
||||
gint
|
||||
@@ -1347,7 +1395,7 @@ rectangle_and_edge_intersection (const MetaRectangle *rect,
|
||||
/* Find out if the intersection is empty; have to do it this way since
|
||||
* edges have a thickness of 0
|
||||
*/
|
||||
if ((result->width < 0 || result->height < 0) ||
|
||||
if ((result->width < 0 || result->height < 0) ||
|
||||
(result->width == 0 && result->height == 0))
|
||||
{
|
||||
result->width = 0;
|
||||
@@ -1397,6 +1445,8 @@ rectangle_and_edge_intersection (const MetaRectangle *rect,
|
||||
else
|
||||
*handle_type = 0;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
return intersect;
|
||||
@@ -1503,23 +1553,25 @@ split_edge (GList *cur_list,
|
||||
cur_list = g_list_prepend (cur_list, temp_edge);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
return cur_list;
|
||||
}
|
||||
|
||||
/* Split up edge and remove preliminary edges from strut_edges depending on
|
||||
* if and how strut and edge intersect.
|
||||
* if and how rect and edge intersect.
|
||||
*/
|
||||
static void
|
||||
fix_up_edges (MetaRectangle *strut, MetaEdge *edge,
|
||||
fix_up_edges (MetaRectangle *rect, MetaEdge *edge,
|
||||
GList **strut_edges, GList **edge_splits,
|
||||
gboolean *edge_needs_removal)
|
||||
{
|
||||
MetaEdge overlap;
|
||||
int handle_type;
|
||||
|
||||
if (!rectangle_and_edge_intersection (strut, edge, &overlap, &handle_type))
|
||||
if (!rectangle_and_edge_intersection (rect, edge, &overlap, &handle_type))
|
||||
return;
|
||||
|
||||
if (handle_type == 0 || handle_type == 1)
|
||||
@@ -1628,9 +1680,9 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
|
||||
const GSList *all_struts)
|
||||
{
|
||||
GList *ret;
|
||||
GList *fixed_struts;
|
||||
GList *fixed_strut_rects;
|
||||
GList *edge_iter;
|
||||
const GList *strut_iter;
|
||||
const GList *strut_rect_iter;
|
||||
|
||||
/* The algorithm is basically as follows:
|
||||
* Make sure the struts are disjoint
|
||||
@@ -1648,18 +1700,19 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
|
||||
*/
|
||||
|
||||
/* Make sure the struts are disjoint */
|
||||
fixed_struts = get_disjoint_strut_list_in_region (all_struts, basic_rect);
|
||||
fixed_strut_rects =
|
||||
get_disjoint_strut_rect_list_in_region (all_struts, basic_rect);
|
||||
|
||||
/* Start off the list with the edges of basic_rect */
|
||||
ret = add_edges (NULL, basic_rect, TRUE);
|
||||
|
||||
strut_iter = fixed_struts;
|
||||
while (strut_iter)
|
||||
strut_rect_iter = fixed_strut_rects;
|
||||
while (strut_rect_iter)
|
||||
{
|
||||
MetaRectangle *strut = (MetaRectangle*) strut_iter->data;
|
||||
MetaRectangle *strut_rect = (MetaRectangle*) strut_rect_iter->data;
|
||||
|
||||
/* Get the new possible edges we may need to add from the strut */
|
||||
GList *new_strut_edges = add_edges (NULL, strut, FALSE);
|
||||
GList *new_strut_edges = add_edges (NULL, strut_rect, FALSE);
|
||||
|
||||
edge_iter = ret;
|
||||
while (edge_iter)
|
||||
@@ -1668,7 +1721,7 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
|
||||
GList *splits_of_cur_edge = NULL;
|
||||
gboolean edge_needs_removal = FALSE;
|
||||
|
||||
fix_up_edges (strut, cur_edge,
|
||||
fix_up_edges (strut_rect, cur_edge,
|
||||
&new_strut_edges, &splits_of_cur_edge,
|
||||
&edge_needs_removal);
|
||||
|
||||
@@ -1692,14 +1745,14 @@ meta_rectangle_find_onscreen_edges (const MetaRectangle *basic_rect,
|
||||
}
|
||||
|
||||
ret = g_list_concat (new_strut_edges, ret);
|
||||
strut_iter = strut_iter->next;
|
||||
strut_rect_iter = strut_rect_iter->next;
|
||||
}
|
||||
|
||||
/* Sort the list */
|
||||
ret = g_list_sort (ret, meta_rectangle_edge_cmp);
|
||||
|
||||
/* Free the fixed struts list */
|
||||
meta_rectangle_free_list_and_elements (fixed_struts);
|
||||
meta_rectangle_free_list_and_elements (fixed_strut_rects);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1716,6 +1769,7 @@ meta_rectangle_find_nonintersected_xinerama_edges (
|
||||
*/
|
||||
GList *ret;
|
||||
const GList *cur;
|
||||
GSList *temp_rects;
|
||||
|
||||
/* Initialize the return list to be empty */
|
||||
ret = NULL;
|
||||
@@ -1823,8 +1877,13 @@ meta_rectangle_find_nonintersected_xinerama_edges (
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
temp_rects = NULL;
|
||||
for (; all_struts; all_struts = all_struts->next)
|
||||
temp_rects = g_slist_prepend (temp_rects,
|
||||
&((MetaStrut*)all_struts->data)->rect);
|
||||
ret = meta_rectangle_remove_intersections_with_boxes_from_edges (ret,
|
||||
all_struts);
|
||||
temp_rects);
|
||||
g_slist_free (temp_rects);
|
||||
|
||||
/* Sort the list */
|
||||
ret = g_list_sort (ret, meta_rectangle_edge_cmp);
|
@@ -91,7 +91,7 @@
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PRIORITY_MINIMUM = 0, // Dummy value used for loop start = min(all priorities)
|
||||
PRIORITY_MINIMUM = 0, /* Dummy value used for loop start = min(all priorities) */
|
||||
PRIORITY_ASPECT_RATIO = 0,
|
||||
PRIORITY_ENTIRELY_VISIBLE_ON_SINGLE_XINERAMA = 0,
|
||||
PRIORITY_ENTIRELY_VISIBLE_ON_WORKAREA = 1,
|
||||
@@ -101,7 +101,7 @@ typedef enum
|
||||
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)
|
||||
PRIORITY_MAXIMUM = 4 /* Dummy value used for loop end = max(all priorities) */
|
||||
} ConstraintPriority;
|
||||
|
||||
typedef enum
|
||||
@@ -350,7 +350,7 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
else if (flags & META_IS_RESIZE_ACTION)
|
||||
info->action_type = ACTION_RESIZE;
|
||||
else if (flags & META_IS_MOVE_ACTION)
|
||||
info->action_type = ACTION_MOVE_AND_RESIZE;
|
||||
info->action_type = ACTION_MOVE;
|
||||
else
|
||||
g_error ("BAD, BAD developer! No treat for you! (Fix your calls to "
|
||||
"meta_window_move_resize_internal()).\n");
|
||||
@@ -365,7 +365,7 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
* and (b) ignored it for aspect ratio windows -- at least in those
|
||||
* cases where both directions do actually change size.
|
||||
*/
|
||||
info->fixed_directions = 0;
|
||||
info->fixed_directions = FIXED_DIRECTION_NONE;
|
||||
/* If x directions don't change but either y direction does */
|
||||
if ( orig->x == new->x && orig->x + orig->width == new->x + new->width &&
|
||||
(orig->y != new->y || orig->y + orig->height != new->y + new->height))
|
||||
@@ -385,7 +385,7 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
* aren't explicit user interaction, though, so just clear it out.
|
||||
*/
|
||||
if (!info->is_user_action)
|
||||
info->fixed_directions = 0;
|
||||
info->fixed_directions = FIXED_DIRECTION_NONE;
|
||||
|
||||
xinerama_info =
|
||||
meta_screen_get_xinerama_for_rect (window->screen, &info->current);
|
||||
@@ -441,7 +441,7 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
"Freakin' Invalid Stupid",
|
||||
(info->is_user_action) ? "true" : "false",
|
||||
meta_gravity_to_string (info->resize_gravity),
|
||||
(info->fixed_directions == 0) ? "None" :
|
||||
(info->fixed_directions == FIXED_DIRECTION_NONE) ? "None" :
|
||||
(info->fixed_directions == FIXED_DIRECTION_X) ? "X fixed" :
|
||||
(info->fixed_directions == FIXED_DIRECTION_Y) ? "Y fixed" :
|
||||
"Freakin' Invalid Stupid",
|
||||
@@ -500,7 +500,7 @@ place_window_if_needed(MetaWindow *window,
|
||||
/* Since we just barely placed the window, there's no reason to
|
||||
* consider any of the directions fixed.
|
||||
*/
|
||||
info->fixed_directions = 0;
|
||||
info->fixed_directions = FIXED_DIRECTION_NONE;
|
||||
}
|
||||
|
||||
if (window->placed || did_placement)
|
||||
@@ -691,7 +691,8 @@ constrain_maximization (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size, work_area;
|
||||
MetaRectangle target_size;
|
||||
MetaRectangle min_size, max_size;
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
@@ -703,20 +704,51 @@ constrain_maximization (MetaWindow *window,
|
||||
if (!window->maximized_horizontally && !window->maximized_vertically)
|
||||
return TRUE;
|
||||
|
||||
work_area = info->work_area_xinerama;
|
||||
unextend_by_frame (&work_area, info->fgeom);
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
/* Calculate target_size = maximized size of (window + frame) */
|
||||
if (window->maximized_horizontally && window->maximized_vertically)
|
||||
target_size = info->work_area_xinerama;
|
||||
else
|
||||
{
|
||||
/* Amount of maximization possible in a single direction depends
|
||||
* on which struts could occlude the window given its current
|
||||
* position. For example, a vertical partial strut on the right
|
||||
* is only relevant for a horizontally maximized window when the
|
||||
* window is at a vertical position where it could be occluded
|
||||
* by that partial strut.
|
||||
*/
|
||||
MetaDirection direction;
|
||||
GSList *active_workspace_struts;
|
||||
|
||||
hminbad = work_area.width < min_size.width && window->maximized_horizontally;
|
||||
vminbad = work_area.height < min_size.height && window->maximized_vertically;
|
||||
if (window->maximized_horizontally)
|
||||
direction = META_DIRECTION_HORIZONTAL;
|
||||
else
|
||||
direction = META_DIRECTION_VERTICAL;
|
||||
active_workspace_struts = window->screen->active_workspace->all_struts;
|
||||
|
||||
target_size = info->current;
|
||||
extend_by_frame (&target_size, info->fgeom);
|
||||
meta_rectangle_expand_to_avoiding_struts (&target_size,
|
||||
&info->entire_xinerama,
|
||||
direction,
|
||||
active_workspace_struts);
|
||||
}
|
||||
/* Now make target_size = maximized size of client window */
|
||||
unextend_by_frame (&target_size, info->fgeom);
|
||||
|
||||
/* Check min size constraints; max size constraints are ignored for maximized
|
||||
* windows, as per bug 327543.
|
||||
*/
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
hminbad = target_size.width < min_size.width && window->maximized_horizontally;
|
||||
vminbad = target_size.height < min_size.height && window->maximized_vertically;
|
||||
if (hminbad || vminbad)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
horiz_equal = work_area.x == info->current.x &&
|
||||
work_area.width == info->current.width;
|
||||
vert_equal = work_area.y == info->current.y &&
|
||||
work_area.height == info->current.height;
|
||||
horiz_equal = target_size.x == info->current.x &&
|
||||
target_size.width == info->current.width;
|
||||
vert_equal = target_size.y == info->current.y &&
|
||||
target_size.height == info->current.height;
|
||||
constraint_already_satisfied =
|
||||
(horiz_equal || !window->maximized_horizontally) &&
|
||||
(vert_equal || !window->maximized_vertically);
|
||||
@@ -726,13 +758,13 @@ constrain_maximization (MetaWindow *window,
|
||||
/*** Enforce constraint ***/
|
||||
if (window->maximized_horizontally)
|
||||
{
|
||||
info->current.x = work_area.x;
|
||||
info->current.width = work_area.width;
|
||||
info->current.x = target_size.x;
|
||||
info->current.width = target_size.width;
|
||||
}
|
||||
if (window->maximized_vertically)
|
||||
{
|
||||
info->current.y = work_area.y;
|
||||
info->current.height = work_area.height;
|
||||
info->current.y = target_size.y;
|
||||
info->current.height = target_size.height;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
@@ -777,7 +809,9 @@ constrain_size_increments (MetaWindow *window,
|
||||
gboolean check_only)
|
||||
{
|
||||
int bh, hi, bw, wi, extra_height, extra_width;
|
||||
int new_width, new_height;
|
||||
gboolean constraint_already_satisfied;
|
||||
MetaRectangle *start_rect;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_INCREMENTS)
|
||||
return TRUE;
|
||||
@@ -794,10 +828,12 @@ constrain_size_increments (MetaWindow *window,
|
||||
wi = window->size_hints.width_inc;
|
||||
extra_height = (info->current.height - bh) % hi;
|
||||
extra_width = (info->current.width - bw) % wi;
|
||||
/* ignore size increments for maximized windows */
|
||||
if (window->maximized_horizontally)
|
||||
extra_width *= 0;
|
||||
if (window->maximized_vertically)
|
||||
extra_height *= 0;
|
||||
/* constraint is satisfied iff there is no extra height or width */
|
||||
constraint_already_satisfied =
|
||||
(extra_height == 0 && extra_width == 0);
|
||||
|
||||
@@ -805,12 +841,32 @@ constrain_size_increments (MetaWindow *window,
|
||||
return constraint_already_satisfied;
|
||||
|
||||
/*** Enforce constraint ***/
|
||||
/* Shrink to base + N * inc */
|
||||
meta_rectangle_resize_with_gravity (&info->orig,
|
||||
new_width = info->current.width - extra_width;
|
||||
new_height = info->current.height - extra_height;
|
||||
|
||||
/* Adjusting down instead of up (as done in the above two lines) may
|
||||
* violate minimum size constraints; fix the adjustment if this
|
||||
* happens.
|
||||
*/
|
||||
if (new_width < window->size_hints.min_width)
|
||||
new_width += ((window->size_hints.min_width - new_width)/wi + 1)*wi;
|
||||
if (new_height < window->size_hints.min_height)
|
||||
new_height += ((window->size_hints.min_height - new_height)/hi + 1)*hi;
|
||||
|
||||
/* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
|
||||
* See bug 448183
|
||||
*/
|
||||
if (info->action_type == ACTION_MOVE_AND_RESIZE)
|
||||
start_rect = &info->current;
|
||||
else
|
||||
start_rect = &info->orig;
|
||||
|
||||
/* Resize to the new size */
|
||||
meta_rectangle_resize_with_gravity (start_rect,
|
||||
&info->current,
|
||||
info->resize_gravity,
|
||||
info->current.width - extra_width,
|
||||
info->current.height - extra_height);
|
||||
new_width,
|
||||
new_height);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -823,6 +879,7 @@ constrain_size_limits (MetaWindow *window,
|
||||
MetaRectangle min_size, max_size;
|
||||
gboolean too_big, too_small, constraint_already_satisfied;
|
||||
int new_width, new_height;
|
||||
MetaRectangle *start_rect;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_LIMITS)
|
||||
return TRUE;
|
||||
@@ -851,7 +908,16 @@ constrain_size_limits (MetaWindow *window,
|
||||
/*** Enforce constraint ***/
|
||||
new_width = CLAMP (info->current.width, min_size.width, max_size.width);
|
||||
new_height = CLAMP (info->current.height, min_size.height, max_size.height);
|
||||
meta_rectangle_resize_with_gravity (&info->orig,
|
||||
|
||||
/* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
|
||||
* See bug 448183
|
||||
*/
|
||||
if (info->action_type == ACTION_MOVE_AND_RESIZE)
|
||||
start_rect = &info->current;
|
||||
else
|
||||
start_rect = &info->orig;
|
||||
|
||||
meta_rectangle_resize_with_gravity (start_rect,
|
||||
&info->current,
|
||||
info->resize_gravity,
|
||||
new_width,
|
||||
@@ -870,6 +936,7 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
int fudge, new_width, new_height;
|
||||
double best_width, best_height;
|
||||
double alt_width, alt_height;
|
||||
MetaRectangle *start_rect;
|
||||
|
||||
if (priority > PRIORITY_ASPECT_RATIO)
|
||||
return TRUE;
|
||||
@@ -975,7 +1042,15 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
break;
|
||||
}
|
||||
|
||||
meta_rectangle_resize_with_gravity (&info->orig,
|
||||
/* Figure out what original rect to pass to meta_rectangle_resize_with_gravity
|
||||
* See bug 448183
|
||||
*/
|
||||
if (info->action_type == ACTION_MOVE_AND_RESIZE)
|
||||
start_rect = &info->current;
|
||||
else
|
||||
start_rect = &info->orig;
|
||||
|
||||
meta_rectangle_resize_with_gravity (start_rect,
|
||||
&info->current,
|
||||
info->resize_gravity,
|
||||
new_width,
|
||||
@@ -994,13 +1069,15 @@ do_screen_and_xinerama_relative_constraints (
|
||||
gboolean exit_early = FALSE, constraint_satisfied;
|
||||
MetaRectangle how_far_it_can_be_smushed, min_size, max_size;
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
/* First, log some debugging information */
|
||||
char spanning_region[1 + 28 * g_list_length (region_spanning_rectangles)];
|
||||
(void) spanning_region; /* Avoid stupid & incorrect compiler warnings... */
|
||||
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"screen/xinerama constraint; region_spanning_rectangles: %s\n",
|
||||
meta_rectangle_region_to_string (region_spanning_rectangles, ", ",
|
||||
spanning_region));
|
||||
#endif
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
how_far_it_can_be_smushed = info->current;
|
@@ -26,8 +26,8 @@
|
||||
#define META_CONSTRAINTS_H
|
||||
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
#include "frame.h"
|
||||
#include "window-private.h"
|
||||
#include "frame-private.h"
|
||||
|
||||
typedef enum
|
||||
{
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "core.h"
|
||||
#include "frame.h"
|
||||
#include "frame-private.h"
|
||||
#include "workspace.h"
|
||||
#include "prefs.h"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
*/
|
||||
static MetaWindow *
|
||||
get_window (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
@@ -60,125 +60,156 @@ get_window (Display *xdisplay,
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_client_size (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *width,
|
||||
int *height)
|
||||
meta_core_get (Display *xdisplay,
|
||||
Window xwindow,
|
||||
...)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (width)
|
||||
*width = window->rect.width;
|
||||
if (height)
|
||||
*height = window->rect.height;
|
||||
}
|
||||
va_list args;
|
||||
MetaCoreGetType request;
|
||||
|
||||
gboolean
|
||||
meta_core_window_has_frame (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
MetaDisplay *display = meta_display_for_x_display (xdisplay);
|
||||
MetaWindow *window = meta_display_lookup_x_window (display, xwindow);
|
||||
|
||||
return window != NULL && window->frame != NULL;
|
||||
}
|
||||
va_start (args, xwindow);
|
||||
|
||||
gboolean
|
||||
meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
request = va_arg (args, MetaCoreGetType);
|
||||
|
||||
return meta_window_titlebar_is_onscreen (window);
|
||||
}
|
||||
/* Now, we special-case the first request slightly. Mostly, requests
|
||||
* for information on windows which have no frame are errors.
|
||||
* But sometimes we may want to know *whether* a window has a frame.
|
||||
* In this case, pass the key META_CORE_WINDOW_HAS_FRAME
|
||||
* as the *first* request, with a pointer to a boolean; if the window
|
||||
* has no frame, this will be set to False and meta_core_get will
|
||||
* exit immediately (so the values of any other requests will be
|
||||
* undefined). Otherwise it will be set to True and meta_core_get will
|
||||
* continue happily on its way.
|
||||
*/
|
||||
|
||||
Window
|
||||
meta_core_get_client_xwindow (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
if (request != META_CORE_WINDOW_HAS_FRAME &&
|
||||
(window == NULL || window->frame == NULL)) {
|
||||
meta_bug ("No such frame window 0x%lx!\n", xwindow);
|
||||
return;
|
||||
}
|
||||
|
||||
return window->xwindow;
|
||||
}
|
||||
while (request != META_CORE_GET_END) {
|
||||
|
||||
gpointer answer = va_arg (args, gpointer);
|
||||
|
||||
MetaFrameFlags
|
||||
meta_core_get_frame_flags (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return meta_frame_get_flags (window->frame);
|
||||
}
|
||||
switch (request) {
|
||||
case META_CORE_WINDOW_HAS_FRAME:
|
||||
*((gboolean*)answer) = window != NULL && window->frame != NULL;
|
||||
if (!*((gboolean*)answer)) return; /* see above */
|
||||
break;
|
||||
case META_CORE_GET_CLIENT_WIDTH:
|
||||
*((gint*)answer) = window->rect.width;
|
||||
break;
|
||||
case META_CORE_GET_CLIENT_HEIGHT:
|
||||
*((gint*)answer) = window->rect.height;
|
||||
break;
|
||||
case META_CORE_IS_TITLEBAR_ONSCREEN:
|
||||
*((gboolean*)answer) = meta_window_titlebar_is_onscreen (window);
|
||||
break;
|
||||
case META_CORE_GET_CLIENT_XWINDOW:
|
||||
*((Window*)answer) = window->xwindow;
|
||||
break;
|
||||
case META_CORE_GET_FRAME_FLAGS:
|
||||
*((MetaFrameFlags*)answer) = meta_frame_get_flags (window->frame);
|
||||
break;
|
||||
case META_CORE_GET_FRAME_TYPE:
|
||||
{
|
||||
MetaFrameType base_type = META_FRAME_TYPE_LAST;
|
||||
|
||||
MetaFrameType
|
||||
meta_core_get_frame_type (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window;
|
||||
MetaFrameType base_type;
|
||||
switch (window->type)
|
||||
{
|
||||
case META_WINDOW_NORMAL:
|
||||
base_type = META_FRAME_TYPE_NORMAL;
|
||||
break;
|
||||
|
||||
window = get_window (xdisplay, frame_xwindow);
|
||||
case META_WINDOW_DIALOG:
|
||||
base_type = META_FRAME_TYPE_DIALOG;
|
||||
break;
|
||||
|
||||
base_type = META_FRAME_TYPE_LAST;
|
||||
|
||||
switch (window->type)
|
||||
{
|
||||
case META_WINDOW_NORMAL:
|
||||
base_type = META_FRAME_TYPE_NORMAL;
|
||||
break;
|
||||
|
||||
case META_WINDOW_DIALOG:
|
||||
base_type = META_FRAME_TYPE_DIALOG;
|
||||
break;
|
||||
|
||||
case META_WINDOW_MODAL_DIALOG:
|
||||
base_type = META_FRAME_TYPE_MODAL_DIALOG;
|
||||
break;
|
||||
|
||||
case META_WINDOW_MENU:
|
||||
base_type = META_FRAME_TYPE_MENU;
|
||||
break;
|
||||
case META_WINDOW_MODAL_DIALOG:
|
||||
base_type = META_FRAME_TYPE_MODAL_DIALOG;
|
||||
break;
|
||||
|
||||
case META_WINDOW_UTILITY:
|
||||
base_type = META_FRAME_TYPE_UTILITY;
|
||||
break;
|
||||
|
||||
case META_WINDOW_DESKTOP:
|
||||
case META_WINDOW_DOCK:
|
||||
case META_WINDOW_TOOLBAR:
|
||||
case META_WINDOW_SPLASHSCREEN:
|
||||
/* No frame */
|
||||
base_type = META_FRAME_TYPE_LAST;
|
||||
break;
|
||||
case META_WINDOW_MENU:
|
||||
base_type = META_FRAME_TYPE_MENU;
|
||||
break;
|
||||
|
||||
case META_WINDOW_UTILITY:
|
||||
base_type = META_FRAME_TYPE_UTILITY;
|
||||
break;
|
||||
|
||||
case META_WINDOW_DESKTOP:
|
||||
case META_WINDOW_DOCK:
|
||||
case META_WINDOW_TOOLBAR:
|
||||
case META_WINDOW_SPLASHSCREEN:
|
||||
/* No frame */
|
||||
base_type = META_FRAME_TYPE_LAST;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (base_type == META_FRAME_TYPE_LAST)
|
||||
{
|
||||
/* can't add border if undecorated */
|
||||
*((MetaFrameType*)answer) = META_FRAME_TYPE_LAST;
|
||||
}
|
||||
else if (window->border_only)
|
||||
{
|
||||
/* override base frame type */
|
||||
*((MetaFrameType*)answer) = META_FRAME_TYPE_BORDER;
|
||||
}
|
||||
else
|
||||
{
|
||||
*((MetaFrameType*)answer) = base_type;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case META_CORE_GET_MINI_ICON:
|
||||
*((GdkPixbuf**)answer) = window->mini_icon;
|
||||
break;
|
||||
case META_CORE_GET_ICON:
|
||||
*((GdkPixbuf**)answer) = window->icon;
|
||||
break;
|
||||
case META_CORE_GET_X:
|
||||
meta_window_get_position (window, (int*)answer, NULL);
|
||||
break;
|
||||
case META_CORE_GET_Y:
|
||||
meta_window_get_position (window, NULL, (int*)answer);
|
||||
break;
|
||||
case META_CORE_GET_FRAME_WORKSPACE:
|
||||
*((gint*)answer) = meta_window_get_net_wm_desktop (window);
|
||||
break;
|
||||
case META_CORE_GET_FRAME_X:
|
||||
*((gint*)answer) = window->frame->rect.x;
|
||||
break;
|
||||
case META_CORE_GET_FRAME_Y:
|
||||
*((gint*)answer) = window->frame->rect.y;
|
||||
break;
|
||||
case META_CORE_GET_FRAME_WIDTH:
|
||||
*((gint*)answer) = window->frame->rect.width;
|
||||
break;
|
||||
case META_CORE_GET_FRAME_HEIGHT:
|
||||
*((gint*)answer) = window->frame->rect.height;
|
||||
break;
|
||||
case META_CORE_GET_SCREEN_WIDTH:
|
||||
*((gint*)answer) = window->screen->rect.width;
|
||||
break;
|
||||
case META_CORE_GET_SCREEN_HEIGHT:
|
||||
*((gint*)answer) = window->screen->rect.height;
|
||||
break;
|
||||
|
||||
default:
|
||||
meta_warning(_("Unknown window information request: %d"), request);
|
||||
}
|
||||
|
||||
if (base_type == META_FRAME_TYPE_LAST)
|
||||
return META_FRAME_TYPE_LAST; /* can't add border if undecorated */
|
||||
else if (window->border_only)
|
||||
return META_FRAME_TYPE_BORDER; /* override base frame type */
|
||||
else
|
||||
return base_type;
|
||||
}
|
||||
request = va_arg (args, MetaCoreGetType);
|
||||
}
|
||||
|
||||
GdkPixbuf*
|
||||
meta_core_get_mini_icon (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->mini_icon;
|
||||
}
|
||||
|
||||
GdkPixbuf*
|
||||
meta_core_get_icon (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->icon;
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -187,7 +218,7 @@ meta_core_queue_frame_resize (Display *xdisplay,
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_queue_move_resize (window);
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -275,32 +306,6 @@ meta_core_user_focus (Display *xdisplay,
|
||||
meta_window_focus (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_position (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *x,
|
||||
int *y)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_get_position (window, x, y);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_size (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (width)
|
||||
*width = window->rect.width;
|
||||
if (height)
|
||||
*height = window->rect.height;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_core_minimize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
@@ -323,6 +328,40 @@ meta_core_maximize (Display *xdisplay,
|
||||
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_toggle_maximize_vertically (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
||||
if (META_WINDOW_MAXIMIZED_VERTICALLY (window))
|
||||
meta_window_unmaximize (window,
|
||||
META_MAXIMIZE_VERTICAL);
|
||||
else
|
||||
meta_window_maximize (window,
|
||||
META_MAXIMIZE_VERTICAL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_toggle_maximize_horizontally (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
||||
if (META_WINDOW_MAXIMIZED_HORIZONTALLY (window))
|
||||
meta_window_unmaximize (window,
|
||||
META_MAXIMIZE_HORIZONTAL);
|
||||
else
|
||||
meta_window_maximize (window,
|
||||
META_MAXIMIZE_HORIZONTAL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_toggle_maximize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
@@ -451,36 +490,6 @@ meta_core_get_active_workspace (Screen *xscreen)
|
||||
return meta_workspace_index (screen->active_workspace);
|
||||
}
|
||||
|
||||
int
|
||||
meta_core_get_frame_workspace (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return meta_window_get_net_wm_desktop (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_frame_extents (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (x)
|
||||
*x = window->frame->rect.x;
|
||||
if (y)
|
||||
*y = window->frame->rect.y;
|
||||
if (width)
|
||||
*width = window->frame->rect.width;
|
||||
if (height)
|
||||
*height = window->frame->rect.height;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_core_show_window_menu (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
@@ -531,6 +540,7 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
name = META_KEYBINDING_TOGGLE_STICKY;
|
||||
break;
|
||||
case META_MENU_OP_ABOVE:
|
||||
case META_MENU_OP_UNABOVE:
|
||||
name = META_KEYBINDING_TOGGLE_ABOVE;
|
||||
break;
|
||||
case META_MENU_OP_WORKSPACES:
|
||||
@@ -630,7 +640,6 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
gboolean frame_action,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
guint32 timestamp,
|
||||
@@ -649,7 +658,6 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
op, pointer_already_grabbed,
|
||||
frame_action,
|
||||
event_serial,
|
||||
button, modmask,
|
||||
timestamp, root_x, root_y);
|
||||
}
|
||||
@@ -731,20 +739,6 @@ meta_core_set_screen_cursor (Display *xdisplay,
|
||||
meta_frame_set_screen_cursor (window->frame, cursor);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_screen_size (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_on_screen);
|
||||
|
||||
if (width)
|
||||
*width = window->screen->rect.width;
|
||||
if (height)
|
||||
*height = window->screen->rect.height;
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_increment_event_serial (Display *xdisplay)
|
||||
{
|
||||
@@ -758,28 +752,25 @@ meta_core_increment_event_serial (Display *xdisplay)
|
||||
void
|
||||
meta_invalidate_default_icons (void)
|
||||
{
|
||||
GSList *displays, *windows;
|
||||
MetaDisplay *display = meta_get_display ();
|
||||
GSList *windows;
|
||||
GSList *l;
|
||||
|
||||
for (displays = meta_displays_list ();
|
||||
displays != NULL;
|
||||
displays = displays->next)
|
||||
if (display == NULL)
|
||||
return; /* We can validly be called before the display is opened. */
|
||||
|
||||
windows = meta_display_list_windows (display);
|
||||
for (l = windows; l != NULL; l = l->next)
|
||||
{
|
||||
MetaWindow *window = (MetaWindow*)l->data;
|
||||
|
||||
for (windows = meta_display_list_windows (displays->data);
|
||||
windows != NULL;
|
||||
windows = windows->next)
|
||||
if (window->icon_cache.origin == USING_FALLBACK_ICON)
|
||||
{
|
||||
|
||||
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);
|
||||
}
|
||||
meta_icon_cache_free (&(window->icon_cache));
|
||||
meta_window_update_icon_now (window);
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
@@ -22,9 +22,12 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _SVID_SOURCE /* for gethostname() */
|
||||
|
||||
#include <config.h>
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
#include "window-private.h"
|
||||
#include "errors.h"
|
||||
#include "workspace.h"
|
||||
|
||||
@@ -144,7 +147,8 @@ search_and_destroy_window (int pid,
|
||||
* kill the window.
|
||||
*/
|
||||
GSList *tmp;
|
||||
gboolean found;
|
||||
gboolean found = FALSE;
|
||||
GSList *windows;
|
||||
|
||||
if (xwindow == None)
|
||||
{
|
||||
@@ -153,39 +157,31 @@ search_and_destroy_window (int pid,
|
||||
return;
|
||||
}
|
||||
|
||||
found = FALSE;
|
||||
tmp = meta_displays_list ();
|
||||
windows = meta_display_list_windows (meta_get_display ());
|
||||
tmp = windows;
|
||||
|
||||
while (tmp != NULL)
|
||||
{
|
||||
GSList *windows = meta_display_list_windows (tmp->data);
|
||||
GSList *tmp2;
|
||||
MetaWindow *w = tmp->data;
|
||||
|
||||
tmp2 = windows;
|
||||
while (tmp2 != NULL)
|
||||
if (w->dialog_pid == pid)
|
||||
{
|
||||
MetaWindow *w = tmp2->data;
|
||||
|
||||
if (w->dialog_pid == pid)
|
||||
if (w->xwindow != xwindow)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Dialog pid matches but not xwindow (0x%lx vs. 0x%lx)\n",
|
||||
w->xwindow, xwindow);
|
||||
else
|
||||
{
|
||||
if (w->xwindow != xwindow)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Dialog pid matches but not xwindow (0x%lx vs. 0x%lx)\n",
|
||||
w->xwindow, xwindow);
|
||||
else
|
||||
{
|
||||
meta_window_kill (w);
|
||||
found = TRUE;
|
||||
}
|
||||
meta_window_kill (w);
|
||||
found = TRUE;
|
||||
}
|
||||
|
||||
tmp2 = tmp2->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
if (!found)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Did not find a window with dialog pid %d xwindow 0x%lx\n",
|
||||
@@ -199,40 +195,30 @@ release_window_with_fd (int fd)
|
||||
* double check that it matches "xwindow", then
|
||||
* kill the window.
|
||||
*/
|
||||
GSList *tmp;
|
||||
gboolean found;
|
||||
|
||||
found = FALSE;
|
||||
gboolean found = FALSE;
|
||||
|
||||
tmp = meta_displays_list ();
|
||||
GSList *windows = meta_display_list_windows (meta_get_display ());
|
||||
GSList *tmp = windows;
|
||||
|
||||
while (tmp != NULL)
|
||||
{
|
||||
GSList *windows = meta_display_list_windows (tmp->data);
|
||||
GSList *tmp2;
|
||||
MetaWindow *w = tmp->data;
|
||||
|
||||
tmp2 = windows;
|
||||
while (tmp2 != NULL)
|
||||
if (w->dialog_pid >= 0 &&
|
||||
w->dialog_pipe == fd)
|
||||
{
|
||||
MetaWindow *w = tmp2->data;
|
||||
|
||||
if (w->dialog_pid >= 0 &&
|
||||
w->dialog_pipe == fd)
|
||||
{
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Removing dialog with fd %d pid %d from window %s\n",
|
||||
fd, w->dialog_pid, w->desc);
|
||||
meta_window_free_delete_dialog (w);
|
||||
found = TRUE;
|
||||
}
|
||||
|
||||
tmp2 = tmp2->next;
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Removing dialog with fd %d pid %d from window %s\n",
|
||||
fd, w->dialog_pid, w->desc);
|
||||
meta_window_free_delete_dialog (w);
|
||||
found = TRUE;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
|
||||
if (!found)
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Did not find a window with a dialog pipe %d\n",
|
||||
@@ -251,7 +237,7 @@ io_from_ping_dialog (GIOChannel *channel,
|
||||
if (condition & G_IO_IN)
|
||||
{
|
||||
char *str;
|
||||
unsigned int len;
|
||||
gsize len;
|
||||
GError *err;
|
||||
|
||||
/* Go ahead and block for all data from child */
|
||||
@@ -270,8 +256,8 @@ io_from_ping_dialog (GIOChannel *channel,
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Read %d bytes strlen %d \"%s\" from child\n",
|
||||
len, str ? strlen (str) : 0, str ? str : "NULL");
|
||||
"Read %" G_GSIZE_FORMAT " bytes strlen %d \"%s\" from child\n",
|
||||
len, str ? (int) strlen (str) : 0, str ? str : "NULL");
|
||||
|
||||
if (len > 0)
|
||||
{
|
||||
@@ -306,6 +292,7 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
char numbuf[32];
|
||||
char timestampbuf[32];
|
||||
char *window_id_str;
|
||||
char *window_title;
|
||||
GIOChannel *channel;
|
||||
|
||||
meta_topic (META_DEBUG_PING,
|
||||
@@ -319,6 +306,7 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
}
|
||||
|
||||
window_id_str = g_strdup_printf ("0x%lx", window->xwindow);
|
||||
window_title = g_locale_from_utf8 (window->title, -1, NULL, NULL, NULL);
|
||||
|
||||
sprintf (numbuf, "%d", window->screen->number);
|
||||
sprintf (timestampbuf, "%u", timestamp);
|
||||
@@ -329,7 +317,7 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
argv[3] = "--timestamp";
|
||||
argv[4] = timestampbuf;
|
||||
argv[5] = "--kill-window-question";
|
||||
argv[6] = window->title;
|
||||
argv[6] = window_title;
|
||||
argv[7] = window_id_str;
|
||||
argv[8] = NULL;
|
||||
|
||||
@@ -362,6 +350,7 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
g_io_channel_unref (channel);
|
||||
|
||||
out:
|
||||
g_free (window_title);
|
||||
g_free (window_id_str);
|
||||
}
|
||||
|
||||
@@ -376,7 +365,7 @@ meta_window_delete (MetaWindow *window,
|
||||
"Deleting %s with delete_window request\n",
|
||||
window->desc);
|
||||
meta_window_send_icccm_message (window,
|
||||
window->display->atom_wm_delete_window,
|
||||
window->display->atom_WM_DELETE_WINDOW,
|
||||
timestamp);
|
||||
}
|
||||
else
|
@@ -24,8 +24,8 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_DISPLAY_H
|
||||
#define META_DISPLAY_H
|
||||
#ifndef META_DISPLAY_PRIVATE_H
|
||||
#define META_DISPLAY_PRIVATE_H
|
||||
|
||||
#ifndef PACKAGE
|
||||
#error "config.h not included"
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "eventqueue.h"
|
||||
#include "common.h"
|
||||
#include "boxes.h"
|
||||
#include "display.h"
|
||||
|
||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||
#include <libsn/sn.h>
|
||||
@@ -45,16 +46,9 @@
|
||||
#include <X11/extensions/sync.h>
|
||||
#endif
|
||||
|
||||
#define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0)
|
||||
|
||||
typedef struct MetaCompositor MetaCompositor;
|
||||
typedef struct _MetaDisplay MetaDisplay;
|
||||
typedef struct _MetaFrame MetaFrame;
|
||||
typedef struct _MetaKeyBinding MetaKeyBinding;
|
||||
typedef struct _MetaScreen MetaScreen;
|
||||
typedef struct _MetaStack MetaStack;
|
||||
typedef struct _MetaUISlave MetaUISlave;
|
||||
typedef struct _MetaWindow MetaWindow;
|
||||
typedef struct _MetaWorkspace MetaWorkspace;
|
||||
|
||||
typedef struct _MetaWindowPropHooks MetaWindowPropHooks;
|
||||
@@ -85,101 +79,14 @@ struct _MetaDisplay
|
||||
Display *xdisplay;
|
||||
|
||||
Window leader_window;
|
||||
Window timestamp_pinging_window;
|
||||
|
||||
Atom atom_net_wm_name;
|
||||
Atom atom_wm_protocols;
|
||||
Atom atom_wm_take_focus;
|
||||
Atom atom_wm_delete_window;
|
||||
Atom atom_wm_state;
|
||||
Atom atom_net_close_window;
|
||||
Atom atom_net_wm_state;
|
||||
Atom atom_motif_wm_hints;
|
||||
Atom atom_net_wm_state_shaded;
|
||||
Atom atom_net_wm_state_maximized_horz;
|
||||
Atom atom_net_wm_state_maximized_vert;
|
||||
Atom atom_net_wm_desktop;
|
||||
Atom atom_net_number_of_desktops;
|
||||
Atom atom_wm_change_state;
|
||||
Atom atom_sm_client_id;
|
||||
Atom atom_wm_client_leader;
|
||||
Atom atom_wm_window_role;
|
||||
Atom atom_net_current_desktop;
|
||||
Atom atom_net_supporting_wm_check;
|
||||
Atom atom_net_supported;
|
||||
Atom atom_net_wm_window_type;
|
||||
Atom atom_net_wm_window_type_desktop;
|
||||
Atom atom_net_wm_window_type_dock;
|
||||
Atom atom_net_wm_window_type_toolbar;
|
||||
Atom atom_net_wm_window_type_menu;
|
||||
Atom atom_net_wm_window_type_dialog;
|
||||
Atom atom_net_wm_window_type_normal;
|
||||
Atom atom_net_wm_state_modal;
|
||||
Atom atom_net_client_list;
|
||||
Atom atom_net_client_list_stacking;
|
||||
Atom atom_net_wm_state_skip_taskbar;
|
||||
Atom atom_net_wm_state_skip_pager;
|
||||
Atom atom_net_wm_icon_name;
|
||||
Atom atom_net_wm_icon;
|
||||
Atom atom_net_wm_icon_geometry;
|
||||
Atom atom_utf8_string;
|
||||
Atom atom_wm_icon_size;
|
||||
Atom atom_kwm_win_icon;
|
||||
Atom atom_net_wm_moveresize;
|
||||
Atom atom_net_active_window;
|
||||
Atom atom_metacity_restart_message;
|
||||
Atom atom_net_wm_strut;
|
||||
Atom atom_metacity_reload_theme_message;
|
||||
Atom atom_metacity_set_keybindings_message;
|
||||
Atom atom_net_wm_state_hidden;
|
||||
Atom atom_net_wm_window_type_utility;
|
||||
Atom atom_net_wm_window_type_splash;
|
||||
Atom atom_net_wm_ping;
|
||||
Atom atom_net_wm_pid;
|
||||
Atom atom_wm_client_machine;
|
||||
Atom atom_net_wm_state_fullscreen;
|
||||
Atom atom_net_workarea;
|
||||
Atom atom_net_showing_desktop;
|
||||
Atom atom_net_desktop_layout;
|
||||
Atom atom_manager;
|
||||
Atom atom_targets;
|
||||
Atom atom_multiple;
|
||||
Atom atom_timestamp;
|
||||
Atom atom_version;
|
||||
Atom atom_atom_pair;
|
||||
Atom atom_net_desktop_names;
|
||||
Atom atom_net_wm_allowed_actions;
|
||||
Atom atom_net_wm_action_move;
|
||||
Atom atom_net_wm_action_resize;
|
||||
Atom atom_net_wm_action_fullscreen;
|
||||
Atom atom_net_wm_action_minimize;
|
||||
Atom atom_net_wm_action_shade;
|
||||
Atom atom_net_wm_action_stick;
|
||||
Atom atom_net_wm_action_maximize_horz;
|
||||
Atom atom_net_wm_action_maximize_vert;
|
||||
Atom atom_net_wm_action_change_desktop;
|
||||
Atom atom_net_wm_action_close;
|
||||
Atom atom_net_wm_state_above;
|
||||
Atom atom_net_wm_state_below;
|
||||
Atom atom_net_startup_id;
|
||||
Atom atom_metacity_toggle_verbose;
|
||||
Atom atom_net_wm_sync_request;
|
||||
Atom atom_net_wm_sync_request_counter;
|
||||
Atom atom_gnome_panel_action;
|
||||
Atom atom_gnome_panel_action_main_menu;
|
||||
Atom atom_gnome_panel_action_run_dialog;
|
||||
Atom atom_metacity_sentinel;
|
||||
Atom atom_net_wm_strut_partial;
|
||||
Atom atom_net_frame_extents;
|
||||
Atom atom_net_request_frame_extents;
|
||||
Atom atom_net_wm_user_time;
|
||||
Atom atom_net_wm_state_demands_attention;
|
||||
Atom atom_net_restack_window;
|
||||
Atom atom_net_moveresize_window;
|
||||
Atom atom_net_desktop_geometry;
|
||||
Atom atom_net_desktop_viewport;
|
||||
Atom atom_metacity_version;
|
||||
Atom atom_net_wm_visible_name;
|
||||
Atom atom_net_wm_visible_icon_name;
|
||||
/* Pull in all the names of atoms as fields; we will intern them when the
|
||||
* class is constructed.
|
||||
*/
|
||||
#define item(x) Atom atom_##x;
|
||||
#include "atomnames.h"
|
||||
#undef item
|
||||
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
@@ -252,7 +159,6 @@ struct _MetaDisplay
|
||||
MetaScreen *grab_screen;
|
||||
MetaWindow *grab_window;
|
||||
Window grab_xwindow;
|
||||
gulong grab_start_serial;
|
||||
int grab_button;
|
||||
int grab_anchor_root_x;
|
||||
int grab_anchor_root_y;
|
||||
@@ -351,6 +257,16 @@ struct _MetaDisplay
|
||||
int render_event_base;
|
||||
int render_error_base;
|
||||
#endif
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
int composite_event_base;
|
||||
int composite_error_base;
|
||||
int composite_major_version;
|
||||
int composite_minor_version;
|
||||
int damage_event_base;
|
||||
int damage_error_base;
|
||||
int xfixes_event_base;
|
||||
int xfixes_error_base;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
unsigned int have_xsync : 1;
|
||||
#define META_DISPLAY_HAS_XSYNC(display) ((display)->have_xsync)
|
||||
@@ -369,6 +285,18 @@ struct _MetaDisplay
|
||||
#else
|
||||
#define META_DISPLAY_HAS_RENDER(display) FALSE
|
||||
#endif
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
unsigned int have_composite : 1;
|
||||
unsigned int have_damage : 1;
|
||||
unsigned int have_xfixes : 1;
|
||||
#define META_DISPLAY_HAS_COMPOSITE(display) ((display)->have_composite)
|
||||
#define META_DISPLAY_HAS_DAMAGE(display) ((display)->have_damage)
|
||||
#define META_DISPLAY_HAS_XFIXES(display) ((display)->have_xfixes)
|
||||
#else
|
||||
#define META_DISPLAY_HAS_COMPOSITE(display) FALSE
|
||||
#define META_DISPLAY_HAS_DAMAGE(display) FALSE
|
||||
#define META_DISPLAY_HAS_XFIXES(display) FALSE
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Xserver time can wraparound, thus comparing two timestamps needs to take
|
||||
@@ -396,8 +324,6 @@ struct _MetaDisplay
|
||||
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,
|
||||
Screen *screen);
|
||||
MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
|
||||
@@ -413,6 +339,10 @@ void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
/* Utility function to compare the stacking of two windows */
|
||||
int meta_display_stack_cmp (const void *a,
|
||||
const void *b);
|
||||
|
||||
/* A given MetaWindow may have various X windows that "belong"
|
||||
* to it, such as the frame window.
|
||||
*/
|
||||
@@ -430,7 +360,7 @@ gboolean meta_display_xwindow_is_a_no_focus_window (MetaDisplay *display,
|
||||
GSList* meta_display_list_windows (MetaDisplay *display);
|
||||
|
||||
MetaDisplay* meta_display_for_x_display (Display *xdisplay);
|
||||
GSList* meta_displays_list (void);
|
||||
MetaDisplay* meta_get_display (void);
|
||||
|
||||
Cursor meta_display_create_x_cursor (MetaDisplay *display,
|
||||
MetaCursor cursor);
|
||||
@@ -448,7 +378,6 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
gboolean frame_action,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
guint32 timestamp,
|
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,10 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "edge-resistance.h"
|
||||
#include "boxes.h"
|
||||
#include "display.h"
|
||||
#include "display-private.h"
|
||||
#include "workspace.h"
|
||||
|
||||
/* A simple macro for whether a given window's edges are potentially
|
||||
@@ -62,6 +63,9 @@ struct MetaEdgeResistanceData
|
||||
ResistanceDataForAnEdge bottom_data;
|
||||
};
|
||||
|
||||
/* !WARNING!: this function can return invalid indices (namely, either -1 or
|
||||
* edges->len); this is by design, but you need to remember this.
|
||||
*/
|
||||
static int
|
||||
find_index_of_edge_near_position (const GArray *edges,
|
||||
int position,
|
||||
@@ -300,9 +304,9 @@ movement_towards_edge (MetaDirection side, int increment)
|
||||
case META_DIRECTION_RIGHT:
|
||||
case META_DIRECTION_BOTTOM:
|
||||
return increment > 0;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -330,6 +334,7 @@ apply_edge_resistance (MetaWindow *window,
|
||||
gboolean keyboard_op)
|
||||
{
|
||||
int i, begin, end;
|
||||
int last_edge;
|
||||
gboolean increasing = new_pos > old_pos;
|
||||
int increment = increasing ? 1 : -1;
|
||||
|
||||
@@ -366,6 +371,13 @@ apply_edge_resistance (MetaWindow *window,
|
||||
begin = find_index_of_edge_near_position (edges, old_pos, increasing, xdir);
|
||||
end = find_index_of_edge_near_position (edges, new_pos, !increasing, xdir);
|
||||
|
||||
/* begin and end can be outside the array index, if the window is partially
|
||||
* off the screen
|
||||
*/
|
||||
last_edge = edges->len - 1;
|
||||
begin = CLAMP (begin, 0, last_edge);
|
||||
end = CLAMP (end, 0, last_edge);
|
||||
|
||||
/* Loop over all these edges we're moving past/to. */
|
||||
i = begin;
|
||||
while ((increasing && i <= end) ||
|
||||
@@ -1080,6 +1092,7 @@ meta_display_compute_resistance_and_snapping_edges (MetaDisplay *display)
|
||||
/*
|
||||
* 4th: Free the extra memory not needed and sort the list
|
||||
*/
|
||||
g_list_free (stacked_windows);
|
||||
/* Free the memory used by the obscuring windows/docks lists */
|
||||
g_slist_free (window_stacking);
|
||||
/* FIXME: Shouldn't there be a helper function to make this one line of code
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user