Compare commits
599 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
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 | ||
![]() |
419884a0cb | ||
![]() |
1b941ff508 | ||
![]() |
5d9ccfac37 | ||
![]() |
031b03513a | ||
![]() |
50c5bf4bf6 | ||
![]() |
c4a135aeee | ||
![]() |
d97395ae52 | ||
![]() |
d6be56358e | ||
![]() |
4becc1e631 | ||
![]() |
1b9faba6c5 | ||
![]() |
d20d537113 | ||
![]() |
28b48248a2 | ||
![]() |
f665d54373 | ||
![]() |
5ca9f43752 | ||
![]() |
5eabc7c781 | ||
![]() |
0180c10092 | ||
![]() |
5080b8fefb | ||
![]() |
34138ff44e | ||
![]() |
a2d21149e4 | ||
![]() |
db4fa5c5fb | ||
![]() |
ff88d79062 | ||
![]() |
15c7e2aed9 | ||
![]() |
09a48beaec | ||
![]() |
ea137d35f3 | ||
![]() |
54b0105ffa | ||
![]() |
01a282fdd3 | ||
![]() |
9d6d1c5fb6 | ||
![]() |
fd4378d84f | ||
![]() |
ceb54162b3 | ||
![]() |
390ded3054 | ||
![]() |
caf43a123f | ||
![]() |
106391a431 | ||
![]() |
595465ad22 | ||
![]() |
0b3391a25c | ||
![]() |
fcdd0fbd50 | ||
![]() |
9b701f520a | ||
![]() |
a3e309bab8 | ||
![]() |
c065a5df5d | ||
![]() |
01030ac0df | ||
![]() |
3e55c138f1 | ||
![]() |
81256ebe48 | ||
![]() |
8722c60a28 | ||
![]() |
8f09a12069 | ||
![]() |
c68c26b7f8 | ||
![]() |
d419955ddc | ||
![]() |
af593aa5c5 | ||
![]() |
191baa3c76 | ||
![]() |
c8c666f855 | ||
![]() |
edea47d113 | ||
![]() |
b164d11b90 | ||
![]() |
0cc7e939ab | ||
![]() |
2276f91162 | ||
![]() |
63ea328ea8 | ||
![]() |
fe34523949 | ||
![]() |
d79a571d0a | ||
![]() |
a34944d341 | ||
![]() |
b569dddc17 | ||
![]() |
5d33a1bbb8 | ||
![]() |
9da34955f7 | ||
![]() |
536bb240ef | ||
![]() |
ef1c6e9214 | ||
![]() |
90359a5346 | ||
![]() |
9e341dd4d8 | ||
![]() |
2168cd3eb7 | ||
![]() |
25910508ae | ||
![]() |
c4fa0d118c | ||
![]() |
ca3ed6a1eb | ||
![]() |
0201fcfc6c | ||
![]() |
07e4cacf14 | ||
![]() |
79eb53bd53 | ||
![]() |
b694312f1c | ||
![]() |
3cca3f3ee9 | ||
![]() |
b01408f358 | ||
![]() |
4fc6a7ce65 | ||
![]() |
e657ef87ab | ||
![]() |
3bc5cc1ce7 | ||
![]() |
49971fc1ef | ||
![]() |
569ff8a34c | ||
![]() |
2d73af1530 | ||
![]() |
470dc30174 | ||
![]() |
7dd25001ce | ||
![]() |
9b0ba2f274 | ||
![]() |
8938ea3fa1 | ||
![]() |
df93236627 | ||
![]() |
5c587726ae | ||
![]() |
87100b64d9 | ||
![]() |
def5a12ff0 | ||
![]() |
31f0853ca8 | ||
![]() |
fb41e2bc8d | ||
![]() |
aa077d95c0 | ||
![]() |
b004ef4e15 | ||
![]() |
7c58ecb657 | ||
![]() |
8144a962e7 | ||
![]() |
8c3bce3f98 | ||
![]() |
3b0478776d | ||
![]() |
c53538b1c2 | ||
![]() |
2ba196b310 | ||
![]() |
4beb9df364 | ||
![]() |
6fb90bc723 | ||
![]() |
dd86330ff8 | ||
![]() |
f9772ac685 | ||
![]() |
312454150b | ||
![]() |
3fac671fc8 | ||
![]() |
dc5dff7e9a | ||
![]() |
199e2b6988 | ||
![]() |
d3f1996655 | ||
![]() |
277236f730 | ||
![]() |
0d06471910 | ||
![]() |
4de104f9cf | ||
![]() |
189c8b9b11 | ||
![]() |
555d7dc90c | ||
![]() |
2ab4a35c53 | ||
![]() |
b62aba4401 | ||
![]() |
3800dac492 | ||
![]() |
bba4df7187 | ||
![]() |
c808195eef | ||
![]() |
cb595266fd | ||
![]() |
3ba437d508 | ||
![]() |
28ae1b40df | ||
![]() |
b2352cf9e2 | ||
![]() |
3d62fedfa2 | ||
![]() |
6c6d871abc | ||
![]() |
39b7e2ed79 | ||
![]() |
dc856f0fdb | ||
![]() |
39cb0ee987 | ||
![]() |
78634dd4b8 | ||
![]() |
7c8f91a3a9 | ||
![]() |
e199b946ee | ||
![]() |
6b8a3a1af5 | ||
![]() |
445e982894 | ||
![]() |
d80721697d | ||
![]() |
d818e18d81 | ||
![]() |
f89973dbfc | ||
![]() |
c35fbb3f5f | ||
![]() |
d9b4fdd845 | ||
![]() |
0484ecd355 | ||
![]() |
277af5e783 | ||
![]() |
3274df7df1 | ||
![]() |
7a68a53322 | ||
![]() |
c7c4efa1c1 | ||
![]() |
e38609f4a2 | ||
![]() |
9d320ba435 | ||
![]() |
18107f5f36 | ||
![]() |
88b9efd0b7 | ||
![]() |
b42e848986 | ||
![]() |
7489dbc34e | ||
![]() |
4c96afba71 | ||
![]() |
7ea55a1e54 | ||
![]() |
77a207c9cc | ||
![]() |
1bea8254ba | ||
![]() |
1f5130dc93 | ||
![]() |
1d92dcdadd | ||
![]() |
e7b08814ec | ||
![]() |
69e245b237 | ||
![]() |
9ad9fd4290 | ||
![]() |
c47e425527 | ||
![]() |
9051b70d40 | ||
![]() |
43b5985c20 | ||
![]() |
0ec2133e81 | ||
![]() |
9fe845581b | ||
![]() |
fc23f9b22f | ||
![]() |
cbd0312605 | ||
![]() |
57bedc42a4 | ||
![]() |
acc6c97997 | ||
![]() |
dcef402d68 | ||
![]() |
d4973e8d1b | ||
![]() |
1dd78e38ff | ||
![]() |
adc46fc970 | ||
![]() |
3917d818f5 | ||
![]() |
cc5def1021 | ||
![]() |
77a331a1e3 | ||
![]() |
c12dc9de3c | ||
![]() |
ab7f789cb0 | ||
![]() |
ae86fcd5b2 | ||
![]() |
74d4768b8e | ||
![]() |
fe74d5da13 | ||
![]() |
1fec6583ff | ||
![]() |
bf6da74e6a | ||
![]() |
e8fb842aad | ||
![]() |
76e4fd8a07 | ||
![]() |
3cca3381ba | ||
![]() |
7d8087f3e8 | ||
![]() |
419e063a24 | ||
![]() |
05323ef21a | ||
![]() |
6e4d6da191 | ||
![]() |
9c75b95146 | ||
![]() |
edfaf1a6bc | ||
![]() |
1538ffa04c | ||
![]() |
3d661f9bc7 | ||
![]() |
34662a6a3a | ||
![]() |
92dff14d55 | ||
![]() |
61e1bb57e7 | ||
![]() |
5e85bf7210 | ||
![]() |
85f9c499fb | ||
![]() |
42dd771506 | ||
![]() |
8afa1da3a7 | ||
![]() |
f0c5312b6e | ||
![]() |
af8e3c0d93 | ||
![]() |
69f1a9d3bd | ||
![]() |
b126f61eed | ||
![]() |
b1ba1cbad0 | ||
![]() |
a58ea99379 | ||
![]() |
cb38ccc57f | ||
![]() |
41ae99000b | ||
![]() |
0f05948c95 | ||
![]() |
5744f08056 | ||
![]() |
6681725dcd | ||
![]() |
a99a2ab14c | ||
![]() |
616bffdeef | ||
![]() |
a067105a14 |
@@ -29,3 +29,7 @@ COPYING
|
||||
intltool-*
|
||||
metacity.spec
|
||||
autom4te.cache
|
||||
compile
|
||||
depcomp
|
||||
omf.make
|
||||
xmldocs.make
|
||||
|
26
HACKING
26
HACKING
@@ -39,20 +39,20 @@ Minimal Building/Testing Environment
|
||||
You do not need to _install_ a development version of Metacity to
|
||||
build, run and test it; you can run it from some temporary
|
||||
directory. Also, you do not need to build all of Gnome in order to
|
||||
build a development version of Metacity -- odds are, you can build
|
||||
metacity from CVS without building any other modules.
|
||||
build a development version of Metacity -- odds are, you may be able
|
||||
to build metacity from CVS without building any other modules.
|
||||
|
||||
As long as you have gtk+ >= 2.6 with your distro, you should be able
|
||||
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
|
||||
@@ -182,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
|
||||
|
46
MAINTAINERS
46
MAINTAINERS
@@ -1,11 +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
|
||||
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
|
||||
|
607
NEWS
607
NEWS
@@ -1,3 +1,610 @@
|
||||
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. (Bruno) [#382962]
|
||||
- unmaximise button keeps pressed appearance when moved off and
|
||||
back. (Alex) [#395560]
|
||||
- fix a couple of compositor crashes (Thomas) [#387761]
|
||||
- new environment variables checked if the compositor is enabled;
|
||||
see the new file doc/compositor-control.txt for details. (Thomas)
|
||||
|
||||
Translations
|
||||
Djihed Afifi (ar), Ales Nyakhaychyk (be), Jordi Mallach (ca),
|
||||
Jakub Friedl (cs), David Lodge (en_GB), Raivis Dejus (lv),
|
||||
Kjartan Maraas (nb), Mugurel Tudor (ro), Daniel Nylander (sv),
|
||||
Theppitak Karoonboonyanan (th)
|
||||
|
||||
2.17.3
|
||||
======
|
||||
|
||||
Thanks to Christof Krüger, Federico Mena Quintero, Bruno Boaventura,
|
||||
and Björn Lindqvist for improvements in this release.
|
||||
|
||||
- fix longstanding problem about windows flickering in and out of
|
||||
maximised state when dragging between xineramas (Christof) [#358715]
|
||||
- grab server when switching workspaces (Federico) [#381127]
|
||||
- replace changing text on window menu with pairs of radio buttons
|
||||
and checkboxes (Bruno, Björn) [#343108]
|
||||
|
||||
Translations
|
||||
Kjartan Maraas (nb), Jakub Friedl (cs), Yuval Tanny (he), Ivar Smolin (et),
|
||||
Duarte Loreto (pt), Francisco Javier F. Serrador (es)
|
||||
|
||||
2.17.2
|
||||
======
|
||||
|
||||
Thanks to Priit Laes, Bruno Boaventura, Kjartan Maraas, Justin Mason,
|
||||
Elijah Newren and Dan Mick for improvements in this release.
|
||||
|
||||
- implement handle_move_to_{side|corner}_* to allow the user to flip a
|
||||
window to the side or corner of the screen. (Justin) [#317884]
|
||||
- fix strict focus mode by picking up on res_class (Dan) [#361054]
|
||||
- remove deprecated gtk stuff (Priit, Bruno)
|
||||
- string fixes (Kjartan) [#363354, #363355]
|
||||
|
||||
Translations
|
||||
Jakub Friedl (cs), Francisco Javier F. Serrador (es), Ilkka Tuohela (fi),
|
||||
Christophe Merlet (RedFox) (fr), Kjartan Maraas (nb)
|
||||
|
||||
2.17.1
|
||||
======
|
||||
|
||||
Thanks to Bruno Boaventura and Carlo Wood for improvements in this
|
||||
release.
|
||||
|
||||
- sync metacity workspace previous with libwnck (Bruno) [#341893]
|
||||
- fix cases when titlebar is allowed offscreen and shouldn't be, and
|
||||
vice-versa (Carlo) [#333995]
|
||||
|
||||
Translations
|
||||
Ilkka Tuohela (fi)
|
||||
|
||||
2.17.0
|
||||
======
|
||||
|
||||
Thanks to Elijah Newren, Jens Granseuer, Bruno Boaventura, Carlo Wood,
|
||||
and Thomas Thurman for changes in this release.
|
||||
|
||||
- version 2 of theme format: stick, shade and above buttons on titlebar,
|
||||
variable rounding on corners, variable transparency on window
|
||||
backgrounds, stock icons in themes, can remove all titlebar buttons
|
||||
from certain classes of window, and more (Thomas) [#102547 and
|
||||
dependencies]
|
||||
- improve "Force Quit" dialog (Bruno) [#121936]
|
||||
- ignore edge resistance when resizing with keyboard (Elijah) [#346782]
|
||||
- maintain window size and placement across restarts (Carlo) [#358042]
|
||||
- prevent crash when closing certain remote apps (Elijah) [#358514]
|
||||
- longstanding mouse-focus bug fixed which affected firefox's
|
||||
autocompletion (Elijah) [#357695]
|
||||
- ignore maximum size constraints when maximising (Elijah) [#327543]
|
||||
- warn translators to keep translations in sync with libwnck (Bruno)
|
||||
[#355620]
|
||||
- fixes for compilation warnings, etc (Elijah, Jens) [#348067, #356631]
|
||||
|
||||
Translators
|
||||
Ivar Smolin (et), Gabor Kelemen (hu), Luca Ferretti (it),
|
||||
Runa Bhattacharjee (bn_IN)
|
||||
|
||||
2.16.2
|
||||
======
|
||||
|
||||
Thanks to Eljah Newren, Maik Beckmann, Christian Hamar, Thomas Andersen,
|
||||
and Bruno Boaventura de Oliveira for changes in this release.
|
||||
|
||||
- partial audit to fix timestamp usage (Elijah) [part of #355180]
|
||||
- remove compilation warnings (Maik) [#355876]; (Bruno) [#355490,
|
||||
#355489]
|
||||
- automatic detection of stable/unstable in configure script
|
||||
(Christian/Elijah) [#356122]
|
||||
- make windows be stacked correctly before showing them (Thomas)
|
||||
[#332385]
|
||||
- use guint32 for timestamps (Elijah) [#348305]
|
||||
|
||||
Translators
|
||||
Wouter Bolsterlee (nl), Matic Žgur (sl), Francisco Javier F. Serrador (es),
|
||||
Vladimir Petkov (bg), Jordi Mallach (ca), Ilkka Tuohela (fi),
|
||||
Rajesh Ranjan (hi), Woodman Tuen (zh_HK, zh_TW), Ani Peter (ml),
|
||||
Felix (ta), Ankit Patel (gu), Mohammad DAMT (id)
|
||||
|
||||
2.16.1
|
||||
======
|
||||
|
||||
Thanks to Elijah Newren, Colin Watson, and Bruno Boaventura de Oliveira
|
||||
Lacerda for changes in this release.
|
||||
|
||||
- fix stuck grab, letting focus be transferred between windows (Elijah)
|
||||
[#354422 partial]
|
||||
- windows returning from fullscreen are constrained to be onscreen
|
||||
(Elijah) [#353699]
|
||||
- Clear the transient_for flag of a window after emitting a warning
|
||||
(Colin)
|
||||
- Replace copy_of_gdk_x11_window_set_user_time() with the real thing
|
||||
(Bruno) [#352293]
|
||||
|
||||
Translators
|
||||
David Lodge (en_GB), Ivar Smolin (et), Matic Žgur (sl),
|
||||
Vasiliy Faronov (ru)
|
||||
|
||||
2.16.0
|
||||
==
|
||||
|
||||
Thanks to Jens Granseuer for changes in this release.
|
||||
|
||||
- Fix the build with c89/gcc 2.95.
|
||||
|
||||
Translators
|
||||
Rahul Bhalerao (mr), Runa Bhattacharjee (bn_IN), Woodman Tuen
|
||||
(zh_HK, zh_TW), Kostas Papadimas (el), Ani Peter (ml),
|
||||
Jonathan Ernst (fr), Горан Ракић (sr, Gabor Kelemen (hu),
|
||||
Maxim Dziumanenko (uk), Duarte Loreto (pt), Jordi Mallach (ca),
|
||||
Gintautas Miliauskas (lt)
|
||||
|
||||
2.15.34
|
||||
==
|
||||
|
||||
Thanks to Stéphane Rosi, Vytautus Liuolia, Will Walker, Baptiste
|
||||
Mille-Mathias, Elijah Newren, Ed Catmur, and Thomas Andersen for fixes
|
||||
in this release.
|
||||
|
||||
- allow moving maximized windows between xineramas again (Stéphane)
|
||||
[#338660]
|
||||
- fix an uninitialized-usage bug with net_wm_user_time that breaks
|
||||
focus with new windows (Vytautus)
|
||||
- re-fix accessibility events for the alt-tab popup (Will) [#350624]
|
||||
- update the close pixmap to fit better with the other pixmaps of the
|
||||
menu (Baptiste) [#345498]
|
||||
- fix several fullscreen handling bugs I introduced, causing
|
||||
fullscreen windows to not actually be shown fullscreen (Elijah)
|
||||
[#343115]
|
||||
- fix keybindings with hex-values, coming from special extended
|
||||
keyboard keys (Ed) [#140448]
|
||||
- fix metacity-dialog handling of arguments (Thomas) [#340690]
|
||||
|
||||
Translators
|
||||
Vladimir Petkov (bg), Jordi Mallach (ca), Gabor Kelemen (hu),
|
||||
Mohammad DAMT (id), Wouter Bolsterlee (nl), Daniel Nylander (sv),
|
||||
Funda Wang (zh_CN)
|
||||
|
||||
2.15.21
|
||||
==
|
||||
|
||||
Thanks to Vincent Untz, Jens Granseuer, Björn Lindqvist, Dmitry
|
||||
Timoshkov, Thomas Thurman, Vytautas Liuolia, Thomas Andersen, Chris
|
||||
Ball, and Elijah Newren for fixes in this release.
|
||||
|
||||
- kill usage of libegg (Vincent) [#348633]
|
||||
- fix another C89 vs. C99 issue (Jens) [#347621]
|
||||
- make it so maximized windows do not have rounded corners (Björn)
|
||||
[#336850]
|
||||
- fix the heuristic for determining if windows can be made
|
||||
fullscreen, needed for WINE and possible also some legacy
|
||||
applications (Dmitry) [#346927]
|
||||
- make sure window features get recalculated when the screen is
|
||||
resized via XRandR (Dmitry) [#346927]
|
||||
- fitts' law fixes for titlebar buttons on maximized windows (Thomas
|
||||
Thurman) [#97703]
|
||||
- react to _NET_STARTUP_ID changes, as proposed for the new
|
||||
startup-notification/EWMH spec (Vytautas) [#347515]
|
||||
- return the window to maximized state if the window was "shaken
|
||||
loose" from maximized state during a resize but the resize is later
|
||||
aborted (Thomas Andersen) [#346719]
|
||||
- fix button lighting with dragged clicks (Björn) [#321474]
|
||||
- don't minimize in response to double clicks on the titlebar when
|
||||
minimiziation should not be allowed (Chris) [#347377]
|
||||
- fix some titlebar-not-on-screen constraint issues (Elijah)
|
||||
[#333328, #345522]
|
||||
|
||||
Translators
|
||||
Mahay Alam Khan (bn_IN), Jakub Friedl (cs), Iñaki Larrañaga
|
||||
Murgoitio (eu), Yuval Tanny (he), Rajesh Ranjan (hi), Jovan
|
||||
Naumovski (mk) Kjartan Maraas (nb), Leonid Kanter (ru)
|
||||
|
||||
2.15.13
|
||||
==
|
||||
|
||||
Thanks to Björn Lindqvist and Thomas Thurman for improvements in this
|
||||
release.
|
||||
|
||||
- grab alt+shift+button1 when trying to snap-move windows (Björn)
|
||||
- avoid a case where memory is written after it's freed (Thomas)
|
||||
|
||||
Translators
|
||||
Hendrik Richter (de), Kostas Papadimas (el), Jonathan Ernst (fr),
|
||||
Satoru SATOH (ja)
|
||||
|
||||
2.15.8
|
||||
==
|
||||
|
||||
Known as the "Elijah sucks for not reviewing a couple dozen patches"
|
||||
release. And for not getting on IRC soon enough to catch Marnanel and
|
||||
show him how to do the release. So, just translations this time.
|
||||
|
||||
Translations
|
||||
|
||||
Mahay Alam Khan (bn_IN), Rhys Jones (cy), Francisco Javier
|
||||
F. Serrador (es), Ilkka Tuohela (fi), Rajesh Ranjan (hi), Changwoo
|
||||
Ryu (ko), Fano Rajaonarisoa (mg), Sanlig Badral (mn), Слободан Д.
|
||||
Средојевић (sr), Funda Wang (zh_CN)
|
||||
|
||||
2.15.5
|
||||
==
|
||||
|
||||
|
7
README
7
README
@@ -6,10 +6,11 @@ on UNIX keyboards.
|
||||
The first release of Metacity was version 2.3. Metacity has no need for
|
||||
your petty hangups about version numbers.
|
||||
|
||||
The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-, 2.10.x,
|
||||
2.12.x, 2.14.x.
|
||||
The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-,
|
||||
2.10.x, 2.12.x, 2.14.x, 2.16.x.
|
||||
|
||||
Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x, 2.15.x
|
||||
Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x,
|
||||
2.15.x, 2.17.x.
|
||||
|
||||
COMPILING METACITY
|
||||
===
|
||||
|
@@ -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) || {
|
||||
|
52
configure.in
52
configure.in
@@ -1,11 +1,17 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([metacity_major_version], [2])
|
||||
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
|
||||
AC_INIT([metacity], [2.15.5],
|
||||
m4_define([metacity_micro_version], [1])
|
||||
|
||||
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
|
||||
@@ -18,7 +24,7 @@ GETTEXT_PACKAGE=metacity
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])
|
||||
|
||||
IT_PROG_INTLTOOL([0.35.0])
|
||||
IT_PROG_INTLTOOL([0.34.90])
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AC_HEADER_STDC
|
||||
@@ -101,7 +107,7 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0'
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.10.0 pango >= 1.2.0'
|
||||
|
||||
AC_ARG_ENABLE(gconf,
|
||||
AC_HELP_STRING([--disable-gconf],
|
||||
@@ -114,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)
|
||||
|
||||
@@ -170,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
|
||||
@@ -213,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
|
||||
@@ -416,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
|
||||
@@ -449,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
|
||||
@@ -467,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
|
||||
@@ -516,5 +526,13 @@ metacity-$VERSION:
|
||||
Render: ${have_xrender}
|
||||
Xcursor: ${have_xcursor}
|
||||
"
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo "Use 2.14.x for stable (gnome-2-14 branch in CVS)"
|
||||
|
||||
METACITY_MINOR_VERSION=metacity_minor_version
|
||||
if test $(( $(echo $METACITY_MINOR_VERSION) %2)) == "1"; then
|
||||
stable_version=$(( ($METACITY_MINOR_VERSION / 2) * 2))
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo -n "Use 2.$stable_version.x for stable "
|
||||
echo "(gnome-2-$stable_version branch in Subversion)"
|
||||
else
|
||||
echo "This is the stable branch of metacity"
|
||||
fi
|
||||
|
46
doc/compositor-control.txt
Normal file
46
doc/compositor-control.txt
Normal file
@@ -0,0 +1,46 @@
|
||||
The compositor is the box of tricks inside the window manager which performs
|
||||
special effects on the windows on your screen. Metacity's compositor is
|
||||
under development. Your help is requested in finding and fixing bugs. This
|
||||
document tells you how to configure Metacity so that you can use compositing.
|
||||
|
||||
To turn the compositor on initially, you need to pass --enable-compositor to
|
||||
the configure script. This will introduce a dependence on libcm, which you
|
||||
can get from <URL:http://ftp.gnome.org/pub/GNOME/sources/libcm/>.
|
||||
|
||||
When Metacity is compiled, you will need to turn the compositor on in gconf
|
||||
for it to have any effect. You will find the boolean switch at
|
||||
|
||||
/apps/metacity/general/compositing_manager
|
||||
|
||||
When that's done, you can set some environment variables before you launch
|
||||
Metacity to influence how the compositor works. These will eventually become
|
||||
configuration options or gconf options when they grow up. Define them to any
|
||||
value to turn them on; leave them undefined to turn them off. Currently the
|
||||
options you can set are:
|
||||
|
||||
LIBCM_DIRECT
|
||||
|
||||
If this is set, the compositor will bypass the X server and do all its
|
||||
work directly with the hardware. I know of no reason you would want to
|
||||
do so, but perhaps you do.
|
||||
|
||||
LIBCM_TFP
|
||||
|
||||
If this is set ("tfp mode"), the compositor will feel free to use the
|
||||
texture_from_pixmap extension; if this is not set ("non-tfp mode"), the
|
||||
compositor will use a workaround. Many drivers require non-tfp mode in
|
||||
order to work, and will paint all windows clear blue or clear white
|
||||
without it. Thanks to Travis Watkins for suggesting this switch; he
|
||||
cautions that some games or video players may require tfp mode.
|
||||
|
||||
METACITY_BLING
|
||||
|
||||
This turns on several pretty but non-essential animations (dialogues
|
||||
fracturing and exploding, minimisations doing a shrinkydink effect,
|
||||
and so on). If it is not set, the standard non-GL animations are
|
||||
retained. This affects only window event animations; it doesn't change
|
||||
menus zooming, dialogues being semi-transparent, and so on. Try it
|
||||
and see whether you like it.
|
||||
|
||||
If you have any problems, ask on metacity-devel-list@gnome.org, or
|
||||
#gnome-hackers on gimpnet, or come and find me (tthurman at gnome) and ask.
|
@@ -9,7 +9,8 @@ basics are easy:
|
||||
Focus method Behavior
|
||||
click When a user clicks on a window, focus it
|
||||
sloppy When an EnterNotify is received, focus the window
|
||||
mouse Same as sloppy, but also defocus on LeaveNotify
|
||||
mouse Same as sloppy, but also defocus when mouse enters DESKTOP
|
||||
window
|
||||
|
||||
Note that these choices (along with the choice that clicking on a
|
||||
window raises it for the click focus method) introduces the following
|
||||
@@ -20,8 +21,8 @@ Focus method Invariant
|
||||
sloppy If the mouse is in a window, then it is focused; if the
|
||||
mouse is not in a window, then the most recently used
|
||||
window is focused.
|
||||
mouse If the mouse is in a window, then it is focused; otherwise,
|
||||
the designated "no_focus_window" is focused
|
||||
mouse If the mouse is in a non-DESKTOP window, then it is focused;
|
||||
otherwise, the designated "no_focus_window" is focused
|
||||
|
||||
However, there are a number of cases where the current focus window
|
||||
becomes invalid and another should be chosen. Some examples are when
|
||||
@@ -34,8 +35,9 @@ Focus method Behavior
|
||||
on top)
|
||||
sloppy Focus the window containing the pointer if there is such
|
||||
a window, otherwise focus the most recently used window.
|
||||
mouse Focus the window containing the pointer if there is one,
|
||||
otherwise focus the designated "no_focus_window".
|
||||
mouse Focus the non-DESKTOP window containing the pointer if
|
||||
there is one, otherwise focus the designated
|
||||
"no_focus_window".
|
||||
|
||||
Note that "most recently used window", as used here, has a slightly
|
||||
different connotation than "most recent to have keyboard focus". This
|
||||
@@ -62,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:
|
||||
@@ -84,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.
|
||||
@@ -123,6 +125,7 @@ To read more about the bugs that inspired these choices:
|
||||
- Mousenav vs. Keynav in mouse and sloppy focus modes
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=167545
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=101190
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=357695
|
||||
- Not focusing panels
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=160470
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=120100
|
||||
|
@@ -1,6 +1,91 @@
|
||||
Docs on the theme format
|
||||
Themes are in a simple XML-subset format. There are multiple versions
|
||||
of the theme format, and a given theme can support more than one format.
|
||||
|
||||
Themes are in a simple XML-subset format.
|
||||
Version 1: THEMEDIR/metacity-1/metacity-theme-1.xml
|
||||
(original metacity format)
|
||||
Version 2: THEMEDIR/metacity-1/metacity-theme-2.xml
|
||||
|
||||
The subdirectory name is "metacity-1" in all versions.
|
||||
|
||||
As you might expect, older versions of metacity will not understand
|
||||
newer theme formats. However, newer versions will use old themes.
|
||||
Metacity will always use the newest theme format it understands that
|
||||
the X server supports. Some format versions are only supported if you
|
||||
have the right X server features.
|
||||
|
||||
Each format *requires* the corresponding filename. If you put version
|
||||
2 format features in the metacity-1/metacity-theme-1.xml file, then
|
||||
metacity will get angry.
|
||||
|
||||
This document has separate sections for each format version. You may
|
||||
want to read the document in reverse order, since the base features
|
||||
are discussed under version 1.
|
||||
|
||||
New Features in Theme Format Version 2
|
||||
======================================
|
||||
|
||||
The optional attributes rounded_top_left, rounded_top_right,
|
||||
rounded_bottom_left and rounded_bottom_right on <frame_geometry>
|
||||
should now be the radius of the corner in pixels. You may still use
|
||||
the values "false" for 0 and "true" for 5, which means v1 values will
|
||||
still work just fine.
|
||||
|
||||
<frame_geometry> has a new optional attribute, hide_buttons. If this
|
||||
is true, no buttons will be displayed on the titlebar.
|
||||
|
||||
Anywhere you can use a positive integer, you can use an integer constant.
|
||||
|
||||
As well as constant integers and reals, you may define constant colours,
|
||||
thus:
|
||||
<constant name="RevoltingPink" value="#FF00FF"/>
|
||||
<constant name="Background" value="gtk:bg[NORMAL]"/>
|
||||
|
||||
<frame_style> has two new optional attributes, background and alpha.
|
||||
If you specify alpha, you must specify background. background is a
|
||||
colour used for the background of the frame. alpha is the transparency
|
||||
as a real between 0.0 and 1.0. If the current X server does not support
|
||||
alpha channels, the value is ignored.
|
||||
|
||||
The filename attribute of <image> may begin with "theme:". If so, the
|
||||
rest of the string is the name of a theme icon. The 64x64 version of the
|
||||
icon is used, except for fallback mini_icons, which use the 16x16 version.
|
||||
This does not affect ordinary resizing. For example:
|
||||
<button function="close" state="normal">
|
||||
<draw_ops>
|
||||
<include name="active_button"/>
|
||||
<image filename="theme:gnome-logout" x="2" y="2"
|
||||
width="width-4" height="height-4"/>
|
||||
<!-- Note: not "theme:gnome-logout.png" or similar. -->
|
||||
</draw_ops>
|
||||
</button>
|
||||
|
||||
<menu_icon>s are parsed but ignored.
|
||||
|
||||
Fallback icons can be specified using <fallback>. There are two
|
||||
optional arguments, icon and mini_icon. The values of these arguments
|
||||
are identical to that of the filename attribute of <image>. Fallback
|
||||
icons are used when a window does not supply its own icon. If a fallback
|
||||
icon is not specified with <fallback>, Metacity will use a built-in
|
||||
icon, as in metacity-theme-1.
|
||||
|
||||
The <arc> element, as well as the original start_angle and end_angle
|
||||
attributes, may be given from and to attributes. The values of these
|
||||
attributes are given in degrees clockwise, with 0 being straight up.
|
||||
For example:
|
||||
<arc from="0.0" to="90.0" filled="true" color="#FF00FF"
|
||||
x="0" y="5" width="15" height="15"/>
|
||||
|
||||
<frame state="shaded"> may now take an optional resize attribute, with
|
||||
the same interpretation as the resize attribute on <frame state="normal">.
|
||||
If this attribute is omitted for state="shaded", it defaults to "both".
|
||||
(If it is omitted for state="normal", it remains an error.)
|
||||
|
||||
In addition to the four <button> functions which are required in
|
||||
metacity-theme-1, there are six new functions in metacity-theme-2:
|
||||
shade, unshade, above, unabove, stick and unstick.
|
||||
|
||||
Overview of Theme Format Version 1
|
||||
==================================
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<metacity_theme>
|
||||
|
@@ -9,3 +9,4 @@ cat-id-tbl.c
|
||||
messages
|
||||
missing
|
||||
stamp-cat-id
|
||||
stamp-it
|
||||
|
1264
po/ChangeLog
1264
po/ChangeLog
File diff suppressed because it is too large
Load Diff
12
po/LINGUAS
12
po/LINGUAS
@@ -2,16 +2,20 @@
|
||||
#
|
||||
am
|
||||
ar
|
||||
as
|
||||
az
|
||||
be
|
||||
be@latin
|
||||
bg
|
||||
bn
|
||||
bn_IN
|
||||
bs
|
||||
ca
|
||||
cs
|
||||
cy
|
||||
da
|
||||
de
|
||||
dz
|
||||
el
|
||||
en_CA
|
||||
en_GB
|
||||
@@ -33,18 +37,23 @@ id
|
||||
is
|
||||
it
|
||||
ja
|
||||
ka
|
||||
kn
|
||||
ko
|
||||
ku
|
||||
lt
|
||||
lv
|
||||
mg
|
||||
mk
|
||||
ml
|
||||
mn
|
||||
mr
|
||||
ms
|
||||
nb
|
||||
ne
|
||||
nl
|
||||
nn
|
||||
oc
|
||||
or
|
||||
pa
|
||||
pl
|
||||
@@ -53,8 +62,9 @@ pt_BR
|
||||
ro
|
||||
ru
|
||||
rw
|
||||
sl
|
||||
si
|
||||
sk
|
||||
sl
|
||||
sq
|
||||
sr
|
||||
sr@Latn
|
||||
|
@@ -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
2843
po/bn_IN.po
Normal file
2843
po/bn_IN.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
2886
po/en_GB.po
2886
po/en_GB.po
File diff suppressed because it is too large
Load Diff
3603
po/pt_BR.po
3603
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1787
po/sr@Latn.po
1787
po/sr@Latn.po
File diff suppressed because it is too large
Load Diff
2308
po/zh_CN.po
2308
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
5732
po/zh_HK.po
5732
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
2443
po/zh_TW.po
2443
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,141 +2,130 @@ 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
|
||||
|
||||
EGGFILES= \
|
||||
eggaccelerators.c \
|
||||
eggaccelerators.h
|
||||
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/bell.c \
|
||||
core/bell.h \
|
||||
core/boxes.c \
|
||||
include/boxes.h \
|
||||
core/compositor.c \
|
||||
core/compositor.h \
|
||||
core/constraints.c \
|
||||
core/constraints.h \
|
||||
core/core.c \
|
||||
core/delete.c \
|
||||
core/display.c \
|
||||
core/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 \
|
||||
core/errors.h \
|
||||
core/eventqueue.c \
|
||||
core/eventqueue.h \
|
||||
core/frame.c \
|
||||
core/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.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.h \
|
||||
core/workspace.c \
|
||||
core/workspace.h \
|
||||
core/xprops.c \
|
||||
core/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 \
|
||||
$(EGGFILES)
|
||||
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
|
||||
@@ -146,9 +135,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
|
||||
|
||||
@@ -166,6 +155,12 @@ schemadir = @GCONF_SCHEMA_FILE_DIR@
|
||||
schema_in_files = metacity.schemas.in
|
||||
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
|
||||
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
|
||||
xml_in_files = 50-metacity-desktop-key.xml.in 50-metacity-key.xml.in
|
||||
xml_DATA = $(xml_in_files:.xml.in=.xml)
|
||||
|
||||
@INTLTOOL_SCHEMAS_RULE@
|
||||
|
||||
if GCONF_SCHEMAS_INSTALL
|
||||
@@ -182,10 +177,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
|
||||
|
||||
@@ -193,13 +188,8 @@ pkgconfig_DATA = libmetacity-private.pc
|
||||
|
||||
EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) $(schema_DATA) \
|
||||
update-from-egg.sh \
|
||||
$(desktopfiles_in_files) \
|
||||
$(schema_in_files) \
|
||||
$(xml_in_files) \
|
||||
libmetacity-private.pc.in
|
||||
|
||||
|
||||
EGGDIR=$(srcdir)/../../libegg/libegg
|
||||
|
||||
regenerate-built-sources:
|
||||
EGGFILES="$(EGGFILES)" EGGDIR="$(EGGDIR)" $(srcdir)/update-from-egg.sh
|
||||
|
53
src/api.c
53
src/api.c
@@ -1,53 +0,0 @@
|
||||
/* 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);
|
||||
}
|
||||
|
62
src/api.h
62
src/api.h
@@ -1,62 +0,0 @@
|
||||
/* 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 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
g_object_unref (info->stacker);
|
||||
|
||||
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,51 +0,0 @@
|
||||
#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);
|
1260
src/c-window.c
1260
src/c-window.c
File diff suppressed because it is too large
Load Diff
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
* 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
|
||||
|
946
src/compositor.c
946
src/compositor.c
@@ -1,946 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2003, 2004, 2005, 2006 Red Hat, Inc.
|
||||
* Copyright (C) 2003 Keith Packard
|
||||
*
|
||||
* 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.h"
|
||||
#include "screen.h"
|
||||
#include "errors.h"
|
||||
#include "window.h"
|
||||
#include "frame.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#include <cm/node.h>
|
||||
#include <cm/drawable-node.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include <cm/ws.h>
|
||||
#include <cm/wsint.h>
|
||||
#include <cm/stacker.h>
|
||||
#include <cm/cube.h>
|
||||
#include <cm/rotation.h>
|
||||
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <X11/extensions/Xcomposite.h>
|
||||
#include <X11/extensions/Xdamage.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#include "spring-model.h"
|
||||
#include <cm/state.h>
|
||||
|
||||
#include "effects.h"
|
||||
|
||||
#include "c-screen.h"
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#define FRAME_INTERVAL_MILLISECONDS ((int)(1000.0/40.0))
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
/* Screen specific information */
|
||||
typedef struct MoveInfo MoveInfo;
|
||||
|
||||
struct MetaCompositor
|
||||
{
|
||||
MetaDisplay *meta_display;
|
||||
|
||||
WsDisplay *display;
|
||||
|
||||
guint repair_idle;
|
||||
|
||||
guint enabled : 1;
|
||||
guint have_composite : 1;
|
||||
guint have_damage : 1;
|
||||
guint have_fixes : 1;
|
||||
guint have_name_window_pixmap : 1;
|
||||
guint debug_updates : 1;
|
||||
|
||||
GList *ignored_damage;
|
||||
};
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
static WsDisplay *compositor_display;
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
handle_error (Display *dpy, XErrorEvent *ev, gpointer data)
|
||||
{
|
||||
WsDisplay *display = data;
|
||||
|
||||
ws_display_process_xerror (display, ev);
|
||||
}
|
||||
#endif
|
||||
|
||||
static Window
|
||||
get_xid (MetaWindow *window)
|
||||
{
|
||||
if (window->frame)
|
||||
return window->frame->xwindow;
|
||||
else
|
||||
return window->xwindow;
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
static void
|
||||
do_effect (MetaEffect *effect,
|
||||
gpointer data)
|
||||
{
|
||||
MetaCompScreen *screen;
|
||||
MetaCompWindow *window;
|
||||
|
||||
screen = meta_comp_screen_get_by_xwindow (get_xid (effect->window));
|
||||
window = meta_comp_screen_lookup_window (screen, get_xid (effect->window));
|
||||
|
||||
switch (effect->type)
|
||||
{
|
||||
case META_EFFECT_MINIMIZE:
|
||||
if (!effect->window->frame)
|
||||
{
|
||||
meta_effect_end (effect);
|
||||
return;
|
||||
}
|
||||
|
||||
meta_comp_screen_raise_window (screen, effect->window->frame->xwindow);
|
||||
|
||||
meta_comp_window_run_minimize (window, effect);
|
||||
break;
|
||||
|
||||
case META_EFFECT_UNMINIMIZE:
|
||||
meta_comp_window_run_unminimize (window, effect);
|
||||
break;
|
||||
|
||||
case META_EFFECT_FOCUS:
|
||||
meta_comp_window_run_focus (window, effect);
|
||||
break;
|
||||
|
||||
case META_EFFECT_CLOSE:
|
||||
meta_comp_window_freeze_stack (window);
|
||||
meta_comp_window_set_updates (window, FALSE);
|
||||
meta_comp_window_explode (window, effect);
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
MetaCompositor *
|
||||
meta_compositor_new (MetaDisplay *display)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaCompositor *compositor;
|
||||
|
||||
compositor = g_new0 (MetaCompositor, 1);
|
||||
|
||||
if (!compositor_display)
|
||||
{
|
||||
gboolean has_extensions;
|
||||
|
||||
compositor_display = ws_display_new (NULL);
|
||||
|
||||
meta_errors_register_foreign_display (
|
||||
compositor_display->xdisplay, handle_error, compositor_display);
|
||||
|
||||
has_extensions =
|
||||
ws_display_init_composite (compositor_display) &&
|
||||
ws_display_init_damage (compositor_display) &&
|
||||
ws_display_init_fixes (compositor_display) &&
|
||||
ws_display_init_test (compositor_display);
|
||||
|
||||
if (!has_extensions)
|
||||
{
|
||||
g_warning ("Disabling compositor since the server is missing at "
|
||||
"least one of the COMPOSITE, DAMAGE, FIXES or TEST "
|
||||
"extensions");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ws_display_set_ignore_grabs (compositor_display, TRUE);
|
||||
}
|
||||
|
||||
compositor->display = compositor_display;
|
||||
|
||||
ws_display_set_synchronize (compositor_display,
|
||||
getenv ("METACITY_SYNC") != NULL);
|
||||
|
||||
compositor->meta_display = display;
|
||||
|
||||
compositor->enabled = TRUE;
|
||||
|
||||
meta_push_effect_handler (do_effect, compositor);
|
||||
|
||||
return compositor;
|
||||
#else /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
return NULL;
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_set_debug_updates (MetaCompositor *compositor,
|
||||
gboolean debug_updates)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
compositor->debug_updates = !!debug_updates;
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
remove_repair_idle (MetaCompositor *compositor)
|
||||
{
|
||||
if (compositor->repair_idle)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR, "Damage idle removed\n");
|
||||
|
||||
g_source_remove (compositor->repair_idle);
|
||||
compositor->repair_idle = 0;
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
void
|
||||
meta_compositor_unref (MetaCompositor *compositor)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
/* There isn't really a refcount at the moment since
|
||||
* there's no ref()
|
||||
*/
|
||||
remove_repair_idle (compositor);
|
||||
|
||||
g_free (compositor);
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
static void
|
||||
process_configure_notify (MetaCompositor *compositor,
|
||||
XConfigureEvent *event)
|
||||
{
|
||||
MetaCompScreen *minfo = meta_comp_screen_get_by_xwindow (event->window);
|
||||
|
||||
#if 0
|
||||
g_print ("minfo: %lx => %p\n", event->window, minfo);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
g_print ("configure on %lx (above: %lx) %d %d %d %d\n", event->window, event->above,
|
||||
event->x, event->y, event->width, event->height);
|
||||
#endif
|
||||
|
||||
if (!minfo)
|
||||
{
|
||||
#if 0
|
||||
g_print (" --- ignoring configure (no screen info)\n");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
meta_comp_screen_restack (minfo, event->window, event->above);
|
||||
meta_comp_screen_set_size (minfo,
|
||||
event->window,
|
||||
event->x, event->y,
|
||||
event->width, event->height);
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
process_expose (MetaCompositor *compositor,
|
||||
XExposeEvent *event)
|
||||
{
|
||||
/* FIXME: queue repaint */
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CmDrawableNode *node;
|
||||
GTimer *timer;
|
||||
} FadeInfo;
|
||||
|
||||
#define FADE_TIME 0.3
|
||||
|
||||
static gboolean
|
||||
fade_out (gpointer data)
|
||||
{
|
||||
FadeInfo *info = data;
|
||||
gdouble elapsed = g_timer_elapsed (info->timer, NULL);
|
||||
gdouble alpha;
|
||||
|
||||
if (elapsed > FADE_TIME)
|
||||
alpha = 0.0;
|
||||
else
|
||||
alpha = 1 - (elapsed / FADE_TIME);
|
||||
|
||||
cm_drawable_node_set_alpha (info->node, alpha);
|
||||
|
||||
#if 0
|
||||
g_print ("fade out: %f\n", alpha);
|
||||
#endif
|
||||
|
||||
if (elapsed >= FADE_TIME)
|
||||
{
|
||||
g_object_unref (info->node);
|
||||
|
||||
cm_drawable_node_set_viewable (info->node, FALSE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
process_map (MetaCompositor *compositor,
|
||||
XMapEvent *event)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
/* FIXME: do we sometimes get mapnotifies for windows that are
|
||||
* not (direct) children of the root?
|
||||
*/
|
||||
|
||||
/* See if window was mapped as child of root */
|
||||
screen = meta_display_screen_for_root (compositor->meta_display,
|
||||
event->event);
|
||||
|
||||
if (screen == NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"MapNotify received on non-root 0x%lx for 0x%lx\n",
|
||||
event->event, event->window);
|
||||
|
||||
/* MapNotify wasn't for a child of the root */
|
||||
return;
|
||||
}
|
||||
|
||||
meta_comp_screen_add_window (screen->compositor_data,
|
||||
event->window);
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
process_unmap (MetaCompositor *compositor,
|
||||
XUnmapEvent *event)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
/* See if window was unmapped as child of root */
|
||||
screen = meta_display_screen_for_root (compositor->meta_display,
|
||||
event->event);
|
||||
|
||||
if (screen == NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"UnmapNotify received on non-root 0x%lx for 0x%lx\n",
|
||||
event->event, event->window);
|
||||
|
||||
/* UnmapNotify wasn't for a child of the root */
|
||||
return;
|
||||
}
|
||||
|
||||
meta_comp_screen_unmap (screen->compositor_data, event->window);
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
process_create (MetaCompositor *compositor,
|
||||
XCreateWindowEvent *event)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
XWindowAttributes attrs;
|
||||
|
||||
screen = meta_display_screen_for_root (compositor->meta_display,
|
||||
event->parent);
|
||||
|
||||
if (screen == NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"CreateNotify received on non-root 0x%lx for 0x%lx\n",
|
||||
event->parent, event->window);
|
||||
return;
|
||||
}
|
||||
|
||||
meta_error_trap_push_with_return (compositor->meta_display);
|
||||
|
||||
XGetWindowAttributes (compositor->meta_display->xdisplay,
|
||||
event->window, &attrs);
|
||||
|
||||
if (meta_error_trap_pop_with_return (compositor->meta_display, TRUE) != Success)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR, "Failed to get attributes for window 0x%lx\n",
|
||||
event->window);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
g_print (//META_DEBUG_COMPOSITOR,
|
||||
"Create window 0x%lx, adding\n", event->window);
|
||||
#endif
|
||||
meta_compositor_add_window (compositor,
|
||||
event->window, &attrs);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
process_destroy (MetaCompositor *compositor,
|
||||
XDestroyWindowEvent *event)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
screen = meta_display_screen_for_root (compositor->meta_display,
|
||||
event->event);
|
||||
|
||||
|
||||
#if 0
|
||||
g_print ("destroywindow\n");
|
||||
#endif
|
||||
|
||||
if (screen == NULL)
|
||||
{
|
||||
#if 0
|
||||
g_print ("ignoring\n");
|
||||
#endif
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"DestroyNotify received on non-root 0x%lx for 0x%lx\n",
|
||||
event->event, event->window);
|
||||
return;
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"Destroy window 0x%lx\n", event->window);
|
||||
meta_compositor_remove_window (compositor, event->window);
|
||||
}
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
process_reparent (MetaCompositor *compositor,
|
||||
XReparentEvent *event)
|
||||
{
|
||||
/* Reparent from one screen to another doesn't happen now, but
|
||||
* it's been suggested as a future extension
|
||||
*/
|
||||
MetaScreen *event_screen;
|
||||
MetaScreen *parent_screen;
|
||||
|
||||
event_screen = meta_display_screen_for_root (compositor->meta_display,
|
||||
event->event);
|
||||
|
||||
if (event_screen == NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"ReparentNotify received on non-root 0x%lx for 0x%lx\n",
|
||||
event->event, event->window);
|
||||
return;
|
||||
}
|
||||
|
||||
parent_screen = meta_display_screen_for_root (compositor->meta_display,
|
||||
event->parent);
|
||||
|
||||
if (parent_screen == NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_COMPOSITOR,
|
||||
"ReparentNotify 0x%lx to a non-screen or unmanaged screen 0x%lx\n",
|
||||
event->window, event->parent);
|
||||
|
||||
meta_compositor_remove_window (compositor, event->window);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_comp_screen_raise_window (parent_screen->compositor_data,
|
||||
event->window);
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
|
||||
void
|
||||
meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
if (!compositor->enabled)
|
||||
return; /* no extension */
|
||||
|
||||
/* FIXME support CirculateNotify */
|
||||
|
||||
if (event->type == ConfigureNotify)
|
||||
{
|
||||
process_configure_notify (compositor,
|
||||
(XConfigureEvent*) event);
|
||||
}
|
||||
else if (event->type == Expose)
|
||||
{
|
||||
process_expose (compositor,
|
||||
(XExposeEvent*) event);
|
||||
}
|
||||
else if (event->type == UnmapNotify)
|
||||
{
|
||||
process_unmap (compositor,
|
||||
(XUnmapEvent*) event);
|
||||
}
|
||||
else if (event->type == MapNotify)
|
||||
{
|
||||
process_map (compositor,
|
||||
(XMapEvent*) event);
|
||||
}
|
||||
else if (event->type == ReparentNotify)
|
||||
{
|
||||
process_reparent (compositor,
|
||||
(XReparentEvent*) event);
|
||||
}
|
||||
else if (event->type == CreateNotify)
|
||||
{
|
||||
process_create (compositor,
|
||||
(XCreateWindowEvent*) event);
|
||||
}
|
||||
else if (event->type == DestroyNotify)
|
||||
{
|
||||
process_destroy (compositor,
|
||||
(XDestroyWindowEvent*) event);
|
||||
}
|
||||
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
static GTimer *timer;
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static void
|
||||
dump_stacking_order (GList *nodes)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = nodes; list != NULL; list = list->next)
|
||||
{
|
||||
CmDrawableNode *node = list->data;
|
||||
|
||||
g_print ("%lx, ", WS_RESOURCE_XID (node->drawable));
|
||||
}
|
||||
g_print ("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This is called when metacity does its XQueryTree() on startup
|
||||
* and when a new window is mapped.
|
||||
*/
|
||||
void
|
||||
meta_compositor_add_window (MetaCompositor *compositor,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaScreen *screen = meta_screen_for_x_screen (attrs->screen);
|
||||
MetaCompScreen *minfo = screen->compositor_data;
|
||||
|
||||
meta_comp_screen_add_window (minfo, xwindow);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaCompScreen *minfo;
|
||||
|
||||
minfo = meta_comp_screen_get_by_xwindow (xwindow);
|
||||
|
||||
if (minfo)
|
||||
meta_comp_screen_remove_window (minfo, xwindow);
|
||||
#endif /* HAVE_COMPOSITE_EXTENSIONS */
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaCompScreen *info;
|
||||
|
||||
if (screen->compositor_data)
|
||||
return;
|
||||
|
||||
info = meta_comp_screen_new (compositor->display, screen);
|
||||
|
||||
screen->compositor_data = info;
|
||||
|
||||
meta_comp_screen_redirect (info);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaCompScreen *info = screen->compositor_data;
|
||||
|
||||
meta_comp_screen_unredirect (info);
|
||||
screen->compositor_data = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
double x;
|
||||
double y;
|
||||
double width;
|
||||
double height;
|
||||
} DoubleRect;
|
||||
|
||||
#if 0
|
||||
static gdouble
|
||||
interpolate (gdouble t, gdouble begin, gdouble end, double power)
|
||||
{
|
||||
return (begin + (end - begin) * pow (t, power));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static gboolean
|
||||
stop_minimize (gpointer data)
|
||||
{
|
||||
MiniInfo *info = data;
|
||||
|
||||
g_source_remove (info->repaint_id);
|
||||
|
||||
cm_drawable_node_set_deformation_func (info->node, NULL, NULL);
|
||||
|
||||
if (info->finished_func)
|
||||
info->finished_func (info->finished_data);
|
||||
|
||||
g_free (info);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static void
|
||||
minimize_deformation (gdouble time,
|
||||
double in_x,
|
||||
double in_y,
|
||||
double *out_x,
|
||||
double *out_y,
|
||||
gpointer data)
|
||||
{
|
||||
#define MINIMIZE_TIME 0.5
|
||||
MiniInfo *info = data;
|
||||
gdouble elapsed;
|
||||
gdouble pos;
|
||||
|
||||
if (info->start_time == -1)
|
||||
info->start_time = time;
|
||||
|
||||
elapsed = time - info->start_time;
|
||||
pos = elapsed / MINIMIZE_TIME;
|
||||
|
||||
*out_x = interpolate (pos, in_x, info->target.x + info->target.width * ((in_x - info->start.x) / info->start.width), 10 * in_y);
|
||||
*out_y = interpolate (pos, in_y, info->target.y + info->target.height * ((in_y - info->start.y) / info->start.height), 1.0);
|
||||
|
||||
if (elapsed > MINIMIZE_TIME)
|
||||
{
|
||||
g_assert (info->node);
|
||||
if (!info->idle_id)
|
||||
info->idle_id = g_idle_add (stop_minimize, info);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaCompScreen *info = window->screen->compositor_data;
|
||||
|
||||
meta_comp_screen_set_updates (info, get_xid (window), updates);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
#define BALLOON_TIME 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CmDrawableNode *node;
|
||||
MetaAnimationFinishedFunc finished;
|
||||
gpointer finished_data;
|
||||
GTimer *timer;
|
||||
} BalloonInfo;
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
g_free (compositor);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
struct MoveInfo
|
||||
{
|
||||
GTimer *timer;
|
||||
gboolean finished;
|
||||
Model *model;
|
||||
MetaScreen *screen;
|
||||
MetaWindow *window;
|
||||
gdouble last_time;
|
||||
gboolean window_destroyed;
|
||||
MetaCompositor *compositor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
|
||||
void
|
||||
get_patch_points (Model *model,
|
||||
CmPoint points[4][4])
|
||||
{
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
double obj_x, obj_y;
|
||||
|
||||
model_get_position (model, i, j, &obj_x, &obj_y);
|
||||
|
||||
points[j][i].x = obj_x;
|
||||
points[j][i].y = obj_y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static GList *move_infos;
|
||||
|
||||
static gboolean
|
||||
wobble (gpointer data)
|
||||
{
|
||||
MoveInfo *info = data;
|
||||
MetaCompScreen *minfo = info->screen->compositor_data;
|
||||
double t = g_timer_elapsed (info->timer, NULL);
|
||||
|
||||
#if 0
|
||||
g_print ("info->window_destroyed: %d\n",
|
||||
info->window_destroyed);
|
||||
#endif
|
||||
if ((info->finished && model_is_calm (info->model)) ||
|
||||
info->window_destroyed)
|
||||
{
|
||||
if (!info->window_destroyed)
|
||||
meta_comp_screen_unset_patch (minfo, get_xid (info->window));
|
||||
|
||||
move_infos = g_list_remove (move_infos, info);
|
||||
g_free (info);
|
||||
#if 0
|
||||
g_print ("stop wobb\n");
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
int i;
|
||||
int n_steps;
|
||||
CmPoint points[4][4];
|
||||
n_steps = floor ((t - info->last_time) * 75);
|
||||
|
||||
for (i = 0; i < n_steps; ++i)
|
||||
model_step (info->model);
|
||||
|
||||
if (i > 0)
|
||||
info->last_time = t;
|
||||
|
||||
get_patch_points (info->model, points);
|
||||
meta_comp_screen_set_patch (minfo,
|
||||
get_xid (info->window),
|
||||
points);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void
|
||||
compute_window_rect (MetaWindow *window,
|
||||
MetaRectangle *rect)
|
||||
{
|
||||
/* FIXME: does metacity include this function somewhere? */
|
||||
|
||||
if (window->frame)
|
||||
{
|
||||
*rect = window->frame->rect;
|
||||
}
|
||||
else
|
||||
{
|
||||
*rect = window->user_rect;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_begin_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *initial,
|
||||
int grab_x, int grab_y)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MetaRectangle rect;
|
||||
MoveInfo *move_info;
|
||||
|
||||
#if 0
|
||||
g_print ("begin move\n");
|
||||
#endif
|
||||
|
||||
if (!g_getenv ("USE_WOBBLY"))
|
||||
return;
|
||||
|
||||
move_info = g_new0 (MoveInfo, 1);
|
||||
|
||||
move_infos = g_list_prepend (move_infos, move_info);
|
||||
|
||||
move_info->compositor = compositor;
|
||||
move_info->last_time = 0.0;
|
||||
move_info->timer = g_timer_new ();
|
||||
move_info->window_destroyed = FALSE;
|
||||
|
||||
compute_window_rect (window, &rect);
|
||||
|
||||
#if 0
|
||||
g_print ("init: %d %d\n", initial->x, initial->y);
|
||||
g_print ("window: %d %d\n", window->rect.x, window->rect.y);
|
||||
g_print ("frame: %d %d\n", rect.x, rect.y);
|
||||
g_print ("grab: %d %d\n", grab_x, grab_y);
|
||||
#endif
|
||||
|
||||
move_info->model = model_new (&rect, TRUE);
|
||||
move_info->window = window;
|
||||
move_info->screen = window->screen;
|
||||
|
||||
model_begin_move (move_info->model, grab_x, grab_y);
|
||||
|
||||
g_idle_add (wobble, move_info);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
static MoveInfo *
|
||||
find_info (MetaWindow *window)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = move_infos; list != NULL; list = list->next)
|
||||
{
|
||||
MoveInfo *info = list->data;
|
||||
|
||||
if (info->window == window)
|
||||
return info;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_update_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x, int y)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MoveInfo *move_info = find_info (window);
|
||||
|
||||
if (!g_getenv ("USE_WOBBLY"))
|
||||
return;
|
||||
|
||||
model_update_move (move_info->model, x, y);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_compositor_end_move (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MoveInfo *info = find_info (window);
|
||||
|
||||
if (!g_getenv ("USE_WOBBLY"))
|
||||
return;
|
||||
|
||||
info->finished = TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window)
|
||||
{
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
MoveInfo *info = find_info (window);
|
||||
|
||||
if (!g_getenv ("USE_WOBBLY"))
|
||||
return;
|
||||
|
||||
if (info)
|
||||
info->window_destroyed = TRUE;
|
||||
#endif
|
||||
}
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Asynchronous X property getting hack */
|
||||
|
||||
/*
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Asynchronous X property getting hack */
|
||||
|
||||
/*
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity visual bell */
|
||||
|
||||
/*
|
||||
@@ -20,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 "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)
|
||||
@@ -87,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,
|
||||
@@ -114,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)
|
||||
{
|
||||
@@ -123,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)
|
||||
{
|
||||
@@ -133,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)
|
||||
@@ -156,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)
|
||||
@@ -174,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)
|
||||
@@ -182,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)
|
||||
{
|
||||
@@ -195,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)
|
||||
{
|
||||
@@ -236,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)
|
||||
{
|
||||
@@ -248,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)
|
||||
{
|
@@ -1,5 +1,6 @@
|
||||
/* Metacity visual bell */
|
||||
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2002 Sun Microsystems Inc.
|
||||
*
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Simple box operations */
|
||||
|
||||
/*
|
||||
@@ -27,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,
|
||||
@@ -59,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)
|
||||
{
|
||||
@@ -112,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)
|
||||
{
|
||||
@@ -545,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;
|
||||
@@ -556,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);
|
||||
}
|
||||
@@ -603,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... */
|
||||
@@ -660,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)
|
||||
{
|
||||
@@ -705,6 +775,25 @@ meta_rectangle_contained_in_region (const GList *spanning_rects,
|
||||
return contained;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_rectangle_overlaps_with_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
{
|
||||
const GList *temp;
|
||||
gboolean overlaps;
|
||||
|
||||
temp = spanning_rects;
|
||||
overlaps = FALSE;
|
||||
while (!overlaps && temp != NULL)
|
||||
{
|
||||
overlaps = overlaps || meta_rectangle_overlap (temp->data, rect);
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
return overlaps;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
@@ -718,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)
|
||||
@@ -758,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 */
|
||||
@@ -792,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)
|
||||
@@ -827,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 */
|
||||
@@ -875,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;
|
||||
@@ -917,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 &&
|
||||
@@ -933,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 */
|
||||
@@ -1054,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*
|
||||
@@ -1140,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);
|
||||
|
||||
@@ -1170,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;
|
||||
@@ -1197,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);
|
||||
@@ -1218,7 +1287,7 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
return struts;
|
||||
return strut_rects;
|
||||
}
|
||||
|
||||
gint
|
||||
@@ -1326,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;
|
||||
@@ -1376,6 +1445,8 @@ rectangle_and_edge_intersection (const MetaRectangle *rect,
|
||||
else
|
||||
*handle_type = 0;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
return intersect;
|
||||
@@ -1482,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)
|
||||
@@ -1607,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
|
||||
@@ -1627,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)
|
||||
@@ -1647,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);
|
||||
|
||||
@@ -1671,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;
|
||||
}
|
||||
@@ -1695,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;
|
||||
@@ -1802,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);
|
2656
src/core/compositor.c
Normal file
2656
src/core/compositor.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity compositing manager */
|
||||
|
||||
/*
|
||||
@@ -25,17 +27,12 @@
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
|
||||
typedef void (* MetaAnimationFinishedFunc) (gpointer data);
|
||||
|
||||
/* XXX namespace me */
|
||||
void compute_window_rect (MetaWindow *window, MetaRectangle *rect);
|
||||
|
||||
MetaCompositor* meta_compositor_new (MetaDisplay *display);
|
||||
void meta_compositor_unref (MetaCompositor *compositor);
|
||||
void meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *xevent,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_add_window (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs);
|
||||
void meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
@@ -48,23 +45,11 @@ void meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
|
||||
#if 0
|
||||
void meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished_cb,
|
||||
gpointer finished_data);
|
||||
#endif
|
||||
void meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates);
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates);
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor);
|
||||
void meta_compositor_destroy (MetaCompositor *compositor);
|
||||
|
||||
void meta_compositor_begin_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
@@ -77,7 +62,7 @@ void meta_compositor_end_move (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
Pixmap meta_compositor_get_window_pixmap (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
|
||||
#endif /* META_COMPOSITOR_H */
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity size/position constraints */
|
||||
|
||||
/*
|
||||
@@ -89,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,
|
||||
@@ -97,8 +99,9 @@ typedef enum
|
||||
PRIORITY_MAXIMIZATION = 2,
|
||||
PRIORITY_FULLSCREEN = 2,
|
||||
PRIORITY_SIZE_HINTS_LIMITS = 3,
|
||||
PRIORITY_TITLEBAR_VISIBLE = 4,
|
||||
PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA = 4,
|
||||
PRIORITY_MAXIMUM = 4 // Dummy value used for loop end = max(all priorities)
|
||||
PRIORITY_MAXIMUM = 4 /* Dummy value used for loop end = max(all priorities) */
|
||||
} ConstraintPriority;
|
||||
|
||||
typedef enum
|
||||
@@ -165,6 +168,10 @@ static gboolean constrain_fully_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
static gboolean constrain_titlebar_visible (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
static gboolean constrain_partially_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
@@ -209,6 +216,7 @@ static const Constraint all_constraints[] = {
|
||||
{constrain_aspect_ratio, "constrain_aspect_ratio"},
|
||||
{constrain_to_single_xinerama, "constrain_to_single_xinerama"},
|
||||
{constrain_fully_onscreen, "constrain_fully_onscreen"},
|
||||
{constrain_titlebar_visible, "constrain_titlebar_visible"},
|
||||
{constrain_partially_onscreen, "constrain_partially_onscreen"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
@@ -342,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");
|
||||
@@ -357,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))
|
||||
@@ -377,12 +385,13 @@ 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;
|
||||
|
||||
meta_window_get_work_area_current_xinerama (window, &info->work_area_xinerama);
|
||||
info->fixed_directions = FIXED_DIRECTION_NONE;
|
||||
|
||||
xinerama_info =
|
||||
meta_screen_get_xinerama_for_window (window->screen, window);
|
||||
meta_screen_get_xinerama_for_rect (window->screen, &info->current);
|
||||
meta_window_get_work_area_for_xinerama (window,
|
||||
xinerama_info->number,
|
||||
&info->work_area_xinerama);
|
||||
info->entire_xinerama = xinerama_info->rect;
|
||||
|
||||
cur_workspace = window->screen->active_workspace;
|
||||
@@ -392,6 +401,23 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
meta_workspace_get_onxinerama_region (cur_workspace,
|
||||
xinerama_info->number);
|
||||
|
||||
/* Workaround braindead legacy apps that don't know how to
|
||||
* fullscreen themselves properly.
|
||||
*/
|
||||
if (meta_rectangle_equal (new, &xinerama_info->rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
/*
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
*/
|
||||
meta_warning (
|
||||
"Treating resize request of legacy application %s as a "
|
||||
"fullscreen request\n",
|
||||
window->desc);
|
||||
meta_window_make_fullscreen_internal (window);
|
||||
}
|
||||
|
||||
/* Log all this information for debugging */
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Setting up constraint info:\n"
|
||||
@@ -415,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",
|
||||
@@ -434,13 +460,15 @@ place_window_if_needed(MetaWindow *window,
|
||||
|
||||
/* Do placement if any, so we go ahead and apply position
|
||||
* constraints in a move-only context. Don't place
|
||||
* maximized/fullscreen windows until they are unmaximized
|
||||
* and unfullscreened
|
||||
* maximized/minimized/fullscreen windows until they are
|
||||
* unmaximized, unminimized and unfullscreened.
|
||||
*/
|
||||
did_placement = FALSE;
|
||||
if (!window->placed &&
|
||||
window->calc_placement &&
|
||||
!META_WINDOW_MAXIMIZED (window) &&
|
||||
!(window->maximized_horizontally ||
|
||||
window->maximized_vertically) &&
|
||||
!window->minimized &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
MetaRectangle placed_rect = info->orig;
|
||||
@@ -472,56 +500,50 @@ 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->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement) &&
|
||||
(window->placed || did_placement))
|
||||
if (window->placed || did_placement)
|
||||
{
|
||||
/* define a sane saved_rect so that the user can unmaximize to
|
||||
* something reasonable.
|
||||
*/
|
||||
if (info->current.width >= info->work_area_xinerama.width)
|
||||
{
|
||||
info->current.width = .75 * info->work_area_xinerama.width;
|
||||
info->current.x = info->work_area_xinerama.x +
|
||||
.125 * info->work_area_xinerama.width;
|
||||
}
|
||||
if (info->current.height >= info->work_area_xinerama.height)
|
||||
{
|
||||
info->current.height = .75 * info->work_area_xinerama.height;
|
||||
info->current.y = info->work_area_xinerama.y +
|
||||
.083 * info->work_area_xinerama.height;
|
||||
}
|
||||
|
||||
if (window->maximize_horizontally_after_placement &&
|
||||
if (window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement)
|
||||
meta_window_maximize_internal (window,
|
||||
META_MAXIMIZE_HORIZONTAL |
|
||||
META_MAXIMIZE_VERTICAL,
|
||||
&info->current);
|
||||
else if (window->maximize_horizontally_after_placement)
|
||||
{
|
||||
info->current.x = info->work_area_xinerama.x
|
||||
+ info->fgeom->left_width;
|
||||
info->current.width = info->work_area_xinerama.width
|
||||
- info->fgeom->left_width - info->fgeom->right_width;
|
||||
/* define a sane saved_rect so that the user can unmaximize to
|
||||
* something reasonable.
|
||||
*/
|
||||
if (info->current.width >= info->work_area_xinerama.width)
|
||||
{
|
||||
info->current.width = .75 * info->work_area_xinerama.width;
|
||||
info->current.x = info->work_area_xinerama.x +
|
||||
.125 * info->work_area_xinerama.width;
|
||||
}
|
||||
if (info->current.height >= info->work_area_xinerama.height)
|
||||
{
|
||||
info->current.height = .75 * info->work_area_xinerama.height;
|
||||
info->current.y = info->work_area_xinerama.y +
|
||||
.083 * info->work_area_xinerama.height;
|
||||
}
|
||||
|
||||
if (window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement)
|
||||
meta_window_maximize_internal (window,
|
||||
(window->maximize_horizontally_after_placement ?
|
||||
META_MAXIMIZE_HORIZONTAL : 0 ) |
|
||||
(window->maximize_vertically_after_placement ?
|
||||
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (window->frame && !window->fullscreen)
|
||||
meta_frame_calc_geometry (window->frame, info->fgeom);
|
||||
|
||||
window->maximize_horizontally_after_placement = FALSE;
|
||||
window->maximize_vertically_after_placement = FALSE;
|
||||
}
|
||||
else if (window->maximize_vertically_after_placement);
|
||||
if (window->minimize_after_placement)
|
||||
{
|
||||
info->current.y = info->work_area_xinerama.y
|
||||
+ info->fgeom->top_height;
|
||||
info->current.height = info->work_area_xinerama.height
|
||||
- info->fgeom->top_height - info->fgeom->bottom_height;
|
||||
meta_window_minimize (window);
|
||||
window->minimize_after_placement = FALSE;
|
||||
}
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (window->frame && !window->fullscreen)
|
||||
meta_frame_calc_geometry (window->frame, info->fgeom);
|
||||
|
||||
window->maximize_horizontally_after_placement = FALSE;
|
||||
window->maximize_vertically_after_placement = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -536,23 +558,33 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
window->type == META_WINDOW_DOCK)
|
||||
return;
|
||||
|
||||
/* USABILITY NOTE: Naturally, I only want the require_fully_onscreen and
|
||||
* require_on_single_xinerama flags to *become false* due to user
|
||||
* interactions (which is allowed since certain constraints are ignored
|
||||
* for user interactions regardless of the setting of these flags).
|
||||
* However, whether to make these flags *become true* due to just an
|
||||
* application interaction is a little trickier. It's possible that
|
||||
* users may find not doing that strange since two application
|
||||
* interactions that resize in opposite ways don't necessarily end up
|
||||
* cancelling--but it may also be strange for the user to have an
|
||||
* application resize the window so that it's onscreen, the user forgets
|
||||
* about it, and then later the app is able to resize itself off the
|
||||
* screen. Anyway, for now, I'm think the latter is the more problematic
|
||||
* case but this may need to be revisited.
|
||||
/* We don't want to update the requirements for fullscreen windows;
|
||||
* fullscreen windows are specially handled anyway, and it updating
|
||||
* the requirements when windows enter fullscreen mode mess up the
|
||||
* handling of the window when it leaves that mode (especially when
|
||||
* the application sends a bunch of configurerequest events). See
|
||||
* #353699.
|
||||
*/
|
||||
if (window->fullscreen)
|
||||
return;
|
||||
|
||||
/* USABILITY NOTE: Naturally, I only want the require_fully_onscreen,
|
||||
* require_on_single_xinerama, and require_titlebar_visible flags to
|
||||
* *become false* due to user interactions (which is allowed since
|
||||
* certain constraints are ignored for user interactions regardless of
|
||||
* the setting of these flags). However, whether to make these flags
|
||||
* *become true* due to just an application interaction is a little
|
||||
* trickier. It's possible that users may find not doing that strange
|
||||
* since two application interactions that resize in opposite ways don't
|
||||
* necessarily end up cancelling--but it may also be strange for the user
|
||||
* to have an application resize the window so that it's onscreen, the
|
||||
* user forgets about it, and then later the app is able to resize itself
|
||||
* off the screen. Anyway, for now, I think the latter is the more
|
||||
* problematic case but this may need to be revisited.
|
||||
*/
|
||||
|
||||
/* The require onscreen/on-single-xinerama stuff is relative to the
|
||||
* outer window, not the inner
|
||||
/* The require onscreen/on-single-xinerama and titlebar_visible
|
||||
* stuff is relative to the outer window, not the inner
|
||||
*/
|
||||
extend_by_frame (&info->current, info->fgeom);
|
||||
|
||||
@@ -582,6 +614,26 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
window->desc,
|
||||
window->require_on_single_xinerama ? "TRUE" : "FALSE");
|
||||
|
||||
/* Update whether we want future constraint runs to require the
|
||||
* titlebar to be visible.
|
||||
*/
|
||||
if (window->frame && window->decorated)
|
||||
{
|
||||
MetaRectangle titlebar_rect;
|
||||
|
||||
titlebar_rect = info->current;
|
||||
titlebar_rect.height = info->fgeom->top_height;
|
||||
old = window->require_titlebar_visible;
|
||||
window->require_titlebar_visible =
|
||||
meta_rectangle_overlaps_with_region (info->usable_screen_region,
|
||||
&titlebar_rect);
|
||||
if (old ^ window->require_titlebar_visible)
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"require_titlebar_visible for %s toggled to %s\n",
|
||||
window->desc,
|
||||
window->require_titlebar_visible ? "TRUE" : "FALSE");
|
||||
}
|
||||
|
||||
/* Don't forget to restore the position of the window */
|
||||
unextend_by_frame (&info->current, info->fgeom);
|
||||
}
|
||||
@@ -639,8 +691,9 @@ constrain_maximization (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size, work_area;
|
||||
gboolean hminbad, vminbad, hmaxbad, vmaxbad;
|
||||
MetaRectangle target_size;
|
||||
MetaRectangle min_size, max_size;
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
@@ -651,22 +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;
|
||||
hmaxbad = work_area.width > max_size.width && window->maximized_horizontally;
|
||||
vmaxbad = work_area.height > max_size.height && window->maximized_vertically;
|
||||
if (hminbad || vminbad || hmaxbad || vmaxbad)
|
||||
if (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);
|
||||
@@ -676,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;
|
||||
}
|
||||
@@ -727,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;
|
||||
@@ -744,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);
|
||||
|
||||
@@ -755,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;
|
||||
}
|
||||
|
||||
@@ -773,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;
|
||||
@@ -787,8 +894,13 @@ constrain_size_limits (MetaWindow *window,
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
too_big = !meta_rectangle_could_fit_rect (&info->current, &min_size);
|
||||
too_small = !meta_rectangle_could_fit_rect (&max_size, &info->current);
|
||||
/* We ignore max-size limits for maximized windows; see #327543 */
|
||||
if (window->maximized_horizontally)
|
||||
max_size.width = MAX (max_size.width, info->current.width);
|
||||
if (window->maximized_vertically)
|
||||
max_size.height = MAX (max_size.height, info->current.height);
|
||||
too_small = !meta_rectangle_could_fit_rect (&info->current, &min_size);
|
||||
too_big = !meta_rectangle_could_fit_rect (&max_size, &info->current);
|
||||
constraint_already_satisfied = !too_big && !too_small;
|
||||
if (check_only || constraint_already_satisfied)
|
||||
return constraint_already_satisfied;
|
||||
@@ -796,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,
|
||||
@@ -815,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;
|
||||
@@ -920,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,
|
||||
@@ -939,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;
|
||||
@@ -1042,6 +1174,7 @@ constrain_fully_onscreen (MetaWindow *window,
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->fullscreen ||
|
||||
!window->require_fully_onscreen ||
|
||||
info->is_user_action)
|
||||
return TRUE;
|
||||
@@ -1053,6 +1186,91 @@ constrain_fully_onscreen (MetaWindow *window,
|
||||
check_only);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_titlebar_visible (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
gboolean unconstrained_user_action;
|
||||
gboolean retval;
|
||||
int bottom_amount;
|
||||
int horiz_amount_offscreen, vert_amount_offscreen;
|
||||
int horiz_amount_onscreen, vert_amount_onscreen;
|
||||
|
||||
if (priority > PRIORITY_TITLEBAR_VISIBLE)
|
||||
return TRUE;
|
||||
|
||||
/* Allow the titlebar beyond the top of the screen only if the user wasn't
|
||||
* clicking on the frame to start the move.
|
||||
*/
|
||||
unconstrained_user_action =
|
||||
info->is_user_action && !window->display->grab_frame_action;
|
||||
|
||||
/* Exit early if we know the constraint won't apply--note that this constraint
|
||||
* is only meant for normal windows (e.g. we don't want docks to be shoved
|
||||
* "onscreen" by their own strut).
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->fullscreen ||
|
||||
!window->require_titlebar_visible ||
|
||||
!window->decorated ||
|
||||
unconstrained_user_action)
|
||||
return TRUE;
|
||||
|
||||
/* Determine how much offscreen things are allowed. We first need to
|
||||
* figure out how much must remain on the screen. For that, we use 25%
|
||||
* window width/height but clamp to the range of (10,75) pixels. This is
|
||||
* somewhat of a seat of my pants random guess at what might look good.
|
||||
* Then, the amount that is allowed off is just the window size minus
|
||||
* this amount (but no less than 0 for tiny windows).
|
||||
*/
|
||||
horiz_amount_onscreen = info->current.width / 4;
|
||||
vert_amount_onscreen = info->current.height / 4;
|
||||
horiz_amount_onscreen = CLAMP (horiz_amount_onscreen, 10, 75);
|
||||
vert_amount_onscreen = CLAMP (vert_amount_onscreen, 10, 75);
|
||||
horiz_amount_offscreen = info->current.width - horiz_amount_onscreen;
|
||||
vert_amount_offscreen = info->current.height - vert_amount_onscreen;
|
||||
horiz_amount_offscreen = MAX (horiz_amount_offscreen, 0);
|
||||
vert_amount_offscreen = MAX (vert_amount_offscreen, 0);
|
||||
/* Allow the titlebar to touch the bottom panel; If there is no titlebar,
|
||||
* require vert_amount to remain on the screen.
|
||||
*/
|
||||
if (window->frame)
|
||||
{
|
||||
bottom_amount = info->current.height + info->fgeom->bottom_height;
|
||||
vert_amount_onscreen = info->fgeom->top_height;
|
||||
}
|
||||
else
|
||||
bottom_amount = vert_amount_offscreen;
|
||||
|
||||
/* Extend the region, have a helper function handle the constraint,
|
||||
* then return the region to its original size.
|
||||
*/
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
horiz_amount_offscreen,
|
||||
horiz_amount_offscreen,
|
||||
0, /* Don't let titlebar off */
|
||||
bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
retval =
|
||||
do_screen_and_xinerama_relative_constraints (window,
|
||||
info->usable_screen_region,
|
||||
info,
|
||||
check_only);
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
-horiz_amount_offscreen,
|
||||
-horiz_amount_offscreen,
|
||||
0, /* Don't let titlebar off */
|
||||
-bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_partially_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity size/position constraints */
|
||||
|
||||
/*
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity interface used by GTK+ UI to talk to core */
|
||||
|
||||
/*
|
||||
@@ -27,9 +29,20 @@
|
||||
#include "workspace.h"
|
||||
#include "prefs.h"
|
||||
|
||||
/* Looks up the MetaWindow representing the frame of the given X window.
|
||||
* Used as a helper function by a bunch of the functions below.
|
||||
*
|
||||
* FIXME: The functions that use this function throw the result away
|
||||
* after use. Many of these functions tend to be called in small groups,
|
||||
* which results in get_window() getting called several times in succession
|
||||
* with the same parameters. We should profile to see whether this wastes
|
||||
* much time, and if it does we should look into a generalised
|
||||
* meta_core_get_window_info() which takes a bunch of pointers to variables
|
||||
* to put its results in, and only fills in the non-null ones.
|
||||
*/
|
||||
static MetaWindow *
|
||||
get_window (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
@@ -47,112 +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_titlebar_is_onscreen (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
MetaDisplay *display = meta_display_for_x_display (xdisplay);
|
||||
MetaWindow *window = meta_display_lookup_x_window (display, xwindow);
|
||||
|
||||
return meta_window_titlebar_is_onscreen (window);
|
||||
}
|
||||
va_start (args, xwindow);
|
||||
|
||||
Window
|
||||
meta_core_get_client_xwindow (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
request = va_arg (args, MetaCoreGetType);
|
||||
|
||||
return window->xwindow;
|
||||
}
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
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);
|
||||
}
|
||||
if (request != META_CORE_WINDOW_HAS_FRAME &&
|
||||
(window == NULL || window->frame == NULL)) {
|
||||
meta_bug ("No such frame window 0x%lx!\n", xwindow);
|
||||
return;
|
||||
}
|
||||
|
||||
MetaFrameType
|
||||
meta_core_get_frame_type (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window;
|
||||
MetaFrameType base_type;
|
||||
while (request != META_CORE_GET_END) {
|
||||
|
||||
gpointer answer = va_arg (args, gpointer);
|
||||
|
||||
window = get_window (xdisplay, frame_xwindow);
|
||||
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;
|
||||
|
||||
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;
|
||||
switch (window->type)
|
||||
{
|
||||
case META_WINDOW_NORMAL:
|
||||
base_type = META_FRAME_TYPE_NORMAL;
|
||||
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_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_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
|
||||
@@ -161,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
|
||||
@@ -199,7 +256,7 @@ meta_core_user_raise (Display *xdisplay,
|
||||
void
|
||||
meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
@@ -242,39 +299,13 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
void
|
||||
meta_core_user_focus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
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)
|
||||
@@ -297,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)
|
||||
@@ -339,20 +404,22 @@ meta_core_delete (Display *xdisplay,
|
||||
|
||||
void
|
||||
meta_core_unshade (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_unshade (window);
|
||||
meta_window_unshade (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_shade (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_shade (window);
|
||||
meta_window_shade (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -364,6 +431,24 @@ meta_core_unstick (Display *xdisplay,
|
||||
meta_window_unstick (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_make_above (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_make_above (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_unmake_above (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_unmake_above (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_stick (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
@@ -405,43 +490,13 @@ 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,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
@@ -584,10 +639,10 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
gboolean frame_action,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
@@ -602,14 +657,14 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
op, pointer_already_grabbed,
|
||||
event_serial,
|
||||
frame_action,
|
||||
button, modmask,
|
||||
timestamp, root_x, root_y);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_end_grab_op (Display *xdisplay,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
@@ -684,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)
|
||||
{
|
||||
@@ -708,3 +749,30 @@ meta_core_increment_event_serial (Display *xdisplay)
|
||||
meta_display_increment_event_serial (display);
|
||||
}
|
||||
|
||||
void
|
||||
meta_invalidate_default_icons (void)
|
||||
{
|
||||
GSList *displays;
|
||||
|
||||
for (displays = meta_displays_list ();
|
||||
displays != NULL;
|
||||
displays = displays->next)
|
||||
{
|
||||
GSList *windows, *l;
|
||||
|
||||
windows = meta_display_list_windows (displays->data);
|
||||
for (l = windows; l != NULL; l = l->next)
|
||||
{
|
||||
MetaWindow *window = (MetaWindow*)l->data;
|
||||
|
||||
if (window->icon_cache.origin == USING_FALLBACK_ICON)
|
||||
{
|
||||
meta_icon_cache_free (&(window->icon_cache));
|
||||
meta_window_update_icon_now (window);
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user