Compare commits
558 Commits
METACITY_2
...
METACITY_2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7513e84fc | ||
|
|
77a1e8ec8b | ||
|
|
0ceb317ac6 | ||
|
|
4fda4ed806 | ||
|
|
5c01798884 | ||
|
|
09c929ce3f | ||
|
|
0399fb7d4b | ||
|
|
4b9a23e8eb | ||
|
|
c60ec1802a | ||
|
|
929619f145 | ||
|
|
c043cd4dae | ||
|
|
9fb6cea799 | ||
|
|
7a441616f3 | ||
|
|
43693d2b6a | ||
|
|
b76e62226b | ||
|
|
706791d582 | ||
|
|
b6dca7f3cb | ||
|
|
43ede25908 | ||
|
|
5856fd8ef2 | ||
|
|
332adc45fc | ||
|
|
a76b1075df | ||
|
|
d2d8d96778 | ||
|
|
3ae3a2558f | ||
|
|
6efaa8d45c | ||
|
|
2876d2f43f | ||
|
|
1341d50518 | ||
|
|
11e56f841a | ||
|
|
72dd7ff621 | ||
|
|
10425302c7 | ||
|
|
ab16ef096a | ||
|
|
e632c8ebf5 | ||
|
|
9a5ca2055e | ||
|
|
307f49f735 | ||
|
|
6ca6596309 | ||
|
|
1c50c27613 | ||
|
|
f0ae093877 | ||
|
|
8273612a87 | ||
|
|
09d35abc95 | ||
|
|
b1769b3cb9 | ||
|
|
a1bfe15eb5 | ||
|
|
51a98800f8 | ||
|
|
c7b55ccb9f | ||
|
|
b42ac36ac8 | ||
|
|
91c8674acf | ||
|
|
a50c7cd589 | ||
|
|
3a7ce7d109 | ||
|
|
9ef1da6ec2 | ||
|
|
cd1885cec4 | ||
|
|
27797e7f78 | ||
|
|
0de86fc8ea | ||
|
|
c0452be980 | ||
|
|
963ac3ff32 | ||
|
|
f3cc59c78a | ||
|
|
56609cbb39 | ||
|
|
16a8add6f8 | ||
|
|
036a61d198 | ||
|
|
9739346c85 | ||
|
|
47e6bd5648 | ||
|
|
502003e47b | ||
|
|
57b16ab4c7 | ||
|
|
83480c1ac9 | ||
|
|
db108c1fc3 | ||
|
|
5a28c4c423 | ||
|
|
f1701a751f | ||
|
|
ad65847d7d | ||
|
|
88ea02a77a | ||
|
|
b70fdf1a5f | ||
|
|
2195dfc9f8 | ||
|
|
27eb5a60f3 | ||
|
|
339719568f | ||
|
|
fd13022dc4 | ||
|
|
d53afd3ae1 | ||
|
|
57f9a51a58 | ||
|
|
799f3274d9 | ||
|
|
a788bee6f9 | ||
|
|
0a83c10948 | ||
|
|
dfa9c24b87 | ||
|
|
7bf8eee605 | ||
|
|
664216dc8b | ||
|
|
b3f95bf7d1 | ||
|
|
f2e783b2c5 | ||
|
|
e68b1b6c42 | ||
|
|
217ba6c1b7 | ||
|
|
74a8b5b78b | ||
|
|
81fab83067 | ||
|
|
0f23f3f05b | ||
|
|
4b3b706369 | ||
|
|
595cbe2ac0 | ||
|
|
b20391780d | ||
|
|
dd8e9e5725 | ||
|
|
007a1f0d0d | ||
|
|
40a710dad0 | ||
|
|
6770329e69 | ||
|
|
4f448440d4 | ||
|
|
039ffb0cb4 | ||
|
|
2f561e5553 | ||
|
|
2d314d84cd | ||
|
|
3b7f92ae5d | ||
|
|
4f7e28ff3c | ||
|
|
47cf3085e7 | ||
|
|
3d996ff73d | ||
|
|
1b7a651a33 | ||
|
|
a605da04c1 | ||
|
|
cc7195547a | ||
|
|
c820769bce | ||
|
|
b2d009d01d | ||
|
|
fe8abfa887 | ||
|
|
2fdb75ad45 | ||
|
|
07c0a53316 | ||
|
|
e5cf7ff55b | ||
|
|
3c1fe8bedd | ||
|
|
88aeeb8cd5 | ||
|
|
1b323f87d7 | ||
|
|
2d74e25058 | ||
|
|
98e882720c | ||
|
|
93c5a042ee | ||
|
|
99d7cadf67 | ||
|
|
0e3ecc7a31 | ||
|
|
c635a55612 | ||
|
|
5a088c5bbc | ||
|
|
a27089a110 | ||
|
|
35c64b45dd | ||
|
|
daf93c5ed0 | ||
|
|
56d75ebf44 | ||
|
|
5815ebd3a4 | ||
|
|
78f925c6a6 | ||
|
|
1115e22481 | ||
|
|
c2ba0a7d67 | ||
|
|
e699ff2e83 | ||
|
|
804411bd68 | ||
|
|
690100f1ad | ||
|
|
95b0ee480e | ||
|
|
4be245a26a | ||
|
|
a0863fc437 | ||
|
|
c9f0005b05 | ||
|
|
104786735a | ||
|
|
191b3f2c21 | ||
|
|
860ae37db5 | ||
|
|
9bde925d3d | ||
|
|
7630d22b8d | ||
|
|
a92be6e319 | ||
|
|
0bb3361b73 | ||
|
|
b1c1e4a7db | ||
|
|
82673cb51f | ||
|
|
4ebdb0b9c0 | ||
|
|
4c5e4442c1 | ||
|
|
01fa9cfc63 | ||
|
|
6ff017e875 | ||
|
|
8d892f76da | ||
|
|
03bbe3de17 | ||
|
|
47a1c285c7 | ||
|
|
4ccb120922 | ||
|
|
423b5f5f39 | ||
|
|
feefcdd892 | ||
|
|
927a6def1b | ||
|
|
d538690bd4 | ||
|
|
24d8655188 | ||
|
|
917dfefd6c | ||
|
|
9378a4fb4d | ||
|
|
67c36f0917 | ||
|
|
d5083baea0 | ||
|
|
6a0f4f6ccb | ||
|
|
901ad18a67 | ||
|
|
6ac67f80a6 | ||
|
|
a88f44ea64 | ||
|
|
5c10e0a859 | ||
|
|
3c384d37c6 | ||
|
|
2592efeee4 | ||
|
|
66b2e8bc3f | ||
|
|
17dc2d6151 | ||
|
|
2218b79143 | ||
|
|
17b8a1f3e6 | ||
|
|
830a52ee25 | ||
|
|
18b38ac526 | ||
|
|
8658268847 | ||
|
|
8a271ee5ac | ||
|
|
cf15ea0a3d | ||
|
|
669cdc4bb6 | ||
|
|
68d6a92972 | ||
|
|
4770da34b3 | ||
|
|
9197c4f835 | ||
|
|
6aff3466c6 | ||
|
|
e98fad3e62 | ||
|
|
6628acb59c | ||
|
|
d76d953d69 | ||
|
|
e9358b5eea | ||
|
|
6d7d586f3c | ||
|
|
481accd6bd | ||
|
|
2a97ddd60a | ||
|
|
8441fada07 | ||
|
|
a60b735e2d | ||
|
|
199d20197e | ||
|
|
5fdb8ab7d6 | ||
|
|
7c80b0a335 | ||
|
|
7eb5a67b3d | ||
|
|
37640a925e | ||
|
|
c446955b8d | ||
|
|
0895abd894 | ||
|
|
f7c04aff1e | ||
|
|
89ca4aab3d | ||
|
|
a4dc0d581a | ||
|
|
a889ff3469 | ||
|
|
320ef83bfc | ||
|
|
8849fad8f9 | ||
|
|
9839087306 | ||
|
|
d31e28be70 | ||
|
|
26c2ae81ea | ||
|
|
922932d240 | ||
|
|
28fbdc611e | ||
|
|
99c7dc8b85 | ||
|
|
ef0816bdce | ||
|
|
e99ebf6ef0 | ||
|
|
ef44f8066b | ||
|
|
47d5189812 | ||
|
|
d71ef42ded | ||
|
|
e37091654f | ||
|
|
dcd097d67e | ||
|
|
b5261cdbda | ||
|
|
dc40522ea7 | ||
|
|
de44b2d794 | ||
|
|
1117d45f8a | ||
|
|
294cc23179 | ||
|
|
bd74d85560 | ||
|
|
3a119e13db | ||
|
|
b413f5e7e0 | ||
|
|
d75b9158bd | ||
|
|
b5b127f083 | ||
|
|
1206f9880e | ||
|
|
629af6bb36 | ||
|
|
08ca40aad9 | ||
|
|
fa4c0bf54a | ||
|
|
01f94925a5 | ||
|
|
ae83b19b28 | ||
|
|
9cdbfc53a8 | ||
|
|
a13dbea266 | ||
|
|
a236cfd7a8 | ||
|
|
27b4e46a16 | ||
|
|
9ddacb019e | ||
|
|
a4a32a54c3 | ||
|
|
8ff2a10c96 | ||
|
|
586eda6199 | ||
|
|
a522c3479e | ||
|
|
e5a2ddd777 | ||
|
|
77fb995c4c | ||
|
|
0494e221af | ||
|
|
6e77b6f656 | ||
|
|
dbcf03535d | ||
|
|
a644753073 | ||
|
|
23b5ea0eee | ||
|
|
a2b6ff6d42 | ||
|
|
5ea067a1d8 | ||
|
|
8b924ece14 | ||
|
|
9615538389 | ||
|
|
9c53e2f5f1 | ||
|
|
81da59a8a4 | ||
|
|
22eab481b1 | ||
|
|
71cd8948d2 | ||
|
|
288e10f7fe | ||
|
|
a9e5560c36 | ||
|
|
fcd56c3ef0 | ||
|
|
7dc793c3be | ||
|
|
2fc880db19 | ||
|
|
60a453f5a0 | ||
|
|
32a587e4a3 | ||
|
|
8deed5d601 | ||
|
|
f8b4a391e3 | ||
|
|
2f3ed8ab65 | ||
|
|
306fc4ee61 | ||
|
|
5200e59ba3 | ||
|
|
d06dee2778 | ||
|
|
19105eedb2 | ||
|
|
a252050cb8 | ||
|
|
435bf3f2e4 | ||
|
|
1fcd5e9704 | ||
|
|
5188e9c4d0 | ||
|
|
1d57293511 | ||
|
|
ebbc388205 | ||
|
|
fb5f3f6bb0 | ||
|
|
5558451c11 | ||
|
|
5727235572 | ||
|
|
74fa2a7ab2 | ||
|
|
e49cc883bb | ||
|
|
3b54d71058 | ||
|
|
2a90c0225d | ||
|
|
f7e42bc4c4 | ||
|
|
2ffc505c19 | ||
|
|
154da1f68a | ||
|
|
b45a357652 | ||
|
|
7962cfa83e | ||
|
|
2d89ba9c87 | ||
|
|
00672554ed | ||
|
|
f2c0ff8979 | ||
|
|
dc52a32aad | ||
|
|
bd779534af | ||
|
|
cf0bd5bdc1 | ||
|
|
5dcc25693a | ||
|
|
1443f06471 | ||
|
|
63a6f2121e | ||
|
|
68fca2e5e5 | ||
|
|
42182cbe77 | ||
|
|
d08fa29612 | ||
|
|
311f435120 | ||
|
|
788ea66b1f | ||
|
|
fa075eb8f1 | ||
|
|
e1102bc6ff | ||
|
|
f92eadf9d6 | ||
|
|
34ec58af0a | ||
|
|
b6389fbf60 | ||
|
|
e26992e419 | ||
|
|
40ea74f46c | ||
|
|
971f3f1207 | ||
|
|
3a39036dcb | ||
|
|
3428ed1adf | ||
|
|
81e4cb44aa | ||
|
|
acb625ddeb | ||
|
|
44508380dc | ||
|
|
4d8414acfd | ||
|
|
70d0446190 | ||
|
|
793a630e2f | ||
|
|
2936391fc8 | ||
|
|
85826d0d9a | ||
|
|
0a20419628 | ||
|
|
2d4503ee59 | ||
|
|
010e620a34 | ||
|
|
3f6bad087d | ||
|
|
c523d2827c | ||
|
|
a53fea96ab | ||
|
|
0bb8538e2f | ||
|
|
03b3e98a51 | ||
|
|
e0963e6b66 | ||
|
|
6262db51a2 | ||
|
|
58df4ee985 | ||
|
|
85abc9bfe7 | ||
|
|
993c7075f3 | ||
|
|
4469a42a77 | ||
|
|
bf965f8465 | ||
|
|
f87a8c212f | ||
|
|
3663ba0259 | ||
|
|
b9900681e7 | ||
|
|
3edad8599c | ||
|
|
903f3d7e6e | ||
|
|
051e404d09 | ||
|
|
d1a853557b | ||
|
|
f441033959 | ||
|
|
0fa4954c46 | ||
|
|
59958b0f0a | ||
|
|
4549e42480 | ||
|
|
1620fd5408 | ||
|
|
1d692936e0 | ||
|
|
6153a17a64 | ||
|
|
b77590ba7a | ||
|
|
c9df553d02 | ||
|
|
967ac0f1d9 | ||
|
|
ebf2c77c50 | ||
|
|
c370a3e503 | ||
|
|
9e2608524d | ||
|
|
7fc6c99987 | ||
|
|
3ad5618596 | ||
|
|
4b02b0ddf1 | ||
|
|
1ac3f938de | ||
|
|
b422d86256 | ||
|
|
8ac4e04e12 | ||
|
|
d05cfba523 | ||
|
|
6f458fc9d6 | ||
|
|
a0d8c3c703 | ||
|
|
11ee26bb65 | ||
|
|
96e20f83bb | ||
|
|
e841a492c8 | ||
|
|
d93b0d319c | ||
|
|
a7c344bbc5 | ||
|
|
f64a231620 | ||
|
|
a8f9e2e919 | ||
|
|
9569096991 | ||
|
|
2722c277ee | ||
|
|
2eec8daff5 | ||
|
|
75fa56391d | ||
|
|
ec9cf27a81 | ||
|
|
0996da5e8e | ||
|
|
a8708e1c55 | ||
|
|
7c5e40e0ea | ||
|
|
e1d2b95459 | ||
|
|
9bd17f4fae | ||
|
|
40ec58787f | ||
|
|
304fae9369 | ||
|
|
72a7f57e5d | ||
|
|
0fee2ac499 | ||
|
|
708a86cfee | ||
|
|
04fcad7c13 | ||
|
|
ebbc4c499b | ||
|
|
3c8b051e31 | ||
|
|
d34e54785d | ||
|
|
51e74d4027 | ||
|
|
2d662f67a5 | ||
|
|
67cbbeb6c1 | ||
|
|
cc7493cac9 | ||
|
|
be96be95f6 | ||
|
|
6b144cd2eb | ||
|
|
38412b4460 | ||
|
|
b8287d3aca | ||
|
|
5eb4eea57e | ||
|
|
af3b5b77b1 | ||
|
|
5f75334d57 | ||
|
|
4481be72d1 | ||
|
|
c595a7ac0f | ||
|
|
fa3de81741 | ||
|
|
6094763def | ||
|
|
4e96dd7ea6 | ||
|
|
6e6e85632a | ||
|
|
6af9a11361 | ||
|
|
8377c7776c | ||
|
|
73cce3b174 | ||
|
|
947adb6d07 | ||
|
|
d0f1f084e8 | ||
|
|
c27d89218c | ||
|
|
15c5ddbec4 | ||
|
|
546679cbd1 | ||
|
|
b54c422b93 | ||
|
|
5049fdc13a | ||
|
|
d8bb7c8ae9 | ||
|
|
61d5423b5d | ||
|
|
d85012ecfd | ||
|
|
fb9ad1eb13 | ||
|
|
8764b89942 | ||
|
|
48bc82e82f | ||
|
|
e8d63890fc | ||
|
|
6ed08019c2 | ||
|
|
00d6f549f9 | ||
|
|
02a491c1bc | ||
|
|
ed25155fc1 | ||
|
|
e65a70ded9 | ||
|
|
3b49b81ff5 | ||
|
|
bdcc6cb20d | ||
|
|
e616f930d3 | ||
|
|
536d51183c | ||
|
|
6a3c1fbe57 | ||
|
|
2cca0f0eac | ||
|
|
cdb4e2541c | ||
|
|
9b03b75aaf | ||
|
|
f5072b7f3a | ||
|
|
b60bb724aa | ||
|
|
7d7f8aab93 | ||
|
|
3b133195fd | ||
|
|
18990530b0 | ||
|
|
b424364710 | ||
|
|
4fb05e54ab | ||
|
|
3ee5ad8b12 | ||
|
|
b73ea5eb0a | ||
|
|
e710d9f1b8 | ||
|
|
ae07c8677d | ||
|
|
2a24562f45 | ||
|
|
b7d27d9114 | ||
|
|
5169a06dd0 | ||
|
|
e868a001f9 | ||
|
|
a8526454b0 | ||
|
|
fabc5507f3 | ||
|
|
82bd20911c | ||
|
|
95d747269b | ||
|
|
d02dbd62e9 | ||
|
|
bcb9de9198 | ||
|
|
3558657e53 | ||
|
|
1187edeadb | ||
|
|
0c684c6f35 | ||
|
|
c1b863ee75 | ||
|
|
8922b0ecc6 | ||
|
|
6cd916ea39 | ||
|
|
4b18f64914 | ||
|
|
1e6a8a31d1 | ||
|
|
9e7a26500c | ||
|
|
5d862ac29b | ||
|
|
25b9a9e37d | ||
|
|
da7918554e | ||
|
|
e45eda148b | ||
|
|
b24308eab1 | ||
|
|
366399eb0c | ||
|
|
25615f929e | ||
|
|
667a056066 | ||
|
|
c2fbb37c8c | ||
|
|
45269e0e2d | ||
|
|
8f7eda43a8 | ||
|
|
339a86150b | ||
|
|
374e5d400d | ||
|
|
0e5727eeb3 | ||
|
|
9073724c2b | ||
|
|
92c8ba0497 | ||
|
|
efb26cb769 | ||
|
|
050e55c9d7 | ||
|
|
e402f41b33 | ||
|
|
859c1e752d | ||
|
|
198398ba88 | ||
|
|
5d2f307735 | ||
|
|
70bd23278b | ||
|
|
76bfdcf038 | ||
|
|
8e14da1759 | ||
|
|
24ecc29f49 | ||
|
|
4a23782f51 | ||
|
|
b619f9baa8 | ||
|
|
878d6df404 | ||
|
|
5e5ebc7914 | ||
|
|
e2155c8fee | ||
|
|
036747fba5 | ||
|
|
a8f93c454a | ||
|
|
aad72e575d | ||
|
|
b799630ba5 | ||
|
|
90748385c2 | ||
|
|
1d22cb8518 | ||
|
|
4832cc6d63 | ||
|
|
f8226bf1bb | ||
|
|
6cfcc01334 | ||
|
|
f8b2f6ca5c | ||
|
|
d9a2207ebe | ||
|
|
1be097628f | ||
|
|
c51a55b0e5 | ||
|
|
f88852cff6 | ||
|
|
8d266f5550 | ||
|
|
b9e86197f2 | ||
|
|
b9e4faa1aa | ||
|
|
625b7a25b0 | ||
|
|
0e6b393896 | ||
|
|
109761e973 | ||
|
|
fd5557f44c | ||
|
|
79d28b4709 | ||
|
|
5cf84e6702 | ||
|
|
f218216a2c | ||
|
|
5f99b61f07 | ||
|
|
a5fa06ebb1 | ||
|
|
a0d3c8e20b | ||
|
|
1ece207400 | ||
|
|
91641c2cf3 | ||
|
|
4045ee474d | ||
|
|
e3b364c055 | ||
|
|
89c31c43ca | ||
|
|
0d1e643e1c | ||
|
|
f6b4f11ebe | ||
|
|
908198c25d | ||
|
|
f4cb740aac | ||
|
|
a2d0235d68 | ||
|
|
bda692174a | ||
|
|
e7e47a8b85 | ||
|
|
32a8bf50b7 | ||
|
|
b0818f97f2 | ||
|
|
ea45e43082 | ||
|
|
1ad94dec1c | ||
|
|
995aef2577 | ||
|
|
5817e204b4 | ||
|
|
50b5a2b8d8 | ||
|
|
8a9a4aba77 | ||
|
|
4ad2d1a048 | ||
|
|
07296490b4 | ||
|
|
d3b2764ff6 | ||
|
|
6c51b8ae6a | ||
|
|
4fdc3667a3 | ||
|
|
fd8c3514d6 | ||
|
|
c2700863ca | ||
|
|
18d32248ab | ||
|
|
d8a59d7cd1 | ||
|
|
4213beea4b | ||
|
|
967777b965 | ||
|
|
ba18c630b7 |
161
COMPLIANCE
Normal file
161
COMPLIANCE
Normal file
@@ -0,0 +1,161 @@
|
||||
Metacity Standards Compliance
|
||||
=============================
|
||||
$Id$
|
||||
|
||||
1) Introduction
|
||||
2) EWMH Compliance
|
||||
a. Root Window Properties
|
||||
b. Root Window Messages
|
||||
c. Application Window Properties
|
||||
d. Window Manager Protocols
|
||||
3) ICCCM Compliance
|
||||
|
||||
1) Introduction
|
||||
---------------
|
||||
|
||||
This document details metacity compliance with the relevent standards.
|
||||
The format of this document is as follows:
|
||||
|
||||
[-/+?] Hint Name/Feature Name (Version number)
|
||||
Errata/Comments
|
||||
|
||||
The first character indicates the level of compliance as follows:
|
||||
- none
|
||||
/ partial
|
||||
+ complete
|
||||
? unknown
|
||||
|
||||
The title indicates a feature or a hint in the specification, and the
|
||||
version number indicates the minimum version of the specification
|
||||
supported by metacity. Later versions may be supported if no
|
||||
incompatible changes have been made in the specification.
|
||||
|
||||
2) EWMH Compliance
|
||||
------------------
|
||||
|
||||
The EWMH, or Extended Window Manager Hints is a freedesktop.org-
|
||||
developed standard to support a number of conventions for
|
||||
communication between the window manager and clients. It builds on
|
||||
and extends the ICCCM (See Section 3). A copy of the current EWMH
|
||||
standard is available at http://freedesktop.org/Standards/wm-spec/
|
||||
|
||||
a. Root Window Properties
|
||||
-------------------------
|
||||
|
||||
+ _NET_SUPPORTED (1.3)
|
||||
|
||||
+ _NET_CLIENT_LIST (1.3)
|
||||
|
||||
+ _NET_NUMBER_OF_DESKTOPS (1.3)
|
||||
|
||||
- _NET_DESKTOP_GEOMETRY (-)
|
||||
Metacity does not implement large desktops. Regardless, according
|
||||
to the specification, metacity SHOULD set this property to the
|
||||
screen size, and update it if the screen size changes because of a
|
||||
RandR change.
|
||||
|
||||
- _NET_DESKTOP_VIEWPORT (-)
|
||||
Metacity does not implement viewports. However, according to the
|
||||
specification, metacity MUST set this property to (0,0)
|
||||
|
||||
+ _NET_CURRENT_DESKTOP (1.3)
|
||||
|
||||
+ _NET_DESKTOP_NAMES (1.3)
|
||||
|
||||
+ _NET_ACTIVE_WINDOW (1.3)
|
||||
|
||||
+ _NET_WORKAREA (1.3)
|
||||
|
||||
+ _NET_SUPPORTING_WM_CHECK (1.3)
|
||||
|
||||
+ _NET_VIRTUAL_ROOTS (1.3)
|
||||
Metacity does not read or set this property, but it does not use
|
||||
virtual roots to implement virtual desktops, so it complies with the
|
||||
specification.
|
||||
|
||||
+ _NET_DESKTOP_LAYOUT (1.3)
|
||||
|
||||
+ _NET_SHOWING_DESKTOP (1.3)
|
||||
|
||||
b. Root Window Messages
|
||||
-----------------------
|
||||
|
||||
+ _NET_CLOSE_WINDOW (1.3)
|
||||
|
||||
- _NET_MOVERESIZE_WINDOW (-)
|
||||
Metacity does not support this message. The specification states
|
||||
that metacity should treat this message like a ConfigureRequest.
|
||||
Not hard to implement; just hasn't been done.
|
||||
|
||||
+ _NET_WM_MOVERESIZE (1.3)
|
||||
|
||||
- _NET_RESTACK_WINDOW (-)
|
||||
Metacity does not currently support this message.
|
||||
|
||||
+ _NET_REQUEST_FRAME_EXTENTS (1.3)
|
||||
|
||||
c. Application Window Properties
|
||||
--------------------------------
|
||||
|
||||
+ _NET_WM_NAME (1.3)
|
||||
|
||||
+ _NET_WM_VISIBLE_NAME (1.3)
|
||||
Metacity does not set this property, but metacity will never display
|
||||
a name different from _NET_WM_NAME
|
||||
|
||||
+ _NET_WM_ICON_NAME (1.3)
|
||||
|
||||
+ _NET_WM_VISIBLE_ICON_NAME (1.3)
|
||||
Metacity does not set this property, but metacity will never display
|
||||
a name different from _NET_WM_NAME
|
||||
|
||||
+ _NET_WM_DESKTOP (1.3)
|
||||
|
||||
+ _NET_WM_WINDOW_TYPE (1.3)
|
||||
|
||||
/ _NET_WM_STATE (1.3)
|
||||
Metacity does not recognize separate vertical and horizontal
|
||||
maximization states. Currently metacity will do a two-dimensional
|
||||
maximization if either property is set.
|
||||
See: http://bugzilla.gnome.org/show_bug.cgi?id=113601
|
||||
Metacity doesn't implement viewports so _NET_WM_STATE_STICKY is
|
||||
unimplemented.
|
||||
_NET_WM_STATE_DEMANDS_ATTENTION is neither read nor updated by
|
||||
metacity. Metacity should unset it on window activation.
|
||||
|
||||
+ _NET_WM_ALLOWED_ACTIONS (1.3)
|
||||
Metacity keeps this hint up to date. The code is somewhat crufty
|
||||
and should be rewritten, though it is functional.
|
||||
See: http://bugzilla.gnome.org/show_bug.cgi?id=90420
|
||||
|
||||
+ _NET_WM_STRUT (1.3)
|
||||
|
||||
+ _NET_WM_STRUT_PARTIAL (1.3)
|
||||
|
||||
+ _NET_WM_ICON_GEOMETRY (1.3)
|
||||
Metacity uses this property to draw minimize/restore animations
|
||||
|
||||
+ _NET_WM_ICON (1.3)
|
||||
|
||||
+ _NET_WM_PID (1.3)
|
||||
|
||||
+ _NET_WM_HANDLED_ICONS (1.3)
|
||||
Metacity does not read or set this property. However, metacity
|
||||
never managed iconified windows, and so has no need to do so.
|
||||
|
||||
- _NET_WM_USER_TIME (-)
|
||||
Metacity does not read or set this property. The EWMH does not
|
||||
require it to do so, but it should support it.
|
||||
|
||||
+ _NET_FRAME_EXTENTS (1.3)
|
||||
If set in response to a _NET_REQUEST_FRAME_EXTENTS message received
|
||||
prior to the window being mapped, this may be an estimate. This is,
|
||||
however, expressly allowed by the specification.
|
||||
|
||||
d. Window Manager Protocols
|
||||
---------------------------
|
||||
+ _NET_WM_PING (1.3)
|
||||
|
||||
3) ICCCM Compliance
|
||||
-------------------
|
||||
TODO
|
||||
44
HACKING
44
HACKING
@@ -1,3 +1,40 @@
|
||||
Making a release
|
||||
===
|
||||
|
||||
To make a release of metacity, do the following:
|
||||
|
||||
- check out a fresh copy from CVS
|
||||
|
||||
- increment the version number in configure.in,
|
||||
see the comment above the version for the next fibonacci number
|
||||
|
||||
- update the file NEWS based on the ChangeLog
|
||||
|
||||
- add a ChangeLog entry containing the version number
|
||||
you're releasing ("Released 2.5.4" or something)
|
||||
so people can see which changes were before and after
|
||||
a given release.
|
||||
|
||||
- "make distcheck" (DO NOT just "make dist" - pass the check!)
|
||||
|
||||
- if make distcheck fails, fix it.
|
||||
|
||||
- once distcheck succeeds, "cvs commit"
|
||||
|
||||
- if someone else made changes and the commit fails,
|
||||
you have to "cvs up" and run "make distcheck" again
|
||||
|
||||
- once the commit succeeds, WITHOUT cvs updating, "cvs tag
|
||||
METACITY_X_Y_Z" where
|
||||
X_Y_Z map to version X.Y.Z
|
||||
|
||||
- scp the tarball to master.gnome.org
|
||||
|
||||
- run install-module on master.gnome.org to install the tarball
|
||||
on the ftp site
|
||||
|
||||
Misc stuff
|
||||
===
|
||||
|
||||
Don't commit substantive code in here without asking me,
|
||||
hp@redhat.com. Adding translations, no-brainer typo fixes, etc. is
|
||||
@@ -64,4 +101,9 @@ be NULL.
|
||||
|
||||
The code could use cleanup in a lot of places, feel free to do so.
|
||||
|
||||
|
||||
Metacity is ideally a fully ICCCM and EWMH-compliant window manager.
|
||||
Reading these specifications is a useful first step to understanding
|
||||
the role of a window manager on an X11 desktop and the standards and
|
||||
conventions on which X11 desktops are based. Please refer to the
|
||||
COMPLIANCE file for additional information on these specifications and
|
||||
metacity's compliance therewith.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
SUBDIRS=src po doc
|
||||
|
||||
EXTRA_DIST=HACKING metacity.spec.in metacity.spec \
|
||||
EXTRA_DIST=HACKING rationales.txt \
|
||||
intltool-extract.in intltool-merge.in intltool-update.in
|
||||
|
||||
236
NEWS
236
NEWS
@@ -1 +1,235 @@
|
||||
See README.
|
||||
2.8.1
|
||||
===
|
||||
|
||||
Thanks to Olivier Crete, Jarrod Johnson, Neil Muller, Elijah Newren,
|
||||
Mark McLoughlin, Rob Adams, and foser AT gentoo.org for fixes in this
|
||||
release.
|
||||
|
||||
- make the --enable-xinerama switch work properly
|
||||
- prevent unwanted grab op from occurring
|
||||
- don't down-size nitems from a gulong to an int
|
||||
- add a value type check for the visual/audible bell gconf settings
|
||||
- make the no sm support warning resizable
|
||||
- more translations
|
||||
|
||||
2.8.0
|
||||
===
|
||||
|
||||
No code changes in this release, but some new translations.
|
||||
|
||||
2.7.1
|
||||
===
|
||||
|
||||
Thanks to Rob Adams for fixes in this release.
|
||||
|
||||
- bug #122016 - fix a focus race
|
||||
- Change move_to_workspace_left/right/up/down keybindings to
|
||||
<Control><Alt><Shift> arrow to avoid conflicting with new
|
||||
keybindings in spacial nautilus.
|
||||
- fix dialog stacking order issues so e.g. panel properties
|
||||
dialog is above the panel
|
||||
|
||||
2.7.0
|
||||
===
|
||||
|
||||
First unstable release tarball for GNOME 2.6.
|
||||
|
||||
Thanks to Anders Carlsson, Elijah Newren, Rob Adams, James Cape,
|
||||
Thomas Fitzimmons, Calum Benson for fixes in this release.
|
||||
|
||||
2.6.2
|
||||
===
|
||||
|
||||
Thanks to Yukihiro Nakai, Rached Ben Mustapha, Gwenole Beauchesne,
|
||||
Padraig O'Briain, Laurent Vivier, Rob Adams for contributions to this
|
||||
release.
|
||||
|
||||
- fix to repaint after resize always, so on maximize
|
||||
and theme changes we get things drawn properly
|
||||
- fix a compile issue on HPUX
|
||||
- fix translations of metacity-message output
|
||||
- fix to update window icons when they change
|
||||
- put a limit on number of characters displayed in
|
||||
window titles during Alt+tab
|
||||
- fix configure check for Xrandr
|
||||
- fix 64-bit bug in property reading that broke
|
||||
things badly on 64-bit
|
||||
- don't move focus when clicking close button on a window
|
||||
- fix a crash in getting pixmap icons
|
||||
- spawn dialogs and child processes on the proper
|
||||
screen in multihead situations
|
||||
- if the focus gets set to None, set it back to
|
||||
something sane
|
||||
- load accessibility modules and set accessibility roles
|
||||
- fix hang after displaying warning dialogs
|
||||
- fix a memory corruption when sticking/unsticking windows
|
||||
that lead to a frequent crash and windows appearing
|
||||
in Alt+tab improperly
|
||||
- fix some handling of partial-width panel struts
|
||||
- more translations
|
||||
|
||||
2.6.1
|
||||
===
|
||||
|
||||
- rebuild with fixed glib-gettext.m4
|
||||
|
||||
2.6.0
|
||||
===
|
||||
|
||||
- some additional translations
|
||||
|
||||
2.5.5
|
||||
===
|
||||
|
||||
Thanks to Rob Adams, Arvind Samptur, Andreas Volz, Ray Strode, John
|
||||
Paul Wallington, Soeren Sandmann for contributions to this release.
|
||||
And as always thanks to the translators.
|
||||
|
||||
- fix aspect ratio handling
|
||||
- fix "shake loose" functionality for maximized windows
|
||||
- handle Xrandr size changes properly again
|
||||
- fix fullscreen window detection
|
||||
- fix workspace name handling
|
||||
- don't steal button press events on root window
|
||||
- nuke metacity.spec due to nonmaintenance
|
||||
- allow too-large-for-screen windows to move their titlebar offscreen
|
||||
- keep an MRU list of windows per-workspace and use it to focus
|
||||
the next window when the focused window disappears
|
||||
- fix cursor when moving
|
||||
- improve appearance of opaque resize
|
||||
- make BELOW window state work
|
||||
- fix a crash when gdk_pixmap_foreign_new() returned NULL
|
||||
|
||||
2.5.3
|
||||
===
|
||||
|
||||
Thanks to Jordi Mallach, Padraig O'Briain, Rob Adams, Julio Merino,
|
||||
Ben Jansens, Jurg Billeter, Ray Strode, marcus@freebsd.org, James
|
||||
Laska, for contributions to this release. Thanks also to
|
||||
all the tireless translators.
|
||||
|
||||
- fixups to .desktop file
|
||||
- activate window prior to grab end, avoiding
|
||||
extra focus events
|
||||
- add support for partial-width panels (fixes corner panel
|
||||
and xinerama window position constraints)
|
||||
- added keybinding to toggle window as "always on top"
|
||||
- support --disable-schemas-install option to configure
|
||||
- destroy support for legacy GNOME 1.x hints; metacity
|
||||
no longer works with GNOME 1.x
|
||||
- disable raise-on-click for mouse focus modes
|
||||
- fix bug that broke many Javascript popup menus with mozilla
|
||||
- allow "shaking loose" maximized windows, to move them
|
||||
between Xinerama heads or whatever
|
||||
- honor desktop-wide double click timeout
|
||||
- handle window placement properly for windows that
|
||||
start out maximized
|
||||
- integrate Ximian patch to go ahead and log out after 4 minutes
|
||||
even if a dialog is open
|
||||
- fix a segfault
|
||||
- fix bug where window groups weren't always kept up to date
|
||||
- fix bug where focus got confused when switching workspaces
|
||||
with mouse focus mode
|
||||
- fix 64-bit crash on s390x
|
||||
- chdir to user's homedir on startup
|
||||
- keep window in fullscreen layer when its transients are focused
|
||||
- fix keybindings bug when you had ScrollLock enabled
|
||||
- many translation updates
|
||||
|
||||
2.5.2
|
||||
===
|
||||
|
||||
Thanks to David Santiago, Julien Olivier, Anders Carlsson, Rob Adams
|
||||
for fixes in this release.
|
||||
|
||||
- improved wording/UI for some dialogs
|
||||
- while clicking a window button, if you move the mouse outside
|
||||
the button such that releasing the mouse button won't activate
|
||||
the window button, visually indicate by "popping out" the button.
|
||||
- fix some valgrind errors
|
||||
- change "show desktop mode" to convert to "everything is minimized
|
||||
mode" if you open a new window while showing desktop, rather
|
||||
than previous behavior of simply leaving show desktop mode.
|
||||
- fix a trivial memory leak
|
||||
- change "move to workspace N" so it doesn't switch workspaces,
|
||||
just moves the window.
|
||||
- translation updates
|
||||
|
||||
2.5.1
|
||||
===
|
||||
|
||||
Thanks to Rob Adams, Peter O'Shea, Dafydd Harries, Masahiro Sakai,
|
||||
Soeren Sandmann for fixes in this release.
|
||||
|
||||
- fix bug where fullscreen windows were below top panels
|
||||
- build fix for Solaris
|
||||
- support diagonal window movement with numeric keypad
|
||||
- multihead fix
|
||||
- build fix for Cygwin
|
||||
- place on xinerama containing the pointer
|
||||
- fix totally hosed window placement/movement for frameless
|
||||
windows
|
||||
- improvement to smoothness of window move/resize
|
||||
|
||||
2.5.0
|
||||
===
|
||||
|
||||
Thanks to Rob Adams, Owen Taylor, Frederic Crozat, Arvind Samptur,
|
||||
Bill Haneman, Akira Tagoh for help with fixes in this release.
|
||||
|
||||
- many new translations
|
||||
- fix an infinite loop while holding a server grab triggered by
|
||||
some recent Qt versions doing weird stuff
|
||||
- fix bug where Alt+rightclick repeatedly on titlebar resulted
|
||||
in zillions of menus
|
||||
- fix Alt+Tab to *actually* put minimized windows at the end,
|
||||
though this was always intended
|
||||
- rewrite size/positions constraint code (currently known
|
||||
to be quite buggy, e.g. xmms is hosed)
|
||||
- enforce size of at least 1x1 on windows
|
||||
- reduce latency of managing new windows still further
|
||||
by using async properties code in more places
|
||||
- don't grab keybindings on docks, so gnome-panel
|
||||
can handle them
|
||||
- suck in the panel's screenshot and run dialog global
|
||||
bindings
|
||||
- lots of improvements to window placement
|
||||
- sync max number of workspaces with pager applet
|
||||
- fix to keep focus when inside window frame in
|
||||
strict mouse focus mode
|
||||
- make it possible to start a reverse tab with
|
||||
shift+alt+tab (vs. alt+tab then shift)
|
||||
- fix a multihead issue with constraints between two
|
||||
windows on different heads
|
||||
- require GTK+ 2.2.0 and fontconfig
|
||||
- default theme is now Simple
|
||||
- add visual bell feature
|
||||
- incorporate many fixes from 2.4.34
|
||||
- other stuff
|
||||
|
||||
2.4.13
|
||||
===
|
||||
|
||||
- we were making all dialogs skip the taskbar, even non-transient
|
||||
ones, though this was supposedly fixed a while ago. Now really
|
||||
fixed.
|
||||
- change back to Alt+click by default for the window drag feature.
|
||||
- assign Alt+F12 to shade window
|
||||
- fix not deleting enough workspaces when the number
|
||||
was reduced via the pager config dialog (readams@hmc.edu)
|
||||
- don't allow windows under the top panel ever, even if they
|
||||
are tall windows (Arvind)
|
||||
- fix up the window layout for directional workspace nav,
|
||||
so you always stop at the edges and always end up
|
||||
where you expect (hp, with tweaks from readams@hmc.edu)
|
||||
- focus new windows in mouse focus mode (readams@hmc.edu)
|
||||
- support xeyes, oclock, etc. by applying shape mask
|
||||
to the window manager frame (yeah it resizes slow, deal)
|
||||
- fix vertical/horizontal maximize
|
||||
- handle crossing events resizing for more opaque resize goodness
|
||||
(Soeren)
|
||||
- add wacky _METACITY_UPDATE_COUNTER experimental extension
|
||||
to do nice opaque resizing (does nothing without a GTK patch)
|
||||
- fix a crash setting workspace names
|
||||
- fix internationalized WM_NAME reading
|
||||
|
||||
|
||||
53
README
53
README
@@ -6,15 +6,18 @@ 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.x
|
||||
|
||||
Unstable branches are 2.3.x, 2.5.x
|
||||
|
||||
COMPILING METACITY
|
||||
===
|
||||
|
||||
You need GTK+ 2.0, ideally the latest in the 2.0.x series. For
|
||||
multihead/Xinerama support to work, you need GTK+ 2.1.x or 2.2. For
|
||||
startup notification to work you need libstartup-notification at
|
||||
You need GTK+ 2.2. For startup notification to work you need
|
||||
libstartup-notification at
|
||||
http://www.freedesktop.org/software/startup-notification/ or on the
|
||||
GNOME ftp site. You also need GConf 1.2 (unless building a funky
|
||||
extra-small embedded metacity with --disable-gconf).
|
||||
GNOME ftp site. You also need GConf 1.2 (unless building a funky
|
||||
extra-small embedded metacity with --disable-gconf, see below).
|
||||
|
||||
REPORTING BUGS AND SUBMITTING PATCHES
|
||||
===
|
||||
@@ -36,9 +39,9 @@ See the HACKING file for some notes on hacking Metacity.
|
||||
SHRINKING METACITY
|
||||
===
|
||||
|
||||
Not that metacity is huge (<400K binary last I checked), but about
|
||||
half of that is in the preferences handling, in static strings that
|
||||
aren't essential, and in the theme engine.
|
||||
Not that metacity is huge, but a substantial amount of code is in
|
||||
preferences handling, in static strings that aren't essential, and in
|
||||
the theme engine.
|
||||
|
||||
You can strip about 70K from the metacity binary by compiling with
|
||||
options such as:
|
||||
@@ -78,7 +81,7 @@ METACITY FEATURES
|
||||
- Does not expose the concept of "window manager" to the user. Some
|
||||
of the features in the GNOME control panel and other parts of the
|
||||
desktop happen to be implemented in metacity, such as changing your
|
||||
window border theme, or changing your window navigation shorcuts,
|
||||
window border theme, or changing your window navigation shortcuts,
|
||||
but the user doesn't need to know this.
|
||||
|
||||
- Includes only the window manager; does not try to be a desktop
|
||||
@@ -184,11 +187,10 @@ METACITY FEATURES
|
||||
be respawned. It theoretically restores sizes/positions/workspace
|
||||
for session-aware applications.
|
||||
|
||||
- Metacity implements much of the new window manager spec from
|
||||
freedesktop.org
|
||||
(http://www.freedesktop.org/standards/wm-spec.html), and much of
|
||||
the ICCCM. But then there are parts of each that it doesn't
|
||||
implement, just because I haven't yet.
|
||||
- Metacity implements much of the EWMH window manager specification
|
||||
from freedesktop.org, as well as the older ICCCM. Please refer to
|
||||
the COMPLIANCE file for information on metacity compliance with
|
||||
these standards.
|
||||
|
||||
- Uses Pango to render text, so has cool i18n capabilities.
|
||||
Supports UTF-8 window titles and such.
|
||||
@@ -213,6 +215,20 @@ METACITY FEATURES
|
||||
|
||||
- and much more! well, maybe not a lot more.
|
||||
|
||||
HOW TO ADD EXTERNAL FEATURES
|
||||
===
|
||||
|
||||
You can write a metacity "plugin" such as a pager, window list, icon
|
||||
box, task menu, or even things like "window matching" using the
|
||||
Extended Window Manager Hints. See http://www.freedesktop.org for the
|
||||
EWMH specification. An easy-to-use library called "libwnck" is
|
||||
available that uses the EWMH and is specifically designed for writing
|
||||
WM accessories.
|
||||
|
||||
You might be interested in existing accessories such as "Devil's Pie"
|
||||
by Ross Burton, which add features to Metacity (or other
|
||||
EWMH-compliant WMs).
|
||||
|
||||
METACITY BUGS, NON-FEATURES, AND CAVEATS
|
||||
===
|
||||
|
||||
@@ -353,9 +369,11 @@ A: This one is also in rationales.txt. Because "ouija board" UI, where
|
||||
http://pobox.com/~hp/free-software-ui.html
|
||||
http://pobox.com/~hp/features.html
|
||||
|
||||
Q: Why no wireframe move/resize?
|
||||
Q: Why does wireframe move/resize suck?
|
||||
|
||||
A: Also in rationales.txt. Because it has low usability, and is a pain
|
||||
A: You can turn it on with the reduced_resources setting.
|
||||
|
||||
But: it has low usability, and is a pain
|
||||
to implement, and there's no reason opaque move/resize should be a
|
||||
problem on any setup that can run a modern desktop worth a darn to
|
||||
begin with.
|
||||
@@ -364,6 +382,9 @@ A: Also in rationales.txt. Because it has low usability, and is a pain
|
||||
http://pobox.com/~hp/free-software-ui.html
|
||||
http://pobox.com/~hp/features.html
|
||||
|
||||
The reason we had to add wireframe anyway was broken
|
||||
proprietary apps that can't handle lots of resize events.
|
||||
|
||||
Q: Why no XYZ?
|
||||
|
||||
A: You are probably getting the idea by now - check rationales.txt,
|
||||
|
||||
218
configure.in
218
configure.in
@@ -4,7 +4,8 @@ AC_INIT(src/display.c)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
AM_INIT_AUTOMAKE(metacity, 2.4.8)
|
||||
# releases on a branch add a 4th version like 2.4.21.1
|
||||
AM_INIT_AUTOMAKE(metacity, 2.8.1)
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
@@ -19,8 +20,24 @@ AC_PROG_INTLTOOL([0.21])
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AC_HEADER_STDC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
#### Integer sizes
|
||||
|
||||
AC_CHECK_SIZEOF(char)
|
||||
AC_CHECK_SIZEOF(short)
|
||||
AC_CHECK_SIZEOF(long)
|
||||
AC_CHECK_SIZEOF(int)
|
||||
AC_CHECK_SIZEOF(void *)
|
||||
AC_CHECK_SIZEOF(long long)
|
||||
AC_CHECK_SIZEOF(__int64)
|
||||
|
||||
## byte order
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
#### Warnings
|
||||
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
@@ -82,44 +99,56 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.0.0'
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0'
|
||||
|
||||
AC_ARG_ENABLE(config-dialog, [ --enable-config-dialog enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)],enable_config_dialog=yes,enable_config_dialog=no)
|
||||
AC_ARG_ENABLE(config-dialog, [ --enable-config-dialog enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)],,enable_config_dialog=no)
|
||||
|
||||
AM_CONDITIONAL(BUILD_CONFIG_DIALOG, test x$enable_config_dialog = xyes)
|
||||
if test x$enable_config_dialog = xyes; then
|
||||
AC_DEFINE(BUILD_CONFIG_DIALOG,1,[Build configuration dialog])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(gconf, [ --disable-gconf disable gconf usage, for embedded/size-sensitive non-GNOME builds],enable_gconf=no,enable_gconf=yes)
|
||||
AC_ARG_ENABLE(gconf, [ --disable-gconf disable gconf usage, for embedded/size-sensitive non-GNOME builds],,enable_gconf=yes)
|
||||
|
||||
if test x$enable_gconf = xyes; then
|
||||
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES gconf-2.0 >= 1.2.0"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(verbose-mode, [ --disable-verbose disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds],enable_verbose_mode=no,enable_verbose_mode=yes)
|
||||
AC_ARG_ENABLE(verbose-mode, [ --disable-verbose disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds],,enable_verbose_mode=yes)
|
||||
|
||||
if test x$enable_verbose_mode = xyes; then
|
||||
AC_DEFINE(WITH_VERBOSE_MODE,1,[Build with verbose mode support])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(sm, [ --disable-sm disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds],enable_sm=no,enable_sm=auto)
|
||||
AC_ARG_ENABLE(sm, [ --disable-sm disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds],,enable_sm=auto)
|
||||
|
||||
AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds],enable_startup_notification=no,enable_startup_notification=auto)
|
||||
AC_ARG_ENABLE(startup-notification, [ --disable-startup-notification disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds],,enable_startup_notification=auto)
|
||||
|
||||
AC_ARG_ENABLE(compositor, [ --disable-compositor disable metacity's compositing manager],,enable_compositor=auto)
|
||||
|
||||
AC_ARG_ENABLE(xsync, [ --disable-xsync disable metacity's use of the XSync extension],,enable_xsync=auto)
|
||||
|
||||
AC_ARG_ENABLE(shape, [ --disable-shape disable metacity's use of the shaped window extension],,enable_shape=auto)
|
||||
|
||||
## try definining HAVE_BACKTRACE
|
||||
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
|
||||
|
||||
ALL_LINGUAS="az ca cs da de el es fr gl hu it ja ko lv ms no pl pt pt_BR ro ru sk sv tr uk vi zh_CN zh_TW"
|
||||
ALL_LINGUAS="am ar az be bg bn ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja ko lt lv mk ml mn ms nl nn no pa pl pt pt_BR ro ru sl sk sq sr sr@Latn sv ta th tr uk vi wa zh_CN zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
## here we get the flags we'll actually use
|
||||
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.0.0)
|
||||
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.0.0)
|
||||
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.2.0)
|
||||
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.2.0)
|
||||
|
||||
if test x$enable_config_dialog = xyes; then
|
||||
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libglade-2.0)
|
||||
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.2.0 gconf-2.0 >= 1.1.9 libglade-2.0)
|
||||
fi
|
||||
|
||||
if $PKG_CONFIG --atleast-version 1.2.0 pangoxft; then
|
||||
echo "pangoxft found"
|
||||
else
|
||||
AC_MSG_ERROR("Pango 1.2.0 or greater based on Xft2 is required")
|
||||
fi
|
||||
|
||||
STARTUP_NOTIFICATION_VERSION=0.4
|
||||
@@ -148,14 +177,33 @@ else
|
||||
echo "Building without libstartup-notification"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
|
||||
|
||||
if $PKG_CONFIG --atleast-version 2.1.0 gtk+-2.0; then
|
||||
AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
|
||||
with_multihead=yes
|
||||
XCOMPOSITE_VERSION=1.0
|
||||
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
|
||||
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
|
||||
have_xcomposite=yes
|
||||
else
|
||||
with_multihead=no
|
||||
have_xcomposite=no
|
||||
fi
|
||||
AC_MSG_RESULT($have_xcomposite)
|
||||
|
||||
if test x$enable_compositor = xyes; then
|
||||
have_xcomposite=yes
|
||||
echo "CompositeExt support forced on"
|
||||
elif test x$enable_compositor = xauto; then
|
||||
true
|
||||
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"
|
||||
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
|
||||
else
|
||||
echo "Building without compositing manager"
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
|
||||
|
||||
AC_PATH_XTRA
|
||||
|
||||
@@ -165,46 +213,51 @@ ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
metacity_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
|
||||
AC_ARG_ENABLE(xinerama,[ --disable-xinerama disable metacity's use of the Xinerama extension],
|
||||
try_xinerama=$enable_xinerama,try_xinerama=yes)
|
||||
|
||||
use_solaris_xinerama=no
|
||||
use_xfree_xinerama=no
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
use_solaris_xinerama=yes
|
||||
AC_CHECK_LIB(Xext, XineramaGetInfo,
|
||||
use_solaris_xinerama=yes, use_solaris_xinerama=no,
|
||||
$ALL_X_LIBS)
|
||||
if test "x$use_solaris_xinerama" = "xyes"; then
|
||||
AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
|
||||
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
|
||||
fi
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, , [Have Solaris-style Xinerama])
|
||||
AC_DEFINE(HAVE_XINERAMA, , [Have some version of Xinerama]),
|
||||
use_solaris_xinerama=no,
|
||||
[#include <X11/Xlib.h>])
|
||||
fi
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
AC_MSG_RESULT($use_solaris_xinerama);
|
||||
;;
|
||||
*)
|
||||
# Check for XFree
|
||||
use_xfree_xinerama=yes
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS"
|
||||
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
|
||||
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
|
||||
fi
|
||||
AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama])
|
||||
AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]),
|
||||
use_xfree_xinerama=no,
|
||||
[#include <X11/Xlib.h>])],
|
||||
use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
AC_MSG_RESULT($use_xfree_xinerama);
|
||||
;;
|
||||
esac
|
||||
if test "${try_xinerama}" != no; then
|
||||
case "$host" in
|
||||
*-*-solaris*)
|
||||
# Check for solaris
|
||||
use_solaris_xinerama=yes
|
||||
AC_CHECK_LIB(Xext, XineramaGetInfo,
|
||||
use_solaris_xinerama=yes, use_solaris_xinerama=no,
|
||||
$ALL_X_LIBS)
|
||||
if test "x$use_solaris_xinerama" = "xyes"; then
|
||||
AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
||||
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
|
||||
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
|
||||
fi
|
||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, , [Have Solaris-style Xinerama])
|
||||
AC_DEFINE(HAVE_XINERAMA, , [Have some version of Xinerama]),
|
||||
use_solaris_xinerama=no,
|
||||
[#include <X11/Xlib.h>])
|
||||
fi
|
||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
||||
AC_MSG_RESULT($use_solaris_xinerama);
|
||||
;;
|
||||
*)
|
||||
# Check for XFree
|
||||
use_xfree_xinerama=yes
|
||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||
X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS"
|
||||
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
|
||||
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
|
||||
fi
|
||||
AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama])
|
||||
AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]),
|
||||
use_xfree_xinerama=no,
|
||||
[#include <X11/Xlib.h>])],
|
||||
use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
|
||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
||||
AC_MSG_RESULT($use_xfree_xinerama);
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CPPFLAGS="$metacity_save_cppflags"
|
||||
|
||||
@@ -215,23 +268,69 @@ AC_CHECK_LIB(Xext, XShapeQueryExtension,
|
||||
SHAPE_LIBS=-lXext found_shape=yes)],
|
||||
, $ALL_X_LIBS)
|
||||
|
||||
if test x$enable_shape = xno; then
|
||||
found_shape=no
|
||||
fi
|
||||
|
||||
if test x$enable_shape = xyes; then
|
||||
if test "$found_shape" = "no"; then
|
||||
AC_MSG_ERROR([--enable-shape forced and Shape not found])
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$found_shape" = "xyes"; then
|
||||
AC_DEFINE(HAVE_SHAPE, , [Have the shape extension library])
|
||||
fi
|
||||
|
||||
found_xkb=no
|
||||
AC_CHECK_LIB(X11, XkbQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/XKBlib.h,
|
||||
found_xkb=yes)],
|
||||
, $ALL_X_LIBS)
|
||||
|
||||
if test "x$found_xkb" = "xyes"; then
|
||||
AC_DEFINE(HAVE_XKB, , [Have keyboard extension library])
|
||||
fi
|
||||
|
||||
|
||||
RANDR_LIBS=
|
||||
found_randr=no
|
||||
AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
|
||||
[AC_CHECK_HEADER(X11/extensions/Xrandr.h,
|
||||
RANDR_LIBS=-lXrandr found_randr=yes,,
|
||||
[#include <X11/Xlib.h>])],
|
||||
, -lXrender $ALL_X_LIBS)
|
||||
, -lXrender -lXext $ALL_X_LIBS)
|
||||
|
||||
if test "x$found_randr" = "xyes"; then
|
||||
AC_DEFINE(HAVE_RANDR, , [Have the Xrandr extension library])
|
||||
fi
|
||||
|
||||
METACITY_LIBS="$RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
|
||||
XSYNC_LIBS=
|
||||
found_xsync=no
|
||||
AC_CHECK_LIB(Xext, XSyncQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/extensions/sync.h,
|
||||
found_xsync=yes,,
|
||||
[#include <X11/Xlib.h>])],
|
||||
, $ALL_X_LIBS)
|
||||
|
||||
if test x$enable_xsync = xno; then
|
||||
found_xsync=no
|
||||
fi
|
||||
|
||||
if test x$enable_xsync = xyes; then
|
||||
if test "$found_xsync" = "no"; then
|
||||
AC_MSG_ERROR([--enable-xsync forced and XSync not found])
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$found_xsync" = "xyes"; then
|
||||
XSYNC_LIBS=-lXext
|
||||
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
|
||||
fi
|
||||
|
||||
METACITY_LIBS="$XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
|
||||
METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS"
|
||||
METACITY_WINDOW_DEMO_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_WINDOW_DEMO_LIBS"
|
||||
METACITY_PROPS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_PROPS_LIBS"
|
||||
@@ -301,7 +400,6 @@ src/libmetacity-private.pc
|
||||
src/tools/Makefile
|
||||
src/themes/Makefile
|
||||
po/Makefile.in
|
||||
metacity.spec
|
||||
])
|
||||
|
||||
if test x$enable_gconf = xno; then
|
||||
@@ -333,10 +431,12 @@ metacity-$VERSION:
|
||||
GConf: ${enable_gconf}
|
||||
XFree86 Xinerama: ${use_xfree_xinerama}
|
||||
Solaris Xinerama: ${use_solaris_xinerama}
|
||||
Multihead: ${with_multihead}
|
||||
Startup notification: ${have_startup_notification}
|
||||
Compositing manager: ${have_xcomposite}
|
||||
Session management: ${found_sm}
|
||||
Shape extension: ${found_shape}
|
||||
Resize-and-rotate: ${found_randr}
|
||||
Xsync: ${found_xsync}
|
||||
Deprecated config dialog: ${enable_config_dialog}
|
||||
"
|
||||
#echo "This is the UNSTABLE branch of metacity, use 2.8.x for stable (gnome-2-6 branch in CVS)"
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
|
||||
EXTRA_DIST=theme-format.txt metacity-theme.dtd
|
||||
EXTRA_DIST=theme-format.txt metacity-theme.dtd dialogs.txt
|
||||
|
||||
32
doc/dialogs.txt
Normal file
32
doc/dialogs.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
Dialogs which have no transient parent or root window being
|
||||
their tranisent parent are the ones which will be visible in
|
||||
the tasklist.
|
||||
|
||||
All such dialogs will be *always* on top of the window
|
||||
group i.e they would transients for the whole group.
|
||||
|
||||
|
||||
1) Modal dialogs
|
||||
|
||||
|
||||
* If you wish to open another window from a modal dialog
|
||||
|
||||
open *only* a modal dialog and set it's transient parent.
|
||||
|
||||
|
||||
2) Normal dialog
|
||||
|
||||
|
||||
without transient parent
|
||||
|
||||
* If you wish to open another window from a normal dialog
|
||||
|
||||
open either a normal dialog or a modal dialog only.
|
||||
Set the transient parent for the child dialog if you do not
|
||||
want them to be transient for all the other windows in the group.
|
||||
|
||||
with transient parent
|
||||
|
||||
* If you wish to open another window from a normal dialog
|
||||
|
||||
you could open any type of window.
|
||||
@@ -70,7 +70,7 @@
|
||||
<!ATTLIST frame
|
||||
focus (yes|no) #REQUIRED
|
||||
state (normal|maximized|shaded|maximized_and_shaded) #REQUIRED
|
||||
resize (both|horizontal|vertical|none) #REQUIRED
|
||||
resize (both|horizontal|vertical|none) #IMPLIED
|
||||
style CDATA #REQUIRED
|
||||
>
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
filled %boolean; 'false'
|
||||
>
|
||||
|
||||
<!ELEMENT arc EMTPY>
|
||||
<!ELEMENT arc EMPTY>
|
||||
<!ATTLIST arc
|
||||
color CDATA #REQUIRED
|
||||
%xyrequired;
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
%define ver @VERSION@
|
||||
%define RELEASE 1
|
||||
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
|
||||
|
||||
Summary: Metacity window manager
|
||||
Name: metacity
|
||||
Version: %ver
|
||||
Release: %rel
|
||||
URL: http://people.redhat.com/~hp/metacity/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
License: GPL
|
||||
Group: User Interface/Desktops
|
||||
BuildRoot: %{_tmppath}/%{name}-root
|
||||
BuildRequires: gtk2-devel >= 2.0.0
|
||||
BuildRequires: GConf2-devel >= 1.1.9
|
||||
|
||||
%description
|
||||
|
||||
Metacity is a simple window manager that integrates nicely with
|
||||
GNOME 2.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
||||
%makeinstall
|
||||
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
SCHEMAS="metacity.schemas"
|
||||
for S in $SCHEMAS; do
|
||||
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null
|
||||
done
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README AUTHORS COPYING NEWS HACKING theme-format.txt
|
||||
%{_bindir}/*
|
||||
%{_libexecdir}/*
|
||||
%{_datadir}/gnome/wm-properties/*
|
||||
%{_sysconfdir}/gconf/schemas/*.schemas
|
||||
%{_datadir}/control-center-2.0/capplets/*
|
||||
%{_datadir}/metacity
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_datadir}/themes/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 20 2002 Steve Fox <drfickle@k-lug.org>
|
||||
- Autoconf-ize the spec file to magic updates
|
||||
- Include missing dirs
|
||||
|
||||
* Thu May 2 2002 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.233
|
||||
|
||||
* Thu Apr 25 2002 Havoc Pennington <hp@redhat.com>
|
||||
- rebuild in different environment
|
||||
- add gconf schemas boilerplate
|
||||
|
||||
* Mon Apr 15 2002 Havoc Pennington <hp@pobox.com>
|
||||
- 2.3.89
|
||||
|
||||
* Tue Oct 30 2001 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.34
|
||||
|
||||
* Fri Oct 13 2001 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.21
|
||||
|
||||
* Mon Sep 17 2001 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.8
|
||||
- 2.3.13
|
||||
|
||||
* Wed Sep 5 2001 Havoc Pennington <hp@redhat.com>
|
||||
- Initial build.
|
||||
|
||||
|
||||
1113
po/ChangeLog
1113
po/ChangeLog
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
||||
# 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
|
||||
@@ -16,6 +17,7 @@ src/resizepopup.c
|
||||
src/screen.c
|
||||
src/session.c
|
||||
src/theme-parser.c
|
||||
src/theme-viewer.c
|
||||
src/theme.c
|
||||
src/tools/metacity-properties.desktop.in
|
||||
src/tools/metacity-properties.glade
|
||||
|
||||
3179
po/en_CA.po
Normal file
3179
po/en_CA.po
Normal file
File diff suppressed because it is too large
Load Diff
2343
po/en_GB.po
2343
po/en_GB.po
File diff suppressed because it is too large
Load Diff
1187
po/pt_BR.po
1187
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
3241
po/sr@Latn.po
Normal file
3241
po/sr@Latn.po
Normal file
File diff suppressed because it is too large
Load Diff
1878
po/zh_CN.po
1878
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1915
po/zh_TW.po
1915
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,43 @@
|
||||
|
||||
Focus windows on map: see http://bugzilla.gnome.org/show_bug.cgi?id=82921
|
||||
History
|
||||
====
|
||||
|
||||
Focus windows on map: see
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=118372
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=82921
|
||||
|
||||
Keep panel always on top: http://bugzilla.gnome.org/show_bug.cgi?id=81551
|
||||
Edge flipping: http://bugzilla.gnome.org/show_bug.cgi?id=82917
|
||||
Opaque resize: http://bugzilla.gnome.org/show_bug.cgi?id=92618
|
||||
Super+click to resize: http://bugzilla.gnome.org/show_bug.cgi?id=79315
|
||||
Alt+click to move/resize: http://bugzilla.gnome.org/show_bug.cgi?id=101151
|
||||
minimized windows in Alt+tab: http://bugzilla.gnome.org/show_bug.cgi?id=89416
|
||||
raise windows on click: http://bugzilla.gnome.org/show_bug.cgi?id=86108
|
||||
dialogs above entire app group: http://bugzilla.gnome.org/show_bug.cgi?id=88926
|
||||
|
||||
display window size/position:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=85213
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=106645
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=130821
|
||||
|
||||
configure click actions, alt+click:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=83210
|
||||
|
||||
system modal dialogs: http://bugzilla.gnome.org/show_bug.cgi?id=83357
|
||||
|
||||
workspace wrapping: http://bugzilla.gnome.org/show_bug.cgi?id=89315
|
||||
|
||||
raise windows on click:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=86108
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=115072
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=115753
|
||||
|
||||
Some discussion of how pointer focus is inherently a bit buggy because
|
||||
of the "sometimes focus window that isn't under the mouse" heuristics:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=124798
|
||||
(there are some other bugs that may have better explanation)
|
||||
|
||||
Tracking bugs
|
||||
====
|
||||
|
||||
session management: http://bugzilla.gnome.org/show_bug.cgi?id=107063
|
||||
|
||||
revise theme format: http://bugzilla.gnome.org/show_bug.cgi?id=102547
|
||||
|
||||
@@ -2,7 +2,7 @@ lib_LTLIBRARIES = libmetacity-private.la
|
||||
|
||||
SUBDIRS=wm-tester tools themes
|
||||
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DMETACITY_LIBDIR=\"$(libdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
|
||||
EGGFILES= \
|
||||
eggaccelerators.c \
|
||||
@@ -11,7 +11,13 @@ EGGFILES= \
|
||||
metacity_SOURCES= \
|
||||
async-getprop.c \
|
||||
async-getprop.h \
|
||||
bell.h \
|
||||
bell.c \
|
||||
common.h \
|
||||
compositor.c \
|
||||
compositor.h \
|
||||
constraints.c \
|
||||
constraints.h \
|
||||
core.c \
|
||||
core.h \
|
||||
delete.c \
|
||||
@@ -97,6 +103,9 @@ libmetacity_private_la_SOURCES= \
|
||||
util.h \
|
||||
common.h
|
||||
|
||||
libmetacity_private_la_LDFLAGS = -no-undefined
|
||||
libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
||||
|
||||
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
|
||||
|
||||
libmetacityinclude_HEADERS = \
|
||||
@@ -131,7 +140,8 @@ testasyncgetprop_LDADD= @METACITY_LIBS@
|
||||
|
||||
desktopfilesdir=$(datadir)/gnome/wm-properties
|
||||
desktopfiles_in_files=metacity.desktop.in
|
||||
desktopfiles_DATA = $(desktopfiles_in_files:.desktop.in=.desktop)
|
||||
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
|
||||
desktopfiles_DATA = $(desktopfiles_files)
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
schemadir = @GCONF_SCHEMA_FILE_DIR@
|
||||
@@ -140,8 +150,12 @@ schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||
|
||||
@INTLTOOL_SCHEMAS_RULE@
|
||||
|
||||
if GCONF_SCHEMAS_INSTALL
|
||||
install-data-local:
|
||||
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
|
||||
else
|
||||
install-data-local:
|
||||
endif
|
||||
|
||||
IMAGES=default_icon.png stock_maximize.png stock_minimize.png stock_delete.png
|
||||
VARIABLES=default_icon_data $(srcdir)/default_icon.png \
|
||||
@@ -159,7 +173,7 @@ pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
pkgconfig_DATA = libmetacity-private.pc
|
||||
|
||||
EXTRA_DIST=$(desktopfiles_DATA) \
|
||||
EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) $(schema_DATA) \
|
||||
update-from-egg.sh \
|
||||
$(desktopfiles_in_files) \
|
||||
|
||||
@@ -347,8 +347,9 @@ async_get_property_handler (Display *dpy,
|
||||
break;
|
||||
|
||||
case 32:
|
||||
/* NOTE buffer is in longs to match XGetWindowProperty() */
|
||||
nbytes = reply->nItems * sizeof (long);
|
||||
netbytes = reply->nItems << 2;
|
||||
netbytes = reply->nItems << 2; /* wire size is always 32 bits though */
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
{
|
||||
@@ -356,10 +357,41 @@ async_get_property_handler (Display *dpy,
|
||||
printf ("%s: already read %d bytes using %ld more, eating %ld more\n",
|
||||
__FUNCTION__, bytes_read, nbytes, netbytes);
|
||||
#endif
|
||||
/* _XRead32 (dpy, (long *) task->data, netbytes); */
|
||||
_XGetAsyncData (dpy, task->data, buf, len,
|
||||
bytes_read, nbytes,
|
||||
netbytes);
|
||||
|
||||
/* We have to copy the XGetWindowProperty() crackrock
|
||||
* and get format 32 as long even on 64-bit platforms.
|
||||
*/
|
||||
if (sizeof (long) == 8)
|
||||
{
|
||||
unsigned char *netdata;
|
||||
unsigned char *lptr;
|
||||
unsigned char *end_lptr;
|
||||
|
||||
/* Store the 32-bit values in the end of the array */
|
||||
netdata = task->data + nbytes / 2;
|
||||
|
||||
_XGetAsyncData (dpy, netdata, buf, len,
|
||||
bytes_read, netbytes,
|
||||
netbytes);
|
||||
|
||||
/* Now move the 32-bit values to the front */
|
||||
|
||||
lptr = task->data;
|
||||
end_lptr = task->data + nbytes;
|
||||
while (lptr != end_lptr)
|
||||
{
|
||||
*(long*) lptr = *(CARD32*) netdata;
|
||||
lptr += sizeof (long);
|
||||
netdata += sizeof (CARD32);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Here the wire format matches our actual format */
|
||||
_XGetAsyncData (dpy, task->data, buf, len,
|
||||
bytes_read, netbytes,
|
||||
netbytes);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
250
src/bell.c
Normal file
250
src/bell.c
Normal file
@@ -0,0 +1,250 @@
|
||||
/* Metacity visual bell */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Sun Microsystems 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>
|
||||
#include "bell.h"
|
||||
#include "screen.h"
|
||||
#include "prefs.h"
|
||||
|
||||
static void
|
||||
meta_bell_flash_screen (MetaDisplay *display,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
Window root = screen->xroot;
|
||||
int width = screen->width;
|
||||
int height = screen->height;
|
||||
|
||||
if (screen->flash_window == None)
|
||||
{
|
||||
Visual *visual = CopyFromParent;
|
||||
XSetWindowAttributes xswa;
|
||||
int depth = CopyFromParent;
|
||||
xswa.save_under = True;
|
||||
xswa.override_redirect = True;
|
||||
/*
|
||||
* TODO: use XGetVisualInfo and determine which is an
|
||||
* overlay, if one is present, and use the Overlay visual
|
||||
* for this window (for performance reasons).
|
||||
* Not sure how to tell this yet...
|
||||
*/
|
||||
screen->flash_window = XCreateWindow (display->xdisplay, root,
|
||||
0, 0, width, height,
|
||||
0, depth,
|
||||
InputOutput,
|
||||
visual,
|
||||
/* note: XSun doesn't like SaveUnder here */
|
||||
CWSaveUnder | CWOverrideRedirect,
|
||||
&xswa);
|
||||
XSelectInput (display->xdisplay, screen->flash_window, ExposureMask);
|
||||
XMapWindow (display->xdisplay, screen->flash_window);
|
||||
XSync (display->xdisplay, False);
|
||||
XFlush (display->xdisplay);
|
||||
XUnmapWindow (display->xdisplay, screen->flash_window);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* just draw something in the window */
|
||||
GC gc = XCreateGC (display->xdisplay, screen->flash_window, 0, NULL);
|
||||
XMapWindow (display->xdisplay, screen->flash_window);
|
||||
XSetForeground (display->xdisplay, gc,
|
||||
WhitePixel (display->xdisplay,
|
||||
XScreenNumberOfScreen (screen->xscreen)));
|
||||
XFillRectangle (display->xdisplay, screen->flash_window, gc,
|
||||
0, 0, width, height);
|
||||
XSetForeground (display->xdisplay, gc,
|
||||
BlackPixel (display->xdisplay,
|
||||
XScreenNumberOfScreen (screen->xscreen)));
|
||||
XFillRectangle (display->xdisplay, screen->flash_window, gc,
|
||||
0, 0, width, height);
|
||||
XFlush (display->xdisplay);
|
||||
XSync (display->xdisplay, False);
|
||||
XUnmapWindow (display->xdisplay, screen->flash_window);
|
||||
}
|
||||
XFlush (display->xdisplay);
|
||||
}
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
static void
|
||||
meta_bell_flash_fullscreen (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
{
|
||||
XkbBellNotifyEvent *xkb_bell_ev = (XkbBellNotifyEvent *) xkb_ev;
|
||||
MetaScreen *screen;
|
||||
|
||||
g_assert (xkb_ev->xkb_type == XkbBellNotify);
|
||||
if (xkb_bell_ev->window != None)
|
||||
{
|
||||
screen = meta_display_screen_for_xwindow (display, xkb_bell_ev->window);
|
||||
if (screen)
|
||||
meta_bell_flash_screen (display, screen);
|
||||
}
|
||||
else
|
||||
{
|
||||
GSList *screen_list = display->screens;
|
||||
while (screen_list)
|
||||
{
|
||||
screen = (MetaScreen *) screen_list->data;
|
||||
meta_bell_flash_screen (display, screen);
|
||||
screen_list = screen_list->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_bell_unflash_frame (gpointer data)
|
||||
{
|
||||
MetaFrame *frame = (MetaFrame *) data;
|
||||
frame->is_flashing = 0;
|
||||
meta_frame_queue_draw (frame);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_bell_flash_window_frame (MetaWindow *window)
|
||||
{
|
||||
g_assert (window->frame != NULL);
|
||||
window->frame->is_flashing = 1;
|
||||
meta_frame_queue_draw (window->frame);
|
||||
g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 100,
|
||||
meta_bell_unflash_frame, window->frame, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_bell_flash_frame (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
{
|
||||
XkbBellNotifyEvent *xkb_bell_event = (XkbBellNotifyEvent *) xkb_ev;
|
||||
MetaWindow *window;
|
||||
|
||||
g_assert (xkb_ev->xkb_type == XkbBellNotify);
|
||||
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
|
||||
if (!window && (display->focus_window) && (display->focus_window->frame))
|
||||
{
|
||||
window = display->focus_window;
|
||||
}
|
||||
if (window)
|
||||
{
|
||||
meta_bell_flash_window_frame (window);
|
||||
}
|
||||
else /* revert to fullscreen flash if there's no focussed window */
|
||||
{
|
||||
meta_bell_flash_fullscreen (display, xkb_ev);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_bell_visual_notify (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
{
|
||||
switch (meta_prefs_get_visual_bell_type ())
|
||||
{
|
||||
case META_VISUAL_BELL_FULLSCREEN_FLASH:
|
||||
meta_bell_flash_fullscreen (display, xkb_ev);
|
||||
break;
|
||||
case META_VISUAL_BELL_FRAME_FLASH:
|
||||
meta_bell_flash_frame (display, xkb_ev); /* does nothing yet */
|
||||
break;
|
||||
case META_VISUAL_BELL_INVALID:
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_bell_notify (MetaDisplay *display,
|
||||
XkbAnyEvent *xkb_ev)
|
||||
{
|
||||
/* flash something */
|
||||
if (meta_prefs_get_visual_bell ())
|
||||
meta_bell_visual_notify (display, xkb_ev);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_bell_set_audible (MetaDisplay *display, gboolean audible)
|
||||
{
|
||||
#ifdef HAVE_XKB
|
||||
XkbChangeEnabledControls (display->xdisplay,
|
||||
XkbUseCoreKbd,
|
||||
XkbAudibleBellMask,
|
||||
audible ? XkbAudibleBellMask : 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_bell_init (MetaDisplay *display)
|
||||
{
|
||||
#ifdef HAVE_XKB
|
||||
int xkb_base_error_type, xkb_opcode;
|
||||
|
||||
if (!XkbQueryExtension (display->xdisplay, &xkb_opcode,
|
||||
&display->xkb_base_event_type,
|
||||
&xkb_base_error_type,
|
||||
NULL, NULL))
|
||||
{
|
||||
display->xkb_base_event_type = -1;
|
||||
g_message ("could not find XKB extension.");
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
unsigned int mask = XkbBellNotifyMask;
|
||||
gboolean visual_bell_auto_reset = FALSE;
|
||||
/* TRUE if and when non-broken version is available */
|
||||
XkbSelectEvents (display->xdisplay,
|
||||
XkbUseCoreKbd,
|
||||
XkbBellNotifyMask,
|
||||
XkbBellNotifyMask);
|
||||
XkbChangeEnabledControls (display->xdisplay,
|
||||
XkbUseCoreKbd,
|
||||
XkbAudibleBellMask,
|
||||
meta_prefs_bell_is_audible ()
|
||||
? XkbAudibleBellMask : 0);
|
||||
if (visual_bell_auto_reset) {
|
||||
XkbSetAutoResetControls (display->xdisplay,
|
||||
XkbAudibleBellMask,
|
||||
&mask,
|
||||
&mask);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
meta_bell_shutdown (MetaDisplay *display)
|
||||
{
|
||||
#ifdef HAVE_XKB
|
||||
/* TODO: persist initial bell state in display, reset here */
|
||||
XkbChangeEnabledControls (display->xdisplay,
|
||||
XkbUseCoreKbd,
|
||||
XkbAudibleBellMask,
|
||||
XkbAudibleBellMask);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
meta_bell_notify_frame_destroy (MetaFrame *frame)
|
||||
{
|
||||
if (frame->is_flashing)
|
||||
g_idle_remove_by_data (frame);
|
||||
}
|
||||
35
src/bell.h
Normal file
35
src/bell.h
Normal file
@@ -0,0 +1,35 @@
|
||||
/* Metacity visual bell */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Sun Microsystems 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 <X11/Xlib.h>
|
||||
#ifdef HAVE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
#include "display.h"
|
||||
#include "frame.h"
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
void meta_bell_notify (MetaDisplay *display, XkbAnyEvent *xkb_ev);
|
||||
#endif
|
||||
void meta_bell_set_audible (MetaDisplay *display, gboolean audible);
|
||||
gboolean meta_bell_init (MetaDisplay *display);
|
||||
void meta_bell_shutdown (MetaDisplay *display);
|
||||
void meta_bell_notify_frame_destroy (MetaFrame *frame);
|
||||
11
src/common.h
11
src/common.h
@@ -42,7 +42,8 @@ typedef enum
|
||||
META_FRAME_MAXIMIZED = 1 << 9,
|
||||
META_FRAME_ALLOWS_SHADE = 1 << 10,
|
||||
META_FRAME_ALLOWS_MOVE = 1 << 11,
|
||||
META_FRAME_FULLSCREEN = 1 << 12
|
||||
META_FRAME_FULLSCREEN = 1 << 12,
|
||||
META_FRAME_IS_FLASHING = 1 << 13
|
||||
} MetaFrameFlags;
|
||||
|
||||
typedef enum
|
||||
@@ -57,7 +58,13 @@ typedef enum
|
||||
META_MENU_OP_STICK = 1 << 7,
|
||||
META_MENU_OP_WORKSPACES = 1 << 8,
|
||||
META_MENU_OP_MOVE = 1 << 9,
|
||||
META_MENU_OP_RESIZE = 1 << 10
|
||||
META_MENU_OP_RESIZE = 1 << 10,
|
||||
META_MENU_OP_ABOVE = 1 << 11,
|
||||
META_MENU_OP_UNABOVE = 1 << 12,
|
||||
META_MENU_OP_MOVE_LEFT = 1 << 13,
|
||||
META_MENU_OP_MOVE_RIGHT = 1 << 14,
|
||||
META_MENU_OP_MOVE_UP = 1 << 15,
|
||||
META_MENU_OP_MOVE_DOWN = 1 << 16
|
||||
} MetaMenuOp;
|
||||
|
||||
typedef struct _MetaWindowMenu MetaWindowMenu;
|
||||
|
||||
1305
src/compositor.c
Normal file
1305
src/compositor.c
Normal file
File diff suppressed because it is too large
Load Diff
56
src/compositor.h
Normal file
56
src/compositor.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* Metacity compositing manager */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2003 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_COMPOSITOR_H
|
||||
#define META_COMPOSITOR_H
|
||||
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
|
||||
MetaCompositor* meta_compositor_new (MetaDisplay *display);
|
||||
void meta_compositor_unref (MetaCompositor *compositor);
|
||||
void meta_compositor_process_event (MetaCompositor *compositor,
|
||||
XEvent *xevent,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_add_window (MetaCompositor *compositor,
|
||||
Window xwindow,
|
||||
XWindowAttributes *attrs);
|
||||
void meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow);
|
||||
|
||||
void meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
|
||||
void meta_compositor_damage_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
|
||||
#endif /* META_COMPOSITOR_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
39
src/core.c
39
src/core.c
@@ -2,6 +2,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2003 Rob Adams
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -46,6 +47,22 @@ meta_core_get_client_size (Display *xdisplay,
|
||||
*height = window->rect.height;
|
||||
}
|
||||
|
||||
Window
|
||||
meta_core_get_client_xwindow (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
return window->xwindow;
|
||||
}
|
||||
|
||||
MetaFrameFlags
|
||||
meta_core_get_frame_flags (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
@@ -570,17 +587,17 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
name = META_KEYBINDING_MAXIMIZE;
|
||||
break;
|
||||
case META_MENU_OP_UNSHADE:
|
||||
name = META_KEYBINDING_TOGGLE_SHADE;
|
||||
break;
|
||||
case META_MENU_OP_SHADE:
|
||||
name = META_KEYBINDING_TOGGLE_SHADE;
|
||||
break;
|
||||
case META_MENU_OP_UNSTICK:
|
||||
name = META_KEYBINDING_TOGGLE_STICKY;
|
||||
break;
|
||||
case META_MENU_OP_STICK:
|
||||
name = META_KEYBINDING_TOGGLE_STICKY;
|
||||
break;
|
||||
case META_MENU_OP_ABOVE:
|
||||
case META_MENU_OP_UNABOVE:
|
||||
name = META_KEYBINDING_TOGGLE_ABOVE;
|
||||
break;
|
||||
case META_MENU_OP_WORKSPACES:
|
||||
switch (workspace)
|
||||
{
|
||||
@@ -628,6 +645,18 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
case META_MENU_OP_RESIZE:
|
||||
name = META_KEYBINDING_BEGIN_RESIZE;
|
||||
break;
|
||||
case META_MENU_OP_MOVE_LEFT:
|
||||
name = META_KEYBINDING_MOVE_WORKSPACE_LEFT;
|
||||
break;
|
||||
case META_MENU_OP_MOVE_RIGHT:
|
||||
name = META_KEYBINDING_MOVE_WORKSPACE_RIGHT;
|
||||
break;
|
||||
case META_MENU_OP_MOVE_UP:
|
||||
name = META_KEYBINDING_MOVE_WORKSPACE_UP;
|
||||
break;
|
||||
case META_MENU_OP_MOVE_DOWN:
|
||||
name = META_KEYBINDING_MOVE_WORKSPACE_DOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
if (name)
|
||||
@@ -662,6 +691,7 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
@@ -683,6 +713,7 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
op, pointer_already_grabbed,
|
||||
event_serial,
|
||||
button, modmask,
|
||||
timestamp, root_x, root_y);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,9 @@ void meta_core_get_client_size (Display *xdisplay,
|
||||
int *width,
|
||||
int *height);
|
||||
|
||||
Window meta_core_get_client_xwindow (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
|
||||
MetaFrameFlags meta_core_get_frame_flags (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
MetaFrameType meta_core_get_frame_type (Display *xdisplay,
|
||||
@@ -130,6 +133,7 @@ gboolean meta_core_begin_grab_op (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
@@ -160,6 +164,8 @@ void meta_core_get_screen_size (Display *xdisplay,
|
||||
*/
|
||||
void meta_core_increment_event_serial (Display *display);
|
||||
|
||||
int meta_ui_get_last_event_serial (Display *xdisplay);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
31
src/delete.c
31
src/delete.c
@@ -23,6 +23,7 @@
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
#include "errors.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@@ -30,6 +31,7 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void meta_window_present_delete_dialog (MetaWindow *window);
|
||||
|
||||
@@ -294,7 +296,8 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
GError *err;
|
||||
int child_pid;
|
||||
int outpipe;
|
||||
char *argv[5];
|
||||
char *argv[7];
|
||||
char numbuf[32];
|
||||
char *window_id_str;
|
||||
GIOChannel *channel;
|
||||
|
||||
@@ -309,12 +312,16 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
}
|
||||
|
||||
window_id_str = g_strdup_printf ("0x%lx", window->xwindow);
|
||||
|
||||
sprintf (numbuf, "%d", window->screen->number);
|
||||
|
||||
argv[0] = METACITY_LIBEXECDIR"/metacity-dialog";
|
||||
argv[1] = "--kill-window-question";
|
||||
argv[2] = window->title;
|
||||
argv[3] = window_id_str;
|
||||
argv[4] = NULL;
|
||||
argv[1] = "--screen";
|
||||
argv[2] = numbuf;
|
||||
argv[3] = "--kill-window-question";
|
||||
argv[4] = window->title;
|
||||
argv[5] = window_id_str;
|
||||
argv[6] = NULL;
|
||||
|
||||
err = NULL;
|
||||
if (!g_spawn_async_with_pipes ("/",
|
||||
@@ -380,14 +387,24 @@ meta_window_delete (MetaWindow *window,
|
||||
|
||||
if (window->has_focus)
|
||||
{
|
||||
/* FIXME Clean this up someday
|
||||
* http://bugzilla.gnome.org/show_bug.cgi?id=108706
|
||||
*/
|
||||
#if 0
|
||||
/* This is unfortunately going to result in weirdness
|
||||
* if the window doesn't respond to the delete event.
|
||||
* I don't know how to avoid that though.
|
||||
*/
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing top window because focus window %s was deleted/killed\n",
|
||||
"Focusing MRU window because focus window %s was deleted/killed\n",
|
||||
window->desc);
|
||||
meta_screen_focus_top_window (window->screen, window);
|
||||
meta_workspace_focus_mru_window (window->screen->active_workspace,
|
||||
window);
|
||||
#else
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Not unfocusing %s on delete/kill\n",
|
||||
window->desc);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
1165
src/display.c
1165
src/display.c
File diff suppressed because it is too large
Load Diff
104
src/display.h
104
src/display.h
@@ -2,6 +2,8 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2002 Red Hat, Inc.
|
||||
* Copyright (C) 2003 Rob Adams
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -35,6 +37,10 @@
|
||||
#include <libsn/sn.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
#include <X11/extensions/sync.h>
|
||||
#endif
|
||||
|
||||
#define meta_XFree(p) do { if ((p)) XFree ((p)); } while (0)
|
||||
|
||||
/* this doesn't really belong here, oh well. */
|
||||
@@ -48,6 +54,7 @@ struct _MetaRectangle
|
||||
int height;
|
||||
};
|
||||
|
||||
typedef struct MetaCompositor MetaCompositor;
|
||||
typedef struct _MetaDisplay MetaDisplay;
|
||||
typedef struct _MetaFrame MetaFrame;
|
||||
typedef struct _MetaKeyBinding MetaKeyBinding;
|
||||
@@ -115,10 +122,6 @@ struct _MetaDisplay
|
||||
Atom atom_net_client_list_stacking;
|
||||
Atom atom_net_wm_state_skip_taskbar;
|
||||
Atom atom_net_wm_state_skip_pager;
|
||||
Atom atom_win_workspace;
|
||||
Atom atom_win_layer;
|
||||
Atom atom_win_protocols;
|
||||
Atom atom_win_supporting_wm_check;
|
||||
Atom atom_net_wm_icon_name;
|
||||
Atom atom_net_wm_icon;
|
||||
Atom atom_net_wm_icon_geometry;
|
||||
@@ -129,7 +132,6 @@ struct _MetaDisplay
|
||||
Atom atom_net_active_window;
|
||||
Atom atom_metacity_restart_message;
|
||||
Atom atom_net_wm_strut;
|
||||
Atom atom_win_hints;
|
||||
Atom atom_metacity_reload_theme_message;
|
||||
Atom atom_metacity_set_keybindings_message;
|
||||
Atom atom_net_wm_state_hidden;
|
||||
@@ -152,6 +154,8 @@ struct _MetaDisplay
|
||||
Atom atom_net_wm_allowed_actions;
|
||||
Atom atom_net_wm_action_move;
|
||||
Atom atom_net_wm_action_resize;
|
||||
Atom atom_net_wm_action_fullscreen;
|
||||
Atom atom_net_wm_action_minimize;
|
||||
Atom atom_net_wm_action_shade;
|
||||
Atom atom_net_wm_action_stick;
|
||||
Atom atom_net_wm_action_maximize_horz;
|
||||
@@ -162,7 +166,16 @@ struct _MetaDisplay
|
||||
Atom atom_net_wm_state_below;
|
||||
Atom atom_net_startup_id;
|
||||
Atom atom_metacity_toggle_verbose;
|
||||
|
||||
Atom atom_metacity_update_counter;
|
||||
Atom atom_sync_counter;
|
||||
Atom atom_gnome_panel_action;
|
||||
Atom atom_gnome_panel_action_main_menu;
|
||||
Atom atom_gnome_panel_action_run_dialog;
|
||||
Atom atom_metacity_sentinel;
|
||||
Atom atom_net_wm_strut_partial;
|
||||
Atom atom_net_frame_extents;
|
||||
Atom atom_net_request_frame_extents;
|
||||
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
*/
|
||||
@@ -172,11 +185,6 @@ struct _MetaDisplay
|
||||
*/
|
||||
MetaWindow *expected_focus_window;
|
||||
|
||||
/* Most recently focused list. Always contains all
|
||||
* live windows.
|
||||
*/
|
||||
GList *mru_list;
|
||||
|
||||
guint static_gravity_works : 1;
|
||||
|
||||
/*< private-ish >*/
|
||||
@@ -195,7 +203,6 @@ struct _MetaDisplay
|
||||
Window no_focus_window;
|
||||
|
||||
/* for double click */
|
||||
int double_click_time;
|
||||
Time last_button_time;
|
||||
Window last_button_xwindow;
|
||||
int last_button_num;
|
||||
@@ -224,27 +231,44 @@ struct _MetaDisplay
|
||||
MetaScreen *grab_screen;
|
||||
MetaWindow *grab_window;
|
||||
Window grab_xwindow;
|
||||
gulong grab_start_serial;
|
||||
int grab_button;
|
||||
int grab_initial_root_x;
|
||||
int grab_initial_root_y;
|
||||
int grab_current_root_x;
|
||||
int grab_current_root_y;
|
||||
int grab_anchor_root_x;
|
||||
int grab_anchor_root_y;
|
||||
MetaRectangle grab_anchor_window_pos;
|
||||
int grab_latest_motion_x;
|
||||
int grab_latest_motion_y;
|
||||
gulong grab_mask;
|
||||
guint grab_have_pointer : 1;
|
||||
guint grab_have_keyboard : 1;
|
||||
guint grab_wireframe_active : 1;
|
||||
guint grab_was_cancelled : 1;
|
||||
MetaRectangle grab_wireframe_rect;
|
||||
MetaRectangle grab_initial_window_pos;
|
||||
MetaRectangle grab_current_window_pos;
|
||||
MetaResizePopup *grab_resize_popup;
|
||||
GTimeVal grab_last_moveresize_time;
|
||||
Time grab_motion_notify_time;
|
||||
|
||||
/* we use property updates as sentinels for certain window focus events
|
||||
* to avoid some race conditions on EnterNotify events
|
||||
*/
|
||||
int sentinel_counter;
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
int xkb_base_event_type;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
/* alarm monitoring client's _METACITY_UPDATE_COUNTER */
|
||||
XSyncAlarm grab_update_alarm;
|
||||
#endif
|
||||
|
||||
/* Keybindings stuff */
|
||||
MetaKeyBinding *screen_bindings;
|
||||
int n_screen_bindings;
|
||||
MetaKeyBinding *window_bindings;
|
||||
int n_window_bindings;
|
||||
int min_keycode;
|
||||
int max_keycode;
|
||||
unsigned int min_keycode;
|
||||
unsigned int max_keycode;
|
||||
KeySym *keymap;
|
||||
int keysyms_per_keycode;
|
||||
XModifierKeymap *modmap;
|
||||
@@ -273,13 +297,27 @@ struct _MetaDisplay
|
||||
|
||||
/* Managed by group-props.c */
|
||||
MetaGroupPropHooks *group_prop_hooks;
|
||||
|
||||
/* Managed by compositor.c */
|
||||
MetaCompositor *compositor;
|
||||
|
||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||
/* This is at the end in case someone doesn't include config.h before this file
|
||||
* the results won't be catastrophic
|
||||
*/
|
||||
SnDisplay *sn_display;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
int xsync_event_base;
|
||||
int xsync_error_base;
|
||||
#define META_DISPLAY_HAS_XSYNC(display) ((display)->xsync_event_base != 0)
|
||||
#else
|
||||
#define META_DISPLAY_HAS_XSYNC(display) FALSE
|
||||
#endif
|
||||
#ifdef HAVE_SHAPE
|
||||
int shape_event_base;
|
||||
int shape_error_base;
|
||||
#define META_DISPLAY_HAS_SHAPE(display) ((display)->shape_event_base != 0)
|
||||
#else
|
||||
#define META_DISPLAY_HAS_SHAPE(display) FALSE
|
||||
#endif
|
||||
};
|
||||
|
||||
gboolean meta_display_open (const char *name);
|
||||
@@ -331,6 +369,7 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
MetaGrabOp op,
|
||||
gboolean pointer_already_grabbed,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
@@ -345,9 +384,9 @@ void meta_display_ungrab_window_buttons (MetaDisplay *display,
|
||||
Window xwindow);
|
||||
|
||||
void meta_display_grab_focus_window_button (MetaDisplay *display,
|
||||
Window xwindow);
|
||||
MetaWindow *window);
|
||||
void meta_display_ungrab_focus_window_button (MetaDisplay *display,
|
||||
Window xwindow);
|
||||
MetaWindow *window);
|
||||
|
||||
/* make a request to ensure the event serial has changed */
|
||||
void meta_display_increment_event_serial (MetaDisplay *display);
|
||||
@@ -380,10 +419,10 @@ typedef enum
|
||||
|
||||
} MetaTabList;
|
||||
|
||||
GSList* meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace);
|
||||
GList* meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace);
|
||||
|
||||
MetaWindow* meta_display_get_tab_next (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
@@ -399,12 +438,21 @@ MetaWindow* meta_display_get_tab_current (MetaDisplay *display,
|
||||
|
||||
int meta_resize_gravity_from_grab_op (MetaGrabOp op);
|
||||
|
||||
gboolean meta_grab_op_is_moving (MetaGrabOp op);
|
||||
gboolean meta_grab_op_is_resizing (MetaGrabOp op);
|
||||
|
||||
gboolean meta_rectangle_intersect (MetaRectangle *src1,
|
||||
MetaRectangle *src2,
|
||||
MetaRectangle *dest);
|
||||
gboolean meta_rectangle_equal (const MetaRectangle *src1,
|
||||
const MetaRectangle *src2);
|
||||
|
||||
void meta_display_devirtualize_modifiers (MetaDisplay *display,
|
||||
MetaVirtualModifier modifiers,
|
||||
unsigned int *mask);
|
||||
|
||||
void meta_display_increment_focus_sentinel (MetaDisplay *display);
|
||||
void meta_display_decrement_focus_sentinel (MetaDisplay *display);
|
||||
gboolean meta_display_focus_sentinel_clear (MetaDisplay *display);
|
||||
|
||||
#endif
|
||||
|
||||
103
src/effects.c
103
src/effects.c
@@ -409,5 +409,108 @@ meta_effects_draw_box_animation (MetaScreen *screen,
|
||||
XFlush (context->screen->display->xdisplay);
|
||||
}
|
||||
|
||||
void
|
||||
meta_effects_begin_wireframe (MetaScreen *screen,
|
||||
const MetaRectangle *rect)
|
||||
{
|
||||
/* Grab the X server to avoid screen dirt */
|
||||
meta_display_grab (screen->display);
|
||||
meta_ui_push_delay_exposes (screen->ui);
|
||||
|
||||
meta_effects_update_wireframe (screen, NULL, rect);
|
||||
}
|
||||
|
||||
static void
|
||||
draw_xor_rect (MetaScreen *screen,
|
||||
const MetaRectangle *rect)
|
||||
{
|
||||
/* The lines in the center can't overlap the rectangle or each
|
||||
* other, or the XOR gets reversed. So we have to draw things
|
||||
* a bit oddly.
|
||||
*/
|
||||
XSegment segments[8];
|
||||
int i;
|
||||
|
||||
#define LINE_WIDTH META_WIREFRAME_XOR_LINE_WIDTH
|
||||
|
||||
XDrawRectangle (screen->display->xdisplay,
|
||||
screen->xroot,
|
||||
screen->root_xor_gc,
|
||||
rect->x, rect->y,
|
||||
rect->width, rect->height);
|
||||
|
||||
/* Don't put lines inside small rectangles where they won't fit */
|
||||
if (rect->width < (LINE_WIDTH * 4) ||
|
||||
rect->height < (LINE_WIDTH * 4))
|
||||
return;
|
||||
|
||||
/* Two vertical lines at 1/3 and 2/3 */
|
||||
segments[0].x1 = rect->x + rect->width / 3;
|
||||
segments[0].y1 = rect->y + LINE_WIDTH / 2 + LINE_WIDTH % 2;
|
||||
segments[0].x2 = segments[0].x1;
|
||||
segments[0].y2 = rect->y + rect->height - LINE_WIDTH / 2;
|
||||
|
||||
segments[1] = segments[0];
|
||||
segments[1].x1 = rect->x + (rect->width / 3) * 2;
|
||||
segments[1].x2 = segments[1].x1;
|
||||
|
||||
/* Now make two horizontal lines at 1/3 and 2/3, but not
|
||||
* overlapping the verticals
|
||||
*/
|
||||
|
||||
segments[2].x1 = rect->x + LINE_WIDTH / 2 + LINE_WIDTH % 2;
|
||||
segments[2].x2 = segments[0].x1 - LINE_WIDTH / 2;
|
||||
segments[2].y1 = rect->y + rect->height / 3;
|
||||
segments[2].y2 = segments[2].y1;
|
||||
|
||||
segments[3] = segments[2];
|
||||
segments[3].x1 = segments[2].x2 + LINE_WIDTH;
|
||||
segments[3].x2 = segments[1].x1 - LINE_WIDTH / 2;
|
||||
|
||||
segments[4] = segments[3];
|
||||
segments[4].x1 = segments[3].x2 + LINE_WIDTH;
|
||||
segments[4].x2 = rect->x + rect->width - LINE_WIDTH / 2;
|
||||
|
||||
/* Second horizontal line is just like the first, but
|
||||
* shifted down
|
||||
*/
|
||||
i = 5;
|
||||
while (i < 8)
|
||||
{
|
||||
segments[i] = segments[i - 3];
|
||||
segments[i].y1 = rect->y + (rect->height / 3) * 2;
|
||||
segments[i].y2 = segments[i].y1;
|
||||
++i;
|
||||
}
|
||||
|
||||
XDrawSegments (screen->display->xdisplay,
|
||||
screen->xroot,
|
||||
screen->root_xor_gc,
|
||||
segments,
|
||||
G_N_ELEMENTS (segments));
|
||||
}
|
||||
|
||||
void
|
||||
meta_effects_update_wireframe (MetaScreen *screen,
|
||||
const MetaRectangle *old_rect,
|
||||
const MetaRectangle *new_rect)
|
||||
{
|
||||
if (old_rect)
|
||||
draw_xor_rect (screen, old_rect);
|
||||
|
||||
if (new_rect)
|
||||
draw_xor_rect (screen, new_rect);
|
||||
|
||||
XFlush (screen->display->xdisplay);
|
||||
}
|
||||
|
||||
void
|
||||
meta_effects_end_wireframe (MetaScreen *screen,
|
||||
const MetaRectangle *old_rect)
|
||||
{
|
||||
meta_effects_update_wireframe (screen, old_rect, NULL);
|
||||
|
||||
meta_display_ungrab (screen->display);
|
||||
meta_ui_pop_delay_exposes (screen->ui);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,4 +41,12 @@ void meta_effects_draw_box_animation (MetaScreen *screen,
|
||||
double seconds_duration,
|
||||
MetaBoxAnimType anim_type);
|
||||
|
||||
void meta_effects_begin_wireframe (MetaScreen *screen,
|
||||
const MetaRectangle *rect);
|
||||
void meta_effects_update_wireframe (MetaScreen *screen,
|
||||
const MetaRectangle *old_rect,
|
||||
const MetaRectangle *new_rect);
|
||||
void meta_effects_end_wireframe (MetaScreen *screen,
|
||||
const MetaRectangle *old_rect);
|
||||
|
||||
#endif /* META_EFFECTS_H */
|
||||
|
||||
@@ -48,7 +48,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
if (tip == NULL)
|
||||
{
|
||||
tip = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
{
|
||||
GdkScreen *gdk_screen;
|
||||
|
||||
@@ -59,10 +58,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
screen_width = gdk_screen_get_width (gdk_screen);
|
||||
screen_height = gdk_screen_get_height (gdk_screen);
|
||||
}
|
||||
#else
|
||||
screen_width = gdk_screen_width ();
|
||||
screen_height = gdk_screen_height ();
|
||||
#endif
|
||||
|
||||
gtk_widget_set_app_paintable (tip, TRUE);
|
||||
gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE);
|
||||
|
||||
128
src/frame.c
128
src/frame.c
@@ -2,6 +2,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2003 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -21,6 +22,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "frame.h"
|
||||
#include "bell.h"
|
||||
#include "errors.h"
|
||||
#include "keybindings.h"
|
||||
|
||||
@@ -38,6 +40,7 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
{
|
||||
MetaFrame *frame;
|
||||
XSetWindowAttributes attrs;
|
||||
Visual *visual;
|
||||
|
||||
if (window->frame)
|
||||
return;
|
||||
@@ -58,9 +61,9 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
frame->current_cursor = 0;
|
||||
|
||||
frame->mapped = FALSE;
|
||||
frame->need_reapply_frame_shape = TRUE;
|
||||
frame->is_flashing = FALSE;
|
||||
|
||||
attrs.event_mask = EVENT_MASK;
|
||||
|
||||
meta_verbose ("Framing window %s: visual %s default, depth %d default depth %d\n",
|
||||
window->desc,
|
||||
XVisualIDFromVisual (window->xvisual) ==
|
||||
@@ -76,24 +79,25 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
* e.g. DRI games can't be children of a parent that has the same
|
||||
* visual as the client.
|
||||
*/
|
||||
|
||||
frame->xwindow = XCreateWindow (window->display->xdisplay,
|
||||
window->screen->xroot,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height,
|
||||
0,
|
||||
window->screen->default_depth,
|
||||
CopyFromParent,
|
||||
window->screen->default_xvisual,
|
||||
CWEventMask,
|
||||
&attrs);
|
||||
|
||||
/* So our UI can find the window ID */
|
||||
XFlush (window->display->xdisplay);
|
||||
|
||||
visual = 0;
|
||||
/* XXX special case for depth 32 windows (assumed to be ARGB) */
|
||||
if (window->depth == 32)
|
||||
visual = window->xvisual;
|
||||
|
||||
frame->xwindow = meta_ui_create_frame_window (window->screen->ui,
|
||||
window->display->xdisplay,
|
||||
visual,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height,
|
||||
frame->window->screen->number);
|
||||
|
||||
meta_verbose ("Frame for %s is 0x%lx\n", frame->window->desc, frame->xwindow);
|
||||
attrs.event_mask = EVENT_MASK;
|
||||
XChangeWindowAttributes (window->display->xdisplay,
|
||||
frame->xwindow, CWEventMask, &attrs);
|
||||
|
||||
meta_display_register_x_window (window->display, &frame->xwindow, window);
|
||||
|
||||
@@ -130,8 +134,6 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
/* stick frame to the window */
|
||||
window->frame = frame;
|
||||
|
||||
meta_ui_add_frame (window->screen->ui, frame->xwindow);
|
||||
|
||||
if (window->title)
|
||||
meta_ui_set_frame_title (window->screen->ui,
|
||||
window->frame->xwindow,
|
||||
@@ -144,7 +146,9 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
meta_ui_apply_frame_shape (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
frame->rect.height,
|
||||
frame->window->has_shape);
|
||||
frame->need_reapply_frame_shape = FALSE;
|
||||
|
||||
meta_display_ungrab (window->display);
|
||||
}
|
||||
@@ -157,9 +161,11 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
if (window->frame == NULL)
|
||||
return;
|
||||
|
||||
meta_verbose ("Unframing window %s\n", window->desc);
|
||||
|
||||
frame = window->frame;
|
||||
|
||||
meta_ui_remove_frame (window->screen->ui, frame->xwindow);
|
||||
meta_bell_notify_frame_destroy (frame);
|
||||
|
||||
/* Unparent the client window; it may be destroyed,
|
||||
* thus the error trap.
|
||||
@@ -183,6 +189,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
window->frame->rect.y);
|
||||
meta_error_trap_pop (window->display, FALSE);
|
||||
|
||||
meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow);
|
||||
|
||||
meta_display_unregister_x_window (window->display,
|
||||
frame->xwindow);
|
||||
|
||||
@@ -191,9 +199,6 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
/* Move keybindings to window instead of frame */
|
||||
meta_window_grab_keys (window);
|
||||
|
||||
/* should we push an error trap? */
|
||||
XDestroyWindow (window->display->xdisplay, frame->xwindow);
|
||||
|
||||
g_free (frame);
|
||||
|
||||
/* Put our state back where it should be */
|
||||
@@ -255,6 +260,9 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
if (frame->window->fullscreen)
|
||||
flags |= META_FRAME_FULLSCREEN;
|
||||
|
||||
if (frame->is_flashing)
|
||||
flags |= META_FRAME_IS_FLASHING;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -277,6 +285,20 @@ meta_frame_calc_geometry (MetaFrame *frame,
|
||||
*geomp = geom;
|
||||
}
|
||||
|
||||
static void
|
||||
update_shape (MetaFrame *frame)
|
||||
{
|
||||
if (frame->need_reapply_frame_shape)
|
||||
{
|
||||
meta_ui_apply_frame_shape (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height,
|
||||
frame->window->has_shape);
|
||||
frame->need_reapply_frame_shape = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_frame_sync_to_window (MetaFrame *frame,
|
||||
int resize_gravity,
|
||||
@@ -284,8 +306,11 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
||||
gboolean need_resize)
|
||||
{
|
||||
if (!(need_move || need_resize))
|
||||
return;
|
||||
|
||||
{
|
||||
update_shape (frame);
|
||||
return;
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Syncing frame geometry %d,%d %dx%d (SE: %d,%d)\n",
|
||||
frame->rect.x, frame->rect.y,
|
||||
@@ -301,36 +326,24 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
|
||||
/* Done before the window resize, because doing it before means
|
||||
* part of the window being resized becomes unshaped, which may
|
||||
* be sort of hard to see with bg = None. If we did it after
|
||||
* window resize, part of the window being resized would become
|
||||
* shaped, which might be more visible.
|
||||
*/
|
||||
|
||||
meta_ui_apply_frame_shape (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
/* we need new shape if we're resized */
|
||||
frame->need_reapply_frame_shape = TRUE;
|
||||
}
|
||||
|
||||
/* Done before the window resize, because doing it before means
|
||||
* part of the window being resized becomes unshaped, which may
|
||||
* be sort of hard to see with bg = None. If we did it after
|
||||
* window resize, part of the window being resized would become
|
||||
* shaped, which might be more visible.
|
||||
*/
|
||||
update_shape (frame);
|
||||
|
||||
if (need_move && need_resize)
|
||||
XMoveResizeWindow (frame->window->display->xdisplay,
|
||||
frame->xwindow,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
else if (need_move)
|
||||
XMoveWindow (frame->window->display->xdisplay,
|
||||
frame->xwindow,
|
||||
frame->rect.x,
|
||||
frame->rect.y);
|
||||
else if (need_resize)
|
||||
XResizeWindow (frame->window->display->xdisplay,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
meta_ui_move_resize_frame (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
|
||||
if (need_resize)
|
||||
{
|
||||
@@ -354,8 +367,9 @@ meta_frame_queue_draw (MetaFrame *frame)
|
||||
frame->xwindow);
|
||||
}
|
||||
|
||||
void meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaCursor cursor)
|
||||
void
|
||||
meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
Cursor xcursor;
|
||||
if (cursor == frame->current_cursor)
|
||||
|
||||
@@ -57,6 +57,8 @@ struct _MetaFrame
|
||||
int bottom_height;
|
||||
|
||||
guint mapped : 1;
|
||||
guint need_reapply_frame_shape : 1;
|
||||
guint is_flashing : 1; /* used by the visual bell flash */
|
||||
};
|
||||
|
||||
void meta_window_ensure_frame (MetaWindow *window);
|
||||
|
||||
274
src/frames.c
274
src/frames.c
@@ -2,6 +2,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2003 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -452,7 +453,6 @@ meta_frames_calc_geometry (MetaFrames *frames,
|
||||
MetaFrames*
|
||||
meta_frames_new (int screen_number)
|
||||
{
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
GdkScreen *screen;
|
||||
|
||||
screen = gdk_display_get_screen (gdk_display_get_default (),
|
||||
@@ -460,32 +460,25 @@ meta_frames_new (int screen_number)
|
||||
|
||||
return g_object_new (META_TYPE_FRAMES,
|
||||
"screen", screen,
|
||||
NULL);
|
||||
#else
|
||||
return g_object_new (META_TYPE_FRAMES,
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_manage_window (MetaFrames *frames,
|
||||
Window xwindow)
|
||||
Window xwindow,
|
||||
GdkWindow *window)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
g_assert (window);
|
||||
|
||||
frame = g_new (MetaUIFrame, 1);
|
||||
|
||||
frame->window = gdk_window_foreign_new (xwindow);
|
||||
frame->window = window;
|
||||
|
||||
if (frame->window == NULL)
|
||||
{
|
||||
g_free (frame);
|
||||
meta_bug ("Frame 0x%lx doesn't exist\n", xwindow);
|
||||
return;
|
||||
}
|
||||
|
||||
gdk_window_set_user_data (frame->window, frames);
|
||||
gtk_style_set_background (GTK_WIDGET (frames)->style,
|
||||
frame->window, GTK_STATE_NORMAL);
|
||||
|
||||
/* Don't set event mask here, it's in frame.c */
|
||||
|
||||
@@ -495,6 +488,7 @@ meta_frames_manage_window (MetaFrames *frames,
|
||||
frame->text_height = -1;
|
||||
frame->title = NULL;
|
||||
frame->expose_delayed = FALSE;
|
||||
frame->shape_applied = FALSE;
|
||||
frame->prelit_control = META_FRAME_CONTROL_NONE;
|
||||
|
||||
meta_core_grab_buttons (gdk_display, frame->xwindow);
|
||||
@@ -526,7 +520,7 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
||||
|
||||
g_hash_table_remove (frames->frames, &frame->xwindow);
|
||||
|
||||
g_object_unref (G_OBJECT (frame->window));
|
||||
gdk_window_destroy (frame->window);
|
||||
|
||||
if (frame->layout)
|
||||
g_object_unref (G_OBJECT (frame->layout));
|
||||
@@ -664,7 +658,8 @@ void
|
||||
meta_frames_apply_shapes (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
int new_window_width,
|
||||
int new_window_height)
|
||||
int new_window_height,
|
||||
gboolean window_has_shape)
|
||||
{
|
||||
#ifdef HAVE_SHAPE
|
||||
/* Apply shapes as if window had new_window_width, new_window_height */
|
||||
@@ -685,10 +680,25 @@ meta_frames_apply_shapes (MetaFrames *frames,
|
||||
if (!(fgeom.top_left_corner_rounded ||
|
||||
fgeom.top_right_corner_rounded ||
|
||||
fgeom.bottom_left_corner_rounded ||
|
||||
fgeom.bottom_right_corner_rounded))
|
||||
fgeom.bottom_right_corner_rounded ||
|
||||
window_has_shape))
|
||||
{
|
||||
XShapeCombineMask (gdk_display, frame->xwindow,
|
||||
ShapeBounding, 0, 0, None, ShapeSet);
|
||||
if (frame->shape_applied)
|
||||
{
|
||||
meta_topic (META_DEBUG_SHAPES,
|
||||
"Unsetting shape mask on frame 0x%lx\n",
|
||||
frame->xwindow);
|
||||
|
||||
XShapeCombineMask (gdk_display, frame->xwindow,
|
||||
ShapeBounding, 0, 0, None, ShapeSet);
|
||||
frame->shape_applied = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_SHAPES,
|
||||
"Frame 0x%lx still doesn't need a shape mask\n",
|
||||
frame->xwindow);
|
||||
}
|
||||
|
||||
return; /* nothing to do */
|
||||
}
|
||||
@@ -804,12 +814,118 @@ meta_frames_apply_shapes (MetaFrames *frames,
|
||||
|
||||
XSubtractRegion (window_xregion, corners_xregion, window_xregion);
|
||||
|
||||
XShapeCombineRegion (gdk_display, frame->xwindow,
|
||||
ShapeBounding, 0, 0, window_xregion, ShapeSet);
|
||||
XDestroyRegion (corners_xregion);
|
||||
|
||||
if (window_has_shape)
|
||||
{
|
||||
/* The client window is oclock or something and has a shape
|
||||
* mask. To avoid a round trip to get its shape region, we
|
||||
* create a fake window that's never mapped, build up our shape
|
||||
* on that, then combine. Wasting the window is assumed cheaper
|
||||
* than a round trip, but who really knows for sure.
|
||||
*/
|
||||
XSetWindowAttributes attrs;
|
||||
Window shape_window;
|
||||
Window client_window;
|
||||
Region client_xregion;
|
||||
GdkScreen *screen;
|
||||
int screen_number;
|
||||
|
||||
meta_topic (META_DEBUG_SHAPES,
|
||||
"Frame 0x%lx needs to incorporate client shape\n",
|
||||
frame->xwindow);
|
||||
|
||||
screen = gtk_widget_get_screen (GTK_WIDGET (frames));
|
||||
screen_number = gdk_x11_screen_get_screen_number (screen);
|
||||
|
||||
attrs.override_redirect = True;
|
||||
|
||||
shape_window = XCreateWindow (gdk_display,
|
||||
RootWindow (gdk_display, screen_number),
|
||||
-5000, -5000,
|
||||
new_window_width,
|
||||
new_window_height,
|
||||
0,
|
||||
CopyFromParent,
|
||||
CopyFromParent,
|
||||
CopyFromParent,
|
||||
CWOverrideRedirect,
|
||||
&attrs);
|
||||
|
||||
/* Copy the client's shape to the temporary shape_window */
|
||||
client_window = meta_core_get_client_xwindow (gdk_display,
|
||||
frame->xwindow);
|
||||
|
||||
XShapeCombineShape (gdk_display, shape_window, ShapeBounding,
|
||||
fgeom.left_width,
|
||||
fgeom.top_height,
|
||||
client_window,
|
||||
ShapeBounding,
|
||||
ShapeSet);
|
||||
|
||||
/* Punch the client area out of the normal frame shape,
|
||||
* then union it with the shape_window's existing shape
|
||||
*/
|
||||
client_xregion = XCreateRegion ();
|
||||
|
||||
xrect.x = fgeom.left_width;
|
||||
xrect.y = fgeom.top_height;
|
||||
xrect.width = new_window_width - fgeom.right_width - xrect.x;
|
||||
xrect.height = new_window_height - fgeom.bottom_height - xrect.y;
|
||||
|
||||
XUnionRectWithRegion (&xrect, client_xregion, client_xregion);
|
||||
|
||||
XSubtractRegion (window_xregion, client_xregion, window_xregion);
|
||||
|
||||
XDestroyRegion (client_xregion);
|
||||
|
||||
XShapeCombineRegion (gdk_display, shape_window,
|
||||
ShapeBounding, 0, 0, window_xregion, ShapeUnion);
|
||||
|
||||
/* Now copy shape_window shape to the real frame */
|
||||
XShapeCombineShape (gdk_display, frame->xwindow, ShapeBounding,
|
||||
0, 0,
|
||||
shape_window,
|
||||
ShapeBounding,
|
||||
ShapeSet);
|
||||
|
||||
XDestroyWindow (gdk_display, shape_window);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* No shape on the client, so just do simple stuff */
|
||||
|
||||
meta_topic (META_DEBUG_SHAPES,
|
||||
"Frame 0x%lx has shaped corners\n",
|
||||
frame->xwindow);
|
||||
|
||||
XShapeCombineRegion (gdk_display, frame->xwindow,
|
||||
ShapeBounding, 0, 0, window_xregion, ShapeSet);
|
||||
}
|
||||
|
||||
frame->shape_applied = TRUE;
|
||||
|
||||
XDestroyRegion (window_xregion);
|
||||
XDestroyRegion (corners_xregion);
|
||||
#endif
|
||||
#endif /* HAVE_SHAPE */
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_move_resize_frame (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
MetaUIFrame *frame = meta_frames_lookup_window (frames, xwindow);
|
||||
int old_width, old_height;
|
||||
|
||||
gdk_drawable_get_size (frame->window, &old_width, &old_height);
|
||||
|
||||
gdk_window_move_resize (frame->window, x, y, width, height);
|
||||
|
||||
if (old_width != width || old_height != height)
|
||||
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -947,11 +1063,8 @@ show_tip_now (MetaFrames *frames)
|
||||
/* get conversion delta for root-to-frame coords */
|
||||
dx = root_x - x;
|
||||
dy = root_y - y;
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames)));
|
||||
#else
|
||||
screen_number = DefaultScreen (gdk_display);
|
||||
#endif
|
||||
|
||||
meta_fixed_tip_show (gdk_display,
|
||||
screen_number,
|
||||
rect->x + dx,
|
||||
@@ -1145,6 +1258,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
frame->xwindow,
|
||||
op,
|
||||
TRUE,
|
||||
meta_ui_get_last_event_serial (gdk_display),
|
||||
event->button,
|
||||
0,
|
||||
event->time,
|
||||
@@ -1224,6 +1338,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
frame->xwindow,
|
||||
op,
|
||||
TRUE,
|
||||
meta_ui_get_last_event_serial (gdk_display),
|
||||
event->button,
|
||||
0,
|
||||
event->time,
|
||||
@@ -1243,6 +1358,7 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
frame->xwindow,
|
||||
META_GRAB_OP_MOVING,
|
||||
TRUE,
|
||||
meta_ui_get_last_event_serial (gdk_display),
|
||||
event->button,
|
||||
0,
|
||||
event->time,
|
||||
@@ -1482,6 +1598,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
MetaGrabOp grab_op;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
@@ -1492,16 +1609,43 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
clear_tip (frames);
|
||||
|
||||
frames->last_motion_frame = frame;
|
||||
|
||||
grab_op = meta_core_get_grab_op (gdk_display);
|
||||
|
||||
switch (meta_core_get_grab_op (gdk_display))
|
||||
switch (grab_op)
|
||||
{
|
||||
case META_GRAB_OP_CLICKING_MENU:
|
||||
case META_GRAB_OP_CLICKING_DELETE:
|
||||
case META_GRAB_OP_CLICKING_MINIMIZE:
|
||||
case META_GRAB_OP_CLICKING_MAXIMIZE:
|
||||
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
|
||||
{
|
||||
MetaFrameControl control;
|
||||
int x, y;
|
||||
|
||||
gdk_window_get_pointer (frame->window, &x, &y, NULL);
|
||||
|
||||
/* Control is set to none unless it matches
|
||||
* the current grab
|
||||
*/
|
||||
control = get_control (frames, frame, x, y);
|
||||
if (! ((control == META_FRAME_CONTROL_MENU &&
|
||||
grab_op == META_GRAB_OP_CLICKING_MENU) ||
|
||||
(control == META_FRAME_CONTROL_DELETE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_DELETE) ||
|
||||
(control == META_FRAME_CONTROL_MINIMIZE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_MINIMIZE) ||
|
||||
(control == META_FRAME_CONTROL_MAXIMIZE &&
|
||||
(grab_op == META_GRAB_OP_CLICKING_MAXIMIZE ||
|
||||
grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE))))
|
||||
control = META_FRAME_CONTROL_NONE;
|
||||
|
||||
/* Update prelit control and cursor */
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
|
||||
/* No tooltip while in the process of clicking */
|
||||
}
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_NONE:
|
||||
{
|
||||
MetaFrameControl control;
|
||||
@@ -1549,7 +1693,7 @@ meta_frames_expose_event (GtkWidget *widget,
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
@@ -1589,6 +1733,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||
int n_areas;
|
||||
int screen_width, screen_height;
|
||||
MetaButtonLayout button_layout;
|
||||
MetaGrabOp grab_op;
|
||||
|
||||
widget = GTK_WIDGET (frames);
|
||||
|
||||
@@ -1600,53 +1745,47 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||
++i;
|
||||
}
|
||||
|
||||
grab_frame = meta_core_get_grab_frame (gdk_display);
|
||||
grab_op = meta_core_get_grab_op (gdk_display);
|
||||
if (grab_frame != frame->xwindow)
|
||||
grab_op = META_GRAB_OP_NONE;
|
||||
|
||||
/* Set prelight state */
|
||||
switch (frame->prelit_control)
|
||||
{
|
||||
case META_FRAME_CONTROL_MENU:
|
||||
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_MENU)
|
||||
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_MINIMIZE)
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_MAXIMIZE)
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE)
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_DELETE)
|
||||
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
grab_frame = meta_core_get_grab_frame (gdk_display);
|
||||
|
||||
if (frame->xwindow == grab_frame)
|
||||
{
|
||||
switch (meta_core_get_grab_op (gdk_display))
|
||||
{
|
||||
case META_GRAB_OP_CLICKING_MENU:
|
||||
button_states[META_BUTTON_TYPE_MENU] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
case META_GRAB_OP_CLICKING_DELETE:
|
||||
button_states[META_BUTTON_TYPE_CLOSE] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
case META_GRAB_OP_CLICKING_MAXIMIZE:
|
||||
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
case META_GRAB_OP_CLICKING_MINIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Map button function states to button position states */
|
||||
button_states[META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND] =
|
||||
@@ -1975,6 +2114,13 @@ get_control (MetaFrames *frames,
|
||||
void
|
||||
meta_frames_push_delay_exposes (MetaFrames *frames)
|
||||
{
|
||||
if (frames->expose_delay_count == 0)
|
||||
{
|
||||
/* Make sure we've repainted things */
|
||||
gdk_window_process_all_updates ();
|
||||
XFlush (gdk_display);
|
||||
}
|
||||
|
||||
frames->expose_delay_count += 1;
|
||||
}
|
||||
|
||||
|
||||
16
src/frames.h
16
src/frames.h
@@ -72,7 +72,8 @@ struct _MetaUIFrame
|
||||
int text_height;
|
||||
char *title; /* NULL once we have a layout */
|
||||
guint expose_delayed : 1;
|
||||
|
||||
guint shape_applied : 1;
|
||||
|
||||
/* FIXME get rid of this, it can just be in the MetaFrames struct */
|
||||
MetaFrameControl prelit_control;
|
||||
};
|
||||
@@ -102,7 +103,8 @@ GType meta_frames_get_type (void) G_GNUC_CONST;
|
||||
MetaFrames *meta_frames_new (int screen_number);
|
||||
|
||||
void meta_frames_manage_window (MetaFrames *frames,
|
||||
Window xwindow);
|
||||
Window xwindow,
|
||||
GdkWindow *window);
|
||||
void meta_frames_unmanage_window (MetaFrames *frames,
|
||||
Window xwindow);
|
||||
void meta_frames_set_title (MetaFrames *frames,
|
||||
@@ -127,8 +129,14 @@ void meta_frames_unflicker_bg (MetaFrames *frames,
|
||||
void meta_frames_apply_shapes (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
int new_window_width,
|
||||
int new_window_height);
|
||||
|
||||
int new_window_height,
|
||||
gboolean window_has_shape);
|
||||
void meta_frames_move_resize_frame (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
void meta_frames_queue_draw (MetaFrames *frames,
|
||||
Window xwindow);
|
||||
|
||||
|
||||
100
src/group.c
100
src/group.c
@@ -2,6 +2,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Red Hat Inc.
|
||||
* Copyright (C) 2003 Rob Adams
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -105,67 +106,71 @@ meta_window_get_group (MetaWindow *window)
|
||||
{
|
||||
if (window->unmanaging)
|
||||
return NULL;
|
||||
|
||||
if (window->cached_group == NULL)
|
||||
|
||||
g_assert (window->group != NULL);
|
||||
|
||||
return window->group;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_compute_group (MetaWindow* window)
|
||||
{
|
||||
MetaGroup *group;
|
||||
|
||||
/* use window->xwindow if no window->xgroup_leader */
|
||||
|
||||
group = NULL;
|
||||
|
||||
if (window->display->groups_by_leader)
|
||||
{
|
||||
MetaGroup *group;
|
||||
|
||||
/* use window->xwindow if no window->xgroup_leader */
|
||||
|
||||
group = NULL;
|
||||
|
||||
if (window->display->groups_by_leader)
|
||||
{
|
||||
if (window->xgroup_leader != None)
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xgroup_leader);
|
||||
else
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xwindow);
|
||||
}
|
||||
|
||||
if (group != NULL)
|
||||
{
|
||||
window->cached_group = group;
|
||||
group->refcount += 1;
|
||||
}
|
||||
if (window->xgroup_leader != None)
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xgroup_leader);
|
||||
else
|
||||
{
|
||||
if (window->xgroup_leader != None)
|
||||
group = meta_group_new (window->display,
|
||||
window->xgroup_leader);
|
||||
else
|
||||
group = meta_group_new (window->display,
|
||||
window->xwindow);
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xwindow);
|
||||
}
|
||||
|
||||
if (group != NULL)
|
||||
{
|
||||
window->group = group;
|
||||
group->refcount += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (window->xgroup_leader != None)
|
||||
group = meta_group_new (window->display,
|
||||
window->xgroup_leader);
|
||||
else
|
||||
group = meta_group_new (window->display,
|
||||
window->xwindow);
|
||||
|
||||
window->cached_group = group;
|
||||
}
|
||||
|
||||
window->cached_group->windows = g_slist_prepend (window->cached_group->windows,
|
||||
window);
|
||||
|
||||
meta_topic (META_DEBUG_GROUPS,
|
||||
"Adding %s to group with leader 0x%lx\n",
|
||||
window->desc, group->group_leader);
|
||||
window->group = group;
|
||||
}
|
||||
|
||||
return window->cached_group;
|
||||
window->group->windows = g_slist_prepend (window->group->windows,
|
||||
window);
|
||||
|
||||
meta_topic (META_DEBUG_GROUPS,
|
||||
"Adding %s to group with leader 0x%lx\n",
|
||||
window->desc, group->group_leader);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
remove_window_from_group (MetaWindow *window)
|
||||
{
|
||||
if (window->cached_group != NULL)
|
||||
if (window->group != NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_GROUPS,
|
||||
"Removing %s from group with leader 0x%lx\n",
|
||||
window->desc, window->cached_group->group_leader);
|
||||
window->desc, window->group->group_leader);
|
||||
|
||||
window->cached_group->windows =
|
||||
g_slist_remove (window->cached_group->windows,
|
||||
window->group->windows =
|
||||
g_slist_remove (window->group->windows,
|
||||
window);
|
||||
meta_group_unref (window->cached_group);
|
||||
window->cached_group = NULL;
|
||||
meta_group_unref (window->group);
|
||||
window->group = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +178,7 @@ void
|
||||
meta_window_group_leader_changed (MetaWindow *window)
|
||||
{
|
||||
remove_window_from_group (window);
|
||||
meta_window_get_group (window);
|
||||
meta_window_compute_group (window);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -255,4 +260,5 @@ meta_group_property_notify (MetaGroup *group,
|
||||
event->xproperty.atom);
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
/* note, can return NULL */
|
||||
MetaGroup* meta_window_get_group (MetaWindow *window);
|
||||
void meta_window_compute_group (MetaWindow* window);
|
||||
void meta_window_shutdown_group (MetaWindow *window);
|
||||
|
||||
void meta_window_group_leader_changed (MetaWindow *window);
|
||||
|
||||
@@ -46,7 +46,7 @@ get_fallback_icons (MetaScreen *screen,
|
||||
|
||||
static gboolean
|
||||
find_largest_sizes (gulong *data,
|
||||
int nitems,
|
||||
gulong nitems,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ find_largest_sizes (gulong *data,
|
||||
|
||||
static gboolean
|
||||
find_best_size (gulong *data,
|
||||
int nitems,
|
||||
gulong nitems,
|
||||
int ideal_width,
|
||||
int ideal_height,
|
||||
int *width,
|
||||
@@ -520,6 +520,7 @@ meta_icon_cache_init (MetaIconCache *icon_cache)
|
||||
|
||||
icon_cache->origin = USING_NO_ICON;
|
||||
icon_cache->prev_pixmap = None;
|
||||
icon_cache->prev_mask = None;
|
||||
#if 0
|
||||
icon_cache->icon = NULL;
|
||||
icon_cache->mini_icon = NULL;
|
||||
|
||||
1006
src/keybindings.c
1006
src/keybindings.c
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user