Compare commits
807 Commits
release-2.
...
2.91.3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e7a10b0d6a | ||
![]() |
6b98644c58 | ||
![]() |
5397335ae8 | ||
![]() |
0b6d6e517d | ||
![]() |
b031543f5a | ||
![]() |
c6be05f9d7 | ||
![]() |
cb88e0d052 | ||
![]() |
54e82daae2 | ||
![]() |
1394c566eb | ||
![]() |
3183d954a0 | ||
![]() |
67b89e5c86 | ||
![]() |
c88c94886b | ||
![]() |
c1f6902cb9 | ||
![]() |
8817e68926 | ||
![]() |
b1868fb213 | ||
![]() |
6260814285 | ||
![]() |
07e6c5aac2 | ||
![]() |
0477a3066d | ||
![]() |
59639909b1 | ||
![]() |
64c37852b1 | ||
![]() |
bac668d287 | ||
![]() |
f372fa29b2 | ||
![]() |
8b24711bba | ||
![]() |
d4c28fc5f5 | ||
![]() |
ca5f2ac3ec | ||
![]() |
15f9590427 | ||
![]() |
21a246eb42 | ||
![]() |
1bbaec81ce | ||
![]() |
7952feb48b | ||
![]() |
52aebdf223 | ||
![]() |
6b16604c26 | ||
![]() |
3c4d52732e | ||
![]() |
d56d267f7d | ||
![]() |
8eb31944a5 | ||
![]() |
ed2fbcd13a | ||
![]() |
9f4942e9a7 | ||
![]() |
982a10ac44 | ||
![]() |
e59a9872b4 | ||
![]() |
9aedd32e01 | ||
![]() |
dd0ca4dd60 | ||
![]() |
3e7d2df6f3 | ||
![]() |
02e709e89e | ||
![]() |
1114e5effa | ||
![]() |
c40fab214d | ||
![]() |
441c050808 | ||
![]() |
85425f64a5 | ||
![]() |
b445ee3763 | ||
![]() |
95a7f0269a | ||
![]() |
db63764e22 | ||
![]() |
03578b69f3 | ||
![]() |
8cbaee47a0 | ||
![]() |
bcded5ae25 | ||
![]() |
7227b636c6 | ||
![]() |
af715f71e7 | ||
![]() |
52bc675fcb | ||
![]() |
1920f211b0 | ||
![]() |
804117c456 | ||
![]() |
9a4d1686a6 | ||
![]() |
e8dda03441 | ||
![]() |
4b214b4710 | ||
![]() |
6ed34976c9 | ||
![]() |
069092eb9d | ||
![]() |
dc7d323295 | ||
![]() |
cbedfd680f | ||
![]() |
a1e2e2a13d | ||
![]() |
a53a40c43e | ||
![]() |
33489c8cb8 | ||
![]() |
c382d8f7ea | ||
![]() |
f2ccf70f8d | ||
![]() |
ff04e38326 | ||
![]() |
1123fca3f2 | ||
![]() |
33e2d15495 | ||
![]() |
b265e8099a | ||
![]() |
a2b3f9aeb0 | ||
![]() |
d19295a68e | ||
![]() |
9f5d8d1a2a | ||
![]() |
e75abacec6 | ||
![]() |
1c31e8ffc2 | ||
![]() |
1083a4c0b7 | ||
![]() |
d212be799a | ||
![]() |
84986c7695 | ||
![]() |
aa65f94c67 | ||
![]() |
dc80242e51 | ||
![]() |
f2c63e5eec | ||
![]() |
1fc91dc459 | ||
![]() |
a2e4789b3e | ||
![]() |
7d58524185 | ||
![]() |
635e20d057 | ||
![]() |
1c3f7c4088 | ||
![]() |
5c3b0cda2e | ||
![]() |
a3c6486e52 | ||
![]() |
741d2b761a | ||
![]() |
a0ffe71db3 | ||
![]() |
ecf812db83 | ||
![]() |
afd3b96e2e | ||
![]() |
b79e6c0b3e | ||
![]() |
c6f8ad24bd | ||
![]() |
d4d05e496a | ||
![]() |
0a88329526 | ||
![]() |
b4344b5ab5 | ||
![]() |
4ac836fde4 | ||
![]() |
7897448a5b | ||
![]() |
94f4011844 | ||
![]() |
3f8e6020f7 | ||
![]() |
beb65f011d | ||
![]() |
c2f894963a | ||
![]() |
dacea8edf9 | ||
![]() |
3fed2ab64d | ||
![]() |
476652da0a | ||
![]() |
35289050e4 | ||
![]() |
ed9d7f18a6 | ||
![]() |
a7d1053ff5 | ||
![]() |
97e2b4666b | ||
![]() |
7d8cc4f940 | ||
![]() |
ee2f995fc7 | ||
![]() |
7e852f8c14 | ||
![]() |
b4c1692d14 | ||
![]() |
c0858b247f | ||
![]() |
0a956f56aa | ||
![]() |
66105c6e7e | ||
![]() |
bb1ab0afd9 | ||
![]() |
0d51d9e4cf | ||
![]() |
e3789e31ef | ||
![]() |
8a6b583cdc | ||
![]() |
86b8b9051f | ||
![]() |
4c0763792d | ||
![]() |
599eb5e3e4 | ||
![]() |
31fe25aa78 | ||
![]() |
252657905f | ||
![]() |
77a5e817a5 | ||
![]() |
2521e8103d | ||
![]() |
47fcb998f5 | ||
![]() |
455c40677b | ||
![]() |
9ae8e4c006 | ||
![]() |
d514516543 | ||
![]() |
1024eae742 | ||
![]() |
dad1f01c5b | ||
![]() |
ce53f35974 | ||
![]() |
3d19e800ab | ||
![]() |
2a54baf60e | ||
![]() |
4544fe7571 | ||
![]() |
a125b0179a | ||
![]() |
6b69acdf8b | ||
![]() |
8c11a2e5a3 | ||
![]() |
693c2bc175 | ||
![]() |
8b34b4bd0b | ||
![]() |
8cce57ba44 | ||
![]() |
63f81ed027 | ||
![]() |
c9ebc0ea25 | ||
![]() |
15a214e435 | ||
![]() |
0b3327f04d | ||
![]() |
0839c100c0 | ||
![]() |
08cfdcd802 | ||
![]() |
a1bb3835cc | ||
![]() |
e590cd2b99 | ||
![]() |
77b620e50e | ||
![]() |
9bc723d256 | ||
![]() |
b9f9a230e6 | ||
![]() |
ce1ffa4624 | ||
![]() |
17aa36d343 | ||
![]() |
cc0965f9f9 | ||
![]() |
0e728d7751 | ||
![]() |
3e6cf75d73 | ||
![]() |
bbedba8b18 | ||
![]() |
c8d756dde3 | ||
![]() |
97a8dbb71e | ||
![]() |
6835804dab | ||
![]() |
1a2a374380 | ||
![]() |
2b84afc1e3 | ||
![]() |
bb3d23f7f6 | ||
![]() |
7511ea27e2 | ||
![]() |
adbe3a2312 | ||
![]() |
eda50a91df | ||
![]() |
7853bb8042 | ||
![]() |
37de1b2d25 | ||
![]() |
0c4ac0b48a | ||
![]() |
c24cf44c6a | ||
![]() |
11a8ab47fa | ||
![]() |
7feeb72721 | ||
![]() |
01447d94d1 | ||
![]() |
e267a63330 | ||
![]() |
c65a24486d | ||
![]() |
42e786b15b | ||
![]() |
7a04673dd7 | ||
![]() |
c47d2da0cb | ||
![]() |
fd12eddb5d | ||
![]() |
0b56599d28 | ||
![]() |
27de94b915 | ||
![]() |
9e31f2b1de | ||
![]() |
13ad103823 | ||
![]() |
ff5a73de49 | ||
![]() |
275a6ec63f | ||
![]() |
604da0f6ea | ||
![]() |
72a19dd448 | ||
![]() |
3a73f6b8ec | ||
![]() |
343474a570 | ||
![]() |
91d82bf8c7 | ||
![]() |
ed19060074 | ||
![]() |
f230a67b94 | ||
![]() |
849f101feb | ||
![]() |
f45083ce82 | ||
![]() |
4c143ae9af | ||
![]() |
cd1a1d5778 | ||
![]() |
e28e7a72aa | ||
![]() |
fc9488211f | ||
![]() |
28767c4d34 | ||
![]() |
c6c7b05d7b | ||
![]() |
5526e91b6e | ||
![]() |
9e123695d0 | ||
![]() |
092cc47afc | ||
![]() |
fd20059f68 | ||
![]() |
609aae684f | ||
![]() |
49940877d1 | ||
![]() |
22ae86104b | ||
![]() |
f8dd4c160b | ||
![]() |
11061a23b1 | ||
![]() |
d8b0f213b2 | ||
![]() |
e9fbe4b2c1 | ||
![]() |
edcb351107 | ||
![]() |
0c14640352 | ||
![]() |
cfa30f9876 | ||
![]() |
af60dd3634 | ||
![]() |
ccabce1b34 | ||
![]() |
9915a18810 | ||
![]() |
a78373f324 | ||
![]() |
1d7476a725 | ||
![]() |
e8e78ebfdd | ||
![]() |
b77b0a3d81 | ||
![]() |
95b260f3a9 | ||
![]() |
97a9726845 | ||
![]() |
020aea033c | ||
![]() |
0ac46316af | ||
![]() |
94d47dc25e | ||
![]() |
debf08cac0 | ||
![]() |
ce1393d2d4 | ||
![]() |
fac482c442 | ||
![]() |
ee35540b6e | ||
![]() |
f77507e825 | ||
![]() |
0021efd593 | ||
![]() |
0d955bb873 | ||
![]() |
7fa2e8d2d3 | ||
![]() |
713d94d881 | ||
![]() |
4ecf8964b8 | ||
![]() |
11d044fa6e | ||
![]() |
a2104c5404 | ||
![]() |
1abed05413 | ||
![]() |
1465895ff7 | ||
![]() |
452025e984 | ||
![]() |
d537dd93d5 | ||
![]() |
650a1e807c | ||
![]() |
67f8a33cad | ||
![]() |
ff4f096f1d | ||
![]() |
b5cb353ab5 | ||
![]() |
17a38dfbed | ||
![]() |
f773683601 | ||
![]() |
abeaf828a3 | ||
![]() |
23a8a4201a | ||
![]() |
2d409e5c09 | ||
![]() |
2d57904bf4 | ||
![]() |
8fa83e1be7 | ||
![]() |
8875e73765 | ||
![]() |
65766fcaac | ||
![]() |
4cd4010a70 | ||
![]() |
d21da5643b | ||
![]() |
ba700e6387 | ||
![]() |
bd90fd7033 | ||
![]() |
fb3d352d3a | ||
![]() |
690852e157 | ||
![]() |
aa84d21bcf | ||
![]() |
4d62977c7b | ||
![]() |
cbac2e7bbb | ||
![]() |
88ee4c5b30 | ||
![]() |
12c46c5d8b | ||
![]() |
ab7d4e0e60 | ||
![]() |
708c6162c4 | ||
![]() |
7834bba6f7 | ||
![]() |
857c8aaaa2 | ||
![]() |
1253e6c64e | ||
![]() |
b610b2ecc7 | ||
![]() |
11addbe9c8 | ||
![]() |
709ef05714 | ||
![]() |
c51767eef1 | ||
![]() |
5aab9e878f | ||
![]() |
e7751e170e | ||
![]() |
776d345bc3 | ||
![]() |
a8fc30a13f | ||
![]() |
2d57b1b470 | ||
![]() |
90f21fa5db | ||
![]() |
6638d0e507 | ||
![]() |
c6793d477a | ||
![]() |
11e01ec074 | ||
![]() |
1d827caaaf | ||
![]() |
ba4db78ed9 | ||
![]() |
a321f4c842 | ||
![]() |
b1c465eab0 | ||
![]() |
5134b05af9 | ||
![]() |
dc3a93be99 | ||
![]() |
49aabfec02 | ||
![]() |
11d0d207fd | ||
![]() |
eed3245b1b | ||
![]() |
a7bbde1699 | ||
![]() |
bacccafe3c | ||
![]() |
3a80bd47cc | ||
![]() |
152917d5e1 | ||
![]() |
c588e173f8 | ||
![]() |
c0d2ead351 | ||
![]() |
6ffe5f8343 | ||
![]() |
2a823ef3e4 | ||
![]() |
5159c3f3ca | ||
![]() |
d092924961 | ||
![]() |
e14132b826 | ||
![]() |
df36ff638e | ||
![]() |
ad1fee8233 | ||
![]() |
3883d511a9 | ||
![]() |
10803b0d25 | ||
![]() |
a570a57863 | ||
![]() |
a7590f9717 | ||
![]() |
35224ca8d4 | ||
![]() |
40563e4f84 | ||
![]() |
c30901e9be | ||
![]() |
4fc0a91b31 | ||
![]() |
576417648a | ||
![]() |
0aace5230f | ||
![]() |
8d5ba7a6d7 | ||
![]() |
f8153b84de | ||
![]() |
fac5b0c9e7 | ||
![]() |
eb06413188 | ||
![]() |
066c870271 | ||
![]() |
1a92fa788d | ||
![]() |
3a0ab1cc0c | ||
![]() |
8a7d588bb0 | ||
![]() |
4943d79d68 | ||
![]() |
5de10c34b7 | ||
![]() |
2fbe4c2388 | ||
![]() |
767cb27f78 | ||
![]() |
b8c75c3fc0 | ||
![]() |
edeadf62ef | ||
![]() |
5ac80057c4 | ||
![]() |
210e30556e | ||
![]() |
0487b4213f | ||
![]() |
8f29c14ac4 | ||
![]() |
9543d8be10 | ||
![]() |
43e0003e79 | ||
![]() |
30e63a7244 | ||
![]() |
575f520461 | ||
![]() |
df618c9e91 | ||
![]() |
ebd13a4bae | ||
![]() |
7aa54b5a23 | ||
![]() |
b20cb36f5d | ||
![]() |
86f8c1863e | ||
![]() |
19d85c8566 | ||
![]() |
4241f91a0a | ||
![]() |
05624f099a | ||
![]() |
920f4099b6 | ||
![]() |
aa26750e01 | ||
![]() |
bdb3be7084 | ||
![]() |
14987f2b21 | ||
![]() |
47af6a0bbf | ||
![]() |
1487578ff4 | ||
![]() |
5a03a5d578 | ||
![]() |
2dd137329d | ||
![]() |
db37deb589 | ||
![]() |
ec7a3c516d | ||
![]() |
988d2ffab6 | ||
![]() |
5e2c66e241 | ||
![]() |
0ccfb0d781 | ||
![]() |
01ce961c00 | ||
![]() |
7579b691df | ||
![]() |
2a14deab0c | ||
![]() |
1acefb9eac | ||
![]() |
fb45b8f45c | ||
![]() |
d59a9c2e8a | ||
![]() |
a1c3d8723d | ||
![]() |
c4bd65e97c | ||
![]() |
eac3a2d7ac | ||
![]() |
55bb584778 | ||
![]() |
4584943531 | ||
![]() |
55d2bc0e0b | ||
![]() |
c0cc2fa1b8 | ||
![]() |
c1ecbd4de1 | ||
![]() |
0fb6b8a8ff | ||
![]() |
78ba9adfed | ||
![]() |
3f642ea34f | ||
![]() |
1a3927b40c | ||
![]() |
b09d73ab68 | ||
![]() |
9311addca3 | ||
![]() |
3c76478510 | ||
![]() |
545551e2bc | ||
![]() |
d5e0a95ff1 | ||
![]() |
e811109566 | ||
![]() |
0f805bfdfb | ||
![]() |
200cd629df | ||
![]() |
e8a29c1e82 | ||
![]() |
8589e4f3d3 | ||
![]() |
948e54772d | ||
![]() |
2d4b05a71b | ||
![]() |
a6433e84f5 | ||
![]() |
083854e2de | ||
![]() |
3508c4aa87 | ||
![]() |
d04b15ee25 | ||
![]() |
d6143e4c73 | ||
![]() |
d8ffc3c187 | ||
![]() |
2af788956e | ||
![]() |
d399141d13 | ||
![]() |
f6f899f103 | ||
![]() |
5b8919a246 | ||
![]() |
fe1989979c | ||
![]() |
0895fa9331 | ||
![]() |
b90fe0c52a | ||
![]() |
ab0e22159c | ||
![]() |
6ac0afbce0 | ||
![]() |
9532527e52 | ||
![]() |
defdf9f34c | ||
![]() |
a7dce2dc4e | ||
![]() |
ea8c51f8f3 | ||
![]() |
1e66878447 | ||
![]() |
6cfbdebf6a | ||
![]() |
a4469dcc14 | ||
![]() |
ac3eac7154 | ||
![]() |
65ac9065fa | ||
![]() |
5143e6763b | ||
![]() |
5660a8e9f5 | ||
![]() |
bc2b17df0b | ||
![]() |
f9e7c95348 | ||
![]() |
c6afec4759 | ||
![]() |
eb13498fff | ||
![]() |
163057f521 | ||
![]() |
d8ff1f9873 | ||
![]() |
97b7760de8 | ||
![]() |
acca0f6946 | ||
![]() |
f3f6d67d46 | ||
![]() |
63773d5226 | ||
![]() |
4e4559fc8c | ||
![]() |
44d540d36c | ||
![]() |
c6253a6515 | ||
![]() |
65a5ec2ef3 | ||
![]() |
70e8b35944 | ||
![]() |
ddba25a674 | ||
![]() |
14e6cb6a8f | ||
![]() |
d4619150f3 | ||
![]() |
5c1a1a2dd5 | ||
![]() |
7cfa690aaf | ||
![]() |
8d663ff055 | ||
![]() |
0b86343dd0 | ||
![]() |
e127898312 | ||
![]() |
51f83f25e6 | ||
![]() |
8f3da9f68a | ||
![]() |
4c1998f137 | ||
![]() |
84dc1c1b85 | ||
![]() |
326110e38d | ||
![]() |
f63b81c52a | ||
![]() |
bd2e221da3 | ||
![]() |
1fe673703f | ||
![]() |
c10467d22e | ||
![]() |
e21ec0a271 | ||
![]() |
3a1e492afc | ||
![]() |
e83c24c91b | ||
![]() |
81183c71c1 | ||
![]() |
979298ce57 | ||
![]() |
66e727e1b2 | ||
![]() |
35b1dda3a3 | ||
![]() |
6925779f59 | ||
![]() |
125d7daf4a | ||
![]() |
57c5ea4bd5 | ||
![]() |
e75fbdb136 | ||
![]() |
cb1020b26d | ||
![]() |
e1945506f3 | ||
![]() |
8d402971a8 | ||
![]() |
7e0087304b | ||
![]() |
20b02e738c | ||
![]() |
d042dba4d6 | ||
![]() |
a69ce37546 | ||
![]() |
3a798112f2 | ||
![]() |
3e09b4a725 | ||
![]() |
c5dd3e5542 | ||
![]() |
2fa9cbfd9e | ||
![]() |
c2c0de1696 | ||
![]() |
cc46d2ebb4 | ||
![]() |
d0510d8ea2 | ||
![]() |
7b0ba87b24 | ||
![]() |
67682a2683 | ||
![]() |
b1776b5ae5 | ||
![]() |
7a6968cb46 | ||
![]() |
23af4ee93e | ||
![]() |
0317562605 | ||
![]() |
1861e0b2cc | ||
![]() |
e5974809e8 | ||
![]() |
abfae17b9a | ||
![]() |
84b1a62ad2 | ||
![]() |
b6bcaec9bc | ||
![]() |
f19ed84cc4 | ||
![]() |
6c5a946fda | ||
![]() |
d58c9a57c6 | ||
![]() |
c6ffc9427e | ||
![]() |
0f1e64f3b2 | ||
![]() |
1ce5ad3003 | ||
![]() |
64694955c0 | ||
![]() |
97a90d8122 | ||
![]() |
3cd2c08277 | ||
![]() |
d804a1f146 | ||
![]() |
01581dc61c | ||
![]() |
9cc70a3fb6 | ||
![]() |
c37a2ca1c8 | ||
![]() |
80b38210b2 | ||
![]() |
e5dffb0097 | ||
![]() |
7396f5709e | ||
![]() |
41cf9134a6 | ||
![]() |
e960269653 | ||
![]() |
5e581b409c | ||
![]() |
f03d39eefb | ||
![]() |
deaa897928 | ||
![]() |
3f9758e706 | ||
![]() |
91baf552cf | ||
![]() |
16466cf7d6 | ||
![]() |
3c25c265df | ||
![]() |
a8529bd8d1 | ||
![]() |
f3e6913d57 | ||
![]() |
2c8df7d12e | ||
![]() |
dafdecb4e8 | ||
![]() |
ba03ca76c4 | ||
![]() |
c5874e0da5 | ||
![]() |
422cd1fbbf | ||
![]() |
8a9e2877da | ||
![]() |
71fd54ec9e | ||
![]() |
ff84b35e5d | ||
![]() |
ae32ac86b4 | ||
![]() |
bca3eaf709 | ||
![]() |
a03343827e | ||
![]() |
0f64202a29 | ||
![]() |
4fb7c642d5 | ||
![]() |
6b36e64e00 | ||
![]() |
84059f1faa | ||
![]() |
15376957f7 | ||
![]() |
da934be354 | ||
![]() |
3eee6b4218 | ||
![]() |
ff9400abde | ||
![]() |
e985bf0e7a | ||
![]() |
245908909b | ||
![]() |
2f63d321d1 | ||
![]() |
2222cb8fbf | ||
![]() |
897814a153 | ||
![]() |
8b7b41df41 | ||
![]() |
8f9a174f0a | ||
![]() |
df90187e06 | ||
![]() |
c9e0613b53 | ||
![]() |
a576f7a1ea | ||
![]() |
239b39cf52 | ||
![]() |
1f90529365 | ||
![]() |
acfc498344 | ||
![]() |
a1ac1f4b2e | ||
![]() |
8a892d47e5 | ||
![]() |
d91d503eb2 | ||
![]() |
e84bf7144c | ||
![]() |
73abacc20b | ||
![]() |
aea24279ba | ||
![]() |
5c5968e742 | ||
![]() |
3813ed9c2e | ||
![]() |
ec2c197e1f | ||
![]() |
0060c8ddb9 | ||
![]() |
f9c11c2dbf | ||
![]() |
65565a96b7 | ||
![]() |
b62ee94b89 | ||
![]() |
594897e9a5 | ||
![]() |
83f8bfd2ca | ||
![]() |
40e9f6fa2c | ||
![]() |
35afd2a8fb | ||
![]() |
a454ad5c41 | ||
![]() |
d9be1d7e32 | ||
![]() |
b625ec30d9 | ||
![]() |
4be8e155d1 | ||
![]() |
6726fcd25d | ||
![]() |
cd048be932 | ||
![]() |
5d477c4b4e | ||
![]() |
9244f0f113 | ||
![]() |
bc9a2cc92a | ||
![]() |
309a07bf4c | ||
![]() |
a0f06cab43 | ||
![]() |
1d65e2e50c | ||
![]() |
c60d4c2bc4 | ||
![]() |
f0d22e18c4 | ||
![]() |
9d36e8d853 | ||
![]() |
f5313268d7 | ||
![]() |
2c17ef4803 | ||
![]() |
32251dcf4e | ||
![]() |
94f64797de | ||
![]() |
d69546902b | ||
![]() |
72149a054e | ||
![]() |
3aff9726eb | ||
![]() |
0b8a57bcba | ||
![]() |
455486db7c | ||
![]() |
43511c316e | ||
![]() |
34e4b594cd | ||
![]() |
6314ee8780 | ||
![]() |
a4cd66f599 | ||
![]() |
729fb2e0b4 | ||
![]() |
dc2d8acc92 | ||
![]() |
f7c595ff18 | ||
![]() |
3d81a1e5ec | ||
![]() |
00d955eb40 | ||
![]() |
fd27647440 | ||
![]() |
27fb5fbbca | ||
![]() |
d810315884 | ||
![]() |
820970328b | ||
![]() |
3e2fcf4acd | ||
![]() |
07dedee37b | ||
![]() |
a13dec34ef | ||
![]() |
75f3127ba5 | ||
![]() |
072ec184d3 | ||
![]() |
321b40a386 | ||
![]() |
0a863b8c2b | ||
![]() |
b13fae2556 | ||
![]() |
c012105b90 | ||
![]() |
f26d503694 | ||
![]() |
6e4cd65544 | ||
![]() |
08c5095ad7 | ||
![]() |
dfb0e4f57b | ||
![]() |
29257f107a | ||
![]() |
ecde490967 | ||
![]() |
51a6467968 | ||
![]() |
9127993d84 | ||
![]() |
ec2370b76d | ||
![]() |
204431812b | ||
![]() |
627b4484ec | ||
![]() |
442991a712 | ||
![]() |
7eae5d4eab | ||
![]() |
f3914c86b9 | ||
![]() |
fafb752827 | ||
![]() |
2e9838699b | ||
![]() |
2ed1bf05d1 | ||
![]() |
ba9c3f41c9 | ||
![]() |
e35fae8f32 | ||
![]() |
b0d5f3bd64 | ||
![]() |
ed640bb181 | ||
![]() |
aff4cf1103 | ||
![]() |
9883f6e679 | ||
![]() |
ea91834407 | ||
![]() |
90c35f8181 | ||
![]() |
2a8c160569 | ||
![]() |
1d5117a607 | ||
![]() |
99d0f41d98 | ||
![]() |
7b522c0de8 | ||
![]() |
cbf4be04fc | ||
![]() |
f55509aadd | ||
![]() |
7e369d63b3 | ||
![]() |
6cf71a06c0 | ||
![]() |
a3511ba9e2 | ||
![]() |
49400c08cd | ||
![]() |
1624b87b9b | ||
![]() |
dcf387c91a | ||
![]() |
4c9c903648 | ||
![]() |
d12aaddc34 | ||
![]() |
cb01977029 | ||
![]() |
7a7632fa98 | ||
![]() |
76a3f9d402 | ||
![]() |
96dfeea412 | ||
![]() |
a4746d75e6 | ||
![]() |
52638b9d8e | ||
![]() |
514d00698d | ||
![]() |
c4a4de0056 | ||
![]() |
28a4be2536 | ||
![]() |
6e9803cd9f | ||
![]() |
63b1d6642c | ||
![]() |
28955bb449 | ||
![]() |
dcd7cae7cf | ||
![]() |
c954bb9456 | ||
![]() |
be0b298d81 | ||
![]() |
409026044b | ||
![]() |
0c311bdcf9 | ||
![]() |
626912a9a4 | ||
![]() |
058c884f1f | ||
![]() |
2e0cd7af5e | ||
![]() |
82706fd958 | ||
![]() |
e81775e63d | ||
![]() |
8ccb9e04eb | ||
![]() |
ae97ccba80 | ||
![]() |
8ab9ed5d4e | ||
![]() |
886ce72374 | ||
![]() |
a658c8b067 | ||
![]() |
209d7ef613 | ||
![]() |
ab1e8cbb50 | ||
![]() |
cbe6973b66 | ||
![]() |
a6c76a85ce | ||
![]() |
265f9e5433 | ||
![]() |
abb825b43e | ||
![]() |
f821407060 | ||
![]() |
381aca98d0 | ||
![]() |
b86d988b3c | ||
![]() |
a67de845f6 | ||
![]() |
808378129e | ||
![]() |
0d75012462 | ||
![]() |
c4148cec33 | ||
![]() |
32a0cdb2f9 | ||
![]() |
68823fd9b2 | ||
![]() |
d38b1abb49 | ||
![]() |
ebadd21c64 | ||
![]() |
f1616a15d0 | ||
![]() |
39bee4b9d2 | ||
![]() |
3f867e0167 | ||
![]() |
4300622c4a | ||
![]() |
9ad7381c11 | ||
![]() |
e5f287dad5 | ||
![]() |
aa57becc41 | ||
![]() |
a5fc9fcb79 | ||
![]() |
5134d0dee1 | ||
![]() |
7269c37c8f | ||
![]() |
9abe89a2dc | ||
![]() |
79aecf21bb | ||
![]() |
4253ff8e12 | ||
![]() |
fb7b820187 | ||
![]() |
3a2d775196 | ||
![]() |
c780fde38e | ||
![]() |
a47bb96536 | ||
![]() |
0e256a21a5 | ||
![]() |
3b864f8af5 | ||
![]() |
540fc4b76b | ||
![]() |
f78390b094 | ||
![]() |
0b635aafae | ||
![]() |
177bfe38f6 | ||
![]() |
b19b2e146a | ||
![]() |
3093d7e95a | ||
![]() |
4e0d8a0cbb | ||
![]() |
523151ddf0 | ||
![]() |
0a7cb94ea8 | ||
![]() |
d4b7c0e633 | ||
![]() |
3f76affbd2 | ||
![]() |
a8f8970601 | ||
![]() |
178b5ff626 | ||
![]() |
92d347f566 | ||
![]() |
cafd18bb2c | ||
![]() |
ce3e339201 | ||
![]() |
a863f0d955 | ||
![]() |
d7e84d4e11 | ||
![]() |
c47f7c2806 | ||
![]() |
cb4c9aa64f | ||
![]() |
15f4656d9a | ||
![]() |
cba863dc5f | ||
![]() |
ab6aa5463f | ||
![]() |
9e3af9b51f | ||
![]() |
143e566498 | ||
![]() |
000aaaf95d | ||
![]() |
42387bff6f | ||
![]() |
3fe6268f10 | ||
![]() |
f749f9ceef | ||
![]() |
c284a90663 | ||
![]() |
50442cf96b | ||
![]() |
4bfacf4a39 | ||
![]() |
3afd25691a | ||
![]() |
a6a963bec1 | ||
![]() |
d587a4b859 | ||
![]() |
8d5b142664 | ||
![]() |
e44664a3b5 | ||
![]() |
31599eb282 | ||
![]() |
d6ac4dc22a | ||
![]() |
1c978e7333 | ||
![]() |
0b3f45bb1b | ||
![]() |
24f2df926a | ||
![]() |
6c4a5fa38c | ||
![]() |
1726df6eaf | ||
![]() |
f00e8655ac | ||
![]() |
4312600248 | ||
![]() |
41395d9e00 | ||
![]() |
3e00bcbf9f | ||
![]() |
30af106563 | ||
![]() |
32c6966e4b | ||
![]() |
0b402b23f7 | ||
![]() |
3e9d7da4da | ||
![]() |
691fcaeee7 | ||
![]() |
58594ef2be | ||
![]() |
1c2a88373c | ||
![]() |
9f30910653 | ||
![]() |
d039176d75 | ||
![]() |
19a0eb1761 | ||
![]() |
41a6c2e501 | ||
![]() |
fbc7fc6645 | ||
![]() |
eea098d22d | ||
![]() |
573dbb431e | ||
![]() |
ecfe3a6533 | ||
![]() |
7b2cba7a6c | ||
![]() |
91ff5617ef | ||
![]() |
f1782868f9 | ||
![]() |
45ecea6330 | ||
![]() |
66ee22c3e6 | ||
![]() |
2db1222e45 | ||
![]() |
abbd057eb9 | ||
![]() |
6da5b8ccc5 | ||
![]() |
c5c202c04e | ||
![]() |
128e2b917d | ||
![]() |
2f4173b267 | ||
![]() |
6fe40f13a7 | ||
![]() |
3fea1e4df5 | ||
![]() |
13d2552274 | ||
![]() |
3d0bfbb4f4 | ||
![]() |
b893e88e8b | ||
![]() |
f2be9e4381 | ||
![]() |
53b5d6d167 | ||
![]() |
92bfe34716 | ||
![]() |
6e36d4ed48 | ||
![]() |
5df096baf3 | ||
![]() |
45cbaa2d13 | ||
![]() |
720a17acd7 | ||
![]() |
dab00ab036 | ||
![]() |
7ba37ce249 | ||
![]() |
b2da6d86f3 | ||
![]() |
56192d9e48 | ||
![]() |
00192b019c | ||
![]() |
21416f453a | ||
![]() |
ad16804344 |
31
.gitignore
vendored
31
.gitignore
vendored
@@ -13,17 +13,22 @@ config.sub
|
||||
configure
|
||||
depcomp
|
||||
install-sh
|
||||
intltool-extract.in
|
||||
intltool-merge.in
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
.deps
|
||||
src/metacity-wm.desktop
|
||||
src/mutter-wm.desktop
|
||||
src/mutter.desktop
|
||||
*.o
|
||||
*.a
|
||||
*.lo
|
||||
*.la
|
||||
.libs
|
||||
*.swp
|
||||
*.gir
|
||||
*.typelib
|
||||
tidy-enum-types.[ch]
|
||||
tidy-marshal.[ch]
|
||||
stamp-tidy-enum-types.h
|
||||
@@ -38,19 +43,18 @@ POTFILES
|
||||
50-metacity-desktop-key.xml
|
||||
50-metacity-key.xml
|
||||
inlinepixbufs.h
|
||||
libmetacity-private.pc
|
||||
metacity
|
||||
metacity-dialog
|
||||
metacity-theme-viewer
|
||||
metacity.desktop
|
||||
metacity.schemas
|
||||
libmutter-private.pc
|
||||
mutter
|
||||
mutter-theme-viewer
|
||||
mutter.desktop
|
||||
mutter.schemas
|
||||
testasyncgetprop
|
||||
testboxes
|
||||
testgradient
|
||||
metacity-grayscale
|
||||
metacity-mag
|
||||
metacity-message
|
||||
metacity-window-demo
|
||||
mutter-grayscale
|
||||
mutter-mag
|
||||
mutter-message
|
||||
mutter-window-demo
|
||||
focus-window
|
||||
test-gravity
|
||||
test-resizing
|
||||
@@ -58,3 +62,8 @@ test-size-hints
|
||||
wm-tester
|
||||
INSTALL
|
||||
mkinstalldirs
|
||||
src/mutter-enum-types.[ch]
|
||||
src/stamp-mutter-enum-types.h
|
||||
src/mutter-marshal.[ch]
|
||||
src/stamp-mutter-marshal.h
|
||||
src/mutter-plugins.pc
|
||||
|
21
ChangeLog
21
ChangeLog
@@ -1,3 +1,24 @@
|
||||
2009-03-16 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.26.0 release.
|
||||
|
||||
2009-02-04 Neil Jagdish Patel <njpatel@gmail.com>
|
||||
|
||||
* src/core/frame.c: queue resize on window undecorate
|
||||
|
||||
2009-02-03 Luca Ferretti <elle.uca@libero.it>
|
||||
|
||||
* src/include/all-keybindings.h: Fix description, focus the
|
||||
desktop, not desktop backgroung (Closes bug #569649)
|
||||
|
||||
2009-02-02 Matt Kraai <kraai@ftfbs.org>
|
||||
|
||||
* src/core/schema-bindings.c: Wrap g_error calls in braces.
|
||||
|
||||
2009-02-01 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* configure.in: Post-release bump to 2.25.233.
|
||||
|
||||
2009-02-01 Thomas Thurman <tthurman@gnome.org>
|
||||
|
||||
* NEWS: 2.25.144 release.
|
||||
|
47
MAINTAINERS
47
MAINTAINERS
@@ -1,43 +1,8 @@
|
||||
Currently active maintainers
|
||||
--------------------------------
|
||||
Tomas Frydrych
|
||||
Email: tf linux intel com
|
||||
Userid: tomasf
|
||||
|
||||
Elijah Newren
|
||||
Email: newren gmail com
|
||||
Userid: newren
|
||||
Owen Taylor
|
||||
Email: otaylor redhat com
|
||||
Userid: otaylor
|
||||
|
||||
- Usually won't touch the theme bugs (isn't interested) or the
|
||||
compositor (until open source nvidia drivers are up to snuff).
|
||||
Tends to be most interested in libwnck/gtk interactions, focus
|
||||
issues, constraints problems, and raising/stacking, but works on
|
||||
just about anything other than themes and the compositor.
|
||||
|
||||
Thomas Thurman
|
||||
Email: thomas thurman org uk
|
||||
Userid: tthurman
|
||||
|
||||
- Responsible for all theme bugs and the compositor (thank goodness
|
||||
Thomas got involved, eh?). I'm sure he'll replace this sentence
|
||||
with his interests when he reads it. ;-)
|
||||
|
||||
|
||||
Semi-active maintainers
|
||||
--------------------------------
|
||||
|
||||
Havoc Pennington
|
||||
Email: hp redhat com
|
||||
Userid: hp
|
||||
- Original author. Doesn't patch metacity anymore, but is active in
|
||||
answering questions, responding to bugs, providing very helpful
|
||||
suggestions and insight, and even assisting with debugging.
|
||||
|
||||
|
||||
Important historical figureheads
|
||||
--------------------------------
|
||||
|
||||
Rob Adams (readams readams net)
|
||||
- Was the main maintainer of metacity for a while; particular areas
|
||||
of focus included xinerama, placement, and an older version of the
|
||||
constraints code. Still responds to bugs every once in a while.
|
||||
|
||||
Søren Sandmann (sandmann redhat com)
|
||||
- Wrote most of the current compositing manager code + libcm
|
||||
|
43
METACITY_MAINTAINERS
Normal file
43
METACITY_MAINTAINERS
Normal file
@@ -0,0 +1,43 @@
|
||||
Currently active maintainers
|
||||
--------------------------------
|
||||
|
||||
Elijah Newren
|
||||
Email: newren gmail com
|
||||
Userid: newren
|
||||
|
||||
- Usually won't touch the theme bugs (isn't interested) or the
|
||||
compositor (until open source nvidia drivers are up to snuff).
|
||||
Tends to be most interested in libwnck/gtk interactions, focus
|
||||
issues, constraints problems, and raising/stacking, but works on
|
||||
just about anything other than themes and the compositor.
|
||||
|
||||
Thomas Thurman
|
||||
Email: thomas thurman org uk
|
||||
Userid: tthurman
|
||||
|
||||
- Responsible for all theme bugs and the compositor (thank goodness
|
||||
Thomas got involved, eh?). I'm sure he'll replace this sentence
|
||||
with his interests when he reads it. ;-)
|
||||
|
||||
|
||||
Semi-active maintainers
|
||||
--------------------------------
|
||||
|
||||
Havoc Pennington
|
||||
Email: hp redhat com
|
||||
Userid: hp
|
||||
- Original author. Doesn't patch metacity anymore, but is active in
|
||||
answering questions, responding to bugs, providing very helpful
|
||||
suggestions and insight, and even assisting with debugging.
|
||||
|
||||
|
||||
Important historical figureheads
|
||||
--------------------------------
|
||||
|
||||
Rob Adams (readams readams net)
|
||||
- Was the main maintainer of metacity for a while; particular areas
|
||||
of focus included xinerama, placement, and an older version of the
|
||||
constraints code. Still responds to bugs every once in a while.
|
||||
|
||||
Søren Sandmann (sandmann redhat com)
|
||||
- Wrote most of the current compositing manager code + libcm
|
23
NEWS
23
NEWS
@@ -1,3 +1,26 @@
|
||||
2.26.0
|
||||
======
|
||||
|
||||
Thanks to Luca Ferretti, Matt Kraai, and Neil Jagdish Patel for
|
||||
improvements in this version.
|
||||
|
||||
- queue frame resize on window undecorate (Neil)
|
||||
- fix description of desktop background (Luca) (#569649)
|
||||
- wrap g_error calls in braces (Matt)
|
||||
|
||||
Translations
|
||||
Amitakhya Phukan (as), Mikel González (ast), Ihar Hrachyshka (be@latin), Runa
|
||||
Bhattacharjee (bn_IN), David Planella (ca), Petr Kovar (cs), Ask Hjorth
|
||||
Larsen (da), Christian Kirbach (de), Jennie Petoumenou (el), David Lodge (en_GB),
|
||||
Jorge González (es), Mattias Põldaru (et), Iñaki Larrañaga Murgoitio (eu),
|
||||
Ilkka Tuohela (fi), Claude Paroz (fr), Ankit Patel (gu), Mark Krapivner (he),
|
||||
Rajesh Ranjan (hi), Gabor Kelemen (hu), Luca Ferretti (it), Takeshi AIHANA (ja),
|
||||
Changwoo Ryu (ko), Gintautas Miliauskas (lt), Sangeeta Kumari (mai), Sandeep
|
||||
Shedmake (mr), Wouter Bolsterlee (nl), Manoj Kumar Giri (or), Duarte Loreto (pt),
|
||||
Leonardo Ferreira Fontenelle (pt_BR), Adi Roiban (ro), Yuriy Penkin (ru), Daniel
|
||||
Nylander (sv), I. Felix (ta), Krishna Babu K (te), Theppitak Karoonboonyanan (th),
|
||||
Clytie Siddall (vi), Chao-Hsiung Liao (zh_HK), Chao-Hsiung Liao (zh_TW)
|
||||
|
||||
2.25.144
|
||||
========
|
||||
|
||||
|
84
README
84
README
@@ -12,7 +12,7 @@ The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-,
|
||||
Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x,
|
||||
2.15.x, 2.17.x.
|
||||
|
||||
COMPILING METACITY
|
||||
COMPILING MUTTER
|
||||
===
|
||||
|
||||
You need GTK+ 2.2. For startup notification to work you need
|
||||
@@ -20,6 +20,7 @@ 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, see below).
|
||||
You need Clutter 1.0. You need gobject-introspection 0.6.3.
|
||||
|
||||
REPORTING BUGS AND SUBMITTING PATCHES
|
||||
===
|
||||
@@ -36,47 +37,11 @@ Feel free to send patches too; Metacity is relatively small and
|
||||
simple, so if you find a bug or want to add a feature it should be
|
||||
pretty easy. Send me mail, or put the patch in bugzilla.
|
||||
|
||||
See the HACKING file for some notes on hacking Metacity.
|
||||
See the HACKING file for some notes on hacking Mutter.
|
||||
|
||||
SHRINKING METACITY
|
||||
MUTTER FEATURES
|
||||
===
|
||||
|
||||
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:
|
||||
|
||||
--disable-gconf
|
||||
--disable-sm
|
||||
--disable-verbose
|
||||
--disable-startup-notification
|
||||
|
||||
However the result is no good for desktop use, all prefs have to be
|
||||
hardcoded in the binary, for example. If you wanted to make a really
|
||||
small metacity, here's some additional stuff you might consider
|
||||
implementing:
|
||||
|
||||
- add --disable-themes, which would replace theme.c and theme-parser.c
|
||||
with a hardcoded implementation of the interface in theme.h,
|
||||
should save about 80K. This should be fairly easy.
|
||||
|
||||
- add --disable-gtk, which would implement the interface in ui.h
|
||||
without using GTK. This one is easier than you think because the
|
||||
main part of the window manager doesn't use GTK directly, but is
|
||||
still fairly hard to do. You would probably have to give up some
|
||||
of the features, such as window menus, as menus are pretty complex
|
||||
to implement well. So time may be better spent adding a GTK
|
||||
configure script feature to build GTK with only a small core set of
|
||||
functionality.
|
||||
|
||||
METACITY FEATURES
|
||||
===
|
||||
|
||||
- Boring window manager for the adult in you. Many window managers
|
||||
are like Marshmallow Froot Loops; Metacity is like Cheerios.
|
||||
|
||||
- Uses GTK+ 2.0 for drawing window frames. This means colors, fonts,
|
||||
etc. come from GTK+ theme.
|
||||
|
||||
@@ -132,8 +97,6 @@ METACITY FEATURES
|
||||
Also try the GNOME keyboard shortcuts control panel, or
|
||||
gconf-editor.
|
||||
|
||||
See metacity.schemas for all available bindings.
|
||||
|
||||
- Window keybindings:
|
||||
|
||||
Alt-space window menu
|
||||
@@ -185,13 +148,13 @@ METACITY FEATURES
|
||||
|
||||
- Session management:
|
||||
|
||||
Metacity connects to the session manager and will set itself up to
|
||||
Mutter connects to the session manager and will set itself up to
|
||||
be respawned. It theoretically restores sizes/positions/workspace
|
||||
for session-aware applications.
|
||||
|
||||
- Metacity implements much of the EWMH window manager specification
|
||||
- Mutter 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
|
||||
the COMPLIANCE file for information on mutter compliance with
|
||||
these standards.
|
||||
|
||||
- Uses Pango to render text, so has cool i18n capabilities.
|
||||
@@ -210,7 +173,7 @@ METACITY FEATURES
|
||||
- handles the window manager selection from the ICCCM. Will exit if
|
||||
another WM claims it, and can claim it from another WM if you pass
|
||||
the --replace argument. So if you're running another
|
||||
ICCCM-compliant WM, you can run "metacity --replace" to replace it
|
||||
ICCCM-compliant WM, you can run "mutter --replace" to replace it
|
||||
with Metacity.
|
||||
|
||||
- does basic colormap handling
|
||||
@@ -220,7 +183,7 @@ METACITY FEATURES
|
||||
HOW TO ADD EXTERNAL FEATURES
|
||||
===
|
||||
|
||||
You can write a metacity "plugin" such as a pager, window list, icon
|
||||
You can write a mutter "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
|
||||
@@ -228,10 +191,10 @@ 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
|
||||
by Ross Burton, which add features to Mutter (or other
|
||||
EWMH-compliant WMs).
|
||||
|
||||
METACITY BUGS, NON-FEATURES, AND CAVEATS
|
||||
MUTTER BUGS, NON-FEATURES, AND CAVEATS
|
||||
===
|
||||
|
||||
See bugzilla: http://bugzilla.gnome.org/query.cgi
|
||||
@@ -270,26 +233,15 @@ A: If it makes sense to turn on unconditionally, or is genuinely a
|
||||
http://pobox.com/~hp/free-software-ui.html
|
||||
http://pobox.com/~hp/features.html
|
||||
|
||||
Q: Will Metacity be part of GNOME?
|
||||
Q: Will Mutter be part of GNOME?
|
||||
|
||||
A: It is officially part of GNOME as of GNOME 2.2. Prior to that,
|
||||
it was unofficially shipped as the default GNOME WM by several
|
||||
OS vendors.
|
||||
A: It is not officially part of GNOME as of GNOME 2.27. We are
|
||||
hoping to have mutter officially included as of GNOME 2.28.
|
||||
|
||||
Q: Is Metacity a Red Hat project?
|
||||
|
||||
A: Metacity's original creation was in no way funded, endorsed, or
|
||||
encouraged by Red Hat, Inc. - I'm guessing Red Hat would not
|
||||
consider "insufficient number of window managers for Linux" an
|
||||
urgent problem. Just a wild guess though.
|
||||
|
||||
Now that metacity is the default WM however, Red Hat supports some
|
||||
bugfixing and other work.
|
||||
|
||||
Q: Why does Metacity remember the workspace/position of some apps
|
||||
Q: Why does Mutter remember the workspace/position of some apps
|
||||
but not others across logout/login?
|
||||
|
||||
A: Metacity only stores sizes/positions for apps that are session
|
||||
A: Mutter only stores sizes/positions for apps that are session
|
||||
managed. As far as I can determine, there is no way to attempt to
|
||||
remember workspace/position for non-session-aware apps without
|
||||
causing a lot of weird effects.
|
||||
@@ -304,7 +256,7 @@ A: Metacity only stores sizes/positions for apps that are session
|
||||
place. And in fact I see a lot of bugs like this in window managers
|
||||
that try to handle non-session-aware apps.
|
||||
|
||||
However, for session-aware apps, Metacity can tell that the
|
||||
However, for session-aware apps, Mutter can tell that the
|
||||
application instance is from the session and thus restore it
|
||||
reliably, assuming the app properly restores the windows it had
|
||||
open on session save.
|
||||
@@ -456,7 +408,7 @@ A: There are quite a few, though many opportunities remain. Sometimes
|
||||
|
||||
- and much more.
|
||||
|
||||
Q: I think metacity sucks.
|
||||
Q: I think mutter sucks.
|
||||
|
||||
A: Feel free to use any WM you like. The reason metacity follows the
|
||||
ICCCM and EWMH specifications is that it makes metacity a modular,
|
||||
|
@@ -4,7 +4,7 @@
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
PKG_NAME="metacity"
|
||||
PKG_NAME="mutter"
|
||||
REQUIRED_AUTOMAKE_VERSION=1.10
|
||||
|
||||
(test -f $srcdir/configure.in \
|
||||
|
411
configure.in
411
configure.in
@@ -1,41 +1,40 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([metacity_major_version], [2])
|
||||
m4_define([metacity_minor_version], [25])
|
||||
# Fibonacci sequence for micro version numbering:
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
m4_define([metacity_micro_version], [144])
|
||||
m4_define([mutter_version],[0.4])
|
||||
m4_define([metacity_version],
|
||||
[metacity_major_version.metacity_minor_version.metacity_micro_version~mutter_version])
|
||||
m4_define([mutter_major_version], [2])
|
||||
m4_define([mutter_minor_version], [91])
|
||||
m4_define([mutter_micro_version], [3])
|
||||
|
||||
m4_define([metacity_clutter_plugin_api_version], [2])
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
||||
AC_INIT([metacity], [metacity_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
|
||||
m4_define([mutter_plugin_api_version], [3])
|
||||
|
||||
AC_INIT([mutter], [mutter_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=mutter])
|
||||
|
||||
AC_CONFIG_SRCDIR(src/core/display.c)
|
||||
AC_CONFIG_HEADERS(config.h)
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
METACITY_MAJOR_VERSION=metacity_major_version
|
||||
METACITY_MINOR_VERSION=metacity_minor_version
|
||||
METACITY_MICRO_VERSION=metacity_micro_version
|
||||
METACITY_CLUTTER_PLUGIN_API_VERSION=metacity_clutter_plugin_api_version
|
||||
AC_SUBST(METACITY_MAJOR_VERSION)
|
||||
AC_SUBST(METACITY_MINOR_VERSION)
|
||||
AC_SUBST(METACITY_MICRO_VERSION)
|
||||
AC_SUBST(METACITY_CLUTTER_PLUGIN_API_VERSION)
|
||||
MUTTER_MAJOR_VERSION=mutter_major_version
|
||||
MUTTER_MINOR_VERSION=mutter_minor_version
|
||||
MUTTER_MICRO_VERSION=mutter_micro_version
|
||||
MUTTER_PLUGIN_API_VERSION=mutter_plugin_api_version
|
||||
AC_SUBST(MUTTER_MAJOR_VERSION)
|
||||
AC_SUBST(MUTTER_MINOR_VERSION)
|
||||
AC_SUBST(MUTTER_MICRO_VERSION)
|
||||
AC_SUBST(MUTTER_PLUGIN_API_VERSION)
|
||||
|
||||
MUTTER_PLUGIN_DIR="$libdir/$PACKAGE/plugins/clutter"
|
||||
MUTTER_PLUGIN_DIR="$libdir/$PACKAGE/plugins"
|
||||
AC_SUBST(MUTTER_PLUGIN_DIR)
|
||||
|
||||
# Honor aclocal flags
|
||||
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")
|
||||
|
||||
GETTEXT_PACKAGE=metacity
|
||||
GETTEXT_PACKAGE=mutter
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])
|
||||
|
||||
@@ -46,6 +45,9 @@ AC_HEADER_STDC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
# Sets GLIB_GENMARSHAL and GLIB_MKENUMS
|
||||
AM_PATH_GLIB_2_0()
|
||||
|
||||
#### Integer sizes
|
||||
|
||||
AC_CHECK_SIZEOF(char)
|
||||
@@ -59,70 +61,11 @@ AC_CHECK_SIZEOF(__int64)
|
||||
## byte order
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
#### Warnings
|
||||
GTK_MIN_VERSION=2.90.7
|
||||
CANBERRA_GTK=libcanberra-gtk3
|
||||
CANBERRA_GTK_VERSION=0.26
|
||||
|
||||
changequote(,)dnl
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||
esac
|
||||
|
||||
# case " $CFLAGS " in
|
||||
# *[\ \ ]-Wshadow[\ \ ]*) ;;
|
||||
# *) CFLAGS="$CFLAGS -Wshadow" ;;
|
||||
# esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wcast-align[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wcast-align" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
|
||||
esac
|
||||
|
||||
if test "x$enable_ansi" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-ansi[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -ansi" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-pedantic[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -pedantic" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.10.0 pango >= 1.2.0'
|
||||
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0"
|
||||
|
||||
AC_ARG_ENABLE(gconf,
|
||||
AC_HELP_STRING([--disable-gconf],
|
||||
@@ -131,12 +74,12 @@ AC_ARG_ENABLE(gconf,
|
||||
|
||||
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"
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gconf-2.0 >= 1.2.0"
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(verbose-mode,
|
||||
AC_HELP_STRING([--disable-verbose-mode],
|
||||
[disable metacity's ability to do verbose logging, for embedded/size-sensitive custom builds]),,
|
||||
[disable mutter's ability to do verbose logging, for embedded/size-sensitive custom builds]),,
|
||||
enable_verbose_mode=yes)
|
||||
|
||||
if test x$enable_verbose_mode = xyes; then
|
||||
@@ -145,37 +88,32 @@ fi
|
||||
|
||||
AC_ARG_ENABLE(sm,
|
||||
AC_HELP_STRING([--disable-sm],
|
||||
[disable metacity's session management support, for embedded/size-sensitive custom non-GNOME builds]),,
|
||||
[disable mutter's session management support, for embedded/size-sensitive custom non-GNOME builds]),,
|
||||
enable_sm=auto)
|
||||
|
||||
AC_ARG_ENABLE(startup-notification,
|
||||
AC_HELP_STRING([--disable-startup-notification],
|
||||
[disable metacity's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),,
|
||||
[disable mutter's startup notification support, for embedded/size-sensitive custom non-GNOME builds]),,
|
||||
enable_startup_notification=auto)
|
||||
|
||||
AC_ARG_ENABLE(compositor,
|
||||
AC_HELP_STRING([--disable-compositor],
|
||||
[disable metacity's compositing manager]),,
|
||||
enable_compositor=auto)
|
||||
AC_ARG_WITH(introspection,
|
||||
AC_HELP_STRING([--without-introspection],
|
||||
[disable the use of GObject introspection]),,
|
||||
with_introspection=auto)
|
||||
|
||||
AC_ARG_WITH(clutter,
|
||||
AC_HELP_STRING([--with-clutter],
|
||||
[Use clutter for compositing]),,
|
||||
with_clutter=auto)
|
||||
AC_ARG_WITH(libcanberra,
|
||||
AC_HELP_STRING([--without-libcanberra],
|
||||
[disable the use of libcanberra for playing sounds]),,
|
||||
with_libcanberra=auto)
|
||||
|
||||
AC_ARG_ENABLE(xsync,
|
||||
AC_HELP_STRING([--disable-xsync],
|
||||
[disable metacity's use of the XSync extension]),,
|
||||
[disable mutter's use of the XSync extension]),,
|
||||
enable_xsync=auto)
|
||||
|
||||
AC_ARG_ENABLE(render,
|
||||
AC_HELP_STRING([--disable-render],
|
||||
[disable metacity's use of the RENDER extension]),,
|
||||
enable_render=auto)
|
||||
|
||||
AC_ARG_ENABLE(shape,
|
||||
AC_HELP_STRING([--disable-shape],
|
||||
[disable metacity's use of the shaped window extension]),,
|
||||
[disable mutter's use of the shaped window extension]),,
|
||||
enable_shape=auto)
|
||||
|
||||
## try definining HAVE_BACKTRACE
|
||||
@@ -184,17 +122,11 @@ AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
## here we get the flags we'll actually use
|
||||
# GOptionEntry requires glib-2.6.0
|
||||
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.6.0)
|
||||
# gtk_window_set_icon_name requires gtk2+-2.60
|
||||
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.6.0)
|
||||
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.6.0)
|
||||
|
||||
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
|
||||
# GRegex requires Glib-2.14.0
|
||||
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
||||
# gtk_window_set_icon_name requires gtk2+-2.6.0
|
||||
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0 >= $GTK_MIN_VERSION)
|
||||
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0 >= $GTK_MIN_VERSION)
|
||||
|
||||
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
||||
@@ -220,109 +152,87 @@ fi
|
||||
|
||||
if test x$have_startup_notification = xyes; then
|
||||
echo "Building with libstartup-notification"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_VERSION"
|
||||
AC_DEFINE(HAVE_STARTUP_NOTIFICATION, , [Building with startup notification support])
|
||||
else
|
||||
echo "Building without libstartup-notification"
|
||||
fi
|
||||
|
||||
## init this, it gets set either in the compositor check below
|
||||
## or the render-specific check later
|
||||
have_xrender=no
|
||||
have_libcanberra=no
|
||||
AC_MSG_CHECKING([libcanberra-gtk])
|
||||
if test x$with_libcanberra = xno ; then
|
||||
AC_MSG_RESULT([disabled])
|
||||
else
|
||||
if $PKG_CONFIG --exists $CANBERRA_GTK '>=' $CANBERRA_GTK_VERSION; then
|
||||
have_libcanberra=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CANBERRA_GTK"
|
||||
AC_DEFINE([HAVE_LIBCANBERRA], 1, [Building with libcanberra for playing sounds])
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
if test x$with_libcanberra = xyes ; then
|
||||
AC_MSG_ERROR([libcanberra forced and libcanberra-gtk was not found])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
XCOMPOSITE_VERSION=0.2
|
||||
if test x$enable_compositor = xyes; then
|
||||
have_xcomposite=yes
|
||||
elif test x$enable_compositor = xauto; then
|
||||
echo "Building compositing manager by default now."
|
||||
have_xcomposite=yes
|
||||
else
|
||||
have_xcomposite=no
|
||||
fi
|
||||
|
||||
if test x$with_clutter = xyes; then
|
||||
have_xcomposite=yes
|
||||
have_clutter=yes
|
||||
echo "CompositeExt support and Clutter forced on"
|
||||
elif test x$with_clutter = xauto; then
|
||||
have_clutter=no
|
||||
else
|
||||
have_clutter=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(WITH_CLUTTER, test "$have_clutter" = "yes")
|
||||
|
||||
if test x$have_xcomposite = xyes; then
|
||||
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
|
||||
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_ERROR([no. Use --disable-compositor to disable.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test x$have_xcomposite = xyes; then
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
||||
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
|
||||
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
||||
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, 1, [Building with compositing manager support])
|
||||
echo "Building with compositing manager"
|
||||
|
||||
## force on render also
|
||||
have_xrender=yes
|
||||
else
|
||||
echo "Building without compositing manager"
|
||||
AC_MSG_ERROR([no. Mutter requires the Xcomposite extension to build.])
|
||||
fi
|
||||
|
||||
## if no compositor, still possibly enable render
|
||||
if test x$have_xcomposite = xno; then
|
||||
XRENDER_VERSION=0.0
|
||||
AC_MSG_CHECKING([xrender >= $XRENDER_VERSION])
|
||||
if $PKG_CONFIG --atleast-version $XRENDER_VERSION xrender; then
|
||||
have_xrender=yes
|
||||
else
|
||||
have_xrender=no
|
||||
fi
|
||||
AC_MSG_RESULT($have_xrender)
|
||||
|
||||
if test x$enable_render = xyes; then
|
||||
have_xrender=yes
|
||||
echo "Render support forced on"
|
||||
elif test x$enable_render = xauto; then
|
||||
true
|
||||
else
|
||||
have_xrender=no
|
||||
fi
|
||||
|
||||
if test x$have_xrender = xyes; then
|
||||
echo "Building with Render"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xrender >= $XRENDER_VERSION"
|
||||
fi
|
||||
fi ## have_composite
|
||||
|
||||
if test x$have_xrender = xyes; then
|
||||
AC_DEFINE(HAVE_RENDER, , [Building with Render extension support])
|
||||
fi
|
||||
|
||||
CLUTTER_PACKAGE=clutter-0.9
|
||||
CLUTTER_VERSION=1.2.0
|
||||
CLUTTER_PACKAGE=clutter-1.0
|
||||
AC_SUBST(CLUTTER_PACKAGE)
|
||||
if test x$have_clutter = xyes; then
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES $CLUTTER_PACKAGE "
|
||||
if $PKG_CONFIG --atleast-version $CLUTTER_VERSION $CLUTTER_PACKAGE ; then
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CLUTTER_PACKAGE "
|
||||
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_PACKAGE)
|
||||
AC_DEFINE(WITH_CLUTTER, , [Building with Clutter compositor])
|
||||
|
||||
dnl Check for the clutter-glx-texture-pixmap header
|
||||
metacity_save_cppflags="$CPPFLAGS"
|
||||
mutter_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $CLUTTER_CFLAGS"
|
||||
AC_CHECK_HEADER([clutter/glx/clutter-glx-texture-pixmap.h],
|
||||
[have_glx_texture_pixmap=yes],
|
||||
[have_glx_texture_pixmap=no])
|
||||
CPPFLAGS="$metacity_save_cppflags"
|
||||
CPPFLAGS="$mutter_save_cppflags"
|
||||
|
||||
if test x$have_glx_texture_pixmap = xyes; then
|
||||
AC_DEFINE(HAVE_GLX_TEXTURE_PIXMAP, ,
|
||||
[Is ClutterGLXTexturePixmap available?])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([no. Mutter requires Clutter version $CLUTTER_VERSION.])
|
||||
fi
|
||||
|
||||
if test x$with_introspection != xno; then
|
||||
PKG_CHECK_MODULES(INTROSPECTION, gobject-introspection-1.0 >= 0.9.5, have_introspection=yes, have_introspection=no)
|
||||
if test x$have_introspection=xyes; then
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gobject-introspection-1.0"
|
||||
AC_DEFINE(HAVE_INTROSPECTION, 1, [Define if GObject introspection is available])
|
||||
G_IR_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
|
||||
AC_SUBST(G_IR_SCANNER)
|
||||
G_IR_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
|
||||
AC_SUBST(G_IR_COMPILER)
|
||||
G_IR_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
|
||||
AC_SUBST(G_IR_GENERATE)
|
||||
GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
|
||||
AC_SUBST(GIRDIR)
|
||||
TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
|
||||
AC_SUBST(TYPELIBDIR)
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(WITH_INTROSPECTION, test "$have_introspection" = "yes")
|
||||
|
||||
AC_MSG_CHECKING([Xcursor])
|
||||
if $PKG_CONFIG xcursor; then
|
||||
have_xcursor=yes
|
||||
@@ -333,23 +243,23 @@ if $PKG_CONFIG xcursor; then
|
||||
|
||||
if test x$have_xcursor = xyes; then
|
||||
echo "Building with Xcursor"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcursor"
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES xcursor"
|
||||
AC_DEFINE(HAVE_XCURSOR, , [Building with Xcursor support])
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
|
||||
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
|
||||
|
||||
AC_PATH_XTRA
|
||||
|
||||
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
|
||||
# Check for Xinerama extension (Solaris impl or Xfree impl)
|
||||
metacity_save_cppflags="$CPPFLAGS"
|
||||
mutter_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||
|
||||
AC_ARG_ENABLE(xinerama,
|
||||
AC_HELP_STRING([--disable-xinerama],
|
||||
[disable metacity's use of the Xinerama extension]),
|
||||
[disable mutter's use of the Xinerama extension]),
|
||||
try_xinerama=$enable_xinerama,try_xinerama=yes)
|
||||
|
||||
use_solaris_xinerama=no
|
||||
@@ -395,7 +305,7 @@ if test "${try_xinerama}" != no; then
|
||||
esac
|
||||
fi
|
||||
|
||||
CPPFLAGS="$metacity_save_cppflags"
|
||||
CPPFLAGS="$mutter_save_cppflags"
|
||||
|
||||
SHAPE_LIBS=
|
||||
found_shape=no
|
||||
@@ -466,21 +376,21 @@ if test "x$found_xsync" = "xyes"; then
|
||||
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
|
||||
fi
|
||||
|
||||
METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
|
||||
METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
MUTTER_LIBS="$MUTTER_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
|
||||
MUTTER_MESSAGE_LIBS="$MUTTER_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
MUTTER_WINDOW_DEMO_LIBS="$MUTTER_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
|
||||
MUTTER_PROPS_LIBS="$MUTTER_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
|
||||
found_sm=no
|
||||
case "$METACITY_LIBS" in
|
||||
case "$MUTTER_LIBS" in
|
||||
*-lSM*)
|
||||
found_sm=yes
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(SM, SmcSaveYourselfDone,
|
||||
[AC_CHECK_HEADERS(X11/SM/SMlib.h,
|
||||
METACITY_LIBS="-lSM -lICE $METACITY_LIBS" found_sm=yes)],
|
||||
, $METACITY_LIBS)
|
||||
MUTTER_LIBS="-lSM -lICE $MUTTER_LIBS" found_sm=yes)],
|
||||
, $MUTTER_LIBS)
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -536,26 +446,88 @@ if test "x$enable_debug" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -g -O"
|
||||
fi
|
||||
|
||||
# Warnings are there for a reason
|
||||
if test "x$GCC" = "xyes"; then
|
||||
CFLAGS="$CFLAGS -Wall -Werror -ansi"
|
||||
fi
|
||||
# For fix-meta-rectangle.py
|
||||
AM_PATH_PYTHON([2.5])
|
||||
|
||||
# Use gnome-doc-utils:
|
||||
GNOME_DOC_INIT([0.8.0])
|
||||
|
||||
#### Warnings (last since -Werror can disturb other tests)
|
||||
|
||||
# Stay command-line compatible with the gnome-common configure option. Here
|
||||
# minimum/yes/maximum are the same, however.
|
||||
AC_ARG_ENABLE(compile_warnings,
|
||||
AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),,
|
||||
enable_compile_warnings=error)
|
||||
|
||||
changequote(,)dnl
|
||||
if test "$enable_compile_warnings" != no ; then
|
||||
if test "x$GCC" = "xyes"; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wall[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wall" ;;
|
||||
esac
|
||||
|
||||
# case " $CFLAGS " in
|
||||
# *[\ \ ]-Wshadow[\ \ ]*) ;;
|
||||
# *) CFLAGS="$CFLAGS -Wshadow" ;;
|
||||
# esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wcast-align[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wcast-align" ;;
|
||||
esac
|
||||
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
|
||||
esac
|
||||
|
||||
if test "$enable_compile_warnings" = error; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Werror[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Werror" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
doc/Makefile
|
||||
doc/creating_themes/Makefile
|
||||
doc/man/Makefile
|
||||
src/Makefile
|
||||
src/wm-tester/Makefile
|
||||
src/libmetacity-private.pc
|
||||
src/metacity-plugins.pc
|
||||
src/libmutter-private.pc
|
||||
src/mutter-plugins.pc
|
||||
src/tools/Makefile
|
||||
src/themes/Makefile
|
||||
src/compositor/mutter/plugins/Makefile
|
||||
src/compositor/plugins/Makefile
|
||||
po/Makefile.in
|
||||
])
|
||||
|
||||
@@ -571,14 +543,14 @@ fi
|
||||
if test x$enable_verbose_mode = xno; then
|
||||
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
||||
echo "*** Building without verbose mode"
|
||||
echo "*** This means there's no way to debug metacity problems."
|
||||
echo "*** Please build normal desktop versions of metacity"
|
||||
echo "*** This means there's no way to debug mutter problems."
|
||||
echo "*** Please build normal desktop versions of mutter"
|
||||
echo "*** with verbose mode enabled so users can use it when they report bugs."
|
||||
fi
|
||||
|
||||
dnl ==========================================================================
|
||||
echo "
|
||||
metacity-$VERSION:
|
||||
mutter-$VERSION
|
||||
|
||||
prefix: ${prefix}
|
||||
source code location: ${srcdir}
|
||||
@@ -588,22 +560,21 @@ metacity-$VERSION:
|
||||
XFree86 Xinerama: ${use_xfree_xinerama}
|
||||
Solaris Xinerama: ${use_solaris_xinerama}
|
||||
Startup notification: ${have_startup_notification}
|
||||
Compositing manager: ${have_xcomposite}
|
||||
libcanberra: ${have_libcanberra}
|
||||
Introspection: ${have_introspection}
|
||||
Session management: ${found_sm}
|
||||
Shape extension: ${found_shape}
|
||||
Resize-and-rotate: ${found_randr}
|
||||
Xsync: ${found_xsync}
|
||||
Render: ${have_xrender}
|
||||
Xcursor: ${have_xcursor}
|
||||
Clutter: ${have_clutter}
|
||||
"
|
||||
|
||||
METACITY_MINOR_VERSION=metacity_minor_version
|
||||
if test $(( $(echo $METACITY_MINOR_VERSION) %2)) == "1"; then
|
||||
stable_version=$(( ($METACITY_MINOR_VERSION / 2) * 2))
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
|
||||
MUTTER_MINOR_VERSION=mutter_minor_version
|
||||
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
|
||||
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
|
||||
echo "This is the UNSTABLE branch of mutter"
|
||||
echo -n "Use 2.$stable_version.x for stable "
|
||||
echo "(gnome-2-$stable_version branch in Subversion)"
|
||||
echo "(gnome-2-$stable_version branch in git)"
|
||||
else
|
||||
echo "This is the stable branch of metacity"
|
||||
echo "This is the stable branch of mutter"
|
||||
fi
|
||||
|
@@ -1,4 +1,4 @@
|
||||
SUBDIRS = man creating_themes
|
||||
SUBDIRS = man
|
||||
|
||||
EXTRA_DIST=theme-format.txt metacity-theme.dtd dialogs.txt code-overview.txt \
|
||||
EXTRA_DIST=theme-format.txt dialogs.txt code-overview.txt \
|
||||
how-to-get-focus-right.txt
|
||||
|
@@ -42,5 +42,5 @@ options you can set are:
|
||||
menus zooming, dialogues being semi-transparent, and so on. Try it
|
||||
and see whether you like it.
|
||||
|
||||
If you have any problems, ask on metacity-devel-list@gnome.org, or
|
||||
If you have any problems, ask on mutter-devel-list@gnome.org, or
|
||||
#gnome-hackers on gimpnet, or come and find me (tthurman at gnome) and ask.
|
||||
|
@@ -1,286 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
||||
"http://docbook.org/docbook/xml/4.5/docbookx.dtd" [
|
||||
]>
|
||||
|
||||
<book id="index">
|
||||
|
||||
<bookinfo>
|
||||
|
||||
<title>Understanding Metacity Themes</title>
|
||||
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Thomas</firstname>
|
||||
<surname>Thurman</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
|
||||
<abstract>
|
||||
|
||||
<para>
|
||||
We very much appreciate any reports of inaccuracies or other errors in
|
||||
this document. Contributions are also most welcome. Post your
|
||||
suggestions, critiques or addenda to the <ulink
|
||||
url="mailto:tthurman@gnome.org">team</ulink>.</para>
|
||||
|
||||
</abstract>
|
||||
|
||||
<copyright>
|
||||
<year>2008</year>
|
||||
<holder>Thomas Thurman</holder>
|
||||
</copyright>
|
||||
|
||||
<legalnotice>
|
||||
<para>
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.2
|
||||
or any later version published by the Free Software Foundation;
|
||||
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
|
||||
You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to: Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
</para>
|
||||
</legalnotice>
|
||||
|
||||
</bookinfo>
|
||||
|
||||
<chapter id="sec-introduction">
|
||||
<title>Introduction</title>
|
||||
|
||||
<para>This is an article about how to theme Metacity. It is a work in progress, and I have had to dig deeply to find some answers; I may well have made mistakes and I welcome corrections and suggestions.</para>
|
||||
<para>GNOME lets you theme a bunch of different things, but we're only talking about <literal>window border</literal> themes here, which some people call Metacity themes; <ulink url="http://en.wikipedia.org/wiki/Metacity#Themes">Wikipedia begins a sentence</ulink> with "Despite the incomplete state of Metacity theme development documentation", and though there <emphasis>is</emphasis> <ulink url="http://svn.gnome.org/viewvc/metacity/trunk/doc/theme-format.txt?view=markup">documentation in the source</ulink>, apparently not many people find it, and it's written more for programmers than theme designers. Glynn Foster also wrote <ulink url="http://developer.gnome.org/doc/tutorials/metacity/metacity-themes.html">a very good introduction to Metacity themes</ulink> (<ulink url="http://home.arcor.de/rybaczyk/documents/tutorials/metacity/metacity-themes.de.html">[de]</ulink>) six years ago, but things have changed a little since then. <ulink url="http://lists.freedesktop.org/archives/compiz/2006-September/000445.html">Metacity themes can also be used by Compiz</ulink>, and perhaps by other window managers for all I know.</para>
|
||||
|
||||
<para>So, a Metacity theme is a set of instructions about how to "decorate" (draw the borders around) a window. Presumably you don't want to style all windows identically, so the format lets you specify details for different kinds of window:</para>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>state:</term><listitem><para>Every window must be in exactly one of these states: <literal>normal</literal>, <literal>dialog</literal>, <literal>modal dialog</literal> (i.e. a dialogue which means you can't interact with the rest of the program while it's up), <literal>menu</literal> (torn off from the main application, not that people do that much these days), <literal>utility</literal> (that is, palettes and toolboxes and things), and <literal>border</literal>. X also allows a window to explicitly ask to be undecorated, but of course we don't provide for those in a list of decoration instructions.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>focused</term><listitem><para>Every window is either the active window (which X people call "focused"), or it isn't.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>maximized</term><listitem><para>Every window is either (fully) maximised (horizontal and vertical only don't count), or it isn't.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>shaded</term><listitem><para>Every window is either rolled up to show just its titlebar (which techies call "shaded" for some reason I can't fathom), or it isn't.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem><para><emphasis>If a window is not fully maximised and not shaded,</emphasis> it either allows horizontal resizing, or it doesn't.</para></listitem>
|
||||
<listitem><para><emphasis>If a window is not fully maximised and not shaded,</emphasis> it either allows vertical resizing, or it doesn't.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>What's in the file</title>
|
||||
|
||||
<para>The files must be called either</para>
|
||||
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem><para>~/.themes/<varname>N</varname>/metacity-1/metacity-theme-<varname>V</varname>.xml
|
||||
for a theme used only by you, or</para></listitem>
|
||||
<listitem><para>/usr/share/themes/<varname>N</varname>/metacity-1/metacity-theme-<varname>V</varname>.xml
|
||||
for a theme installed for all users.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>where <varname>N</varname> is the name of the theme and <varname>V</varname> is the version of the format. Version 2, <ulink url="http://svn.gnome.org/viewvc/metacity?view=revision&revision=2973">introduced in October 2006</ulink>, adds a few extra features, but it's rarely used. Version 1 is the original format. The formats are fixed once they're stable for both backwards and forwards compatibility; <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=482165">new features</ulink> can't be added without introducing a new version number, which is why improvements come out rarely and in large clumps. <literal>metacity-1</literal> in the names is a fossil and doesn't mean version 1 of anything.</para>
|
||||
|
||||
<para>The metacity-theme-V.xml files are <ulink url="http://blogs.gnome.org/tthurman/2008/02/14/gmarkup/">GMarkup files</ulink>, which are very similar to XML. For now, you actually have to write these in a text editor or something; you can either start with a blank page, or modify a theme someone else has made. (I am thinking of writing a general theme editor program, but that'll have to wait until I've reduced Metacity's open bug queue a little.) If you want to see a fully-fledged one, you can look at <ulink url="http://svn.gnome.org/viewvc/metacity/trunk/src/themes/Atlanta/metacity-theme-1.xml?view=markup">the current version of "Atlanta"</ulink>, one of the simplest themes, but even that is quite complicated-looking at first.</para>
|
||||
<para>So, let's talk about what actually goes inside the files. As in any XML file, <!-<!-- x -->- … <!-- x -->> are comments. At its most basic, it would go:</para>
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
<metacity_theme>
|
||||
<!-<!-- x -->- Helper stuff: -<!-- x -->->
|
||||
<info …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||
<constant …> <!-<!-- x -->- maybe; to be explained -<!-- x -->->
|
||||
|
||||
<draw_ops …> <!-<!-- x -->- maybe; to be explained -<!-- x -->->
|
||||
|
||||
<!-<!-- x -->- Things we build the top level onto: -<!-- x -->->
|
||||
<frame_geometry …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||
|
||||
<frame_style …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||
<frame_style_set …> <!-<!-- x -->- to be explained -<!-- x -->->
|
||||
|
||||
<!-<!-- x -->- And the top level: -<!-- x -->->
|
||||
|
||||
<window type="normal" style_set="…" />
|
||||
<window type="dialog" style_set="…" />
|
||||
<window type="modal_dialog" style_set="…" />
|
||||
|
||||
<window type="menu" style_set="…" />
|
||||
<window type="utility" style_set="…" />
|
||||
<window type="border" style_set="…" />
|
||||
|
||||
</metacity_theme>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Matching windows</title>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>window</term><listitem><para>You see that at the top level we have a list of <window> tags, one for each window state we discussed above. The style_set argument of each of these gives the name of a frame_style_set.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>frame_style_set:</term><listitem><para>tells Metacity how to draw windows according to whether they're focused or not, maximised or not, shaded or not, and allowing resizing vertically, horizontally, both, or neither. It looks like this:</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
<frame_style_set>
|
||||
<frame focus="F" state="S" resize="R" style="N"/>
|
||||
<frame… />
|
||||
|
||||
…
|
||||
</frame_style_set>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>where:</para>
|
||||
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>F</term><listitem><para>is yes for focused, no for unfocused.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>S</term><listitem><para>combines the shaded and maximized flags: normal, maximized, shaded, or maximized_and_shaded.</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>R</term><listitem><para>represents resize permissions that the window gives us: none, vertical, horizontal, or both. Frame settings for maximised windows, which can't be resized, don't have this attribute.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<varname>N</varname> is the name of a <literal>frame_style</literal> to apply to a window which has these attributes.</para>
|
||||
|
||||
<para>A <literal>frame_style_set</literal> tag may also have a "parent" tag, which should be the name of another <literal>frame_style_set</literal>. This means that if Metacity wants to know about a kind of window which that <literal>frame_style_set</literal> doesn't describe, it should look in the parent. Most of the more complicated tags in Metacity theme files also have a "parent" attribute which work the same way. This is particularly useful because, taken together, all the <literal>frame_style_set</literal>s in a theme file must be capable of matching every possible kind of window; if a window turns up that they can't match, there will be an error at runtime.</para>
|
||||
|
||||
<para>Let's recap what we've seen so far. The combination of a <literal>window</literal>, which matches a window's state (normal, dialog, and so forth), with an entry in the corresponding <literal>frame_style_set</literal>, which matches its focus, shadedness, maximisedness, and resize permissions where relevant, will allow you to make a list of rules to match any window against. The next piece of this puzzle lets you specify what Metacity should do with such windows once it's matched them.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Actually drawing stuff</title>
|
||||
|
||||
<para><literal>frame_style:</literal> This is probably the most complicated part of the whole system. A <literal>frame_style</literal> a series of <emphasis><literal>piece</literal></emphasis>s and <emphasis><literal>button</literal></emphasis>s. It looks like this:</para>
|
||||
|
||||
<para>
|
||||
<programlisting>
|
||||
<frame_style name="…" geometry="G">
|
||||
<piece position="P">
|
||||
<draw_ops>
|
||||
</draw_ops>
|
||||
</piece>
|
||||
…
|
||||
<button function="F" state="S" draw_ops="D"/>
|
||||
|
||||
<draw_ops>
|
||||
</draw_ops>
|
||||
</button>
|
||||
…
|
||||
</frame_style>
|
||||
</programlisting>
|
||||
</para>
|
||||
|
||||
<para>The <literal>pieces</literal> are pieces of the window frame. When Metacity draws a window frame, it renders its various pieces always in the same order. The bolded parts are all the possible values of P:</para>
|
||||
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem><para>the <literal>entire_background</literal>, covering the whole frame</para></listitem>
|
||||
|
||||
<listitem><para>the <literal>titlebar</literal>, covering the entire background of the titlebar</para></listitem>
|
||||
<listitem><para>the <literal>titlebar_middle</literal>, the part of the titlebar that doesn't touch its edges</para></listitem>
|
||||
<listitem><para>the <literal>left_titlebar_edge</literal>, <literal>right_titlebar_edge</literal>, <literal>top_titlebar_edge</literal>, and <literal>bottom_titlebar_edge</literal></para></listitem>
|
||||
|
||||
<listitem><para>the <literal>title</literal>, just exactly that area which is covered by the text on the titlebar</para></listitem>
|
||||
<listitem><para>the <literal>left_edge</literal>, <literal>right_edge</literal>, and <literal>bottom_edge</literal> of the frame (yes, there is no top_edge: it's identical to top_titlebar_edge, isn't it?)</para></listitem>
|
||||
<listitem><para>the <literal>overlay</literal>, which covers everything– the same as entire_background, but done last instead of first.</para></listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para><emphasis>What</emphasis> Metacity draws in these pieces is decided by the theme. If a <literal>frame_style</literal> or its parents don't specify a particular piece, nothing will be drawn for that piece. You have two ways to specify what to draw: one is that the <literal>piece</literal> tag can have a <literal>draw_ops</literal> tag inside it which lists a sequence of drawing operations in Metacity's custom format. <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=107012">You might ask why we don't use SVG</ulink>; one answer is that SVG support wasn't very strong when this format was designed, and another answer is that these days you can use SVG all you like; just include it as an image and Metacity will know what to do.</para>
|
||||
|
||||
<para>An alternative to including a draw_ops tag inside a piece tag is to add a draw_ops attribute to the piece tag. Then you can add a draw_ops tag at top level (inside the metacity_theme tag) with a name attribute, and Metacity will use that. This is useful if you use similar draw_ops over and over.</para>
|
||||
<para>I'm not going to document draw_ops at present, because this is already very long. I will write it up later and link it from here.</para>
|
||||
<para>The <literal>button</literal> tag tells Metacity how, but not where, to draw buttons. Buttons are drawn after all the pieces are finished, and the way to draw them is also given using draw_ops. You ought to provide buttons for all the possible kinds of button; if you don't give one it won't be drawn, which is unfortunate for the user who wants to use it:</para>
|
||||
|
||||
<para>
|
||||
<itemizedlist>
|
||||
<listitem><para><literal>left_left_background</literal>, <literal>left_middle_background</literal>, and <literal>left_right_background</literal> don't represent buttons as such, but the background behind them, assuming there can be at most three buttons on the left. These days there can be more, so the extra ones also use left_middle_background.</para></listitem>
|
||||
|
||||
<listitem><para><literal>right_left_background</literal>, <literal>right_middle_background</literal>, and <literal>right_right_background</literal> similarly.</para></listitem>
|
||||
<listitem><para><literal>close</literal>, <literal>minimize</literal>, <literal>maximize</literal> are the obvious original three buttons.</para></listitem>
|
||||
<listitem><para><literal>menu</literal> is the menu button you can click to get a list of actions you can perform on the window.</para></listitem>
|
||||
|
||||
<listitem><para><literal>shade</literal>, <literal>above</literal>, <literal>stick</literal> are similar to the original buttons but only allowed in version 2</para></listitem>
|
||||
<listitem><para><literal>unshade</literal>, <literal>unabove</literal>, <literal>unstick</literal> are the toggled versions of these buttons. Again, version 2 only.</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
<para>The reason there are toggled versions of shade, above, and stick, and not maximize, is that by the time you get this far you've probably already decided whether you're drawing a maximised window. So if you <emphasis>are</emphasis> drawing a maximised window, you can make the button called "maximize" look how you want the restore button to be; otherwise, make it look like you want the maximise button to be.</para>
|
||||
<para>For each button tag you should also set a "state" attribute; this time the state is either <literal>normal</literal> (the way you see it most of the time), <literal>pressed</literal>, or <literal>prelight</literal> (this makes the buttons subtly light up when you hover over them). You only really need "normal", but the others are good to have too.</para>
|
||||
|
||||
<para>The "geometry" attribute of a <literal>frame_style</literal> tag is the name of a…</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Geometry</title>
|
||||
|
||||
<para>The <literal>geometry</literal> tag defines the sizes of things around the window. It is important, but not easy to explain, and again this file has gone on too long. I'll write it up later.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Other things which lie around a file</title>
|
||||
|
||||
<para>The most important other thing in a theme file is the metadata held in the <literal>info</literal> tag. This contains a set of tags each of which contains some text explaining something about the theme itself, in a sort of <ulink url="http://en.wikipedia.org/wiki/Dublin_Core">Dublin Core</ulink> sort of way. (Next time around, we should probably use the actual Dublin Core.) The tags are <literal>name</literal>, <literal>author</literal>, <literal>copyright</literal>, <literal>date</literal>, and <literal>description</literal>.</para>
|
||||
|
||||
<para>Version 1 of the format had a <literal>menu_icon</literal> tag at top level, which let themes specify the icons beside options in the menu you get from the menu icon. This has become redundant; the icons are taken from the icon theme! The tag can still be used in all formats, but does nothing and is deprecated.</para>
|
||||
<para>Version 2 of the format has a <literal>fallback</literal> tag at top level, which let the theme specify what icon a window should be considered to have if it doesn't provide an icon of its own. This should also be taken from the icon theme, <ulink url="http://bugzilla.gnome.org/show_bug.cgi?id=524343">if anyone fancies fixing it</ulink>, and the tag should also then be deprecated. It shouldn't be hard.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>When you're working on a theme</title>
|
||||
|
||||
<para>When you're editing a theme, you can view it without using it on the whole desktop using
|
||||
<command>metacity-theme-viewer YourThemeName</command></para>
|
||||
<para>and view it on the whole desktop using
|
||||
<command>gconftool -<!-- x -->-type=string -<!-- x -->-set /apps/metacity/general/theme YourThemeName</command></para>
|
||||
|
||||
<para>Whenever you change the selected theme in GConf, Metacity will load the newly-chosen theme. This is how control-center does it. But when you change a theme, as you're working on it, you might want to ask Metacity to reload the theme which is currently used on the whole desktop to reflect your changes. You can do this using the little-known <command>metacity-message</command> program, with the command <literal>metacity-message reload-theme</literal>. This works by sending the ClientMessage <literal>_METACITY_RELOAD_THEME_MESSAGE</literal> to the root window, in case you're interested.</para>
|
||||
|
||||
<para>Once you're done with your theme, consider submitting it to <ulink url="http://art.gnome.org/themes/metacity/">the art.gnome.org site</ulink>, or <ulink url="http://www.gnome-look.org/index.php?xcontentmode=101">the gnome-look site</ulink>.</para>
|
||||
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>The future</title>
|
||||
|
||||
<para>Please feel free to link to this so people don't have to keep asking the basic questions and can start asking the deeper ones. One of the important deeper ones is: where should we go in the future? Since this format is becoming something of a de facto standard between window managers, should we set up some kind of freedesktop.org standards discussion? Would it be useful to spin off Metacity's theme parsing code into a separate, LGPL-licensed library so that other applications could use it more easily?</para>
|
||||
<para>What would a version 3 of this format look like? Could we simplify the window / frame_style_set system? (I can imagine abolishing both, and being able to write <literal><frame_style for="normal+unfocused+maximized">…</literal> and having Metacity assume it applied to all resize permissions and shadednesses.) Maybe we should try to do everything with SVG we can? Getting more wild and handwavey, is it worth keeping XML-like? Maybe if other window managers were dealing with the files, .ini-style files would be more universally useful? Or perhaps not. And then of course we need a decent graphical editor for it. I have a few ideas, but if anyone fancies jumping in...</para>
|
||||
</chapter>
|
||||
|
||||
</book>
|
||||
|
||||
|
@@ -1,24 +0,0 @@
|
||||
### This part of Makefile.am can be customized by you.
|
||||
|
||||
# gnome-doc-utils standard variables:
|
||||
include $(top_srcdir)/gnome-doc-utils.make
|
||||
dist-hook: doc-dist-hook
|
||||
|
||||
# The name of the directory in /usr/share/gnome/help/,
|
||||
# and the name of the main .xml file:
|
||||
DOC_MODULE = creating-metacity-themes
|
||||
|
||||
# The names of any files included via entity declarations.
|
||||
DOC_ENTITIES =
|
||||
|
||||
# The names of any files included by xincluded (preferred):
|
||||
DOC_INCLUDES =
|
||||
|
||||
# The names of any pictures:
|
||||
DOC_FIGURES =
|
||||
|
||||
# The names of any locales for which documentation translations exist:
|
||||
DOC_LINGUAS =
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
man_MANS = metacity.1 metacity-theme-viewer.1 \
|
||||
metacity-window-demo.1 metacity-message.1
|
||||
man_MANS = mutter.1 mutter-theme-viewer.1 \
|
||||
mutter-window-demo.1 mutter-message.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
@@ -12,7 +12,7 @@
|
||||
.\" > Right I know. any licenses that is DFSG-free, I'm ok with whatever,
|
||||
.\" > since I have contributed that for Debian. so GPL is no problem for me.
|
||||
.\" -----
|
||||
.TH METACITY\-MESSAGE 1 "28 August 2002"
|
||||
.TH MUTTER\-MESSAGE 1 "28 August 2002"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@@ -26,24 +26,24 @@
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
METACITY\-MESSAGE \- a command to send a message to Metacity
|
||||
MUTTER\-MESSAGE \- a command to send a message to Mutter
|
||||
.SH SYNOPSIS
|
||||
.B METACITY\-MESSAGE
|
||||
.B MUTTER\-MESSAGE
|
||||
[restart|reload\-theme|enable\-keybindings|disable\-keybindings]
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly the
|
||||
.B metacity\-message\fP.
|
||||
.B mutter\-message\fP.
|
||||
This manual page was written for the Debian distribution
|
||||
because the original program does not have a manual page.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBmetacity\-message\fP send a specified message to \fBmetacity\fP(1).
|
||||
\fBmutter\-message\fP send a specified message to \fBmutter\fP(1).
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B restart
|
||||
Restart \fBmetacity\fP(1) which is running.
|
||||
Restart \fBmutter\fP(1) which is running.
|
||||
.TP
|
||||
.B reload-theme
|
||||
Reload a theme which is specified on gconf database.
|
||||
@@ -54,7 +54,7 @@ Enable all of keybindings which is specified on gconf database.
|
||||
.B disable-keybindings
|
||||
Disable all of keybindings which is specified on gconf database.
|
||||
.SH SEE ALSO
|
||||
.BR metacity (1)
|
||||
.BR mutter (1)
|
||||
.SH AUTHOR
|
||||
This manual page was written by Akira TAGOH <tagoh@debian.org>,
|
||||
for the Debian GNU/Linux system (but may be used by others).
|
@@ -3,21 +3,21 @@
|
||||
.\"
|
||||
.\" Based on template provided by Tom Christiansen <tchrist@jhereg.perl.com>.
|
||||
.\"
|
||||
.TH METACITY-THEME-VIEWER 1 "1 June 2004"
|
||||
.TH MUTTER-THEME-VIEWER 1 "1 June 2004"
|
||||
.SH NAME
|
||||
metacity-theme-viewer \- view metacity themes
|
||||
mutter-theme-viewer \- view mutter themes
|
||||
.SH SYNOPSIS
|
||||
.B metacity-theme-viewer
|
||||
.B mutter-theme-viewer
|
||||
[
|
||||
.I THEMENAME
|
||||
]
|
||||
.SH DESCRIPTION
|
||||
.\" Putting a newline after each sentence can generate better output.
|
||||
.B metacity-theme-viewer
|
||||
allows you to preview any installed Metacity theme.
|
||||
.B mutter-theme-viewer
|
||||
allows you to preview any installed Mutter theme.
|
||||
.PP
|
||||
When designing a new Metacity theme, you can use
|
||||
.B metacity-theme-viewer
|
||||
When designing a new Mutter theme, you can use
|
||||
.B mutter-theme-viewer
|
||||
to measure the performance of a window frame option, and to preview
|
||||
the option.
|
||||
.SH OPTIONS
|
||||
@@ -32,12 +32,12 @@ It is case-sensitive.
|
||||
.I /usr/share/themes
|
||||
system themes directory
|
||||
.TP
|
||||
.I /usr/share/themes/*/metacity-1/metacity-theme-1.xml
|
||||
.I /usr/share/themes/*/mutter-1/mutter-theme-1.xml
|
||||
theme specification file
|
||||
.SH AUTHOR
|
||||
This manual page was written by Jose M. Moya <josem@die.upm.es>, for
|
||||
the Debian GNU/Linux system (but may be used by others).
|
||||
.SH "SEE ALSO"
|
||||
.\" Always quote multiple words for .SH
|
||||
.BR metacity (1),
|
||||
.BR metacity-window-demo (1).
|
||||
.BR mutter (1),
|
||||
.BR mutter-window-demo (1).
|
@@ -3,11 +3,11 @@
|
||||
.\"
|
||||
.\" Based on template provided by Tom Christiansen <tchrist@jhereg.perl.com>.
|
||||
.\"
|
||||
.TH METACITY-WINDOW-DEMO 1 "1 June 2004"
|
||||
.TH MUTTER-WINDOW-DEMO 1 "1 June 2004"
|
||||
.SH NAME
|
||||
metacity-window-demo \- demo of window features
|
||||
mutter-window-demo \- demo of window features
|
||||
.SH SYNOPSIS
|
||||
.B metacity-window-demo
|
||||
.B mutter-window-demo
|
||||
.SH DESCRIPTION
|
||||
.\" Putting a newline after each sentence can generate better output.
|
||||
This program demonstrates various kinds of windows that window
|
||||
@@ -21,5 +21,5 @@ the Debian GNU/Linux system (but may be used by others).
|
||||
.SH "SEE ALSO"
|
||||
.\" Always quote multiple words for .SH
|
||||
.BR x-window-manager (1),
|
||||
.BR metacity (1),
|
||||
.BR metacity-theme-viewer (1).
|
||||
.BR mutter (1),
|
||||
.BR mutter-theme-viewer (1).
|
@@ -2,7 +2,7 @@
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH METACITY 1 "11 February 2006"
|
||||
.TH MUTTER 1 "11 February 2006"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
@@ -16,25 +16,25 @@
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
METACITY \- minimal GTK2 Window Manager
|
||||
MUTTER \- Clutter based compositing GTK2 Window Manager
|
||||
.SH SYNOPSIS
|
||||
.B metacity
|
||||
.B mutter
|
||||
[\-\-display=\fIDISPLAY\fP] [\-\-replace] [\-\-sm\-client\-id=\fIID\fP] [\-\-sm\-disable] [\-\-sm\-save\-file=\fIFILENAME\fP] [\-\-version] [\-\-help]
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly
|
||||
.B metacity\fP.
|
||||
.B mutter\fP.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBmetacity\fP is a minimal X window manager aimed at nontechnical users and is designed to integrate well with the GNOME desktop. \fBmetacity\fP lacks some features that may be expected by traditional UNIX or other technical users; these users may want to investigate other available window managers for use with GNOME or standalone.
|
||||
\fBmutter\fP is a minimal X window manager aimed at nontechnical users and is designed to integrate well with the GNOME desktop. \fBmutter\fP lacks some features that may be expected by traditional UNIX or other technical users; these users may want to investigate other available window managers for use with GNOME or standalone.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-\-display=DISPLAY
|
||||
Connect to X display \fIDISPLAY\fP.
|
||||
.TP
|
||||
.B \-\-replace
|
||||
a window manager which is running is replaced by \fBmetacity\fP. Users are encouraged to change the GNOME window manager by running the new WM with the --replace or -replace option, and subsequently saving the session.
|
||||
a window manager which is running is replaced by \fBmutter\fP. Users are encouraged to change the GNOME window manager by running the new WM with the --replace or -replace option, and subsequently saving the session.
|
||||
.TP
|
||||
.B \-\-sm\-client\-id=ID
|
||||
Specify a session management \fIID\fP.
|
||||
@@ -51,10 +51,10 @@ Print the version number.
|
||||
.B \-?, \-\-help
|
||||
Show summary of options.
|
||||
.SH CONFIGURATION
|
||||
\fBmetacity\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gconf editing (gconf-editor or gconftool-2).
|
||||
\fBmutter\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gconf editing (gconf-editor or gconftool-2).
|
||||
.SH SEE ALSO
|
||||
.BR metacity-message (1)
|
||||
.BR mutter-message (1)
|
||||
.SH AUTHOR
|
||||
The original manual page was written by Thom May <thom@debian.org>. It was updated by Akira TAGOH <tagoh@debian.org>
|
||||
for the Debian GNU/Linux system (with permission to use by others), and then updated by Luke Morton and Philip O'Brien
|
||||
for inclusion in metacity.
|
||||
for inclusion in mutter.
|
@@ -1,273 +0,0 @@
|
||||
<!--
|
||||
DTD for Metacity themes, as of Metacity 2.4.1
|
||||
Author: Ross Burton <ross@burtonini.com>
|
||||
Copyright (C) 2002 Ross Burton
|
||||
Licensed under the GPL, version 2
|
||||
-->
|
||||
|
||||
<!-- Top-level element -->
|
||||
<!ELEMENT metacity_theme (info,(window|frame_style_set|frame_style|frame_geometry|constant|draw_ops|menu_icon)+)>
|
||||
|
||||
<!-- Theme metadata -->
|
||||
<!ELEMENT info (name?|author?|copyright?|date?|description?)*>
|
||||
<!ELEMENT name (#PCDATA)>
|
||||
<!ELEMENT author (#PCDATA)>
|
||||
<!ELEMENT copyright (#PCDATA)>
|
||||
<!ELEMENT date (#PCDATA)>
|
||||
<!ELEMENT description (#PCDATA)>
|
||||
|
||||
<!ENTITY % xyrequired "
|
||||
x CDATA #REQUIRED
|
||||
y CDATA #REQUIRED
|
||||
">
|
||||
|
||||
<!ENTITY % xyimplied "
|
||||
x CDATA #IMPLIED
|
||||
y CDATA #IMPLIED
|
||||
">
|
||||
|
||||
<!ENTITY % widthheightrequired "
|
||||
width CDATA #REQUIRED
|
||||
height CDATA #REQUIRED
|
||||
">
|
||||
|
||||
<!ENTITY % widthheightimplied "
|
||||
width CDATA #IMPLIED
|
||||
height CDATA #IMPLIED
|
||||
">
|
||||
|
||||
<!ENTITY % boolean "(true|false)">
|
||||
|
||||
<!ENTITY % piece_positions "
|
||||
(entire_background|titlebar|titlebar_middle|left_titlebar_edge|right_titlebar_edge|top_titlebar_edge|bottom_titlebar_edge|title|left_edge|right_edge|bottom_edge|overlay)
|
||||
">
|
||||
|
||||
<!ENTITY % gtk-state "
|
||||
state (normal|prelight|active|selected|insensitive) #REQUIRED
|
||||
">
|
||||
|
||||
<!ENTITY % gtk-shadow "
|
||||
shadow (none|in|out|etched_in|etched_out) #REQUIRED
|
||||
">
|
||||
|
||||
|
||||
<!-- The actual theme -->
|
||||
|
||||
<!ELEMENT window EMPTY>
|
||||
<!ATTLIST window
|
||||
type (normal|dialog|modal_dialog|menu|utility|border) #REQUIRED
|
||||
style_set CDATA #REQUIRED
|
||||
>
|
||||
|
||||
|
||||
<!ELEMENT frame_style_set (frame+)>
|
||||
<!ATTLIST frame_style_set
|
||||
name CDATA #REQUIRED
|
||||
parent CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT frame EMPTY>
|
||||
<!ATTLIST frame
|
||||
focus (yes|no) #REQUIRED
|
||||
state (normal|maximized|shaded|maximized_and_shaded) #REQUIRED
|
||||
resize (both|horizontal|vertical|none) #IMPLIED
|
||||
style CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT frame_style (piece|button)*>
|
||||
<!ATTLIST frame_style
|
||||
name CDATA #REQUIRED
|
||||
geometry CDATA #REQUIRED
|
||||
parent CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT piece (draw_ops?)>
|
||||
<!ATTLIST piece
|
||||
position %piece_positions; #REQUIRED
|
||||
draw_ops CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT button (draw_ops?)>
|
||||
<!ATTLIST button
|
||||
function (menu|minimize|maximize|close|left_left_background|left_middle_background|left_right_background|right_left_background|right_middle_background|right_right_background) #REQUIRED
|
||||
state (normal|prelight|pressed) #REQUIRED
|
||||
draw_ops CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT frame_geometry (border|(aspect_ratio|distance))+>
|
||||
<!ATTLIST frame_geometry
|
||||
name CDATA #REQUIRED
|
||||
parent CDATA #IMPLIED
|
||||
title_scale (xx-small|x-small|small|medium|large|x-large|xx-large) #IMPLIED
|
||||
has_title (true|false) 'true'
|
||||
rounded_top_left %boolean; #IMPLIED
|
||||
rounded_top_right %boolean; #IMPLIED
|
||||
rounded_bottom_left %boolean; #IMPLIED
|
||||
rounded_bottom_right %boolean; #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT distance EMPTY>
|
||||
<!ATTLIST distance
|
||||
name (left_width|right_width|bottom_height|title_vertical_pad|right_titlebar_edge|left_titlebar_edge|button_width|button_height) #REQUIRED
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT border EMPTY>
|
||||
<!ATTLIST border
|
||||
name CDATA #REQUIRED
|
||||
top CDATA #REQUIRED
|
||||
bottom CDATA #REQUIRED
|
||||
left CDATA #REQUIRED
|
||||
right CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT aspect_ratio EMPTY>
|
||||
<!ATTLIST aspect_ratio
|
||||
name CDATA #REQUIRED
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT draw_ops (line|rectangle|arc|tint|gradient|image|gtk_arrow|gtk_box|gtk_vline|icon|title|clip|include|tile)*>
|
||||
<!-- not sure about this.. maybe it should be removed. see #3478 in theme-parser.c -->
|
||||
<!ATTLIST draw_ops
|
||||
name CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT line EMPTY>
|
||||
<!ATTLIST line
|
||||
color CDATA #REQUIRED
|
||||
x1 CDATA #REQUIRED
|
||||
y1 CDATA #REQUIRED
|
||||
x2 CDATA #REQUIRED
|
||||
y2 CDATA #REQUIRED
|
||||
width CDATA #IMPLIED
|
||||
dash_on_length CDATA #IMPLIED
|
||||
dash_off_length CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT rectangle EMPTY>
|
||||
<!ATTLIST rectangle
|
||||
color CDATA #REQUIRED
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
filled %boolean; 'false'
|
||||
>
|
||||
|
||||
<!ELEMENT arc EMPTY>
|
||||
<!ATTLIST arc
|
||||
color CDATA #REQUIRED
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
start_angle CDATA #REQUIRED
|
||||
extent_angle CDATA #REQUIRED
|
||||
filled %boolean; 'false'
|
||||
>
|
||||
|
||||
<!ELEMENT icon EMPTY>
|
||||
<!ATTLIST icon
|
||||
%xyrequired;
|
||||
width CDATA #REQUIRED
|
||||
height CDATA #REQUIRED
|
||||
alpha CDATA #IMPLIED
|
||||
fill_type (tile|scale) 'scale'
|
||||
>
|
||||
|
||||
<!ELEMENT image EMPTY>
|
||||
<!ATTLIST image
|
||||
filename CDATA #REQUIRED
|
||||
colorize CDATA #IMPLIED
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
alpha CDATA #IMPLIED
|
||||
fill_type (tile|scale) 'scale'
|
||||
>
|
||||
|
||||
<!ELEMENT tile EMPTY>
|
||||
<!ATTLIST tile
|
||||
name CDATA #REQUIRED
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
tile_xoffset CDATA #IMPLIED
|
||||
tile_yoffset CDATA #IMPLIED
|
||||
tile_width CDATA #REQUIRED
|
||||
tile_height CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT clip EMPTY>
|
||||
<!ATTLIST clip
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
>
|
||||
|
||||
<!ELEMENT title EMPTY>
|
||||
<!ATTLIST title
|
||||
color CDATA #REQUIRED
|
||||
%xyrequired;
|
||||
>
|
||||
|
||||
<!ELEMENT tint EMPTY>
|
||||
<!ATTLIST tint
|
||||
color CDATA #REQUIRED
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
alpha CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT gtk_box EMPTY>
|
||||
<!ATTLIST gtk_box
|
||||
%gtk-state;
|
||||
%gtk-shadow;
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
>
|
||||
|
||||
<!ELEMENT gtk_arrow EMPTY>
|
||||
<!ATTLIST gtk_arrow
|
||||
%gtk-state;
|
||||
%gtk-shadow;
|
||||
arrow (up|down|left|right) #REQUIRED
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
filed CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT gtk_vline EMPTY>
|
||||
<!ATTLIST gtk_vline
|
||||
%gtk-state;
|
||||
x CDATA #REQUIRED
|
||||
y1 CDATA #REQUIRED
|
||||
y2 CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT gradient (color)+>
|
||||
<!ATTLIST gradient
|
||||
type (vertical|horizontal|diagonal) #REQUIRED
|
||||
%xyrequired;
|
||||
%widthheightrequired;
|
||||
alpha CDATA #IMPLIED
|
||||
>
|
||||
|
||||
<!ELEMENT color EMPTY>
|
||||
<!ATTLIST color
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT include EMPTY>
|
||||
<!ATTLIST include
|
||||
name CDATA #REQUIRED
|
||||
%xyimplied;
|
||||
%widthheightimplied;
|
||||
>
|
||||
|
||||
<!ELEMENT constant EMPTY>
|
||||
<!ATTLIST constant
|
||||
name CDATA #REQUIRED
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT menu_icon (draw_ops?)>
|
||||
<!ATTLIST menu_icon
|
||||
function (close|maximize|minimize|unmaximize) #REQUIRED
|
||||
%gtk-state;
|
||||
draw_ops CDATA #IMPLIED
|
||||
>
|
@@ -4,6 +4,7 @@ of the theme format, and a given theme can support more than one format.
|
||||
Version 1: THEMEDIR/metacity-1/metacity-theme-1.xml
|
||||
(original metacity format)
|
||||
Version 2: THEMEDIR/metacity-1/metacity-theme-2.xml
|
||||
Version 3: THEMEDIR/metacity-1/metacity-theme-3.xml
|
||||
|
||||
The subdirectory name is "metacity-1" in all versions.
|
||||
|
||||
@@ -21,6 +22,49 @@ This document has separate sections for each format version. You may
|
||||
want to read the document in reverse order, since the base features
|
||||
are discussed under version 1.
|
||||
|
||||
New Features in Theme Format Version 3.2
|
||||
========================================
|
||||
|
||||
A new window type 'attached' is added for modal dialogs which are
|
||||
attached to their parent window. (When the attach_modal_dialogs preference
|
||||
is turned on.) If no style is defined for the 'attached' window type,
|
||||
the 'border' window type will be used instead.
|
||||
|
||||
New Features in Theme Format Version 3.1
|
||||
========================================
|
||||
|
||||
Additional predefined variables are added for positioning expressions:
|
||||
|
||||
frame_x_center: the X center of the entire frame, with respect to the
|
||||
piece currently being drawn.
|
||||
frame_y_center: the Y center of the entire frame, with respect to the
|
||||
piece currently being drawn.
|
||||
|
||||
The <title/> element now supports an "ellipsize_width" attribute. When
|
||||
specified, this gives a width at which to ellipsize the title. If not
|
||||
specified, the title will simply be clipped to the title area.
|
||||
|
||||
New Features in Theme Format Version 3
|
||||
======================================
|
||||
|
||||
Format version 3 has exactly one new feature; any element in the file
|
||||
can now have a version attribute:
|
||||
|
||||
version="[<|<=|=>|>] MAJOR.MINOR"
|
||||
|
||||
(< and > should be to be entity escaped as < and >). If this
|
||||
version check is not met, then the element and its children will be
|
||||
ignored. This allows having alternate sections of the theme file for
|
||||
older and newer version of the Metacity theme format.
|
||||
|
||||
When placed on the toplevel <metacity_theme> element, an unsatisfied
|
||||
version check will not just cause the contents of the file to be
|
||||
ignored, it will also cause the lookup of a theme file to proceed on
|
||||
and look for an older format 2 or format 1 file. This allows making a
|
||||
metacity-theme-3.xml file that is only used the format version 3.2 or
|
||||
newer is supported, and using metacity-theme-1.xml for older window
|
||||
managers.
|
||||
|
||||
New Features in Theme Format Version 2
|
||||
======================================
|
||||
|
||||
|
710
metacity.doap
710
metacity.doap
@@ -1,710 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<Project
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns="http://usefulinc.com/ns/doap#"
|
||||
xmlns:foaf="http://xmlns.com/foaf/0.1/"
|
||||
xmlns:admin="http://webns.net/mvcb/">
|
||||
|
||||
<name>The Metacity Window Manager</name>
|
||||
<shortname>Metacity</shortname>
|
||||
|
||||
<!-- It's a blog. Metacity has no homepage. -->
|
||||
<homepage rdf:resource="http://blogs.gnome.org/metacity/" />
|
||||
|
||||
<!-- The date when the source control was initialised. -->
|
||||
<created>2001-05-30</created>
|
||||
|
||||
<shortdesc xml:lang="en">
|
||||
Metacity is a simple compositing window manager that integrates nicely with GNOME 2.
|
||||
</shortdesc>
|
||||
<description xml:lang="en">
|
||||
A window manager for GNOME, with a focus on simplicity and usability
|
||||
rather than novelties or gimmicks. It uses GTK+ 2 for drawing window frames,
|
||||
so that it inherits colours, fonts, and so on from the GTK+ theme. Its author
|
||||
has characterised it as a "boring window manager for the adult in you.
|
||||
Many window managers are like Marshmallow Froot Loops; Metacity is like Cheerios."
|
||||
</description>
|
||||
|
||||
<!-- I haven't found anything appropriate; I made this up. -->
|
||||
<category>window-manager</category>
|
||||
|
||||
<wiki rdf:resource="http://live.gnome.org/Metacity" />
|
||||
<bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=metacity" />
|
||||
<screenshots rdf:resource="http://commons.wikimedia.org/wiki/Image:Metacity-screenshot.png" />
|
||||
|
||||
<mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/metacity-devel-list" />
|
||||
|
||||
<programming-language>C</programming-language>
|
||||
<license rdf:resource="http://usefulinc.com/doap/licenses/gpl" />
|
||||
<download-page rdf:resource="http://download.gnome.org/sources/metacity/" />
|
||||
|
||||
<repository>
|
||||
<SVNRepository>
|
||||
<location rdf:resource="http://svn.gnome.org/svn/metacity" />
|
||||
<browse rdf:resource="http://svn.gnome.org/viewvc/metacity/" />
|
||||
</SVNRepository>
|
||||
</repository>
|
||||
|
||||
<author>
|
||||
<foaf:Person>
|
||||
<foaf:name>Havoc Pennington</foaf:name>
|
||||
</foaf:Person>
|
||||
</author>
|
||||
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
<foaf:name>Elijah Newren</foaf:name>
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
<foaf:name>Thomas Thurman</foaf:name>
|
||||
<foaf:mbox rdf:resource="mailto:tthurman@gnome.org"/>
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
|
||||
<release><Version>
|
||||
<name>2.25.1 release</name>
|
||||
<created>2008-09-01</created>
|
||||
<branch></branch>
|
||||
<revision>2.25.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.25/2.25.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.25/2.25.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.25.0 release</name>
|
||||
<created>2008-08-18</created>
|
||||
<branch></branch>
|
||||
<revision>2.25.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.25/2.25.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.25/2.25.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.89 release</name>
|
||||
<created>2008-08-04</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.89</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.89.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.89.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.55 release</name>
|
||||
<created>2008-07-14</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.55</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.55.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.55.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.34 release</name>
|
||||
<created>2008-06-16</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.34</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.34.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.34.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.34 release</name>
|
||||
<created>2008-06-16</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.34</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.34.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.34.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.34 release</name>
|
||||
<created>2008-06-02</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.34</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.34.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.34.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.21 release</name>
|
||||
<created>2008-05-26</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.21</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.21.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.21.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.13 release</name>
|
||||
<created>2008-04-27</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.13</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.13.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.13.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.8 release</name>
|
||||
<created>2008-04-22</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.8</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.8.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.8.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.5 release</name>
|
||||
<created>2008-04-06</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.5</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.5.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.5.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.3 release</name>
|
||||
<created>2008-03-21</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.2 release</name>
|
||||
<created>2008-03-07</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.1 release</name>
|
||||
<created>2008-03-06</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.23.0 release</name>
|
||||
<created>2008-02-26</created>
|
||||
<branch></branch>
|
||||
<revision>2.23.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.23/2.23.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.21.13 release</name>
|
||||
<created>2008-02-11</created>
|
||||
<branch></branch>
|
||||
<revision>2.21.13</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.13.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.13.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.21.8 release</name>
|
||||
<created>2008-02-03</created>
|
||||
<branch></branch>
|
||||
<revision>2.21.8</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.8.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.8.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.21.5 release</name>
|
||||
<created>2007-12-19</created>
|
||||
<branch></branch>
|
||||
<revision>2.21.5</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.5.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.5.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.21.3 release</name>
|
||||
<created>2007-12-14</created>
|
||||
<branch></branch>
|
||||
<revision>2.21.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.21.2 release</name>
|
||||
<created>2007-11-17</created>
|
||||
<branch></branch>
|
||||
<revision>2.21.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.21.1 release</name>
|
||||
<created>2007-11-11</created>
|
||||
<branch></branch>
|
||||
<revision>2.21.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.21/2.21.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.20.0 release</name>
|
||||
<created>2007-09-15</created>
|
||||
<branch></branch>
|
||||
<revision>2.20.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.20/2.20.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.20/2.20.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.55 release</name>
|
||||
<created>2007-08-07</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.55</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.55.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.55.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.34 release</name>
|
||||
<created>2007-07-22</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.34</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.34.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.34.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.21 release</name>
|
||||
<created>2007-06-18</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.21</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.21.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.21.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.13 release</name>
|
||||
<created>2007-06-10</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.13</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.13.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.13.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.8 release</name>
|
||||
<created>2007-06-04</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.8</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.8.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.8.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.5 release</name>
|
||||
<created>2007-04-23</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.5</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.5.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.5.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.3 release</name>
|
||||
<created>2007-04-16</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.2 release</name>
|
||||
<created>2007-04-09</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.19.1 release</name>
|
||||
<created>2007-04-04</created>
|
||||
<branch></branch>
|
||||
<revision>2.19.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.19/2.19.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.17.3 release</name>
|
||||
<created>2006-12-10</created>
|
||||
<branch></branch>
|
||||
<revision>2.17.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.17.2 release</name>
|
||||
<created>2006-11-06</created>
|
||||
<branch></branch>
|
||||
<revision>2.17.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.17.1 release</name>
|
||||
<created>2006-10-16</created>
|
||||
<branch></branch>
|
||||
<revision>2.17.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.17.0 release</name>
|
||||
<created>2006-10-07</created>
|
||||
<branch></branch>
|
||||
<revision>2.17.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.17/2.17.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.16.2 release</name>
|
||||
<created>2006-09-18</created>
|
||||
<branch></branch>
|
||||
<revision>2.16.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.16/2.16.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.16/2.16.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.16.1 release</name>
|
||||
<created>2006-09-11</created>
|
||||
<branch></branch>
|
||||
<revision>2.16.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.16/2.16.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.16/2.16.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.16.0 release</name>
|
||||
<created>2006-09-04</created>
|
||||
<branch></branch>
|
||||
<revision>2.16.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.16/2.16.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.16/2.16.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.34 release</name>
|
||||
<created>2006-08-21</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.34</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.34.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.34.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.21 release</name>
|
||||
<created>2006-08-07</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.21</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.21.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.21.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.13 release</name>
|
||||
<created>2006-07-24</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.13</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.13.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.13.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.8 release</name>
|
||||
<created>2006-07-10</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.8</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.8.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.8.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.5 release</name>
|
||||
<created>2006-06-12</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.5</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.5.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.5.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.3 release</name>
|
||||
<created>2006-05-15</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.2 release</name>
|
||||
<created>2006-04-25</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.1 release</name>
|
||||
<created>2006-04-25</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.15.0 release</name>
|
||||
<created>2006-04-24</created>
|
||||
<branch></branch>
|
||||
<revision>2.15.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.15/2.15.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.89 release</name>
|
||||
<created>2006-02-13</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.89</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.89.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.89.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.55 release</name>
|
||||
<created>2006-01-30</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.55</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.55.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.55.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.34 release</name>
|
||||
<created>2006-01-20</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.34</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.34.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.34.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.21 release</name>
|
||||
<created>2006-01-16</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.21</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.21.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.21.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.13 release</name>
|
||||
<created>2006-01-10</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.13</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.13.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.13.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.8 release</name>
|
||||
<created>2006-01-02</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.8</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.8.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.8.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.5 release</name>
|
||||
<created>2005-12-12</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.5</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.5.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.5.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.3 release</name>
|
||||
<created>2005-11-22</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.2 release</name>
|
||||
<created>2005-11-19</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.1 release</name>
|
||||
<created>2005-11-14</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.13.0 release</name>
|
||||
<created>2005-10-24</created>
|
||||
<branch></branch>
|
||||
<revision>2.13.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.13/2.13.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.12.1 release</name>
|
||||
<created>2005-10-03</created>
|
||||
<branch></branch>
|
||||
<revision>2.12.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.12/2.12.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.12/2.12.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.12.0 release</name>
|
||||
<created>2005-09-05</created>
|
||||
<branch></branch>
|
||||
<revision>2.12.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.12/2.12.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.12/2.12.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.11.3 release</name>
|
||||
<created>2005-08-22</created>
|
||||
<branch></branch>
|
||||
<revision>2.11.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.11.2 release</name>
|
||||
<created>2005-08-08</created>
|
||||
<branch></branch>
|
||||
<revision>2.11.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.11.1 release</name>
|
||||
<created>2005-07-24</created>
|
||||
<branch></branch>
|
||||
<revision>2.11.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.11.0 release</name>
|
||||
<created>2005-07-12</created>
|
||||
<branch></branch>
|
||||
<revision>2.11.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.11/2.11.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.10.2 release</name>
|
||||
<created>2005-06-27</created>
|
||||
<branch></branch>
|
||||
<revision>2.10.2</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.10/2.10.2.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.10/2.10.2.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.10.1 release</name>
|
||||
<created>2005-04-11</created>
|
||||
<branch></branch>
|
||||
<revision>2.10.1</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.10/2.10.1.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.10/2.10.1.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.10.0 release</name>
|
||||
<created>2005-03-07</created>
|
||||
<branch></branch>
|
||||
<revision>2.10.0</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.10/2.10.0.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.10/2.10.0.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.8.5 release</name>
|
||||
<created>2004-09-13</created>
|
||||
<branch></branch>
|
||||
<revision>2.8.5</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.5.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.5.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.8.5 release</name>
|
||||
<created>2004-09-13</created>
|
||||
<branch></branch>
|
||||
<revision>2.8.5</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.5.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.5.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.8.4 release</name>
|
||||
<created>2004-08-29</created>
|
||||
<branch></branch>
|
||||
<revision>2.8.4</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.4.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.4.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<release><Version>
|
||||
<name>2.8.3 release</name>
|
||||
<created>2004-08-15</created>
|
||||
<branch></branch>
|
||||
<revision>2.8.3</revision>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.3.tar.gz"/>
|
||||
<file-release rdf:resource="http://download.gnome.org/sources/metacity/2.8/2.8.3.tar.bz2"/>
|
||||
</Version></release>
|
||||
|
||||
<!-- earlier ones not yet documented, and will have to be added by hand -->
|
||||
|
||||
</Project>
|
32
mutter.doap
Normal file
32
mutter.doap
Normal file
@@ -0,0 +1,32 @@
|
||||
<Project xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:foaf="http://xmlns.com/foaf/0.1/"
|
||||
xmlns:gnome="http://api.gnome.org/doap-extensions#"
|
||||
xmlns="http://usefulinc.com/ns/doap#">
|
||||
|
||||
<name xml:lang="en">mutter</name>
|
||||
<shortdesc xml:lang="en">Window and compositing manager based on Clutter</shortdesc>
|
||||
<!--
|
||||
<homepage rdf:resource="http://www.gnome.org/" />
|
||||
-->
|
||||
<mailing-list rdf:resource="http://mail.gnome.org/mailman/listinfo/gnome-shell-list" />
|
||||
<download-page rdf:resource="http://download.gnome.org/sources/mutter/" />
|
||||
<bug-database rdf:resource="http://bugzilla.gnome.org/browse.cgi?product=mutter" />
|
||||
|
||||
<category rdf:resource="http://api.gnome.org/doap-extensions#desktop" />
|
||||
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
<foaf:name>Tomas Frydrych</foaf:name>
|
||||
<foaf:mbox rdf:resource="mailto:tf@linux.intel.com" />
|
||||
<gnome:userid>tomasf</gnome:userid>
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
<foaf:name>Owen Taylor</foaf:name>
|
||||
<foaf:mbox rdf:resource="mailto:otaylor@redhat.com" />
|
||||
<gnome:userid>otaylor</gnome:userid>
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
</Project>
|
219
po/ChangeLog
219
po/ChangeLog
@@ -1,3 +1,214 @@
|
||||
2009-04-05 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2009-03-30 Baris Cicek <baris@teamforce.name.tr>
|
||||
|
||||
* tr.po: Updated Turkish translation.
|
||||
|
||||
2009-03-28 Simos Xenitellis <simos@gnome.org>
|
||||
|
||||
* el.po: Updated Greek translation.
|
||||
|
||||
2009-03-27 Simos Xenitellis <simos@gnome.org>
|
||||
|
||||
* el.po: Updated Greek translation.
|
||||
|
||||
2009-03-21 Goran Rakic <grakic@devbase.net>
|
||||
|
||||
* sr.po, sr@latin.po: Updated Serbian translation by Miloš Popović.
|
||||
|
||||
2009-03-19 Tomasz Dominikowski <tdominikowski@aviary.pl>
|
||||
|
||||
* pl.po: Updated Polish translation
|
||||
|
||||
2009-03-19 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2009-03-18 Ignacio Casal Quinteiro <icq@gnome.org>
|
||||
|
||||
* gl.po: Updated Galician translation by Suso Baleato.
|
||||
|
||||
2009-03-18 Kostas Papadimas <pkst@gnome.org>
|
||||
|
||||
* el.po: Updated Greek Translation by Fotis Tsamis.
|
||||
|
||||
2009-03-18 Djihed Afifi <djihed@gmail.com>
|
||||
|
||||
* ar.po: Updated Arabic translation.
|
||||
|
||||
2009-03-17 Alexander Shopov <ash@contact.bg>
|
||||
|
||||
* bg.po: Updated Bulgarian translation by
|
||||
Alexander Shopov <ash@contact.bg>
|
||||
|
||||
2009-03-16 Amitakhya Phukan <amitakhya@svn.gnome.org>
|
||||
|
||||
* as.po: Updated Assamese translations.
|
||||
|
||||
2009-03-15 Rajesh Ranjan <rajeshkajha@yahoo.com>
|
||||
|
||||
* mai.po: added Maithili translation.
|
||||
* LINGUAS: Added Maithili (mai) to the list of Languages.
|
||||
|
||||
2009-03-15 Ankitkumar Patel <ankit@redhat.com>
|
||||
|
||||
* gu.po: Updated Gujarati Translations.
|
||||
|
||||
2009-03-14 Gintautas Miliauskas <gintautas@miliauskas.lt>
|
||||
|
||||
* lt.po: Updated Lithuanian translation.
|
||||
|
||||
2009-03-14 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
|
||||
|
||||
* ru.po: Updated Russian translation by Yuriy Penkin.
|
||||
|
||||
2009-03-14 Sandeep Shedmake <sshedmak@redhat.com>
|
||||
|
||||
* mr.po: Updated Marathi Translations.
|
||||
|
||||
2009-03-14 Rajesh Ranjan <rranjan@redhat.com>
|
||||
|
||||
* hi.po: Updated Hindi Translation.
|
||||
|
||||
2009-03-13 Kostas Papadimas <pkst@gnome.org>
|
||||
|
||||
* el.po: Updated Greek Translation by Jennie Petoumenou.
|
||||
|
||||
2009-03-13 Priit Laes <plaes at svn dot gnome dot org>
|
||||
|
||||
* et.po: Translation updated by Mattias Põldaru
|
||||
|
||||
2009-03-12 Manoj Kumar Giri <mgiri@redhat.com>
|
||||
|
||||
* or.po: Updated Oriya Translation.
|
||||
|
||||
2009-03-11 Krishnababu K <kkrothap@redhat.com>
|
||||
|
||||
* te.po: Updated Telugu Translation.
|
||||
* LINGUAS: Added Telugu [te] language.
|
||||
|
||||
2009-03-10 Runa Bhattacharjee <runab@redhat.com>
|
||||
|
||||
* bn_IN.po: Updated partial Bengali India Translation
|
||||
|
||||
2009-03-08 Petr Kovar <pknbe@volny.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2009-03-07 Mark Krapivner <mark125@gmail.com>
|
||||
|
||||
* he.po: Updated Hebrew translation.
|
||||
|
||||
2009-03-06 Milo Casagrande <milo@ubuntu.com>
|
||||
|
||||
* it.po: Updated Italian translation by Luca Ferretti.
|
||||
|
||||
2009-03-04 Luca Ferretti <elle.uca@libero.it>
|
||||
|
||||
* it.po: Updated Italian translation
|
||||
|
||||
2009-03-02 Claude Paroz <claude@2xlibre.net>
|
||||
|
||||
* fr.po: Updated French translation by Frédéric Peters and Claude Paroz.
|
||||
|
||||
2009-03-02 I. Felix <ifelix@redhat.com>
|
||||
|
||||
* ta.po: Tamil Translation updated by Tirumurthi Vasudevan
|
||||
|
||||
2009-02-28 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
|
||||
2009-02-23 Philip Withnall <philip@tecnocode.co.uk>
|
||||
|
||||
* en_GB.po: Updated British English translation.
|
||||
|
||||
2009-02-23 Gil Forcada <gforcada@gnome.org>
|
||||
|
||||
* ca.po: Updated Catalan translation by David Planella.
|
||||
|
||||
2009-02-23 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2009-02-21 Christian Kirbach <Christian.Kirbach@googlemail.com>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2009-02-20 Og Maciel <ogmaciel@gnome.org>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation by
|
||||
Vladimir Melo.
|
||||
|
||||
2009-02-19 Jani Monoses <jani@ubuntu.com>
|
||||
|
||||
* ro.po: Updated Romanian translation
|
||||
by Adi Roiban <adi@roiban.ro>
|
||||
|
||||
2009-02-19 Ilkka Tuohela <hile@iki.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2009-02-18 Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
|
||||
|
||||
* zh_HK.po: Updated Traditional Chinese translation(Hong Kong).
|
||||
* zh_TW.po: Updated Traditional Chinese translation(Taiwan).
|
||||
|
||||
2009-02-18 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
* ko.po: Updated Korean translation.
|
||||
|
||||
2009-02-17 Gabor Kelemen <kelemeng@gnome.hu>
|
||||
|
||||
* hu.po: Translation updated.
|
||||
|
||||
2009-02-16 Wouter Bolsterlee <wbolster@svn.gnome.org>
|
||||
|
||||
* nl.po: Updated Dutch translation by Wouter Bolsterlee.
|
||||
|
||||
2009-02-15 Kenneth Nielsen <k.nielsen81@gmail.com>
|
||||
|
||||
* da.po: Updated Danish translation by Ask H. Larsen
|
||||
|
||||
2009-02-15 Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
|
||||
|
||||
* zh_HK.po: Updated Traditional Chinese translation(Hong Kong).
|
||||
* zh_TW.po: Updated Traditional Chinese translation(Taiwan).
|
||||
|
||||
2009-02-14 Ihar Hrachyshka <booxter@lacinka.org>
|
||||
|
||||
* be@latin.po: Updated Belarusian Latin translation by Ihar Hrachyshka.
|
||||
|
||||
2009-02-13 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
* th.po: Updated Thai translation.
|
||||
|
||||
2009-02-12 Inaki Larranaga Murgoitio <dooteo@euskalgnu.org>
|
||||
|
||||
* eu.po: Updated Basque translation.
|
||||
|
||||
2009-02-11 Daniel Nylander <po@danielnylander.se>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2009-02-11 Takeshi AIHANA <takeshi.aihana@gmail.com>
|
||||
|
||||
* ja.po: Updated Japanese translation.
|
||||
|
||||
2009-02-10 Gil Forcada <gforcada@gnome.org>
|
||||
|
||||
* ast.po: Updated Asturian translation on behalf of Mikel González.
|
||||
|
||||
2009-02-07 Clytie Siddall <clytie@riverland.net.au>
|
||||
|
||||
* vi.po: Updated Vietnamese translation.
|
||||
|
||||
2009-02-03 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2009-02-01 Gil Forcada <gforcada@gnome.org>
|
||||
|
||||
* ca.po: Updated Catalan translation by David Planella.
|
||||
@@ -43,7 +254,7 @@
|
||||
|
||||
2009-01-03 甘露(Gan Lu) <rhythm.gan@gmail.com>
|
||||
|
||||
* zh_CN.po: Updated Chinese Simplified translation
|
||||
* zh_CN.po: Updated Chinese Simplified translation
|
||||
|
||||
2009-01-03 Priit Laes <plaes at svn dot gnome dot org>
|
||||
|
||||
@@ -199,7 +410,7 @@
|
||||
|
||||
2008-09-12 Goran Rakić <grakic@devbase.net>
|
||||
|
||||
* sr.po, sr@latin.po: Updated Serbian translation (by Miloš Popović).
|
||||
* sr.po, sr@latin.po: Updated Serbian translation (by Miloš Popović).
|
||||
|
||||
2008-09-09 Robert Sedak <robert.sedak@sk.t-com.hr>
|
||||
|
||||
@@ -335,7 +546,7 @@
|
||||
|
||||
* nb.po: Updated Norwegian bokmål translation.
|
||||
|
||||
2008-06-01 Clytie Siddall <clytie@riverland.net.au>
|
||||
2008-06-01 Clytie Siddall <clytie@riverland.net.au>
|
||||
|
||||
* vi.po: Updated Vietnamese translation.
|
||||
|
||||
@@ -421,7 +632,7 @@
|
||||
|
||||
2008-03-07 Maxim Dziumanenko <dziumanenko@gmail.com>
|
||||
|
||||
* uk.po: Updated Ukrainian translation.
|
||||
* uk.po: Updated Ukrainian translation.
|
||||
|
||||
2008-03-03 Jorge Gonzalez <jorgegonz@svn.gnome.org>
|
||||
|
||||
|
@@ -10,6 +10,7 @@ be@latin
|
||||
bg
|
||||
bn
|
||||
bn_IN
|
||||
br
|
||||
bs
|
||||
ca
|
||||
ca@valencia
|
||||
@@ -48,6 +49,7 @@ ku
|
||||
la
|
||||
lt
|
||||
lv
|
||||
mai
|
||||
mg
|
||||
mk
|
||||
ml
|
||||
@@ -55,6 +57,7 @@ mn
|
||||
mr
|
||||
ms
|
||||
nb
|
||||
nds
|
||||
ne
|
||||
nl
|
||||
nn
|
||||
@@ -75,9 +78,11 @@ sr
|
||||
sr@latin
|
||||
sv
|
||||
ta
|
||||
te
|
||||
th
|
||||
tk
|
||||
tr
|
||||
ug
|
||||
uk
|
||||
vi
|
||||
wa
|
||||
|
@@ -1,7 +1,6 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Please keep this file sorted alphabetically.
|
||||
src/50-metacity-desktop-key.xml.in
|
||||
src/50-metacity-key.xml.in
|
||||
src/core/bell.c
|
||||
src/core/core.c
|
||||
src/core/delete.c
|
||||
src/core/display.c
|
||||
@@ -10,21 +9,19 @@ src/core/keybindings.c
|
||||
src/core/main.c
|
||||
src/core/prefs.c
|
||||
src/core/screen.c
|
||||
src/core/schema-bindings.c
|
||||
src/core/session.c
|
||||
src/core/util.c
|
||||
src/core/window.c
|
||||
src/core/window-props.c
|
||||
src/core/xprops.c
|
||||
src/include/all-keybindings.h
|
||||
src/metacity.desktop.in
|
||||
src/metacity.schemas.in.in
|
||||
src/metacity-wm.desktop.in
|
||||
src/tools/metacity-message.c
|
||||
src/mutter.desktop.in
|
||||
src/mutter-wm.desktop.in
|
||||
src/mutter.schemas.in
|
||||
src/tools/mutter-message.c
|
||||
src/ui/frames.c
|
||||
src/ui/menu.c
|
||||
src/ui/metaaccellabel.c
|
||||
src/ui/metacity-dialog.c
|
||||
src/ui/resizepopup.c
|
||||
src/ui/theme.c
|
||||
src/ui/theme-parser.c
|
||||
|
5225
po/be@latin.po
5225
po/be@latin.po
File diff suppressed because it is too large
Load Diff
4727
po/bn_IN.po
4727
po/bn_IN.po
File diff suppressed because it is too large
Load Diff
17
po/ca.po
17
po/ca.po
@@ -10,8 +10,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity 2.24\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-02-01 21:15+0100\n"
|
||||
"PO-Revision-Date: 2009-02-01 21:15+0100\n"
|
||||
"POT-Creation-Date: 2009-02-23 15:37+0100\n"
|
||||
"PO-Revision-Date: 2009-02-22 15:30+0100\n"
|
||||
"Last-Translator: David Planella <david.planella@gmail.com>\n"
|
||||
"Language-Team: Softcatalà <tradgnome@softcatala.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -233,8 +233,8 @@ msgid ""
|
||||
"Workarounds for broken applications disabled. Some applications may not "
|
||||
"behave properly.\n"
|
||||
msgstr ""
|
||||
"Les solucions temporals per a aplicacions amb errors estan inhabilitades. Pot "
|
||||
"ser que certes aplicacions no funcionin correctament.\n"
|
||||
"Les solucions temporals per a aplicacions amb errors estan inhabilitades. "
|
||||
"Pot ser que certes aplicacions no funcionin correctament.\n"
|
||||
|
||||
#: ../src/core/prefs.c:1302
|
||||
#, c-format
|
||||
@@ -320,7 +320,7 @@ msgstr "No s'ha pogut alliberar la pantalla %d en la visualització «%s»\n"
|
||||
#. * are hardcoded (in gtk/gtkaccelgroup.c; it's not metacity's fault).
|
||||
#. * "disabled" must also stay as it is.
|
||||
#.
|
||||
#: ../src/core/schema-bindings.c:165
|
||||
#: ../src/core/schema-bindings.c:169
|
||||
msgid ""
|
||||
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||
"\n"
|
||||
@@ -335,7 +335,7 @@ msgstr ""
|
||||
"abreviacions com «<Ctl>» i «<Ctrl>». Si establiu l'opció a la cadena especial "
|
||||
"«disabled» (inhabilitat), no hi haurà cap vinculació per a aquesta acció."
|
||||
|
||||
#: ../src/core/schema-bindings.c:173
|
||||
#: ../src/core/schema-bindings.c:177
|
||||
msgid ""
|
||||
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||
"\n"
|
||||
@@ -650,9 +650,8 @@ msgid "Move backward between panels and the desktop immediately"
|
||||
msgstr "Mou cap enrere entre quadres i l'escriptori immediatament"
|
||||
|
||||
#: ../src/include/all-keybindings.h:191
|
||||
msgid "Hide all normal windows and set focus to the desktop background"
|
||||
msgstr ""
|
||||
"Oculta totes les finestres normals i dóna el focus al fons de l'escriptori"
|
||||
msgid "Hide all normal windows and set focus to the desktop"
|
||||
msgstr "Oculta totes les finestres normals i dóna el focus a l'escriptori"
|
||||
|
||||
#: ../src/include/all-keybindings.h:194
|
||||
msgid "Show the panel's main menu"
|
||||
|
5830
po/en_GB.po
5830
po/en_GB.po
File diff suppressed because it is too large
Load Diff
186
po/et.po
186
po/et.po
@@ -7,14 +7,14 @@
|
||||
#
|
||||
# Tõivo Leedjärv <toivo linux ee>, 2004.
|
||||
# Ivar Smolin <okul linux ee>, 2005, 2006.
|
||||
# Mattias Põldaru <mahfiaz gmail com>, 2008.
|
||||
# Mattias Põldaru <mahfiaz gmail com>, 2008, 2009.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity HEAD\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=metacity&component=general\n"
|
||||
"POT-Creation-Date: 2008-12-25 16:53+0000\n"
|
||||
"PO-Revision-Date: 2008-12-26 14:43+0300\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=metacity&component=general\n"
|
||||
"POT-Creation-Date: 2009-02-05 16:08+0000\n"
|
||||
"PO-Revision-Date: 2009-02-08 21:18+0300\n"
|
||||
"Last-Translator: Mattias Põldaru <mahfiaz gmail com>\n"
|
||||
"Language-Team: Estonian <gnome-et@linux.ee>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -204,67 +204,67 @@ msgstr "Tõrge taaskäivitamisel: %s\n"
|
||||
#. * (Empty comment follows so the translators don't see this.)
|
||||
#.
|
||||
#.
|
||||
#: ../src/core/prefs.c:499
|
||||
#: ../src/core/prefs.c:654
|
||||
#: ../src/core/prefs.c:505
|
||||
#: ../src/core/prefs.c:660
|
||||
#, c-format
|
||||
msgid "GConf key '%s' is set to an invalid value\n"
|
||||
msgstr "GConf võtme '%s' väärtus on vigane\n"
|
||||
|
||||
#: ../src/core/prefs.c:580
|
||||
#: ../src/core/prefs.c:823
|
||||
#: ../src/core/prefs.c:586
|
||||
#: ../src/core/prefs.c:829
|
||||
#, c-format
|
||||
msgid "%d stored in GConf key %s is out of range %d to %d\n"
|
||||
msgstr "%d min on salvesatud GConf võtmes %s on väljaspool piirkonda %d - %d\n"
|
||||
|
||||
#: ../src/core/prefs.c:624
|
||||
#: ../src/core/prefs.c:701
|
||||
#: ../src/core/prefs.c:749
|
||||
#: ../src/core/prefs.c:813
|
||||
#: ../src/core/prefs.c:1106
|
||||
#: ../src/core/prefs.c:1122
|
||||
#: ../src/core/prefs.c:1139
|
||||
#: ../src/core/prefs.c:1155
|
||||
#: ../src/core/prefs.c:630
|
||||
#: ../src/core/prefs.c:707
|
||||
#: ../src/core/prefs.c:755
|
||||
#: ../src/core/prefs.c:819
|
||||
#: ../src/core/prefs.c:1112
|
||||
#: ../src/core/prefs.c:1128
|
||||
#: ../src/core/prefs.c:1145
|
||||
#: ../src/core/prefs.c:1161
|
||||
#, c-format
|
||||
msgid "GConf key \"%s\" is set to an invalid type\n"
|
||||
msgstr "GConf-i võti \"%s\" on määratud vigase tüübiga\n"
|
||||
|
||||
#: ../src/core/prefs.c:1225
|
||||
#: ../src/core/prefs.c:1231
|
||||
msgid "Workarounds for broken applications disabled. Some applications may not behave properly.\n"
|
||||
msgstr "Ümbernurga parandused vigastele rakendustele on keelatud. Mõned rakendused ei pruugi õigesti käituda.\n"
|
||||
|
||||
#: ../src/core/prefs.c:1296
|
||||
#: ../src/core/prefs.c:1302
|
||||
#, c-format
|
||||
msgid "Could not parse font description \"%s\" from GConf key %s\n"
|
||||
msgstr "Fondi kirjeldust \"%s\" GConf võtmest %s ei saa töödelda\n"
|
||||
|
||||
#: ../src/core/prefs.c:1356
|
||||
#: ../src/core/prefs.c:1364
|
||||
#, c-format
|
||||
msgid "\"%s\" found in configuration database is not a valid value for mouse button modifier\n"
|
||||
msgstr "Seadistuste andmebaasist leitud \"%s\" ei ole sobiv väärtus hiireklahvi modifikaatoriks\n"
|
||||
|
||||
#: ../src/core/prefs.c:1771
|
||||
#: ../src/core/prefs.c:1782
|
||||
#, c-format
|
||||
msgid "Error setting number of workspaces to %d: %s\n"
|
||||
msgstr "Viga töölaudade arvuks %d määramisel: %s\n"
|
||||
|
||||
#: ../src/core/prefs.c:1960
|
||||
#: ../src/core/prefs.c:2463
|
||||
#: ../src/core/prefs.c:1971
|
||||
#: ../src/core/prefs.c:2474
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Tööala %d"
|
||||
|
||||
#: ../src/core/prefs.c:1990
|
||||
#: ../src/core/prefs.c:2168
|
||||
#: ../src/core/prefs.c:2001
|
||||
#: ../src/core/prefs.c:2179
|
||||
#, c-format
|
||||
msgid "\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n"
|
||||
msgstr "Seadistuste andmebaasist leitud \"%s\" ei ole sobiv väärtus kiirklahvile \"%s\"\n"
|
||||
|
||||
#: ../src/core/prefs.c:2544
|
||||
#: ../src/core/prefs.c:2555
|
||||
#, c-format
|
||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||
msgstr "Viga tööalale %d nime \"%s\" määramisel: %s\n"
|
||||
|
||||
#: ../src/core/prefs.c:2730
|
||||
#: ../src/core/prefs.c:2753
|
||||
#, c-format
|
||||
msgid "Error setting compositor status: %s\n"
|
||||
msgstr "Viga komposiitmonteerija oleku määramisel: %s\n"
|
||||
@@ -298,7 +298,7 @@ msgstr "Ekraani %d kuval \"%s\" ei saa vabastada\n"
|
||||
#. * are hardcoded (in gtk/gtkaccelgroup.c; it's not metacity's fault).
|
||||
#. * "disabled" must also stay as it is.
|
||||
#.
|
||||
#: ../src/core/schema-bindings.c:165
|
||||
#: ../src/core/schema-bindings.c:169
|
||||
msgid ""
|
||||
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||
"\n"
|
||||
@@ -308,7 +308,7 @@ msgstr ""
|
||||
"\n"
|
||||
"Parser on vormingu suhtes üpris leplik ja lubab läbisegi nii suur- kui väiketähti, samuti ka lühendeid nagu \"<Ctl>\" ja \"<Ctrl>\". Kui väärtuseks määrata eristring \"disabled\", siis on selle toimingu jaoks klahvikombinatsioon keelatud."
|
||||
|
||||
#: ../src/core/schema-bindings.c:173
|
||||
#: ../src/core/schema-bindings.c:177
|
||||
msgid ""
|
||||
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||
"\n"
|
||||
@@ -429,7 +429,7 @@ msgid "Metacity"
|
||||
msgstr "Metacity"
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:5743
|
||||
#: ../src/core/window.c:5626
|
||||
#, c-format
|
||||
msgid "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"
|
||||
msgstr "Aken %s määrab SM_CLIENT_ID endale, selle asemel et määrata see WM_CLIENT_LEADER aknale nagu seda kirjeldab ICCCM.\n"
|
||||
@@ -441,22 +441,22 @@ msgstr "Aken %s määrab SM_CLIENT_ID endale, selle asemel et määrata see WM_
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:6308
|
||||
#: ../src/core/window.c:6191
|
||||
#, c-format
|
||||
msgid "Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"
|
||||
msgstr "Aken %s määrab MWM vihje, näidates, et see pole muudetava suurusega, aga määrab vähimaks suuruseks %d x %d ja suurimaks suuruseks %d x %d; sel pole tähendust.\n"
|
||||
|
||||
#: ../src/core/window-props.c:206
|
||||
#: ../src/core/window-props.c:260
|
||||
#, c-format
|
||||
msgid "Application set a bogus _NET_WM_PID %lu\n"
|
||||
msgstr "Rakendus määras võltsitud _NET_WM_PID %lu\n"
|
||||
|
||||
#: ../src/core/window-props.c:338
|
||||
#: ../src/core/window-props.c:377
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (masinas %s)"
|
||||
|
||||
#: ../src/core/window-props.c:1422
|
||||
#: ../src/core/window-props.c:1358
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "Vigane WM_TRANSIENT_FOR aknale 0x%lx määratud %s jaoks.\n"
|
||||
@@ -599,7 +599,8 @@ msgid "Move backward between panels and the desktop immediately"
|
||||
msgstr "Liigu koheselt tagasisuunas paneelide ja töölaua vahel"
|
||||
|
||||
#: ../src/include/all-keybindings.h:191
|
||||
msgid "Hide all normal windows and set focus to the desktop background"
|
||||
#| msgid "Hide all normal windows and set focus to the desktop background"
|
||||
msgid "Hide all normal windows and set focus to the desktop"
|
||||
msgstr "Peida kõik tavalised aknad ja fokuseeri töölaud"
|
||||
|
||||
#: ../src/include/all-keybindings.h:194
|
||||
@@ -823,8 +824,13 @@ msgid "Automatically raises the focused window"
|
||||
msgstr "Automaatselt tõstab fookuses oleva akna"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:9
|
||||
msgid "Clicking a window while holding down this modifier key will move the window (left click), resize the window (middle click), or show the window menu (right click). Modifier is expressed as \"<Alt>\" or \"<Super>\" for example."
|
||||
msgstr "Modifikaatorklahvi all hoides aknale klõpsates saab akent nihutada (vasakklõps), muuta suurust (keskklahvi klõps) või kuvada akna menüüd (paremklõps). Modifikaatorit väljendatakse näiteks kui \"<Alt>\" või \"<Super>\"."
|
||||
#| msgid ""
|
||||
#| "Clicking a window while holding down this modifier key will move the "
|
||||
#| "window (left click), resize the window (middle click), or show the window "
|
||||
#| "menu (right click). Modifier is expressed as \"<Alt>\" or \"<"
|
||||
#| "Super>\" for example."
|
||||
msgid "Clicking a window while holding down this modifier key will move the window (left click), resize the window (middle click), or show the window menu (right click). The left and right operations may be swapped using the \"mouse_button_resize\" key. Modifier is expressed as \"<Alt>\" or \"<Super>\" for example."
|
||||
msgstr "Modifikaatorklahvi all hoides aknale klõpsates saab akent nihutada (vasakklõps), muuta suurust (keskklahvi klõps) või kuvada akna menüüd (paremklõps). Vasak- ja paremklahvi tegevusi saab vahetada võtme \"mouse_button_resize\" abil. Modifikaatorit väljendatakse näiteks kui \"<Alt>\" või \"<Super>\"."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:10
|
||||
msgid "Commands to run in response to keybindings"
|
||||
@@ -903,98 +909,106 @@ msgid "Run a defined command"
|
||||
msgstr "Käivita defineeritud käsk"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:29
|
||||
msgid "Set this to true to resize with the right button and show a menu with the middle button while holding down the key given in \"mouse_button_modifier\"; set it to false to make it work the opposite way around."
|
||||
msgstr "Kui märgitud, muudab paremklahv suurust ja keskklahvi vajutamisel, kui all hoitakse \"mouse_button_modifier\" võtme määratud klahvi, näitab menüüd; kui mitte märkida, toimib see vastupidi."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:30
|
||||
msgid "Setting this option to false can lead to buggy behavior, so users are strongly discouraged from changing it from the default of true. Many actions (e.g. clicking in the client area, moving or resizing the window) normally raise the window as a side-effect. Setting this option to false, which is strongly discouraged, will decouple raising from other user actions, and ignore raise requests generated by applications. See http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6. Even when this option is false, windows can still be raised by an alt-left-click anywhere on the window, a normal click on the window decorations, or by special messages from pagers, such as activation requests from tasklist applets. This option is currently disabled in click-to-focus mode. Note that the list of ways to raise windows when raise_on_click is false does not include programmatic requests from applications to raise windows; such requests will be ignored regardless of the reason for the request. If you are an application developer and have a user complaining that your application does not work with this setting disabled, tell them it is _their_ fault for breaking their window manager and that they need to change this option back to true or live with the \"bug\" they requested."
|
||||
msgstr "Selle valiku väärtuseks false määramine võib põhjustada vigast käitumist, nii on selle vaikimisi väärtuse true muutmine rangelt mittesoovitatav. Paljud tegevused (nt kliendialal klõpsamine, akna liigutamine või suuruse muutmine) tõstavad kõrvaltoimena akna. Selle väärtuseks false määramine, mis on rangelt mittesoovitatav, keelab akna tõstmise teiste kasutaja tegevuste peale ja ignoreerib rakenduste tõstmispäringuid. Vaata http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6. Isegi kui selle valiku väärtus on false, saab aknaid tõsta tehes alt+vasakklõps suvalises kohas aknal, hariliku klõpsamisega aknaääristel või eriteadetega lehesüsteemidelt, nagu aktiveerimispäringud rakenduste nimekirja rakendilt. See valik on praegu keelatud fokuseerimiseks-klõpsa režiimis. Akende tõstmise päringuid rakenduse seest eiratakse sõltumata päringu põhjusest. Kui sa oled arendaja ja mõni kasutaja kurdab, et rakendused ei tööta, kui see säte on keelatud, siis ütle neile, et see on _nende_ viga, et nad rikkusid aknahalduri ja neil tuleb selle valiku väärtuseks määrata uuesti \"true\" võib elada \"veaga\", mille nad ise põhjustasid."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:30
|
||||
#: ../src/metacity.schemas.in.in.h:31
|
||||
msgid "Some applications disregard specifications in ways that result in window manager misfeatures. This option puts Metacity in a rigorously correct mode, which gives a more consistent user interface, provided one does not need to run any misbehaving applications."
|
||||
msgstr "Mõned rakendused eiravad spetsifikatsiooni nii et see avaldub aknahalduri valekäitumises. See valik seab Metacity rangelt korrektsesse režiimi, mis annab ühtlasema kasutajakeskkonna, kui valestikäituvaid rakendusi pole vaja."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:31
|
||||
#: ../src/metacity.schemas.in.in.h:32
|
||||
msgid "System Bell is Audible"
|
||||
msgstr "Süsteemipiiks on kuuldav"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:32
|
||||
#: ../src/metacity.schemas.in.in.h:33
|
||||
msgid "Tells Metacity how to implement the visual indication that the system bell or another application 'bell' indicator has been rung. Currently there are two valid values, \"fullscreen\", which causes a fullscreen white-black flash, and \"frame_flash\" which causes the titlebar of the application which sent the bell signal to flash. If the application which sent the bell is unknown (as is usually the case for the default \"system beep\"), the currently focused window's titlebar is flashed."
|
||||
msgstr "Teatab Metacityle, kuidas visuaalselt näidata, et süsteemi või mõne muu rakenduse 'kell' helises. Praegu on sellel kaks võimalikku väärtust, \"fullscreen\", mis teeb täisekraani must-valge välgatuse, ja \"frame_flash\", mis paneb signaali saatnud rakenduse tiitliriba vilkuma. Kui kella signaali saatnud rakendus on teadmata (nagu see tavaliselt vaikimisi \"süsteemipiiksul\" on), vilgutatakse parasjagu fokuseeritud akna tiitliriba."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:33
|
||||
#: ../src/metacity.schemas.in.in.h:34
|
||||
msgid "The /apps/metacity/global_keybindings/run_command_N keys define keybindings that correspond to these commands. Pressing the keybinding for run_command_N will execute command_N."
|
||||
msgstr "/apps/metacity/global_keybindings/run_command_N võtmed määravad klahvikombinatsioonid, mis nendele käskudele vastavad. Klahvikombinatsiooni run_command_N vajutamine käivitab käsu command_N."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:34
|
||||
#: ../src/metacity.schemas.in.in.h:35
|
||||
msgid "The /apps/metacity/global_keybindings/run_command_screenshot key defines a keybinding which causes the command specified by this setting to be invoked."
|
||||
msgstr "/apps/metacity/global_keybindings/run_command_screenshot määrab klahvikombinatsiooni, mis käivitab selle sättega määratud käsu."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:35
|
||||
#: ../src/metacity.schemas.in.in.h:36
|
||||
msgid "The /apps/metacity/global_keybindings/run_command_window_screenshot key defines a keybinding which causes the command specified by this setting to be invoked."
|
||||
msgstr "/apps/metacity/global_keybindings/run_command_window_screenshot võti määrab klahvikombinatsiooni, mis käivitab selle sättega määratud käsu."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:36
|
||||
#: ../src/metacity.schemas.in.in.h:37
|
||||
msgid "The keybinding that runs the correspondingly-numbered command in /apps/metacity/keybinding_commands The format looks like \"<Control>a\" or \"<Shift><Alt>F1\". The parser is fairly liberal and allows lower or upper case, and also abbreviations such as \"<Ctl>\" and \"<Ctrl>\". If you set the option to the special string \"disabled\", then there will be no keybinding for this action."
|
||||
msgstr "Vastava järjenumbriga käsu /apps/metacity/keybinding_commands käivitamise klahvikombinatsioon. Vorming on kujul \"<Control>a\" või \"<Shift><Alt>F1\". Parser on vormingu suhtes üpris leplik ja lubab läbisegi nii suur- kui väiketähti, samuti ka lühendeid nagu \"<Ctl>\" ja \"<Ctrl>\". Kui väärtuseks määrata eristring \"disabled\", siis on selle toimingu jaoks klahvikombinatsioon keelatud."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:37
|
||||
#: ../src/metacity.schemas.in.in.h:38
|
||||
msgid "The name of a workspace."
|
||||
msgstr "Tööala nimi."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:38
|
||||
#: ../src/metacity.schemas.in.in.h:39
|
||||
msgid "The screenshot command"
|
||||
msgstr "Ekraanitõmmise võtmise käsk"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:39
|
||||
#: ../src/metacity.schemas.in.in.h:40
|
||||
msgid "The theme determines the appearance of window borders, titlebar, and so forth."
|
||||
msgstr "Teema määrab aknaääriste, tiitliriba jm väljanägemise."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:40
|
||||
#: ../src/metacity.schemas.in.in.h:41
|
||||
msgid "The time delay before raising a window if auto_raise is set to true. The delay is given in thousandths of a second."
|
||||
msgstr "Viivitus millisekundites enne akna tõstmist, kui auto_raise on määratud tõeseks."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:41
|
||||
#: ../src/metacity.schemas.in.in.h:42
|
||||
msgid "The window focus mode indicates how windows are activated. It has three possible values; \"click\" means windows must be clicked in order to focus them, \"sloppy\" means windows are focused when the mouse enters the window, and \"mouse\" means windows are focused when the mouse enters the window and unfocused when the mouse leaves the window."
|
||||
msgstr "Akna fookuse režiim määrab kuidas aknaid aktiveeritakse. Sellel on kolm võimalikku väärtus; \"click\" tähendab et akna fokuseerimiseks tuleb sellel klõpsata, \"sloppy\" tähendab et aken fokuseeritakse, kui hiir siseneb aknasse ja \"mouse\" tähendab, et aken aktiveeritakse kui hiir siseneb aknasse ja deaktiveeritakse, kui hiir lahkub aknast."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:42
|
||||
#: ../src/metacity.schemas.in.in.h:43
|
||||
msgid "The window screenshot command"
|
||||
msgstr "Akna ekraanitõmmise käsk"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:43
|
||||
#: ../src/metacity.schemas.in.in.h:44
|
||||
msgid "This option determines the effects of double-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything."
|
||||
msgstr "See valik määrab tiitliriba topeltklõpsu toimingu. Praegu sobivad võimalused 'toggle_shade', mis akna kas varjutab või toob välja, 'toggle_maximize' mis maksimeerib/taastab akna, 'toggle_maximize_horizontally' ja 'toggle_maximize_vertically' mis maksimeerib/taastab suuruse ainult ühes suunas, 'minimize' mis minimeerib akna, 'shade' mis kerib akna ülse, 'menu' mis näitab akna menüüd, 'lower' mis saadab akna kõigi teiste taha ja 'none' mis ei tee midagi."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:44
|
||||
#: ../src/metacity.schemas.in.in.h:45
|
||||
msgid "This option determines the effects of middle-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything."
|
||||
msgstr "See valik määrab tiitliriba kesk-klõpsu toimingu. Praegu sobivad võimalused 'toggle_shade', mis akna kas varjutab või toob välja, 'toggle_maximize' mis maksimeerib/taastab akna, 'toggle_maximize_horizontally' ja 'toggle_maximize_vertically' mis maksimeerib/taastab suuruse ainult ühes suunas, 'minimize' mis minimeerib akna, 'shade' mis kerib akna ülse, 'menu' mis näitab akna menüüd, 'lower' mis saadab akna kõigi teiste taha ja 'none' mis ei tee midagi."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:45
|
||||
#: ../src/metacity.schemas.in.in.h:46
|
||||
msgid "This option determines the effects of right-clicking on the title bar. Current valid options are 'toggle_shade', which will shade/unshade the window, 'toggle_maximize' which will maximize/unmaximize the window, 'toggle_maximize_horizontally' and 'toggle_maximize_vertically' which will maximize/unmaximize the window in that direction only, 'minimize' which will minimize the window, 'shade' which will roll the window up, 'menu' which will display the window menu, 'lower' which will put the window behind all the others, and 'none' which will not do anything."
|
||||
msgstr "See valik määrab tiitliriba paremklõpsu toimingu. Praegu sobivad võimalused 'toggle_shade', mis akna kas varjutab või toob välja, 'toggle_maximize' mis maksimeerib/taastab akna, 'toggle_maximize_horizontally' ja 'toggle_maximize_vertically' mis maksimeerib/taastab suuruse ainult ühes suunas, 'minimize' mis minimeerib akna, 'shade' mis kerib akna ülse, 'menu' mis näitab akna menüüd, 'lower' mis saadab akna kõigi teiste taha ja 'none' mis ei tee midagi."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:46
|
||||
#: ../src/metacity.schemas.in.in.h:47
|
||||
msgid "This option provides additional control over how newly created windows get focus. It has two possible values; \"smart\" applies the user's normal focus mode, and \"strict\" results in windows started from a terminal not being given focus."
|
||||
msgstr "See valik võimaldab lisakontrolli uute akende fookuse haaramisele. Sellel on kaks võimalikku väärtust; \"smart\" rakendab kasutaja tavalisi fokuseerimise sätteid ja \"strict\" määrab, et terminalist käivitatud aknaid ei fookuseerita."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:47
|
||||
#: ../src/metacity.schemas.in.in.h:48
|
||||
msgid "Turns on a visual indication when an application or the system issues a 'bell' or 'beep'; useful for the hard-of-hearing and for use in noisy environments."
|
||||
msgstr "Lülitab sisse visuaalse süsteemi piiksu näitaja; on kasulik lärmakas keskkonnas."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:48
|
||||
#: ../src/metacity.schemas.in.in.h:49
|
||||
msgid "Use standard system font in window titles"
|
||||
msgstr "Kasuta standardset süsteemifonti akende tiitlites"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:49
|
||||
#: ../src/metacity.schemas.in.in.h:50
|
||||
msgid "Visual Bell Type"
|
||||
msgstr "Visuaalpiiksu tüüp"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:50
|
||||
#: ../src/metacity.schemas.in.in.h:51
|
||||
msgid "Whether raising should be a side-effect of other user interactions"
|
||||
msgstr "Kas akna tõstmine peaks kaasnema kasutaja teiste tegevustega"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:51
|
||||
#: ../src/metacity.schemas.in.in.h:52
|
||||
msgid "Whether to resize with the right button"
|
||||
msgstr "Paremklahv muudab suurust"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:53
|
||||
msgid "Window focus mode"
|
||||
msgstr "Aknafookuse režiim"
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:52
|
||||
#: ../src/metacity.schemas.in.in.h:54
|
||||
msgid "Window title font"
|
||||
msgstr "Akna pealkirja kirjatüüp"
|
||||
|
||||
@@ -1003,47 +1017,47 @@ msgstr "Akna pealkirja kirjatüüp"
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "Kasutamine: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1077
|
||||
#: ../src/ui/frames.c:1118
|
||||
msgid "Close Window"
|
||||
msgstr "Sulge aken"
|
||||
|
||||
#: ../src/ui/frames.c:1080
|
||||
#: ../src/ui/frames.c:1121
|
||||
msgid "Window Menu"
|
||||
msgstr "Aknamenüü"
|
||||
|
||||
#: ../src/ui/frames.c:1083
|
||||
#: ../src/ui/frames.c:1124
|
||||
msgid "Minimize Window"
|
||||
msgstr "Akna minimeerimine"
|
||||
|
||||
#: ../src/ui/frames.c:1086
|
||||
#: ../src/ui/frames.c:1127
|
||||
msgid "Maximize Window"
|
||||
msgstr "Akna maksimeerimine"
|
||||
|
||||
#: ../src/ui/frames.c:1089
|
||||
#: ../src/ui/frames.c:1130
|
||||
msgid "Restore Window"
|
||||
msgstr "Akna taastamine"
|
||||
|
||||
#: ../src/ui/frames.c:1092
|
||||
#: ../src/ui/frames.c:1133
|
||||
msgid "Roll Up Window"
|
||||
msgstr "Akna kokkukerimine"
|
||||
|
||||
#: ../src/ui/frames.c:1095
|
||||
#: ../src/ui/frames.c:1136
|
||||
msgid "Unroll Window"
|
||||
msgstr "Akna lahtikerimine"
|
||||
|
||||
#: ../src/ui/frames.c:1098
|
||||
#: ../src/ui/frames.c:1139
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "Akna kõige pealmiseks määramine"
|
||||
|
||||
#: ../src/ui/frames.c:1101
|
||||
#: ../src/ui/frames.c:1142
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "Eemalda aken kõige pealmise kohalt"
|
||||
|
||||
#: ../src/ui/frames.c:1104
|
||||
#: ../src/ui/frames.c:1145
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "Alati nähtaval tööalal"
|
||||
|
||||
#: ../src/ui/frames.c:1107
|
||||
#: ../src/ui/frames.c:1148
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "Tõsta aken ainult ühele tööalale"
|
||||
|
||||
@@ -1471,46 +1485,46 @@ msgstr "Tundub, et koordinaatide avaldis ei sisalda ei operaatoreid ega operande
|
||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||
msgstr "Teema sisaldas avaldist, mis põhjustas vea: %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:4155
|
||||
#: ../src/ui/theme.c:4187
|
||||
#, c-format
|
||||
msgid "<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be specified for this frame style"
|
||||
msgstr "<button function=\"%s\" state=\"%s\" draw_ops=\"misiganes\"/> peab selles raamistiilis olema määratud"
|
||||
|
||||
#: ../src/ui/theme.c:4635
|
||||
#: ../src/ui/theme.c:4660
|
||||
#: ../src/ui/theme.c:4695
|
||||
#: ../src/ui/theme.c:4720
|
||||
#, c-format
|
||||
msgid "Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||
msgstr "Puuduv <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"misiganes\"/>"
|
||||
|
||||
#: ../src/ui/theme.c:4704
|
||||
#: ../src/ui/theme.c:4764
|
||||
#, c-format
|
||||
msgid "Failed to load theme \"%s\": %s\n"
|
||||
msgstr "Tõrge teema \"%s\" laadimisel: %s\n"
|
||||
|
||||
#: ../src/ui/theme.c:4834
|
||||
#: ../src/ui/theme.c:4841
|
||||
#: ../src/ui/theme.c:4848
|
||||
#: ../src/ui/theme.c:4855
|
||||
#: ../src/ui/theme.c:4862
|
||||
#: ../src/ui/theme.c:4894
|
||||
#: ../src/ui/theme.c:4901
|
||||
#: ../src/ui/theme.c:4908
|
||||
#: ../src/ui/theme.c:4915
|
||||
#: ../src/ui/theme.c:4922
|
||||
#, c-format
|
||||
msgid "No <%s> set for theme \"%s\""
|
||||
msgstr "Teemas \"%s2\" pole määratud ühtki <%s1>"
|
||||
|
||||
#: ../src/ui/theme.c:4870
|
||||
#: ../src/ui/theme.c:4930
|
||||
#, c-format
|
||||
msgid "No frame style set for window type \"%s\" in theme \"%s\", add a <window type=\"%s\" style_set=\"whatever\"/> element"
|
||||
msgstr "Teemas \"%s2\" pole \"%s1\" tüüpi aknale määratud raamistiili, lisa <window type=\"%s3\" style_set=\"misiganes\"/> element"
|
||||
|
||||
#: ../src/ui/theme.c:5237
|
||||
#: ../src/ui/theme.c:5299
|
||||
#: ../src/ui/theme.c:5362
|
||||
#: ../src/ui/theme.c:5383
|
||||
#: ../src/ui/theme.c:5445
|
||||
#: ../src/ui/theme.c:5508
|
||||
#, c-format
|
||||
msgid "User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||
msgstr "Kasutajadefineeritud konstandid peavad algama suurtähega; \"%s\" ei alga"
|
||||
|
||||
#: ../src/ui/theme.c:5245
|
||||
#: ../src/ui/theme.c:5307
|
||||
#: ../src/ui/theme.c:5370
|
||||
#: ../src/ui/theme.c:5391
|
||||
#: ../src/ui/theme.c:5453
|
||||
#: ../src/ui/theme.c:5516
|
||||
#, c-format
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "Konstant \"%s\" on juba kirjeldatud"
|
||||
|
67
po/ko.po
67
po/ko.po
@@ -2,12 +2,15 @@
|
||||
# Young-Ho, Cha <ganadist@chollian.net>, 2002, 2006.
|
||||
# Changwoo Ryu <cwryu@debian.org>, 2003, 2004, 2005, 2006, 2007, 2008, 2009.
|
||||
#
|
||||
# 주의:
|
||||
# - 이 프로그램의 이름인 Metacity는 "메타시티"로 음역.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2009-01-29 16:40+0900\n"
|
||||
"PO-Revision-Date: 2009-01-29 19:01+0900\n"
|
||||
"POT-Creation-Date: 2009-02-18 09:15+0900\n"
|
||||
"PO-Revision-Date: 2009-02-18 09:16+0900\n"
|
||||
"Last-Translator: Changwoo Ryu <cwryu@debian.org>\n"
|
||||
"Language-Team: GNOME Korea <gnome-kr-hackers@lists.kldp.net>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -306,7 +309,7 @@ msgstr "디스플레이 \"%2$s\"의 화면 %1$d을(를) 떼어 놓을수 없습
|
||||
#. * are hardcoded (in gtk/gtkaccelgroup.c; it's not metacity's fault).
|
||||
#. * "disabled" must also stay as it is.
|
||||
#.
|
||||
#: ../src/core/schema-bindings.c:165
|
||||
#: ../src/core/schema-bindings.c:169
|
||||
msgid ""
|
||||
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||
"\n"
|
||||
@@ -317,9 +320,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"\"<Control>\" 혹은 \"<Shift><Alt>F1\"과 같이 씁니다.\n"
|
||||
"\n"
|
||||
"파서는 매우 유연하므로 대소문자를 모두 쓸 수 있고, \"<Ctl>\"나 \"<Ctrl>\"처럼 줄여서 쓸 수도 있습니다. 이 옵션을 \"disabled\" 스트링으로 하면, 이 동작에 대한 키바인딩은 없습니다."
|
||||
"파서는 매우 유연하므로 대소문자를 모두 쓸 수 있고, \"<Ctl>\"나 \"<Ctrl>\"처"
|
||||
"럼 줄여서 쓸 수도 있습니다. 이 옵션을 \"disabled\" 스트링으로 하면, 이 동작"
|
||||
"에 대한 키바인딩은 없습니다."
|
||||
|
||||
#: ../src/core/schema-bindings.c:173
|
||||
#: ../src/core/schema-bindings.c:177
|
||||
msgid ""
|
||||
"The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
|
||||
"\n"
|
||||
@@ -333,9 +338,12 @@ msgid ""
|
||||
msgstr ""
|
||||
"\"<Control>\" 혹은 \"<Shift><Alt>F1\"과 같이 씁니다.\n"
|
||||
"\n"
|
||||
"파서는 매우 유연하므로 대소문자를 모두 쓸 수 있고, \"<Ctl>\"나 \"<Ctrl>\"처럼 줄여서 쓸 수도 있습니다. 이 옵션을 \"disabled\" 스트링으로 하면, 이 동작에 대한 키바인딩은 없습니다.\n"
|
||||
"파서는 매우 유연하므로 대소문자를 모두 쓸 수 있고, \"<Ctl>\"나 \"<Ctrl>\"처"
|
||||
"럼 줄여서 쓸 수도 있습니다. 이 옵션을 \"disabled\" 스트링으로 하면, 이 동작"
|
||||
"에 대한 키바인딩은 없습니다.\n"
|
||||
"\n"
|
||||
"\"Shift\" 키를 누른 상태에서 이 키바인딩을 누르면 반대 동작을 실행합니다. 그러므로 이 키바인딩 안에서는 \"Shift\"를 사용할 수 없습니다."
|
||||
"\"Shift\" 키를 누른 상태에서 이 키바인딩을 누르면 반대 동작을 실행합니다. 그"
|
||||
"러므로 이 키바인딩 안에서는 \"Shift\"를 사용할 수 없습니다."
|
||||
|
||||
#: ../src/core/session.c:837 ../src/core/session.c:844
|
||||
#, c-format
|
||||
@@ -468,18 +476,18 @@ msgstr ""
|
||||
"%s 창에서 크기 변경이 불가능하다는 MWM 힌트를 설정했지만, 최소 크기 %d x %d "
|
||||
"및 최대 크기 %d x %d(으)로 설정했습니다; 앞뒤가 맞지 않습니다.\n"
|
||||
|
||||
#: ../src/core/window-props.c:276
|
||||
#: ../src/core/window-props.c:260
|
||||
#, c-format
|
||||
msgid "Application set a bogus _NET_WM_PID %lu\n"
|
||||
msgstr "응용 프로그램이 가짜 _NET_WM_PID %lu을(를) 설정하였습니다\n"
|
||||
|
||||
# <창제목> (on <기계>)
|
||||
#: ../src/core/window-props.c:411
|
||||
#: ../src/core/window-props.c:377
|
||||
#, c-format
|
||||
msgid "%s (on %s)"
|
||||
msgstr "%s (%s에서)"
|
||||
|
||||
#: ../src/core/window-props.c:1523
|
||||
#: ../src/core/window-props.c:1358
|
||||
#, c-format
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "%2$s에 대해 WM_TRANSIENT_FOR 0x%1$lx 창이 잘못되었습니다.\n"
|
||||
@@ -625,7 +633,7 @@ msgid "Move backward between panels and the desktop immediately"
|
||||
msgstr "패널과 바탕 화면 사이에서 반대 방향으로 바로 전환"
|
||||
|
||||
#: ../src/include/all-keybindings.h:191
|
||||
msgid "Hide all normal windows and set focus to the desktop background"
|
||||
msgid "Hide all normal windows and set focus to the desktop"
|
||||
msgstr "모든 창을 숨기고 바탕 화면에 포커스"
|
||||
|
||||
#: ../src/include/all-keybindings.h:194
|
||||
@@ -875,7 +883,12 @@ msgid ""
|
||||
"(right click). The left and right operations may be swapped using the "
|
||||
"\"mouse_button_resize\" key. Modifier is expressed as \"<Alt>\" or "
|
||||
"\"<Super>\" for example."
|
||||
msgstr "이 변경 키를 누른 채로 창을 누르면 창을 옮기거나 (왼쪽 단추 누르기), 창의 크기를 바꾸거나 (가운데 단추 누르기), 혹은 창 메뉴를 보여줍니다 (오른쪽 단추 누르기). 왼쪽 단추와 오른쪽 단추의 동작은 \"mouse_button_resize\" 키를 사용해 뒤바꿀 수 있습니다. 변경 키는 \"<Alt>\" 혹은 \"<Super>\"와 같이 씁니다."
|
||||
msgstr ""
|
||||
"이 변경 키를 누른 채로 창을 누르면 창을 옮기거나 (왼쪽 단추 누르기), 창의 크"
|
||||
"기를 바꾸거나 (가운데 단추 누르기), 혹은 창 메뉴를 보여줍니다 (오른쪽 단추 누"
|
||||
"르기). 왼쪽 단추와 오른쪽 단추의 동작은 \"mouse_button_resize\" 키를 사용해 "
|
||||
"뒤바꿀 수 있습니다. 변경 키는 \"<Alt>\" 혹은 \"<Super>\"와 같이 "
|
||||
"씁니다."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:10
|
||||
msgid "Commands to run in response to keybindings"
|
||||
@@ -1002,7 +1015,10 @@ msgid ""
|
||||
"Set this to true to resize with the right button and show a menu with the "
|
||||
"middle button while holding down the key given in \"mouse_button_modifier\"; "
|
||||
"set it to false to make it work the opposite way around."
|
||||
msgstr "이 값이 참이면 마우스 오른쪽 단추로 크기를 조절하고, \"mouse_button_modifier\"에서 지정한 키를 누른 상태에서 마우스 가운데 단추를 누르면 메뉴를 표시합니다. 이 값을 거짓으로 하면 반대로 동작합니다."
|
||||
msgstr ""
|
||||
"이 값이 참이면 마우스 오른쪽 단추로 크기를 조절하고, \"mouse_button_modifier"
|
||||
"\"에서 지정한 키를 누른 상태에서 마우스 가운데 단추를 누르면 메뉴를 표시합니"
|
||||
"다. 이 값을 거짓으로 하면 반대로 동작합니다."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:30
|
||||
msgid ""
|
||||
@@ -1024,7 +1040,22 @@ msgid ""
|
||||
"disabled, tell them it is _their_ fault for breaking their window manager "
|
||||
"and that they need to change this option back to true or live with the \"bug"
|
||||
"\" they requested."
|
||||
msgstr "이 옵션을 거짓으로 설정하면 동작 방식이 문제가 있으므로, 기본값인 참을 바꾸지 않기를 권합니다. 여러가지 동작은 (클라이언트 영역에 마우스 단추 누르기, 창 옮기기, 창 크기 조절 등) 부가적으로 창을 위로 올리게 됩니다. 이 옵션을 거짓으로 하면 창을 위로 올리는 동작을 다른 동작과 연관시키지 않게 되어, 애플리케이션에서 보낸 창을 위로 올리는 요청을 무시하게 됩니다. http://bugzilla.gnome.org/show_bug.cgi?id=445447#c6 페이지를 참고하십시오. 이 옵션이 거짓인 경우에도 창에 Alt와 마우스 왼쪽 단추를 누르거나, 창의 꾸밈 부분을 누르거나, 작업 목록 애플릿에서 요청하는 것처럼 특별한 메시지를 받은 경우에는 창을 올릴 수 있습니다. 이 옵션은 누르면 포커스를 옮기는 모드에서는 사용하지 않습니다. raise_on_click이 거짓인 경우에 창을 올리는 여러가지 방법 중에 프로그램에서 창을 올리라고 요청하는 프로그래밍 방법은 여기에 들어 있지 않습니다. 그러한 요청은 이유를 막론하고 모두 무시합니다. 프로그램 개발자이고 이 설정을 거짓으로 한 상태로 프로그램의 이상 동작에 대해 문제가 있다고 말하는 사용자가 있다면, 그것은 그 사용자의 설정 문제이고 이 옵션을 참으로 되돌리거나 아니면 그 \"버그\"를 안고 살아가야 한다고 말하십시오."
|
||||
msgstr ""
|
||||
"이 옵션을 거짓으로 설정하면 동작 방식이 문제가 있으므로, 기본값인 참을 바꾸"
|
||||
"지 않기를 권합니다. 여러가지 동작은 (클라이언트 영역에 마우스 단추 누르기, "
|
||||
"창 옮기기, 창 크기 조절 등) 부가적으로 창을 위로 올리게 됩니다. 이 옵션을 거"
|
||||
"짓으로 하면 창을 위로 올리는 동작을 다른 동작과 연관시키지 않게 되어, 애플리"
|
||||
"케이션에서 보낸 창을 위로 올리는 요청을 무시하게 됩니다. http://bugzilla."
|
||||
"gnome.org/show_bug.cgi?id=445447#c6 페이지를 참고하십시오. 이 옵션이 거짓인 "
|
||||
"경우에도 창에 Alt와 마우스 왼쪽 단추를 누르거나, 창의 꾸밈 부분을 누르거나, "
|
||||
"작업 목록 애플릿에서 요청하는 것처럼 특별한 메시지를 받은 경우에는 창을 올릴 "
|
||||
"수 있습니다. 이 옵션은 누르면 포커스를 옮기는 모드에서는 사용하지 않습니다. "
|
||||
"raise_on_click이 거짓인 경우에 창을 올리는 여러가지 방법 중에 프로그램에서 창"
|
||||
"을 올리라고 요청하는 프로그래밍 방법은 여기에 들어 있지 않습니다. 그러한 요청"
|
||||
"은 이유를 막론하고 모두 무시합니다. 프로그램 개발자이고 이 설정을 거짓으로 "
|
||||
"한 상태로 프로그램의 이상 동작에 대해 문제가 있다고 말하는 사용자가 있다면, "
|
||||
"그것은 그 사용자의 설정 문제이고 이 옵션을 참으로 되돌리거나 아니면 그 \"버그"
|
||||
"\"를 안고 살아가야 한다고 말하십시오."
|
||||
|
||||
#: ../src/metacity.schemas.in.in.h:31
|
||||
msgid ""
|
||||
@@ -1775,7 +1806,9 @@ msgstr "테마 \"%2$s\"의 <%1$s>(이)가 설정되지 않았습니다"
|
||||
msgid ""
|
||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||
"type=\"%s\" style_set=\"whatever\"/> element"
|
||||
msgstr "테마 \"%2$s\"의 창 형식 \"%1$s\"에 대한 프레임 스타일이 없습니다,<window type=\"%3$s\" style_set=\"whatever\"/> 요소를 추가하십시오"
|
||||
msgstr ""
|
||||
"테마 \"%2$s\"의 창 형식 \"%1$s\"에 대한 프레임 스타일이 없습니다,<window "
|
||||
"type=\"%3$s\" style_set=\"whatever\"/> 요소를 추가하십시오"
|
||||
|
||||
#: ../src/ui/theme.c:5383 ../src/ui/theme.c:5445 ../src/ui/theme.c:5508
|
||||
#, c-format
|
||||
@@ -1908,7 +1941,9 @@ msgstr "요소 <%s>이(가) <%s>아래에 허용되지 않습니다"
|
||||
msgid ""
|
||||
"Cannot specify both \"button_width\"/\"button_height\" and \"aspect_ratio\" "
|
||||
"for buttons"
|
||||
msgstr "단추의 button_width/button_height 와 \"aspect_ratio\"를 한꺼번에 지정할 수 없습니다"
|
||||
msgstr ""
|
||||
"단추의 button_width/button_height 와 \"aspect_ratio\"를 한꺼번에 지정할 수 없"
|
||||
"습니다"
|
||||
|
||||
#: ../src/ui/theme-parser.c:1366
|
||||
#, c-format
|
||||
|
4
po/nn.po
4
po/nn.po
@@ -8,7 +8,7 @@ msgstr ""
|
||||
"Project-Id-Version: nn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2008-04-04 13:50+0200\n"
|
||||
"PO-Revision-Date: 2008-04-04 13:59+0200\n"
|
||||
"PO-Revision-Date: 2009-06-16 09:54-0400\n"
|
||||
"Last-Translator: Eskild Hustvedt <eskildh@gnome.org>\n"
|
||||
"Language-Team: Norwegian Nynorsk <i18n-no@lister.ping.uio.no>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -2300,7 +2300,7 @@ msgstr "_Lukk"
|
||||
#: ../src/ui/menu.c:203
|
||||
#, c-format
|
||||
msgid "Workspace %d%n"
|
||||
msgstr "Arbeidsflate %d"
|
||||
msgstr "Arbeidsflate %d%n"
|
||||
|
||||
#: ../src/ui/menu.c:213
|
||||
#, c-format
|
||||
|
2160
po/pt_BR.po
2160
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
5802
po/sr@latin.po
5802
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
2028
po/zh_CN.po
2028
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
3825
po/zh_HK.po
3825
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
4225
po/zh_TW.po
4225
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<KeyListEntries _name="Desktop" wm_name="Metacity" package="metacity">
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/panel_run_dialog" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/panel_main_menu" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/run_command_screenshot" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/run_command_window_screenshot" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/run_command_terminal" />
|
||||
|
||||
</KeyListEntries>
|
||||
|
@@ -1,269 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<KeyListEntries _name="Window Management" wm_name="Metacity" package="metacity">
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/activate_window_menu" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_fullscreen" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_maximized" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/maximize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/unmaximize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_shaded" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/close" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/minimize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/begin_move" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/begin_resize" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/toggle_on_all_workspaces"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/raise_or_lower" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/raise" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/lower" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/maximize_vertically" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/maximize_horizontally" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_1"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_2"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_3"
|
||||
value="2"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_4"
|
||||
value="3"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_5"
|
||||
value="4"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_6"
|
||||
value="5"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_7"
|
||||
value="6"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_8"
|
||||
value="7"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_9"
|
||||
value="8"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_10"
|
||||
value="9"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_11"
|
||||
value="10"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_12"
|
||||
value="11"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_left"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_right"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_up"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/window_keybindings/move_to_workspace_down"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_windows" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_group" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_panels" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/cycle_windows" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/cycle_group" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/cycle_panels" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/show_desktop" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_1"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_2"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_3"
|
||||
value="2"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_4"
|
||||
value="3"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_5"
|
||||
value="4"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_6"
|
||||
value="5"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_7"
|
||||
value="6"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_8"
|
||||
value="7"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_9"
|
||||
value="8"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_10"
|
||||
value="9"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_11"
|
||||
value="10"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_12"
|
||||
value="11"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_left"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_right"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_up"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
<KeyListEntry
|
||||
name="/apps/metacity/global_keybindings/switch_to_workspace_down"
|
||||
value="1"
|
||||
key="/apps/metacity/general/num_workspaces"
|
||||
comparison="gt" />
|
||||
|
||||
</KeyListEntries>
|
||||
|
263
src/Makefile.am
263
src/Makefile.am
@@ -1,25 +1,56 @@
|
||||
lib_LTLIBRARIES = libmetacity-private.la
|
||||
# Flag build for parallelism; see https://savannah.gnu.org/patch/?6905
|
||||
.AUTOPARALLEL:
|
||||
|
||||
SUBDIRS=wm-tester tools themes
|
||||
lib_LTLIBRARIES = libmutter-private.la
|
||||
|
||||
if WITH_CLUTTER
|
||||
SUBDIRS += compositor/mutter/plugins
|
||||
endif
|
||||
SUBDIRS=wm-tester tools compositor/plugins
|
||||
|
||||
INCLUDES=@METACITY_CFLAGS@ -I $(srcdir)/include -I$(srcdir)/compositor -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 -DMETACITY_MAJOR_VERSION=$(METACITY_MAJOR_VERSION) -DMETACITY_MINOR_VERSION=$(METACITY_MINOR_VERSION) -DMETACITY_MICRO_VERSION=$(METACITY_MICRO_VERSION) -DMETACITY_CLUTTER_PLUGIN_API_VERSION=$(METACITY_CLUTTER_PLUGIN_API_VERSION) -DMETACITY_PKGLIBDIR=\"$(pkglibdir)\" -DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\"
|
||||
INCLUDES=@MUTTER_CFLAGS@ -I $(srcdir)/include -I$(srcdir)/compositor -DMUTTER_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMUTTER_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMUTTER_PKGDATADIR=\"$(pkgdatadir)\" -DMUTTER_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"mutter\" -DSN_API_NOT_YET_FROZEN=1 -DMUTTER_MAJOR_VERSION=$(MUTTER_MAJOR_VERSION) -DMUTTER_MINOR_VERSION=$(MUTTER_MINOR_VERSION) -DMUTTER_MICRO_VERSION=$(MUTTER_MICRO_VERSION) -DMUTTER_PLUGIN_API_VERSION=$(MUTTER_PLUGIN_API_VERSION) -DMUTTER_PKGLIBDIR=\"$(pkglibdir)\" -DMUTTER_PLUGIN_DIR=\"@MUTTER_PLUGIN_DIR@\"
|
||||
|
||||
metacity_SOURCES= \
|
||||
mutter_built_sources = \
|
||||
mutter-marshal.h \
|
||||
mutter-marshal.c \
|
||||
mutter-enum-types.h \
|
||||
mutter-enum-types.c
|
||||
|
||||
mutter_SOURCES= \
|
||||
core/async-getprop.c \
|
||||
core/async-getprop.h \
|
||||
core/bell.c \
|
||||
core/bell.h \
|
||||
core/boxes.c \
|
||||
core/boxes-private.h \
|
||||
include/boxes.h \
|
||||
compositor/cogl-utils.c \
|
||||
compositor/cogl-utils.h \
|
||||
compositor/compositor.c \
|
||||
compositor/compositor-private.h \
|
||||
compositor/compositor-xrender.c \
|
||||
compositor/compositor-xrender.h \
|
||||
compositor/meta-background-actor.c \
|
||||
compositor/meta-background-actor.h \
|
||||
compositor/meta-module.c \
|
||||
compositor/meta-module.h \
|
||||
compositor/meta-plugin.c \
|
||||
compositor/meta-plugin-manager.c \
|
||||
compositor/meta-plugin-manager.h \
|
||||
compositor/meta-shadow-factory.c \
|
||||
compositor/meta-shadow-factory-private.h \
|
||||
compositor/meta-shaped-texture.c \
|
||||
compositor/meta-shaped-texture.h \
|
||||
compositor/meta-texture-tower.c \
|
||||
compositor/meta-texture-tower.h \
|
||||
compositor/meta-window-actor.c \
|
||||
compositor/meta-window-actor-private.h \
|
||||
compositor/meta-window-group.c \
|
||||
compositor/meta-window-group.h \
|
||||
compositor/meta-window-shape.c \
|
||||
compositor/meta-window-shape.h \
|
||||
compositor/region-utils.c \
|
||||
compositor/region-utils.h \
|
||||
include/compositor.h \
|
||||
include/meta-plugin.h \
|
||||
include/meta-shadow-factory.h \
|
||||
include/meta-window-actor.h \
|
||||
include/compositor-mutter.h \
|
||||
core/constraints.c \
|
||||
core/constraints.h \
|
||||
core/core.c \
|
||||
@@ -31,8 +62,6 @@ metacity_SOURCES= \
|
||||
ui/draw-workspace.h \
|
||||
core/edge-resistance.c \
|
||||
core/edge-resistance.h \
|
||||
core/effects.c \
|
||||
core/effects.h \
|
||||
core/errors.c \
|
||||
include/errors.h \
|
||||
core/eventqueue.c \
|
||||
@@ -52,8 +81,7 @@ metacity_SOURCES= \
|
||||
core/keybindings.c \
|
||||
core/keybindings-private.h \
|
||||
core/main.c \
|
||||
include/main.h \
|
||||
core/metacity-Xatomtype.h \
|
||||
core/mutter-Xatomtype.h \
|
||||
core/place.c \
|
||||
core/place.h \
|
||||
core/prefs.c \
|
||||
@@ -66,6 +94,8 @@ metacity_SOURCES= \
|
||||
core/session.h \
|
||||
core/stack.c \
|
||||
core/stack.h \
|
||||
core/stack-tracker.c \
|
||||
core/stack-tracker.h \
|
||||
core/util.c \
|
||||
include/util.h \
|
||||
core/window-props.c \
|
||||
@@ -93,35 +123,20 @@ metacity_SOURCES= \
|
||||
include/resizepopup.h \
|
||||
ui/tabpopup.c \
|
||||
include/tabpopup.h \
|
||||
ui/tile-preview.c \
|
||||
include/tile-preview.h \
|
||||
ui/theme-parser.c \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.c \
|
||||
ui/theme.h \
|
||||
ui/themewidget.c \
|
||||
ui/themewidget.h \
|
||||
ui/theme-private.h \
|
||||
ui/ui.c \
|
||||
include/all-keybindings.h
|
||||
include/all-keybindings.h \
|
||||
$(mutter_built_sources)
|
||||
|
||||
if WITH_CLUTTER
|
||||
metacity_SOURCES += \
|
||||
compositor/mutter/compositor-mutter.c \
|
||||
compositor/mutter/mutter-shaped-texture.c \
|
||||
compositor/mutter/mutter-shaped-texture.h \
|
||||
compositor/mutter/mutter-plugin-manager.c \
|
||||
compositor/mutter/mutter-plugin-manager.h \
|
||||
compositor/mutter/tidy/tidy-texture-frame.c \
|
||||
compositor/mutter/tidy/tidy-texture-frame.h \
|
||||
compositor/mutter/mutter-module.c \
|
||||
compositor/mutter/mutter-module.h \
|
||||
compositor/mutter/mutter-plugin.c \
|
||||
include/mutter-plugin.h \
|
||||
include/compositor-mutter.h
|
||||
endif
|
||||
|
||||
# by setting libmetacity_private_la_CFLAGS, the files shared with
|
||||
# metacity proper will be compiled with different names.
|
||||
libmetacity_private_la_CFLAGS =
|
||||
libmetacity_private_la_SOURCES= \
|
||||
# by setting libmutter_private_la_CFLAGS, the files shared with
|
||||
# mutter proper will be compiled with different names.
|
||||
libmutter_private_la_CFLAGS =
|
||||
libmutter_private_la_SOURCES= \
|
||||
core/boxes.c \
|
||||
include/boxes.h \
|
||||
ui/gradient.c \
|
||||
@@ -132,92 +147,129 @@ libmetacity_private_la_SOURCES= \
|
||||
ui/preview-widget.c \
|
||||
ui/preview-widget.h \
|
||||
ui/theme-parser.c \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.c \
|
||||
ui/theme.h
|
||||
|
||||
libmetacity_private_la_LDFLAGS = -no-undefined
|
||||
libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
||||
libmutter_private_la_LDFLAGS = -no-undefined
|
||||
libmutter_private_la_LIBADD = @MUTTER_LIBS@
|
||||
|
||||
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
|
||||
|
||||
libmetacityinclude_HEADERS = \
|
||||
# Headers installed for plugins; introspected information will
|
||||
# be extracted into Mutter-<version>.gir
|
||||
libmutterinclude_base_headers = \
|
||||
include/boxes.h \
|
||||
ui/gradient.h \
|
||||
include/main.h \
|
||||
include/util.h \
|
||||
include/common.h \
|
||||
ui/preview-widget.h \
|
||||
ui/theme-parser.h \
|
||||
ui/theme.h \
|
||||
include/atomnames.h \
|
||||
include/prefs.h \
|
||||
include/window.h \
|
||||
include/workspace.h \
|
||||
include/compositor.h \
|
||||
include/compositor-mutter.h \
|
||||
include/types.h \
|
||||
include/errors.h \
|
||||
include/screen.h \
|
||||
include/display.h \
|
||||
include/group.h \
|
||||
include/keybindings.h \
|
||||
include/mutter-plugin.h
|
||||
include/meta-plugin.h \
|
||||
include/meta-shadow-factory.h \
|
||||
include/meta-window-actor.h
|
||||
|
||||
metacity_theme_viewer_SOURCES= \
|
||||
# Excluded from scanning for introspection but installed
|
||||
# preview-widget.h: only part of libmutter-private
|
||||
# atomnames.h: macros cause problems for scanning process
|
||||
libmutterinclude_extra_headers = \
|
||||
ui/preview-widget.h \
|
||||
include/atomnames.h
|
||||
|
||||
libmutterincludedir = $(includedir)/mutter/mutter-private
|
||||
|
||||
libmutterinclude_HEADERS = \
|
||||
$(libmutterinclude_base_headers) \
|
||||
$(libmutterinclude_extra_headers)
|
||||
|
||||
mutter_theme_viewer_SOURCES= \
|
||||
ui/theme-viewer.c
|
||||
|
||||
metacity_dialog_SOURCES= \
|
||||
ui/metacity-dialog.c
|
||||
bin_PROGRAMS=mutter mutter-theme-viewer
|
||||
|
||||
schema_bindings_SOURCES = \
|
||||
core/schema-bindings.c \
|
||||
metacity.schemas.in.in
|
||||
api_version = $(MUTTER_MAJOR_VERSION).$(MUTTER_MINOR_VERSION)
|
||||
|
||||
schema_bindings_LDADD = @METACITY_LIBS@
|
||||
metacity.schemas.in: schema_bindings ${srcdir}/metacity.schemas.in.in
|
||||
@echo Generating keybinding schemas... ${srcdir}/metacity.schemas.in.in
|
||||
${builddir}/schema_bindings ${srcdir}/metacity.schemas.in.in ${builddir}/metacity.schemas.in
|
||||
if WITH_INTROSPECTION
|
||||
# These files are in package-private directories, even though they may be used
|
||||
# by plugins. If you're writing a plugin, use g-ir-compiler --add-include-path
|
||||
# and g-ir-compiler --includedir.
|
||||
girdir = $(pkglibdir)
|
||||
gir_DATA = Meta-$(api_version).gir
|
||||
|
||||
bin_PROGRAMS=metacity metacity-theme-viewer
|
||||
libexec_PROGRAMS=metacity-dialog
|
||||
typelibdir = $(pkglibdir)
|
||||
typelib_DATA = Meta-$(api_version).typelib
|
||||
|
||||
# We need to strip out the attribute that would point back to libmutter-introspect
|
||||
# so that libgirepository looks for symbols in the executable instead
|
||||
Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mutter_SOURCES) Makefile
|
||||
$(AM_V_GEN) pwd=`pwd` ; \
|
||||
cd $(srcdir) && \
|
||||
$(G_IR_SCANNER) \
|
||||
--namespace=Meta \
|
||||
--nsversion=$(api_version) \
|
||||
--warn-all \
|
||||
--warn-error \
|
||||
--include=GObject-2.0 \
|
||||
--include=Gdk-3.0 \
|
||||
--include=Gtk-3.0 \
|
||||
--include=Clutter-1.0 \
|
||||
--pkg=clutter-1.0 \
|
||||
--pkg=gtk+-3.0 \
|
||||
--include=xlib-2.0 \
|
||||
--include=xfixes-4.0 \
|
||||
--program=$$pwd/mutter \
|
||||
mutter-enum-types.h \
|
||||
$(filter %.c,$(mutter_SOURCES)) \
|
||||
$(libmutterinclude_base_headers) \
|
||||
$(INCLUDES) \
|
||||
-o $$pwd/$@
|
||||
|
||||
Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir
|
||||
$(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
|
||||
endif
|
||||
|
||||
EFENCE=
|
||||
metacity_LDADD=@METACITY_LIBS@ $(EFENCE)
|
||||
metacity_LDFLAGS=-export-dynamic
|
||||
metacity_theme_viewer_LDADD= @METACITY_LIBS@ libmetacity-private.la
|
||||
metacity_dialog_LDADD=@METACITY_LIBS@
|
||||
mutter_LDADD=@MUTTER_LIBS@ $(EFENCE)
|
||||
mutter_LDFLAGS=-export-dynamic
|
||||
|
||||
mutter_theme_viewer_LDADD= @MUTTER_LIBS@ libmutter-private.la
|
||||
|
||||
testboxes_SOURCES=include/util.h core/util.c include/boxes.h core/boxes.c core/testboxes.c
|
||||
testgradient_SOURCES=ui/gradient.h ui/gradient.c ui/testgradient.c
|
||||
testasyncgetprop_SOURCES=core/async-getprop.h core/async-getprop.c core/testasyncgetprop.c
|
||||
|
||||
noinst_PROGRAMS=testboxes testgradient testasyncgetprop schema_bindings
|
||||
noinst_PROGRAMS=testboxes testgradient testasyncgetprop
|
||||
|
||||
testboxes_LDADD= @METACITY_LIBS@
|
||||
testgradient_LDADD= @METACITY_LIBS@
|
||||
testasyncgetprop_LDADD= @METACITY_LIBS@
|
||||
testboxes_LDADD= @MUTTER_LIBS@
|
||||
testgradient_LDADD= @MUTTER_LIBS@
|
||||
testasyncgetprop_LDADD= @MUTTER_LIBS@
|
||||
|
||||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
desktopfilesdir=$(datadir)/applications
|
||||
desktopfiles_in_files=metacity.desktop.in
|
||||
desktopfiles_in_files=mutter.desktop.in
|
||||
desktopfiles_files=$(desktopfiles_in_files:.desktop.in=.desktop)
|
||||
desktopfiles_DATA = $(desktopfiles_files)
|
||||
|
||||
wmpropertiesdir=$(datadir)/gnome/wm-properties
|
||||
wmproperties_in_files=metacity-wm.desktop.in
|
||||
wmproperties_in_files=mutter-wm.desktop.in
|
||||
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
|
||||
wmproperties_DATA = $(wmproperties_files)
|
||||
|
||||
schemadir = @GCONF_SCHEMA_FILE_DIR@
|
||||
schema_in_files = metacity.schemas.in
|
||||
schema_in_files = mutter.schemas.in
|
||||
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
|
||||
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
|
||||
xml_in_files = 50-metacity-desktop-key.xml.in 50-metacity-key.xml.in
|
||||
xml_DATA = $(xml_in_files:.xml.in=.xml)
|
||||
|
||||
@INTLTOOL_SCHEMAS_RULE@
|
||||
|
||||
if GCONF_SCHEMAS_INSTALL
|
||||
@@ -233,22 +285,73 @@ VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
|
||||
stock_delete_data $(srcdir)/stock_delete.png
|
||||
|
||||
BUILT_SOURCES = inlinepixbufs.h
|
||||
CLEANFILES = inlinepixbufs.h metacity.desktop metacity-wm.desktop metacity.schemas metacity.schemas.in 50-metacity-desktop-key.xml 50-metacity-key.xml
|
||||
CLEANFILES = \
|
||||
inlinepixbufs.h \
|
||||
mutter.desktop \
|
||||
mutter-wm.desktop \
|
||||
mutter.schemas \
|
||||
$(mutter_built_sources) \
|
||||
$(typelib_DATA) \
|
||||
$(gir_DATA)
|
||||
|
||||
inlinepixbufs.h: $(IMAGES)
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
|
||||
pkgconfig_DATA = libmetacity-private.pc metacity-plugins.pc
|
||||
pkgconfig_DATA = libmutter-private.pc mutter-plugins.pc
|
||||
|
||||
EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(wmproperties_files) \
|
||||
$(IMAGES) $(schema_DATA) \
|
||||
$(IMAGES) \
|
||||
$(desktopfiles_in_files) \
|
||||
$(wmproperties_in_files) \
|
||||
$(schema_in_files) \
|
||||
$(xml_in_files) \
|
||||
libmetacity-private.pc.in \
|
||||
metacity-plugins.pc.in
|
||||
libmutter-private.pc.in \
|
||||
mutter-plugins.pc.in \
|
||||
mutter-enum-types.h.in \
|
||||
mutter-enum-types.c.in \
|
||||
mutter-marshal.list
|
||||
|
||||
BUILT_SOURCES += $(mutter_built_sources)
|
||||
MUTTER_STAMP_FILES = stamp-mutter-marshal.h stamp-mutter-enum-types.h
|
||||
CLEANFILES += $(MUTTER_STAMP_FILES)
|
||||
|
||||
mutter-marshal.h: stamp-mutter-marshal.h
|
||||
@true
|
||||
stamp-mutter-marshal.h: Makefile mutter-marshal.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_mutter_marshal \
|
||||
--header \
|
||||
$(srcdir)/mutter-marshal.list > xgen-tmh && \
|
||||
(cmp -s xgen-tmh mutter-marshal.h || cp -f xgen-tmh mutter-marshal.h) && \
|
||||
rm -f xgen-tmh && \
|
||||
echo timestamp > $(@F)
|
||||
|
||||
mutter-marshal.c: Makefile mutter-marshal.list
|
||||
$(AM_V_GEN) (echo "#include \"mutter-marshal.h\"" ; \
|
||||
$(GLIB_GENMARSHAL) \
|
||||
--prefix=_mutter_marshal \
|
||||
--body \
|
||||
$(srcdir)/mutter-marshal.list ) > xgen-tmc && \
|
||||
cp -f xgen-tmc mutter-marshal.c && \
|
||||
rm -f xgen-tmc
|
||||
|
||||
mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
|
||||
@true
|
||||
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in
|
||||
$(AM_V_GEN) ( cd $(srcdir) && \
|
||||
$(GLIB_MKENUMS) \
|
||||
--template $(srcdir)/mutter-enum-types.h.in \
|
||||
$(libmutterinclude_base_headers) ) >> xgen-teth && \
|
||||
(cmp -s xgen-teth mutter-enum-types.h || cp xgen-teth mutter-enum-types.h) && \
|
||||
rm -f xgen-teth && \
|
||||
echo timestamp > $(@F)
|
||||
|
||||
mutter-enum-types.c: stamp-mutter-enum-types.h mutter-enum-types.c.in
|
||||
$(AM_V_GEN) ( cd $(srcdir) && \
|
||||
$(GLIB_MKENUMS) \
|
||||
--template $(srcdir)/mutter-enum-types.c.in \
|
||||
$(libmutterinclude_base_headers) ) >> xgen-tetc && \
|
||||
cp xgen-tetc mutter-enum-types.c && \
|
||||
rm -f xgen-tetc
|
||||
|
104
src/compositor/cogl-utils.c
Normal file
104
src/compositor/cogl-utils.c
Normal file
@@ -0,0 +1,104 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Utilities for use with Cogl
|
||||
*
|
||||
* Copyright 2010 Red Hat, Inc.
|
||||
* Copyright 2010 Intel Corporation
|
||||
*
|
||||
* 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 "cogl-utils.h"
|
||||
|
||||
/**
|
||||
* meta_create_color_texture_4ub:
|
||||
* @red:
|
||||
* @green:
|
||||
* @blue:
|
||||
* @alpha:
|
||||
*
|
||||
* Creates a texture that is a single pixel with the specified
|
||||
* unpremultiplied color components.
|
||||
*
|
||||
* Return value: (transfer full): a newly created Cogl texture
|
||||
*/
|
||||
CoglHandle
|
||||
meta_create_color_texture_4ub (guint8 red,
|
||||
guint8 green,
|
||||
guint8 blue,
|
||||
guint8 alpha)
|
||||
{
|
||||
CoglColor color;
|
||||
guint8 pixel[4];
|
||||
|
||||
cogl_color_set_from_4ub (&color, red, green, blue, alpha);
|
||||
cogl_color_premultiply (&color);
|
||||
|
||||
pixel[0] = cogl_color_get_red_byte (&color);
|
||||
pixel[1] = cogl_color_get_green_byte (&color);
|
||||
pixel[2] = cogl_color_get_blue_byte (&color);
|
||||
pixel[3] = cogl_color_get_alpha_byte (&color);
|
||||
|
||||
return cogl_texture_new_from_data (1, 1,
|
||||
COGL_TEXTURE_NONE,
|
||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
4, pixel);
|
||||
}
|
||||
|
||||
|
||||
/* Based on gnome-shell/src/st/st-private.c:_st_create_texture_material.c */
|
||||
|
||||
/**
|
||||
* meta_create_texture_material:
|
||||
* @src_texture: (allow-none): texture to use initially for the layer
|
||||
*
|
||||
* Creates a material with a single layer. Using a common template
|
||||
* allows sharing a shader for different uses in Mutter. To share the same
|
||||
* shader with all other materials that are just texture plus opacity
|
||||
* would require Cogl fixes.
|
||||
* (See http://bugzilla.clutter-project.org/show_bug.cgi?id=2425)
|
||||
*
|
||||
* Return value: (transfer full): a newly created Cogl material
|
||||
*/
|
||||
CoglHandle
|
||||
meta_create_texture_material (CoglHandle src_texture)
|
||||
{
|
||||
static CoglHandle texture_material_template = COGL_INVALID_HANDLE;
|
||||
CoglHandle material;
|
||||
|
||||
/* We use a material that has a dummy texture as a base for all
|
||||
texture materials. The idea is that only the Cogl texture object
|
||||
would be different in the children so it is likely that Cogl will
|
||||
be able to share GL programs between all the textures. */
|
||||
if (G_UNLIKELY (texture_material_template == COGL_INVALID_HANDLE))
|
||||
{
|
||||
CoglHandle dummy_texture;
|
||||
|
||||
dummy_texture = meta_create_color_texture_4ub (0xff, 0xff, 0xff, 0xff);
|
||||
|
||||
texture_material_template = cogl_material_new ();
|
||||
cogl_material_set_layer (texture_material_template, 0, dummy_texture);
|
||||
cogl_handle_unref (dummy_texture);
|
||||
}
|
||||
|
||||
material = cogl_material_copy (texture_material_template);
|
||||
|
||||
if (src_texture != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (material, 0, src_texture);
|
||||
|
||||
return material;
|
||||
}
|
@@ -1,10 +1,9 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2007 Iain Holmes
|
||||
* Based on xcompmgr - (c) 2003 Keith Packard
|
||||
* xfwm4 - (c) 2005-2007 Olivier Fourdan
|
||||
*
|
||||
/*
|
||||
* Utilities for use with Cogl
|
||||
*
|
||||
* Copyright 2010 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
|
||||
@@ -14,18 +13,22 @@
|
||||
* 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_XRENDER_H_
|
||||
#define META_COMPOSITOR_XRENDER_H_
|
||||
#ifndef __META_COGL_UTILS_H__
|
||||
#define __META_COGL_UTILS_H__
|
||||
|
||||
#include "types.h"
|
||||
#include <cogl/cogl.h>
|
||||
|
||||
MetaCompositor *meta_compositor_xrender_new (MetaDisplay *display);
|
||||
CoglHandle meta_create_color_texture_4ub (guint8 red,
|
||||
guint8 green,
|
||||
guint8 blue,
|
||||
guint8 alpha);
|
||||
CoglHandle meta_create_texture_material (CoglHandle src_texture);
|
||||
|
||||
#endif
|
||||
#endif /* __META_COGL_UTILS_H__ */
|
@@ -1,90 +1,69 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008 Iain Holmes
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef META_COMPOSITOR_PRIVATE_H
|
||||
#define META_COMPOSITOR_PRIVATE_H
|
||||
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
|
||||
#include "compositor.h"
|
||||
#include "display.h"
|
||||
#include "meta-plugin-manager.h"
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
typedef struct _MetaCompScreen MetaCompScreen;
|
||||
|
||||
struct _MetaCompositor
|
||||
{
|
||||
void (* destroy) (MetaCompositor *compositor);
|
||||
MetaDisplay *display;
|
||||
|
||||
void (*manage_screen) (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void (*unmanage_screen) (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void (*add_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*remove_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*set_updates) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean update);
|
||||
gboolean (*process_event) (MetaCompositor *compositor,
|
||||
XEvent *event,
|
||||
MetaWindow *window);
|
||||
Pixmap (*get_window_pixmap) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*set_active_window) (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window);
|
||||
void (*map_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*unmap_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*minimize_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *window_rect,
|
||||
MetaRectangle *icon_rect);
|
||||
void (*unminimize_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *window_rect,
|
||||
MetaRectangle *icon_rect);
|
||||
void (*maximize_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *window_rect);
|
||||
void (*unmaximize_window) (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *window_rect);
|
||||
void (*update_workspace_geometry) (MetaCompositor *compositor,
|
||||
MetaWorkspace *workspace);
|
||||
void (*switch_workspace) (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *from,
|
||||
MetaWorkspace *to,
|
||||
MetaMotionDirection direction);
|
||||
void (*sync_stack) (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
GList *stack);
|
||||
void (*set_window_hidden) (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
gboolean hidden);
|
||||
void (*sync_window_geometry) (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void (*sync_screen_size) (MetaCompositor *compositor,
|
||||
MetaScreen *screen,
|
||||
guint width,
|
||||
guint height);
|
||||
Atom atom_x_root_pixmap;
|
||||
Atom atom_x_set_root;
|
||||
Atom atom_net_wm_window_opacity;
|
||||
guint repaint_func_id;
|
||||
|
||||
ClutterActor *shadow_src;
|
||||
|
||||
MetaPlugin *modal_plugin;
|
||||
|
||||
gboolean show_redraw : 1;
|
||||
gboolean debug : 1;
|
||||
gboolean no_mipmaps : 1;
|
||||
};
|
||||
|
||||
#endif
|
||||
struct _MetaCompScreen
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
ClutterActor *stage, *window_group, *overlay_group;
|
||||
ClutterActor *background_actor;
|
||||
ClutterActor *hidden_group;
|
||||
GList *windows;
|
||||
GHashTable *windows_by_xid;
|
||||
Window output;
|
||||
|
||||
/* Before we create the output window */
|
||||
XserverRegion pending_input_region;
|
||||
|
||||
gint switch_workspace_in_progress;
|
||||
|
||||
MetaPluginManager *plugin_mgr;
|
||||
};
|
||||
|
||||
void meta_switch_workspace_completed (MetaScreen *screen);
|
||||
void meta_set_stage_input_region (MetaScreen *screen,
|
||||
XserverRegion region);
|
||||
void meta_empty_stage_input_region (MetaScreen *screen);
|
||||
|
||||
gboolean meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||
MetaPlugin *plugin,
|
||||
Window grab_window,
|
||||
Cursor cursor,
|
||||
MetaModalOptions options,
|
||||
guint32 timestamp);
|
||||
void meta_end_modal_for_plugin (MetaScreen *screen,
|
||||
MetaPlugin *plugin,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_check_end_modal (MetaScreen *screen);
|
||||
|
||||
#endif /* META_COMPOSITOR_PRIVATE_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
414
src/compositor/meta-background-actor.c
Normal file
414
src/compositor/meta-background-actor.c
Normal file
@@ -0,0 +1,414 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* meta-background-actor.c: Actor for painting the root window background
|
||||
*
|
||||
* Copyright 2009 Sander Dijkhuis
|
||||
* Copyright 2010 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.
|
||||
*
|
||||
* Portions adapted from gnome-shell/src/shell-global.c
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "cogl-utils.h"
|
||||
#include "compositor-private.h"
|
||||
#include "errors.h"
|
||||
#include "meta-background-actor.h"
|
||||
|
||||
struct _MetaBackgroundActorClass
|
||||
{
|
||||
ClutterActorClass parent_class;
|
||||
};
|
||||
|
||||
struct _MetaBackgroundActor
|
||||
{
|
||||
ClutterActor parent;
|
||||
|
||||
CoglHandle material;
|
||||
MetaScreen *screen;
|
||||
cairo_region_t *visible_region;
|
||||
float texture_width;
|
||||
float texture_height;
|
||||
|
||||
guint have_pixmap : 1;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaBackgroundActor, meta_background_actor, CLUTTER_TYPE_ACTOR);
|
||||
|
||||
static void
|
||||
update_wrap_mode (MetaBackgroundActor *self)
|
||||
{
|
||||
int width, height;
|
||||
CoglMaterialWrapMode wrap_mode;
|
||||
|
||||
meta_screen_get_size (self->screen, &width, &height);
|
||||
|
||||
/* We turn off repeating when we have a full-screen pixmap to keep from
|
||||
* getting artifacts from one side of the image sneaking into the other
|
||||
* side of the image via bilinear filtering.
|
||||
*/
|
||||
if (width == self->texture_width && height == self->texture_height)
|
||||
wrap_mode = COGL_MATERIAL_WRAP_MODE_CLAMP_TO_EDGE;
|
||||
else
|
||||
wrap_mode = COGL_MATERIAL_WRAP_MODE_REPEAT;
|
||||
|
||||
cogl_material_set_layer_wrap_mode (self->material, 0, wrap_mode);
|
||||
}
|
||||
|
||||
static void
|
||||
set_texture (MetaBackgroundActor *self,
|
||||
CoglHandle texture)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
display = meta_screen_get_display (self->screen);
|
||||
|
||||
/* This may trigger destruction of an old texture pixmap, which, if
|
||||
* the underlying X pixmap is already gone has the tendency to trigger
|
||||
* X errors inside DRI. For safety, trap errors */
|
||||
meta_error_trap_push (display);
|
||||
cogl_material_set_layer (self->material, 0, texture);
|
||||
meta_error_trap_pop (display);
|
||||
|
||||
self->texture_width = cogl_texture_get_width (texture);
|
||||
self->texture_height = cogl_texture_get_height (texture);
|
||||
|
||||
update_wrap_mode (self);
|
||||
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
|
||||
}
|
||||
|
||||
/* Sets our material to paint with a 1x1 texture of the stage's background
|
||||
* color; doing this when we have no pixmap allows the application to turn
|
||||
* off painting the stage. There might be a performance benefit to
|
||||
* painting in this case with a solid color, but the normal solid color
|
||||
* case is a 1x1 root pixmap, so we'd have to reverse-engineer that to
|
||||
* actually pick up the (small?) performance win. This is just a fallback.
|
||||
*/
|
||||
static void
|
||||
set_texture_to_stage_color (MetaBackgroundActor *self)
|
||||
{
|
||||
ClutterActor *stage = meta_get_stage_for_screen (self->screen);
|
||||
ClutterColor color;
|
||||
CoglHandle texture;
|
||||
|
||||
clutter_stage_get_color (CLUTTER_STAGE (stage), &color);
|
||||
texture = meta_create_color_texture_4ub (color.red, color.green,
|
||||
color.blue, 0xff);
|
||||
set_texture (self, texture);
|
||||
cogl_handle_unref (texture);
|
||||
}
|
||||
|
||||
static void
|
||||
on_notify_stage_color (GObject *stage,
|
||||
GParamSpec *pspec,
|
||||
MetaBackgroundActor *self)
|
||||
{
|
||||
if (!self->have_pixmap)
|
||||
set_texture_to_stage_color (self);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_background_actor_dispose (GObject *object)
|
||||
{
|
||||
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object);
|
||||
|
||||
meta_background_actor_set_visible_region (self, NULL);
|
||||
|
||||
if (self->material != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (self->material);
|
||||
self->material = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (self->screen != NULL)
|
||||
{
|
||||
ClutterActor *stage = meta_get_stage_for_screen (self->screen);
|
||||
g_signal_handlers_disconnect_by_func (stage,
|
||||
(gpointer) on_notify_stage_color,
|
||||
self);
|
||||
self->screen = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_background_actor_get_preferred_width (ClutterActor *actor,
|
||||
gfloat for_height,
|
||||
gfloat *min_width_p,
|
||||
gfloat *natural_width_p)
|
||||
{
|
||||
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (actor);
|
||||
int width, height;
|
||||
|
||||
meta_screen_get_size (self->screen, &width, &height);
|
||||
|
||||
if (min_width_p)
|
||||
*min_width_p = width;
|
||||
if (natural_width_p)
|
||||
*natural_width_p = height;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_background_actor_get_preferred_height (ClutterActor *actor,
|
||||
gfloat for_width,
|
||||
gfloat *min_height_p,
|
||||
gfloat *natural_height_p)
|
||||
|
||||
{
|
||||
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (actor);
|
||||
int width, height;
|
||||
|
||||
meta_screen_get_size (self->screen, &width, &height);
|
||||
|
||||
if (min_height_p)
|
||||
*min_height_p = height;
|
||||
if (natural_height_p)
|
||||
*natural_height_p = height;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_background_actor_paint (ClutterActor *actor)
|
||||
{
|
||||
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (actor);
|
||||
int width, height;
|
||||
|
||||
meta_screen_get_size (self->screen, &width, &height);
|
||||
|
||||
cogl_set_source (self->material);
|
||||
|
||||
if (self->visible_region)
|
||||
{
|
||||
int n_rectangles = cairo_region_num_rectangles (self->visible_region);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_rectangles; i++)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
cairo_region_get_rectangle (self->visible_region, i, &rect);
|
||||
|
||||
cogl_rectangle_with_texture_coords (rect.x, rect.y,
|
||||
rect.x + rect.width, rect.y + rect.height,
|
||||
rect.x / self->texture_width,
|
||||
rect.y / self->texture_height,
|
||||
(rect.x + rect.width) / self->texture_width,
|
||||
(rect.y + rect.height) / self->texture_height);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cogl_rectangle_with_texture_coords (0.0f, 0.0f,
|
||||
width, height,
|
||||
0.0f, 0.0f,
|
||||
width / self->texture_width,
|
||||
height / self->texture_height);
|
||||
}
|
||||
}
|
||||
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
static gboolean
|
||||
meta_background_actor_get_paint_volume (ClutterActor *actor,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
MetaBackgroundActor *self = META_BACKGROUND_ACTOR (actor);
|
||||
int width, height;
|
||||
|
||||
meta_screen_get_size (self->screen, &width, &height);
|
||||
|
||||
clutter_paint_volume_set_width (volume, width);
|
||||
clutter_paint_volume_set_height (volume, height);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
meta_background_actor_class_init (MetaBackgroundActorClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass);
|
||||
|
||||
object_class->dispose = meta_background_actor_dispose;
|
||||
|
||||
actor_class->get_preferred_width = meta_background_actor_get_preferred_width;
|
||||
actor_class->get_preferred_height = meta_background_actor_get_preferred_height;
|
||||
actor_class->paint = meta_background_actor_paint;
|
||||
#if CLUTTER_CHECK_VERSION(1, 5, 2)
|
||||
actor_class->get_paint_volume = meta_background_actor_get_paint_volume;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
meta_background_actor_init (MetaBackgroundActor *background_actor)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @screen: the #MetaScreen
|
||||
* meta_background_actor_new:
|
||||
*
|
||||
* Creates a new actor to draw the background for the given screen.
|
||||
*
|
||||
* Return value: (transfer none): the newly created background actor
|
||||
*/
|
||||
ClutterActor *
|
||||
meta_background_actor_new (MetaScreen *screen)
|
||||
{
|
||||
MetaBackgroundActor *self;
|
||||
ClutterActor *stage;
|
||||
|
||||
g_return_val_if_fail (META_IS_SCREEN (screen), NULL);
|
||||
|
||||
self = g_object_new (META_TYPE_BACKGROUND_ACTOR, NULL);
|
||||
|
||||
self->screen = screen;
|
||||
|
||||
self->material = meta_create_texture_material (NULL);
|
||||
cogl_material_set_layer_wrap_mode (self->material, 0,
|
||||
COGL_MATERIAL_WRAP_MODE_REPEAT);
|
||||
|
||||
stage = meta_get_stage_for_screen (self->screen);
|
||||
g_signal_connect (stage, "notify::color",
|
||||
G_CALLBACK (on_notify_stage_color), self);
|
||||
|
||||
meta_background_actor_update (self);
|
||||
|
||||
return CLUTTER_ACTOR (self);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_background_actor_update:
|
||||
* @self: a #MetaBackgroundActor
|
||||
*
|
||||
* Refetches the _XROOTPMAP_ID property for the root window and updates
|
||||
* the contents of the background actor based on that. There's no attempt
|
||||
* to optimize out pixmap values that don't change (since a root pixmap
|
||||
* could be replaced by with another pixmap with the same ID under some
|
||||
* circumstances), so this should only be called when we actually receive
|
||||
* a PropertyNotify event for the property.
|
||||
*/
|
||||
void
|
||||
meta_background_actor_update (MetaBackgroundActor *self)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaCompositor *compositor;
|
||||
Atom type;
|
||||
int format;
|
||||
gulong nitems;
|
||||
gulong bytes_after;
|
||||
guchar *data;
|
||||
Pixmap root_pixmap_id;
|
||||
|
||||
g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));
|
||||
|
||||
display = meta_screen_get_display (self->screen);
|
||||
compositor = meta_display_get_compositor (display);
|
||||
|
||||
root_pixmap_id = None;
|
||||
if (!XGetWindowProperty (meta_display_get_xdisplay (display),
|
||||
meta_screen_get_xroot (self->screen),
|
||||
compositor->atom_x_root_pixmap,
|
||||
0, LONG_MAX,
|
||||
False,
|
||||
AnyPropertyType,
|
||||
&type, &format, &nitems, &bytes_after, &data) &&
|
||||
type != None)
|
||||
{
|
||||
/* Got a property. */
|
||||
if (type == XA_PIXMAP && format == 32 && nitems == 1)
|
||||
{
|
||||
/* Was what we expected. */
|
||||
root_pixmap_id = *(Pixmap *)data;
|
||||
}
|
||||
|
||||
XFree(data);
|
||||
}
|
||||
|
||||
if (root_pixmap_id != None)
|
||||
{
|
||||
CoglHandle texture;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
texture = cogl_texture_pixmap_x11_new (root_pixmap_id, FALSE);
|
||||
meta_error_trap_pop (display);
|
||||
|
||||
if (texture != COGL_INVALID_HANDLE)
|
||||
{
|
||||
set_texture (self, texture);
|
||||
cogl_handle_unref (texture);
|
||||
|
||||
self->have_pixmap = True;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
self->have_pixmap = False;
|
||||
set_texture_to_stage_color (self);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_background_actor_set_visible_region:
|
||||
* @self: a #MetaBackgroundActor
|
||||
* @visible_region: (allow-none): the area of the actor (in allocate-relative
|
||||
* coordinates) that is visible.
|
||||
*
|
||||
* Sets the area of the background that is unobscured by overlapping windows.
|
||||
* This is used to optimize and only paint the visible portions.
|
||||
*/
|
||||
void
|
||||
meta_background_actor_set_visible_region (MetaBackgroundActor *self,
|
||||
cairo_region_t *visible_region)
|
||||
{
|
||||
g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));
|
||||
|
||||
if (self->visible_region)
|
||||
{
|
||||
cairo_region_destroy (self->visible_region);
|
||||
self->visible_region = NULL;
|
||||
}
|
||||
|
||||
if (visible_region)
|
||||
{
|
||||
cairo_rectangle_int_t screen_rect = { 0 };
|
||||
meta_screen_get_size (self->screen, &screen_rect.width, &screen_rect.height);
|
||||
|
||||
/* Doing the intersection here is probably unnecessary - MetaWindowGroup
|
||||
* should never compute a visible area that's larger than the root screen!
|
||||
* but it's not that expensive and adds some extra robustness.
|
||||
*/
|
||||
self->visible_region = cairo_region_create_rectangle (&screen_rect);
|
||||
cairo_region_intersect (self->visible_region, visible_region);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_background_actor_screen_size_changed:
|
||||
* @self: a #MetaBackgroundActor
|
||||
*
|
||||
* Called by the compositor when the size of the #MetaScreen changes
|
||||
*/
|
||||
void
|
||||
meta_background_actor_screen_size_changed (MetaBackgroundActor *self)
|
||||
{
|
||||
update_wrap_mode (self);
|
||||
clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
|
||||
}
|
58
src/compositor/meta-background-actor.h
Normal file
58
src/compositor/meta-background-actor.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* meta-background-actor.h: Actor for painting the root window background
|
||||
*
|
||||
* Copyright 2010 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_BACKGROUND_ACTOR_H
|
||||
#define META_BACKGROUND_ACTOR_H
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
#include "screen.h"
|
||||
|
||||
/**
|
||||
* MetaBackgroundActor:
|
||||
*
|
||||
* This class handles tracking and painting the root window background.
|
||||
* By integrating with #MetaWindowGroup we can avoid painting parts of
|
||||
* the background that are obscured by other windows.
|
||||
*/
|
||||
|
||||
#define META_TYPE_BACKGROUND_ACTOR (meta_background_actor_get_type ())
|
||||
#define META_BACKGROUND_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_BACKGROUND_ACTOR, MetaBackgroundActor))
|
||||
#define META_BACKGROUND_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKGROUND_ACTOR, MetaBackgroundActorClass))
|
||||
#define META_IS_BACKGROUND_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_BACKGROUND_ACTOR))
|
||||
#define META_IS_BACKGROUND_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_BACKGROUND_ACTOR))
|
||||
#define META_BACKGROUND_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKGROUND_ACTOR, MetaBackgroundActorClass))
|
||||
|
||||
typedef struct _MetaBackgroundActor MetaBackgroundActor;
|
||||
typedef struct _MetaBackgroundActorClass MetaBackgroundActorClass;
|
||||
typedef struct _MetaBackgroundActorPrivate MetaBackgroundActorPrivate;
|
||||
|
||||
GType meta_background_actor_get_type (void);
|
||||
|
||||
ClutterActor *meta_background_actor_new (MetaScreen *screen);
|
||||
|
||||
void meta_background_actor_update (MetaBackgroundActor *actor);
|
||||
void meta_background_actor_set_visible_region (MetaBackgroundActor *self,
|
||||
cairo_region_t *visible_region);
|
||||
void meta_background_actor_screen_size_changed (MetaBackgroundActor *self);
|
||||
|
||||
#endif /* META_BACKGROUND_ACTOR_H */
|
@@ -21,8 +21,8 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "mutter-plugin.h"
|
||||
#include "mutter-module.h"
|
||||
#include "meta-plugin.h"
|
||||
#include "meta-module.h"
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
@@ -32,23 +32,23 @@ enum
|
||||
PROP_PATH,
|
||||
};
|
||||
|
||||
struct _MutterModulePrivate
|
||||
struct _MetaModulePrivate
|
||||
{
|
||||
GModule *lib;
|
||||
gchar *path;
|
||||
GType plugin_type;
|
||||
};
|
||||
|
||||
#define MUTTER_MODULE_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), MUTTER_TYPE_MODULE, MutterModulePrivate))
|
||||
#define META_MODULE_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_MODULE, MetaModulePrivate))
|
||||
|
||||
G_DEFINE_TYPE (MutterModule, mutter_module, G_TYPE_TYPE_MODULE);
|
||||
G_DEFINE_TYPE (MetaModule, meta_module, G_TYPE_TYPE_MODULE);
|
||||
|
||||
static gboolean
|
||||
mutter_module_load (GTypeModule *gmodule)
|
||||
meta_module_load (GTypeModule *gmodule)
|
||||
{
|
||||
MutterModulePrivate *priv = MUTTER_MODULE (gmodule)->priv;
|
||||
MutterPluginVersion *info = NULL;
|
||||
MetaModulePrivate *priv = META_MODULE (gmodule)->priv;
|
||||
MetaPluginVersion *info = NULL;
|
||||
GType (*register_type) (GTypeModule *) = NULL;
|
||||
|
||||
if (priv->lib && priv->plugin_type)
|
||||
@@ -57,19 +57,20 @@ mutter_module_load (GTypeModule *gmodule)
|
||||
g_assert (priv->path);
|
||||
|
||||
if (!priv->lib &&
|
||||
!(priv->lib = g_module_open (priv->path, G_MODULE_BIND_LOCAL)))
|
||||
!(priv->lib = g_module_open (priv->path, 0)))
|
||||
{
|
||||
g_warning ("Could not load library [%s (%s)]",
|
||||
priv->path, g_module_error ());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (g_module_symbol (priv->lib, "mutter_plugin_version", (gpointer *)&info) &&
|
||||
g_module_symbol (priv->lib, "mutter_plugin_register_type",
|
||||
(gpointer *)®ister_type) &&
|
||||
if (g_module_symbol (priv->lib, "meta_plugin_version",
|
||||
(gpointer *)(void *)&info) &&
|
||||
g_module_symbol (priv->lib, "meta_plugin_register_type",
|
||||
(gpointer *)(void *)®ister_type) &&
|
||||
info && register_type)
|
||||
{
|
||||
if (info->version_api != METACITY_CLUTTER_PLUGIN_API_VERSION)
|
||||
if (info->version_api != MUTTER_PLUGIN_API_VERSION)
|
||||
g_warning ("Plugin API mismatch for [%s]", priv->path);
|
||||
else
|
||||
{
|
||||
@@ -96,9 +97,9 @@ mutter_module_load (GTypeModule *gmodule)
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_module_unload (GTypeModule *gmodule)
|
||||
meta_module_unload (GTypeModule *gmodule)
|
||||
{
|
||||
MutterModulePrivate *priv = MUTTER_MODULE (gmodule)->priv;
|
||||
MetaModulePrivate *priv = META_MODULE (gmodule)->priv;
|
||||
|
||||
g_module_close (priv->lib);
|
||||
|
||||
@@ -107,29 +108,29 @@ mutter_module_unload (GTypeModule *gmodule)
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_module_dispose (GObject *object)
|
||||
meta_module_dispose (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (mutter_module_parent_class)->dispose (object);
|
||||
G_OBJECT_CLASS (meta_module_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_module_finalize (GObject *object)
|
||||
meta_module_finalize (GObject *object)
|
||||
{
|
||||
MutterModulePrivate *priv = MUTTER_MODULE (object)->priv;
|
||||
MetaModulePrivate *priv = META_MODULE (object)->priv;
|
||||
|
||||
g_free (priv->path);
|
||||
priv->path = NULL;
|
||||
|
||||
G_OBJECT_CLASS (mutter_module_parent_class)->finalize (object);
|
||||
G_OBJECT_CLASS (meta_module_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_module_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
meta_module_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
MutterModulePrivate *priv = MUTTER_MODULE (object)->priv;
|
||||
MetaModulePrivate *priv = META_MODULE (object)->priv;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
@@ -144,12 +145,12 @@ mutter_module_set_property (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_module_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
meta_module_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
MutterModulePrivate *priv = MUTTER_MODULE (object)->priv;
|
||||
MetaModulePrivate *priv = META_MODULE (object)->priv;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
@@ -163,18 +164,18 @@ mutter_module_get_property (GObject *object,
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_module_class_init (MutterModuleClass *klass)
|
||||
meta_module_class_init (MetaModuleClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
GTypeModuleClass *gmodule_class = G_TYPE_MODULE_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = mutter_module_finalize;
|
||||
gobject_class->dispose = mutter_module_dispose;
|
||||
gobject_class->set_property = mutter_module_set_property;
|
||||
gobject_class->get_property = mutter_module_get_property;
|
||||
gobject_class->finalize = meta_module_finalize;
|
||||
gobject_class->dispose = meta_module_dispose;
|
||||
gobject_class->set_property = meta_module_set_property;
|
||||
gobject_class->get_property = meta_module_get_property;
|
||||
|
||||
gmodule_class->load = mutter_module_load;
|
||||
gmodule_class->unload = mutter_module_unload;
|
||||
gmodule_class->load = meta_module_load;
|
||||
gmodule_class->unload = meta_module_unload;
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_PATH,
|
||||
@@ -185,22 +186,22 @@ mutter_module_class_init (MutterModuleClass *klass)
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT_ONLY));
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (MutterModulePrivate));
|
||||
g_type_class_add_private (gobject_class, sizeof (MetaModulePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_module_init (MutterModule *self)
|
||||
meta_module_init (MetaModule *self)
|
||||
{
|
||||
MutterModulePrivate *priv;
|
||||
MetaModulePrivate *priv;
|
||||
|
||||
self->priv = priv = MUTTER_MODULE_GET_PRIVATE (self);
|
||||
self->priv = priv = META_MODULE_GET_PRIVATE (self);
|
||||
|
||||
}
|
||||
|
||||
GType
|
||||
mutter_module_get_plugin_type (MutterModule *module)
|
||||
meta_module_get_plugin_type (MetaModule *module)
|
||||
{
|
||||
MutterModulePrivate *priv = MUTTER_MODULE (module)->priv;
|
||||
MetaModulePrivate *priv = META_MODULE (module)->priv;
|
||||
|
||||
return priv->plugin_type;
|
||||
}
|
@@ -21,37 +21,37 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef MUTTER_MODULE_H_
|
||||
#define MUTTER_MODULE_H_
|
||||
#ifndef META_MODULE_H_
|
||||
#define META_MODULE_H_
|
||||
|
||||
#include <glib-object.h>
|
||||
|
||||
#define MUTTER_TYPE_MODULE (mutter_module_get_type ())
|
||||
#define MUTTER_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_MODULE, MutterModule))
|
||||
#define MUTTER_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_MODULE, MutterModuleClass))
|
||||
#define MUTTER_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MUTTER_MODULE_TYPE))
|
||||
#define MUTTER_IS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MUTTER_TYPE_MODULE))
|
||||
#define MUTTER_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MUTTER_TYPE_MODULE, MutterModuleClass))
|
||||
#define META_TYPE_MODULE (meta_module_get_type ())
|
||||
#define META_MODULE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_MODULE, MetaModule))
|
||||
#define META_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_MODULE, MetaModuleClass))
|
||||
#define META_IS_MODULE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_MODULE_TYPE))
|
||||
#define META_IS_MODULE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_MODULE))
|
||||
#define META_MODULE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_MODULE, MetaModuleClass))
|
||||
|
||||
typedef struct _MutterModule MutterModule;
|
||||
typedef struct _MutterModuleClass MutterModuleClass;
|
||||
typedef struct _MutterModulePrivate MutterModulePrivate;
|
||||
typedef struct _MetaModule MetaModule;
|
||||
typedef struct _MetaModuleClass MetaModuleClass;
|
||||
typedef struct _MetaModulePrivate MetaModulePrivate;
|
||||
|
||||
struct _MutterModule
|
||||
struct _MetaModule
|
||||
{
|
||||
GTypeModule parent;
|
||||
|
||||
MutterModulePrivate *priv;
|
||||
MetaModulePrivate *priv;
|
||||
};
|
||||
|
||||
struct _MutterModuleClass
|
||||
struct _MetaModuleClass
|
||||
{
|
||||
GTypeModuleClass parent_class;
|
||||
};
|
||||
|
||||
|
||||
GType mutter_module_get_type (void);
|
||||
GType meta_module_get_type (void);
|
||||
|
||||
GType mutter_module_get_plugin_type (MutterModule *module);
|
||||
GType meta_module_get_plugin_type (MetaModule *module);
|
||||
|
||||
#endif
|
@@ -22,43 +22,55 @@
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "mutter-plugin-manager.h"
|
||||
#include "compositor-private.h"
|
||||
#include "meta-plugin-manager.h"
|
||||
#include "prefs.h"
|
||||
#include "errors.h"
|
||||
#include "workspace.h"
|
||||
#include "mutter-module.h"
|
||||
#include "meta-module.h"
|
||||
#include "../core/window-private.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
|
||||
/*
|
||||
* There is only one instace of each module per the process.
|
||||
*/
|
||||
static GHashTable *plugin_modules = NULL;
|
||||
|
||||
static gboolean mutter_plugin_manager_reload (MutterPluginManager *plugin_mgr);
|
||||
/*
|
||||
* We have one "default plugin manager" that acts for the first screen,
|
||||
* but also can be used before we open any screens, and additional
|
||||
* plugin managers for each screen. (This is ugly. Probably we should
|
||||
* have one plugin manager and only make the plugins per-screen.)
|
||||
*/
|
||||
|
||||
struct MutterPluginManager
|
||||
static MetaPluginManager *default_plugin_manager;
|
||||
|
||||
static gboolean meta_plugin_manager_reload (MetaPluginManager *plugin_mgr);
|
||||
|
||||
struct MetaPluginManager
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
GList *plugins;
|
||||
GList *unload; /* Plugins that are disabled and pending unload */
|
||||
GList /* MetaPlugin */ *plugins; /* TODO -- maybe use hash table */
|
||||
GList *unload; /* Plugins that are disabled and pending unload */
|
||||
|
||||
guint idle_unload_id;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Checks that the plugin is compatible with the WM and sets up the plugin
|
||||
* struct.
|
||||
*/
|
||||
static MutterPlugin *
|
||||
mutter_plugin_load (MutterPluginManager *mgr,
|
||||
MutterModule *module,
|
||||
const gchar *params)
|
||||
static MetaPlugin *
|
||||
meta_plugin_load (MetaPluginManager *mgr,
|
||||
MetaModule *module,
|
||||
const gchar *params)
|
||||
{
|
||||
MutterPlugin *plugin = NULL;
|
||||
GType plugin_type = mutter_module_get_plugin_type (module);
|
||||
MetaPlugin *plugin = NULL;
|
||||
GType plugin_type = meta_module_get_plugin_type (module);
|
||||
|
||||
if (!plugin_type)
|
||||
{
|
||||
@@ -67,7 +79,6 @@ mutter_plugin_load (MutterPluginManager *mgr,
|
||||
}
|
||||
|
||||
plugin = g_object_new (plugin_type,
|
||||
"screen", mgr->screen,
|
||||
"params", params,
|
||||
NULL);
|
||||
|
||||
@@ -80,9 +91,9 @@ mutter_plugin_load (MutterPluginManager *mgr,
|
||||
* removal later.
|
||||
*/
|
||||
static gboolean
|
||||
mutter_plugin_unload (MutterPlugin *plugin)
|
||||
meta_plugin_unload (MetaPlugin *plugin)
|
||||
{
|
||||
if (mutter_plugin_running (plugin))
|
||||
if (meta_plugin_running (plugin))
|
||||
{
|
||||
g_object_set (plugin, "disabled", TRUE, NULL);
|
||||
return FALSE;
|
||||
@@ -98,16 +109,16 @@ mutter_plugin_unload (MutterPlugin *plugin)
|
||||
* pending for removal.
|
||||
*/
|
||||
static gboolean
|
||||
mutter_plugin_manager_idle_unload (MutterPluginManager *plugin_mgr)
|
||||
meta_plugin_manager_idle_unload (MetaPluginManager *plugin_mgr)
|
||||
{
|
||||
GList *l = plugin_mgr->unload;
|
||||
gboolean dont_remove = TRUE;
|
||||
|
||||
while (l)
|
||||
{
|
||||
MutterPlugin *plugin = l->data;
|
||||
MetaPlugin *plugin = l->data;
|
||||
|
||||
if (mutter_plugin_unload (plugin))
|
||||
if (meta_plugin_unload (plugin))
|
||||
{
|
||||
/* Remove from list */
|
||||
GList *p = l->prev;
|
||||
@@ -143,23 +154,23 @@ mutter_plugin_manager_idle_unload (MutterPluginManager *plugin_mgr)
|
||||
* Unloads all plugins
|
||||
*/
|
||||
static void
|
||||
mutter_plugin_manager_unload (MutterPluginManager *plugin_mgr)
|
||||
meta_plugin_manager_unload (MetaPluginManager *plugin_mgr)
|
||||
{
|
||||
GList *plugins = plugin_mgr->plugins;
|
||||
|
||||
while (plugins)
|
||||
{
|
||||
MutterPlugin *plugin = plugins->data;
|
||||
MetaPlugin *plugin = plugins->data;
|
||||
|
||||
/* If the plugin could not be removed, move it to the unload list */
|
||||
if (!mutter_plugin_unload (plugin))
|
||||
if (!meta_plugin_unload (plugin))
|
||||
{
|
||||
plugin_mgr->unload = g_list_prepend (plugin_mgr->unload, plugin);
|
||||
|
||||
if (!plugin_mgr->idle_unload_id)
|
||||
{
|
||||
plugin_mgr->idle_unload_id = g_idle_add ((GSourceFunc)
|
||||
mutter_plugin_manager_idle_unload,
|
||||
meta_plugin_manager_idle_unload,
|
||||
plugin_mgr);
|
||||
}
|
||||
}
|
||||
@@ -175,21 +186,21 @@ static void
|
||||
prefs_changed_callback (MetaPreference pref,
|
||||
void *data)
|
||||
{
|
||||
MutterPluginManager *plugin_mgr = data;
|
||||
MetaPluginManager *plugin_mgr = data;
|
||||
|
||||
if (pref == META_PREF_CLUTTER_PLUGINS)
|
||||
{
|
||||
mutter_plugin_manager_reload (plugin_mgr);
|
||||
meta_plugin_manager_reload (plugin_mgr);
|
||||
}
|
||||
}
|
||||
|
||||
static MutterModule *
|
||||
mutter_plugin_manager_get_module (const gchar *path)
|
||||
static MetaModule *
|
||||
meta_plugin_manager_get_module (const gchar *path)
|
||||
{
|
||||
MutterModule *module = g_hash_table_lookup (plugin_modules, path);
|
||||
MetaModule *module = g_hash_table_lookup (plugin_modules, path);
|
||||
|
||||
if (!module &&
|
||||
(module = g_object_new (MUTTER_TYPE_MODULE, "path", path, NULL)))
|
||||
(module = g_object_new (META_TYPE_MODULE, "path", path, NULL)))
|
||||
{
|
||||
g_hash_table_insert (plugin_modules, g_strdup (path), module);
|
||||
}
|
||||
@@ -200,8 +211,8 @@ mutter_plugin_manager_get_module (const gchar *path)
|
||||
/*
|
||||
* Loads all plugins listed in gconf registry.
|
||||
*/
|
||||
static gboolean
|
||||
mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
gboolean
|
||||
meta_plugin_manager_load (MetaPluginManager *plugin_mgr)
|
||||
{
|
||||
const gchar *dpath = MUTTER_PLUGIN_DIR "/";
|
||||
GSList *plugins, *fallback = NULL;
|
||||
@@ -226,7 +237,7 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
|
||||
if (plugin_string)
|
||||
{
|
||||
MutterModule *module;
|
||||
MetaModule *module;
|
||||
gchar *path;
|
||||
|
||||
params = strchr (plugin_string, ':');
|
||||
@@ -242,11 +253,10 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
else
|
||||
path = g_strconcat (dpath, plugin_string, ".so", NULL);
|
||||
|
||||
module = mutter_plugin_manager_get_module (path);
|
||||
module = meta_plugin_manager_get_module (path);
|
||||
|
||||
if (module)
|
||||
{
|
||||
MutterPlugin *p;
|
||||
gboolean use_succeeded;
|
||||
|
||||
/*
|
||||
@@ -258,18 +268,17 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
*/
|
||||
use_succeeded = g_type_module_use (G_TYPE_MODULE (module));
|
||||
|
||||
if (use_succeeded &&
|
||||
(p = mutter_plugin_load (plugin_mgr, module, params)))
|
||||
{
|
||||
plugin_mgr->plugins = g_list_prepend (plugin_mgr->plugins, p);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Plugin load for [%s] failed", path);
|
||||
}
|
||||
|
||||
if (use_succeeded)
|
||||
g_type_module_unuse (G_TYPE_MODULE (module));
|
||||
{
|
||||
MetaPlugin *plugin = meta_plugin_load (plugin_mgr, module, params);
|
||||
|
||||
if (plugin)
|
||||
plugin_mgr->plugins = g_list_prepend (plugin_mgr->plugins, plugin);
|
||||
else
|
||||
g_warning ("Plugin load for [%s] failed", path);
|
||||
|
||||
g_type_module_unuse (G_TYPE_MODULE (module));
|
||||
}
|
||||
}
|
||||
else
|
||||
g_warning ("Unable to load plugin module [%s]: %s",
|
||||
@@ -295,30 +304,49 @@ mutter_plugin_manager_load (MutterPluginManager *plugin_mgr)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_plugin_manager_initialize (MetaPluginManager *plugin_mgr)
|
||||
{
|
||||
GList *iter;
|
||||
|
||||
for (iter = plugin_mgr->plugins; iter; iter = iter->next)
|
||||
{
|
||||
MetaPlugin *plugin = (MetaPlugin*) iter->data;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
g_object_set (plugin,
|
||||
"screen", plugin_mgr->screen,
|
||||
NULL);
|
||||
|
||||
if (klass->start)
|
||||
klass->start (plugin);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Reloads all plugins
|
||||
*/
|
||||
static gboolean
|
||||
mutter_plugin_manager_reload (MutterPluginManager *plugin_mgr)
|
||||
meta_plugin_manager_reload (MetaPluginManager *plugin_mgr)
|
||||
{
|
||||
/* TODO -- brute force; should we build a list of plugins to load and list of
|
||||
* plugins to unload? We are probably not going to have large numbers of
|
||||
* plugins loaded at the same time, so it might not be worth it.
|
||||
*/
|
||||
mutter_plugin_manager_unload (plugin_mgr);
|
||||
return mutter_plugin_manager_load (plugin_mgr);
|
||||
|
||||
/* Prevent stale grabs on unloaded plugins */
|
||||
meta_check_end_modal (plugin_mgr->screen);
|
||||
|
||||
meta_plugin_manager_unload (plugin_mgr);
|
||||
return meta_plugin_manager_load (plugin_mgr);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
mutter_plugin_manager_init (MutterPluginManager *plugin_mgr)
|
||||
static MetaPluginManager *
|
||||
meta_plugin_manager_new (MetaScreen *screen)
|
||||
{
|
||||
return mutter_plugin_manager_load (plugin_mgr);
|
||||
}
|
||||
|
||||
MutterPluginManager *
|
||||
mutter_plugin_manager_new (MetaScreen *screen)
|
||||
{
|
||||
MutterPluginManager *plugin_mgr;
|
||||
MetaPluginManager *plugin_mgr;
|
||||
|
||||
if (!plugin_modules)
|
||||
{
|
||||
@@ -326,43 +354,91 @@ mutter_plugin_manager_new (MetaScreen *screen)
|
||||
NULL);
|
||||
}
|
||||
|
||||
plugin_mgr = g_new0 (MutterPluginManager, 1);
|
||||
plugin_mgr = g_new0 (MetaPluginManager, 1);
|
||||
|
||||
plugin_mgr->screen = screen;
|
||||
|
||||
if (!mutter_plugin_manager_init (plugin_mgr))
|
||||
{
|
||||
g_free (plugin_mgr);
|
||||
plugin_mgr = NULL;
|
||||
}
|
||||
if (screen)
|
||||
g_object_set_data (G_OBJECT (screen), "meta-plugin-manager", plugin_mgr);
|
||||
|
||||
return plugin_mgr;
|
||||
}
|
||||
|
||||
MetaPluginManager *
|
||||
meta_plugin_manager_get_default (void)
|
||||
{
|
||||
if (!default_plugin_manager)
|
||||
{
|
||||
default_plugin_manager = meta_plugin_manager_new (NULL);
|
||||
}
|
||||
|
||||
return default_plugin_manager;
|
||||
}
|
||||
|
||||
MetaPluginManager *
|
||||
meta_plugin_manager_get (MetaScreen *screen)
|
||||
{
|
||||
MetaPluginManager *plugin_mgr;
|
||||
|
||||
plugin_mgr = g_object_get_data (G_OBJECT (screen), "meta-plugin-manager");
|
||||
if (plugin_mgr)
|
||||
return plugin_mgr;
|
||||
|
||||
if (!default_plugin_manager)
|
||||
meta_plugin_manager_get_default ();
|
||||
|
||||
if (!default_plugin_manager->screen)
|
||||
{
|
||||
/* The default plugin manager is so far unused, we can recycle it */
|
||||
default_plugin_manager->screen = screen;
|
||||
g_object_set_data (G_OBJECT (screen), "meta-plugin-manager", default_plugin_manager);
|
||||
|
||||
return default_plugin_manager;
|
||||
}
|
||||
else
|
||||
{
|
||||
return meta_plugin_manager_new (screen);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
mutter_plugin_manager_kill_effect (MutterPluginManager *plugin_mgr,
|
||||
MutterWindow *actor,
|
||||
unsigned long events)
|
||||
meta_plugin_manager_kill_window_effects (MetaPluginManager *plugin_mgr,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
GList *l = plugin_mgr->plugins;
|
||||
|
||||
while (l)
|
||||
{
|
||||
MutterPlugin *plugin = l->data;
|
||||
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||
MetaPlugin *plugin = l->data;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
if (!mutter_plugin_disabled (plugin)
|
||||
&& (mutter_plugin_features (plugin) & events)
|
||||
&& klass->kill_effect)
|
||||
klass->kill_effect (plugin, actor, events);
|
||||
if (!meta_plugin_disabled (plugin)
|
||||
&& klass->kill_window_effects)
|
||||
klass->kill_window_effects (plugin, actor);
|
||||
|
||||
l = l->next;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_plugin_manager_kill_switch_workspace (MetaPluginManager *plugin_mgr)
|
||||
{
|
||||
GList *l = plugin_mgr->plugins;
|
||||
|
||||
while (l)
|
||||
{
|
||||
MetaPlugin *plugin = l->data;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
if (!meta_plugin_disabled (plugin)
|
||||
&& (meta_plugin_features (plugin) & META_PLUGIN_SWITCH_WORKSPACE)
|
||||
&& klass->kill_switch_workspace)
|
||||
klass->kill_switch_workspace (plugin);
|
||||
|
||||
l = l->next;
|
||||
}
|
||||
}
|
||||
|
||||
#define ALL_BUT_SWITCH \
|
||||
MUTTER_PLUGIN_ALL_EFFECTS & \
|
||||
~MUTTER_PLUGIN_SWITCH_WORKSPACE
|
||||
/*
|
||||
* Public method that the compositor hooks into for events that require
|
||||
* no additional parameters.
|
||||
@@ -373,53 +449,55 @@ mutter_plugin_manager_kill_effect (MutterPluginManager *plugin_mgr,
|
||||
* appropriate post-effect cleanup is carried out.
|
||||
*/
|
||||
gboolean
|
||||
mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
|
||||
MutterWindow *actor,
|
||||
unsigned long event)
|
||||
meta_plugin_manager_event_simple (MetaPluginManager *plugin_mgr,
|
||||
MetaWindowActor *actor,
|
||||
unsigned long event)
|
||||
{
|
||||
GList *l = plugin_mgr->plugins;
|
||||
gboolean retval = FALSE;
|
||||
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
|
||||
|
||||
if (display->display_opening)
|
||||
return FALSE;
|
||||
|
||||
while (l)
|
||||
{
|
||||
MutterPlugin *plugin = l->data;
|
||||
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||
MetaPlugin *plugin = l->data;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
if (!mutter_plugin_disabled (plugin) &&
|
||||
(mutter_plugin_features (plugin) & event))
|
||||
if (!meta_plugin_disabled (plugin) &&
|
||||
(meta_plugin_features (plugin) & event))
|
||||
{
|
||||
retval = TRUE;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case MUTTER_PLUGIN_MINIMIZE:
|
||||
case META_PLUGIN_MINIMIZE:
|
||||
if (klass->minimize)
|
||||
{
|
||||
mutter_plugin_manager_kill_effect (
|
||||
meta_plugin_manager_kill_window_effects (
|
||||
plugin_mgr,
|
||||
actor,
|
||||
ALL_BUT_SWITCH);
|
||||
actor);
|
||||
|
||||
_mutter_plugin_effect_started (plugin);
|
||||
_meta_plugin_effect_started (plugin);
|
||||
klass->minimize (plugin, actor);
|
||||
}
|
||||
break;
|
||||
case MUTTER_PLUGIN_MAP:
|
||||
case META_PLUGIN_MAP:
|
||||
if (klass->map)
|
||||
{
|
||||
mutter_plugin_manager_kill_effect (
|
||||
meta_plugin_manager_kill_window_effects (
|
||||
plugin_mgr,
|
||||
actor,
|
||||
ALL_BUT_SWITCH);
|
||||
actor);
|
||||
|
||||
_mutter_plugin_effect_started (plugin);
|
||||
_meta_plugin_effect_started (plugin);
|
||||
klass->map (plugin, actor);
|
||||
}
|
||||
break;
|
||||
case MUTTER_PLUGIN_DESTROY:
|
||||
case META_PLUGIN_DESTROY:
|
||||
if (klass->destroy)
|
||||
{
|
||||
_mutter_plugin_effect_started (plugin);
|
||||
_meta_plugin_effect_started (plugin);
|
||||
klass->destroy (plugin, actor);
|
||||
}
|
||||
break;
|
||||
@@ -444,52 +522,54 @@ mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
|
||||
* appropriate post-effect cleanup is carried out.
|
||||
*/
|
||||
gboolean
|
||||
mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
|
||||
MutterWindow *actor,
|
||||
unsigned long event,
|
||||
gint target_x,
|
||||
gint target_y,
|
||||
gint target_width,
|
||||
gint target_height)
|
||||
meta_plugin_manager_event_maximize (MetaPluginManager *plugin_mgr,
|
||||
MetaWindowActor *actor,
|
||||
unsigned long event,
|
||||
gint target_x,
|
||||
gint target_y,
|
||||
gint target_width,
|
||||
gint target_height)
|
||||
{
|
||||
GList *l = plugin_mgr->plugins;
|
||||
gboolean retval = FALSE;
|
||||
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
|
||||
|
||||
if (display->display_opening)
|
||||
return FALSE;
|
||||
|
||||
while (l)
|
||||
{
|
||||
MutterPlugin *plugin = l->data;
|
||||
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||
MetaPlugin *plugin = l->data;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
if (!mutter_plugin_disabled (plugin) &&
|
||||
(mutter_plugin_features (plugin) & event))
|
||||
if (!meta_plugin_disabled (plugin) &&
|
||||
(meta_plugin_features (plugin) & event))
|
||||
{
|
||||
retval = TRUE;
|
||||
|
||||
switch (event)
|
||||
{
|
||||
case MUTTER_PLUGIN_MAXIMIZE:
|
||||
case META_PLUGIN_MAXIMIZE:
|
||||
if (klass->maximize)
|
||||
{
|
||||
mutter_plugin_manager_kill_effect (
|
||||
meta_plugin_manager_kill_window_effects (
|
||||
plugin_mgr,
|
||||
actor,
|
||||
ALL_BUT_SWITCH);
|
||||
actor);
|
||||
|
||||
_mutter_plugin_effect_started (plugin);
|
||||
_meta_plugin_effect_started (plugin);
|
||||
klass->maximize (plugin, actor,
|
||||
target_x, target_y,
|
||||
target_width, target_height);
|
||||
}
|
||||
break;
|
||||
case MUTTER_PLUGIN_UNMAXIMIZE:
|
||||
case META_PLUGIN_UNMAXIMIZE:
|
||||
if (klass->unmaximize)
|
||||
{
|
||||
mutter_plugin_manager_kill_effect (
|
||||
meta_plugin_manager_kill_window_effects (
|
||||
plugin_mgr,
|
||||
actor,
|
||||
ALL_BUT_SWITCH);
|
||||
actor);
|
||||
|
||||
_mutter_plugin_effect_started (plugin);
|
||||
_meta_plugin_effect_started (plugin);
|
||||
klass->unmaximize (plugin, actor,
|
||||
target_x, target_y,
|
||||
target_width, target_height);
|
||||
@@ -515,34 +595,33 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
|
||||
* appropriate post-effect cleanup is carried out.
|
||||
*/
|
||||
gboolean
|
||||
mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
|
||||
const GList **actors,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction)
|
||||
meta_plugin_manager_switch_workspace (MetaPluginManager *plugin_mgr,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction)
|
||||
{
|
||||
GList *l = plugin_mgr->plugins;
|
||||
gboolean retval = FALSE;
|
||||
MetaDisplay *display = meta_screen_get_display (plugin_mgr->screen);
|
||||
|
||||
if (display->display_opening)
|
||||
return FALSE;
|
||||
|
||||
while (l)
|
||||
{
|
||||
MutterPlugin *plugin = l->data;
|
||||
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||
MetaPlugin *plugin = l->data;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
if (!mutter_plugin_disabled (plugin) &&
|
||||
(mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE) &&
|
||||
(actors && *actors))
|
||||
if (!meta_plugin_disabled (plugin) &&
|
||||
(meta_plugin_features (plugin) & META_PLUGIN_SWITCH_WORKSPACE))
|
||||
{
|
||||
if (klass->switch_workspace)
|
||||
{
|
||||
retval = TRUE;
|
||||
mutter_plugin_manager_kill_effect (
|
||||
plugin_mgr,
|
||||
MUTTER_WINDOW ((*actors)->data),
|
||||
MUTTER_PLUGIN_SWITCH_WORKSPACE);
|
||||
meta_plugin_manager_kill_switch_workspace (plugin_mgr);
|
||||
|
||||
_mutter_plugin_effect_started (plugin);
|
||||
klass->switch_workspace (plugin, actors, from, to, direction);
|
||||
_meta_plugin_effect_started (plugin);
|
||||
klass->switch_workspace (plugin, from, to, direction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -561,23 +640,43 @@ mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
|
||||
* appropriate post-effect cleanup is carried out.
|
||||
*/
|
||||
gboolean
|
||||
mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr,
|
||||
XEvent *xev)
|
||||
meta_plugin_manager_xevent_filter (MetaPluginManager *plugin_mgr,
|
||||
XEvent *xev)
|
||||
{
|
||||
GList *l;
|
||||
gboolean have_plugin_xevent_func;
|
||||
|
||||
if (!plugin_mgr)
|
||||
return FALSE;
|
||||
|
||||
l = plugin_mgr->plugins;
|
||||
|
||||
/* We need to make sure that clutter gets certain events, like
|
||||
* ConfigureNotify on the stage window. If there is a plugin that
|
||||
* provides an xevent_filter function, then it's the responsibility
|
||||
* of that plugin to pass events to Clutter. Otherwise, we send the
|
||||
* event directly to Clutter ourselves.
|
||||
*
|
||||
* What happens if there are two plugins with xevent_filter functions
|
||||
* is undefined; in general, multiple competing plugins are something
|
||||
* we don't support well or care much about.
|
||||
*
|
||||
* FIXME: Really, we should just always handle sending the event to
|
||||
* clutter if a plugin doesn't report the event as handled by
|
||||
* returning TRUE, but it doesn't seem worth breaking compatibility
|
||||
* of the plugin interface right now to achieve this; the way it is
|
||||
* now works fine in practice.
|
||||
*/
|
||||
have_plugin_xevent_func = FALSE;
|
||||
|
||||
while (l)
|
||||
{
|
||||
MutterPlugin *plugin = l->data;
|
||||
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
|
||||
MetaPlugin *plugin = l->data;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
if (klass->xevent_filter)
|
||||
{
|
||||
have_plugin_xevent_func = TRUE;
|
||||
if (klass->xevent_filter (plugin, xev) == TRUE)
|
||||
return TRUE;
|
||||
}
|
||||
@@ -585,6 +684,8 @@ mutter_plugin_manager_xevent_filter (MutterPluginManager *plugin_mgr,
|
||||
l = l->next;
|
||||
}
|
||||
|
||||
if (!have_plugin_xevent_func)
|
||||
return clutter_x11_handle_event (xev) != CLUTTER_X11_FILTER_CONTINUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
78
src/compositor/meta-plugin-manager.h
Normal file
78
src/compositor/meta-plugin-manager.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Intel Corp.
|
||||
*
|
||||
* Author: Tomas Frydrych <tf@linux.intel.com>
|
||||
*
|
||||
* 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_PLUGIN_MANAGER_H_
|
||||
#define META_PLUGIN_MANAGER_H_
|
||||
|
||||
#include "types.h"
|
||||
#include "screen.h"
|
||||
|
||||
#define META_PLUGIN_FROM_MANAGER_
|
||||
#include "meta-plugin.h"
|
||||
#undef META_PLUGIN_FROM_MANAGER_
|
||||
|
||||
#define META_PLUGIN_MINIMIZE (1<<0)
|
||||
#define META_PLUGIN_MAXIMIZE (1<<1)
|
||||
#define META_PLUGIN_UNMAXIMIZE (1<<2)
|
||||
#define META_PLUGIN_MAP (1<<3)
|
||||
#define META_PLUGIN_DESTROY (1<<4)
|
||||
#define META_PLUGIN_SWITCH_WORKSPACE (1<<5)
|
||||
|
||||
#define META_PLUGIN_ALL_EFFECTS (~0)
|
||||
|
||||
/**
|
||||
* MetaPluginManager: (skip)
|
||||
*
|
||||
*/
|
||||
typedef struct MetaPluginManager MetaPluginManager;
|
||||
|
||||
MetaPluginManager * meta_plugin_manager_get (MetaScreen *screen);
|
||||
MetaPluginManager * meta_plugin_manager_get_default (void);
|
||||
|
||||
gboolean meta_plugin_manager_load (MetaPluginManager *mgr);
|
||||
gboolean meta_plugin_manager_initialize (MetaPluginManager *plugin_mgr);
|
||||
gboolean meta_plugin_manager_event_simple (MetaPluginManager *mgr,
|
||||
MetaWindowActor *actor,
|
||||
unsigned long event);
|
||||
|
||||
gboolean meta_plugin_manager_event_maximize (MetaPluginManager *mgr,
|
||||
MetaWindowActor *actor,
|
||||
unsigned long event,
|
||||
gint target_x,
|
||||
gint target_y,
|
||||
gint target_width,
|
||||
gint target_height);
|
||||
void meta_plugin_manager_update_workspaces (MetaPluginManager *mgr);
|
||||
|
||||
void meta_plugin_manager_update_workspace (MetaPluginManager *mgr,
|
||||
MetaWorkspace *w);
|
||||
|
||||
gboolean meta_plugin_manager_switch_workspace (MetaPluginManager *mgr,
|
||||
gint from,
|
||||
gint to,
|
||||
MetaMotionDirection direction);
|
||||
|
||||
gboolean meta_plugin_manager_xevent_filter (MetaPluginManager *mgr,
|
||||
XEvent *xev);
|
||||
|
||||
#endif
|
615
src/compositor/meta-plugin.c
Normal file
615
src/compositor/meta-plugin.c
Normal file
@@ -0,0 +1,615 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Intel Corp.
|
||||
*
|
||||
* Author: Tomas Frydrych <tf@linux.intel.com>
|
||||
*
|
||||
* 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 "meta-plugin.h"
|
||||
#include "screen.h"
|
||||
#include "display.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
|
||||
#include "compositor-private.h"
|
||||
#include "meta-window-actor-private.h"
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE (MetaPlugin, meta_plugin, G_TYPE_OBJECT);
|
||||
|
||||
#define META_PLUGIN_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_PLUGIN, MetaPluginPrivate))
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_SCREEN,
|
||||
PROP_PARAMS,
|
||||
PROP_FEATURES,
|
||||
PROP_DISABLED,
|
||||
PROP_DEBUG_MODE,
|
||||
};
|
||||
|
||||
struct _MetaPluginPrivate
|
||||
{
|
||||
MetaScreen *screen;
|
||||
gchar *params;
|
||||
gulong features;
|
||||
|
||||
gint running;
|
||||
|
||||
gboolean disabled : 1;
|
||||
gboolean debug : 1;
|
||||
};
|
||||
|
||||
static void
|
||||
meta_plugin_dispose (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (meta_plugin_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_plugin_finalize (GObject *object)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (object)->priv;
|
||||
|
||||
g_free (priv->params);
|
||||
priv->params = NULL;
|
||||
|
||||
G_OBJECT_CLASS (meta_plugin_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_plugin_parse_params (MetaPlugin *plugin)
|
||||
{
|
||||
char *p;
|
||||
gulong features = 0;
|
||||
MetaPluginPrivate *priv = plugin->priv;
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
/*
|
||||
* Feature flags: identify events that the plugin can handle; a plugin can
|
||||
* handle one or more events.
|
||||
*/
|
||||
if (klass->minimize)
|
||||
features |= META_PLUGIN_MINIMIZE;
|
||||
|
||||
if (klass->maximize)
|
||||
features |= META_PLUGIN_MAXIMIZE;
|
||||
|
||||
if (klass->unmaximize)
|
||||
features |= META_PLUGIN_UNMAXIMIZE;
|
||||
|
||||
if (klass->map)
|
||||
features |= META_PLUGIN_MAP;
|
||||
|
||||
if (klass->destroy)
|
||||
features |= META_PLUGIN_DESTROY;
|
||||
|
||||
if (klass->switch_workspace)
|
||||
features |= META_PLUGIN_SWITCH_WORKSPACE;
|
||||
|
||||
if (priv->params)
|
||||
{
|
||||
gboolean debug = FALSE;
|
||||
|
||||
if ((p = strstr (priv->params, "disable:")))
|
||||
{
|
||||
gchar *d = g_strdup (p+8);
|
||||
|
||||
p = strchr (d, ';');
|
||||
|
||||
if (p)
|
||||
*p = 0;
|
||||
|
||||
if (strstr (d, "minimize"))
|
||||
features &= ~ META_PLUGIN_MINIMIZE;
|
||||
|
||||
if (strstr (d, "maximize"))
|
||||
features &= ~ META_PLUGIN_MAXIMIZE;
|
||||
|
||||
if (strstr (d, "unmaximize"))
|
||||
features &= ~ META_PLUGIN_UNMAXIMIZE;
|
||||
|
||||
if (strstr (d, "map"))
|
||||
features &= ~ META_PLUGIN_MAP;
|
||||
|
||||
if (strstr (d, "destroy"))
|
||||
features &= ~ META_PLUGIN_DESTROY;
|
||||
|
||||
if (strstr (d, "switch-workspace"))
|
||||
features &= ~META_PLUGIN_SWITCH_WORKSPACE;
|
||||
|
||||
g_free (d);
|
||||
}
|
||||
|
||||
if (strstr (priv->params, "debug"))
|
||||
debug = TRUE;
|
||||
|
||||
if (debug != priv->debug)
|
||||
{
|
||||
priv->debug = debug;
|
||||
|
||||
g_object_notify (G_OBJECT (plugin), "debug-mode");
|
||||
}
|
||||
}
|
||||
|
||||
if (features != priv->features)
|
||||
{
|
||||
priv->features = features;
|
||||
|
||||
g_object_notify (G_OBJECT (plugin), "features");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_plugin_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (object)->priv;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_SCREEN:
|
||||
priv->screen = g_value_get_object (value);
|
||||
break;
|
||||
case PROP_PARAMS:
|
||||
priv->params = g_value_dup_string (value);
|
||||
meta_plugin_parse_params (META_PLUGIN (object));
|
||||
break;
|
||||
case PROP_DISABLED:
|
||||
priv->disabled = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_DEBUG_MODE:
|
||||
priv->debug = g_value_get_boolean (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_plugin_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (object)->priv;
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_SCREEN:
|
||||
g_value_set_object (value, priv->screen);
|
||||
break;
|
||||
case PROP_PARAMS:
|
||||
g_value_set_string (value, priv->params);
|
||||
break;
|
||||
case PROP_DISABLED:
|
||||
g_value_set_boolean (value, priv->disabled);
|
||||
break;
|
||||
case PROP_DEBUG_MODE:
|
||||
g_value_set_boolean (value, priv->debug);
|
||||
break;
|
||||
case PROP_FEATURES:
|
||||
g_value_set_ulong (value, priv->features);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
meta_plugin_class_init (MetaPluginClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
gobject_class->finalize = meta_plugin_finalize;
|
||||
gobject_class->dispose = meta_plugin_dispose;
|
||||
gobject_class->set_property = meta_plugin_set_property;
|
||||
gobject_class->get_property = meta_plugin_get_property;
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_SCREEN,
|
||||
g_param_spec_object ("screen",
|
||||
"MetaScreen",
|
||||
"MetaScreen",
|
||||
META_TYPE_SCREEN,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_PARAMS,
|
||||
g_param_spec_string ("params",
|
||||
"Parameters",
|
||||
"Plugin Parameters",
|
||||
NULL,
|
||||
G_PARAM_READWRITE |
|
||||
G_PARAM_CONSTRUCT));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_FEATURES,
|
||||
g_param_spec_ulong ("features",
|
||||
"Features",
|
||||
"Plugin Features",
|
||||
0 , G_MAXULONG, 0,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_DISABLED,
|
||||
g_param_spec_boolean ("disabled",
|
||||
"Plugin disabled",
|
||||
"Plugin disabled",
|
||||
FALSE,
|
||||
G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_DEBUG_MODE,
|
||||
g_param_spec_boolean ("debug-mode",
|
||||
"Debug Mode",
|
||||
"Debug Mode",
|
||||
FALSE,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_type_class_add_private (gobject_class, sizeof (MetaPluginPrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
meta_plugin_init (MetaPlugin *self)
|
||||
{
|
||||
MetaPluginPrivate *priv;
|
||||
|
||||
self->priv = priv = META_PLUGIN_GET_PRIVATE (self);
|
||||
}
|
||||
|
||||
gulong
|
||||
meta_plugin_features (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return priv->features;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_plugin_disabled (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return priv->disabled;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_plugin_running (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return (priv->running > 0);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_plugin_debug_mode (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return priv->debug;
|
||||
}
|
||||
|
||||
const MetaPluginInfo *
|
||||
meta_plugin_get_info (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginClass *klass = META_PLUGIN_GET_CLASS (plugin);
|
||||
|
||||
if (klass && klass->plugin_info)
|
||||
return klass->plugin_info (plugin);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_overlay_group (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_overlay_group_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_stage (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_stage_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_window_group (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_window_group_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_background_actor (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_background_actor_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
/**
|
||||
* _meta_plugin_effect_started:
|
||||
* @plugin: the plugin
|
||||
*
|
||||
* Mark that an effect has started for the plugin. This is called
|
||||
* internally by MetaPluginManager.
|
||||
*/
|
||||
void
|
||||
_meta_plugin_effect_started (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
priv->running++;
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||
|
||||
if (priv->running-- < 0)
|
||||
{
|
||||
g_warning ("Error in running effect accounting, adjusting.");
|
||||
priv->running = 0;
|
||||
}
|
||||
|
||||
meta_switch_workspace_completed (screen);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_plugin_window_effect_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor,
|
||||
unsigned long event)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
if (priv->running-- < 0)
|
||||
{
|
||||
g_warning ("Error in running effect accounting, adjusting.");
|
||||
priv->running = 0;
|
||||
}
|
||||
|
||||
if (!actor)
|
||||
{
|
||||
const MetaPluginInfo *info;
|
||||
const gchar *name = NULL;
|
||||
|
||||
if (plugin && (info = meta_plugin_get_info (plugin)))
|
||||
name = info->name;
|
||||
|
||||
g_warning ("Plugin [%s] passed NULL for actor!",
|
||||
name ? name : "unknown");
|
||||
}
|
||||
|
||||
meta_window_actor_effect_completed (actor, event);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_minimize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_MINIMIZE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_maximize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_MAXIMIZE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_unmaximize_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_UNMAXIMIZE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_map_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_MAP);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_destroy_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor)
|
||||
{
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_DESTROY);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_query_screen_size (MetaPlugin *plugin,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
meta_screen_get_size (priv->screen, width, height);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_reactive (MetaPlugin *plugin,
|
||||
gboolean reactive)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = priv->screen;
|
||||
|
||||
if (reactive)
|
||||
meta_set_stage_input_region (screen, None);
|
||||
else
|
||||
meta_empty_stage_input_region (screen);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_input_area (MetaPlugin *plugin,
|
||||
gint x, gint y, gint width, gint height)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = priv->screen;
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
XRectangle rect;
|
||||
XserverRegion region;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
region = XFixesCreateRegion (xdpy, &rect, 1);
|
||||
meta_set_stage_input_region (screen, region);
|
||||
XFixesDestroyRegion (xdpy, region);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_input_region (MetaPlugin *plugin,
|
||||
XserverRegion region)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = priv->screen;
|
||||
|
||||
meta_set_stage_input_region (screen, region);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_get_window_actors:
|
||||
* @plugin: A #MetaPlugin
|
||||
*
|
||||
* This function returns all of the #MetaWindowActor objects referenced by Mutter, including
|
||||
* override-redirect windows. The returned list is a snapshot of Mutter's current
|
||||
* stacking order, with the topmost window last.
|
||||
*
|
||||
* The 'restacked' signal of #MetaScreen signals when this value has changed.
|
||||
*
|
||||
* Returns: (transfer none) (element-type MetaWindowActor): Windows in stacking order, topmost last
|
||||
*/
|
||||
GList *
|
||||
meta_plugin_get_window_actors (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_window_actors (priv->screen);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_begin_modal:
|
||||
* @plugin: a #MetaPlugin
|
||||
* @grab_window: the X window to grab the keyboard and mouse on
|
||||
* @cursor: the cursor to use for the pointer grab, or None,
|
||||
* to use the normal cursor for the grab window and
|
||||
* its descendants.
|
||||
* @options: flags that modify the behavior of the modal grab
|
||||
* @timestamp: the timestamp used for establishing grabs
|
||||
*
|
||||
* This function is used to grab the keyboard and mouse for the exclusive
|
||||
* use of the plugin. Correct operation requires that both the keyboard
|
||||
* and mouse are grabbed, or thing will break. (In particular, other
|
||||
* passive X grabs in Meta can trigger but not be handled by the normal
|
||||
* keybinding handling code.) However, the plugin can establish the keyboard
|
||||
* and/or mouse grabs ahead of time and pass in the
|
||||
* %META_MODAL_POINTER_ALREADY_GRABBED and/or %META_MODAL_KEYBOARD_ALREADY_GRABBED
|
||||
* options. This facility is provided for two reasons: first to allow using
|
||||
* this function to establish modality after a passive grab, and second to
|
||||
* allow using obscure features of XGrabPointer() and XGrabKeyboard() without
|
||||
* having to add them to this API.
|
||||
*
|
||||
* Return value: whether we successfully grabbed the keyboard and
|
||||
* mouse and made the plugin modal.
|
||||
*/
|
||||
gboolean
|
||||
meta_plugin_begin_modal (MetaPlugin *plugin,
|
||||
Window grab_window,
|
||||
Cursor cursor,
|
||||
MetaModalOptions options,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_begin_modal_for_plugin (priv->screen, plugin,
|
||||
grab_window, cursor, options, timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_end_modal
|
||||
* @plugin: a #MetaPlugin
|
||||
* @timestamp: the time used for releasing grabs
|
||||
*
|
||||
* Ends the modal operation begun with meta_plugin_begin_modal(). This
|
||||
* ungrabs both the mouse and keyboard even when
|
||||
* %META_MODAL_POINTER_ALREADY_GRABBED or
|
||||
* %META_MODAL_KEYBOARD_ALREADY_GRABBED were provided as options
|
||||
* when beginnning the modal operation.
|
||||
*/
|
||||
void
|
||||
meta_plugin_end_modal (MetaPlugin *plugin,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
meta_end_modal_for_plugin (priv->screen, plugin, timestamp);
|
||||
}
|
||||
|
||||
Display *
|
||||
meta_plugin_get_xdisplay (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaDisplay *display = meta_screen_get_display (priv->screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
|
||||
return xdpy;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_get_screen:
|
||||
* @plugin: a #MetaPlugin
|
||||
*
|
||||
* Gets the #MetaScreen corresponding to a plugin. Each plugin instance
|
||||
* is associated with exactly one screen; if Metacity is managing
|
||||
* multiple screens, multiple plugin instances will be created.
|
||||
*
|
||||
* Return value: (transfer none): the #MetaScreen for the plugin
|
||||
*/
|
||||
MetaScreen *
|
||||
meta_plugin_get_screen (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return priv->screen;
|
||||
}
|
||||
|
67
src/compositor/meta-shadow-factory-private.h
Normal file
67
src/compositor/meta-shadow-factory-private.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* MetaShadowFactory:
|
||||
*
|
||||
* Create and cache shadow textures for arbitrary window shapes
|
||||
*
|
||||
* Copyright (C) 2010 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_SHADOW_FACTORY_PRIVATE_H__
|
||||
#define __META_SHADOW_FACTORY_PRIVATE_H__
|
||||
|
||||
#include <cairo.h>
|
||||
#include <clutter/clutter.h>
|
||||
#include "meta-window-shape.h"
|
||||
#include "meta-shadow-factory.h"
|
||||
|
||||
/**
|
||||
* MetaShadow:
|
||||
* #MetaShadow holds a shadow texture along with information about how to
|
||||
* apply that texture to draw a window texture. (E.g., it knows how big the
|
||||
* unscaled borders are on each side of the shadow texture.)
|
||||
*/
|
||||
typedef struct _MetaShadow MetaShadow;
|
||||
|
||||
MetaShadow *meta_shadow_ref (MetaShadow *shadow);
|
||||
void meta_shadow_unref (MetaShadow *shadow);
|
||||
CoglHandle meta_shadow_get_texture (MetaShadow *shadow);
|
||||
void meta_shadow_paint (MetaShadow *shadow,
|
||||
int window_x,
|
||||
int window_y,
|
||||
int window_width,
|
||||
int window_height,
|
||||
guint8 opacity,
|
||||
cairo_region_t *clip);
|
||||
void meta_shadow_get_bounds (MetaShadow *shadow,
|
||||
int window_x,
|
||||
int window_y,
|
||||
int window_width,
|
||||
int window_height,
|
||||
cairo_rectangle_int_t *bounds);
|
||||
|
||||
MetaShadowFactory *meta_shadow_factory_new (void);
|
||||
|
||||
MetaShadow *meta_shadow_factory_get_shadow (MetaShadowFactory *factory,
|
||||
MetaWindowShape *shape,
|
||||
int width,
|
||||
int height,
|
||||
const char *class_name,
|
||||
gboolean focused);
|
||||
|
||||
#endif /* __META_SHADOW_FACTORY_PRIVATE_H__ */
|
989
src/compositor/meta-shadow-factory.c
Normal file
989
src/compositor/meta-shadow-factory.c
Normal file
@@ -0,0 +1,989 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* MetaShadowFactory:
|
||||
*
|
||||
* Create and cache shadow textures for abritrary window shapes
|
||||
*
|
||||
* Copyright 2010 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
#include <config.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "cogl-utils.h"
|
||||
#include "meta-shadow-factory-private.h"
|
||||
#include "region-utils.h"
|
||||
|
||||
/* This file implements blurring the shape of a window to produce a
|
||||
* shadow texture. The details are discussed below; a quick summary
|
||||
* of the optimizations we use:
|
||||
*
|
||||
* - If the window shape is along the lines of a rounded rectangle -
|
||||
* a rectangular center portion with stuff at the corners - then
|
||||
* the blur of this - the shadow - can also be represented as a
|
||||
* 9-sliced texture and the same texture can be used for different
|
||||
* size.
|
||||
*
|
||||
* - We use the fact that a Gaussian blur is separable to do a
|
||||
* 2D blur as 1D blur of the rows followed by a 1D blur of the
|
||||
* columns.
|
||||
*
|
||||
* - For better cache efficiency, we blur rows, transpose the image
|
||||
* in blocks, blur rows again, and then transpose back.
|
||||
*
|
||||
* - We approximate the 1D gaussian blur as 3 successive box filters.
|
||||
*/
|
||||
|
||||
typedef struct _MetaShadowCacheKey MetaShadowCacheKey;
|
||||
typedef struct _MetaShadowClassInfo MetaShadowClassInfo;
|
||||
|
||||
struct _MetaShadowCacheKey
|
||||
{
|
||||
MetaWindowShape *shape;
|
||||
int radius;
|
||||
int top_fade;
|
||||
};
|
||||
|
||||
struct _MetaShadow
|
||||
{
|
||||
int ref_count;
|
||||
|
||||
MetaShadowFactory *factory;
|
||||
MetaShadowCacheKey key;
|
||||
CoglHandle texture;
|
||||
CoglHandle material;
|
||||
|
||||
/* The outer order is the distance the shadow extends outside the window
|
||||
* shape; the inner border is the unscaled portion inside the window
|
||||
* shape */
|
||||
int outer_border_top;
|
||||
int inner_border_top;
|
||||
int outer_border_right;
|
||||
int inner_border_right;
|
||||
int outer_border_bottom;
|
||||
int inner_border_bottom;
|
||||
int outer_border_left;
|
||||
int inner_border_left;
|
||||
|
||||
guint scale_width : 1;
|
||||
guint scale_height : 1;
|
||||
};
|
||||
|
||||
struct _MetaShadowClassInfo
|
||||
{
|
||||
const char *name; /* const so we can reuse for static definitions */
|
||||
MetaShadowParams focused;
|
||||
MetaShadowParams unfocused;
|
||||
};
|
||||
|
||||
struct _MetaShadowFactory
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/* MetaShadowCacheKey => MetaShadow; the shadows are not referenced
|
||||
* by the factory, they are simply removed from the table when freed */
|
||||
GHashTable *shadows;
|
||||
|
||||
/* class name => MetaShadowClassInfo */
|
||||
GHashTable *shadow_classes;
|
||||
};
|
||||
|
||||
struct _MetaShadowFactoryClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
CHANGED,
|
||||
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
/* The first element in this array also defines the default parameters
|
||||
* for newly created classes */
|
||||
MetaShadowClassInfo default_shadow_classes[] = {
|
||||
{ "normal", { 12, -1, 0, 8, 255 }, { 6, -1, 0, 4, 255 } },
|
||||
{ "dialog", { 12, -1, 0, 8, 255 }, { 6, -1, 0, 4, 255 } },
|
||||
{ "modal_dialog", { 12, -1, 0, 8, 255 }, { 6, -1, 0, 4, 255 } },
|
||||
{ "utility", { 12, -1, 0, 8, 255 }, { 6, -1, 0, 4, 255 } },
|
||||
{ "border", { 12, -1, 0, 8, 255 }, { 6, -1, 0, 4, 255 } },
|
||||
{ "menu", { 12, -1, 0, 8, 255 }, { 6, -1, 0, 4, 255 } },
|
||||
|
||||
{ "popup-menu", { 6, -1, 0, 4, 255 }, { 6, -1, 0, 4, 255 } },
|
||||
|
||||
{ "dropdown-menu", { 6, 25, 0, 4, 255 }, { 6, 100, 0, 4, 255 } },
|
||||
{ "attached", { 6, 25, 0, 4, 255 }, { 6, 100, 0, 4, 255 } }
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (MetaShadowFactory, meta_shadow_factory, G_TYPE_OBJECT);
|
||||
|
||||
static guint
|
||||
meta_shadow_cache_key_hash (gconstpointer val)
|
||||
{
|
||||
const MetaShadowCacheKey *key = val;
|
||||
|
||||
return 59 * key->radius + 67 * key->top_fade + 73 * meta_window_shape_hash (key->shape);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_shadow_cache_key_equal (gconstpointer a,
|
||||
gconstpointer b)
|
||||
{
|
||||
const MetaShadowCacheKey *key_a = a;
|
||||
const MetaShadowCacheKey *key_b = b;
|
||||
|
||||
return (key_a->radius == key_b->radius && key_a->top_fade == key_b->top_fade &&
|
||||
meta_window_shape_equal (key_a->shape, key_b->shape));
|
||||
}
|
||||
|
||||
MetaShadow *
|
||||
meta_shadow_ref (MetaShadow *shadow)
|
||||
{
|
||||
shadow->ref_count++;
|
||||
|
||||
return shadow;
|
||||
}
|
||||
|
||||
void
|
||||
meta_shadow_unref (MetaShadow *shadow)
|
||||
{
|
||||
shadow->ref_count--;
|
||||
if (shadow->ref_count == 0)
|
||||
{
|
||||
if (shadow->factory)
|
||||
{
|
||||
g_hash_table_remove (shadow->factory->shadows,
|
||||
&shadow->key);
|
||||
}
|
||||
|
||||
meta_window_shape_unref (shadow->key.shape);
|
||||
cogl_handle_unref (shadow->texture);
|
||||
cogl_handle_unref (shadow->material);
|
||||
|
||||
g_slice_free (MetaShadow, shadow);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shadow_paint:
|
||||
* @window_x: x position of the region to paint a shadow for
|
||||
* @window_y: y position of the region to paint a shadow for
|
||||
* @window_width: actual width of the region to paint a shadow for
|
||||
* @window_height: actual height of the region to paint a shadow for
|
||||
* @clip: (allow-none): if non-%NULL specifies the visible portion
|
||||
* of the shadow. Drawing won't be strictly clipped to this region
|
||||
* but it will be used to optimize what is drawn.
|
||||
*
|
||||
* Paints the shadow at the given position, for the specified actual
|
||||
* size of the region. (Since a #MetaShadow can be shared between
|
||||
* different sizes with the same extracted #MetaWindowShape the
|
||||
* size needs to be passed in here.)
|
||||
*/
|
||||
void
|
||||
meta_shadow_paint (MetaShadow *shadow,
|
||||
int window_x,
|
||||
int window_y,
|
||||
int window_width,
|
||||
int window_height,
|
||||
guint8 opacity,
|
||||
cairo_region_t *clip)
|
||||
{
|
||||
float texture_width = cogl_texture_get_width (shadow->texture);
|
||||
float texture_height = cogl_texture_get_height (shadow->texture);
|
||||
int i, j;
|
||||
float src_x[4];
|
||||
float src_y[4];
|
||||
int dest_x[4];
|
||||
int dest_y[4];
|
||||
int n_x, n_y;
|
||||
|
||||
cogl_material_set_color4ub (shadow->material,
|
||||
opacity, opacity, opacity, opacity);
|
||||
|
||||
cogl_set_source (shadow->material);
|
||||
|
||||
if (shadow->scale_width)
|
||||
{
|
||||
n_x = 3;
|
||||
|
||||
src_x[0] = 0.0;
|
||||
src_x[1] = (shadow->inner_border_left + shadow->outer_border_left) / texture_width;
|
||||
src_x[2] = (texture_width - (shadow->inner_border_right + shadow->outer_border_right)) / texture_width;
|
||||
src_x[3] = 1.0;
|
||||
|
||||
dest_x[0] = window_x - shadow->outer_border_left;
|
||||
dest_x[1] = window_x + shadow->inner_border_left;
|
||||
dest_x[2] = window_x + window_width - shadow->inner_border_right;
|
||||
dest_x[3] = window_x + window_width + shadow->outer_border_right;
|
||||
}
|
||||
else
|
||||
{
|
||||
n_x = 1;
|
||||
|
||||
src_x[0] = 0.0;
|
||||
src_x[1] = 1.0;
|
||||
|
||||
dest_x[0] = window_x - shadow->outer_border_left;
|
||||
dest_x[1] = window_x + window_width + shadow->outer_border_right;
|
||||
}
|
||||
|
||||
if (shadow->scale_height)
|
||||
{
|
||||
n_y = 3;
|
||||
|
||||
src_y[0] = 0.0;
|
||||
src_y[1] = (shadow->inner_border_top + shadow->outer_border_top) / texture_height;
|
||||
src_y[2] = (texture_height - (shadow->inner_border_bottom + shadow->outer_border_bottom)) / texture_height;
|
||||
src_y[3] = 1.0;
|
||||
|
||||
dest_y[0] = window_y - shadow->outer_border_top;
|
||||
dest_y[1] = window_y + shadow->inner_border_top;
|
||||
dest_y[2] = window_y + window_height - shadow->inner_border_bottom;
|
||||
dest_y[3] = window_y + window_height + shadow->outer_border_bottom;
|
||||
}
|
||||
else
|
||||
{
|
||||
n_y = 1;
|
||||
|
||||
src_y[0] = 0.0;
|
||||
src_y[1] = 1.0;
|
||||
|
||||
dest_y[0] = window_y - shadow->outer_border_top;
|
||||
dest_y[1] = window_y + window_height + shadow->outer_border_bottom;
|
||||
}
|
||||
|
||||
for (j = 0; j < n_y; j++)
|
||||
{
|
||||
cairo_rectangle_int_t dest_rect;
|
||||
dest_rect.y = dest_y[j];
|
||||
dest_rect.height = dest_y[j + 1] - dest_y[j];
|
||||
|
||||
for (i = 0; i < n_x; i++)
|
||||
{
|
||||
cairo_region_overlap_t overlap;
|
||||
|
||||
dest_rect.x = dest_x[i];
|
||||
dest_rect.width = dest_x[i + 1] - dest_x[i];
|
||||
|
||||
if (clip)
|
||||
overlap = cairo_region_contains_rectangle (clip, &dest_rect);
|
||||
else
|
||||
overlap = CAIRO_REGION_OVERLAP_PART;
|
||||
|
||||
if (overlap != CAIRO_REGION_OVERLAP_OUT)
|
||||
cogl_rectangle_with_texture_coords (dest_x[i], dest_y[j],
|
||||
dest_x[i + 1], dest_y[j + 1],
|
||||
src_x[i], src_y[j],
|
||||
src_x[i + 1], src_y[j + 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shadow_get_bounds:
|
||||
* @shadow: a #MetaShadow
|
||||
* @window_x: x position of the region to paint a shadow for
|
||||
* @window_y: y position of the region to paint a shadow for
|
||||
* @window_width: actual width of the region to paint a shadow for
|
||||
* @window_height: actual height of the region to paint a shadow for
|
||||
*
|
||||
* Computes the bounds of the pixels that will be affected by
|
||||
* meta_shadow_paints()
|
||||
*/
|
||||
void
|
||||
meta_shadow_get_bounds (MetaShadow *shadow,
|
||||
int window_x,
|
||||
int window_y,
|
||||
int window_width,
|
||||
int window_height,
|
||||
cairo_rectangle_int_t *bounds)
|
||||
{
|
||||
bounds->x = window_x - shadow->outer_border_left;
|
||||
bounds->y = window_x - shadow->outer_border_top;
|
||||
bounds->width = window_width + shadow->outer_border_left + shadow->outer_border_right;
|
||||
bounds->height = window_height + shadow->outer_border_top + shadow->outer_border_bottom;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shadow_class_info_free (MetaShadowClassInfo *class_info)
|
||||
{
|
||||
g_free ((char *)class_info->name);
|
||||
g_slice_free (MetaShadowClassInfo, class_info);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shadow_factory_init (MetaShadowFactory *factory)
|
||||
{
|
||||
guint i;
|
||||
|
||||
factory->shadows = g_hash_table_new (meta_shadow_cache_key_hash,
|
||||
meta_shadow_cache_key_equal);
|
||||
|
||||
factory->shadow_classes = g_hash_table_new_full (g_str_hash,
|
||||
g_str_equal,
|
||||
NULL,
|
||||
(GDestroyNotify)meta_shadow_class_info_free);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (default_shadow_classes); i++)
|
||||
{
|
||||
MetaShadowClassInfo *class_info = g_slice_new (MetaShadowClassInfo);
|
||||
|
||||
*class_info = default_shadow_classes[i];
|
||||
class_info->name = g_strdup (class_info->name);
|
||||
|
||||
g_hash_table_insert (factory->shadow_classes,
|
||||
(char *)class_info->name, class_info);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shadow_factory_finalize (GObject *object)
|
||||
{
|
||||
MetaShadowFactory *factory = META_SHADOW_FACTORY (object);
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
|
||||
/* Detach from the shadows in the table so we won't try to
|
||||
* remove them when they're freed. */
|
||||
g_hash_table_iter_init (&iter, factory->shadows);
|
||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
||||
{
|
||||
MetaShadow *shadow = key;
|
||||
shadow->factory = NULL;
|
||||
}
|
||||
|
||||
g_hash_table_destroy (factory->shadows);
|
||||
g_hash_table_destroy (factory->shadow_classes);
|
||||
|
||||
G_OBJECT_CLASS (meta_shadow_factory_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shadow_factory_class_init (MetaShadowFactoryClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->finalize = meta_shadow_factory_finalize;
|
||||
|
||||
signals[CHANGED] =
|
||||
g_signal_new ("changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
MetaShadowFactory *
|
||||
meta_shadow_factory_new (void)
|
||||
{
|
||||
return g_object_new (META_TYPE_SHADOW_FACTORY, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shadow_factory_get_default:
|
||||
*
|
||||
* Return value: (transfer none): the global singleton shadow factory
|
||||
*/
|
||||
MetaShadowFactory *
|
||||
meta_shadow_factory_get_default (void)
|
||||
{
|
||||
static MetaShadowFactory *factory;
|
||||
|
||||
if (factory == NULL)
|
||||
factory = meta_shadow_factory_new ();
|
||||
|
||||
return factory;
|
||||
}
|
||||
|
||||
/* We emulate a 1D Gaussian blur by using 3 consecutive box blurs;
|
||||
* this produces a result that's within 3% of the original and can be
|
||||
* implemented much faster for large filter sizes because of the
|
||||
* efficiency of implementation of a box blur. Idea and formula
|
||||
* for choosing the box blur size come from:
|
||||
*
|
||||
* http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement
|
||||
*
|
||||
* The 2D blur is then done by blurring the rows, flipping the
|
||||
* image and blurring the columns. (This is possible because the
|
||||
* Gaussian kernel is separable - it's the product of a horizontal
|
||||
* blur and a vertical blur.)
|
||||
*/
|
||||
static int
|
||||
get_box_filter_size (int radius)
|
||||
{
|
||||
return (int)(0.5 + radius * (0.75 * sqrt(2*M_PI)));
|
||||
}
|
||||
|
||||
/* The "spread" of the filter is the number of pixels from an original
|
||||
* pixel that it's blurred image extends. (A no-op blur that doesn't
|
||||
* blur would have a spread of 0.) See comment in blur_rows() for why the
|
||||
* odd and even cases are different
|
||||
*/
|
||||
static int
|
||||
get_shadow_spread (int radius)
|
||||
{
|
||||
int d = get_box_filter_size (radius);
|
||||
|
||||
if (d % 2 == 1)
|
||||
return 3 * (d / 2);
|
||||
else
|
||||
return 3 * (d / 2) - 1;
|
||||
}
|
||||
|
||||
/* This applies a single box blur pass to a horizontal range of pixels;
|
||||
* since the box blur has the same weight for all pixels, we can
|
||||
* implement an efficient sliding window algorithm where we add
|
||||
* in pixels coming into the window from the right and remove
|
||||
* them when they leave the windw to the left.
|
||||
*
|
||||
* d is the filter width; for even d shift indicates how the blurred
|
||||
* result is aligned with the original - does ' x ' go to ' yy' (shift=1)
|
||||
* or 'yy ' (shift=-1)
|
||||
*/
|
||||
static void
|
||||
blur_xspan (guchar *row,
|
||||
guchar *tmp_buffer,
|
||||
int row_width,
|
||||
int x0,
|
||||
int x1,
|
||||
int d,
|
||||
int shift)
|
||||
{
|
||||
int offset;
|
||||
int sum = 0;
|
||||
int i;
|
||||
|
||||
if (d % 2 == 1)
|
||||
offset = d / 2;
|
||||
else
|
||||
offset = (d - shift) / 2;
|
||||
|
||||
/* All the conditionals in here look slow, but the branches will
|
||||
* be well predicted and there are enough different possibilities
|
||||
* that trying to write this as a series of unconditional loops
|
||||
* is hard and not an obvious win. The main slow down here seems
|
||||
* to be the integer division for pixel; one possible optimization
|
||||
* would be to accumulate into two 16-bit integer buffers and
|
||||
* only divide down after all three passes. (SSE parallel implementation
|
||||
* of the divide step is possible.)
|
||||
*/
|
||||
for (i = x0 - d + offset; i < x1 + offset; i++)
|
||||
{
|
||||
if (i >= 0 && i < row_width)
|
||||
sum += row[i];
|
||||
|
||||
if (i >= x0 + offset)
|
||||
{
|
||||
if (i >= d)
|
||||
sum -= row[i - d];
|
||||
|
||||
tmp_buffer[i - offset] = (sum + d / 2) / d;
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(row + x0, tmp_buffer + x0, x1 - x0);
|
||||
}
|
||||
|
||||
static void
|
||||
blur_rows (cairo_region_t *convolve_region,
|
||||
int x_offset,
|
||||
int y_offset,
|
||||
guchar *buffer,
|
||||
int buffer_width,
|
||||
int buffer_height,
|
||||
int d)
|
||||
{
|
||||
int i, j;
|
||||
int n_rectangles;
|
||||
guchar *tmp_buffer;
|
||||
|
||||
tmp_buffer = g_malloc (buffer_width);
|
||||
|
||||
n_rectangles = cairo_region_num_rectangles (convolve_region);
|
||||
for (i = 0; i < n_rectangles; i++)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
cairo_region_get_rectangle (convolve_region, i, &rect);
|
||||
|
||||
for (j = y_offset + rect.y; j < y_offset + rect.y + rect.height; j++)
|
||||
{
|
||||
guchar *row = buffer + j * buffer_width;
|
||||
int x0 = x_offset + rect.x;
|
||||
int x1 = x0 + rect.width;
|
||||
|
||||
/* We want to produce a symmetric blur that spreads a pixel
|
||||
* equally far to the left and right. If d is odd that happens
|
||||
* naturally, but for d even, we approximate by using a blur
|
||||
* on either side and then a centered blur of size d + 1.
|
||||
* (techique also from the SVG specification)
|
||||
*/
|
||||
if (d % 2 == 1)
|
||||
{
|
||||
blur_xspan (row, tmp_buffer, buffer_width, x0, x1, d, 0);
|
||||
blur_xspan (row, tmp_buffer, buffer_width, x0, x1, d, 0);
|
||||
blur_xspan (row, tmp_buffer, buffer_width, x0, x1, d, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
blur_xspan (row, tmp_buffer, buffer_width, x0, x1, d, 1);
|
||||
blur_xspan (row, tmp_buffer, buffer_width, x0, x1, d, -1);
|
||||
blur_xspan (row, tmp_buffer, buffer_width, x0, x1, d + 1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
g_free (tmp_buffer);
|
||||
}
|
||||
|
||||
static void
|
||||
fade_bytes (guchar *bytes,
|
||||
int width,
|
||||
int distance,
|
||||
int total)
|
||||
{
|
||||
guint32 multiplier = (distance * 0x10000 + 0x8000) / total;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < width; i++)
|
||||
bytes[i] = (bytes[i] * multiplier) >> 16;
|
||||
}
|
||||
|
||||
/* Swaps width and height. Either swaps in-place and returns the original
|
||||
* buffer or allocates a new buffer, frees the original buffer and returns
|
||||
* the new buffer.
|
||||
*/
|
||||
static guchar *
|
||||
flip_buffer (guchar *buffer,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
/* Working in blocks increases cache efficiency, compared to reading
|
||||
* or writing an entire column at once */
|
||||
#define BLOCK_SIZE 16
|
||||
|
||||
if (width == height)
|
||||
{
|
||||
int i0, j0;
|
||||
|
||||
for (j0 = 0; j0 < height; j0 += BLOCK_SIZE)
|
||||
for (i0 = 0; i0 <= j0; i0 += BLOCK_SIZE)
|
||||
{
|
||||
int max_j = MIN(j0 + BLOCK_SIZE, height);
|
||||
int max_i = MIN(i0 + BLOCK_SIZE, width);
|
||||
int i, j;
|
||||
|
||||
if (i0 == j0)
|
||||
{
|
||||
for (j = j0; j < max_j; j++)
|
||||
for (i = i0; i < j; i++)
|
||||
{
|
||||
guchar tmp = buffer[j * width + i];
|
||||
buffer[j * width + i] = buffer[i * width + j];
|
||||
buffer[i * width + j] = tmp;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (j = j0; j < max_j; j++)
|
||||
for (i = i0; i < max_i; i++)
|
||||
{
|
||||
guchar tmp = buffer[j * width + i];
|
||||
buffer[j * width + i] = buffer[i * width + j];
|
||||
buffer[i * width + j] = tmp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return buffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
guchar *new_buffer = g_malloc (height * width);
|
||||
int i0, j0;
|
||||
|
||||
for (i0 = 0; i0 < width; i0 += BLOCK_SIZE)
|
||||
for (j0 = 0; j0 < height; j0 += BLOCK_SIZE)
|
||||
{
|
||||
int max_j = MIN(j0 + BLOCK_SIZE, height);
|
||||
int max_i = MIN(i0 + BLOCK_SIZE, width);
|
||||
int i, j;
|
||||
|
||||
for (i = i0; i < max_i; i++)
|
||||
for (j = j0; j < max_j; j++)
|
||||
new_buffer[i * height + j] = buffer[j * width + i];
|
||||
}
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
return new_buffer;
|
||||
}
|
||||
#undef BLOCK_SIZE
|
||||
}
|
||||
|
||||
static void
|
||||
make_shadow (MetaShadow *shadow,
|
||||
cairo_region_t *region)
|
||||
{
|
||||
int d = get_box_filter_size (shadow->key.radius);
|
||||
int spread = get_shadow_spread (shadow->key.radius);
|
||||
cairo_rectangle_int_t extents;
|
||||
cairo_region_t *row_convolve_region;
|
||||
cairo_region_t *column_convolve_region;
|
||||
guchar *buffer;
|
||||
int buffer_width;
|
||||
int buffer_height;
|
||||
int x_offset;
|
||||
int y_offset;
|
||||
int n_rectangles, j, k;
|
||||
|
||||
cairo_region_get_extents (region, &extents);
|
||||
|
||||
/* In the case where top_fade >= 0 and the portion above the top
|
||||
* edge of the shape will be cropped, it seems like we could create
|
||||
* a smaller buffer and omit the top portion, but actually, in our
|
||||
* multi-pass blur algorithm, the blur into the area above the window
|
||||
* in the first pass will contribute back to the final pixel values
|
||||
* for the top pixels, so we create a buffer as if we weren't cropping
|
||||
* and only crop when creating the CoglTexture.
|
||||
*/
|
||||
|
||||
buffer_width = extents.width + 2 * spread;
|
||||
buffer_height = extents.height + 2 * spread;
|
||||
|
||||
/* Round up so we have aligned rows/columns */
|
||||
buffer_width = (buffer_width + 3) & ~3;
|
||||
buffer_height = (buffer_height + 3) & ~3;
|
||||
|
||||
/* Square buffer allows in-place swaps, which are roughly 70% faster, but we
|
||||
* don't want to over-allocate too much memory.
|
||||
*/
|
||||
if (buffer_height < buffer_width && buffer_height > (3 * buffer_width) / 4)
|
||||
buffer_height = buffer_width;
|
||||
if (buffer_width < buffer_height && buffer_width > (3 * buffer_height) / 4)
|
||||
buffer_width = buffer_height;
|
||||
|
||||
buffer = g_malloc0 (buffer_width * buffer_height);
|
||||
|
||||
/* Blurring with multiple box-blur passes is fast, but (especially for
|
||||
* large shadow sizes) we can improve efficiency by restricting the blur
|
||||
* to the region that actually needs to be blurred.
|
||||
*/
|
||||
row_convolve_region = meta_make_border_region (region, spread, spread, FALSE);
|
||||
column_convolve_region = meta_make_border_region (region, 0, spread, TRUE);
|
||||
|
||||
/* Offsets between coordinates of the regions and coordinates in the buffer */
|
||||
x_offset = spread;
|
||||
y_offset = spread;
|
||||
|
||||
/* Step 1: unblurred image */
|
||||
n_rectangles = cairo_region_num_rectangles (region);
|
||||
for (k = 0; k < n_rectangles; k++)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
cairo_region_get_rectangle (region, k, &rect);
|
||||
for (j = y_offset + rect.y; j < y_offset + rect.y + rect.height; j++)
|
||||
memset (buffer + buffer_width * j + x_offset + rect.x, 255, rect.width);
|
||||
}
|
||||
|
||||
/* Step 2: swap rows and columns */
|
||||
buffer = flip_buffer (buffer, buffer_width, buffer_height);
|
||||
|
||||
/* Step 3: blur rows (really columns) */
|
||||
blur_rows (column_convolve_region, y_offset, x_offset,
|
||||
buffer, buffer_height, buffer_width,
|
||||
d);
|
||||
|
||||
/* Step 4: swap rows and columns */
|
||||
buffer = flip_buffer (buffer, buffer_height, buffer_width);
|
||||
|
||||
/* Step 5: blur rows */
|
||||
blur_rows (row_convolve_region, x_offset, y_offset,
|
||||
buffer, buffer_width, buffer_height,
|
||||
d);
|
||||
|
||||
/* Step 6: fade out the top, if applicable */
|
||||
if (shadow->key.top_fade >= 0)
|
||||
{
|
||||
for (j = y_offset; j < y_offset + MIN (shadow->key.top_fade, extents.height + shadow->outer_border_bottom); j++)
|
||||
fade_bytes(buffer + j * buffer_width, buffer_width, j - y_offset, shadow->key.top_fade);
|
||||
}
|
||||
|
||||
/* We offset the passed in pixels to crop off the extra area we allocated at the top
|
||||
* in the case of top_fade >= 0. We also account for padding at the left for symmetry
|
||||
* though that doesn't currently occur.
|
||||
*/
|
||||
shadow->texture = cogl_texture_new_from_data (shadow->outer_border_left + extents.width + shadow->outer_border_right,
|
||||
shadow->outer_border_top + extents.height + shadow->outer_border_bottom,
|
||||
COGL_TEXTURE_NONE,
|
||||
COGL_PIXEL_FORMAT_A_8,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
buffer_width,
|
||||
(buffer +
|
||||
(y_offset - shadow->outer_border_top) * buffer_width +
|
||||
(x_offset - shadow->outer_border_left)));
|
||||
|
||||
cairo_region_destroy (row_convolve_region);
|
||||
cairo_region_destroy (column_convolve_region);
|
||||
g_free (buffer);
|
||||
|
||||
shadow->material = meta_create_texture_material (shadow->texture);
|
||||
}
|
||||
|
||||
static MetaShadowParams *
|
||||
get_shadow_params (MetaShadowFactory *factory,
|
||||
const char *class_name,
|
||||
gboolean focused,
|
||||
gboolean create)
|
||||
{
|
||||
MetaShadowClassInfo *class_info = g_hash_table_lookup (factory->shadow_classes,
|
||||
class_name);
|
||||
if (class_info == NULL)
|
||||
{
|
||||
if (create)
|
||||
{
|
||||
class_info = g_slice_new0 (MetaShadowClassInfo);
|
||||
*class_info = default_shadow_classes[0];
|
||||
class_info->name = g_strdup (class_info->name);
|
||||
|
||||
g_hash_table_insert (factory->shadow_classes,
|
||||
(char *)class_info->name, class_info);
|
||||
}
|
||||
else
|
||||
{
|
||||
class_info = &default_shadow_classes[0];
|
||||
}
|
||||
}
|
||||
|
||||
if (focused)
|
||||
return &class_info->focused;
|
||||
else
|
||||
return &class_info->unfocused;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shadow_factory_get_shadow:
|
||||
* @factory: a #MetaShadowFactory
|
||||
* @shape: the size-invariant shape of the window's region
|
||||
* @width: the actual width of the window's region
|
||||
* @height: the actual height of the window's region
|
||||
* @class_name: name of the class of window shadows
|
||||
* @focused: whether the shadow is for a focused window
|
||||
*
|
||||
* Gets the appropriate shadow object for drawing shadows for the
|
||||
* specified window shape. The region that we are shadowing is specified
|
||||
* as a combination of a size-invariant extracted shape and the size.
|
||||
* In some cases, the same shadow object can be shared between sizes;
|
||||
* in other cases a different shadow object is used for each size.
|
||||
*
|
||||
* Return value: (transfer full): a newly referenced #MetaShadow; unref with
|
||||
* meta_shadow_unref()
|
||||
*/
|
||||
MetaShadow *
|
||||
meta_shadow_factory_get_shadow (MetaShadowFactory *factory,
|
||||
MetaWindowShape *shape,
|
||||
int width,
|
||||
int height,
|
||||
const char *class_name,
|
||||
gboolean focused)
|
||||
{
|
||||
MetaShadowParams *params;
|
||||
MetaShadowCacheKey key;
|
||||
MetaShadow *shadow;
|
||||
cairo_region_t *region;
|
||||
int spread;
|
||||
int shape_border_top, shape_border_right, shape_border_bottom, shape_border_left;
|
||||
int inner_border_top, inner_border_right, inner_border_bottom, inner_border_left;
|
||||
int outer_border_top, outer_border_right, outer_border_bottom, outer_border_left;
|
||||
gboolean scale_width, scale_height;
|
||||
gboolean cacheable;
|
||||
int center_width, center_height;
|
||||
|
||||
g_return_val_if_fail (META_IS_SHADOW_FACTORY (factory), NULL);
|
||||
g_return_val_if_fail (shape != NULL, NULL);
|
||||
|
||||
/* Using a single shadow texture for different window sizes only works
|
||||
* when there is a central scaled area that is greater than twice
|
||||
* the spread of the gaussian blur we are applying to get to the
|
||||
* shadow image.
|
||||
* ********* ***********
|
||||
* /----------\ *###########* *#############*
|
||||
* | | => **#*********#** => **#***********#**
|
||||
* | | **#** **#** **#** **#**
|
||||
* | | **#*********#** **#***********#**
|
||||
* \----------/ *###########* *#############*
|
||||
* ********** ************
|
||||
* Original Blur Stretched Blur
|
||||
*
|
||||
* For smaller sizes, we create a separate shadow image for each size;
|
||||
* since we assume that there will be little reuse, we don't try to
|
||||
* cache such images but just recreate them. (Since the current cache
|
||||
* policy is to only keep around referenced shadows, there wouldn't
|
||||
* be any harm in caching them, it would just make the book-keeping
|
||||
* a bit tricker.)
|
||||
*
|
||||
* In the case where we are fading a the top, that also has to fit
|
||||
* within the top unscaled border.
|
||||
*/
|
||||
|
||||
params = get_shadow_params (factory, class_name, focused, FALSE);
|
||||
|
||||
spread = get_shadow_spread (params->radius);
|
||||
meta_window_shape_get_borders (shape,
|
||||
&shape_border_top,
|
||||
&shape_border_right,
|
||||
&shape_border_bottom,
|
||||
&shape_border_left);
|
||||
|
||||
inner_border_top = MAX (shape_border_top + spread, params->top_fade);
|
||||
outer_border_top = params->top_fade >= 0 ? 0 : spread;
|
||||
inner_border_right = shape_border_right + spread;
|
||||
outer_border_right = spread;
|
||||
inner_border_bottom = shape_border_bottom + spread;
|
||||
outer_border_bottom = spread;
|
||||
inner_border_left = shape_border_left + spread;
|
||||
outer_border_left = spread;
|
||||
|
||||
scale_width = inner_border_left + inner_border_right <= width;
|
||||
scale_height = inner_border_top + inner_border_bottom <= height;
|
||||
cacheable = scale_width && scale_height;
|
||||
|
||||
if (cacheable)
|
||||
{
|
||||
key.shape = shape;
|
||||
key.radius = params->radius;
|
||||
key.top_fade = params->top_fade;
|
||||
|
||||
shadow = g_hash_table_lookup (factory->shadows, &key);
|
||||
if (shadow)
|
||||
return meta_shadow_ref (shadow);
|
||||
}
|
||||
|
||||
shadow = g_slice_new0 (MetaShadow);
|
||||
|
||||
shadow->ref_count = 1;
|
||||
shadow->factory = factory;
|
||||
shadow->key.shape = meta_window_shape_ref (shape);
|
||||
shadow->key.radius = params->radius;
|
||||
shadow->key.top_fade = params->top_fade;
|
||||
|
||||
shadow->outer_border_top = outer_border_top;
|
||||
shadow->inner_border_top = inner_border_top;
|
||||
shadow->outer_border_right = outer_border_right;
|
||||
shadow->inner_border_right = inner_border_right;
|
||||
shadow->outer_border_bottom = outer_border_bottom;
|
||||
shadow->inner_border_bottom = inner_border_bottom;
|
||||
shadow->outer_border_left = outer_border_left;
|
||||
shadow->inner_border_left = inner_border_left;
|
||||
|
||||
shadow->scale_width = scale_width;
|
||||
if (scale_width)
|
||||
center_width = inner_border_left + inner_border_right - (shape_border_left + shape_border_right);
|
||||
else
|
||||
center_width = width - (shape_border_left + shape_border_right);
|
||||
|
||||
shadow->scale_height = scale_height;
|
||||
if (scale_height)
|
||||
center_height = inner_border_top + inner_border_bottom - (shape_border_top + shape_border_bottom);
|
||||
else
|
||||
center_height = height - (shape_border_top + shape_border_bottom);
|
||||
|
||||
g_assert (center_width >= 0 && center_height >= 0);
|
||||
|
||||
region = meta_window_shape_to_region (shape, center_width, center_height);
|
||||
make_shadow (shadow, region);
|
||||
|
||||
cairo_region_destroy (region);
|
||||
|
||||
if (cacheable)
|
||||
g_hash_table_insert (factory->shadows, &shadow->key, shadow);
|
||||
|
||||
return shadow;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shadow_factory_set_params:
|
||||
* @factory: a #MetaShadowFactory
|
||||
* @class_name: name of the class of shadow to set the params for.
|
||||
* the default shadow classes are the names of the different
|
||||
* theme frame types (normal, dialog, modal_dialog, utility,
|
||||
* border, menu, attached) and in addition, popup-menu
|
||||
* and dropdown-menu.
|
||||
* @focused: whether the shadow is for a focused window
|
||||
* @params: new parameter values
|
||||
*
|
||||
* Updates the shadow parameters for a particular class of shadows
|
||||
* for either the focused or unfocused state. If the class name
|
||||
* does not name an existing class, a new class will be created
|
||||
* (the other focus state for that class will have default values
|
||||
* assigned to it.)
|
||||
*/
|
||||
void
|
||||
meta_shadow_factory_set_params (MetaShadowFactory *factory,
|
||||
const char *class_name,
|
||||
gboolean focused,
|
||||
MetaShadowParams *params)
|
||||
{
|
||||
MetaShadowParams *stored_params;
|
||||
|
||||
g_return_if_fail (META_IS_SHADOW_FACTORY (factory));
|
||||
g_return_if_fail (class_name != NULL);
|
||||
g_return_if_fail (params != NULL);
|
||||
g_return_if_fail (params->radius >= 0);
|
||||
|
||||
stored_params = get_shadow_params (factory, class_name, focused, TRUE);
|
||||
|
||||
*stored_params = *params;
|
||||
|
||||
g_signal_emit (factory, signals[CHANGED], 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shadow_factory_get_params:
|
||||
* @factory: a #MetaShadowFactory
|
||||
* @class_name: name of the class of shadow to get the params for
|
||||
* @focused: whether the shadow is for a focused window
|
||||
* @params: (out caller-allocates): location to store the current parameter values
|
||||
*
|
||||
* Gets the shadow parameters for a particular class of shadows
|
||||
* for either the focused or unfocused state. If the class name
|
||||
* does not name an existing class, default values will be returned
|
||||
* without printing an error.
|
||||
*/
|
||||
void
|
||||
meta_shadow_factory_get_params (MetaShadowFactory *factory,
|
||||
const char *class_name,
|
||||
gboolean focused,
|
||||
MetaShadowParams *params)
|
||||
{
|
||||
MetaShadowParams *stored_params;
|
||||
|
||||
g_return_if_fail (META_IS_SHADOW_FACTORY (factory));
|
||||
g_return_if_fail (class_name != NULL);
|
||||
|
||||
stored_params = get_shadow_params (factory, class_name, focused, FALSE);
|
||||
|
||||
if (params)
|
||||
*params = *stored_params;
|
||||
}
|
635
src/compositor/meta-shaped-texture.c
Normal file
635
src/compositor/meta-shaped-texture.c
Normal file
@@ -0,0 +1,635 @@
|
||||
/*
|
||||
* shaped texture
|
||||
*
|
||||
* An actor to draw a texture clipped to a list of rectangles
|
||||
*
|
||||
* Authored By Neil Roberts <neil@linux.intel.com>
|
||||
*
|
||||
* Copyright (C) 2008 Intel Corporation
|
||||
*
|
||||
* 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 "meta-shaped-texture.h"
|
||||
#include "meta-texture-tower.h"
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <cogl/cogl.h>
|
||||
#include <string.h>
|
||||
|
||||
static void meta_shaped_texture_dispose (GObject *object);
|
||||
static void meta_shaped_texture_finalize (GObject *object);
|
||||
static void meta_shaped_texture_notify (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void meta_shaped_texture_paint (ClutterActor *actor);
|
||||
static void meta_shaped_texture_pick (ClutterActor *actor,
|
||||
const ClutterColor *color);
|
||||
|
||||
static void meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex);
|
||||
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||
CLUTTER_GLX_TYPE_TEXTURE_PIXMAP);
|
||||
#else /* HAVE_GLX_TEXTURE_PIXMAP */
|
||||
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||
CLUTTER_X11_TYPE_TEXTURE_PIXMAP);
|
||||
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
|
||||
|
||||
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
|
||||
MetaShapedTexturePrivate))
|
||||
|
||||
struct _MetaShapedTexturePrivate
|
||||
{
|
||||
MetaTextureTower *paint_tower;
|
||||
CoglHandle mask_texture;
|
||||
CoglHandle material;
|
||||
CoglHandle material_unshaped;
|
||||
|
||||
cairo_region_t *clip_region;
|
||||
|
||||
guint mask_width, mask_height;
|
||||
|
||||
GArray *rectangles;
|
||||
|
||||
guint create_mipmaps : 1;
|
||||
};
|
||||
|
||||
static void
|
||||
meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = (GObjectClass *) klass;
|
||||
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
|
||||
ClutterX11TexturePixmapClass *x11_texture_class = (ClutterX11TexturePixmapClass *) klass;
|
||||
|
||||
gobject_class->dispose = meta_shaped_texture_dispose;
|
||||
gobject_class->finalize = meta_shaped_texture_finalize;
|
||||
gobject_class->notify = meta_shaped_texture_notify;
|
||||
|
||||
actor_class->paint = meta_shaped_texture_paint;
|
||||
actor_class->pick = meta_shaped_texture_pick;
|
||||
|
||||
x11_texture_class->update_area = meta_shaped_texture_update_area;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate));
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_init (MetaShapedTexture *self)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self);
|
||||
|
||||
priv->rectangles = g_array_new (FALSE, FALSE, sizeof (XRectangle));
|
||||
|
||||
priv->paint_tower = meta_texture_tower_new ();
|
||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||
priv->create_mipmaps = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_dispose (GObject *object)
|
||||
{
|
||||
MetaShapedTexture *self = (MetaShapedTexture *) object;
|
||||
MetaShapedTexturePrivate *priv = self->priv;
|
||||
|
||||
if (priv->paint_tower)
|
||||
meta_texture_tower_free (priv->paint_tower);
|
||||
priv->paint_tower = NULL;
|
||||
|
||||
meta_shaped_texture_dirty_mask (self);
|
||||
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (priv->material);
|
||||
priv->material = COGL_INVALID_HANDLE;
|
||||
}
|
||||
if (priv->material_unshaped != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (priv->material_unshaped);
|
||||
priv->material_unshaped = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
meta_shaped_texture_set_clip_region (self, NULL);
|
||||
|
||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_finalize (GObject *object)
|
||||
{
|
||||
MetaShapedTexture *self = (MetaShapedTexture *) object;
|
||||
MetaShapedTexturePrivate *priv = self->priv;
|
||||
|
||||
g_array_free (priv->rectangles, TRUE);
|
||||
|
||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_notify (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
if (G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify)
|
||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify (object, pspec);
|
||||
|
||||
/* It seems like we could just do this out of update_area(), but unfortunately,
|
||||
* clutter_glx_texture_pixmap() doesn't call through the vtable on the
|
||||
* initial update_area, so we need to look for changes to the texture
|
||||
* explicitly.
|
||||
*/
|
||||
if (strcmp (pspec->name, "cogl-texture") == 0)
|
||||
{
|
||||
MetaShapedTexture *stex = (MetaShapedTexture *) object;
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
|
||||
meta_shaped_texture_clear (stex);
|
||||
|
||||
if (priv->create_mipmaps)
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower,
|
||||
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_dirty_mask (MetaShapedTexture *stex)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
|
||||
if (priv->mask_texture != COGL_INVALID_HANDLE)
|
||||
{
|
||||
GLuint mask_gl_tex;
|
||||
GLenum mask_gl_target;
|
||||
|
||||
cogl_texture_get_gl_texture (priv->mask_texture,
|
||||
&mask_gl_tex, &mask_gl_target);
|
||||
|
||||
if (mask_gl_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
glDeleteTextures (1, &mask_gl_tex);
|
||||
|
||||
cogl_handle_unref (priv->mask_texture);
|
||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material, 1, COGL_INVALID_HANDLE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
CoglHandle paint_tex;
|
||||
guint tex_width, tex_height;
|
||||
|
||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||
|
||||
if (paint_tex == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
|
||||
tex_width = cogl_texture_get_width (paint_tex);
|
||||
tex_height = cogl_texture_get_height (paint_tex);
|
||||
|
||||
/* If the mask texture we have was created for a different size then
|
||||
recreate it */
|
||||
if (priv->mask_texture != COGL_INVALID_HANDLE
|
||||
&& (priv->mask_width != tex_width || priv->mask_height != tex_height))
|
||||
meta_shaped_texture_dirty_mask (stex);
|
||||
|
||||
/* If we don't have a mask texture yet then create one */
|
||||
if (priv->mask_texture == COGL_INVALID_HANDLE)
|
||||
{
|
||||
guchar *mask_data;
|
||||
const XRectangle *rect;
|
||||
GLenum paint_gl_target;
|
||||
|
||||
/* Create data for an empty image */
|
||||
mask_data = g_malloc0 (tex_width * tex_height);
|
||||
|
||||
/* Cut out a hole for each rectangle */
|
||||
for (rect = (XRectangle *) priv->rectangles->data
|
||||
+ priv->rectangles->len;
|
||||
rect-- > (XRectangle *) priv->rectangles->data;)
|
||||
{
|
||||
gint x1 = rect->x, x2 = x1 + rect->width;
|
||||
gint y1 = rect->y, y2 = y1 + rect->height;
|
||||
guchar *p;
|
||||
|
||||
/* Clip the rectangle to the size of the texture */
|
||||
x1 = CLAMP (x1, 0, (gint) tex_width - 1);
|
||||
x2 = CLAMP (x2, x1, (gint) tex_width);
|
||||
y1 = CLAMP (y1, 0, (gint) tex_height - 1);
|
||||
y2 = CLAMP (y2, y1, (gint) tex_height);
|
||||
|
||||
/* Fill the rectangle */
|
||||
for (p = mask_data + y1 * tex_width + x1;
|
||||
y1 < y2;
|
||||
y1++, p += tex_width)
|
||||
memset (p, 255, x2 - x1);
|
||||
}
|
||||
|
||||
cogl_texture_get_gl_texture (paint_tex, NULL, &paint_gl_target);
|
||||
|
||||
if (paint_gl_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
{
|
||||
GLuint tex;
|
||||
|
||||
glGenTextures (1, &tex);
|
||||
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex);
|
||||
glPixelStorei (GL_UNPACK_ROW_LENGTH, tex_width);
|
||||
glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
|
||||
glPixelStorei (GL_UNPACK_SKIP_ROWS, 0);
|
||||
glPixelStorei (GL_UNPACK_SKIP_PIXELS, 0);
|
||||
glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0,
|
||||
GL_ALPHA, tex_width, tex_height,
|
||||
0, GL_ALPHA, GL_UNSIGNED_BYTE, mask_data);
|
||||
|
||||
priv->mask_texture
|
||||
= cogl_texture_new_from_foreign (tex,
|
||||
GL_TEXTURE_RECTANGLE_ARB,
|
||||
tex_width, tex_height,
|
||||
0, 0,
|
||||
COGL_PIXEL_FORMAT_A_8);
|
||||
}
|
||||
else
|
||||
priv->mask_texture = cogl_texture_new_from_data (tex_width, tex_height,
|
||||
COGL_TEXTURE_NONE,
|
||||
COGL_PIXEL_FORMAT_A_8,
|
||||
COGL_PIXEL_FORMAT_ANY,
|
||||
tex_width,
|
||||
mask_data);
|
||||
|
||||
g_free (mask_data);
|
||||
|
||||
priv->mask_width = tex_width;
|
||||
priv->mask_height = tex_height;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_paint (ClutterActor *actor)
|
||||
{
|
||||
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
CoglHandle paint_tex;
|
||||
guint tex_width, tex_height;
|
||||
ClutterActorBox alloc;
|
||||
|
||||
static CoglHandle material_template = COGL_INVALID_HANDLE;
|
||||
static CoglHandle material_unshaped_template = COGL_INVALID_HANDLE;
|
||||
|
||||
CoglHandle material;
|
||||
|
||||
if (priv->clip_region && cairo_region_is_empty (priv->clip_region))
|
||||
return;
|
||||
|
||||
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
|
||||
clutter_actor_realize (CLUTTER_ACTOR (stex));
|
||||
|
||||
/* The GL EXT_texture_from_pixmap extension does allow for it to be
|
||||
* used together with SGIS_generate_mipmap, however this is very
|
||||
* rarely supported. Also, even when it is supported there
|
||||
* are distinct performance implications from:
|
||||
*
|
||||
* - Updating mipmaps that we don't need
|
||||
* - Having to reallocate pixmaps on the server into larger buffers
|
||||
*
|
||||
* So, we just unconditionally use our mipmap emulation code. If we
|
||||
* wanted to use SGIS_generate_mipmap, we'd have to query COGL to
|
||||
* see if it was supported (no API currently), and then if and only
|
||||
* if that was the case, set the clutter texture quality to HIGH.
|
||||
* Setting the texture quality to high without SGIS_generate_mipmap
|
||||
* support for TFP textures will result in fallbacks to XGetImage.
|
||||
*/
|
||||
if (priv->create_mipmaps)
|
||||
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
|
||||
else
|
||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||
|
||||
if (paint_tex == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
|
||||
tex_width = cogl_texture_get_width (paint_tex);
|
||||
tex_height = cogl_texture_get_height (paint_tex);
|
||||
|
||||
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
||||
return;
|
||||
|
||||
if (priv->rectangles->len < 1)
|
||||
{
|
||||
/* If there are no rectangles use a single-layer texture */
|
||||
|
||||
if (priv->material_unshaped == COGL_INVALID_HANDLE)
|
||||
{
|
||||
if (G_UNLIKELY (material_unshaped_template == COGL_INVALID_HANDLE))
|
||||
material_unshaped_template = cogl_material_new ();
|
||||
|
||||
priv->material_unshaped = cogl_material_copy (material_unshaped_template);
|
||||
}
|
||||
material = priv->material_unshaped;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_shaped_texture_ensure_mask (stex);
|
||||
|
||||
if (priv->material == COGL_INVALID_HANDLE)
|
||||
{
|
||||
if (G_UNLIKELY (material_template == COGL_INVALID_HANDLE))
|
||||
{
|
||||
material_template = cogl_material_new ();
|
||||
cogl_material_set_layer_combine (material_template, 1,
|
||||
"RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
|
||||
NULL);
|
||||
}
|
||||
priv->material = cogl_material_copy (material_template);
|
||||
}
|
||||
material = priv->material;
|
||||
|
||||
cogl_material_set_layer (material, 1, priv->mask_texture);
|
||||
}
|
||||
|
||||
cogl_material_set_layer (material, 0, paint_tex);
|
||||
|
||||
{
|
||||
CoglColor color;
|
||||
guchar opacity = clutter_actor_get_paint_opacity (actor);
|
||||
cogl_color_set_from_4ub (&color, opacity, opacity, opacity, opacity);
|
||||
cogl_material_set_color (material, &color);
|
||||
}
|
||||
|
||||
cogl_set_source (material);
|
||||
|
||||
clutter_actor_get_allocation_box (actor, &alloc);
|
||||
|
||||
if (priv->clip_region)
|
||||
{
|
||||
int n_rects;
|
||||
int i;
|
||||
|
||||
/* Limit to how many separate rectangles we'll draw; beyond this just
|
||||
* fall back and draw the whole thing */
|
||||
# define MAX_RECTS 16
|
||||
|
||||
n_rects = cairo_region_num_rectangles (priv->clip_region);
|
||||
if (n_rects <= MAX_RECTS)
|
||||
{
|
||||
float coords[8];
|
||||
float x1, y1, x2, y2;
|
||||
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
cairo_region_get_rectangle (priv->clip_region, i, &rect);
|
||||
|
||||
x1 = rect.x;
|
||||
y1 = rect.y;
|
||||
x2 = rect.x + rect.width;
|
||||
y2 = rect.y + rect.height;
|
||||
|
||||
coords[0] = rect.x / (alloc.x2 - alloc.x1);
|
||||
coords[1] = rect.y / (alloc.y2 - alloc.y1);
|
||||
coords[2] = (rect.x + rect.width) / (alloc.x2 - alloc.x1);
|
||||
coords[3] = (rect.y + rect.height) / (alloc.y2 - alloc.y1);
|
||||
|
||||
coords[4] = coords[0];
|
||||
coords[5] = coords[1];
|
||||
coords[6] = coords[2];
|
||||
coords[7] = coords[3];
|
||||
|
||||
cogl_rectangle_with_multitexture_coords (x1, y1, x2, y2,
|
||||
&coords[0], 8);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
cogl_rectangle (0, 0,
|
||||
alloc.x2 - alloc.x1,
|
||||
alloc.y2 - alloc.y1);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_pick (ClutterActor *actor,
|
||||
const ClutterColor *color)
|
||||
{
|
||||
MetaShapedTexture *stex = (MetaShapedTexture *) actor;
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
|
||||
/* If there are no rectangles then use the regular pick */
|
||||
if (priv->rectangles->len < 1)
|
||||
CLUTTER_ACTOR_CLASS (meta_shaped_texture_parent_class)
|
||||
->pick (actor, color);
|
||||
else if (clutter_actor_should_pick_paint (actor))
|
||||
{
|
||||
CoglHandle paint_tex;
|
||||
ClutterActorBox alloc;
|
||||
guint tex_width, tex_height;
|
||||
|
||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||
|
||||
if (paint_tex == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
|
||||
tex_width = cogl_texture_get_width (paint_tex);
|
||||
tex_height = cogl_texture_get_height (paint_tex);
|
||||
|
||||
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
||||
return;
|
||||
|
||||
meta_shaped_texture_ensure_mask (stex);
|
||||
|
||||
cogl_set_source_color4ub (color->red, color->green, color->blue,
|
||||
color->alpha);
|
||||
|
||||
clutter_actor_get_allocation_box (actor, &alloc);
|
||||
|
||||
/* Paint the mask rectangle in the given color */
|
||||
cogl_set_source_texture (priv->mask_texture);
|
||||
cogl_rectangle_with_texture_coords (0, 0,
|
||||
alloc.x2 - alloc.x1,
|
||||
alloc.y2 - alloc.y1,
|
||||
0, 0, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
MetaShapedTexture *stex = (MetaShapedTexture *) texture;
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
|
||||
CLUTTER_X11_TEXTURE_PIXMAP_CLASS (meta_shaped_texture_parent_class)->update_area (texture,
|
||||
x, y, width, height);
|
||||
|
||||
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_shaped_texture_new (void)
|
||||
{
|
||||
ClutterActor *self = g_object_new (META_TYPE_SHAPED_TEXTURE, NULL);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
void
|
||||
meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
||||
gboolean create_mipmaps)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
create_mipmaps = create_mipmaps != FALSE;
|
||||
|
||||
if (create_mipmaps != priv->create_mipmaps)
|
||||
{
|
||||
CoglHandle base_texture;
|
||||
|
||||
priv->create_mipmaps = create_mipmaps;
|
||||
|
||||
base_texture = create_mipmaps ?
|
||||
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)) : COGL_INVALID_HANDLE;
|
||||
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is a workaround for deficiencies in the hack tower:
|
||||
*
|
||||
* When we call clutter_x11_texture_pixmap_set_pixmap(tp, None),
|
||||
* ClutterX11TexturePixmap knows that it has to get rid of the old texture, but
|
||||
* clutter_texture_set_cogl_texture(texture, COGL_INVALID_HANDLE) isn't allowed, so
|
||||
* it grabs the material for the texture and manually sets the texture in it. This means
|
||||
* that the "cogl-texture" property isn't notified, so we don't find out about it.
|
||||
*
|
||||
* And if we keep the CoglX11TexturePixmap around after the X pixmap is freed, then
|
||||
* we'll trigger X errors when we actually try to free it.
|
||||
*
|
||||
* The only correct thing to do here is to change our code to derive
|
||||
* from ClutterActor and get rid of the inheritance hack tower. Once
|
||||
* we want to depend on Clutter-1.4 (which has CoglTexturePixmapX11),
|
||||
* that will be very easy to do.
|
||||
*/
|
||||
void
|
||||
meta_shaped_texture_clear (MetaShapedTexture *stex)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower, COGL_INVALID_HANDLE);
|
||||
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material, 0, COGL_INVALID_HANDLE);
|
||||
|
||||
if (priv->material_unshaped != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material_unshaped, 0, COGL_INVALID_HANDLE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_shaped_texture_clear_rectangles (MetaShapedTexture *stex)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
g_array_set_size (priv->rectangles, 0);
|
||||
meta_shaped_texture_dirty_mask (stex);
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||
}
|
||||
|
||||
void
|
||||
meta_shaped_texture_add_rectangle (MetaShapedTexture *stex,
|
||||
const XRectangle *rect)
|
||||
{
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
meta_shaped_texture_add_rectangles (stex, 1, rect);
|
||||
}
|
||||
|
||||
void
|
||||
meta_shaped_texture_add_rectangles (MetaShapedTexture *stex,
|
||||
size_t num_rects,
|
||||
const XRectangle *rects)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
g_array_append_vals (priv->rectangles, rects, num_rects);
|
||||
|
||||
meta_shaped_texture_dirty_mask (stex);
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shaped_texture_set_clip_region:
|
||||
* @frame: a #TidyTextureframe
|
||||
* @clip_region: (transfer full): the region of the texture that
|
||||
* is visible and should be painted. OWNERSHIP IS ASSUMED BY
|
||||
* THE FUNCTION (for efficiency to avoid a copy.)
|
||||
*
|
||||
* Provides a hint to the texture about what areas of the texture
|
||||
* are not completely obscured and thus need to be painted. This
|
||||
* is an optimization and is not supposed to have any effect on
|
||||
* the output.
|
||||
*
|
||||
* Typically a parent container will set the clip region before
|
||||
* painting its children, and then unset it afterwards.
|
||||
*/
|
||||
void
|
||||
meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
||||
cairo_region_t *clip_region)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
if (priv->clip_region)
|
||||
{
|
||||
cairo_region_destroy (priv->clip_region);
|
||||
priv->clip_region = NULL;
|
||||
}
|
||||
|
||||
priv->clip_region = clip_region;
|
||||
}
|
92
src/compositor/meta-shaped-texture.h
Normal file
92
src/compositor/meta-shaped-texture.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* shaped texture
|
||||
*
|
||||
* An actor to draw a texture clipped to a list of rectangles
|
||||
*
|
||||
* Authored By Neil Roberts <neil@linux.intel.com>
|
||||
*
|
||||
* Copyright (C) 2008 Intel Corporation
|
||||
*
|
||||
* 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_SHAPED_TEXTURE_H__
|
||||
#define __META_SHAPED_TEXTURE_H__
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
#include <clutter/glx/clutter-glx.h>
|
||||
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define META_TYPE_SHAPED_TEXTURE (meta_shaped_texture_get_type())
|
||||
#define META_SHAPED_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),META_TYPE_SHAPED_TEXTURE, MetaShapedTexture))
|
||||
#define META_SHAPED_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_SHAPED_TEXTURE, MetaShapedTextureClass))
|
||||
#define META_IS_SHAPED_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_SHAPED_TEXTURE))
|
||||
#define META_IS_SHAPED_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_SHAPED_TEXTURE))
|
||||
#define META_SHAPED_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_SHAPED_TEXTURE, MetaShapedTextureClass))
|
||||
|
||||
typedef struct _MetaShapedTexture MetaShapedTexture;
|
||||
typedef struct _MetaShapedTextureClass MetaShapedTextureClass;
|
||||
typedef struct _MetaShapedTexturePrivate MetaShapedTexturePrivate;
|
||||
|
||||
struct _MetaShapedTextureClass
|
||||
{
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
ClutterGLXTexturePixmapClass parent_class;
|
||||
#else
|
||||
ClutterX11TexturePixmapClass parent_class;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct _MetaShapedTexture
|
||||
{
|
||||
#ifdef HAVE_GLX_TEXTURE_PIXMAP
|
||||
ClutterGLXTexturePixmap parent;
|
||||
#else
|
||||
ClutterX11TexturePixmap parent;
|
||||
#endif
|
||||
|
||||
MetaShapedTexturePrivate *priv;
|
||||
};
|
||||
|
||||
GType meta_shaped_texture_get_type (void) G_GNUC_CONST;
|
||||
|
||||
ClutterActor *meta_shaped_texture_new (void);
|
||||
|
||||
void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
||||
gboolean create_mipmaps);
|
||||
|
||||
void meta_shaped_texture_clear (MetaShapedTexture *stex);
|
||||
|
||||
void meta_shaped_texture_clear_rectangles (MetaShapedTexture *stex);
|
||||
|
||||
void meta_shaped_texture_add_rectangle (MetaShapedTexture *stex,
|
||||
const XRectangle *rect);
|
||||
void meta_shaped_texture_add_rectangles (MetaShapedTexture *stex,
|
||||
size_t num_rects,
|
||||
const XRectangle *rects);
|
||||
|
||||
/* Assumes ownership of clip_region */
|
||||
void meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
||||
cairo_region_t *clip_region);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __META_SHAPED_TEXTURE_H__ */
|
654
src/compositor/meta-texture-tower.c
Normal file
654
src/compositor/meta-texture-tower.c
Normal file
@@ -0,0 +1,654 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* MetaTextureTower
|
||||
*
|
||||
* Mipmap emulation by creation of scaled down images
|
||||
*
|
||||
* Copyright (C) 2009 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "meta-texture-tower.h"
|
||||
|
||||
#ifndef M_LOG2E
|
||||
#define M_LOG2E 1.4426950408889634074
|
||||
#endif
|
||||
|
||||
#define MAX_TEXTURE_LEVELS 12
|
||||
|
||||
/* If the texture format in memory doesn't match this, then Mesa
|
||||
* will do the conversion, so things will still work, but it might
|
||||
* be slow depending on how efficient Mesa is. These should be the
|
||||
* native formats unless the display is 16bpp. If conversions
|
||||
* here are a bottleneck, investigate whether we are converting when
|
||||
* storing window data *into* the texture before adding extra code
|
||||
* to handle multiple texture formats.
|
||||
*/
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
#define TEXTURE_FORMAT COGL_PIXEL_FORMAT_BGRA_8888_PRE
|
||||
#else
|
||||
#define TEXTURE_FORMAT COGL_PIXEL_FORMAT_ARGB_8888_PRE
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
guint16 x1;
|
||||
guint16 y1;
|
||||
guint16 x2;
|
||||
guint16 y2;
|
||||
} Box;
|
||||
|
||||
struct _MetaTextureTower
|
||||
{
|
||||
int n_levels;
|
||||
CoglHandle textures[MAX_TEXTURE_LEVELS];
|
||||
CoglHandle fbos[MAX_TEXTURE_LEVELS];
|
||||
Box invalid[MAX_TEXTURE_LEVELS];
|
||||
};
|
||||
|
||||
/**
|
||||
* meta_texture_tower_new:
|
||||
*
|
||||
* Creates a new texture tower. The base texture has to be set with
|
||||
* meta_texture_tower_set_base_texture() before use.
|
||||
*
|
||||
* Return value: the new texture tower. Free with meta_texture_tower_free()
|
||||
*/
|
||||
MetaTextureTower *
|
||||
meta_texture_tower_new (void)
|
||||
{
|
||||
MetaTextureTower *tower;
|
||||
|
||||
tower = g_slice_new0 (MetaTextureTower);
|
||||
|
||||
return tower;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_texture_tower_free:
|
||||
* @tower: a #MetaTextureTower
|
||||
*
|
||||
* Frees a texture tower created with meta_texture_tower_new().
|
||||
*/
|
||||
void
|
||||
meta_texture_tower_free (MetaTextureTower *tower)
|
||||
{
|
||||
g_return_if_fail (tower != NULL);
|
||||
|
||||
meta_texture_tower_set_base_texture (tower, COGL_INVALID_HANDLE);
|
||||
|
||||
g_slice_free (MetaTextureTower, tower);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
texture_is_rectangle (CoglHandle texture)
|
||||
{
|
||||
GLuint gl_tex;
|
||||
GLenum gl_target;
|
||||
|
||||
cogl_texture_get_gl_texture (texture, &gl_tex, &gl_target);
|
||||
return gl_target == GL_TEXTURE_RECTANGLE_ARB;
|
||||
}
|
||||
|
||||
static void
|
||||
free_texture (CoglHandle texture)
|
||||
{
|
||||
GLuint gl_tex;
|
||||
GLenum gl_target;
|
||||
|
||||
cogl_texture_get_gl_texture (texture, &gl_tex, &gl_target);
|
||||
|
||||
if (gl_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
glDeleteTextures (1, &gl_tex);
|
||||
|
||||
cogl_handle_unref (texture);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_texture_tower_update_area:
|
||||
* @tower: a MetaTextureTower
|
||||
* @texture: the new texture used as a base for scaled down versions
|
||||
*
|
||||
* Sets the base texture that is the scaled texture that the
|
||||
* scaled textures of the tower are derived from. The texture itself
|
||||
* will be used as level 0 of the tower and will be referenced until
|
||||
* unset or until the tower is freed.
|
||||
*/
|
||||
void
|
||||
meta_texture_tower_set_base_texture (MetaTextureTower *tower,
|
||||
CoglHandle texture)
|
||||
{
|
||||
int i;
|
||||
|
||||
g_return_if_fail (tower != NULL);
|
||||
|
||||
if (texture == tower->textures[0])
|
||||
return;
|
||||
|
||||
if (tower->textures[0] != COGL_INVALID_HANDLE)
|
||||
{
|
||||
for (i = 1; i < tower->n_levels; i++)
|
||||
{
|
||||
if (tower->textures[i] != COGL_INVALID_HANDLE)
|
||||
{
|
||||
free_texture (tower->textures[i]);
|
||||
tower->textures[i] = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (tower->fbos[i] != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (tower->fbos[i]);
|
||||
tower->fbos[i] = COGL_INVALID_HANDLE;
|
||||
}
|
||||
}
|
||||
|
||||
cogl_handle_unref (tower->textures[0]);
|
||||
}
|
||||
|
||||
tower->textures[0] = texture;
|
||||
|
||||
if (tower->textures[0] != COGL_INVALID_HANDLE)
|
||||
{
|
||||
int width, height;
|
||||
|
||||
cogl_handle_ref (tower->textures[0]);
|
||||
|
||||
width = cogl_texture_get_width (tower->textures[0]);
|
||||
height = cogl_texture_get_height (tower->textures[0]);
|
||||
|
||||
tower->n_levels = 1 + MAX ((int)(M_LOG2E * log (width)), (int)(M_LOG2E * log (height)));
|
||||
tower->n_levels = MIN(tower->n_levels, MAX_TEXTURE_LEVELS);
|
||||
|
||||
meta_texture_tower_update_area (tower, 0, 0, width, height);
|
||||
}
|
||||
else
|
||||
{
|
||||
tower->n_levels = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_texture_tower_update_area:
|
||||
* @tower: a MetaTextureTower
|
||||
* @x: X coordinate of upper left of rectangle that changed
|
||||
* @y: Y coordinate of upper left of rectangle that changed
|
||||
* @width: width of rectangle that changed
|
||||
* @height: height rectangle that changed
|
||||
*
|
||||
* Mark a region of the base texture as having changed; the next
|
||||
* time a scaled down version of the base texture is retrieved,
|
||||
* the appropriate area of the scaled down texture will be updated.
|
||||
*/
|
||||
void
|
||||
meta_texture_tower_update_area (MetaTextureTower *tower,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
int texture_width, texture_height;
|
||||
Box invalid;
|
||||
int i;
|
||||
|
||||
g_return_if_fail (tower != NULL);
|
||||
|
||||
texture_width = cogl_texture_get_width (tower->textures[0]);
|
||||
texture_height = cogl_texture_get_height (tower->textures[0]);
|
||||
|
||||
invalid.x1 = x;
|
||||
invalid.y1 = y;
|
||||
invalid.x2 = x + width;
|
||||
invalid.y2 = y + height;
|
||||
|
||||
for (i = 1; i < tower->n_levels; i++)
|
||||
{
|
||||
texture_width = MAX (1, texture_width / 2);
|
||||
texture_height = MAX (1, texture_height / 2);
|
||||
|
||||
invalid.x1 = invalid.x1 / 2;
|
||||
invalid.y1 = invalid.y1 / 2;
|
||||
invalid.x2 = MIN (texture_width, (invalid.x2 + 1) / 2);
|
||||
invalid.y2 = MIN (texture_height, (invalid.y2 + 1) / 2);
|
||||
|
||||
if (tower->invalid[i].x1 == tower->invalid[i].x2 ||
|
||||
tower->invalid[i].y1 == tower->invalid[i].y2)
|
||||
{
|
||||
tower->invalid[i] = invalid;
|
||||
}
|
||||
else
|
||||
{
|
||||
tower->invalid[i].x1 = MIN (tower->invalid[i].x1, invalid.x1);
|
||||
tower->invalid[i].y1 = MIN (tower->invalid[i].y1, invalid.y1);
|
||||
tower->invalid[i].x2 = MAX (tower->invalid[i].x2, invalid.x2);
|
||||
tower->invalid[i].y2 = MAX (tower->invalid[i].y2, invalid.y2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* It generally looks worse if we scale up a window texture by even a
|
||||
* small amount than if we scale it down using bilinear filtering, so
|
||||
* we always pick the *larger* adjacent level. */
|
||||
#define LOD_BIAS (-0.49)
|
||||
|
||||
/* This determines the appropriate level of detail to use when drawing the
|
||||
* texture, in a way that corresponds to what the GL specification does
|
||||
* when mip-mapping. This is probably fancier and slower than what we need,
|
||||
* but we do the computation only once each time we paint a window, and
|
||||
* its easier to just use the equations from the specification than to
|
||||
* come up with something simpler.
|
||||
*
|
||||
* If window is being painted at an angle from the viewer, then we have to
|
||||
* pick a point in the texture; we use the middle of the texture (which is
|
||||
* why the width/height are passed in.) This is not the normal case for
|
||||
* Meta.
|
||||
*/
|
||||
static int
|
||||
get_paint_level (int width, int height)
|
||||
{
|
||||
CoglMatrix projection, modelview, pm;
|
||||
float v[4];
|
||||
double viewport_width, viewport_height;
|
||||
double u0, v0;
|
||||
double xc, yc, wc;
|
||||
double dxdu_, dxdv_, dydu_, dydv_;
|
||||
double det_, det_sq;
|
||||
double rho_sq;
|
||||
double lambda;
|
||||
|
||||
/* See
|
||||
* http://www.opengl.org/registry/doc/glspec32.core.20090803.pdf
|
||||
* Section 3.8.9, p. 1.6.2. Here we have
|
||||
*
|
||||
* u(x,y) = x_o;
|
||||
* v(x,y) = y_o;
|
||||
*
|
||||
* Since we are mapping 1:1 from object coordinates into pixel
|
||||
* texture coordinates, the clip coordinates are:
|
||||
*
|
||||
* (x_c) (x_o) (u)
|
||||
* (y_c) = (M_projection)(M_modelview) (y_o) = (PM) (v)
|
||||
* (z_c) (z_o) (0)
|
||||
* (w_c) (w_o) (1)
|
||||
*/
|
||||
|
||||
cogl_get_projection_matrix (&projection);
|
||||
cogl_get_modelview_matrix (&modelview);
|
||||
|
||||
cogl_matrix_multiply (&pm, &projection, &modelview);
|
||||
|
||||
cogl_get_viewport (v);
|
||||
viewport_width = v[2];
|
||||
viewport_height = v[3];
|
||||
|
||||
u0 = width / 2.;
|
||||
v0 = height / 2.;
|
||||
|
||||
xc = pm.xx * u0 + pm.xy * v0 + pm.xw;
|
||||
yc = pm.yx * u0 + pm.yy * v0 + pm.yw;
|
||||
wc = pm.wx * u0 + pm.wy * v0 + pm.ww;
|
||||
|
||||
/* We'll simplify the equations below for a bit of micro-optimization.
|
||||
* The commented out code is the unsimplified version.
|
||||
|
||||
// Partial derivates of window coordinates:
|
||||
//
|
||||
// x_w = 0.5 * viewport_width * x_c / w_c + viewport_center_x
|
||||
// y_w = 0.5 * viewport_height * y_c / w_c + viewport_center_y
|
||||
//
|
||||
// with respect to u, v, using
|
||||
// d(a/b)/dx = da/dx * (1/b) - a * db/dx / (b^2)
|
||||
|
||||
dxdu = 0.5 * viewport_width * (pm.xx - pm.wx * (xc/wc)) / wc;
|
||||
dxdv = 0.5 * viewport_width * (pm.xy - pm.wy * (xc/wc)) / wc;
|
||||
dydu = 0.5 * viewport_height * (pm.yx - pm.wx * (yc/wc)) / wc;
|
||||
dydv = 0.5 * viewport_height * (pm.yy - pm.wy * (yc/wc)) / wc;
|
||||
|
||||
// Compute the inverse partials as the matrix inverse
|
||||
det = dxdu * dydv - dxdv * dydu;
|
||||
|
||||
dudx = dydv / det;
|
||||
dudy = - dxdv / det;
|
||||
dvdx = - dydu / det;
|
||||
dvdy = dvdu / det;
|
||||
|
||||
// Scale factor; maximum of the distance in texels for a change of 1 pixel
|
||||
// in the X direction or 1 pixel in the Y direction
|
||||
rho = MAX (sqrt (dudx * dudx + dvdx * dvdx), sqrt(dudy * dudy + dvdy * dvdy));
|
||||
|
||||
// Level of detail
|
||||
lambda = log2 (rho) + LOD_BIAS;
|
||||
*/
|
||||
|
||||
/* dxdu * wc, etc */
|
||||
dxdu_ = 0.5 * viewport_width * (pm.xx - pm.wx * (xc/wc));
|
||||
dxdv_ = 0.5 * viewport_width * (pm.xy - pm.wy * (xc/wc));
|
||||
dydu_ = 0.5 * viewport_height * (pm.yx - pm.wx * (yc/wc));
|
||||
dydv_ = 0.5 * viewport_height * (pm.yy - pm.wy * (yc/wc));
|
||||
|
||||
/* det * wc^2 */
|
||||
det_ = dxdu_ * dydv_ - dxdv_ * dydu_;
|
||||
det_sq = det_ * det_;
|
||||
if (det_sq == 0.0)
|
||||
return -1;
|
||||
|
||||
/* (rho * det * wc)^2 */
|
||||
rho_sq = MAX (dydv_ * dydv_ + dydu_ * dydu_, dxdv_ * dxdv_ + dxdu_ * dxdu_);
|
||||
lambda = 0.5 * M_LOG2E * log (rho_sq * wc * wc / det_sq) + LOD_BIAS;
|
||||
|
||||
#if 0
|
||||
g_print ("%g %g %g\n", 0.5 * viewport_width * pm.xx / pm.ww, 0.5 * viewport_height * pm.yy / pm.ww, lambda);
|
||||
#endif
|
||||
|
||||
if (lambda <= 0.)
|
||||
return 0;
|
||||
else
|
||||
return (int)(0.5 + lambda);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_power_of_two (int x)
|
||||
{
|
||||
return (x & (x - 1)) == 0;
|
||||
}
|
||||
|
||||
static void
|
||||
texture_tower_create_texture (MetaTextureTower *tower,
|
||||
int level,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
if ((!is_power_of_two (width) || !is_power_of_two (height)) &&
|
||||
texture_is_rectangle (tower->textures[level - 1]))
|
||||
{
|
||||
GLuint tex = 0;
|
||||
|
||||
glGenTextures (1, &tex);
|
||||
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex);
|
||||
glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0,
|
||||
GL_RGBA, width,height,
|
||||
#if TEXTURE_FORMAT == COGL_PIXEL_FORMAT_BGRA_8888_PRE
|
||||
0, GL_BGRA, GL_UNSIGNED_BYTE,
|
||||
#else /* assume big endian */
|
||||
0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
|
||||
#endif
|
||||
NULL);
|
||||
|
||||
tower->textures[level] = cogl_texture_new_from_foreign (tex, GL_TEXTURE_RECTANGLE_ARB,
|
||||
width, height,
|
||||
0, 0,
|
||||
TEXTURE_FORMAT);
|
||||
}
|
||||
else
|
||||
{
|
||||
tower->textures[level] = cogl_texture_new_with_size (width, height,
|
||||
COGL_TEXTURE_NO_AUTO_MIPMAP,
|
||||
TEXTURE_FORMAT);
|
||||
}
|
||||
|
||||
tower->invalid[level].x1 = 0;
|
||||
tower->invalid[level].y1 = 0;
|
||||
tower->invalid[level].x2 = width;
|
||||
tower->invalid[level].y2 = height;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
texture_tower_revalidate_fbo (MetaTextureTower *tower,
|
||||
int level)
|
||||
{
|
||||
CoglHandle source_texture = tower->textures[level - 1];
|
||||
int source_texture_width = cogl_texture_get_width (source_texture);
|
||||
int source_texture_height = cogl_texture_get_height (source_texture);
|
||||
CoglHandle dest_texture = tower->textures[level];
|
||||
int dest_texture_width = cogl_texture_get_width (dest_texture);
|
||||
int dest_texture_height = cogl_texture_get_height (dest_texture);
|
||||
Box *invalid = &tower->invalid[level];
|
||||
CoglMatrix modelview;
|
||||
|
||||
if (tower->fbos[level] == COGL_INVALID_HANDLE)
|
||||
{
|
||||
/* Work around http://bugzilla.openedhand.com/show_bug.cgi?id=2110 */
|
||||
cogl_flush();
|
||||
|
||||
tower->fbos[level] = cogl_offscreen_new_to_texture (dest_texture);
|
||||
}
|
||||
|
||||
if (tower->fbos[level] == COGL_INVALID_HANDLE)
|
||||
return FALSE;
|
||||
|
||||
cogl_push_framebuffer (tower->fbos[level]);
|
||||
|
||||
cogl_ortho (0, dest_texture_width, dest_texture_height, 0, -1., 1.);
|
||||
|
||||
cogl_matrix_init_identity (&modelview);
|
||||
cogl_set_modelview_matrix (&modelview);
|
||||
|
||||
cogl_set_source_texture (tower->textures[level - 1]);
|
||||
cogl_rectangle_with_texture_coords (invalid->x1, invalid->y1,
|
||||
invalid->x2, invalid->y2,
|
||||
(2. * invalid->x1) / source_texture_width,
|
||||
(2. * invalid->y1) / source_texture_height,
|
||||
(2. * invalid->x2) / source_texture_width,
|
||||
(2. * invalid->y2) / source_texture_height);
|
||||
|
||||
cogl_pop_framebuffer ();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
fill_copy (guchar *buf,
|
||||
const guchar *source,
|
||||
int width)
|
||||
{
|
||||
memcpy (buf, source, width * 4);
|
||||
}
|
||||
|
||||
static void
|
||||
fill_scale_down (guchar *buf,
|
||||
const guchar *source,
|
||||
int width)
|
||||
{
|
||||
while (width > 1)
|
||||
{
|
||||
buf[0] = (source[0] + source[4]) / 2;
|
||||
buf[1] = (source[1] + source[5]) / 2;
|
||||
buf[2] = (source[2] + source[6]) / 2;
|
||||
buf[3] = (source[3] + source[7]) / 2;
|
||||
|
||||
buf += 4;
|
||||
source += 8;
|
||||
width -= 2;
|
||||
}
|
||||
|
||||
if (width > 0)
|
||||
{
|
||||
buf[0] = source[0] / 2;
|
||||
buf[1] = source[1] / 2;
|
||||
buf[2] = source[2] / 2;
|
||||
buf[3] = source[3] / 2;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
texture_tower_revalidate_client (MetaTextureTower *tower,
|
||||
int level)
|
||||
{
|
||||
CoglHandle source_texture = tower->textures[level - 1];
|
||||
int source_texture_width = cogl_texture_get_width (source_texture);
|
||||
int source_texture_height = cogl_texture_get_height (source_texture);
|
||||
guint source_rowstride;
|
||||
guchar *source_data;
|
||||
CoglHandle dest_texture = tower->textures[level];
|
||||
int dest_texture_width = cogl_texture_get_width (dest_texture);
|
||||
int dest_texture_height = cogl_texture_get_height (dest_texture);
|
||||
int dest_x = tower->invalid[level].x1;
|
||||
int dest_y = tower->invalid[level].y1;
|
||||
int dest_width = tower->invalid[level].x2 - tower->invalid[level].x1;
|
||||
int dest_height = tower->invalid[level].y2 - tower->invalid[level].y1;
|
||||
guchar *dest_data;
|
||||
guchar *source_tmp1 = NULL, *source_tmp2 = NULL;
|
||||
int i, j;
|
||||
|
||||
source_rowstride = source_texture_width * 4;
|
||||
|
||||
source_data = g_malloc (source_texture_height * source_rowstride);
|
||||
cogl_texture_get_data (source_texture, TEXTURE_FORMAT, source_rowstride,
|
||||
source_data);
|
||||
|
||||
dest_data = g_malloc (dest_height * dest_width * 4);
|
||||
|
||||
if (dest_texture_height < source_texture_height)
|
||||
{
|
||||
source_tmp1 = g_malloc (dest_width * 4);
|
||||
source_tmp2 = g_malloc (dest_width * 4);
|
||||
}
|
||||
|
||||
for (i = 0; i < dest_height; i++)
|
||||
{
|
||||
guchar *dest_row = dest_data + i * dest_width * 4;
|
||||
if (dest_texture_height < source_texture_height)
|
||||
{
|
||||
guchar *source1, *source2;
|
||||
guchar *dest;
|
||||
|
||||
if (dest_texture_width < source_texture_width)
|
||||
{
|
||||
fill_scale_down (source_tmp1,
|
||||
source_data + ((i + dest_y) * 2) * source_rowstride + dest_x * 2 * 4,
|
||||
dest_width * 2);
|
||||
fill_scale_down (source_tmp2,
|
||||
source_data + ((i + dest_y) * 2 + 1) * source_rowstride + dest_x * 2 * 4,
|
||||
dest_width * 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_copy (source_tmp1,
|
||||
source_data + ((i + dest_y) * 2) * source_rowstride + dest_x * 4,
|
||||
dest_width);
|
||||
fill_copy (source_tmp2,
|
||||
source_data + ((i + dest_y) * 2 + 1) * source_rowstride + dest_x * 4,
|
||||
dest_width);
|
||||
}
|
||||
|
||||
source1 = source_tmp1;
|
||||
source2 = source_tmp2;
|
||||
|
||||
dest = dest_row;
|
||||
for (j = 0; j < dest_width * 4; j++)
|
||||
*(dest++) = (*(source1++) + *(source2++)) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dest_texture_width < source_texture_width)
|
||||
fill_scale_down (dest_row,
|
||||
source_data + (i + dest_y) * source_rowstride + dest_x * 2 * 4,
|
||||
dest_width * 2);
|
||||
else
|
||||
fill_copy (dest_row,
|
||||
source_data + (i + dest_y) * source_rowstride,
|
||||
dest_width);
|
||||
}
|
||||
}
|
||||
|
||||
cogl_texture_set_region (dest_texture,
|
||||
0, 0,
|
||||
dest_x, dest_y,
|
||||
dest_width, dest_height,
|
||||
dest_width, dest_height,
|
||||
TEXTURE_FORMAT,
|
||||
4 * dest_width,
|
||||
dest_data);
|
||||
|
||||
if (dest_height < source_texture_height)
|
||||
{
|
||||
g_free (source_tmp1);
|
||||
g_free (source_tmp2);
|
||||
}
|
||||
|
||||
g_free (source_data);
|
||||
g_free (dest_data);
|
||||
}
|
||||
|
||||
static void
|
||||
texture_tower_revalidate (MetaTextureTower *tower,
|
||||
int level)
|
||||
{
|
||||
if (!texture_tower_revalidate_fbo (tower, level))
|
||||
texture_tower_revalidate_client (tower, level);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_texture_tower_get_paint_texture:
|
||||
* @tower: a MetaTextureTower
|
||||
*
|
||||
* Gets the texture from the tower that best matches the current
|
||||
* rendering scale. (On the assumption here the texture is going to
|
||||
* be rendered with vertex coordinates that correspond to its
|
||||
* size in pixels, so a 200x200 texture will be rendered on the
|
||||
* rectangle (0, 0, 200, 200).
|
||||
*
|
||||
* Return value: the COGL texture handle to use for painting, or
|
||||
* %COGL_INVALID_HANDLE if no base texture has yet been set.
|
||||
*/
|
||||
CoglHandle
|
||||
meta_texture_tower_get_paint_texture (MetaTextureTower *tower)
|
||||
{
|
||||
int texture_width, texture_height;
|
||||
int level;
|
||||
|
||||
g_return_val_if_fail (tower != NULL, COGL_INVALID_HANDLE);
|
||||
|
||||
if (tower->textures[0] == COGL_INVALID_HANDLE)
|
||||
return COGL_INVALID_HANDLE;
|
||||
|
||||
texture_width = cogl_texture_get_width (tower->textures[0]);
|
||||
texture_height = cogl_texture_get_height (tower->textures[0]);
|
||||
|
||||
level = get_paint_level(texture_width, texture_height);
|
||||
if (level < 0) /* singular paint matrix, scaled to nothing */
|
||||
return COGL_INVALID_HANDLE;
|
||||
level = MIN (level, tower->n_levels - 1);
|
||||
|
||||
if (tower->textures[level] == COGL_INVALID_HANDLE ||
|
||||
(tower->invalid[level].x2 != tower->invalid[level].x1 &&
|
||||
tower->invalid[level].y2 != tower->invalid[level].y1))
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= level; i++)
|
||||
{
|
||||
/* Use "floor" convention here to be consistent with the NPOT texture extension */
|
||||
texture_width = MAX (1, texture_width / 2);
|
||||
texture_height = MAX (1, texture_height / 2);
|
||||
|
||||
if (tower->textures[i] == COGL_INVALID_HANDLE)
|
||||
texture_tower_create_texture (tower, i, texture_width, texture_height);
|
||||
}
|
||||
|
||||
for (i = 1; i <= level; i++)
|
||||
{
|
||||
if (tower->invalid[level].x2 != tower->invalid[level].x1 &&
|
||||
tower->invalid[level].y2 != tower->invalid[level].y1)
|
||||
texture_tower_revalidate (tower, i);
|
||||
}
|
||||
}
|
||||
|
||||
return tower->textures[level];
|
||||
}
|
69
src/compositor/meta-texture-tower.h
Normal file
69
src/compositor/meta-texture-tower.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* MetaTextureTower
|
||||
*
|
||||
* Mipmap emulation by creation of scaled down images
|
||||
*
|
||||
* Copyright (C) 2009 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_TEXTURE_TOWER_H__
|
||||
#define __META_TEXTURE_TOWER_H__
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* SECTION:MetaTextureTower
|
||||
* @short_description: mipmap emulation by creation of scaled down images
|
||||
*
|
||||
* A #MetaTextureTower is used to get good looking scaled down images when
|
||||
* we can't use the GL drivers mipmap support. There are two separate reasons
|
||||
*
|
||||
* - Some cards (including radeon cards <= r5xx) only support
|
||||
* TEXTURE_RECTANGLE_ARB and not NPOT textures. Rectangular textures
|
||||
* are defined not to support mipmapping.
|
||||
* - Even when NPOT textures are available, the combination of NPOT
|
||||
* textures, texture_from_pixmap, and mipmapping doesn't typically
|
||||
* work, since the X server doesn't allocate pixmaps in the right
|
||||
* layout for mipmapping.
|
||||
*
|
||||
* So, what we do is create the "mipmap" levels ourselves by successive
|
||||
* power-of-two scaledowns, and when rendering pick the single texture
|
||||
* that best matches the scale we are rendering at. (Since we aren't
|
||||
* typically using perspective transforms, we'll frequently have a single
|
||||
* scale for the entire texture.)
|
||||
*/
|
||||
|
||||
typedef struct _MetaTextureTower MetaTextureTower;
|
||||
|
||||
MetaTextureTower *meta_texture_tower_new (void);
|
||||
void meta_texture_tower_free (MetaTextureTower *tower);
|
||||
void meta_texture_tower_set_base_texture (MetaTextureTower *tower,
|
||||
CoglHandle texture);
|
||||
void meta_texture_tower_update_area (MetaTextureTower *tower,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
CoglHandle meta_texture_tower_get_paint_texture (MetaTextureTower *tower);
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#endif /* __META_TEXTURE_TOWER_H__ */
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user