Compare commits
348 Commits
3.1.90.1
...
wip/cb2eb3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7623b97399 | ||
![]() |
8d8e0cb055 | ||
![]() |
1620131434 | ||
![]() |
873da3405c | ||
![]() |
8a062b39ab | ||
![]() |
3ab3c8423e | ||
![]() |
11e1f687f9 | ||
![]() |
25815473e6 | ||
![]() |
5053997021 | ||
![]() |
b6468a7fa5 | ||
![]() |
e2e0ead870 | ||
![]() |
f80a5d892f | ||
![]() |
5823c5e0f5 | ||
![]() |
ecac8c9d09 | ||
![]() |
2666303045 | ||
![]() |
0a9bc8995a | ||
![]() |
143436c37c | ||
![]() |
7c11e0b0eb | ||
![]() |
beccdd64f5 | ||
![]() |
dd0a6d7e08 | ||
![]() |
02bb550bd6 | ||
![]() |
8f789a8fad | ||
![]() |
865b9df9a9 | ||
![]() |
1e9268045d | ||
![]() |
20acb73024 | ||
![]() |
b97ad209c2 | ||
![]() |
f2d8e3266b | ||
![]() |
11be2fa36a | ||
![]() |
302302a116 | ||
![]() |
fd13dad0c4 | ||
![]() |
2da1ed1ae0 | ||
![]() |
58f04c7284 | ||
![]() |
a6737ef129 | ||
![]() |
52fee4df1c | ||
![]() |
8da12ac0e0 | ||
![]() |
e43f8db6e8 | ||
![]() |
a7cbc9ad9a | ||
![]() |
0be3f81841 | ||
![]() |
f53e26bc39 | ||
![]() |
cc3be6da4d | ||
![]() |
fef2a061a8 | ||
![]() |
bdb995d758 | ||
![]() |
2a729f89aa | ||
![]() |
af242b27b2 | ||
![]() |
a198ff415a | ||
![]() |
981c1c2ab5 | ||
![]() |
fb35f9fa49 | ||
![]() |
9194a04faa | ||
![]() |
a0ed41d8ce | ||
![]() |
e3e87727b6 | ||
![]() |
2d878f29eb | ||
![]() |
307e4c7d0e | ||
![]() |
43e7687d89 | ||
![]() |
2e4f67f3f9 | ||
![]() |
69c11b59c4 | ||
![]() |
4148a5cc6a | ||
![]() |
8a6a568aca | ||
![]() |
12cc0cee29 | ||
![]() |
878b1012b4 | ||
![]() |
a78fec7951 | ||
![]() |
a24c512caa | ||
![]() |
c669a3892e | ||
![]() |
ba4f008d40 | ||
![]() |
b0a099935b | ||
![]() |
aba39ef953 | ||
![]() |
ebf8c460e1 | ||
![]() |
25d3432eee | ||
![]() |
cd7a74fbcd | ||
![]() |
c64188c67f | ||
![]() |
4c2371f2e7 | ||
![]() |
ff6c31dcc0 | ||
![]() |
1b649c18ed | ||
![]() |
93037e4c6b | ||
![]() |
ed358c8f4b | ||
![]() |
a22859a64a | ||
![]() |
c44438b19f | ||
![]() |
b58366d3ad | ||
![]() |
6900128b2f | ||
![]() |
c0b4d68390 | ||
![]() |
0d794f28f0 | ||
![]() |
e389eff79d | ||
![]() |
41adbdda12 | ||
![]() |
2d6555ca4d | ||
![]() |
044d58951e | ||
![]() |
9c97e8999e | ||
![]() |
e97b38b38e | ||
![]() |
8809673a74 | ||
![]() |
68321d9bf4 | ||
![]() |
65390e50a4 | ||
![]() |
f8d32661b5 | ||
![]() |
d84911fdf9 | ||
![]() |
4147ea4660 | ||
![]() |
2dd7c98641 | ||
![]() |
3aad30143c | ||
![]() |
93d06d4368 | ||
![]() |
b19c061db5 | ||
![]() |
497258f6e5 | ||
![]() |
977e6388ad | ||
![]() |
0879cf0d8d | ||
![]() |
4aab7fb7b9 | ||
![]() |
839fee19ef | ||
![]() |
46a56bafbd | ||
![]() |
c8b4939c7e | ||
![]() |
fc3e82421a | ||
![]() |
23046f6e28 | ||
![]() |
823208120d | ||
![]() |
d12c507b12 | ||
![]() |
2157c238b6 | ||
![]() |
423bda908e | ||
![]() |
98d427ddba | ||
![]() |
7a35579c3f | ||
![]() |
adc89fbb2c | ||
![]() |
a6ca3f768f | ||
![]() |
9362fbdcde | ||
![]() |
47099f4a87 | ||
![]() |
2e6e5b068c | ||
![]() |
ee840bc832 | ||
![]() |
6333c174dc | ||
![]() |
a3bf9b01aa | ||
![]() |
402b477458 | ||
![]() |
6b273ca713 | ||
![]() |
c3ec6b34a3 | ||
![]() |
78dc480e86 | ||
![]() |
53364f986c | ||
![]() |
5770b5b3c3 | ||
![]() |
f16f47bd38 | ||
![]() |
58a57185b7 | ||
![]() |
8fb361cb26 | ||
![]() |
335d211204 | ||
![]() |
7f64d6b92e | ||
![]() |
8c1b2d5eda | ||
![]() |
578b1c06c7 | ||
![]() |
6dfde43786 | ||
![]() |
a8ead4d447 | ||
![]() |
2926323a9a | ||
![]() |
13bc8f7a76 | ||
![]() |
ad516492d2 | ||
![]() |
6677c61db3 | ||
![]() |
f26f61ed7d | ||
![]() |
8ca86fa8bf | ||
![]() |
f2f500836e | ||
![]() |
c39998efee | ||
![]() |
3b811f33c7 | ||
![]() |
beea2f7acd | ||
![]() |
fb4c50478d | ||
![]() |
ac0602a02e | ||
![]() |
5361e0259f | ||
![]() |
04bf73ff6d | ||
![]() |
047b9de1c6 | ||
![]() |
39b3244a3e | ||
![]() |
63f982eb72 | ||
![]() |
c689306dae | ||
![]() |
0b7f2f8cd3 | ||
![]() |
efc90173b1 | ||
![]() |
9e439a22b5 | ||
![]() |
848c1f52f3 | ||
![]() |
1b84be7031 | ||
![]() |
eb08a65b4c | ||
![]() |
43ba596a0e | ||
![]() |
2e1de1a037 | ||
![]() |
81ede6abf8 | ||
![]() |
1d98f1fee8 | ||
![]() |
f0582d1a86 | ||
![]() |
607dbf0f43 | ||
![]() |
584cd3e684 | ||
![]() |
90ec5b05f3 | ||
![]() |
7253a75b18 | ||
![]() |
cdbe3b274f | ||
![]() |
3f3e3ce37e | ||
![]() |
5e3d93da87 | ||
![]() |
82b1d0d7e5 | ||
![]() |
3583e57ec3 | ||
![]() |
2ddde04678 | ||
![]() |
feda493fbf | ||
![]() |
fc72309b71 | ||
![]() |
860c2a6282 | ||
![]() |
e6b4a34daf | ||
![]() |
3319cdfec0 | ||
![]() |
fc5594faad | ||
![]() |
7c9e0c2ebc | ||
![]() |
9157cc2b70 | ||
![]() |
69e7b32b54 | ||
![]() |
04835eccb5 | ||
![]() |
01c363bb6a | ||
![]() |
7649772394 | ||
![]() |
ca3dc2e876 | ||
![]() |
70d85049b1 | ||
![]() |
29f6f5e0ad | ||
![]() |
d249cfd040 | ||
![]() |
3cb912aee2 | ||
![]() |
7df823132c | ||
![]() |
41353d642b | ||
![]() |
c47039db82 | ||
![]() |
0dab6df25a | ||
![]() |
c844bab232 | ||
![]() |
848f9d1399 | ||
![]() |
2e63de5c0a | ||
![]() |
7319b10d72 | ||
![]() |
1265efcf78 | ||
![]() |
3e0ef03fd9 | ||
![]() |
37076941ad | ||
![]() |
25e43618a4 | ||
![]() |
fd404bafc8 | ||
![]() |
3b3b26b000 | ||
![]() |
33498f6b84 | ||
![]() |
c0a440b852 | ||
![]() |
1772a2a59c | ||
![]() |
44f362ad87 | ||
![]() |
478f1020a4 | ||
![]() |
e8209e7b22 | ||
![]() |
2d20c9ecad | ||
![]() |
f35160c30f | ||
![]() |
7fad591d6e | ||
![]() |
a364cea779 | ||
![]() |
2eb3ff4bfb | ||
![]() |
796ca6746d | ||
![]() |
0a79fb8d62 | ||
![]() |
ac7ec585c8 | ||
![]() |
264c555af0 | ||
![]() |
bbbb0e6002 | ||
![]() |
41ae760454 | ||
![]() |
9729a99ec5 | ||
![]() |
d64c5bfc11 | ||
![]() |
e4ed433e18 | ||
![]() |
8ab5cc8f19 | ||
![]() |
35261808a9 | ||
![]() |
3a4512cd91 | ||
![]() |
eb0185c1b1 | ||
![]() |
34f6ffd1ad | ||
![]() |
baeb9fbc4b | ||
![]() |
c3d76aead6 | ||
![]() |
bed9cb1648 | ||
![]() |
4ca552785f | ||
![]() |
b26b11c74d | ||
![]() |
b3114bb9e5 | ||
![]() |
497f9be61e | ||
![]() |
a88365df9b | ||
![]() |
47f98c5528 | ||
![]() |
0e50287aea | ||
![]() |
d42a2a3c27 | ||
![]() |
78849bef04 | ||
![]() |
b1a69d1e89 | ||
![]() |
c5468ee391 | ||
![]() |
7ce7feeb2b | ||
![]() |
c0432ebb39 | ||
![]() |
1a51d307c8 | ||
![]() |
d0910da036 | ||
![]() |
a2726f41c9 | ||
![]() |
162213be0d | ||
![]() |
1596d1af10 | ||
![]() |
441287dc64 | ||
![]() |
6e47f0e846 | ||
![]() |
4fb2fab7f7 | ||
![]() |
3beb33bb44 | ||
![]() |
1b04a40dce | ||
![]() |
8087872130 | ||
![]() |
3ad25a62cd | ||
![]() |
7ecd673d23 | ||
![]() |
331c9aaee4 | ||
![]() |
ec1979f9f5 | ||
![]() |
4b411ea241 | ||
![]() |
70db187c36 | ||
![]() |
4de3f1d147 | ||
![]() |
821d4458ea | ||
![]() |
7f9472a58f | ||
![]() |
3599917123 | ||
![]() |
d624e85bc1 | ||
![]() |
6aa4bfd060 | ||
![]() |
a26e72c452 | ||
![]() |
acc4e03482 | ||
![]() |
e176a9e891 | ||
![]() |
0b36663ff1 | ||
![]() |
bb035fe6e0 | ||
![]() |
6d0c1f08d2 | ||
![]() |
f700a7be07 | ||
![]() |
138eb1e3b4 | ||
![]() |
c39129b6e8 | ||
![]() |
bf175e72ad | ||
![]() |
ba31ba4615 | ||
![]() |
f94f008ed6 | ||
![]() |
9d4f3c5842 | ||
![]() |
0b2a9d58e0 | ||
![]() |
28deea44d4 | ||
![]() |
f82966adb5 | ||
![]() |
9f54f1d75d | ||
![]() |
be9f7d7729 | ||
![]() |
1b4dce6f84 | ||
![]() |
3bb17f0671 | ||
![]() |
19d111a27b | ||
![]() |
289561ddf3 | ||
![]() |
d2ca160ea3 | ||
![]() |
cd19f9239c | ||
![]() |
16157ad522 | ||
![]() |
d37a692392 | ||
![]() |
f78f33d848 | ||
![]() |
c4692b8d51 | ||
![]() |
764569eb7a | ||
![]() |
aab0d2f54e | ||
![]() |
24678de261 | ||
![]() |
1b71eeb02a | ||
![]() |
bfc6a2b078 | ||
![]() |
9c9da8f575 | ||
![]() |
d1a87288a4 | ||
![]() |
e7c65d9404 | ||
![]() |
00e49b330c | ||
![]() |
7c6bc73031 | ||
![]() |
c1368155fc | ||
![]() |
d305174ecc | ||
![]() |
6b7391bca9 | ||
![]() |
4e99c38491 | ||
![]() |
6087a71951 | ||
![]() |
5f1c3de29a | ||
![]() |
abde64cb0c | ||
![]() |
6923973c8a | ||
![]() |
d7f1b95349 | ||
![]() |
4a5c7ee4cc | ||
![]() |
f3bb16f301 | ||
![]() |
d6b528a955 | ||
![]() |
7ba6503e9b | ||
![]() |
9ee7783759 | ||
![]() |
2dc5693c60 | ||
![]() |
a1ef22e0d7 | ||
![]() |
19b6888ea5 | ||
![]() |
9520eaa970 | ||
![]() |
088e0c1ee7 | ||
![]() |
de704386a1 | ||
![]() |
766799ec6d | ||
![]() |
7c50db5bf5 | ||
![]() |
7223c4e184 | ||
![]() |
b0a9c391a1 | ||
![]() |
5c7158792f | ||
![]() |
9c71d23884 | ||
![]() |
e1362562b4 | ||
![]() |
1ab6abc044 | ||
![]() |
bf4f3a8a99 | ||
![]() |
f9626d2db6 | ||
![]() |
28b59589ca | ||
![]() |
fb10910e66 | ||
![]() |
6d2efe9460 | ||
![]() |
f587595765 | ||
![]() |
5e6e8728c3 | ||
![]() |
f620f1b466 | ||
![]() |
818320e748 | ||
![]() |
fc2e7e94a5 | ||
![]() |
a47e35ba2e | ||
![]() |
07d8b2d510 | ||
![]() |
6329aeac11 | ||
![]() |
af1fef03f4 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -19,6 +19,7 @@ libtool
|
|||||||
ltmain.sh
|
ltmain.sh
|
||||||
missing
|
missing
|
||||||
.deps
|
.deps
|
||||||
|
src/50-mutter-windows.xml
|
||||||
src/mutter-wm.desktop
|
src/mutter-wm.desktop
|
||||||
src/mutter.desktop
|
src/mutter.desktop
|
||||||
*.o
|
*.o
|
||||||
@@ -40,6 +41,7 @@ stamp-h1
|
|||||||
stamp-it
|
stamp-it
|
||||||
.intltool-merge-cache
|
.intltool-merge-cache
|
||||||
POTFILES
|
POTFILES
|
||||||
|
po/*.pot
|
||||||
50-metacity-desktop-key.xml
|
50-metacity-desktop-key.xml
|
||||||
50-metacity-key.xml
|
50-metacity-key.xml
|
||||||
inlinepixbufs.h
|
inlinepixbufs.h
|
||||||
@@ -47,7 +49,8 @@ libmutter.pc
|
|||||||
mutter
|
mutter
|
||||||
mutter-theme-viewer
|
mutter-theme-viewer
|
||||||
mutter.desktop
|
mutter.desktop
|
||||||
mutter.schemas
|
org.gnome.mutter.gschema.valid
|
||||||
|
org.gnome.mutter.gschema.xml
|
||||||
testasyncgetprop
|
testasyncgetprop
|
||||||
testboxes
|
testboxes
|
||||||
testgradient
|
testgradient
|
||||||
|
8
HACKING
8
HACKING
@@ -42,10 +42,10 @@ Minimal Building/Testing Environment
|
|||||||
build a development version of Metacity -- odds are, you may be able
|
build a development version of Metacity -- odds are, you may be able
|
||||||
to build metacity from CVS without building any other modules.
|
to build metacity from CVS without building any other modules.
|
||||||
|
|
||||||
As long as you have gtk+ >= 2.10 and GConf with your distro (gtk+ >=
|
As long as you have gtk+ >= 3.0 and GIO >= 2.25.10 with your distro
|
||||||
2.6 if you manually revert the change from bug 348633), you should
|
(gtk+ >= 2.6 if you manually revert the change from bug 348633), you
|
||||||
be able to install your distro's development packages
|
should be able to install your distro's development packages
|
||||||
(e.g. gtk2-devel, GConf2-devel, startup-notification-devel on
|
(e.g. gtk2-devel, glib-devel, startup-notification-devel on
|
||||||
Fedora; also, remember to install the gnome-common package which is
|
Fedora; also, remember to install the gnome-common package which is
|
||||||
needed for building cvs versions of Gnome modules like Metacity) as
|
needed for building cvs versions of Gnome modules like Metacity) as
|
||||||
well as the standard development tools (gcc, autoconf, automake,
|
well as the standard development tools (gcc, autoconf, automake,
|
||||||
|
235
NEWS
235
NEWS
@@ -1,3 +1,238 @@
|
|||||||
|
3.4.1
|
||||||
|
=====
|
||||||
|
* API change: the meta_display_add_keybinding() function added in 3.4
|
||||||
|
wasn't usable from a GNOME Shell extension, so has been changed to take
|
||||||
|
a GSettings object rather than the name of a schema [Jasper; #673014]
|
||||||
|
* Don't try to auto-maximize not-maximizable windows; this fixes the problem
|
||||||
|
with the Nautilus desktop window being mis-positioned when enabled
|
||||||
|
[Owen; #673566]
|
||||||
|
* Fix a crash in the default plugin (not used in GNOME) [Giovanni; #673809]
|
||||||
|
* Make the <Super> key work when set as the mouse button modifier
|
||||||
|
[Florian; #662476]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Giovanni Campagna, Florian Muellner, Jasper St. Pierre, Owen Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Khaled Hosny [ar], Jordi Serratosa [ca], Carles Ferrando [ca@valencia],
|
||||||
|
Christian Kirbach [de], Kristjan Schmidt [eo], Arash Mousavi [fa],
|
||||||
|
Jiro Matsuzawa [ja], Shankar Prasad [kn], Aurimas Černius [lt],
|
||||||
|
Yinghua Wang [zh_CN]
|
||||||
|
|
||||||
|
3.4.0
|
||||||
|
=====
|
||||||
|
* Fix crash when a full-screen window is opened [Jasper; #672797]
|
||||||
|
* Fix memory leaks [Pavel; #672640]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jasper St. Pierre, Pavel Vasin
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Marek Černocký, Petr Kovar [cz], Bruno Brouard [fr], Sweta Kothari [gu],
|
||||||
|
Yaron Shahrabani [he], Changwoo Ryu [kr], Enrico Nicoletto [pt_BR],
|
||||||
|
Yuri Myasoedov [ru], Muhammet Kara [tr], Nguyễn Thái Ngọc Duy [vi]
|
||||||
|
|
||||||
|
3.3.92
|
||||||
|
======
|
||||||
|
* Automaximize large windows on map [Adel; #671677]
|
||||||
|
* When unmaximizing windows, make sure the unminimized size
|
||||||
|
is signficantly less than the maximized size [Adel; #671677]
|
||||||
|
* Don't offer maximize option for windows larger than the screen
|
||||||
|
[Jasper; #643606]
|
||||||
|
* Always focus the window immediately underneath without restacking
|
||||||
|
when closing a window [Jasper; #620744]
|
||||||
|
* Avoid drawing shadows when two windows are tiled together [Rui; #643075]
|
||||||
|
* Remove tooltips for window decorations [Florian; #645101]
|
||||||
|
* Add org.gnome.mutter.dynamic-workspaces GSetting - when this is set
|
||||||
|
to true, workspace counts are never saved to GSettings, avoiding
|
||||||
|
pointless disk traffic for GNOME dynamic workspaces [Florian; #671568]
|
||||||
|
* Add ::grab-op-begin, ::grab-op-end signals to MetaDisplay [Jasper; #670658]
|
||||||
|
* Add meta_display_get_ignored_modifier_mask() [Florian; #665215]
|
||||||
|
* Remove pointless wrapper methods on MetaPlugin [Jasper; #671103]
|
||||||
|
* Fix frame drawing with 3.3.x GTK+ releases [Florian; #671796]
|
||||||
|
* Build fixes [Jasper, Rico, Rui]
|
||||||
|
* Misc bug fixes [Damien, Jasper, Lionel, Marius, Owen, Rui;
|
||||||
|
#661256, #667437, #671601, #671087, #672374]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Stefano Facchini, Adel Gadllah, Lionel Landwerlin, Mariusz Libera,
|
||||||
|
Rui Matos, Florian Müllner, Jasper St. Pierre, Damien Radtke, Owen Taylor,
|
||||||
|
Rico Tzschichholz
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Nilamdyuti Goswami [as], Ihar Hrachyshka [be], Alexander Shopov [bg],
|
||||||
|
David Planella [ca], Carles Ferrando [ca@valencia], Kenneth Nielsen [dk],
|
||||||
|
Bruce Cowan [en_GB], Daniel Mustieles [es], Mattias Põldaru [et],
|
||||||
|
Inaki Larranaga Murgoitio [eu], Timo Jyrinki [fi], Fran Diéguez [gl],
|
||||||
|
Gabor Kelemen [hu], Changwoo Ryu [ko], Anita Reitere [lv],
|
||||||
|
Kjartan Maraas [nb], Wouter Bolsterlee [nl], A S Alam [pa], Piotr Drąg [pl],
|
||||||
|
Duarte Loreto [pt], Yuri Myasoedov [ru], Daniel Nylander [se],
|
||||||
|
Matej Urbančič [sl], Miroslav Nikolić [sr], Tirumurti Vasudevan [ta],
|
||||||
|
Sasi Bhushan [te], Daniel Korostil [uk], Nguyễn Thái Ngọc Duy [vi],
|
||||||
|
YunQiang Su [zh_CN], Chao-Hsiung Liao [zh_HK, zh_TW]
|
||||||
|
|
||||||
|
3.3.90
|
||||||
|
======
|
||||||
|
* Update for Cogl API changes [Robert]
|
||||||
|
* Bug fixes [Adel, Jasper; #659643]
|
||||||
|
* Build fixes [Jasper, Owen]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Robert Bragg, Adel Gadllah, Jasper St. Pierre, Owen Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Ask H. Larsen [dk], Miroslav Nikolić [sr]
|
||||||
|
|
||||||
|
3.3.5
|
||||||
|
=====
|
||||||
|
* MetaShapedTexture no longer is a ClutterTexture subclass [Jasper; #660941]
|
||||||
|
* Add meta_shaped_texture_get_image() [Jasper; #660941]
|
||||||
|
* Cleanups [Rui, Jasper; #657639]
|
||||||
|
* Depend on GTK+ 3.3.7 [Rico]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Rui Matos, Jasper St. Pierre, Rico Tzschichholz
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Kjartan Maraas [nb], Chao-Hsiung Liao [zh_HK, zh_TW]
|
||||||
|
|
||||||
|
3.3.4
|
||||||
|
=====
|
||||||
|
* Adapt to changes in GtkStateFlags [Owen]
|
||||||
|
* Redo properties for applications menu corresponding to GTK+ changes -
|
||||||
|
they are now _GTK_* not DBUS_*. [Ryan]
|
||||||
|
* Fix crash on gnome-shell restart when a modal dialog is open [Owen; #668299]
|
||||||
|
* Code cleanup [Florian; #666039]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Ryan Lortie, Florian Müllner, Owen Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Alexander Shopov [bg], Fran Diéguez [gl]
|
||||||
|
|
||||||
|
3.3.3
|
||||||
|
=====
|
||||||
|
* Add keybindings for tiling to left or right [Florian; #648700]
|
||||||
|
* Support GTK+'s hide-titlebar-when-maximized hint [Florian; #665617]
|
||||||
|
* Load _DBUS_APPLICATION_ID, _DBUS_UNIQUE_NAME, _DBUS_OBJECT_PATH
|
||||||
|
property [Colin, Ryan; #664851]
|
||||||
|
* Handle changes to workspaces-only-on-primary GSetting [Florian; #664853]
|
||||||
|
* Don't use the Clutter default stage [Jasper; #664028]
|
||||||
|
* Fix compilation with --disable-introspection [Lionel; #661871]
|
||||||
|
* Fix problem where stage could end up mis-sized on startup with
|
||||||
|
multiple monitors [Lionel]
|
||||||
|
* Misc bug fixes [Adel, Lionel, Jasper; #666015]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Adel Gadllah, Lionel Landwerlin, Florian Müllner, Jasper St. Pierre
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Daniel Mustieles [es], Yaron Shahrabani [he], Kjartan Maraas [nb],
|
||||||
|
Matej Urbančič [sk], Muhammet Kara [tr]
|
||||||
|
|
||||||
|
3.3.2
|
||||||
|
=====
|
||||||
|
|
||||||
|
* Move from GConf to GSettings for preferences [Florian; #635378]
|
||||||
|
* Add meta_display_add_keybinding()/meta_display_remove_keybinding()
|
||||||
|
to allow creating new keybindings at runtime [Florian; #663428]
|
||||||
|
* Add suport for new _NET_WM_STATE_FOCUSED atom in _NET_WM_STATE
|
||||||
|
to allow applications to draw unfocused windows differently
|
||||||
|
[Rui; #661427]
|
||||||
|
* Add meta_window_move_resize_frame() to allow specifying the
|
||||||
|
size and position of a window via the outside dimensions of the
|
||||||
|
window frame.
|
||||||
|
* Don't activate window tiling when moving in snap mode
|
||||||
|
[Rui; #662270]
|
||||||
|
* Remove the ability to resize a window from the inner edge of
|
||||||
|
the titlebar [Jasper; #660129]
|
||||||
|
* Fix for deprecations in GTK+ [Jasper, Rico; #662574, #662895]
|
||||||
|
* Misc bug fixes [Jasper, Rico, Rui; #662895, #642652, #660941, #662225]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Tim Cuthbertson, Rui Matos, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Jorge González (es), Kjartan Maraas (nb), Krishnababu Krothapalli (te), Nguyễn Thái Ngọc Duy (vi)
|
||||||
|
|
||||||
|
3.2.1
|
||||||
|
=====
|
||||||
|
* Allow keyboard window switching (alt-Tab) during drag-and-drop
|
||||||
|
[Matthias, #660457]
|
||||||
|
* Don't add invisible resize borders to fullscreen windows
|
||||||
|
[Jasper, Owen; #659854]
|
||||||
|
* Fix crash when toplevel windows were set to unexpected window types
|
||||||
|
[Owen; #599988]
|
||||||
|
* Correct problems with windows moving when restarting or switching
|
||||||
|
window managers [Jasper; #660848]
|
||||||
|
* Fix interaction of tiled windows with multiple monitors
|
||||||
|
[Rui; #642580, #657519]
|
||||||
|
* Make meta_display_unmanage_screen() public [Jasper; #660848]
|
||||||
|
* Fix problem with turning off window decorations on the fly [Rui; #660773]
|
||||||
|
* Fix spurious assertion failures with themes such as Nodoka [Sandro; #661286]
|
||||||
|
* Misc bug fixes [Adel, Jasper, Rui; #660464, #660854, #662053]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Matthias Clasen, Sandro Mani, Rui Matos, Jasper St. Pierre, Owen Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Tommi Vainikainen [fi], Miroslav Nikolić [sr, sr@latin], Muhammet Kara [tr]
|
||||||
|
|
||||||
|
3.2.0
|
||||||
|
=====
|
||||||
|
* Fix _NET_WM_FRAME_EXTENTS not to include invisible borders [Jasper; #659848]
|
||||||
|
* Fix application-specified window placement (-geometry) for
|
||||||
|
invisible borders [Jasper; #659848]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Jasper St. Pierre
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Nilamdyuti Goswami [as], Carles Ferrando [ca@valencia], Petr Kovar [cz],
|
||||||
|
Mario Blättermann [de], Inaki Larranaga [eu], Gabor Kelemen [hu],
|
||||||
|
Takayoshi Okano [ja], Changwoo Ryu [ko], Djavan Fagundes [pt_BR]
|
||||||
|
|
||||||
|
3.1.92
|
||||||
|
======
|
||||||
|
* Fix bug with unredirecting full-screen windows on multi-monitor -
|
||||||
|
notably affected gnome-screensaver [Adel; #657869]
|
||||||
|
* Disable top resizing of attached dialogs [Jasper; #657795]
|
||||||
|
* Code cleanup [Jasper, Rui]
|
||||||
|
* Misc bug fixes [Adel, Florian, Jasper, Rui;
|
||||||
|
#658069, #659266, #659523, #659477]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Adel Gadllah, Rui Matos, Florian Müllner, Jasper St. Pierre
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Joan Duran [ca], Joe Hansen [dk], Jiro Matsuzawa [ja], Daniel Korostil [uk]
|
||||||
|
|
||||||
|
3.1.91.1
|
||||||
|
========
|
||||||
|
* Fix problem where certain application updates would get lost [#657071, Owen]
|
||||||
|
* Fix a problem where after resuming from the screensaver, things got
|
||||||
|
slow [#658228, Jasper, Adel]
|
||||||
|
* When a monitor is plugged or unplugged, keep existing windows on their
|
||||||
|
current monitor [#645408, Alex]
|
||||||
|
* Remove 'Mutter' title from alerts such as
|
||||||
|
"The widow '%s' is not responding" [Matthias]
|
||||||
|
* Remove pointless warning:
|
||||||
|
Received a _NET_WM_MOVERESIZE message for %s; these
|
||||||
|
messages lack timestamps and therefore suck.
|
||||||
|
[Rui]
|
||||||
|
* Misc bug fixes [Jasper]
|
||||||
|
* Build fixes [Javier]
|
||||||
|
|
||||||
|
Contributors:
|
||||||
|
Matthias Clasen, Adel Gadllah, Javier Jardón, Alex Larsson, Rui Matos,
|
||||||
|
Jasper St. Pierre, Owen Taylor
|
||||||
|
|
||||||
|
Translations:
|
||||||
|
Ihar Hrachyshka [be], Bruce Cowan [en_FB], Daniel Mustieles [es],
|
||||||
|
Claude Paroz [fr], Andika Triwidada [id], Luca Ferretti [it],
|
||||||
|
Rudolfs Mazurs [lt], Piotr Drąg [pl], Duarte Loreto [pt],
|
||||||
|
Matej Urbančič [sl], Tirumurti Vasudevan [ta], Chao-Hsiung Liao [zh_KH, TW]
|
||||||
|
|
||||||
3.1.90.1
|
3.1.90.1
|
||||||
========
|
========
|
||||||
* Fix crash when no windows are open [Adel; #657692]
|
* Fix crash when no windows are open [Adel; #657692]
|
||||||
|
29
README
29
README
@@ -18,8 +18,7 @@ COMPILING MUTTER
|
|||||||
You need GTK+ 2.2. For startup notification to work you need
|
You need GTK+ 2.2. For startup notification to work you need
|
||||||
libstartup-notification at
|
libstartup-notification at
|
||||||
http://www.freedesktop.org/software/startup-notification/ or on the
|
http://www.freedesktop.org/software/startup-notification/ or on the
|
||||||
GNOME ftp site. You also need GConf 1.2 (unless building a funky
|
GNOME ftp site.
|
||||||
extra-small embedded metacity with --disable-gconf, see below).
|
|
||||||
You need Clutter 1.0. You need gobject-introspection 0.6.3.
|
You need Clutter 1.0. You need gobject-introspection 0.6.3.
|
||||||
|
|
||||||
REPORTING BUGS AND SUBMITTING PATCHES
|
REPORTING BUGS AND SUBMITTING PATCHES
|
||||||
@@ -59,25 +58,24 @@ MUTTER FEATURES
|
|||||||
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
|
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
|
||||||
|
|
||||||
- Has a simple theme system and a couple of extra themes come with it.
|
- Has a simple theme system and a couple of extra themes come with it.
|
||||||
Change themes via gconf-editor or gconftool or GNOME themes control
|
Change themes via gsettings:
|
||||||
panel:
|
gsettings set org.gnome.desktop.wm.preferences theme Crux
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/theme Crux
|
gsettings set org.gnome.desktop.wm.preferences theme Gorilla
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/theme Gorilla
|
gsettings set org.gnome.desktop.wm.preferences theme Atlanta
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/theme Atlanta
|
gsettings set org.gnome.desktop.wm.preferences theme Bright
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/theme Bright
|
|
||||||
|
|
||||||
See theme-format.txt for docs on the theme format. Use
|
See theme-format.txt for docs on the theme format. Use
|
||||||
metacity-theme-viewer to preview themes.
|
metacity-theme-viewer to preview themes.
|
||||||
|
|
||||||
- Change number of workspaces via gconf-editor or gconftool:
|
- Change number of workspaces via gsettings:
|
||||||
gconftool-2 --type=int --set /apps/metacity/general/num_workspaces 5
|
gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
|
||||||
|
|
||||||
Can also change workspaces from GNOME 2 pager.
|
Can also change workspaces from GNOME 2 pager.
|
||||||
|
|
||||||
- Change focus mode:
|
- Change focus mode:
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode mouse
|
gsettings set org.gnome.desktop.wm.preferences focus-mode mouse
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
|
gsettings set org.gnome.desktop.wm.preferences focus-mode sloppy
|
||||||
gconftool-2 --type=string --set /apps/metacity/general/focus_mode click
|
gsettings set org.gnome.desktop.wm.preferences focus-mode click
|
||||||
|
|
||||||
- Global keybinding defaults include:
|
- Global keybinding defaults include:
|
||||||
|
|
||||||
@@ -92,10 +90,9 @@ MUTTER FEATURES
|
|||||||
|
|
||||||
Change keybindings for example:
|
Change keybindings for example:
|
||||||
|
|
||||||
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
|
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 '[<Alt>F1]'
|
||||||
|
|
||||||
Also try the GNOME keyboard shortcuts control panel, or
|
Also try the GNOME keyboard shortcuts control panel.
|
||||||
gconf-editor.
|
|
||||||
|
|
||||||
- Window keybindings:
|
- Window keybindings:
|
||||||
|
|
||||||
|
158
configure.in
158
configure.in
@@ -1,8 +1,8 @@
|
|||||||
AC_PREREQ(2.50)
|
AC_PREREQ(2.50)
|
||||||
|
|
||||||
m4_define([mutter_major_version], [3])
|
m4_define([mutter_major_version], [3])
|
||||||
m4_define([mutter_minor_version], [1])
|
m4_define([mutter_minor_version], [4])
|
||||||
m4_define([mutter_micro_version], [90.1])
|
m4_define([mutter_micro_version], [1])
|
||||||
|
|
||||||
m4_define([mutter_version],
|
m4_define([mutter_version],
|
||||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||||
@@ -15,9 +15,9 @@ AC_INIT([mutter], [mutter_version],
|
|||||||
AC_CONFIG_SRCDIR(src/core/display.c)
|
AC_CONFIG_SRCDIR(src/core/display.c)
|
||||||
AC_CONFIG_HEADERS(config.h)
|
AC_CONFIG_HEADERS(config.h)
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
|
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
|
||||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
|
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE([enable])
|
||||||
|
|
||||||
MUTTER_MAJOR_VERSION=mutter_major_version
|
MUTTER_MAJOR_VERSION=mutter_major_version
|
||||||
MUTTER_MINOR_VERSION=mutter_minor_version
|
MUTTER_MINOR_VERSION=mutter_minor_version
|
||||||
@@ -61,21 +61,23 @@ AC_CHECK_SIZEOF(__int64)
|
|||||||
## byte order
|
## byte order
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
GTK_MIN_VERSION=2.91.7
|
|
||||||
CANBERRA_GTK=libcanberra-gtk3
|
CANBERRA_GTK=libcanberra-gtk3
|
||||||
CANBERRA_GTK_VERSION=0.26
|
CANBERRA_GTK_VERSION=0.26
|
||||||
|
|
||||||
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0"
|
CLUTTER_PACKAGE=clutter-1.0
|
||||||
|
|
||||||
AC_ARG_ENABLE(gconf,
|
MUTTER_PC_MODULES="
|
||||||
AC_HELP_STRING([--disable-gconf],
|
gtk+-3.0 >= 3.3.7
|
||||||
[disable gconf usage, for embedded/size-sensitive non-GNOME builds]),,
|
gio-2.0 >= 2.25.10
|
||||||
enable_gconf=yes)
|
pango >= 1.2.0
|
||||||
|
cairo >= 1.10.0
|
||||||
|
gsettings-desktop-schemas >= 3.3.0
|
||||||
|
xcomposite >= 0.2 xfixes xrender xdamage
|
||||||
|
$CLUTTER_PACKAGE >= 1.9.10
|
||||||
|
cogl-1.0 >= 1.9.6
|
||||||
|
"
|
||||||
|
|
||||||
if test x$enable_gconf = xyes; then
|
GLIB_GSETTINGS
|
||||||
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
|
|
||||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gconf-2.0 >= 1.2.0"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_ARG_ENABLE(verbose-mode,
|
AC_ARG_ENABLE(verbose-mode,
|
||||||
AC_HELP_STRING([--disable-verbose-mode],
|
AC_HELP_STRING([--disable-verbose-mode],
|
||||||
@@ -120,8 +122,8 @@ AM_GLIB_GNU_GETTEXT
|
|||||||
# GRegex requires Glib-2.14.0
|
# GRegex requires Glib-2.14.0
|
||||||
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
||||||
# gtk_window_set_icon_name requires gtk2+-2.6.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_MESSAGE, gtk+-3.0)
|
||||||
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0 >= $GTK_MIN_VERSION)
|
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0)
|
||||||
|
|
||||||
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
||||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
||||||
@@ -171,31 +173,6 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
XCOMPOSITE_VERSION=0.2
|
|
||||||
|
|
||||||
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
|
|
||||||
AC_MSG_ERROR([no. Mutter requires the Xcomposite extension to build.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
CLUTTER_VERSION=1.7.5
|
|
||||||
CLUTTER_PACKAGE=clutter-1.0
|
|
||||||
AC_SUBST(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])
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([no. Mutter requires Clutter version $CLUTTER_VERSION.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
INTROSPECTION_VERSION=0.9.5
|
INTROSPECTION_VERSION=0.9.5
|
||||||
GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
|
GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
|
||||||
|
|
||||||
@@ -227,64 +204,39 @@ fi
|
|||||||
|
|
||||||
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
|
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
|
||||||
|
|
||||||
|
# This is used for plugins
|
||||||
|
AC_SUBST(CLUTTER_PACKAGE)
|
||||||
|
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_PACKAGE)
|
||||||
|
|
||||||
AC_PATH_XTRA
|
AC_PATH_XTRA
|
||||||
|
|
||||||
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||||
|
|
||||||
# Check for Xinerama extension (Solaris impl or Xfree impl)
|
# Check for Xinerama extension - we only support the "XFree86" style,
|
||||||
|
# and not the older Solaris-only version; recent Solaris supports the
|
||||||
|
# XFree86 style.
|
||||||
mutter_save_cppflags="$CPPFLAGS"
|
mutter_save_cppflags="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
|
||||||
|
|
||||||
AC_ARG_ENABLE(xinerama,
|
have_xinerama=yes
|
||||||
AC_HELP_STRING([--disable-xinerama],
|
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
||||||
[disable mutter's use of the Xinerama extension]),
|
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
||||||
try_xinerama=$enable_xinerama,try_xinerama=yes)
|
[X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS"
|
||||||
|
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
|
||||||
use_solaris_xinerama=no
|
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
|
||||||
use_xfree_xinerama=no
|
fi],
|
||||||
if test "${try_xinerama}" != no; then
|
have_xinerama=no,
|
||||||
case "$host" in
|
[#include <X11/Xlib.h>])],
|
||||||
*-*-solaris*)
|
have_xinerama=no, -lXext $ALL_X_LIBS)
|
||||||
# Check for solaris
|
AC_MSG_CHECKING(for Xinerama support)
|
||||||
use_solaris_xinerama=yes
|
AC_MSG_RESULT($have_xinerama)
|
||||||
AC_CHECK_LIB(Xext, XineramaGetInfo,
|
|
||||||
use_solaris_xinerama=yes, use_solaris_xinerama=no,
|
|
||||||
$ALL_X_LIBS)
|
|
||||||
if test "x$use_solaris_xinerama" = "xyes"; then
|
|
||||||
AC_CHECK_HEADER(X11/extensions/xinerama.h,
|
|
||||||
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
|
|
||||||
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
|
|
||||||
fi
|
|
||||||
AC_DEFINE(HAVE_SOLARIS_XINERAMA, , [Have Solaris-style Xinerama])
|
|
||||||
AC_DEFINE(HAVE_XINERAMA, , [Have some version of Xinerama]),
|
|
||||||
use_solaris_xinerama=no,
|
|
||||||
[#include <X11/Xlib.h>])
|
|
||||||
fi
|
|
||||||
AC_MSG_CHECKING(for Xinerama support on Solaris)
|
|
||||||
AC_MSG_RESULT($use_solaris_xinerama);
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# Check for XFree
|
|
||||||
use_xfree_xinerama=yes
|
|
||||||
AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
|
|
||||||
[AC_CHECK_HEADER(X11/extensions/Xinerama.h,
|
|
||||||
X_EXTRA_LIBS="-lXinerama $X_EXTRA_LIBS"
|
|
||||||
if test -z "`echo $ALL_X_LIBS | grep "\-lXext" 2> /dev/null`"; then
|
|
||||||
X_EXTRA_LIBS="-lXext $X_EXTRA_LIBS"
|
|
||||||
fi
|
|
||||||
AC_DEFINE(HAVE_XFREE_XINERAMA, , [Have XFree86-style Xinerama])
|
|
||||||
AC_DEFINE(HAVE_XINERAMA,, [Have some version of Xinerama]),
|
|
||||||
use_xfree_xinerama=no,
|
|
||||||
[#include <X11/Xlib.h>])],
|
|
||||||
use_xfree_xinerama=no, -lXext $ALL_X_LIBS)
|
|
||||||
AC_MSG_CHECKING(for Xinerama support on XFree86)
|
|
||||||
AC_MSG_RESULT($use_xfree_xinerama);
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
CPPFLAGS="$mutter_save_cppflags"
|
CPPFLAGS="$mutter_save_cppflags"
|
||||||
|
|
||||||
|
if test x$have_xinerama = xno; then
|
||||||
|
AC_MSG_ERROR([Xinerama extension was not found])
|
||||||
|
fi
|
||||||
|
|
||||||
SHAPE_LIBS=
|
SHAPE_LIBS=
|
||||||
found_shape=no
|
found_shape=no
|
||||||
AC_CHECK_LIB(Xext, XShapeQueryExtension,
|
AC_CHECK_LIB(Xext, XShapeQueryExtension,
|
||||||
@@ -400,18 +352,6 @@ fi
|
|||||||
|
|
||||||
AC_SUBST(GDK_PIXBUF_CSOURCE)
|
AC_SUBST(GDK_PIXBUF_CSOURCE)
|
||||||
|
|
||||||
if test x$enable_gconf = xyes; then
|
|
||||||
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
|
|
||||||
if test x"$GCONFTOOL" = xno; then
|
|
||||||
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AM_GCONF_SOURCE_2
|
|
||||||
else
|
|
||||||
GCONF_SCHEMAS_INSTALL_TRUE='#'
|
|
||||||
GCONF_SCHEMAS_INSTALL_FALSE=
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_PATH_PROG(ZENITY, zenity, no)
|
AC_PATH_PROG(ZENITY, zenity, no)
|
||||||
if test x"$ZENITY" = xno; then
|
if test x"$ZENITY" = xno; then
|
||||||
AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
|
AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
|
||||||
@@ -489,7 +429,7 @@ if test "$enable_compile_warnings" != no ; then
|
|||||||
if test "$enable_compile_warnings" = error; then
|
if test "$enable_compile_warnings" = error; then
|
||||||
case " $CFLAGS " in
|
case " $CFLAGS " in
|
||||||
*[\ \ ]-Werror[\ \ ]*) ;;
|
*[\ \ ]-Werror[\ \ ]*) ;;
|
||||||
*) CFLAGS="$CFLAGS -Werror" ;;
|
*) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -511,13 +451,6 @@ po/Makefile.in
|
|||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
||||||
if test x$enable_gconf = xno; then
|
|
||||||
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
|
||||||
echo "*** Building without GConf. This means there's no"
|
|
||||||
echo "*** way to change prefs except hacking source code."
|
|
||||||
echo "*** This is intended for embedded systems etc., not for normal use."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$enable_verbose_mode = xno; then
|
if test x$enable_verbose_mode = xno; then
|
||||||
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
||||||
echo "*** Building without verbose mode"
|
echo "*** Building without verbose mode"
|
||||||
@@ -534,9 +467,6 @@ mutter-$VERSION
|
|||||||
source code location: ${srcdir}
|
source code location: ${srcdir}
|
||||||
compiler: ${CC}
|
compiler: ${CC}
|
||||||
|
|
||||||
GConf: ${enable_gconf}
|
|
||||||
XFree86 Xinerama: ${use_xfree_xinerama}
|
|
||||||
Solaris Xinerama: ${use_solaris_xinerama}
|
|
||||||
Startup notification: ${have_startup_notification}
|
Startup notification: ${have_startup_notification}
|
||||||
libcanberra: ${have_libcanberra}
|
libcanberra: ${have_libcanberra}
|
||||||
Introspection: ${found_introspection}
|
Introspection: ${found_introspection}
|
||||||
@@ -551,8 +481,8 @@ MUTTER_MINOR_VERSION=mutter_minor_version
|
|||||||
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
|
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
|
||||||
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
|
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
|
||||||
echo "This is the UNSTABLE branch of mutter"
|
echo "This is the UNSTABLE branch of mutter"
|
||||||
echo -n "Use 2.$stable_version.x for stable "
|
echo -n "Use 3.$stable_version.x for stable "
|
||||||
echo "(gnome-2-$stable_version branch in git)"
|
echo "(gnome-3-$stable_version branch in git)"
|
||||||
else
|
else
|
||||||
echo "This is the stable branch of mutter"
|
echo "This is the stable branch of mutter"
|
||||||
fi
|
fi
|
||||||
|
@@ -31,8 +31,7 @@ workspaces. In these cases, there needs to be a rule consistent with
|
|||||||
the above about the new window to choose.
|
the above about the new window to choose.
|
||||||
|
|
||||||
Focus method Behavior
|
Focus method Behavior
|
||||||
click Focus the most recently used window (same as the window
|
click Focus the window on top
|
||||||
on top)
|
|
||||||
sloppy Focus the window containing the pointer if there is such
|
sloppy Focus the window containing the pointer if there is such
|
||||||
a window, otherwise focus the most recently used window.
|
a window, otherwise focus the most recently used window.
|
||||||
mouse Focus the non-DESKTOP window containing the pointer if
|
mouse Focus the non-DESKTOP window containing the pointer if
|
||||||
|
@@ -46,13 +46,13 @@ because the original program does not have a manual page.
|
|||||||
Restart \fBmutter\fP(1) which is running.
|
Restart \fBmutter\fP(1) which is running.
|
||||||
.TP
|
.TP
|
||||||
.B reload-theme
|
.B reload-theme
|
||||||
Reload a theme which is specified on gconf database.
|
Reload a theme which is specified on gsettings database.
|
||||||
.TP
|
.TP
|
||||||
.B enable-keybindings
|
.B enable-keybindings
|
||||||
Enable all of keybindings which is specified on gconf database.
|
Enable all of keybindings which is specified on gsettings database.
|
||||||
.TP
|
.TP
|
||||||
.B disable-keybindings
|
.B disable-keybindings
|
||||||
Disable all of keybindings which is specified on gconf database.
|
Disable all of keybindings which is specified on gsettings database.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR mutter (1)
|
.BR mutter (1)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
|
@@ -51,7 +51,7 @@ Print the version number.
|
|||||||
.B \-?, \-\-help
|
.B \-?, \-\-help
|
||||||
Show summary of options.
|
Show summary of options.
|
||||||
.SH CONFIGURATION
|
.SH CONFIGURATION
|
||||||
\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).
|
\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 gsettings.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR mutter-message (1)
|
.BR mutter-message (1)
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
|
@@ -259,8 +259,6 @@ Overview of Theme Format Version 1
|
|||||||
<!-- color obtained by a 0.5 alpha composite of the second color onto the first -->
|
<!-- color obtained by a 0.5 alpha composite of the second color onto the first -->
|
||||||
<color value="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.5"/>
|
<color value="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.5"/>
|
||||||
</gradient>
|
</gradient>
|
||||||
<!-- image has an optional colorize="#color" attribute to give the
|
|
||||||
image a certain color -->
|
|
||||||
<image filename="foo.png" alpha="0.7"
|
<image filename="foo.png" alpha="0.7"
|
||||||
x="10" y="30" width="width / 3" height="height / 4"/>
|
x="10" y="30" width="width / 3" height="height / 4"/>
|
||||||
<gtk_arrow state="normal" shadow="in" arrow="up"
|
<gtk_arrow state="normal" shadow="in" arrow="up"
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
# List of source files containing translatable strings.
|
# List of source files containing translatable strings.
|
||||||
# Please keep this file sorted alphabetically.
|
# Please keep this file sorted alphabetically.
|
||||||
|
src/50-mutter-windows.xml.in
|
||||||
src/compositor/compositor.c
|
src/compositor/compositor.c
|
||||||
src/core/all-keybindings.h
|
|
||||||
src/core/bell.c
|
src/core/bell.c
|
||||||
src/core/core.c
|
src/core/core.c
|
||||||
src/core/delete.c
|
src/core/delete.c
|
||||||
@@ -19,7 +19,7 @@ src/core/window-props.c
|
|||||||
src/core/xprops.c
|
src/core/xprops.c
|
||||||
src/mutter.desktop.in
|
src/mutter.desktop.in
|
||||||
src/mutter-wm.desktop.in
|
src/mutter-wm.desktop.in
|
||||||
src/mutter.schemas.in
|
src/org.gnome.mutter.gschema.xml.in
|
||||||
src/tools/mutter-message.c
|
src/tools/mutter-message.c
|
||||||
src/ui/frames.c
|
src/ui/frames.c
|
||||||
src/ui/menu.c
|
src/ui/menu.c
|
||||||
|
1213
po/ca@valencia.po
1213
po/ca@valencia.po
File diff suppressed because it is too large
Load Diff
1139
po/en_GB.po
1139
po/en_GB.po
File diff suppressed because it is too large
Load Diff
480
po/et.po
480
po/et.po
@@ -7,253 +7,39 @@
|
|||||||
#
|
#
|
||||||
# Tõivo Leedjärv <toivo linux ee>, 2004.
|
# Tõivo Leedjärv <toivo linux ee>, 2004.
|
||||||
# Ivar Smolin <okul linux ee>, 2005, 2006, 2009–2011.
|
# Ivar Smolin <okul linux ee>, 2005, 2006, 2009–2011.
|
||||||
# Mattias Põldaru <mahfiaz gmail com>, 2008–2011.
|
# Mattias Põldaru <mahfiaz@gmail.com>, 2008–2011, 2012.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mutter MASTER\n"
|
"Project-Id-Version: mutter MASTER\n"
|
||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||||
"product=mutter&component=general\n"
|
"product=mutter&keywords=I18N+L10N&component=general\n"
|
||||||
"POT-Creation-Date: 2011-03-07 23:35+0000\n"
|
"POT-Creation-Date: 2012-03-11 22:19+0000\n"
|
||||||
"PO-Revision-Date: 2011-03-09 06:41+0200\n"
|
"PO-Revision-Date: 2012-03-12 00:47+0200\n"
|
||||||
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
|
"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
|
||||||
"Language-Team: Estonian <gnome-et@linux.ee>\n"
|
"Language-Team: Estonian <>\n"
|
||||||
|
"Language: et\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Language: et\n"
|
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
|
||||||
|
|
||||||
msgid "Switch to workspace 1"
|
msgid "Windows"
|
||||||
msgstr "Lülitumine 1. tööalale"
|
msgstr "Aknad"
|
||||||
|
|
||||||
msgid "Switch to workspace 2"
|
msgid "View split on left"
|
||||||
msgstr "Lülitumine 2. tööalale"
|
msgstr "Vaade poolitatakse vasakult"
|
||||||
|
|
||||||
msgid "Switch to workspace 3"
|
msgid "View split on right"
|
||||||
msgstr "Lülitumine 3. tööalale"
|
msgstr "Vaade poolitatakse paremalt"
|
||||||
|
|
||||||
msgid "Switch to workspace 4"
|
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||||
msgstr "Lülitumine 4. tööalale"
|
#. * we have no way to get it to exit
|
||||||
|
#, c-format
|
||||||
msgid "Switch to workspace 5"
|
msgid ""
|
||||||
msgstr "Lülitumine 5. tööalale"
|
"Another compositing manager is already running on screen %i on display \"%s"
|
||||||
|
"\"."
|
||||||
msgid "Switch to workspace 6"
|
msgstr "Teine komposiithaldur juba töötab ekraani %i kuval \"%s\"."
|
||||||
msgstr "Lülitumine 6. tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace 7"
|
|
||||||
msgstr "Lülitumine 7. tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace 8"
|
|
||||||
msgstr "Lülitumine 8. tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace 9"
|
|
||||||
msgstr "Lülitumine 9. tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace 10"
|
|
||||||
msgstr "Lülitumine 10. tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace 11"
|
|
||||||
msgstr "Lülitumine 11. tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace 12"
|
|
||||||
msgstr "Lülitumine 12. tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace on the left of the current workspace"
|
|
||||||
msgstr "Lülitumine sellest tööalast vasakul olevale tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace on the right of the current workspace"
|
|
||||||
msgstr "Lülitumine sellest tööalast paremal olevale tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace above the current workspace"
|
|
||||||
msgstr "Lülitumine selle tööala kohal olevale tööalale"
|
|
||||||
|
|
||||||
msgid "Switch to workspace below the current workspace"
|
|
||||||
msgstr "Lülitumine selle tööala all olevale tööalale"
|
|
||||||
|
|
||||||
msgid "Move between windows of an application, using a popup window"
|
|
||||||
msgstr "Liigu rakenduse akende vahel, hüpikaknaga"
|
|
||||||
|
|
||||||
msgid "Move backward between windows of an application, using a popup window"
|
|
||||||
msgstr "Liigu rakenduse akende vahel tagasisuunas, hüpikaknaga"
|
|
||||||
|
|
||||||
msgid "Move between windows, using a popup window"
|
|
||||||
msgstr "Liigu akende vahel, hüpikaknaga"
|
|
||||||
|
|
||||||
msgid "Move backward between windows, using a popup window"
|
|
||||||
msgstr "Liigu akende vahel tagasisuunas, hüpikaknaga"
|
|
||||||
|
|
||||||
msgid "Move between panels and the desktop, using a popup window"
|
|
||||||
msgstr "Liigu paneelide ja töölaua vahel, hüpikaknaga"
|
|
||||||
|
|
||||||
msgid "Move backward between panels and the desktop, using a popup window"
|
|
||||||
msgstr "Liigu tagasisuunas paneelide ja töölaua vahel, hüpikaknaga"
|
|
||||||
|
|
||||||
msgid "Move between windows of an application immediately"
|
|
||||||
msgstr "Liigu koheselt rakenduse akende vahel"
|
|
||||||
|
|
||||||
msgid "Move backward between windows of an application immediately"
|
|
||||||
msgstr "Liigu koheselt rakenduse akende vahel tagasisuunas"
|
|
||||||
|
|
||||||
msgid "Move between windows immediately"
|
|
||||||
msgstr "Liigu koheselt akende vahel"
|
|
||||||
|
|
||||||
msgid "Move backward between windows immediately"
|
|
||||||
msgstr "Liigu koheselt akende vahel tagasisuunas"
|
|
||||||
|
|
||||||
msgid "Move between panels and the desktop immediately"
|
|
||||||
msgstr "Liigu koheselt paneeli ja töölaua vahel"
|
|
||||||
|
|
||||||
msgid "Move backward between panels and the desktop immediately"
|
|
||||||
msgstr "Liigu koheselt tagasisuunas paneelide ja töölaua vahel"
|
|
||||||
|
|
||||||
msgid "Hide all normal windows and set focus to the desktop"
|
|
||||||
msgstr "Peida kõik tavalised aknad ja fokuseeri töölaud"
|
|
||||||
|
|
||||||
msgid "Show the panel's main menu"
|
|
||||||
msgstr "Paneeli peamenüü näitamine"
|
|
||||||
|
|
||||||
msgid "Show the panel's \"Run Application\" dialog box"
|
|
||||||
msgstr "Paneeli dialoogi \"Käivita rakendus\" näitamine"
|
|
||||||
|
|
||||||
msgid "Start or stop recording the session"
|
|
||||||
msgstr "Seansi salvestamise käivitamine või seiskamine"
|
|
||||||
|
|
||||||
msgid "Take a screenshot"
|
|
||||||
msgstr "Kuvatõmmise võtmine"
|
|
||||||
|
|
||||||
msgid "Take a screenshot of a window"
|
|
||||||
msgstr "Kuvatõmmise võtmine aknast"
|
|
||||||
|
|
||||||
msgid "Run a terminal"
|
|
||||||
msgstr "Terminali käivitamine"
|
|
||||||
|
|
||||||
msgid "Activate the window menu"
|
|
||||||
msgstr "Aknamenüü aktiveerimine"
|
|
||||||
|
|
||||||
msgid "Toggle fullscreen mode"
|
|
||||||
msgstr "Täisekraanivaate sisse- ja väljalülitamine"
|
|
||||||
|
|
||||||
msgid "Toggle maximization state"
|
|
||||||
msgstr "Maksimeeritud oleku sisse- ja väljalülitamine"
|
|
||||||
|
|
||||||
msgid "Toggle whether a window will always be visible over other windows"
|
|
||||||
msgstr "Lüliti määrab, kas aken on alati teiste akende kohal nähtav"
|
|
||||||
|
|
||||||
msgid "Maximize window"
|
|
||||||
msgstr "Akna maksimeerimine"
|
|
||||||
|
|
||||||
msgid "Restore window"
|
|
||||||
msgstr "Taasta akna suurus"
|
|
||||||
|
|
||||||
msgid "Toggle shaded state"
|
|
||||||
msgstr "Varjatud oleku lüliti"
|
|
||||||
|
|
||||||
msgid "Minimize window"
|
|
||||||
msgstr "Akna minimeerimine"
|
|
||||||
|
|
||||||
msgid "Close window"
|
|
||||||
msgstr "Akna sulgemine"
|
|
||||||
|
|
||||||
msgid "Move window"
|
|
||||||
msgstr "Teisalda aken"
|
|
||||||
|
|
||||||
msgid "Resize window"
|
|
||||||
msgstr "Muuda akna suurust"
|
|
||||||
|
|
||||||
msgid "Toggle whether window is on all workspaces or just one"
|
|
||||||
msgstr "Lüliti määrab, kas aken on kõigil tööaladel või ainult ühel"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 1"
|
|
||||||
msgstr "Akna tõstmine 1. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 2"
|
|
||||||
msgstr "Akna tõstmine 2. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 3"
|
|
||||||
msgstr "Akna tõstmine 3. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 4"
|
|
||||||
msgstr "Akna tõstmine 4. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 5"
|
|
||||||
msgstr "Akna tõstmine 5. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 6"
|
|
||||||
msgstr "Akna tõstmine 6. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 7"
|
|
||||||
msgstr "Akna tõstmine 7. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 8"
|
|
||||||
msgstr "Akna tõstmine 8. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 9"
|
|
||||||
msgstr "Akna tõstmine 9. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 10"
|
|
||||||
msgstr "Akna tõstmine 10. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 11"
|
|
||||||
msgstr "Akna tõstmine 11. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window to workspace 12"
|
|
||||||
msgstr "Akna tõstmine 12. tööalale"
|
|
||||||
|
|
||||||
msgid "Move window one workspace to the left"
|
|
||||||
msgstr "Akna tõstmine ühe tööala võrra vasakule"
|
|
||||||
|
|
||||||
msgid "Move window one workspace to the right"
|
|
||||||
msgstr "Akna tõstmine ühe tööala võrra paremale"
|
|
||||||
|
|
||||||
msgid "Move window one workspace up"
|
|
||||||
msgstr "Akna tõstmine ühe tööala võrra ülespoole"
|
|
||||||
|
|
||||||
msgid "Move window one workspace down"
|
|
||||||
msgstr "Akna tõstmine ühe tööala võrra allapoole"
|
|
||||||
|
|
||||||
msgid "Raise window if it's covered by another window, otherwise lower it"
|
|
||||||
msgstr "Tõsta aken, kui seda katab teine aken, muul juhul vii tahapoole"
|
|
||||||
|
|
||||||
msgid "Raise window above other windows"
|
|
||||||
msgstr "Akna tõstmine teiste akende kohale"
|
|
||||||
|
|
||||||
msgid "Lower window below other windows"
|
|
||||||
msgstr "Saada aken teiste taha"
|
|
||||||
|
|
||||||
msgid "Maximize window vertically"
|
|
||||||
msgstr "Maksimeeri aken vertikaalselt"
|
|
||||||
|
|
||||||
msgid "Maximize window horizontally"
|
|
||||||
msgstr "Maksimeeri aken horisontaalselt"
|
|
||||||
|
|
||||||
msgid "Move window to north-west (top left) corner"
|
|
||||||
msgstr "Akna tõstmine ekraani loodepoolsesse (ülemisse vasakusse) nurka"
|
|
||||||
|
|
||||||
msgid "Move window to north-east (top right) corner"
|
|
||||||
msgstr "Akna tõstmine ekraani kirdepoolsesse (ülemisse paremasse) nurka"
|
|
||||||
|
|
||||||
msgid "Move window to south-west (bottom left) corner"
|
|
||||||
msgstr "Akna tõstmine ekraani edelapoolsesse (alumisse vasakusse) nurka"
|
|
||||||
|
|
||||||
msgid "Move window to south-east (bottom right) corner"
|
|
||||||
msgstr "Akna tõstmine ekraani kagupoolsesse (alumisse paremasse) nurka"
|
|
||||||
|
|
||||||
msgid "Move window to north (top) side of screen"
|
|
||||||
msgstr "Akna tõstmine ekraani põhjapoolsesse (ülemisse) serva"
|
|
||||||
|
|
||||||
msgid "Move window to south (bottom) side of screen"
|
|
||||||
msgstr "Akna tõstmine ekraani lõunapoolsesse (alumisse) serva"
|
|
||||||
|
|
||||||
msgid "Move window to east (right) side of screen"
|
|
||||||
msgstr "Akna tõstmine ekraani idapoolsesse (paremasse) serva"
|
|
||||||
|
|
||||||
msgid "Move window to west (left) side of screen"
|
|
||||||
msgstr "Akna tõstmine ekraani läänepoolsesse (vasakusse) serva"
|
|
||||||
|
|
||||||
msgid "Move window to center of screen"
|
|
||||||
msgstr "Akna tõstmine ekraani keskele"
|
|
||||||
|
|
||||||
msgid "Bell event"
|
msgid "Bell event"
|
||||||
msgstr "Helina sündmus"
|
msgstr "Helina sündmus"
|
||||||
@@ -262,11 +48,13 @@ msgstr "Helina sündmus"
|
|||||||
msgid "Unknown window information request: %d"
|
msgid "Unknown window information request: %d"
|
||||||
msgstr "Tundmatu aknateabe päring: %d"
|
msgstr "Tundmatu aknateabe päring: %d"
|
||||||
|
|
||||||
#. Translators: %s is a window title
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "<tt>%s</tt> is not responding."
|
msgid "<tt>%s</tt> is not responding."
|
||||||
msgstr "<tt>%s</tt> ei vasta."
|
msgstr "<tt>%s</tt> ei vasta."
|
||||||
|
|
||||||
|
msgid "Application is not responding."
|
||||||
|
msgstr "Rakendus ei vasta."
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"You may choose to wait a short while for it to continue or force the "
|
"You may choose to wait a short while for it to continue or force the "
|
||||||
"application to quit entirely."
|
"application to quit entirely."
|
||||||
@@ -294,27 +82,6 @@ msgstr ""
|
|||||||
"Mõni teine programm juba kasutab klahvi %s koos muuteklahvidega %x "
|
"Mõni teine programm juba kasutab klahvi %s koos muuteklahvidega %x "
|
||||||
"kiirklahvina\n"
|
"kiirklahvina\n"
|
||||||
|
|
||||||
#. Displayed when a keybinding which is
|
|
||||||
#. * supposed to launch a program fails.
|
|
||||||
#.
|
|
||||||
#, c-format
|
|
||||||
msgid ""
|
|
||||||
"There was an error running <tt>%s</tt>:\n"
|
|
||||||
"\n"
|
|
||||||
"%s"
|
|
||||||
msgstr ""
|
|
||||||
"<tt>%s</tt> käivitamisel esines viga:\n"
|
|
||||||
"\n"
|
|
||||||
"%s"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "No command %d has been defined.\n"
|
|
||||||
msgstr "Käsku %d pole defineeritud.\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "No terminal command has been defined.\n"
|
|
||||||
msgstr "Terminalikäsku pole defineeritud.\n"
|
|
||||||
|
|
||||||
msgid "Disable connection to session manager"
|
msgid "Disable connection to session manager"
|
||||||
msgstr "Seansihalduriga ühendumise keelamine"
|
msgstr "Seansihalduriga ühendumise keelamine"
|
||||||
|
|
||||||
@@ -364,39 +131,6 @@ msgstr "Versiooni printimine"
|
|||||||
msgid "Comma-separated list of compositor plugins"
|
msgid "Comma-separated list of compositor plugins"
|
||||||
msgstr "Komaga eraldatud nimekiri komposiitmontaaži pluginatest"
|
msgstr "Komaga eraldatud nimekiri komposiitmontaaži pluginatest"
|
||||||
|
|
||||||
#.
|
|
||||||
#. * We found it, but it was invalid. Complain.
|
|
||||||
#. *
|
|
||||||
#. * FIXME: This replicates the original behaviour, but in the future
|
|
||||||
#. * we might consider reverting invalid keys to their original values.
|
|
||||||
#. * (We know the old value, so we can look up a suitable string in
|
|
||||||
#. * the symtab.)
|
|
||||||
#. *
|
|
||||||
#. * (Empty comment follows so the translators don't see this.)
|
|
||||||
#.
|
|
||||||
#.
|
|
||||||
#, c-format
|
|
||||||
msgid "GConf key '%s' is set to an invalid value\n"
|
|
||||||
msgstr "GConf võtme '%s' väärtus on vigane\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "%d stored in GConf key %s is out of range %d to %d\n"
|
|
||||||
msgstr ""
|
|
||||||
"%d, mis on salvestatud GConf võtmes %s, on väljaspool piirkonda %d - %d\n"
|
|
||||||
|
|
||||||
#, 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"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "GConf key %s is already in use and can't be used to override %s\n"
|
|
||||||
msgstr ""
|
|
||||||
"GConfi võti %s on juba kasutusel ja sellega ei saa tühistada võtit %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "Can't override GConf key, %s not found\n"
|
|
||||||
msgstr "GConfi võtit pole võimalik tühistada, võtit %s ei leitud\n"
|
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"Workarounds for broken applications disabled. Some applications may not "
|
"Workarounds for broken applications disabled. Some applications may not "
|
||||||
"behave properly.\n"
|
"behave properly.\n"
|
||||||
@@ -405,8 +139,8 @@ msgstr ""
|
|||||||
"ei pruugi õigesti käituda.\n"
|
"ei pruugi õigesti käituda.\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse font description \"%s\" from GConf key %s\n"
|
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
|
||||||
msgstr "Fondi kirjeldust \"%s\" GConf võtmest %s ei saa töödelda\n"
|
msgstr "Fondi kirjeldust \"%s\" GSettings võtmest %s pole võimalik töödelda\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -416,14 +150,6 @@ msgstr ""
|
|||||||
"Seadistuste andmebaasist leitud \"%s\" ei ole sobiv väärtus hiireklahvi "
|
"Seadistuste andmebaasist leitud \"%s\" ei ole sobiv väärtus hiireklahvi "
|
||||||
"modifikaatoriks\n"
|
"modifikaatoriks\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "Error setting number of workspaces to %d: %s\n"
|
|
||||||
msgstr "Viga tööalade arvuks %d määramisel: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "Workspace %d"
|
|
||||||
msgstr "Tööala %d"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||||
@@ -433,16 +159,8 @@ msgstr ""
|
|||||||
"\"\n"
|
"\"\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
msgid "Workspace %d"
|
||||||
msgstr "Viga tööalale %d nime \"%s\" määramisel: %s\n"
|
msgstr "Tööala %d"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "Error setting live hidden windows status status: %s\n"
|
|
||||||
msgstr "Viga varjus elushoitavate akende oleku määramisel: %s\n"
|
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "Error setting no tab popup status: %s\n"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Screen %d on display '%s' is invalid\n"
|
msgid "Screen %d on display '%s' is invalid\n"
|
||||||
@@ -540,10 +258,6 @@ msgstr "Aknahalduri hoiatus: "
|
|||||||
msgid "Window manager error: "
|
msgid "Window manager error: "
|
||||||
msgstr "Aknahalduri viga: "
|
msgstr "Aknahalduri viga: "
|
||||||
|
|
||||||
#. Translators: This is the title used on dialog boxes
|
|
||||||
msgid "Mutter"
|
|
||||||
msgstr "Mutter"
|
|
||||||
|
|
||||||
#. first time through
|
#. first time through
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -581,6 +295,12 @@ msgstr "%s (masinas %s)"
|
|||||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
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"
|
msgstr "Vigane WM_TRANSIENT_FOR aknale 0x%lx määratud %s jaoks.\n"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||||
|
msgstr ""
|
||||||
|
"WM_TRANSIENT_FOR aknale 0x%lx määratud %s jaoks tekitaks tsüklilise "
|
||||||
|
"korduse.\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Window 0x%lx has property %s\n"
|
"Window 0x%lx has property %s\n"
|
||||||
@@ -604,18 +324,8 @@ msgid ""
|
|||||||
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
||||||
msgstr "Omadus %s aknal 0x%lx sisaldab vigast UTF-8 %d kirjele nimekirjas\n"
|
msgstr "Omadus %s aknal 0x%lx sisaldab vigast UTF-8 %d kirjele nimekirjas\n"
|
||||||
|
|
||||||
msgid "Attach modal dialogs"
|
msgid "Mutter"
|
||||||
msgstr "Modaaldialoogide kinnistamine"
|
msgstr "Mutter"
|
||||||
|
|
||||||
msgid ""
|
|
||||||
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
|
||||||
"other workspaces than the current one) should be kept alive."
|
|
||||||
msgstr ""
|
|
||||||
"Määrab, kas varjatud aknaid (nt minimeeritud ja teistel tööaladel aknad) "
|
|
||||||
"hoitakse elus."
|
|
||||||
|
|
||||||
msgid "Live Hidden Windows"
|
|
||||||
msgstr "Varjatud akende aktiivsus"
|
|
||||||
|
|
||||||
msgid "Modifier to use for extended window management operations"
|
msgid "Modifier to use for extended window management operations"
|
||||||
msgstr "Laiendatud aknaoperatsioonide korral kasutatav muuteklahv"
|
msgstr "Laiendatud aknaoperatsioonide korral kasutatav muuteklahv"
|
||||||
@@ -632,6 +342,9 @@ msgstr ""
|
|||||||
"klahv\". Eeldatavasti määratakse selle seose väärtuseks vaikimisi või tühi "
|
"klahv\". Eeldatavasti määratakse selle seose väärtuseks vaikimisi või tühi "
|
||||||
"sõne."
|
"sõne."
|
||||||
|
|
||||||
|
msgid "Attach modal dialogs"
|
||||||
|
msgstr "Modaaldialoogide kinnistamine"
|
||||||
|
|
||||||
msgid ""
|
msgid ""
|
||||||
"When true, instead of having independent titlebars, modal dialogs appear "
|
"When true, instead of having independent titlebars, modal dialogs appear "
|
||||||
"attached to the titlebar of the parent window and are moved together with "
|
"attached to the titlebar of the parent window and are moved together with "
|
||||||
@@ -640,6 +353,75 @@ msgstr ""
|
|||||||
"Kui märgitud, siis eraldi tiitliribade asemel on moodaalsed dialoogid "
|
"Kui märgitud, siis eraldi tiitliribade asemel on moodaalsed dialoogid "
|
||||||
"emaakna tiitliribade küljes ning liiguvad koos emaaknaga."
|
"emaakna tiitliribade küljes ning liiguvad koos emaaknaga."
|
||||||
|
|
||||||
|
msgid "Live Hidden Windows"
|
||||||
|
msgstr "Varjatud akende aktiivsus"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
||||||
|
"other workspaces than the current one) should be kept alive."
|
||||||
|
msgstr ""
|
||||||
|
"Määrab, kas varjatud aknaid (nt minimeeritud ja teistel tööaladel aknad) "
|
||||||
|
"hoitakse elus."
|
||||||
|
|
||||||
|
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||||
|
msgstr "Akna ümberpaigutamine selle lohistamisel ekraani serva"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"If enabled, dropping windows on vertical screen edges maximizes them "
|
||||||
|
"vertically and resizes them horizontally to cover half of the available "
|
||||||
|
"area. Dropping windows on the top screen edge maximizes them completely."
|
||||||
|
msgstr ""
|
||||||
|
"Kui märgitud, siis akna lohistamine ekraani külgservale maksimeerib selle "
|
||||||
|
"vertikaalselt ja laius katab pool saadaolevast laiusest. Akna lohistamine "
|
||||||
|
"ekraani ülaserva maksimeerib akna täielikult."
|
||||||
|
|
||||||
|
msgid "Workspaces are managed dynamically"
|
||||||
|
msgstr "Tööalade dünaamiline haldus"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Determines whether workspaces are managed dynamically or whether there's a "
|
||||||
|
"static number of workspaces (determined by the num-workspaces key in org."
|
||||||
|
"gnome.desktop.wm.preferences)."
|
||||||
|
msgstr ""
|
||||||
|
"Määrab, kas tööalasid hallatakse dünaamiliselt või on nende arv staatiline "
|
||||||
|
"(arvu määrab org.gnome.desktop.wm.preferences all võti num-workspaces)."
|
||||||
|
|
||||||
|
msgid "Workspaces only on primary"
|
||||||
|
msgstr "Tööalad ainult peamisel"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Determines whether workspace switching should happen for windows on all "
|
||||||
|
"monitors or only for windows on the primary monitor."
|
||||||
|
msgstr ""
|
||||||
|
"Määrab, kas tööalade vahetamine mõjutab kõiki aknaid kõigil monitoridel või "
|
||||||
|
"ainult aknaid peamisel monitoril."
|
||||||
|
|
||||||
|
msgid "No tab popup"
|
||||||
|
msgstr "Tabulaatoril pole hüpikakent"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Determines whether the use of popup and highlight frame should be disabled "
|
||||||
|
"for window cycling."
|
||||||
|
msgstr ""
|
||||||
|
"Kui märgitud, siis on hüpikaken ja esiletõstmise raam keelatud akende "
|
||||||
|
"vahetamisel."
|
||||||
|
|
||||||
|
msgid "Draggable border width"
|
||||||
|
msgstr "Lohistatava äärise laius."
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"The amount of total draggable borders. If the theme's visible borders are "
|
||||||
|
"not enough, invisible borders will be added to meet this value."
|
||||||
|
msgstr ""
|
||||||
|
"Lohistatava äärise laius. Kui kujunduse nähtavatest ääristest ei piisa, "
|
||||||
|
"lisatakse puuduoleva osa jaoks nähtamatu ääris."
|
||||||
|
|
||||||
|
msgid "Select window from tab popup"
|
||||||
|
msgstr "Akna valimine tabulaatori hüpikaknalt"
|
||||||
|
|
||||||
|
msgid "Cancel tab popup"
|
||||||
|
msgstr "Tabulaatori hüpikakna katkestamine"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s\n"
|
msgid "Usage: %s\n"
|
||||||
msgstr "Kasutamine: %s\n"
|
msgstr "Kasutamine: %s\n"
|
||||||
@@ -877,6 +659,30 @@ msgstr "Raami geomeetria ei määra nuppude suurust"
|
|||||||
msgid "Gradients should have at least two colors"
|
msgid "Gradients should have at least two colors"
|
||||||
msgstr "Värviüleminekus peaks olema vähemalt kaks värvi"
|
msgstr "Värviüleminekus peaks olema vähemalt kaks värvi"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"GTK custom color specification must have color name and fallback in "
|
||||||
|
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||||
|
msgstr ""
|
||||||
|
"GTK kohandatud värvi määrang peab sisaldama sulgudes värvi nimetust ning "
|
||||||
|
"varuvärvi, nt gtk:custom(foo,bar); väärtust \"%s\" pole võimalik töödelda"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||||
|
"_ are valid"
|
||||||
|
msgstr ""
|
||||||
|
"gtk:custom color_name parameetris sobimatu märk '%c', lubatud on ainult A-Za-"
|
||||||
|
"z0-9-_"
|
||||||
|
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||||
|
"fit the format"
|
||||||
|
msgstr ""
|
||||||
|
"Gtk:custom vorming on \"gtk:custom(värvi_nimi,varuvärv)\", \"%s\" ei sobi "
|
||||||
|
"selle vorminguga"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||||
@@ -1511,25 +1317,3 @@ msgstr "y väärtus oli %d, oodati väärtust %d"
|
|||||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
|
"%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
|
||||||
|
|
||||||
#~ msgid ""
|
|
||||||
#~ "Don't make fullscreen windows that are maximized and have no decorations"
|
|
||||||
#~ msgstr "Ei tehta maksimeeritud ilma raamita täisekraanaknaid."
|
|
||||||
|
|
||||||
#~ msgid "Whether window popup/frame should be shown when cycling windows."
|
|
||||||
#~ msgstr "Kas hüpikakent/raami näidatakse akende vahetamisel."
|
|
||||||
|
|
||||||
#~ msgid "Internal argument for GObject introspection"
|
|
||||||
#~ msgstr "GObject enesevaatluse siseargument"
|
|
||||||
|
|
||||||
#~ msgid "Failed to restart: %s\n"
|
|
||||||
#~ msgstr "Tõrge taaskäivitamisel: %s\n"
|
|
||||||
|
|
||||||
#~ msgid "Error setting clutter plugin list: %s\n"
|
|
||||||
#~ msgstr "Viga clutteri pluginate nimekirja määramisel: %s\n"
|
|
||||||
|
|
||||||
#~ msgid "Clutter Plugins"
|
|
||||||
#~ msgstr "Clutteri pluginad"
|
|
||||||
|
|
||||||
#~ msgid "Plugins to load for the Clutter-based compositing manager."
|
|
||||||
#~ msgstr "Clutteril põhineva komposiitmontaažihalduri laadimise pluginad."
|
|
||||||
|
398
po/it.po
398
po/it.po
@@ -11,15 +11,26 @@ msgstr ""
|
|||||||
"Project-Id-Version: mutter 2.9x\n"
|
"Project-Id-Version: mutter 2.9x\n"
|
||||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
|
||||||
"product=mutter&keywords=I18N+L10N&component=general\n"
|
"product=mutter&keywords=I18N+L10N&component=general\n"
|
||||||
"POT-Creation-Date: 2011-03-21 19:31+0000\n"
|
"POT-Creation-Date: 2011-09-06 16:52+0000\n"
|
||||||
"PO-Revision-Date: 2011-03-22 22:52+0100\n"
|
"PO-Revision-Date: 2011-09-08 21:56+0200\n"
|
||||||
"Last-Translator: Luca Ferretti <lferrett@gnome.org>\n"
|
"Last-Translator: Luca Ferretti <lferrett@gnome.org>\n"
|
||||||
"Language-Team: Italian <tp@lists.linux.it>\n"
|
"Language-Team: Italiano <tp@lists.linux.it>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bits\n"
|
||||||
"Language: it\n"
|
"Language: it\n"
|
||||||
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||||
|
|
||||||
|
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||||
|
#. * we have no way to get it to exit
|
||||||
|
#: ../src/compositor/compositor.c:486
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Another compositing manager is already running on screen %i on display \"%s"
|
||||||
|
"\"."
|
||||||
|
msgstr ""
|
||||||
|
"Un altro compositing manager è già in esecuzione sullo schermo %i sul "
|
||||||
|
"display «%s»."
|
||||||
|
|
||||||
# questo e i successivi presi dallo stesso
|
# questo e i successivi presi dallo stesso
|
||||||
# file vanno a comparire in
|
# file vanno a comparire in
|
||||||
@@ -355,13 +366,16 @@ msgstr "Evento campanella"
|
|||||||
msgid "Unknown window information request: %d"
|
msgid "Unknown window information request: %d"
|
||||||
msgstr "Richiesta informazioni finestra sconosciuta: %d"
|
msgstr "Richiesta informazioni finestra sconosciuta: %d"
|
||||||
|
|
||||||
#. Translators: %s is a window title
|
#: ../src/core/delete.c:111
|
||||||
#: ../src/core/delete.c:94
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "<tt>%s</tt> is not responding."
|
msgid "<tt>%s</tt> is not responding."
|
||||||
msgstr "Nessuna risposta da <tt>%s</tt>."
|
msgstr "Nessuna risposta da <tt>%s</tt>."
|
||||||
|
|
||||||
#: ../src/core/delete.c:99
|
#: ../src/core/delete.c:114
|
||||||
|
msgid "Application is not responding."
|
||||||
|
msgstr "L'applicazione non risponde."
|
||||||
|
|
||||||
|
#: ../src/core/delete.c:119
|
||||||
msgid ""
|
msgid ""
|
||||||
"You may choose to wait a short while for it to continue or force the "
|
"You may choose to wait a short while for it to continue or force the "
|
||||||
"application to quit entirely."
|
"application to quit entirely."
|
||||||
@@ -369,11 +383,11 @@ msgstr ""
|
|||||||
"È possibile scegliere di attendere un po' lasciando che l'applicazione "
|
"È possibile scegliere di attendere un po' lasciando che l'applicazione "
|
||||||
"continui, oppure forzare la terminazione dell'applicazione."
|
"continui, oppure forzare la terminazione dell'applicazione."
|
||||||
|
|
||||||
#: ../src/core/delete.c:108
|
#: ../src/core/delete.c:126
|
||||||
msgid "_Wait"
|
msgid "_Wait"
|
||||||
msgstr "_Attendi"
|
msgstr "_Attendi"
|
||||||
|
|
||||||
#: ../src/core/delete.c:108
|
#: ../src/core/delete.c:126
|
||||||
msgid "_Force Quit"
|
msgid "_Force Quit"
|
||||||
msgstr "_Forza uscita"
|
msgstr "_Forza uscita"
|
||||||
|
|
||||||
@@ -399,7 +413,7 @@ msgstr ""
|
|||||||
#. Displayed when a keybinding which is
|
#. Displayed when a keybinding which is
|
||||||
#. * supposed to launch a program fails.
|
#. * supposed to launch a program fails.
|
||||||
#.
|
#.
|
||||||
#: ../src/core/keybindings.c:2468
|
#: ../src/core/keybindings.c:2523
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"There was an error running <tt>%s</tt>:\n"
|
"There was an error running <tt>%s</tt>:\n"
|
||||||
@@ -410,13 +424,13 @@ msgstr ""
|
|||||||
"\n"
|
"\n"
|
||||||
"%s."
|
"%s."
|
||||||
|
|
||||||
#: ../src/core/keybindings.c:2558
|
#: ../src/core/keybindings.c:2613
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No command %d has been defined.\n"
|
msgid "No command %d has been defined.\n"
|
||||||
msgstr "Non è stato definito alcuno comando %d.\n"
|
msgstr "Non è stato definito alcuno comando %d.\n"
|
||||||
|
|
||||||
# "comando di terminale" o "comando «terminal»" ???
|
# "comando di terminale" o "comando «terminal»" ???
|
||||||
#: ../src/core/keybindings.c:3570
|
#: ../src/core/keybindings.c:3625
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No terminal command has been defined.\n"
|
msgid "No terminal command has been defined.\n"
|
||||||
msgstr "Non è stato definito alcun comando di terminale.\n"
|
msgstr "Non è stato definito alcun comando di terminale.\n"
|
||||||
@@ -445,12 +459,12 @@ msgstr "Inizializza la sessione da file salvato"
|
|||||||
msgid "Make X calls synchronous"
|
msgid "Make X calls synchronous"
|
||||||
msgstr "Rende le chiamate X sincrone"
|
msgstr "Rende le chiamate X sincrone"
|
||||||
|
|
||||||
#: ../src/core/main.c:506
|
#: ../src/core/main.c:504
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to scan themes directory: %s\n"
|
msgid "Failed to scan themes directory: %s\n"
|
||||||
msgstr "Scansione della directory dei temi non riuscita: %s\n"
|
msgstr "Scansione della directory dei temi non riuscita: %s\n"
|
||||||
|
|
||||||
#: ../src/core/main.c:522
|
#: ../src/core/main.c:520
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
|
"Could not find a theme! Be sure %s exists and contains the usual themes.\n"
|
||||||
@@ -492,38 +506,38 @@ msgstr "Elenco separato da virgole dei plugin del compositor"
|
|||||||
#. * (Empty comment follows so the translators don't see this.)
|
#. * (Empty comment follows so the translators don't see this.)
|
||||||
#.
|
#.
|
||||||
#.
|
#.
|
||||||
#: ../src/core/prefs.c:543 ../src/core/prefs.c:704
|
#: ../src/core/prefs.c:550 ../src/core/prefs.c:711
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "GConf key '%s' is set to an invalid value\n"
|
msgid "GConf key '%s' is set to an invalid value\n"
|
||||||
msgstr "La chiave GConf «%s» è impostata ad un valore non valido\n"
|
msgstr "La chiave GConf «%s» è impostata ad un valore non valido\n"
|
||||||
|
|
||||||
# lasciato "Il valore" iniziale che c'era in precendeza
|
# lasciato "Il valore" iniziale che c'era in precendeza
|
||||||
#: ../src/core/prefs.c:630 ../src/core/prefs.c:873
|
#: ../src/core/prefs.c:637 ../src/core/prefs.c:880
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%d stored in GConf key %s is out of range %d to %d\n"
|
msgid "%d stored in GConf key %s is out of range %d to %d\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Il valore %d memorizzato nella chiave GConf %s è fuori dall'intervallo da %d "
|
"Il valore %d memorizzato nella chiave GConf %s è fuori dall'intervallo da %d "
|
||||||
"a %d\n"
|
"a %d\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:674 ../src/core/prefs.c:751 ../src/core/prefs.c:799
|
#: ../src/core/prefs.c:681 ../src/core/prefs.c:758 ../src/core/prefs.c:806
|
||||||
#: ../src/core/prefs.c:863 ../src/core/prefs.c:1324 ../src/core/prefs.c:1340
|
#: ../src/core/prefs.c:870 ../src/core/prefs.c:1331 ../src/core/prefs.c:1347
|
||||||
#: ../src/core/prefs.c:1357 ../src/core/prefs.c:1373
|
#: ../src/core/prefs.c:1364 ../src/core/prefs.c:1380
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "GConf key \"%s\" is set to an invalid type\n"
|
msgid "GConf key \"%s\" is set to an invalid type\n"
|
||||||
msgstr "La chiave GConf «%s» è impostata ad un tipo non valido\n"
|
msgstr "La chiave GConf «%s» è impostata ad un tipo non valido\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1203
|
#: ../src/core/prefs.c:1210
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "GConf key %s is already in use and can't be used to override %s\n"
|
msgid "GConf key %s is already in use and can't be used to override %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"La chiave GConf %s è già in uso e non può essere usata per scavalcare %s\n"
|
"La chiave GConf %s è già in uso e non può essere usata per scavalcare %s\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1262
|
#: ../src/core/prefs.c:1269
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Can't override GConf key, %s not found\n"
|
msgid "Can't override GConf key, %s not found\n"
|
||||||
msgstr "Impossibile scavalcare la chiave GConf, %s non trovato\n"
|
msgstr "Impossibile scavalcare la chiave GConf, %s non trovato\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1447
|
#: ../src/core/prefs.c:1454
|
||||||
msgid ""
|
msgid ""
|
||||||
"Workarounds for broken applications disabled. Some applications may not "
|
"Workarounds for broken applications disabled. Some applications may not "
|
||||||
"behave properly.\n"
|
"behave properly.\n"
|
||||||
@@ -531,14 +545,14 @@ msgstr ""
|
|||||||
"Disabilitate le funzionalità palliative per la applicazioni difettose. "
|
"Disabilitate le funzionalità palliative per la applicazioni difettose. "
|
||||||
"Alcune applicazioni potrebbero avere comportamenti errati.\n"
|
"Alcune applicazioni potrebbero avere comportamenti errati.\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1524
|
#: ../src/core/prefs.c:1531
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse font description \"%s\" from GConf key %s\n"
|
msgid "Could not parse font description \"%s\" from GConf key %s\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossibile analizzare la descrizione del tipo di carattere «%s» dalla "
|
"Impossibile analizzare la descrizione del tipo di carattere «%s» dalla chiave "
|
||||||
"chiave GConf %s\n"
|
"GConf %s\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1586
|
#: ../src/core/prefs.c:1593
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"%s\" found in configuration database is not a valid value for mouse button "
|
"\"%s\" found in configuration database is not a valid value for mouse button "
|
||||||
@@ -547,57 +561,57 @@ msgstr ""
|
|||||||
"Il valore «%s» trovato nel database di configurazione non è valido per il "
|
"Il valore «%s» trovato nel database di configurazione non è valido per il "
|
||||||
"modificatore del tasto del mouse\n"
|
"modificatore del tasto del mouse\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2016
|
#: ../src/core/prefs.c:2028
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error setting number of workspaces to %d: %s\n"
|
msgid "Error setting number of workspaces to %d: %s\n"
|
||||||
msgstr "Errore nell'impostare il numero di spazi di lavoro a %d: %s\n"
|
msgstr "Errore nell'impostare il numero di spazi di lavoro a %d: %s\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2200 ../src/core/prefs.c:2702
|
#: ../src/core/prefs.c:2212 ../src/core/prefs.c:2714
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Workspace %d"
|
msgid "Workspace %d"
|
||||||
msgstr "Spazio di lavoro %d"
|
msgstr "Spazio di lavoro %d"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2232 ../src/core/prefs.c:2410
|
#: ../src/core/prefs.c:2244 ../src/core/prefs.c:2422
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||||
"\"%s\"\n"
|
"\"%s\"\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Il valore «%s» nel database di configurazione non è valido per "
|
"Il valore «%s» nel database di configurazione non è valido per l'associazione "
|
||||||
"l'associazione di tasti «%s»\n"
|
"di tasti «%s»\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:2783
|
#: ../src/core/prefs.c:2795
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||||
msgstr "Errore nell'impostare il nome dello spazio di lavoro %d a «%s»: %s\n"
|
msgstr "Errore nell'impostare il nome dello spazio di lavoro %d a «%s»: %s\n"
|
||||||
|
|
||||||
# eeeehhh????
|
# eeeehhh????
|
||||||
#: ../src/core/prefs.c:2997
|
#: ../src/core/prefs.c:3009
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error setting live hidden windows status status: %s\n"
|
msgid "Error setting live hidden windows status status: %s\n"
|
||||||
msgstr "Errore nell'impostare lo stato \"stato finestre live nascoste\": %s\n"
|
msgstr "Errore nell'impostare lo stato \"stato finestre live nascoste\": %s\n"
|
||||||
|
|
||||||
# eeeehhh????
|
# eeeehhh????
|
||||||
#: ../src/core/prefs.c:3032
|
#: ../src/core/prefs.c:3044
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error setting no tab popup status: %s\n"
|
msgid "Error setting no tab popup status: %s\n"
|
||||||
msgstr "Errore nell'impostare lo stato \"niente tab popup\": %s\n"
|
msgstr "Errore nell'impostare lo stato \"niente tab popup\": %s\n"
|
||||||
|
|
||||||
#: ../src/core/screen.c:623
|
#: ../src/core/screen.c:663
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Screen %d on display '%s' is invalid\n"
|
msgid "Screen %d on display '%s' is invalid\n"
|
||||||
msgstr "Lo schermo %d nel display «%s» non è valido\n"
|
msgstr "Lo schermo %d nel display «%s» non è valido\n"
|
||||||
|
|
||||||
#: ../src/core/screen.c:639
|
#: ../src/core/screen.c:679
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||||
"replace option to replace the current window manager.\n"
|
"replace option to replace the current window manager.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Lo schermo %d sul display «%s» ha già un window manager; provare a "
|
"Lo schermo %d sul display «%s» ha già un window manager; provare a utilizzare "
|
||||||
"utilizzare l'opzione --replace per sostituirlo.\n"
|
"l'opzione --replace per sostituirlo.\n"
|
||||||
|
|
||||||
#: ../src/core/screen.c:666
|
#: ../src/core/screen.c:706
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||||
@@ -605,66 +619,66 @@ msgstr ""
|
|||||||
"Impossibile acquisire la selezione del window manager per lo schermo %d nel "
|
"Impossibile acquisire la selezione del window manager per lo schermo %d nel "
|
||||||
"display «%s»\n"
|
"display «%s»\n"
|
||||||
|
|
||||||
#: ../src/core/screen.c:721
|
#: ../src/core/screen.c:761
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
||||||
msgstr "Lo schermo %d sul display «%s» ha già un window manager\n"
|
msgstr "Lo schermo %d sul display «%s» ha già un window manager\n"
|
||||||
|
|
||||||
#: ../src/core/screen.c:906
|
#: ../src/core/screen.c:946
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not release screen %d on display \"%s\"\n"
|
msgid "Could not release screen %d on display \"%s\"\n"
|
||||||
msgstr "Impossibile rilasciare lo schermo %d sul display «%s»\n"
|
msgstr "Impossibile rilasciare lo schermo %d sul display «%s»\n"
|
||||||
|
|
||||||
#: ../src/core/session.c:837 ../src/core/session.c:844
|
#: ../src/core/session.c:843 ../src/core/session.c:850
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not create directory '%s': %s\n"
|
msgid "Could not create directory '%s': %s\n"
|
||||||
msgstr "Impossibile creare la directory «%s»: %s\n"
|
msgstr "Impossibile creare la directory «%s»: %s\n"
|
||||||
|
|
||||||
#: ../src/core/session.c:854
|
#: ../src/core/session.c:860
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not open session file '%s' for writing: %s\n"
|
msgid "Could not open session file '%s' for writing: %s\n"
|
||||||
msgstr "Impossibile aprire il file di sessione «%s» in scrittura: %s\n"
|
msgstr "Impossibile aprire il file di sessione «%s» in scrittura: %s\n"
|
||||||
|
|
||||||
#: ../src/core/session.c:995
|
#: ../src/core/session.c:1001
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error writing session file '%s': %s\n"
|
msgid "Error writing session file '%s': %s\n"
|
||||||
msgstr "Errore nello scrivere il file di sessione «%s»: %s\n"
|
msgstr "Errore nello scrivere il file di sessione «%s»: %s\n"
|
||||||
|
|
||||||
#: ../src/core/session.c:1000
|
#: ../src/core/session.c:1006
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error closing session file '%s': %s\n"
|
msgid "Error closing session file '%s': %s\n"
|
||||||
msgstr "Errore nel chiudere il file di sessione «%s»: %s\n"
|
msgstr "Errore nel chiudere il file di sessione «%s»: %s\n"
|
||||||
|
|
||||||
#: ../src/core/session.c:1130
|
#: ../src/core/session.c:1136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to parse saved session file: %s\n"
|
msgid "Failed to parse saved session file: %s\n"
|
||||||
msgstr "Analisi del file della sessione salvato non riuscita: %s\n"
|
msgstr "Analisi del file della sessione salvato non riuscita: %s\n"
|
||||||
|
|
||||||
#: ../src/core/session.c:1179
|
#: ../src/core/session.c:1185
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "<mutter_session> attribute seen but we already have the session ID"
|
msgid "<mutter_session> attribute seen but we already have the session ID"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Attributo <mutter_session> individuato, ma è già presente un ID della "
|
"Attributo <mutter_session> individuato, ma è già presente un ID della "
|
||||||
"sessione"
|
"sessione"
|
||||||
|
|
||||||
#: ../src/core/session.c:1192 ../src/core/session.c:1267
|
#: ../src/core/session.c:1198 ../src/core/session.c:1273
|
||||||
#: ../src/core/session.c:1299 ../src/core/session.c:1371
|
#: ../src/core/session.c:1305 ../src/core/session.c:1377
|
||||||
#: ../src/core/session.c:1431
|
#: ../src/core/session.c:1437
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown attribute %s on <%s> element"
|
msgid "Unknown attribute %s on <%s> element"
|
||||||
msgstr "Attributo %s sconosciuto per l'elemento <%s>"
|
msgstr "Attributo %s sconosciuto per l'elemento <%s>"
|
||||||
|
|
||||||
#: ../src/core/session.c:1209
|
#: ../src/core/session.c:1215
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "nested <window> tag"
|
msgid "nested <window> tag"
|
||||||
msgstr "tag <window> annidato"
|
msgstr "tag <window> annidato"
|
||||||
|
|
||||||
#: ../src/core/session.c:1451
|
#: ../src/core/session.c:1457
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Unknown element %s"
|
msgid "Unknown element %s"
|
||||||
msgstr "Elemento %s sconosciuto"
|
msgstr "Elemento %s sconosciuto"
|
||||||
|
|
||||||
#: ../src/core/session.c:1803
|
#: ../src/core/session.c:1809
|
||||||
msgid ""
|
msgid ""
|
||||||
"These windows do not support "save current setup" and will have to "
|
"These windows do not support "save current setup" and will have to "
|
||||||
"be restarted manually next time you log in."
|
"be restarted manually next time you log in."
|
||||||
@@ -693,30 +707,24 @@ msgid "Mutter was compiled without support for verbose mode\n"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Mutter è stato compilato escludendo il supporto per la modalità prolissa\n"
|
"Mutter è stato compilato escludendo il supporto per la modalità prolissa\n"
|
||||||
|
|
||||||
#: ../src/core/util.c:286
|
#: ../src/core/util.c:290
|
||||||
msgid "Window manager: "
|
msgid "Window manager: "
|
||||||
msgstr "Window manager: "
|
msgstr "Window manager: "
|
||||||
|
|
||||||
#: ../src/core/util.c:434
|
#: ../src/core/util.c:438
|
||||||
msgid "Bug in window manager: "
|
msgid "Bug in window manager: "
|
||||||
msgstr "Bug nel window manager: "
|
msgstr "Bug nel window manager: "
|
||||||
|
|
||||||
#: ../src/core/util.c:467
|
#: ../src/core/util.c:471
|
||||||
msgid "Window manager warning: "
|
msgid "Window manager warning: "
|
||||||
msgstr "Avviso del window manager: "
|
msgstr "Avviso del window manager: "
|
||||||
|
|
||||||
#: ../src/core/util.c:495
|
#: ../src/core/util.c:499
|
||||||
msgid "Window manager error: "
|
msgid "Window manager error: "
|
||||||
msgstr "Errore del window manager: "
|
msgstr "Errore del window manager: "
|
||||||
|
|
||||||
#. Translators: This is the title used on dialog boxes
|
|
||||||
#: ../src/core/util.c:615 ../src/mutter.desktop.in.h:1
|
|
||||||
#: ../src/mutter-wm.desktop.in.h:1
|
|
||||||
msgid "Mutter"
|
|
||||||
msgstr "Mutter"
|
|
||||||
|
|
||||||
#. first time through
|
#. first time through
|
||||||
#: ../src/core/window.c:6752
|
#: ../src/core/window.c:7019
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||||
@@ -732,11 +740,11 @@ msgstr ""
|
|||||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||||
#. * about these apps but make them work.
|
#. * about these apps but make them work.
|
||||||
#.
|
#.
|
||||||
#: ../src/core/window.c:7415
|
#: ../src/core/window.c:7682
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
"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"
|
"d x %d and max size %d x %d; this doesn't make much sense.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"La finestra %s ha impostato un hint MWM indicando che non è "
|
"La finestra %s ha impostato un hint MWM indicando che non è "
|
||||||
"ridimensionabile, ma ha impostato la dimensione minima %d x %d e la "
|
"ridimensionabile, ma ha impostato la dimensione minima %d x %d e la "
|
||||||
@@ -754,11 +762,18 @@ msgstr "%s (su %s)"
|
|||||||
|
|
||||||
# Sì, direi che è oscuro -Luca
|
# Sì, direi che è oscuro -Luca
|
||||||
#
|
#
|
||||||
#: ../src/core/window-props.c:1479
|
#: ../src/core/window-props.c:1481
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||||
msgstr "Specificato un WM_TRANSIENT_FOR finestra 0x%lx non valido per %s.\n"
|
msgstr "Specificato un WM_TRANSIENT_FOR finestra 0x%lx non valido per %s.\n"
|
||||||
|
|
||||||
|
# Sì, direi che è oscuro -Luca
|
||||||
|
#
|
||||||
|
#: ../src/core/window-props.c:1492
|
||||||
|
#, c-format
|
||||||
|
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||||
|
msgstr "WM_TRANSIENT_FOR finestra 0x%lx per %s potrebbe creare un loop.\n"
|
||||||
|
|
||||||
#: ../src/core/xprops.c:155
|
#: ../src/core/xprops.c:155
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
@@ -787,6 +802,10 @@ msgstr ""
|
|||||||
"La proprietà %s sulla finestra 0x%lx contiene UTF-8 non valido per "
|
"La proprietà %s sulla finestra 0x%lx contiene UTF-8 non valido per "
|
||||||
"l'elemento %d nella lista\n"
|
"l'elemento %d nella lista\n"
|
||||||
|
|
||||||
|
#: ../src/mutter.desktop.in.h:1 ../src/mutter-wm.desktop.in.h:1
|
||||||
|
msgid "Mutter"
|
||||||
|
msgstr "Mutter"
|
||||||
|
|
||||||
#: ../src/mutter.schemas.in.h:1
|
#: ../src/mutter.schemas.in.h:1
|
||||||
msgid "Attach modal dialogs"
|
msgid "Attach modal dialogs"
|
||||||
msgstr "Dialoghi modali attaccati"
|
msgstr "Dialoghi modali attaccati"
|
||||||
@@ -811,14 +830,27 @@ msgstr ""
|
|||||||
"tutti i monitor oppure solo per le finestre sul monitor primario."
|
"tutti i monitor oppure solo per le finestre sul monitor primario."
|
||||||
|
|
||||||
#: ../src/mutter.schemas.in.h:4
|
#: ../src/mutter.schemas.in.h:4
|
||||||
|
msgid "Draggable border width"
|
||||||
|
msgstr "Larghezza bordo trascinabile"
|
||||||
|
|
||||||
|
#: ../src/mutter.schemas.in.h:5
|
||||||
msgid "Live Hidden Windows"
|
msgid "Live Hidden Windows"
|
||||||
msgstr "Finestre nascoste live"
|
msgstr "Finestre nascoste live"
|
||||||
|
|
||||||
#: ../src/mutter.schemas.in.h:5
|
#: ../src/mutter.schemas.in.h:6
|
||||||
msgid "Modifier to use for extended window management operations"
|
msgid "Modifier to use for extended window management operations"
|
||||||
msgstr "Modificatore da utilizzare per le azioni di gestione finestre estese"
|
msgstr "Modificatore da utilizzare per le azioni di gestione finestre estese"
|
||||||
|
|
||||||
#: ../src/mutter.schemas.in.h:6
|
#: ../src/mutter.schemas.in.h:7
|
||||||
|
msgid ""
|
||||||
|
"The amount of total draggable borders. If the theme's visible borders are "
|
||||||
|
"not enough, invisible borders will be added to meet this value."
|
||||||
|
msgstr ""
|
||||||
|
"Lo spessore effettivo totale per i bordi trascinabili. Se i bordi visibili "
|
||||||
|
"del tema non sono sufficienti, vengono aggiunti dei bordi invisibili per "
|
||||||
|
"raggiungere questo valore."
|
||||||
|
|
||||||
|
#: ../src/mutter.schemas.in.h:8
|
||||||
msgid ""
|
msgid ""
|
||||||
"This key will initiate the \"overlay\", which is a combination window "
|
"This key will initiate the \"overlay\", which is a combination window "
|
||||||
"overview and application launching system. The default is intended to be the "
|
"overview and application launching system. The default is intended to be the "
|
||||||
@@ -831,7 +863,7 @@ msgstr ""
|
|||||||
"questa scorciatoia sia o il valore predefinito, oppure che sia impostata "
|
"questa scorciatoia sia o il valore predefinito, oppure che sia impostata "
|
||||||
"alla stringa vuota."
|
"alla stringa vuota."
|
||||||
|
|
||||||
#: ../src/mutter.schemas.in.h:7
|
#: ../src/mutter.schemas.in.h:9
|
||||||
msgid ""
|
msgid ""
|
||||||
"When true, instead of having independent titlebars, modal dialogs appear "
|
"When true, instead of having independent titlebars, modal dialogs appear "
|
||||||
"attached to the titlebar of the parent window and are moved together with "
|
"attached to the titlebar of the parent window and are moved together with "
|
||||||
@@ -841,7 +873,7 @@ msgstr ""
|
|||||||
"dialoghi modali appaiono attaccati alla barra del titolo della finestra "
|
"dialoghi modali appaiono attaccati alla barra del titolo della finestra "
|
||||||
"genitore, muovendosi assieme ad essa."
|
"genitore, muovendosi assieme ad essa."
|
||||||
|
|
||||||
#: ../src/mutter.schemas.in.h:8
|
#: ../src/mutter.schemas.in.h:10
|
||||||
msgid "Workspaces only on primary"
|
msgid "Workspaces only on primary"
|
||||||
msgstr "Spazi di lavoro solo sul primario"
|
msgstr "Spazi di lavoro solo sul primario"
|
||||||
|
|
||||||
@@ -852,48 +884,48 @@ msgstr "Uso: %s\n"
|
|||||||
|
|
||||||
# Questo e i successivi simili sono tooltip
|
# Questo e i successivi simili sono tooltip
|
||||||
# per i pulsanti della cornice.
|
# per i pulsanti della cornice.
|
||||||
#: ../src/ui/frames.c:1099
|
#: ../src/ui/frames.c:1157
|
||||||
msgid "Close Window"
|
msgid "Close Window"
|
||||||
msgstr "Chiude la finestra"
|
msgstr "Chiude la finestra"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1102
|
#: ../src/ui/frames.c:1160
|
||||||
msgid "Window Menu"
|
msgid "Window Menu"
|
||||||
msgstr "Menù finestra"
|
msgstr "Menù finestra"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1105
|
#: ../src/ui/frames.c:1163
|
||||||
msgid "Minimize Window"
|
msgid "Minimize Window"
|
||||||
msgstr "Minimizza la finestra"
|
msgstr "Minimizza la finestra"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1108
|
#: ../src/ui/frames.c:1166
|
||||||
msgid "Maximize Window"
|
msgid "Maximize Window"
|
||||||
msgstr "Massimizza la finestra"
|
msgstr "Massimizza la finestra"
|
||||||
|
|
||||||
# ==demassimizza
|
# ==demassimizza
|
||||||
#: ../src/ui/frames.c:1111
|
#: ../src/ui/frames.c:1169
|
||||||
msgid "Restore Window"
|
msgid "Restore Window"
|
||||||
msgstr "Ripristina la finestra"
|
msgstr "Ripristina la finestra"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1114
|
#: ../src/ui/frames.c:1172
|
||||||
msgid "Roll Up Window"
|
msgid "Roll Up Window"
|
||||||
msgstr "Arrotola la finestra"
|
msgstr "Arrotola la finestra"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1117
|
#: ../src/ui/frames.c:1175
|
||||||
msgid "Unroll Window"
|
msgid "Unroll Window"
|
||||||
msgstr "Srotola la finestra"
|
msgstr "Srotola la finestra"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1120
|
#: ../src/ui/frames.c:1178
|
||||||
msgid "Keep Window On Top"
|
msgid "Keep Window On Top"
|
||||||
msgstr "Tiene la finestra in primo piano"
|
msgstr "Tiene la finestra in primo piano"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1123
|
#: ../src/ui/frames.c:1181
|
||||||
msgid "Remove Window From Top"
|
msgid "Remove Window From Top"
|
||||||
msgstr "Rimuove la finestra dalla primo piano"
|
msgstr "Rimuove la finestra dalla primo piano"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1126
|
#: ../src/ui/frames.c:1184
|
||||||
msgid "Always On Visible Workspace"
|
msgid "Always On Visible Workspace"
|
||||||
msgstr "Sempre sullo spazio di lavoro visibile"
|
msgstr "Sempre sullo spazio di lavoro visibile"
|
||||||
|
|
||||||
#: ../src/ui/frames.c:1129
|
#: ../src/ui/frames.c:1187
|
||||||
msgid "Put Window On Only One Workspace"
|
msgid "Put Window On Only One Workspace"
|
||||||
msgstr "Pone la finestra su un solo spazio di lavoro"
|
msgstr "Pone la finestra su un solo spazio di lavoro"
|
||||||
|
|
||||||
@@ -1112,49 +1144,77 @@ msgstr "Mod5"
|
|||||||
msgid "%d x %d"
|
msgid "%d x %d"
|
||||||
msgstr "%d × %d"
|
msgstr "%d × %d"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:255
|
#: ../src/ui/theme.c:253
|
||||||
msgid "top"
|
msgid "top"
|
||||||
msgstr "alto"
|
msgstr "alto"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:257
|
#: ../src/ui/theme.c:255
|
||||||
msgid "bottom"
|
msgid "bottom"
|
||||||
msgstr "basso"
|
msgstr "basso"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:259
|
#: ../src/ui/theme.c:257
|
||||||
msgid "left"
|
msgid "left"
|
||||||
msgstr "sinistra"
|
msgstr "sinistra"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:261
|
#: ../src/ui/theme.c:259
|
||||||
msgid "right"
|
msgid "right"
|
||||||
msgstr "destra"
|
msgstr "destra"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:288
|
#: ../src/ui/theme.c:286
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "frame geometry does not specify \"%s\" dimension"
|
msgid "frame geometry does not specify \"%s\" dimension"
|
||||||
msgstr "la geometria della cornice non specifica la dimensione «%s»"
|
msgstr "la geometria della cornice non specifica la dimensione «%s»"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:307
|
#: ../src/ui/theme.c:305
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la geometria della cornice non specifica la dimensione «%s» per il bordo «%s»"
|
"la geometria della cornice non specifica la dimensione «%s» per il bordo «%s»"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:344
|
#: ../src/ui/theme.c:342
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Button aspect ratio %g is not reasonable"
|
msgid "Button aspect ratio %g is not reasonable"
|
||||||
msgstr "Le proporzioni %g del pulsante non sono ragionevoli"
|
msgstr "Le proporzioni %g del pulsante non sono ragionevoli"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:356
|
#: ../src/ui/theme.c:354
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Frame geometry does not specify size of buttons"
|
msgid "Frame geometry does not specify size of buttons"
|
||||||
msgstr "La geometria della cornice non specifica la dimensione dei pulsanti"
|
msgstr "La geometria della cornice non specifica la dimensione dei pulsanti"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1064
|
#: ../src/ui/theme.c:1060
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Gradients should have at least two colors"
|
msgid "Gradients should have at least two colors"
|
||||||
msgstr "I gradienti dovrebbero avere almeno due colori"
|
msgstr "I gradienti dovrebbero avere almeno due colori"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1202
|
#: ../src/ui/theme.c:1212
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"GTK custom color specification must have color name and fallback in "
|
||||||
|
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||||
|
msgstr ""
|
||||||
|
"La specificazione dei colori personalizzati GTK deve presentare un nome di "
|
||||||
|
"colore e un ripiego tra parentesi, per es. gtk:custom(foo,bar); impossibile "
|
||||||
|
"analizzare \"%s\""
|
||||||
|
|
||||||
|
#: ../src/ui/theme.c:1228
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||||
|
"_ are valid"
|
||||||
|
msgstr ""
|
||||||
|
"Carattere \"%c\" non valido nel parametro color_name di gtk:custom, sono "
|
||||||
|
"validi solo A-Za-z0-9-_"
|
||||||
|
|
||||||
|
#: ../src/ui/theme.c:1242
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||||
|
"fit the format"
|
||||||
|
msgstr ""
|
||||||
|
"Il formato per Gtk:custom è \"gtk:custom(color_name,fallback)\", «%s» non è "
|
||||||
|
"adatto a tale formato"
|
||||||
|
|
||||||
|
#: ../src/ui/theme.c:1287
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||||
@@ -1163,7 +1223,7 @@ msgstr ""
|
|||||||
"La specificazione del colore GTK deve avere lo stato fra parentesi, per es. "
|
"La specificazione del colore GTK deve avere lo stato fra parentesi, per es. "
|
||||||
"gtk:fg[NORMAL] dove NORMAL è lo stato; impossibile analizzare \"%s\""
|
"gtk:fg[NORMAL] dove NORMAL è lo stato; impossibile analizzare \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1216
|
#: ../src/ui/theme.c:1301
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
"GTK color specification must have a close bracket after the state, e.g. gtk:"
|
||||||
@@ -1173,18 +1233,18 @@ msgstr ""
|
|||||||
"lo stato, per es. gtk:fg[NORMAL] dove NORMAL è lo stato; impossibile "
|
"lo stato, per es. gtk:fg[NORMAL] dove NORMAL è lo stato; impossibile "
|
||||||
"analizzare \"%s\""
|
"analizzare \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1227
|
#: ../src/ui/theme.c:1312
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand state \"%s\" in color specification"
|
msgid "Did not understand state \"%s\" in color specification"
|
||||||
msgstr "State «%s» incomprensibile nella specificazione del colore"
|
msgstr "Stato «%s» incomprensibile nella specificazione del colore"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1240
|
#: ../src/ui/theme.c:1325
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand color component \"%s\" in color specification"
|
msgid "Did not understand color component \"%s\" in color specification"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Componente di colore «%s» incomprensibile nella specificazione del colore"
|
"Componente di colore «%s» incomprensibile nella specificazione del colore"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1270
|
#: ../src/ui/theme.c:1355
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
"Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the "
|
||||||
@@ -1193,49 +1253,47 @@ msgstr ""
|
|||||||
"Il formato della sfumature è «blend/bg_color/fg_color/alpha», «%s» non è "
|
"Il formato della sfumature è «blend/bg_color/fg_color/alpha», «%s» non è "
|
||||||
"adatto a tale formato"
|
"adatto a tale formato"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1281
|
#: ../src/ui/theme.c:1366
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse alpha value \"%s\" in blended color"
|
msgid "Could not parse alpha value \"%s\" in blended color"
|
||||||
msgstr "Impossibile analizzare il valore alpha «%s» nel colore sfumato"
|
msgstr "Impossibile analizzare il valore alpha «%s» nel colore sfumato"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1291
|
#: ../src/ui/theme.c:1376
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
|
||||||
msgstr "Il valore alpha «%s» nel colore sfumato non è compreso tra 0.0 e 1.0"
|
msgstr "Il valore alpha «%s» nel colore sfumato non è compreso tra 0.0 e 1.0"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1338
|
#: ../src/ui/theme.c:1423
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
"Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Il formato dell'ombreggiatura è «shade/base_color/factor», «%s» non è adatto "
|
"Il formato dell'ombreggiatura è «shade/base_color/factor», «%s» non è adatto a "
|
||||||
"a tale formato"
|
"tale formato"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1349
|
#: ../src/ui/theme.c:1434
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse shade factor \"%s\" in shaded color"
|
msgid "Could not parse shade factor \"%s\" in shaded color"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Impossibile analizzare il fattore di ombreggiatura «%s» nel colore "
|
"Impossibile analizzare il fattore di ombreggiatura «%s» nel colore ombreggiato"
|
||||||
"ombreggiato"
|
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1359
|
#: ../src/ui/theme.c:1444
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Shade factor \"%s\" in shaded color is negative"
|
msgid "Shade factor \"%s\" in shaded color is negative"
|
||||||
msgstr "Il fattore di ombreggiatura «%s» nel colore ombreggiato è negativo"
|
msgstr "Il fattore di ombreggiatura «%s» nel colore ombreggiato è negativo"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1388
|
#: ../src/ui/theme.c:1473
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse color \"%s\""
|
msgid "Could not parse color \"%s\""
|
||||||
msgstr "Impossibile analizzare il colore «%s»"
|
msgstr "Impossibile analizzare il colore «%s»"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1646
|
#: ../src/ui/theme.c:1784
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression contains character '%s' which is not allowed"
|
msgid "Coordinate expression contains character '%s' which is not allowed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate contiene il carattere «%s» che non è "
|
"L'espressione delle coordinate contiene il carattere «%s» che non è consentito"
|
||||||
"consentito"
|
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1673
|
#: ../src/ui/theme.c:1811
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Coordinate expression contains floating point number '%s' which could not be "
|
"Coordinate expression contains floating point number '%s' which could not be "
|
||||||
@@ -1244,14 +1302,14 @@ msgstr ""
|
|||||||
"L'espressione delle coordinate contiene il numero in virgola mobile «%s» che "
|
"L'espressione delle coordinate contiene il numero in virgola mobile «%s» che "
|
||||||
"non può essere analizzato"
|
"non può essere analizzato"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1687
|
#: ../src/ui/theme.c:1825
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
msgid "Coordinate expression contains integer '%s' which could not be parsed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate contiene l'intero «%s» che non può essere "
|
"L'espressione delle coordinate contiene l'intero «%s» che non può essere "
|
||||||
"analizzato"
|
"analizzato"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1809
|
#: ../src/ui/theme.c:1947
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Coordinate expression contained unknown operator at the start of this text: "
|
"Coordinate expression contained unknown operator at the start of this text: "
|
||||||
@@ -1260,18 +1318,18 @@ msgstr ""
|
|||||||
"L'espressione delle coordinate contiene un operatore sconosciuto all'inizio "
|
"L'espressione delle coordinate contiene un operatore sconosciuto all'inizio "
|
||||||
"di questo testo: \"%s\""
|
"di questo testo: \"%s\""
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1866
|
#: ../src/ui/theme.c:2004
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression was empty or not understood"
|
msgid "Coordinate expression was empty or not understood"
|
||||||
msgstr "L'espressione delle coordinate è vuota o incomprensibile"
|
msgstr "L'espressione delle coordinate è vuota o incomprensibile"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:1977 ../src/ui/theme.c:1987 ../src/ui/theme.c:2021
|
#: ../src/ui/theme.c:2115 ../src/ui/theme.c:2125 ../src/ui/theme.c:2159
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression results in division by zero"
|
msgid "Coordinate expression results in division by zero"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate ha come risultato una divisione per zero"
|
"L'espressione delle coordinate ha come risultato una divisione per zero"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2029
|
#: ../src/ui/theme.c:2167
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Coordinate expression tries to use mod operator on a floating-point number"
|
"Coordinate expression tries to use mod operator on a floating-point number"
|
||||||
@@ -1279,74 +1337,74 @@ msgstr ""
|
|||||||
"L'espressione delle coordinate tenta di usare un operatore mod su un numero "
|
"L'espressione delle coordinate tenta di usare un operatore mod su un numero "
|
||||||
"in virgola mobile"
|
"in virgola mobile"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2085
|
#: ../src/ui/theme.c:2223
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
"Coordinate expression has an operator \"%s\" where an operand was expected"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate ha un operatore «%s» dove è atteso un operando"
|
"L'espressione delle coordinate ha un operatore «%s» dove è atteso un operando"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2094
|
#: ../src/ui/theme.c:2232
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had an operand where an operator was expected"
|
msgid "Coordinate expression had an operand where an operator was expected"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate ha un operando dove è atteso un operatore"
|
"L'espressione delle coordinate ha un operando dove è atteso un operatore"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2102
|
#: ../src/ui/theme.c:2240
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression ended with an operator instead of an operand"
|
msgid "Coordinate expression ended with an operator instead of an operand"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate finisce con un operatore invece che un "
|
"L'espressione delle coordinate finisce con un operatore invece che un "
|
||||||
"operando"
|
"operando"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2112
|
#: ../src/ui/theme.c:2250
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
"Coordinate expression has operator \"%c\" following operator \"%c\" with no "
|
||||||
"operand in between"
|
"operand in between"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate ha l'operatore «%c» seguito dall'operatore "
|
"L'espressione delle coordinate ha l'operatore «%c» seguito dall'operatore «%c» "
|
||||||
"«%c» senza un operando fra i due"
|
"senza un operando fra i due"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2263 ../src/ui/theme.c:2308
|
#: ../src/ui/theme.c:2401 ../src/ui/theme.c:2446
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
msgid "Coordinate expression had unknown variable or constant \"%s\""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate ha la variabile o la costante «%s» sconosciuta"
|
"L'espressione delle coordinate ha la variabile o la costante «%s» sconosciuta"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2362
|
#: ../src/ui/theme.c:2500
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression parser overflowed its buffer."
|
msgid "Coordinate expression parser overflowed its buffer."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'analizzatore dell'espressione delle coordinate ha superato il proprio "
|
"L'analizzatore dell'espressione delle coordinate ha superato il proprio "
|
||||||
"buffer."
|
"buffer."
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2391
|
#: ../src/ui/theme.c:2529
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate ha una parentesi di chiusura senza la "
|
"L'espressione delle coordinate ha una parentesi di chiusura senza la "
|
||||||
"relativa di apertura"
|
"relativa di apertura"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2455
|
#: ../src/ui/theme.c:2593
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate ha una parentesi di apertura senza la "
|
"L'espressione delle coordinate ha una parentesi di apertura senza la "
|
||||||
"relativa di chiusura"
|
"relativa di chiusura"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2466
|
#: ../src/ui/theme.c:2604
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
msgid "Coordinate expression doesn't seem to have any operators or operands"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'espressione delle coordinate non sembra avere né operatori né operandi"
|
"L'espressione delle coordinate non sembra avere né operatori né operandi"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:2676 ../src/ui/theme.c:2696 ../src/ui/theme.c:2716
|
#: ../src/ui/theme.c:2816 ../src/ui/theme.c:2836 ../src/ui/theme.c:2856
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Theme contained an expression that resulted in an error: %s\n"
|
msgid "Theme contained an expression that resulted in an error: %s\n"
|
||||||
msgstr "Il tema contiene un'espressione che ha come risultato un errore: %s\n"
|
msgstr "Il tema contiene un'espressione che ha come risultato un errore: %s\n"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:4410
|
#: ../src/ui/theme.c:4527
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
"<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be "
|
||||||
@@ -1355,7 +1413,7 @@ msgstr ""
|
|||||||
"È necessario specificare <button function=\"%s\" state=\"%s\" draw_ops="
|
"È necessario specificare <button function=\"%s\" state=\"%s\" draw_ops="
|
||||||
"\"whatever\"/> per questo stile di cornice"
|
"\"whatever\"/> per questo stile di cornice"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:4940 ../src/ui/theme.c:4965
|
#: ../src/ui/theme.c:5060 ../src/ui/theme.c:5085
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
"Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
|
||||||
@@ -1363,35 +1421,35 @@ msgstr ""
|
|||||||
"Risulta mancante <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style="
|
"Risulta mancante <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style="
|
||||||
"\"whatever\"/>"
|
"\"whatever\"/>"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5013
|
#: ../src/ui/theme.c:5133
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Failed to load theme \"%s\": %s\n"
|
msgid "Failed to load theme \"%s\": %s\n"
|
||||||
msgstr "Caricamento del tema «%s» non riuscito: %s\n"
|
msgstr "Caricamento del tema «%s» non riuscito: %s\n"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5149 ../src/ui/theme.c:5156 ../src/ui/theme.c:5163
|
#: ../src/ui/theme.c:5269 ../src/ui/theme.c:5276 ../src/ui/theme.c:5283
|
||||||
#: ../src/ui/theme.c:5170 ../src/ui/theme.c:5177
|
#: ../src/ui/theme.c:5290 ../src/ui/theme.c:5297
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "No <%s> set for theme \"%s\""
|
msgid "No <%s> set for theme \"%s\""
|
||||||
msgstr "Nessun <%s> impostato per il tema «%s»"
|
msgstr "Nessun <%s> impostato per il tema «%s»"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5185
|
#: ../src/ui/theme.c:5305
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
"No frame style set for window type \"%s\" in theme \"%s\", add a <window "
|
||||||
"type=\"%s\" style_set=\"whatever\"/> element"
|
"type=\"%s\" style_set=\"whatever\"/> element"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Nessuno stile di cornice impostato per il tipo di finestra «%s» nel tema "
|
"Nessuno stile di cornice impostato per il tipo di finestra «%s» nel tema «%s», "
|
||||||
"«%s», aggiungere un elemento <window type=\"%s\" style_set=\"whatever\"/>"
|
"aggiungere un elemento <window type=\"%s\" style_set=\"whatever\"/>"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5635 ../src/ui/theme.c:5697 ../src/ui/theme.c:5760
|
#: ../src/ui/theme.c:5744 ../src/ui/theme.c:5806 ../src/ui/theme.c:5869
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
"User-defined constants must begin with a capital letter; \"%s\" does not"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Le costanti definite dall'utente devono iniziare con una lettera maiuscola, "
|
"Le costanti definite dall'utente devono iniziare con una lettera maiuscola, «%"
|
||||||
"«%s» non lo fa"
|
"s» non lo fa"
|
||||||
|
|
||||||
#: ../src/ui/theme.c:5643 ../src/ui/theme.c:5705 ../src/ui/theme.c:5768
|
#: ../src/ui/theme.c:5752 ../src/ui/theme.c:5814 ../src/ui/theme.c:5877
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Constant \"%s\" has already been defined"
|
msgid "Constant \"%s\" has already been defined"
|
||||||
msgstr "La costante «%s» è già definita"
|
msgstr "La costante «%s» è già definita"
|
||||||
@@ -1427,8 +1485,7 @@ msgstr "Impossibile analizzare «%s» come un intero"
|
|||||||
#: ../src/ui/theme-parser.c:603 ../src/ui/theme-parser.c:658
|
#: ../src/ui/theme-parser.c:603 ../src/ui/theme-parser.c:658
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Did not understand trailing characters \"%s\" in string \"%s\""
|
msgid "Did not understand trailing characters \"%s\" in string \"%s\""
|
||||||
msgstr ""
|
msgstr "Non sono stati compresi i caratteri di chiusura «%s» nella stringa «%s»"
|
||||||
"Non sono stati compresi i caratteri di chiusura «%s» nella stringa «%s»"
|
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:613
|
#: ../src/ui/theme-parser.c:613
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1625,8 +1682,7 @@ msgstr "Funzione «%s» sconosciuta per il pulsante"
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "Button function \"%s\" does not exist in this version (%d, need %d)"
|
msgid "Button function \"%s\" does not exist in this version (%d, need %d)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"La funzione di pulsante «%s» non esiste in questa versione (%d, necessaria "
|
"La funzione di pulsante «%s» non esiste in questa versione (%d, necessaria %d)"
|
||||||
"%d)"
|
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:2994
|
#: ../src/ui/theme-parser.c:2994
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1724,8 +1780,8 @@ msgid ""
|
|||||||
"\"version\" attribute cannot be used in metacity-theme-1.xml or metacity-"
|
"\"version\" attribute cannot be used in metacity-theme-1.xml or metacity-"
|
||||||
"theme-2.xml"
|
"theme-2.xml"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"L'attributo «version» non può essere usato in metacity-theme-1.xml o "
|
"L'attributo «version» non può essere usato in metacity-theme-1.xml o metacity-"
|
||||||
"metacity-theme-2.xml"
|
"theme-2.xml"
|
||||||
|
|
||||||
#: ../src/ui/theme-parser.c:3530
|
#: ../src/ui/theme-parser.c:3530
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -1864,88 +1920,88 @@ msgstr "Questo è un messaggio d'esempio in una finestra di dialogo d'esempio"
|
|||||||
msgid "Fake menu item %d\n"
|
msgid "Fake menu item %d\n"
|
||||||
msgstr "Voce di menu finta n.%d\n"
|
msgstr "Voce di menu finta n.%d\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:370
|
#: ../src/ui/theme-viewer.c:371
|
||||||
msgid "Border-only window"
|
msgid "Border-only window"
|
||||||
msgstr "Finestra solo-bordo"
|
msgstr "Finestra solo-bordo"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:372
|
#: ../src/ui/theme-viewer.c:373
|
||||||
msgid "Bar"
|
msgid "Bar"
|
||||||
msgstr "Barra"
|
msgstr "Barra"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:389
|
#: ../src/ui/theme-viewer.c:390
|
||||||
msgid "Normal Application Window"
|
msgid "Normal Application Window"
|
||||||
msgstr "Finestra applicazione normale"
|
msgstr "Finestra applicazione normale"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:393
|
#: ../src/ui/theme-viewer.c:394
|
||||||
msgid "Dialog Box"
|
msgid "Dialog Box"
|
||||||
msgstr "Casella di dialogo"
|
msgstr "Casella di dialogo"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:397
|
#: ../src/ui/theme-viewer.c:398
|
||||||
msgid "Modal Dialog Box"
|
msgid "Modal Dialog Box"
|
||||||
msgstr "Casella di dialogo modale"
|
msgstr "Casella di dialogo modale"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:401
|
#: ../src/ui/theme-viewer.c:402
|
||||||
msgid "Utility Palette"
|
msgid "Utility Palette"
|
||||||
msgstr "Tavolozza di utilità"
|
msgstr "Tavolozza di utilità"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:405
|
#: ../src/ui/theme-viewer.c:406
|
||||||
msgid "Torn-off Menu"
|
msgid "Torn-off Menu"
|
||||||
msgstr "Menù staccato"
|
msgstr "Menù staccato"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:409
|
#: ../src/ui/theme-viewer.c:410
|
||||||
msgid "Border"
|
msgid "Border"
|
||||||
msgstr "Bordo"
|
msgstr "Bordo"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:413
|
#: ../src/ui/theme-viewer.c:414
|
||||||
msgid "Attached Modal Dialog"
|
msgid "Attached Modal Dialog"
|
||||||
msgstr "Dialogo modale attaccato"
|
msgstr "Dialogo modale attaccato"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:744
|
#: ../src/ui/theme-viewer.c:747
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Button layout test %d"
|
msgid "Button layout test %d"
|
||||||
msgstr "Test n.%d disposizione pulsanti"
|
msgstr "Test n.%d disposizione pulsanti"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:773
|
#: ../src/ui/theme-viewer.c:776
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%g milliseconds to draw one window frame"
|
msgid "%g milliseconds to draw one window frame"
|
||||||
msgstr "%g millisecondi per disegnare una cornice di finestra"
|
msgstr "%g millisecondi per disegnare una cornice di finestra"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:818
|
#: ../src/ui/theme-viewer.c:821
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
|
||||||
msgstr "Uso: metacity-theme-viewer [NOME_TEMA]\n"
|
msgstr "Uso: metacity-theme-viewer [NOME_TEMA]\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:825
|
#: ../src/ui/theme-viewer.c:828
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Error loading theme: %s\n"
|
msgid "Error loading theme: %s\n"
|
||||||
msgstr "Errore nel caricare il tema: %s\n"
|
msgstr "Errore nel caricare il tema: %s\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:831
|
#: ../src/ui/theme-viewer.c:834
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Loaded theme \"%s\" in %g seconds\n"
|
msgid "Loaded theme \"%s\" in %g seconds\n"
|
||||||
msgstr "Tema «%s» caricato in %g secondi\n"
|
msgstr "Tema «%s» caricato in %g secondi\n"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:875
|
#: ../src/ui/theme-viewer.c:878
|
||||||
msgid "Normal Title Font"
|
msgid "Normal Title Font"
|
||||||
msgstr "Carattere titolo normale"
|
msgstr "Carattere titolo normale"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:881
|
#: ../src/ui/theme-viewer.c:884
|
||||||
msgid "Small Title Font"
|
msgid "Small Title Font"
|
||||||
msgstr "Carattere titolo piccolo"
|
msgstr "Carattere titolo piccolo"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:887
|
#: ../src/ui/theme-viewer.c:890
|
||||||
msgid "Large Title Font"
|
msgid "Large Title Font"
|
||||||
msgstr "Carattere titolo grande"
|
msgstr "Carattere titolo grande"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:892
|
#: ../src/ui/theme-viewer.c:895
|
||||||
msgid "Button Layouts"
|
msgid "Button Layouts"
|
||||||
msgstr "Disposizione pulsanti"
|
msgstr "Disposizione pulsanti"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:897
|
#: ../src/ui/theme-viewer.c:900
|
||||||
msgid "Benchmark"
|
msgid "Benchmark"
|
||||||
msgstr "Prestazioni"
|
msgstr "Prestazioni"
|
||||||
|
|
||||||
#: ../src/ui/theme-viewer.c:949
|
#: ../src/ui/theme-viewer.c:952
|
||||||
msgid "Window Title Goes Here"
|
msgid "Window Title Goes Here"
|
||||||
msgstr "Qui va il titolo della finestra"
|
msgstr "Qui va il titolo della finestra"
|
||||||
|
|
||||||
@@ -2176,12 +2232,6 @@ msgstr ""
|
|||||||
#~ msgstr "Solleva automaticamente la finestra col focus"
|
#~ msgstr "Solleva automaticamente la finestra col focus"
|
||||||
|
|
||||||
# Mi sa che l'originale è sbagliato aperto un bug
|
# Mi sa che l'originale è sbagliato aperto un bug
|
||||||
#~| 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."
|
|
||||||
#~ msgid ""
|
#~ msgid ""
|
||||||
#~ "Clicking a window while holding down this modifier key will move the "
|
#~ "Clicking a window while holding down this modifier key will move the "
|
||||||
#~ "window (left click), resize the window (middle click), or show the window "
|
#~ "window (left click), resize the window (middle click), or show the window "
|
||||||
|
1179
po/pt_BR.po
1179
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1327
po/sr@latin.po
1327
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1100
po/zh_CN.po
1100
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1281
po/zh_HK.po
1281
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
1289
po/zh_TW.po
1289
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
15
src/50-mutter-windows.xml.in
Normal file
15
src/50-mutter-windows.xml.in
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<KeyListEntries schema="org.gnome.mutter.keybindings"
|
||||||
|
group="system"
|
||||||
|
_name="Windows"
|
||||||
|
wm_name="Mutter"
|
||||||
|
package="mutter">
|
||||||
|
|
||||||
|
<KeyListEntry name="toggle-tiled-left"
|
||||||
|
_description="View split on left"/>
|
||||||
|
|
||||||
|
<KeyListEntry name="toggle-tiled-right"
|
||||||
|
_description="View split on right"/>
|
||||||
|
|
||||||
|
</KeyListEntries>
|
||||||
|
|
@@ -27,8 +27,6 @@ INCLUDES= \
|
|||||||
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
|
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
|
||||||
|
|
||||||
mutter_built_sources = \
|
mutter_built_sources = \
|
||||||
mutter-marshal.h \
|
|
||||||
mutter-marshal.c \
|
|
||||||
mutter-enum-types.h \
|
mutter-enum-types.h \
|
||||||
mutter-enum-types.c
|
mutter-enum-types.c
|
||||||
|
|
||||||
@@ -54,7 +52,6 @@ libmutter_la_SOURCES = \
|
|||||||
compositor/meta-shadow-factory.c \
|
compositor/meta-shadow-factory.c \
|
||||||
compositor/meta-shadow-factory-private.h \
|
compositor/meta-shadow-factory-private.h \
|
||||||
compositor/meta-shaped-texture.c \
|
compositor/meta-shaped-texture.c \
|
||||||
compositor/meta-shaped-texture.h \
|
|
||||||
compositor/meta-texture-rectangle.c \
|
compositor/meta-texture-rectangle.c \
|
||||||
compositor/meta-texture-rectangle.h \
|
compositor/meta-texture-rectangle.h \
|
||||||
compositor/meta-texture-tower.c \
|
compositor/meta-texture-tower.c \
|
||||||
@@ -91,8 +88,6 @@ libmutter_la_SOURCES = \
|
|||||||
core/eventqueue.h \
|
core/eventqueue.h \
|
||||||
core/frame.c \
|
core/frame.c \
|
||||||
core/frame.h \
|
core/frame.h \
|
||||||
ui/gradient.c \
|
|
||||||
meta/gradient.h \
|
|
||||||
core/group-private.h \
|
core/group-private.h \
|
||||||
core/group-props.c \
|
core/group-props.c \
|
||||||
core/group-props.h \
|
core/group-props.h \
|
||||||
@@ -133,10 +128,8 @@ libmutter_la_SOURCES = \
|
|||||||
core/core.h \
|
core/core.h \
|
||||||
ui/ui.h \
|
ui/ui.h \
|
||||||
inlinepixbufs.h \
|
inlinepixbufs.h \
|
||||||
ui/fixedtip.c \
|
ui/uiframe.c \
|
||||||
ui/fixedtip.h \
|
ui/uiframe.h \
|
||||||
ui/frames.c \
|
|
||||||
ui/frames.h \
|
|
||||||
ui/menu.c \
|
ui/menu.c \
|
||||||
ui/menu.h \
|
ui/menu.h \
|
||||||
ui/metaaccellabel.c \
|
ui/metaaccellabel.c \
|
||||||
@@ -147,14 +140,7 @@ libmutter_la_SOURCES = \
|
|||||||
ui/tabpopup.h \
|
ui/tabpopup.h \
|
||||||
ui/tile-preview.c \
|
ui/tile-preview.c \
|
||||||
ui/tile-preview.h \
|
ui/tile-preview.h \
|
||||||
ui/theme-parser.c \
|
|
||||||
ui/theme.c \
|
|
||||||
meta/theme.h \
|
|
||||||
ui/theme-private.h \
|
|
||||||
ui/ui.c \
|
ui/ui.c \
|
||||||
core/all-keybindings.h \
|
|
||||||
meta/preview-widget.h \
|
|
||||||
ui/preview-widget.c \
|
|
||||||
$(mutter_built_sources)
|
$(mutter_built_sources)
|
||||||
|
|
||||||
libmutter_la_LDFLAGS = -no-undefined
|
libmutter_la_LDFLAGS = -no-undefined
|
||||||
@@ -169,17 +155,16 @@ libmutterinclude_base_headers = \
|
|||||||
meta/compositor.h \
|
meta/compositor.h \
|
||||||
meta/display.h \
|
meta/display.h \
|
||||||
meta/errors.h \
|
meta/errors.h \
|
||||||
meta/gradient.h \
|
|
||||||
meta/group.h \
|
meta/group.h \
|
||||||
meta/keybindings.h \
|
meta/keybindings.h \
|
||||||
meta/main.h \
|
meta/main.h \
|
||||||
meta/meta-background-actor.h \
|
meta/meta-background-actor.h \
|
||||||
meta/meta-plugin.h \
|
meta/meta-plugin.h \
|
||||||
|
meta/meta-shaped-texture.h \
|
||||||
meta/meta-shadow-factory.h \
|
meta/meta-shadow-factory.h \
|
||||||
meta/meta-window-actor.h \
|
meta/meta-window-actor.h \
|
||||||
meta/prefs.h \
|
meta/prefs.h \
|
||||||
meta/screen.h \
|
meta/screen.h \
|
||||||
meta/theme.h \
|
|
||||||
meta/types.h \
|
meta/types.h \
|
||||||
meta/util.h \
|
meta/util.h \
|
||||||
meta/window.h \
|
meta/window.h \
|
||||||
@@ -188,7 +173,6 @@ libmutterinclude_base_headers = \
|
|||||||
# Excluded from scanning for introspection but installed
|
# Excluded from scanning for introspection but installed
|
||||||
# atomnames.h: macros cause problems for scanning process
|
# atomnames.h: macros cause problems for scanning process
|
||||||
libmutterinclude_extra_headers = \
|
libmutterinclude_extra_headers = \
|
||||||
meta/preview-widget.h \
|
|
||||||
meta/atomnames.h
|
meta/atomnames.h
|
||||||
|
|
||||||
libmutterincludedir = $(includedir)/mutter/meta
|
libmutterincludedir = $(includedir)/mutter/meta
|
||||||
@@ -197,10 +181,7 @@ libmutterinclude_HEADERS = \
|
|||||||
$(libmutterinclude_base_headers) \
|
$(libmutterinclude_base_headers) \
|
||||||
$(libmutterinclude_extra_headers)
|
$(libmutterinclude_extra_headers)
|
||||||
|
|
||||||
mutter_theme_viewer_SOURCES= \
|
bin_PROGRAMS=mutter
|
||||||
ui/theme-viewer.c
|
|
||||||
|
|
||||||
bin_PROGRAMS=mutter mutter-theme-viewer
|
|
||||||
|
|
||||||
mutter_SOURCES = core/mutter.c
|
mutter_SOURCES = core/mutter.c
|
||||||
mutter_LDADD = $(MUTTER_LIBS) libmutter.la
|
mutter_LDADD = $(MUTTER_LIBS) libmutter.la
|
||||||
@@ -226,8 +207,8 @@ typelib_DATA = Meta-$(api_version).typelib
|
|||||||
INTROSPECTION_GIRS = Meta-$(api_version).gir
|
INTROSPECTION_GIRS = Meta-$(api_version).gir
|
||||||
|
|
||||||
Meta-$(api_version).gir: libmutter.la
|
Meta-$(api_version).gir: libmutter.la
|
||||||
@META_GIR@_INCLUDES = GObject-2.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
|
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
|
||||||
@META_GIR@_PACKAGES = clutter-1.0 gtk+-3.0
|
@META_GIR@_EXPORT_PACKAGES = libmutter
|
||||||
@META_GIR@_CFLAGS = $(INCLUDES)
|
@META_GIR@_CFLAGS = $(INCLUDES)
|
||||||
@META_GIR@_LIBS = libmutter.la
|
@META_GIR@_LIBS = libmutter.la
|
||||||
@META_GIR@_FILES = \
|
@META_GIR@_FILES = \
|
||||||
@@ -238,16 +219,12 @@ Meta-$(api_version).gir: libmutter.la
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
mutter_theme_viewer_LDADD= $(MUTTER_LIBS) libmutter.la
|
|
||||||
|
|
||||||
testboxes_SOURCES = core/testboxes.c
|
testboxes_SOURCES = core/testboxes.c
|
||||||
testgradient_SOURCES = ui/testgradient.c
|
|
||||||
testasyncgetprop_SOURCES = core/testasyncgetprop.c
|
testasyncgetprop_SOURCES = core/testasyncgetprop.c
|
||||||
|
|
||||||
noinst_PROGRAMS=testboxes testgradient testasyncgetprop
|
noinst_PROGRAMS=testboxes testasyncgetprop
|
||||||
|
|
||||||
testboxes_LDADD = $(MUTTER_LIBS) libmutter.la
|
testboxes_LDADD = $(MUTTER_LIBS) libmutter.la
|
||||||
testgradient_LDADD = $(MUTTER_LIBS) libmutter.la
|
|
||||||
testasyncgetprop_LDADD = $(MUTTER_LIBS) libmutter.la
|
testasyncgetprop_LDADD = $(MUTTER_LIBS) libmutter.la
|
||||||
|
|
||||||
@INTLTOOL_DESKTOP_RULE@
|
@INTLTOOL_DESKTOP_RULE@
|
||||||
@@ -262,20 +239,17 @@ wmproperties_in_files=mutter-wm.desktop.in
|
|||||||
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
|
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
|
||||||
wmproperties_DATA = $(wmproperties_files)
|
wmproperties_DATA = $(wmproperties_files)
|
||||||
|
|
||||||
schemadir = $(GCONF_SCHEMA_FILE_DIR)
|
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
|
||||||
schema_in_files = mutter.schemas.in
|
xml_in_files = \
|
||||||
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
50-mutter-windows.xml.in
|
||||||
|
xml_DATA = $(xml_in_files:.xml.in=.xml)
|
||||||
|
|
||||||
|
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml
|
||||||
@INTLTOOL_XML_NOMERGE_RULE@
|
@INTLTOOL_XML_NOMERGE_RULE@
|
||||||
|
@GSETTINGS_RULES@
|
||||||
|
|
||||||
@INTLTOOL_SCHEMAS_RULE@
|
convertdir = $(datadir)/GConf/gsettings
|
||||||
|
convert_DATA = mutter-schemas.convert
|
||||||
if GCONF_SCHEMAS_INSTALL
|
|
||||||
install-data-local:
|
|
||||||
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
|
|
||||||
else
|
|
||||||
install-data-local:
|
|
||||||
endif
|
|
||||||
|
|
||||||
IMAGES=stock_maximize.png stock_minimize.png stock_delete.png
|
IMAGES=stock_maximize.png stock_minimize.png stock_delete.png
|
||||||
VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
|
VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
|
||||||
@@ -287,7 +261,8 @@ CLEANFILES = \
|
|||||||
inlinepixbufs.h \
|
inlinepixbufs.h \
|
||||||
mutter.desktop \
|
mutter.desktop \
|
||||||
mutter-wm.desktop \
|
mutter-wm.desktop \
|
||||||
mutter.schemas \
|
org.gnome.mutter.gschema.xml \
|
||||||
|
$(xml_DATA) \
|
||||||
$(mutter_built_sources) \
|
$(mutter_built_sources) \
|
||||||
$(typelib_DATA) \
|
$(typelib_DATA) \
|
||||||
$(gir_DATA)
|
$(gir_DATA)
|
||||||
@@ -304,37 +279,18 @@ EXTRA_DIST=$(desktopfiles_files) \
|
|||||||
$(IMAGES) \
|
$(IMAGES) \
|
||||||
$(desktopfiles_in_files) \
|
$(desktopfiles_in_files) \
|
||||||
$(wmproperties_in_files) \
|
$(wmproperties_in_files) \
|
||||||
$(schema_in_files) \
|
$(xml_in_files) \
|
||||||
|
org.gnome.mutter.gschema.xml.in \
|
||||||
|
mutter-schemas.convert \
|
||||||
libmutter.pc.in \
|
libmutter.pc.in \
|
||||||
mutter-plugins.pc.in \
|
mutter-plugins.pc.in \
|
||||||
mutter-enum-types.h.in \
|
mutter-enum-types.h.in \
|
||||||
mutter-enum-types.c.in \
|
mutter-enum-types.c.in
|
||||||
mutter-marshal.list
|
|
||||||
|
|
||||||
BUILT_SOURCES += $(mutter_built_sources)
|
BUILT_SOURCES += $(mutter_built_sources)
|
||||||
MUTTER_STAMP_FILES = stamp-mutter-marshal.h stamp-mutter-enum-types.h
|
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
|
||||||
CLEANFILES += $(MUTTER_STAMP_FILES)
|
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
|
mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
|
||||||
@true
|
@true
|
||||||
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in
|
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in
|
||||||
|
@@ -55,9 +55,6 @@ struct _MetaCompScreen
|
|||||||
};
|
};
|
||||||
|
|
||||||
void meta_switch_workspace_completed (MetaScreen *screen);
|
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,
|
gboolean meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||||
MetaPlugin *plugin,
|
MetaPlugin *plugin,
|
||||||
|
@@ -279,6 +279,12 @@ do_set_stage_input_region (MetaScreen *screen,
|
|||||||
Window xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
Window xstage = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||||
|
|
||||||
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
XFixesSetWindowShapeRegion (xdpy, xstage, ShapeInput, 0, 0, region);
|
||||||
|
|
||||||
|
/* It's generally a good heuristic that when a crossing event is generated because
|
||||||
|
* we reshape the overlay, we don't want it to affect focus-follows-mouse focus -
|
||||||
|
* it's not the user doing something, it's the environment changing under the user.
|
||||||
|
*/
|
||||||
|
meta_display_add_ignored_crossing_serial (display, XNextRequest (xdpy));
|
||||||
XFixesSetWindowShapeRegion (xdpy, info->output, ShapeInput, 0, 0, region);
|
XFixesSetWindowShapeRegion (xdpy, info->output, ShapeInput, 0, 0, region);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -509,13 +515,15 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
|||||||
|
|
||||||
meta_screen_set_cm_selection (screen);
|
meta_screen_set_cm_selection (screen);
|
||||||
|
|
||||||
info->stage = clutter_stage_get_default ();
|
info->stage = clutter_stage_new ();
|
||||||
|
|
||||||
meta_screen_get_size (screen, &width, &height);
|
meta_screen_get_size (screen, &width, &height);
|
||||||
clutter_actor_set_size (info->stage, width, height);
|
clutter_actor_realize (info->stage);
|
||||||
|
|
||||||
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||||
|
|
||||||
|
XResizeWindow (xdisplay, xwin, width, height);
|
||||||
|
|
||||||
event_mask = FocusChangeMask |
|
event_mask = FocusChangeMask |
|
||||||
ExposureMask |
|
ExposureMask |
|
||||||
EnterWindowMask | LeaveWindowMask |
|
EnterWindowMask | LeaveWindowMask |
|
||||||
@@ -600,22 +608,30 @@ meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Shapes the cow so that the given window is exposed,
|
* Shapes the cow so that the given window is exposed,
|
||||||
* when xwin is None it clears the shape again
|
* when metaWindow is NULL it clears the shape again
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_shape_cow_for_window (MetaScreen *screen,
|
meta_shape_cow_for_window (MetaScreen *screen,
|
||||||
Window xwin)
|
MetaWindow *metaWindow)
|
||||||
{
|
{
|
||||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
Display *xdisplay = meta_display_get_xdisplay (meta_screen_get_display (screen));
|
Display *xdisplay = meta_display_get_xdisplay (meta_screen_get_display (screen));
|
||||||
|
|
||||||
if (xwin == None)
|
if (metaWindow == NULL)
|
||||||
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None);
|
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, None);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XserverRegion output_region;
|
XserverRegion output_region;
|
||||||
XRectangle screen_rect;
|
XRectangle screen_rect, window_bounds;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
MetaRectangle rect;
|
||||||
|
|
||||||
|
meta_window_get_outer_rect (metaWindow, &rect);
|
||||||
|
|
||||||
|
window_bounds.x = rect.x;
|
||||||
|
window_bounds.y = rect.y;
|
||||||
|
window_bounds.width = rect.width;
|
||||||
|
window_bounds.height = rect.height;
|
||||||
|
|
||||||
meta_screen_get_size (screen, &width, &height);
|
meta_screen_get_size (screen, &width, &height);
|
||||||
screen_rect.x = 0;
|
screen_rect.x = 0;
|
||||||
@@ -623,7 +639,8 @@ meta_shape_cow_for_window (MetaScreen *screen,
|
|||||||
screen_rect.width = width;
|
screen_rect.width = width;
|
||||||
screen_rect.height = height;
|
screen_rect.height = height;
|
||||||
|
|
||||||
output_region = XFixesCreateRegionFromWindow (xdisplay, xwin, WindowRegionBounding);
|
output_region = XFixesCreateRegion (xdisplay, &window_bounds, 1);
|
||||||
|
|
||||||
XFixesInvertRegion (xdisplay, output_region, &screen_rect, output_region);
|
XFixesInvertRegion (xdisplay, output_region, &screen_rect, output_region);
|
||||||
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, output_region);
|
XFixesSetWindowShapeRegion (xdisplay, info->output, ShapeBounding, 0, 0, output_region);
|
||||||
XFixesDestroyRegion (xdisplay, output_region);
|
XFixesDestroyRegion (xdisplay, output_region);
|
||||||
@@ -665,7 +682,7 @@ meta_compositor_remove_window (MetaCompositor *compositor,
|
|||||||
{
|
{
|
||||||
meta_window_actor_set_redirected (window_actor, TRUE);
|
meta_window_actor_set_redirected (window_actor, TRUE);
|
||||||
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
|
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
|
||||||
None);
|
NULL);
|
||||||
info->unredirected_window = NULL;
|
info->unredirected_window = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -854,29 +871,6 @@ meta_compositor_unmaximize_window (MetaCompositor *compositor,
|
|||||||
meta_window_actor_unmaximize (window_actor, old_rect, new_rect);
|
meta_window_actor_unmaximize (window_actor, old_rect, new_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
meta_compositor_update_workspace_geometry (MetaCompositor *compositor,
|
|
||||||
MetaWorkspace *workspace)
|
|
||||||
{
|
|
||||||
#if 0
|
|
||||||
/* FIXME -- should do away with this function in favour of MetaWorkspace
|
|
||||||
* signal.
|
|
||||||
*/
|
|
||||||
MetaScreen *screen = meta_workspace_get_screen (workspace);
|
|
||||||
MetaCompScreen *info;
|
|
||||||
MetaPluginManager *mgr;
|
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_update_workspace_geometry\n");
|
|
||||||
info = meta_screen_get_compositor_data (screen);
|
|
||||||
mgr = info->plugin_mgr;
|
|
||||||
|
|
||||||
if (!mgr || !workspace)
|
|
||||||
return;
|
|
||||||
|
|
||||||
meta_plugin_manager_update_workspace (mgr, workspace);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_compositor_switch_workspace (MetaCompositor *compositor,
|
meta_compositor_switch_workspace (MetaCompositor *compositor,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
@@ -1124,12 +1118,18 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
|||||||
guint width,
|
guint width,
|
||||||
guint height)
|
guint height)
|
||||||
{
|
{
|
||||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
|
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||||
|
Display *xdisplay;
|
||||||
|
Window xwin;
|
||||||
|
|
||||||
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
|
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
|
||||||
g_return_if_fail (info);
|
g_return_if_fail (info);
|
||||||
|
|
||||||
clutter_actor_set_size (info->stage, width, height);
|
xdisplay = meta_display_get_xdisplay (display);
|
||||||
|
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||||
|
|
||||||
|
XResizeWindow (xdisplay, xwin, width, height);
|
||||||
|
|
||||||
meta_background_actor_screen_size_changed (screen);
|
meta_background_actor_screen_size_changed (screen);
|
||||||
|
|
||||||
@@ -1160,13 +1160,13 @@ pre_paint_windows (MetaCompScreen *info)
|
|||||||
{
|
{
|
||||||
meta_window_actor_set_redirected (info->unredirected_window, TRUE);
|
meta_window_actor_set_redirected (info->unredirected_window, TRUE);
|
||||||
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
|
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (info->unredirected_window)),
|
||||||
None);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expected_unredirected_window != NULL)
|
if (expected_unredirected_window != NULL)
|
||||||
{
|
{
|
||||||
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (top_window)),
|
meta_shape_cow_for_window (meta_window_get_screen (meta_window_actor_get_meta_window (top_window)),
|
||||||
meta_window_actor_get_x_window (top_window));
|
meta_window_actor_get_meta_window (top_window));
|
||||||
meta_window_actor_set_redirected (top_window, FALSE);
|
meta_window_actor_set_redirected (top_window, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,6 +28,9 @@
|
|||||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||||
#include <cogl/cogl-texture-pixmap-x11.h>
|
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||||
|
|
||||||
|
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||||
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#include "cogl-utils.h"
|
#include "cogl-utils.h"
|
||||||
@@ -252,6 +255,8 @@ meta_background_actor_dispose (GObject *object)
|
|||||||
cogl_handle_unref (priv->material);
|
cogl_handle_unref (priv->material);
|
||||||
priv->material = COGL_INVALID_HANDLE;
|
priv->material = COGL_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (meta_background_actor_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -537,9 +542,11 @@ meta_background_actor_update (MetaScreen *screen)
|
|||||||
if (root_pixmap_id != None)
|
if (root_pixmap_id != None)
|
||||||
{
|
{
|
||||||
CoglHandle texture;
|
CoglHandle texture;
|
||||||
|
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
texture = cogl_texture_pixmap_x11_new (root_pixmap_id, FALSE);
|
texture = cogl_texture_pixmap_x11_new (ctx, root_pixmap_id, FALSE, &error);
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
if (texture != COGL_INVALID_HANDLE)
|
if (texture != COGL_INVALID_HANDLE)
|
||||||
@@ -550,6 +557,12 @@ meta_background_actor_update (MetaScreen *screen)
|
|||||||
background->have_pixmap = True;
|
background->have_pixmap = True;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_warning ("Failed to create background texture from pixmap: %s",
|
||||||
|
error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background->have_pixmap = False;
|
background->have_pixmap = False;
|
||||||
|
@@ -66,10 +66,6 @@ gboolean meta_plugin_manager_event_maximize (MetaPluginManager *mgr,
|
|||||||
gint target_y,
|
gint target_y,
|
||||||
gint target_width,
|
gint target_width,
|
||||||
gint target_height);
|
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,
|
gboolean meta_plugin_manager_switch_workspace (MetaPluginManager *mgr,
|
||||||
gint from,
|
gint from,
|
||||||
|
@@ -263,38 +263,6 @@ meta_plugin_get_info (MetaPlugin *plugin)
|
|||||||
return NULL;
|
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:
|
* _meta_plugin_effect_started:
|
||||||
* @plugin: the plugin
|
* @plugin: the plugin
|
||||||
@@ -315,7 +283,7 @@ meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
|
|||||||
{
|
{
|
||||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||||
|
|
||||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
MetaScreen *screen = priv->screen;
|
||||||
|
|
||||||
if (priv->running-- < 0)
|
if (priv->running-- < 0)
|
||||||
{
|
{
|
||||||
@@ -389,80 +357,6 @@ meta_plugin_destroy_completed (MetaPlugin *plugin,
|
|||||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_DESTROY);
|
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:
|
* meta_plugin_begin_modal:
|
||||||
* @plugin: a #MetaPlugin
|
* @plugin: a #MetaPlugin
|
||||||
@@ -502,7 +396,7 @@ meta_plugin_begin_modal (MetaPlugin *plugin,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_plugin_end_modal
|
* meta_plugin_end_modal:
|
||||||
* @plugin: a #MetaPlugin
|
* @plugin: a #MetaPlugin
|
||||||
* @timestamp: the time used for releasing grabs
|
* @timestamp: the time used for releasing grabs
|
||||||
*
|
*
|
||||||
@@ -521,16 +415,6 @@ meta_plugin_end_modal (MetaPlugin *plugin,
|
|||||||
meta_end_modal_for_plugin (priv->screen, plugin, timestamp);
|
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:
|
* meta_plugin_get_screen:
|
||||||
* @plugin: a #MetaPlugin
|
* @plugin: a #MetaPlugin
|
||||||
|
@@ -360,7 +360,7 @@ meta_shadow_paint (MetaShadow *shadow,
|
|||||||
* @window_height: actual height 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
|
* Computes the bounds of the pixels that will be affected by
|
||||||
* meta_shadow_paints()
|
* meta_shadow_paint()
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_shadow_get_bounds (MetaShadow *shadow,
|
meta_shadow_get_bounds (MetaShadow *shadow,
|
||||||
@@ -442,8 +442,7 @@ meta_shadow_factory_class_init (MetaShadowFactoryClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,32 +25,37 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "meta-shaped-texture.h"
|
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||||
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||||
|
|
||||||
|
#include <meta/meta-shaped-texture.h>
|
||||||
#include "meta-texture-tower.h"
|
#include "meta-texture-tower.h"
|
||||||
#include "meta-texture-rectangle.h"
|
|
||||||
|
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
#include <string.h>
|
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||||
|
#include <gdk/gdk.h> /* for gdk_rectangle_intersect() */
|
||||||
|
|
||||||
static void meta_shaped_texture_dispose (GObject *object);
|
static void meta_shaped_texture_dispose (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_paint (ClutterActor *actor);
|
||||||
static void meta_shaped_texture_pick (ClutterActor *actor,
|
static void meta_shaped_texture_pick (ClutterActor *actor,
|
||||||
const ClutterColor *color);
|
const ClutterColor *color);
|
||||||
|
|
||||||
static void meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
static void meta_shaped_texture_get_preferred_width (ClutterActor *self,
|
||||||
int x,
|
gfloat for_height,
|
||||||
int y,
|
gfloat *min_width_p,
|
||||||
int width,
|
gfloat *natural_width_p);
|
||||||
int height);
|
|
||||||
|
|
||||||
static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex);
|
static void meta_shaped_texture_get_preferred_height (ClutterActor *self,
|
||||||
|
gfloat for_width,
|
||||||
|
gfloat *min_height_p,
|
||||||
|
gfloat *natural_height_p);
|
||||||
|
|
||||||
|
static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume);
|
||||||
|
|
||||||
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||||
CLUTTER_X11_TYPE_TEXTURE_PIXMAP);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
|
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
|
||||||
@@ -59,19 +64,15 @@ G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
|||||||
struct _MetaShapedTexturePrivate
|
struct _MetaShapedTexturePrivate
|
||||||
{
|
{
|
||||||
MetaTextureTower *paint_tower;
|
MetaTextureTower *paint_tower;
|
||||||
|
Pixmap pixmap;
|
||||||
|
CoglHandle texture;
|
||||||
CoglHandle mask_texture;
|
CoglHandle mask_texture;
|
||||||
CoglHandle material;
|
CoglHandle material;
|
||||||
CoglHandle material_unshaped;
|
CoglHandle material_unshaped;
|
||||||
|
|
||||||
cairo_region_t *clip_region;
|
cairo_region_t *clip_region;
|
||||||
cairo_region_t *shape_region;
|
|
||||||
|
|
||||||
cairo_region_t *overlay_region;
|
guint tex_width, tex_height;
|
||||||
cairo_path_t *overlay_path;
|
|
||||||
|
|
||||||
cairo_region_t *visible_pixels_region;
|
|
||||||
|
|
||||||
guint mask_width, mask_height;
|
|
||||||
|
|
||||||
guint create_mipmaps : 1;
|
guint create_mipmaps : 1;
|
||||||
};
|
};
|
||||||
@@ -81,15 +82,14 @@ meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *gobject_class = (GObjectClass *) klass;
|
GObjectClass *gobject_class = (GObjectClass *) klass;
|
||||||
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
|
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
|
||||||
ClutterX11TexturePixmapClass *x11_texture_class = (ClutterX11TexturePixmapClass *) klass;
|
|
||||||
|
|
||||||
gobject_class->dispose = meta_shaped_texture_dispose;
|
gobject_class->dispose = meta_shaped_texture_dispose;
|
||||||
gobject_class->notify = meta_shaped_texture_notify;
|
|
||||||
|
|
||||||
|
actor_class->get_preferred_width = meta_shaped_texture_get_preferred_width;
|
||||||
|
actor_class->get_preferred_height = meta_shaped_texture_get_preferred_height;
|
||||||
actor_class->paint = meta_shaped_texture_paint;
|
actor_class->paint = meta_shaped_texture_paint;
|
||||||
actor_class->pick = meta_shaped_texture_pick;
|
actor_class->pick = meta_shaped_texture_pick;
|
||||||
|
actor_class->get_paint_volume = meta_shaped_texture_get_paint_volume;
|
||||||
x11_texture_class->update_area = meta_shaped_texture_update_area;
|
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate));
|
g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate));
|
||||||
}
|
}
|
||||||
@@ -101,11 +101,8 @@ meta_shaped_texture_init (MetaShapedTexture *self)
|
|||||||
|
|
||||||
priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self);
|
priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self);
|
||||||
|
|
||||||
priv->shape_region = NULL;
|
|
||||||
priv->overlay_path = NULL;
|
|
||||||
priv->overlay_region = NULL;
|
|
||||||
priv->visible_pixels_region = NULL;
|
|
||||||
priv->paint_tower = meta_texture_tower_new ();
|
priv->paint_tower = meta_texture_tower_new ();
|
||||||
|
priv->texture = COGL_INVALID_HANDLE;
|
||||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||||
priv->create_mipmaps = TRUE;
|
priv->create_mipmaps = TRUE;
|
||||||
}
|
}
|
||||||
@@ -120,8 +117,6 @@ meta_shaped_texture_dispose (GObject *object)
|
|||||||
meta_texture_tower_free (priv->paint_tower);
|
meta_texture_tower_free (priv->paint_tower);
|
||||||
priv->paint_tower = NULL;
|
priv->paint_tower = NULL;
|
||||||
|
|
||||||
meta_shaped_texture_dirty_mask (self);
|
|
||||||
|
|
||||||
if (priv->material != COGL_INVALID_HANDLE)
|
if (priv->material != COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
cogl_handle_unref (priv->material);
|
cogl_handle_unref (priv->material);
|
||||||
@@ -132,287 +127,17 @@ meta_shaped_texture_dispose (GObject *object)
|
|||||||
cogl_handle_unref (priv->material_unshaped);
|
cogl_handle_unref (priv->material_unshaped);
|
||||||
priv->material_unshaped = COGL_INVALID_HANDLE;
|
priv->material_unshaped = COGL_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
if (priv->texture != COGL_INVALID_HANDLE)
|
||||||
|
{
|
||||||
|
cogl_handle_unref (priv->texture);
|
||||||
|
priv->texture = COGL_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
meta_shaped_texture_set_shape_region (self, NULL);
|
|
||||||
meta_shaped_texture_set_clip_region (self, NULL);
|
meta_shaped_texture_set_clip_region (self, NULL);
|
||||||
meta_shaped_texture_set_overlay_path (self, NULL, NULL);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
|
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (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->visible_pixels_region != NULL)
|
|
||||||
{
|
|
||||||
cairo_region_destroy (priv->visible_pixels_region);
|
|
||||||
priv->visible_pixels_region = NULL;
|
|
||||||
|
|
||||||
if (priv->mask_texture == COGL_INVALID_HANDLE)
|
|
||||||
{
|
|
||||||
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
|
|
||||||
scan_visible_region (MetaShapedTexture *stex,
|
|
||||||
guchar *mask_data,
|
|
||||||
int stride)
|
|
||||||
{
|
|
||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
|
||||||
cairo_region_t *visible_pixels_region;
|
|
||||||
cairo_region_t *overlay_region;
|
|
||||||
int i, n_rects;
|
|
||||||
|
|
||||||
/* The visible pixels region contains all pixel values above 0.
|
|
||||||
* This is somewhat complicated when there's an overlay: we
|
|
||||||
* need to scan all regions potentially modified by it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (priv->visible_pixels_region)
|
|
||||||
cairo_region_destroy (priv->visible_pixels_region);
|
|
||||||
|
|
||||||
priv->visible_pixels_region = cairo_region_copy (priv->shape_region);
|
|
||||||
|
|
||||||
visible_pixels_region = priv->visible_pixels_region;
|
|
||||||
overlay_region = priv->overlay_region;
|
|
||||||
|
|
||||||
/* With no overlay region, the visible region is defined
|
|
||||||
* by the mask region, so we don't need to scan anything. */
|
|
||||||
if (overlay_region == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Subtract all the rectangles in the overlay region so that we can
|
|
||||||
* scan all the pixels potentially added by the overlay path. */
|
|
||||||
cairo_region_subtract (visible_pixels_region, overlay_region);
|
|
||||||
|
|
||||||
n_rects = cairo_region_num_rectangles (overlay_region);
|
|
||||||
|
|
||||||
for (i = 0; i < n_rects; i++)
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
cairo_rectangle_int_t rect;
|
|
||||||
|
|
||||||
cairo_region_get_rectangle (overlay_region, i, &rect);
|
|
||||||
|
|
||||||
for (y = rect.y; y < (rect.y + rect.height); y++)
|
|
||||||
{
|
|
||||||
for (x = rect.x; x < (rect.x + rect.width); x++)
|
|
||||||
{
|
|
||||||
int w = x;
|
|
||||||
while (mask_data[y * stride + w] > 0 && w < (rect.x + rect.width))
|
|
||||||
w++;
|
|
||||||
|
|
||||||
if (w > 0)
|
|
||||||
{
|
|
||||||
cairo_rectangle_int_t tmp;
|
|
||||||
tmp.x = x;
|
|
||||||
tmp.y = y;
|
|
||||||
tmp.width = w - x;
|
|
||||||
tmp.height = 1;
|
|
||||||
cairo_region_union_rectangle (visible_pixels_region, &tmp);
|
|
||||||
x = w;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
install_overlay_path (MetaShapedTexture *stex,
|
|
||||||
guchar *mask_data,
|
|
||||||
int tex_width,
|
|
||||||
int tex_height,
|
|
||||||
int stride)
|
|
||||||
{
|
|
||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
|
||||||
int i, n_rects;
|
|
||||||
cairo_t *cr;
|
|
||||||
cairo_rectangle_int_t rect;
|
|
||||||
cairo_surface_t *surface;
|
|
||||||
|
|
||||||
if (priv->overlay_region == NULL)
|
|
||||||
return;
|
|
||||||
|
|
||||||
surface = cairo_image_surface_create_for_data (mask_data,
|
|
||||||
CAIRO_FORMAT_A8,
|
|
||||||
tex_width,
|
|
||||||
tex_height,
|
|
||||||
stride);
|
|
||||||
|
|
||||||
cr = cairo_create (surface);
|
|
||||||
cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR);
|
|
||||||
|
|
||||||
n_rects = cairo_region_num_rectangles (priv->overlay_region);
|
|
||||||
for (i = 0; i < n_rects; i++)
|
|
||||||
{
|
|
||||||
cairo_region_get_rectangle (priv->overlay_region, i, &rect);
|
|
||||||
cairo_rectangle (cr, rect.x, rect.y, rect.width, rect.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
cairo_fill_preserve (cr);
|
|
||||||
if (priv->overlay_path == NULL)
|
|
||||||
{
|
|
||||||
/* If we have an overlay region but not an overlay path, then we
|
|
||||||
* just need to clear the rectangles in the overlay region. */
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
cairo_clip (cr);
|
|
||||||
|
|
||||||
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
|
|
||||||
cairo_set_source_rgba (cr, 1, 1, 1, 1);
|
|
||||||
|
|
||||||
cairo_append_path (cr, priv->overlay_path);
|
|
||||||
cairo_fill (cr);
|
|
||||||
|
|
||||||
out:
|
|
||||||
cairo_destroy (cr);
|
|
||||||
cairo_surface_destroy (surface);
|
|
||||||
}
|
|
||||||
|
|
||||||
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->visible_pixels_region == NULL)
|
|
||||||
{
|
|
||||||
guchar *mask_data;
|
|
||||||
int i;
|
|
||||||
int n_rects;
|
|
||||||
int stride;
|
|
||||||
GLenum paint_gl_target;
|
|
||||||
|
|
||||||
/* If we have no shape region and no (or an empty) overlay region, we
|
|
||||||
* don't need to create a full mask texture, so quit early. */
|
|
||||||
if (priv->shape_region == NULL &&
|
|
||||||
(priv->overlay_region == NULL ||
|
|
||||||
cairo_region_num_rectangles (priv->overlay_region) == 0))
|
|
||||||
{
|
|
||||||
/* With no mask, the visible region is just
|
|
||||||
* {0, 0, tex_width, tex_height}. */
|
|
||||||
cairo_rectangle_int_t rect = { 0, 0, tex_width, tex_height };
|
|
||||||
priv->visible_pixels_region = cairo_region_create_rectangle (&rect);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
stride = cairo_format_stride_for_width (CAIRO_FORMAT_A8, tex_width);
|
|
||||||
|
|
||||||
/* Create data for an empty image */
|
|
||||||
mask_data = g_malloc0 (stride * tex_height);
|
|
||||||
|
|
||||||
n_rects = cairo_region_num_rectangles (priv->shape_region);
|
|
||||||
|
|
||||||
/* Fill in each rectangle. */
|
|
||||||
for (i = 0; i < n_rects; i ++)
|
|
||||||
{
|
|
||||||
cairo_rectangle_int_t rect;
|
|
||||||
cairo_region_get_rectangle (priv->shape_region, i, &rect);
|
|
||||||
|
|
||||||
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 * stride + x1;
|
|
||||||
y1 < y2;
|
|
||||||
y1++, p += stride)
|
|
||||||
memset (p, 255, x2 - x1);
|
|
||||||
}
|
|
||||||
|
|
||||||
install_overlay_path (stex, mask_data, tex_width, tex_height, stride);
|
|
||||||
scan_visible_region (stex, mask_data, stride);
|
|
||||||
|
|
||||||
cogl_texture_get_gl_texture (paint_tex, NULL, &paint_gl_target);
|
|
||||||
|
|
||||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
|
||||||
if (paint_gl_target == GL_TEXTURE_RECTANGLE_ARB)
|
|
||||||
{
|
|
||||||
priv->mask_texture
|
|
||||||
= meta_texture_rectangle_new (tex_width, tex_height,
|
|
||||||
0, /* flags */
|
|
||||||
/* data format */
|
|
||||||
COGL_PIXEL_FORMAT_A_8,
|
|
||||||
/* internal GL format */
|
|
||||||
GL_ALPHA,
|
|
||||||
/* internal cogl format */
|
|
||||||
COGL_PIXEL_FORMAT_A_8,
|
|
||||||
/* rowstride */
|
|
||||||
stride,
|
|
||||||
mask_data);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
|
||||||
priv->mask_texture = cogl_texture_new_from_data (tex_width, tex_height,
|
|
||||||
COGL_TEXTURE_NONE,
|
|
||||||
COGL_PIXEL_FORMAT_A_8,
|
|
||||||
COGL_PIXEL_FORMAT_ANY,
|
|
||||||
stride,
|
|
||||||
mask_data);
|
|
||||||
|
|
||||||
g_free (mask_data);
|
|
||||||
|
|
||||||
priv->mask_width = tex_width;
|
|
||||||
priv->mask_height = tex_height;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_shaped_texture_paint (ClutterActor *actor)
|
meta_shaped_texture_paint (ClutterActor *actor)
|
||||||
{
|
{
|
||||||
@@ -451,20 +176,20 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
if (priv->create_mipmaps)
|
if (priv->create_mipmaps)
|
||||||
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
|
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
|
||||||
else
|
else
|
||||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
paint_tex = priv->texture;
|
||||||
|
|
||||||
if (paint_tex == COGL_INVALID_HANDLE)
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tex_width = cogl_texture_get_width (paint_tex);
|
tex_width = priv->tex_width;
|
||||||
tex_height = cogl_texture_get_height (paint_tex);
|
tex_height = priv->tex_height;
|
||||||
|
|
||||||
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (priv->shape_region == NULL)
|
if (priv->mask_texture == COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
/* No region means an unclipped shape. Use a single-layer texture. */
|
/* Use a single-layer texture if we don't have a mask. */
|
||||||
|
|
||||||
if (priv->material_unshaped == COGL_INVALID_HANDLE)
|
if (priv->material_unshaped == COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
@@ -477,8 +202,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_shaped_texture_ensure_mask (stex);
|
|
||||||
|
|
||||||
if (priv->material == COGL_INVALID_HANDLE)
|
if (priv->material == COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
if (G_UNLIKELY (material_template == COGL_INVALID_HANDLE))
|
if (G_UNLIKELY (material_template == COGL_INVALID_HANDLE))
|
||||||
@@ -512,6 +235,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
{
|
{
|
||||||
int n_rects;
|
int n_rects;
|
||||||
int i;
|
int i;
|
||||||
|
cairo_rectangle_int_t tex_rect = { 0, 0, tex_width, tex_height };
|
||||||
|
|
||||||
/* Limit to how many separate rectangles we'll draw; beyond this just
|
/* Limit to how many separate rectangles we'll draw; beyond this just
|
||||||
* fall back and draw the whole thing */
|
* fall back and draw the whole thing */
|
||||||
@@ -529,6 +253,9 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
|
|
||||||
cairo_region_get_rectangle (priv->clip_region, i, &rect);
|
cairo_region_get_rectangle (priv->clip_region, i, &rect);
|
||||||
|
|
||||||
|
if (!gdk_rectangle_intersect (&tex_rect, &rect, &rect))
|
||||||
|
continue;
|
||||||
|
|
||||||
x1 = rect.x;
|
x1 = rect.x;
|
||||||
y1 = rect.y;
|
y1 = rect.y;
|
||||||
x2 = rect.x + rect.width;
|
x2 = rect.x + rect.width;
|
||||||
@@ -565,7 +292,7 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
|||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
MetaShapedTexturePrivate *priv = stex->priv;
|
||||||
|
|
||||||
/* If there is no region then use the regular pick */
|
/* If there is no region then use the regular pick */
|
||||||
if (priv->shape_region == NULL)
|
if (priv->mask_texture == COGL_INVALID_HANDLE)
|
||||||
CLUTTER_ACTOR_CLASS (meta_shaped_texture_parent_class)
|
CLUTTER_ACTOR_CLASS (meta_shaped_texture_parent_class)
|
||||||
->pick (actor, color);
|
->pick (actor, color);
|
||||||
else if (clutter_actor_should_pick_paint (actor))
|
else if (clutter_actor_should_pick_paint (actor))
|
||||||
@@ -574,7 +301,7 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
|||||||
ClutterActorBox alloc;
|
ClutterActorBox alloc;
|
||||||
guint tex_width, tex_height;
|
guint tex_width, tex_height;
|
||||||
|
|
||||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
paint_tex = priv->texture;
|
||||||
|
|
||||||
if (paint_tex == COGL_INVALID_HANDLE)
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
@@ -585,8 +312,6 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
|||||||
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_shaped_texture_ensure_mask (stex);
|
|
||||||
|
|
||||||
cogl_set_source_color4ub (color->red, color->green, color->blue,
|
cogl_set_source_color4ub (color->red, color->green, color->blue,
|
||||||
color->alpha);
|
color->alpha);
|
||||||
|
|
||||||
@@ -602,19 +327,48 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
meta_shaped_texture_get_preferred_width (ClutterActor *self,
|
||||||
int x,
|
gfloat for_height,
|
||||||
int y,
|
gfloat *min_width_p,
|
||||||
int width,
|
gfloat *natural_width_p)
|
||||||
int height)
|
|
||||||
{
|
{
|
||||||
MetaShapedTexture *stex = (MetaShapedTexture *) texture;
|
MetaShapedTexturePrivate *priv;
|
||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
|
||||||
|
|
||||||
CLUTTER_X11_TEXTURE_PIXMAP_CLASS (meta_shaped_texture_parent_class)->update_area (texture,
|
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
|
||||||
x, y, width, height);
|
|
||||||
|
|
||||||
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
|
priv = META_SHAPED_TEXTURE (self)->priv;
|
||||||
|
|
||||||
|
if (min_width_p)
|
||||||
|
*min_width_p = 0;
|
||||||
|
|
||||||
|
if (natural_width_p)
|
||||||
|
*natural_width_p = priv->tex_width;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_shaped_texture_get_preferred_height (ClutterActor *self,
|
||||||
|
gfloat for_width,
|
||||||
|
gfloat *min_height_p,
|
||||||
|
gfloat *natural_height_p)
|
||||||
|
{
|
||||||
|
MetaShapedTexturePrivate *priv;
|
||||||
|
|
||||||
|
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
|
||||||
|
|
||||||
|
priv = META_SHAPED_TEXTURE (self)->priv;
|
||||||
|
|
||||||
|
if (min_height_p)
|
||||||
|
*min_height_p = 0;
|
||||||
|
|
||||||
|
if (natural_height_p)
|
||||||
|
*natural_height_p = priv->tex_height;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
meta_shaped_texture_get_paint_volume (ClutterActor *self,
|
||||||
|
ClutterPaintVolume *volume)
|
||||||
|
{
|
||||||
|
return clutter_paint_volume_set_from_allocation (volume, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
@@ -640,34 +394,16 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
|||||||
if (create_mipmaps != priv->create_mipmaps)
|
if (create_mipmaps != priv->create_mipmaps)
|
||||||
{
|
{
|
||||||
CoglHandle base_texture;
|
CoglHandle base_texture;
|
||||||
|
|
||||||
priv->create_mipmaps = create_mipmaps;
|
priv->create_mipmaps = create_mipmaps;
|
||||||
|
|
||||||
base_texture = create_mipmaps ?
|
base_texture = create_mipmaps ?
|
||||||
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)) : COGL_INVALID_HANDLE;
|
priv->texture : COGL_INVALID_HANDLE;
|
||||||
|
|
||||||
meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
|
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
|
void
|
||||||
meta_shaped_texture_clear (MetaShapedTexture *stex)
|
meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
|
||||||
|
CoglHandle mask_texture)
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv;
|
MetaShapedTexturePrivate *priv;
|
||||||
|
|
||||||
@@ -675,73 +411,98 @@ meta_shaped_texture_clear (MetaShapedTexture *stex)
|
|||||||
|
|
||||||
priv = stex->priv;
|
priv = stex->priv;
|
||||||
|
|
||||||
meta_texture_tower_set_base_texture (priv->paint_tower, COGL_INVALID_HANDLE);
|
if (priv->mask_texture != COGL_INVALID_HANDLE)
|
||||||
|
{
|
||||||
|
cogl_handle_unref (priv->mask_texture);
|
||||||
|
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
if (priv->material != COGL_INVALID_HANDLE)
|
if (mask_texture != COGL_INVALID_HANDLE)
|
||||||
cogl_material_set_layer (priv->material, 0, COGL_INVALID_HANDLE);
|
{
|
||||||
|
priv->mask_texture = mask_texture;
|
||||||
|
cogl_handle_ref (priv->mask_texture);
|
||||||
|
}
|
||||||
|
|
||||||
if (priv->material_unshaped != COGL_INVALID_HANDLE)
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||||
cogl_material_set_layer (priv->material_unshaped, 0, COGL_INVALID_HANDLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||||
cairo_region_t *region)
|
int x,
|
||||||
|
int y,
|
||||||
|
int width,
|
||||||
|
int height)
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv;
|
MetaShapedTexturePrivate *priv;
|
||||||
|
const cairo_rectangle_int_t clip = { x, y, width, height };
|
||||||
|
|
||||||
|
priv = stex->priv;
|
||||||
|
|
||||||
|
if (priv->texture == COGL_INVALID_HANDLE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
cogl_texture_pixmap_x11_update_area (priv->texture, x, y, width, height);
|
||||||
|
|
||||||
|
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
|
||||||
|
|
||||||
|
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_cogl_texture (MetaShapedTexture *stex,
|
||||||
|
CoglHandle cogl_tex)
|
||||||
|
{
|
||||||
|
MetaShapedTexturePrivate *priv;
|
||||||
|
guint width, height;
|
||||||
|
|
||||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||||
|
|
||||||
priv = stex->priv;
|
priv = stex->priv;
|
||||||
|
|
||||||
if (priv->shape_region != NULL)
|
if (priv->texture != COGL_INVALID_HANDLE)
|
||||||
|
cogl_handle_unref (priv->texture);
|
||||||
|
|
||||||
|
priv->texture = cogl_tex;
|
||||||
|
|
||||||
|
if (priv->material != COGL_INVALID_HANDLE)
|
||||||
|
cogl_material_set_layer (priv->material, 0, cogl_tex);
|
||||||
|
|
||||||
|
if (priv->material_unshaped != COGL_INVALID_HANDLE)
|
||||||
|
cogl_material_set_layer (priv->material_unshaped, 0, cogl_tex);
|
||||||
|
|
||||||
|
if (cogl_tex != COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
cairo_region_destroy (priv->shape_region);
|
width = cogl_texture_get_width (cogl_tex);
|
||||||
priv->shape_region = NULL;
|
height = cogl_texture_get_height (cogl_tex);
|
||||||
|
|
||||||
|
if (width != priv->tex_width ||
|
||||||
|
height != priv->tex_height)
|
||||||
|
{
|
||||||
|
priv->tex_width = width;
|
||||||
|
priv->tex_height = height;
|
||||||
|
|
||||||
|
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* size changed to 0 going to an invalid handle */
|
||||||
|
priv->tex_width = 0;
|
||||||
|
priv->tex_height = 0;
|
||||||
|
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (region != NULL)
|
|
||||||
{
|
|
||||||
cairo_region_reference (region);
|
|
||||||
priv->shape_region = region;
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_shaped_texture_dirty_mask (stex);
|
|
||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_shaped_texture_get_visible_pixels_region:
|
* meta_shaped_texture_set_pixmap:
|
||||||
* @stex: a #MetaShapedTexture
|
* @stex: The #MetaShapedTexture
|
||||||
*
|
* @pixmap: The pixmap you want the stex to assume
|
||||||
* Return a region enclosing only visible pixels: those with
|
|
||||||
* alpha values above 0.
|
|
||||||
*
|
|
||||||
* Returns: a #cairo_region_t
|
|
||||||
*/
|
|
||||||
cairo_region_t *
|
|
||||||
meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex)
|
|
||||||
{
|
|
||||||
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
|
|
||||||
|
|
||||||
meta_shaped_texture_ensure_mask (stex);
|
|
||||||
return stex->priv->visible_pixels_region;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* meta_shaped_texture_set_overlay_path:
|
|
||||||
* @stex: a #MetaShapedTexture
|
|
||||||
* @overlay_region: A region containing the parts of the mask to overlay.
|
|
||||||
* All rectangles in this region are wiped clear to full transparency,
|
|
||||||
* and the overlay path is clipped to this region.
|
|
||||||
* @overlay_path (transfer full): This path will be painted onto the mask
|
|
||||||
* texture with a fully opaque source. Due to the lack of refcounting
|
|
||||||
* in #cairo_path_t, ownership of the path is assumed.
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
|
||||||
cairo_region_t *overlay_region,
|
Pixmap pixmap)
|
||||||
cairo_path_t *overlay_path)
|
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv;
|
MetaShapedTexturePrivate *priv;
|
||||||
|
|
||||||
@@ -749,33 +510,42 @@ meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
|||||||
|
|
||||||
priv = stex->priv;
|
priv = stex->priv;
|
||||||
|
|
||||||
if (priv->overlay_region != NULL)
|
if (priv->pixmap == pixmap)
|
||||||
|
return;
|
||||||
|
|
||||||
|
priv->pixmap = pixmap;
|
||||||
|
|
||||||
|
if (pixmap != None)
|
||||||
{
|
{
|
||||||
cairo_region_destroy (priv->overlay_region);
|
CoglContext *ctx =
|
||||||
priv->overlay_region = NULL;
|
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
|
set_cogl_texture (stex, cogl_texture_pixmap_x11_new (ctx, pixmap, FALSE, NULL));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
set_cogl_texture (stex, COGL_INVALID_HANDLE);
|
||||||
|
|
||||||
if (priv->overlay_path != NULL)
|
if (priv->create_mipmaps)
|
||||||
{
|
meta_texture_tower_set_base_texture (priv->paint_tower, priv->texture);
|
||||||
cairo_path_destroy (priv->overlay_path);
|
}
|
||||||
priv->overlay_path = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
cairo_region_reference (overlay_region);
|
/**
|
||||||
priv->overlay_region = overlay_region;
|
* meta_shaped_texture_get_texture:
|
||||||
|
* @stex: The #MetaShapedTexture
|
||||||
/* cairo_path_t does not have refcounting. */
|
*
|
||||||
priv->overlay_path = overlay_path;
|
* Returns: (transfer none): the unshaped texture
|
||||||
|
*/
|
||||||
meta_shaped_texture_dirty_mask (stex);
|
CoglHandle
|
||||||
|
meta_shaped_texture_get_texture (MetaShapedTexture *stex)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), COGL_INVALID_HANDLE);
|
||||||
|
return stex->priv->texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_shaped_texture_set_clip_region:
|
* meta_shaped_texture_set_clip_region:
|
||||||
* @frame: a #TidyTextureframe
|
* @stex: a #MetaShapedTexture
|
||||||
* @clip_region: (transfer full): the region of the texture that
|
* @clip_region: (transfer full): the region of the texture that
|
||||||
* is visible and should be painted. OWNERSHIP IS ASSUMED BY
|
* is visible and should be painted.
|
||||||
* THE FUNCTION (for efficiency to avoid a copy.)
|
|
||||||
*
|
*
|
||||||
* Provides a hint to the texture about what areas of the texture
|
* Provides a hint to the texture about what areas of the texture
|
||||||
* are not completely obscured and thus need to be painted. This
|
* are not completely obscured and thus need to be painted. This
|
||||||
@@ -801,5 +571,106 @@ meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
|||||||
priv->clip_region = NULL;
|
priv->clip_region = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->clip_region = clip_region;
|
if (clip_region)
|
||||||
|
priv->clip_region = cairo_region_copy (clip_region);
|
||||||
|
else
|
||||||
|
priv->clip_region = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_shaped_texture_get_image:
|
||||||
|
* @stex: A #MetaShapedTexture
|
||||||
|
* @clip: A clipping rectangle, to help prevent extra processing.
|
||||||
|
* In the case that the clipping rectangle is partially or fully
|
||||||
|
* outside the bounds of the texture, the rectangle will be clipped.
|
||||||
|
*
|
||||||
|
* Flattens the two layers of the shaped texture into one ARGB32
|
||||||
|
* image by alpha blending the two images, and returns the flattened
|
||||||
|
* image.
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): a new cairo surface to be freed with
|
||||||
|
* cairo_surface_destroy().
|
||||||
|
*/
|
||||||
|
cairo_surface_t *
|
||||||
|
meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||||
|
cairo_rectangle_int_t *clip)
|
||||||
|
{
|
||||||
|
CoglHandle texture, mask_texture;
|
||||||
|
cairo_rectangle_int_t texture_rect = { 0, 0, 0, 0 };
|
||||||
|
cairo_surface_t *surface;
|
||||||
|
|
||||||
|
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
|
||||||
|
|
||||||
|
texture = stex->priv->texture;
|
||||||
|
|
||||||
|
if (texture == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
texture_rect.width = cogl_texture_get_width (texture);
|
||||||
|
texture_rect.height = cogl_texture_get_height (texture);
|
||||||
|
|
||||||
|
if (clip != NULL)
|
||||||
|
{
|
||||||
|
/* GdkRectangle is just a typedef of cairo_rectangle_int_t,
|
||||||
|
* so we can use the gdk_rectangle_* APIs on these. */
|
||||||
|
if (!gdk_rectangle_intersect (&texture_rect, clip, clip))
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clip != NULL)
|
||||||
|
texture = cogl_texture_new_from_sub_texture (texture,
|
||||||
|
clip->x,
|
||||||
|
clip->y,
|
||||||
|
clip->width,
|
||||||
|
clip->height);
|
||||||
|
|
||||||
|
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||||
|
cogl_texture_get_width (texture),
|
||||||
|
cogl_texture_get_height (texture));
|
||||||
|
|
||||||
|
cogl_texture_get_data (texture, CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||||
|
cairo_image_surface_get_stride (surface),
|
||||||
|
cairo_image_surface_get_data (surface));
|
||||||
|
|
||||||
|
cairo_surface_mark_dirty (surface);
|
||||||
|
|
||||||
|
if (clip != NULL)
|
||||||
|
cogl_object_unref (texture);
|
||||||
|
|
||||||
|
mask_texture = stex->priv->mask_texture;
|
||||||
|
if (mask_texture != COGL_INVALID_HANDLE)
|
||||||
|
{
|
||||||
|
cairo_t *cr;
|
||||||
|
cairo_surface_t *mask_surface;
|
||||||
|
|
||||||
|
if (clip != NULL)
|
||||||
|
mask_texture = cogl_texture_new_from_sub_texture (mask_texture,
|
||||||
|
clip->x,
|
||||||
|
clip->y,
|
||||||
|
clip->width,
|
||||||
|
clip->height);
|
||||||
|
|
||||||
|
mask_surface = cairo_image_surface_create (CAIRO_FORMAT_A8,
|
||||||
|
cogl_texture_get_width (mask_texture),
|
||||||
|
cogl_texture_get_height (mask_texture));
|
||||||
|
|
||||||
|
cogl_texture_get_data (mask_texture, COGL_PIXEL_FORMAT_A_8,
|
||||||
|
cairo_image_surface_get_stride (mask_surface),
|
||||||
|
cairo_image_surface_get_data (mask_surface));
|
||||||
|
|
||||||
|
cairo_surface_mark_dirty (mask_surface);
|
||||||
|
|
||||||
|
cr = cairo_create (surface);
|
||||||
|
cairo_set_source_surface (cr, mask_surface, 0, 0);
|
||||||
|
cairo_set_operator (cr, CAIRO_OPERATOR_DEST_IN);
|
||||||
|
cairo_paint (cr);
|
||||||
|
cairo_destroy (cr);
|
||||||
|
|
||||||
|
cairo_surface_destroy (mask_surface);
|
||||||
|
|
||||||
|
if (clip != NULL)
|
||||||
|
cogl_object_unref (mask_texture);
|
||||||
|
}
|
||||||
|
|
||||||
|
return surface;
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* Authored By Neil Roberts <neil@linux.intel.com>
|
* Authored By Neil Roberts <neil@linux.intel.com>
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011 Intel Corporation
|
* Copyright (C) 2011, 2012 Intel Corporation
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
@@ -25,94 +25,77 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
|
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||||
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||||
|
|
||||||
|
#include <clutter/clutter.h>
|
||||||
#include "meta-texture-rectangle.h"
|
#include "meta-texture-rectangle.h"
|
||||||
|
|
||||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
CoglTexture *
|
||||||
|
|
||||||
static void (* pf_glGetIntegerv) (GLenum pname, GLint *params);
|
|
||||||
static void (* pf_glTexImage2D) (GLenum target, GLint level,
|
|
||||||
GLint internalFormat,
|
|
||||||
GLsizei width, GLsizei height,
|
|
||||||
GLint border, GLenum format, GLenum type,
|
|
||||||
const GLvoid *pixels);
|
|
||||||
static void (* pf_glGenTextures) (GLsizei n, GLuint *textures);
|
|
||||||
static void (* pf_glDeleteTextures) (GLsizei n, const GLuint *texture);
|
|
||||||
static void (* pf_glBindTexture) (GLenum target, GLuint texture);
|
|
||||||
|
|
||||||
static void
|
|
||||||
rectangle_texture_destroy_cb (void *user_data)
|
|
||||||
{
|
|
||||||
GLuint tex = GPOINTER_TO_UINT (user_data);
|
|
||||||
|
|
||||||
pf_glDeleteTextures (1, &tex);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
|
||||||
|
|
||||||
CoglHandle
|
|
||||||
meta_texture_rectangle_new (unsigned int width,
|
meta_texture_rectangle_new (unsigned int width,
|
||||||
unsigned int height,
|
unsigned int height,
|
||||||
CoglTextureFlags flags,
|
|
||||||
CoglPixelFormat format,
|
CoglPixelFormat format,
|
||||||
GLenum internal_gl_format,
|
CoglPixelFormat internal_format,
|
||||||
GLenum internal_format,
|
|
||||||
unsigned int rowstride,
|
unsigned int rowstride,
|
||||||
const guint8 *data)
|
const guint8 *data,
|
||||||
|
GError **error)
|
||||||
{
|
{
|
||||||
CoglHandle cogl_tex = COGL_INVALID_HANDLE;
|
ClutterBackend *backend =
|
||||||
|
clutter_get_default_backend ();
|
||||||
|
CoglContext *context =
|
||||||
|
clutter_backend_get_cogl_context (backend);
|
||||||
|
CoglTextureRectangle *tex_rect;
|
||||||
|
|
||||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
tex_rect = cogl_texture_rectangle_new_with_size (context,
|
||||||
|
width, height,
|
||||||
|
internal_format,
|
||||||
|
error);
|
||||||
|
if (tex_rect == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
static CoglUserDataKey user_data_key;
|
|
||||||
GLint old_binding;
|
|
||||||
GLuint tex;
|
|
||||||
|
|
||||||
if (pf_glGenTextures == NULL)
|
|
||||||
{
|
|
||||||
pf_glGetIntegerv = (void *) cogl_get_proc_address ("glGetIntegerv");
|
|
||||||
pf_glTexImage2D = (void *) cogl_get_proc_address ("glTexImage2D");
|
|
||||||
pf_glGenTextures = (void *) cogl_get_proc_address ("glGenTextures");
|
|
||||||
pf_glDeleteTextures = (void *) cogl_get_proc_address ("glDeleteTextures");
|
|
||||||
pf_glBindTexture = (void *) cogl_get_proc_address ("glBindTexture");
|
|
||||||
}
|
|
||||||
|
|
||||||
pf_glGenTextures (1, &tex);
|
|
||||||
pf_glGetIntegerv (GL_TEXTURE_BINDING_RECTANGLE_ARB, &old_binding);
|
|
||||||
pf_glBindTexture (GL_TEXTURE_RECTANGLE_ARB, tex);
|
|
||||||
pf_glTexImage2D (GL_TEXTURE_RECTANGLE_ARB, 0,
|
|
||||||
internal_gl_format, width, height,
|
|
||||||
0, internal_gl_format,
|
|
||||||
GL_UNSIGNED_BYTE, NULL);
|
|
||||||
pf_glBindTexture (GL_TEXTURE_RECTANGLE_ARB, old_binding);
|
|
||||||
|
|
||||||
cogl_tex = cogl_texture_new_from_foreign (tex,
|
|
||||||
GL_TEXTURE_RECTANGLE_ARB,
|
|
||||||
width, height,
|
|
||||||
0, 0, /* no waste */
|
|
||||||
internal_format);
|
|
||||||
|
|
||||||
/* Cogl won't destroy the GL texture when a foreign texture is used
|
|
||||||
so we need to destroy it manually. We can set a destroy
|
|
||||||
notification callback to do this transparently */
|
|
||||||
cogl_object_set_user_data (cogl_tex,
|
|
||||||
&user_data_key,
|
|
||||||
GUINT_TO_POINTER (tex),
|
|
||||||
rectangle_texture_destroy_cb);
|
|
||||||
|
|
||||||
/* Use cogl_texture_set_region instead of uploading the data
|
|
||||||
directly with GL calls so that we can let Cogl deal with setting
|
|
||||||
the pixel store parameters and handling format conversion */
|
|
||||||
if (data)
|
if (data)
|
||||||
cogl_texture_set_region (cogl_tex,
|
cogl_texture_set_region (COGL_TEXTURE (tex_rect),
|
||||||
0, 0, /* src x/y */
|
0, 0, /* src_x/y */
|
||||||
0, 0, /* dst x/y */
|
0, 0, /* dst_x/y */
|
||||||
width, height, /* dst width/height */
|
width, height, /* dst_width/height */
|
||||||
width, height, /* src width/height */
|
width, height, /* width/height */
|
||||||
format,
|
format,
|
||||||
rowstride,
|
rowstride,
|
||||||
data);
|
data);
|
||||||
|
|
||||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
return COGL_TEXTURE (tex_rect);
|
||||||
|
}
|
||||||
return cogl_tex;
|
|
||||||
|
static void
|
||||||
|
texture_rectangle_check_cb (CoglTexture *sub_texture,
|
||||||
|
const float *sub_texture_coords,
|
||||||
|
const float *meta_coords,
|
||||||
|
void *user_data)
|
||||||
|
{
|
||||||
|
gboolean *result = user_data;
|
||||||
|
|
||||||
|
if (cogl_is_texture_rectangle (sub_texture))
|
||||||
|
*result = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Determines if the given texture is using a rectangle texture as its
|
||||||
|
* primitive texture type. Eventually this function could be replaced
|
||||||
|
* with cogl_texture_get_type if Cogl makes that public.
|
||||||
|
*
|
||||||
|
* http://git.gnome.org/browse/cogl/commit/?h=8012eee31
|
||||||
|
*/
|
||||||
|
gboolean
|
||||||
|
meta_texture_rectangle_check (CoglTexture *texture)
|
||||||
|
{
|
||||||
|
gboolean result = FALSE;
|
||||||
|
|
||||||
|
cogl_meta_texture_foreach_in_region (COGL_META_TEXTURE (texture),
|
||||||
|
0.0f, 0.0f, /* tx_1 / ty_1 */
|
||||||
|
1.0f, 1.0f, /* tx_2 / ty_2 */
|
||||||
|
COGL_PIPELINE_WRAP_MODE_REPEAT,
|
||||||
|
COGL_PIPELINE_WRAP_MODE_REPEAT,
|
||||||
|
texture_rectangle_check_cb,
|
||||||
|
&result);
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
@@ -30,15 +30,17 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
CoglHandle
|
CoglTexture *
|
||||||
meta_texture_rectangle_new (unsigned int width,
|
meta_texture_rectangle_new (unsigned int width,
|
||||||
unsigned int height,
|
unsigned int height,
|
||||||
CoglTextureFlags flags,
|
|
||||||
CoglPixelFormat format,
|
CoglPixelFormat format,
|
||||||
GLenum internal_gl_format,
|
CoglPixelFormat internal_format,
|
||||||
GLenum internal_format,
|
|
||||||
unsigned int rowstride,
|
unsigned int rowstride,
|
||||||
const guint8 *data);
|
const guint8 *data,
|
||||||
|
GError **error);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
meta_texture_rectangle_check (CoglTexture *texture);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
@@ -98,21 +98,9 @@ meta_texture_tower_free (MetaTextureTower *tower)
|
|||||||
g_slice_free (MetaTextureTower, tower);
|
g_slice_free (MetaTextureTower, tower);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_texture_tower_update_area:
|
* meta_texture_tower_set_base_texture:
|
||||||
* @tower: a MetaTextureTower
|
* @tower: a #MetaTextureTower
|
||||||
* @texture: the new texture used as a base for scaled down versions
|
* @texture: the new texture used as a base for scaled down versions
|
||||||
*
|
*
|
||||||
* Sets the base texture that is the scaled texture that the
|
* Sets the base texture that is the scaled texture that the
|
||||||
@@ -175,7 +163,7 @@ meta_texture_tower_set_base_texture (MetaTextureTower *tower,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_texture_tower_update_area:
|
* meta_texture_tower_update_area:
|
||||||
* @tower: a MetaTextureTower
|
* @tower: a #MetaTextureTower
|
||||||
* @x: X coordinate of upper left of rectangle that changed
|
* @x: X coordinate of upper left of rectangle that changed
|
||||||
* @y: Y coordinate of upper left of rectangle that changed
|
* @y: Y coordinate of upper left of rectangle that changed
|
||||||
* @width: width of rectangle that changed
|
* @width: width of rectangle that changed
|
||||||
@@ -198,6 +186,9 @@ meta_texture_tower_update_area (MetaTextureTower *tower,
|
|||||||
|
|
||||||
g_return_if_fail (tower != NULL);
|
g_return_if_fail (tower != NULL);
|
||||||
|
|
||||||
|
if (tower->textures[0] == COGL_INVALID_HANDLE)
|
||||||
|
return;
|
||||||
|
|
||||||
texture_width = cogl_texture_get_width (tower->textures[0]);
|
texture_width = cogl_texture_get_width (tower->textures[0]);
|
||||||
texture_height = cogl_texture_get_height (tower->textures[0]);
|
texture_height = cogl_texture_get_height (tower->textures[0]);
|
||||||
|
|
||||||
@@ -351,13 +342,11 @@ get_paint_level (int width, int height)
|
|||||||
return (int)(0.5 + lambda);
|
return (int)(0.5 + lambda);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
|
||||||
static gboolean
|
static gboolean
|
||||||
is_power_of_two (int x)
|
is_power_of_two (int x)
|
||||||
{
|
{
|
||||||
return (x & (x - 1)) == 0;
|
return (x & (x - 1)) == 0;
|
||||||
}
|
}
|
||||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
texture_tower_create_texture (MetaTextureTower *tower,
|
texture_tower_create_texture (MetaTextureTower *tower,
|
||||||
@@ -365,25 +354,23 @@ texture_tower_create_texture (MetaTextureTower *tower,
|
|||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
#ifdef GL_TEXTURE_RECTANGLE_ARB
|
|
||||||
if ((!is_power_of_two (width) || !is_power_of_two (height)) &&
|
if ((!is_power_of_two (width) || !is_power_of_two (height)) &&
|
||||||
texture_is_rectangle (tower->textures[level - 1]))
|
meta_texture_rectangle_check (tower->textures[level - 1]))
|
||||||
{
|
{
|
||||||
tower->textures[level] =
|
tower->textures[level] =
|
||||||
meta_texture_rectangle_new (width, height,
|
meta_texture_rectangle_new (width, height,
|
||||||
0, /* flags */
|
|
||||||
/* data format */
|
/* data format */
|
||||||
TEXTURE_FORMAT,
|
TEXTURE_FORMAT,
|
||||||
/* internal GL format */
|
|
||||||
GL_RGBA,
|
|
||||||
/* internal cogl format */
|
/* internal cogl format */
|
||||||
TEXTURE_FORMAT,
|
TEXTURE_FORMAT,
|
||||||
/* rowstride */
|
/* rowstride */
|
||||||
width * 4,
|
width * 4,
|
||||||
|
/* data */
|
||||||
|
NULL,
|
||||||
|
/* error */
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif /* GL_TEXTURE_RECTANGLE_ARB */
|
|
||||||
{
|
{
|
||||||
tower->textures[level] = cogl_texture_new_with_size (width, height,
|
tower->textures[level] = cogl_texture_new_with_size (width, height,
|
||||||
COGL_TEXTURE_NO_AUTO_MIPMAP,
|
COGL_TEXTURE_NO_AUTO_MIPMAP,
|
||||||
@@ -559,7 +546,7 @@ texture_tower_revalidate_client (MetaTextureTower *tower,
|
|||||||
4 * dest_width,
|
4 * dest_width,
|
||||||
dest_data);
|
dest_data);
|
||||||
|
|
||||||
if (dest_height < source_texture_height)
|
if (dest_texture_height < source_texture_height)
|
||||||
{
|
{
|
||||||
g_free (source_tmp1);
|
g_free (source_tmp1);
|
||||||
g_free (source_tmp2);
|
g_free (source_tmp2);
|
||||||
@@ -579,7 +566,7 @@ texture_tower_revalidate (MetaTextureTower *tower,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_texture_tower_get_paint_texture:
|
* meta_texture_tower_get_paint_texture:
|
||||||
* @tower: a MetaTextureTower
|
* @tower: a #MetaTextureTower
|
||||||
*
|
*
|
||||||
* Gets the texture from the tower that best matches the current
|
* Gets the texture from the tower that best matches the current
|
||||||
* rendering scale. (On the assumption here the texture is going to
|
* rendering scale. (On the assumption here the texture is going to
|
||||||
|
@@ -13,17 +13,20 @@
|
|||||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||||
#include <cogl/cogl-texture-pixmap-x11.h>
|
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||||
#include <gdk/gdk.h> /* for gdk_rectangle_union() */
|
#include <gdk/gdk.h> /* for gdk_rectangle_union() */
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <meta/display.h>
|
#include <meta/display.h>
|
||||||
#include <meta/errors.h>
|
#include <meta/errors.h>
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include <meta/window.h>
|
#include <meta/window.h>
|
||||||
|
#include <meta/meta-shaped-texture.h>
|
||||||
#include "xprops.h"
|
#include "xprops.h"
|
||||||
|
|
||||||
#include "compositor-private.h"
|
#include "compositor-private.h"
|
||||||
#include "meta-shadow-factory-private.h"
|
#include "meta-shadow-factory-private.h"
|
||||||
#include "meta-shaped-texture.h"
|
|
||||||
#include "meta-window-actor-private.h"
|
#include "meta-window-actor-private.h"
|
||||||
|
#include "meta-texture-rectangle.h"
|
||||||
|
#include "region-utils.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
POSITION_CHANGED,
|
POSITION_CHANGED,
|
||||||
@@ -123,15 +126,10 @@ enum
|
|||||||
PROP_META_WINDOW = 1,
|
PROP_META_WINDOW = 1,
|
||||||
PROP_META_SCREEN,
|
PROP_META_SCREEN,
|
||||||
PROP_X_WINDOW,
|
PROP_X_WINDOW,
|
||||||
PROP_X_WINDOW_ATTRIBUTES,
|
|
||||||
PROP_NO_SHADOW,
|
PROP_NO_SHADOW,
|
||||||
PROP_SHADOW_CLASS
|
PROP_SHADOW_CLASS
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DEFAULT_SHADOW_RADIUS 12
|
|
||||||
#define DEFAULT_SHADOW_X_OFFSET 0
|
|
||||||
#define DEFAULT_SHADOW_Y_OFFSET 8
|
|
||||||
|
|
||||||
static void meta_window_actor_dispose (GObject *object);
|
static void meta_window_actor_dispose (GObject *object);
|
||||||
static void meta_window_actor_finalize (GObject *object);
|
static void meta_window_actor_finalize (GObject *object);
|
||||||
static void meta_window_actor_constructed (GObject *object);
|
static void meta_window_actor_constructed (GObject *object);
|
||||||
@@ -232,15 +230,13 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
|||||||
g_signal_new ("position-changed",
|
g_signal_new ("position-changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0, NULL, NULL,
|
0, NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
signals[SIZE_CHANGED] =
|
signals[SIZE_CHANGED] =
|
||||||
g_signal_new ("size-changed",
|
g_signal_new ("size-changed",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0, NULL, NULL,
|
0, NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -656,15 +652,14 @@ meta_window_actor_paint (ClutterActor *actor)
|
|||||||
/* The frame bounds are already subtracted from priv->shadow_clip
|
/* The frame bounds are already subtracted from priv->shadow_clip
|
||||||
* if that exists.
|
* if that exists.
|
||||||
*/
|
*/
|
||||||
if (!clip && clip_shadow_under_window (self))
|
if (!clip && clip_shadow_under_window (self) && priv->shape_region != NULL)
|
||||||
{
|
{
|
||||||
cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window);
|
|
||||||
cairo_rectangle_int_t bounds;
|
cairo_rectangle_int_t bounds;
|
||||||
|
|
||||||
meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
|
meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
|
||||||
clip = cairo_region_create_rectangle (&bounds);
|
clip = cairo_region_create_rectangle (&bounds);
|
||||||
|
|
||||||
cairo_region_subtract (clip, frame_bounds);
|
cairo_region_subtract (clip, priv->shape_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_shadow_paint (shadow,
|
meta_shadow_paint (shadow,
|
||||||
@@ -741,74 +736,52 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
|
|||||||
meta_window_is_fullscreen (priv->window))
|
meta_window_is_fullscreen (priv->window))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* If we have two snap-tiled windows, we don't want the shadow to obstruct
|
||||||
|
* the other window.
|
||||||
|
*/
|
||||||
|
if (meta_window_get_tile_match (priv->window))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Always put a shadow around windows with a frame - This should override
|
* Always put a shadow around windows with a frame - This should override
|
||||||
* the restriction about not putting a shadow around ARGB windows.
|
* the restriction about not putting a shadow around ARGB windows.
|
||||||
*/
|
*/
|
||||||
if (priv->window)
|
if (meta_window_get_frame (priv->window))
|
||||||
{
|
return TRUE;
|
||||||
if (meta_window_get_frame (priv->window))
|
|
||||||
{
|
|
||||||
meta_verbose ("Window 0x%x has shadow because it has a frame\n",
|
|
||||||
(guint)priv->xwindow);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do not add shadows to ARGB windows; eventually we should generate a
|
* Do not add shadows to ARGB windows; eventually we should generate a
|
||||||
* shadow from the input shape for such windows.
|
* shadow from the input shape for such windows.
|
||||||
*/
|
*/
|
||||||
if (priv->argb32 || priv->opacity != 0xff)
|
if (priv->argb32 || priv->opacity != 0xff)
|
||||||
{
|
return FALSE;
|
||||||
meta_verbose ("Window 0x%x has no shadow as it is ARGB\n",
|
|
||||||
(guint)priv->xwindow);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Add shadows to override redirect windows (e.g., Gtk menus).
|
* Add shadows to override redirect windows (e.g., Gtk menus).
|
||||||
*/
|
*/
|
||||||
if (priv->window->override_redirect)
|
if (priv->window->override_redirect)
|
||||||
{
|
return TRUE;
|
||||||
meta_verbose ("Window 0x%x has shadow because it is override redirect.\n",
|
|
||||||
(guint)priv->xwindow);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't put shadow around DND icon windows
|
* Don't put shadow around DND icon windows
|
||||||
*/
|
*/
|
||||||
if (window_type == META_WINDOW_DND ||
|
if (window_type == META_WINDOW_DND ||
|
||||||
window_type == META_WINDOW_DESKTOP)
|
window_type == META_WINDOW_DESKTOP)
|
||||||
{
|
return FALSE;
|
||||||
meta_verbose ("Window 0x%x has no shadow as it is DND or Desktop\n",
|
|
||||||
(guint)priv->xwindow);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window_type == META_WINDOW_MENU
|
if (window_type == META_WINDOW_MENU
|
||||||
#if 0
|
#if 0
|
||||||
|| window_type == META_WINDOW_DROPDOWN_MENU
|
|| window_type == META_WINDOW_DROPDOWN_MENU
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
return TRUE;
|
||||||
meta_verbose ("Window 0x%x has shadow as it is a menu\n",
|
|
||||||
(guint)priv->xwindow);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (window_type == META_WINDOW_TOOLTIP)
|
if (window_type == META_WINDOW_TOOLTIP)
|
||||||
{
|
return TRUE;
|
||||||
meta_verbose ("Window 0x%x has shadow as it is a tooltip\n",
|
|
||||||
(guint)priv->xwindow);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
meta_verbose ("Window 0x%x has no shadow as it fell through\n",
|
|
||||||
(guint)priv->xwindow);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,9 +801,9 @@ meta_window_actor_get_x_window (MetaWindowActor *self)
|
|||||||
/**
|
/**
|
||||||
* meta_window_actor_get_meta_window:
|
* meta_window_actor_get_meta_window:
|
||||||
*
|
*
|
||||||
* Gets the MetaWindow object that the the MetaWindowActor is displaying
|
* Gets the #MetaWindow object that the the #MetaWindowActor is displaying
|
||||||
*
|
*
|
||||||
* Return value: (transfer none): the displayed MetaWindow
|
* Return value: (transfer none): the displayed #MetaWindow
|
||||||
*/
|
*/
|
||||||
MetaWindow *
|
MetaWindow *
|
||||||
meta_window_actor_get_meta_window (MetaWindowActor *self)
|
meta_window_actor_get_meta_window (MetaWindowActor *self)
|
||||||
@@ -843,7 +816,7 @@ meta_window_actor_get_meta_window (MetaWindowActor *self)
|
|||||||
*
|
*
|
||||||
* Gets the ClutterActor that is used to display the contents of the window
|
* Gets the ClutterActor that is used to display the contents of the window
|
||||||
*
|
*
|
||||||
* Return value: (transfer none): the ClutterActor for the contents
|
* Return value: (transfer none): the #ClutterActor for the contents
|
||||||
*/
|
*/
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
meta_window_actor_get_texture (MetaWindowActor *self)
|
meta_window_actor_get_texture (MetaWindowActor *self)
|
||||||
@@ -946,23 +919,20 @@ static void
|
|||||||
meta_window_actor_damage_all (MetaWindowActor *self)
|
meta_window_actor_damage_all (MetaWindowActor *self)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
CoglHandle texture;
|
||||||
guint pixmap_width = 0;
|
|
||||||
guint pixmap_height = 0;
|
|
||||||
|
|
||||||
if (!priv->needs_damage_all)
|
if (!priv->needs_damage_all)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_object_get (texture_x11,
|
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
|
||||||
"pixmap-width", &pixmap_width,
|
|
||||||
"pixmap-height", &pixmap_height,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
if (!priv->mapped || priv->needs_pixmap)
|
||||||
0,
|
return;
|
||||||
0,
|
|
||||||
pixmap_width,
|
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
|
||||||
pixmap_height);
|
0, 0,
|
||||||
|
cogl_texture_get_width (texture),
|
||||||
|
cogl_texture_get_height (texture));
|
||||||
|
|
||||||
priv->needs_damage_all = FALSE;
|
priv->needs_damage_all = FALSE;
|
||||||
}
|
}
|
||||||
@@ -1201,9 +1171,8 @@ meta_window_actor_detach (MetaWindowActor *self)
|
|||||||
* you are supposed to be able to free a GLXPixmap after freeing the underlying
|
* you are supposed to be able to free a GLXPixmap after freeing the underlying
|
||||||
* pixmap, but it certainly doesn't work with current DRI/Mesa
|
* pixmap, but it certainly doesn't work with current DRI/Mesa
|
||||||
*/
|
*/
|
||||||
clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
|
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
|
||||||
None);
|
None);
|
||||||
meta_shaped_texture_clear (META_SHAPED_TEXTURE (priv->actor));
|
|
||||||
cogl_flush();
|
cogl_flush();
|
||||||
|
|
||||||
XFreePixmap (xdisplay, priv->back_pixmap);
|
XFreePixmap (xdisplay, priv->back_pixmap);
|
||||||
@@ -1217,8 +1186,9 @@ meta_window_actor_should_unredirect (MetaWindowActor *self)
|
|||||||
{
|
{
|
||||||
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
||||||
MetaScreen *screen = meta_window_get_screen (metaWindow);
|
MetaScreen *screen = meta_window_get_screen (metaWindow);
|
||||||
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
|
|
||||||
if (meta_window_is_override_redirect (metaWindow))
|
if (meta_window_is_override_redirect (metaWindow) && priv->opacity == 0xff && !priv->argb32)
|
||||||
{
|
{
|
||||||
int screen_width, screen_height;
|
int screen_width, screen_height;
|
||||||
MetaRectangle window_rect;
|
MetaRectangle window_rect;
|
||||||
@@ -1251,19 +1221,24 @@ void
|
|||||||
meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
||||||
{
|
{
|
||||||
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
||||||
|
MetaDisplay *display = meta_window_get_display (metaWindow);
|
||||||
|
|
||||||
Display *xdisplay = meta_display_get_xdisplay (meta_window_get_display (metaWindow));
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
Window xwin = meta_window_actor_get_x_window (self);
|
Window xwin = meta_window_actor_get_x_window (self);
|
||||||
|
|
||||||
if (state)
|
if (state)
|
||||||
{
|
{
|
||||||
|
meta_error_trap_push (display);
|
||||||
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||||
|
meta_error_trap_pop (display);
|
||||||
meta_window_actor_queue_create_pixmap (self);
|
meta_window_actor_queue_create_pixmap (self);
|
||||||
self->priv->unredirected = FALSE;
|
self->priv->unredirected = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
meta_error_trap_push (display);
|
||||||
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||||
|
meta_error_trap_pop (display);
|
||||||
self->priv->unredirected = TRUE;
|
self->priv->unredirected = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1609,24 +1584,16 @@ meta_window_actor_update_bounding_region_and_borders (MetaWindowActor *self,
|
|||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
MetaFrame *frame;
|
|
||||||
MetaFrameBorders borders;
|
MetaFrameBorders borders;
|
||||||
cairo_rectangle_int_t bounding_rectangle;
|
cairo_rectangle_int_t bounding_rectangle;
|
||||||
|
|
||||||
bounding_rectangle.x = 0;
|
meta_frame_calc_borders (priv->window->frame, &borders);
|
||||||
bounding_rectangle.y = 0;
|
|
||||||
|
|
||||||
frame = priv->window->frame;
|
bounding_rectangle.x = borders.invisible.left;
|
||||||
if (frame != NULL)
|
bounding_rectangle.y = borders.invisible.top;
|
||||||
{
|
|
||||||
meta_frame_calc_borders (frame, &borders);
|
|
||||||
|
|
||||||
bounding_rectangle.x = borders.invisible.left;
|
width -= borders.invisible.left + borders.invisible.right;
|
||||||
bounding_rectangle.y = borders.invisible.top;
|
height -= borders.invisible.top + borders.invisible.bottom;
|
||||||
|
|
||||||
width -= borders.invisible.left + borders.invisible.right;
|
|
||||||
height -= borders.invisible.top + borders.invisible.bottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
bounding_rectangle.width = width;
|
bounding_rectangle.width = width;
|
||||||
bounding_rectangle.height = height;
|
bounding_rectangle.height = height;
|
||||||
@@ -1670,7 +1637,6 @@ meta_window_actor_update_shape_region (MetaWindowActor *self,
|
|||||||
|
|
||||||
/* region must be non-null */
|
/* region must be non-null */
|
||||||
priv->shape_region = region;
|
priv->shape_region = region;
|
||||||
cairo_region_reference (region);
|
|
||||||
|
|
||||||
/* Our "shape_region" is called the "bounding region" in the X Shape
|
/* Our "shape_region" is called the "bounding region" in the X Shape
|
||||||
* Extension Documentation.
|
* Extension Documentation.
|
||||||
@@ -1716,7 +1682,7 @@ meta_window_actor_get_obscured_region (MetaWindowActor *self)
|
|||||||
#if 0
|
#if 0
|
||||||
/* Print out a region; useful for debugging */
|
/* Print out a region; useful for debugging */
|
||||||
static void
|
static void
|
||||||
dump_region (cairo_region_t *region)
|
print_region (cairo_region_t *region)
|
||||||
{
|
{
|
||||||
int n_rects;
|
int n_rects;
|
||||||
int i;
|
int i;
|
||||||
@@ -1734,6 +1700,26 @@ dump_region (cairo_region_t *region)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* Dump a region to a PNG file; useful for debugging */
|
||||||
|
static void
|
||||||
|
see_region (cairo_region_t *region,
|
||||||
|
int width,
|
||||||
|
int height,
|
||||||
|
char *filename)
|
||||||
|
{
|
||||||
|
cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_A8, width, height);
|
||||||
|
cairo_t *cr = cairo_create (surface);
|
||||||
|
|
||||||
|
gdk_cairo_region (cr, region);
|
||||||
|
cairo_fill (cr);
|
||||||
|
|
||||||
|
cairo_surface_write_to_png (surface, filename);
|
||||||
|
cairo_destroy (cr);
|
||||||
|
cairo_surface_destroy (surface);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_window_actor_set_visible_region:
|
* meta_window_actor_set_visible_region:
|
||||||
* @self: a #MetaWindowActor
|
* @self: a #MetaWindowActor
|
||||||
@@ -1749,22 +1735,9 @@ meta_window_actor_set_visible_region (MetaWindowActor *self,
|
|||||||
cairo_region_t *visible_region)
|
cairo_region_t *visible_region)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
cairo_region_t *texture_clip_region = NULL;
|
|
||||||
|
|
||||||
/* Get the area of the window texture that would be drawn if
|
|
||||||
* we weren't obscured at all
|
|
||||||
*/
|
|
||||||
texture_clip_region = meta_shaped_texture_get_visible_pixels_region (META_SHAPED_TEXTURE (priv->actor));
|
|
||||||
texture_clip_region = cairo_region_copy (texture_clip_region);
|
|
||||||
|
|
||||||
/* Then intersect that with the visible region to get the region
|
|
||||||
* that we actually need to redraw.
|
|
||||||
*/
|
|
||||||
cairo_region_intersect (texture_clip_region, visible_region);
|
|
||||||
|
|
||||||
/* Assumes ownership */
|
|
||||||
meta_shaped_texture_set_clip_region (META_SHAPED_TEXTURE (priv->actor),
|
meta_shaped_texture_set_clip_region (META_SHAPED_TEXTURE (priv->actor),
|
||||||
texture_clip_region);
|
visible_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1791,11 +1764,8 @@ meta_window_actor_set_visible_region_beneath (MetaWindowActor *self,
|
|||||||
meta_window_actor_clear_shadow_clip (self);
|
meta_window_actor_clear_shadow_clip (self);
|
||||||
priv->shadow_clip = cairo_region_copy (beneath_region);
|
priv->shadow_clip = cairo_region_copy (beneath_region);
|
||||||
|
|
||||||
if (clip_shadow_under_window (self))
|
if (clip_shadow_under_window (self) && priv->shape_region != NULL)
|
||||||
{
|
cairo_region_subtract (priv->shadow_clip, priv->shape_region);
|
||||||
cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window);
|
|
||||||
cairo_region_subtract (priv->shadow_clip, frame_bounds);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1804,7 +1774,7 @@ meta_window_actor_set_visible_region_beneath (MetaWindowActor *self,
|
|||||||
* @self: a #MetaWindowActor
|
* @self: a #MetaWindowActor
|
||||||
*
|
*
|
||||||
* Unsets the regions set by meta_window_actor_reset_visible_region() and
|
* Unsets the regions set by meta_window_actor_reset_visible_region() and
|
||||||
*meta_window_actor_reset_visible_region_beneath()
|
* meta_window_actor_reset_visible_region_beneath()
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
||||||
@@ -1816,19 +1786,6 @@ meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
|||||||
meta_window_actor_clear_shadow_clip (self);
|
meta_window_actor_clear_shadow_clip (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
texture_pixmap_using_extension (ClutterX11TexturePixmap *texture)
|
|
||||||
{
|
|
||||||
ClutterTexture *self = CLUTTER_TEXTURE (texture);
|
|
||||||
CoglHandle handle;
|
|
||||||
|
|
||||||
handle = clutter_texture_get_cogl_texture (self);
|
|
||||||
|
|
||||||
return handle != NULL &&
|
|
||||||
cogl_is_texture_pixmap_x11 (handle) &&
|
|
||||||
cogl_texture_pixmap_x11_is_using_tfp_extension (handle);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_needs_pixmap (MetaWindowActor *self)
|
check_needs_pixmap (MetaWindowActor *self)
|
||||||
{
|
{
|
||||||
@@ -1862,7 +1819,7 @@ check_needs_pixmap (MetaWindowActor *self)
|
|||||||
|
|
||||||
if (priv->back_pixmap == None)
|
if (priv->back_pixmap == None)
|
||||||
{
|
{
|
||||||
gint pxm_width, pxm_height;
|
CoglHandle texture;
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
|
|
||||||
@@ -1884,35 +1841,35 @@ check_needs_pixmap (MetaWindowActor *self)
|
|||||||
{
|
{
|
||||||
meta_verbose ("Unable to get named pixmap for %p\n", self);
|
meta_verbose ("Unable to get named pixmap for %p\n", self);
|
||||||
meta_window_actor_update_bounding_region_and_borders (self, 0, 0);
|
meta_window_actor_update_bounding_region_and_borders (self, 0, 0);
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compositor->no_mipmaps)
|
if (compositor->no_mipmaps)
|
||||||
meta_shaped_texture_set_create_mipmaps (META_SHAPED_TEXTURE (priv->actor),
|
meta_shaped_texture_set_create_mipmaps (META_SHAPED_TEXTURE (priv->actor),
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
clutter_x11_texture_pixmap_set_pixmap
|
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
|
||||||
(CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
|
priv->back_pixmap);
|
||||||
priv->back_pixmap);
|
|
||||||
|
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This only works *after* actually setting the pixmap, so we have to
|
* This only works *after* actually setting the pixmap, so we have to
|
||||||
* do it here.
|
* do it here.
|
||||||
* See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
|
* See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
|
||||||
*/
|
*/
|
||||||
if (G_UNLIKELY (!texture_pixmap_using_extension (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor))))
|
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (texture)))
|
||||||
g_warning ("NOTE: Not using GLX TFP!\n");
|
g_warning ("NOTE: Not using GLX TFP!\n");
|
||||||
|
|
||||||
g_object_get (priv->actor,
|
meta_window_actor_update_bounding_region_and_borders (self,
|
||||||
"pixmap-width", &pxm_width,
|
cogl_texture_get_width (texture),
|
||||||
"pixmap-height", &pxm_height,
|
cogl_texture_get_height (texture));
|
||||||
NULL);
|
|
||||||
|
|
||||||
meta_window_actor_update_bounding_region_and_borders (self, pxm_width, pxm_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_error_trap_pop (display);
|
|
||||||
|
|
||||||
priv->needs_pixmap = FALSE;
|
priv->needs_pixmap = FALSE;
|
||||||
|
|
||||||
|
out:
|
||||||
|
meta_error_trap_pop (display);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -1999,7 +1956,6 @@ meta_window_actor_process_damage (MetaWindowActor *self,
|
|||||||
XDamageNotifyEvent *event)
|
XDamageNotifyEvent *event)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
|
||||||
|
|
||||||
priv->received_damage = TRUE;
|
priv->received_damage = TRUE;
|
||||||
|
|
||||||
@@ -2027,12 +1983,14 @@ meta_window_actor_process_damage (MetaWindowActor *self,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!priv->mapped || priv->needs_pixmap)
|
||||||
|
return;
|
||||||
|
|
||||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
|
||||||
event->area.x,
|
event->area.x,
|
||||||
event->area.y,
|
event->area.y,
|
||||||
event->area.width,
|
event->area.width,
|
||||||
event->area.height);
|
event->area.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -2049,117 +2007,136 @@ meta_window_actor_sync_visibility (MetaWindowActor *self)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static cairo_region_t *
|
||||||
set_integral_bounding_rect (cairo_rectangle_int_t *rect,
|
scan_visible_region (guchar *mask_data,
|
||||||
double x, double y,
|
int stride,
|
||||||
double width, double height)
|
cairo_region_t *scan_area)
|
||||||
{
|
{
|
||||||
rect->x = floor(x);
|
int i, n_rects = cairo_region_num_rectangles (scan_area);
|
||||||
rect->y = floor(y);
|
MetaRegionBuilder builder;
|
||||||
rect->width = ceil(x + width) - rect->x;
|
|
||||||
rect->height = ceil(y + height) - rect->y;
|
meta_region_builder_init (&builder);
|
||||||
|
|
||||||
|
for (i = 0; i < n_rects; i++)
|
||||||
|
{
|
||||||
|
int x, y;
|
||||||
|
cairo_rectangle_int_t rect;
|
||||||
|
|
||||||
|
cairo_region_get_rectangle (scan_area, i, &rect);
|
||||||
|
|
||||||
|
for (y = rect.y; y < (rect.y + rect.height); y++)
|
||||||
|
{
|
||||||
|
for (x = rect.x; x < (rect.x + rect.width); x++)
|
||||||
|
{
|
||||||
|
int w = x;
|
||||||
|
while (mask_data[y * stride + w] == 255 && w < (rect.x + rect.width))
|
||||||
|
w++;
|
||||||
|
|
||||||
|
if (w > 0)
|
||||||
|
{
|
||||||
|
meta_region_builder_add_rectangle (&builder, x, y, w - x, 1);
|
||||||
|
x = w;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return meta_region_builder_finish (&builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_corners (MetaWindowActor *self,
|
build_and_scan_frame_mask (MetaWindowActor *self,
|
||||||
MetaFrameBorders *borders)
|
cairo_rectangle_int_t *client_area,
|
||||||
|
cairo_region_t *shape_region)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
MetaRectangle outer;
|
guchar *mask_data;
|
||||||
cairo_rectangle_int_t corner_rects[4];
|
guint tex_width, tex_height;
|
||||||
cairo_region_t *corner_region;
|
CoglHandle paint_tex, mask_texture;
|
||||||
cairo_path_t *corner_path;
|
int stride;
|
||||||
float top_left, top_right, bottom_left, bottom_right;
|
|
||||||
float x, y;
|
|
||||||
|
|
||||||
/* need these to build a path */
|
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
cairo_surface_t *surface;
|
cairo_surface_t *surface;
|
||||||
|
|
||||||
if (!priv->window->frame)
|
paint_tex = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
|
||||||
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_window_get_outer_rect (priv->window, &outer);
|
tex_width = cogl_texture_get_width (paint_tex);
|
||||||
|
tex_height = cogl_texture_get_height (paint_tex);
|
||||||
|
|
||||||
meta_frame_get_corner_radiuses (priv->window->frame,
|
stride = cairo_format_stride_for_width (CAIRO_FORMAT_A8, tex_width);
|
||||||
&top_left,
|
|
||||||
&top_right,
|
|
||||||
&bottom_left,
|
|
||||||
&bottom_right);
|
|
||||||
|
|
||||||
/* Unfortunately, cairo does not allow us to create a context
|
/* Create data for an empty image */
|
||||||
* without a surface. Create a 0x0 image surface to "paint to"
|
mask_data = g_malloc0 (stride * tex_height);
|
||||||
* so we can get the path. */
|
|
||||||
surface = cairo_image_surface_create (CAIRO_FORMAT_A8,
|
|
||||||
0, 0);
|
|
||||||
|
|
||||||
|
surface = cairo_image_surface_create_for_data (mask_data,
|
||||||
|
CAIRO_FORMAT_A8,
|
||||||
|
tex_width,
|
||||||
|
tex_height,
|
||||||
|
stride);
|
||||||
cr = cairo_create (surface);
|
cr = cairo_create (surface);
|
||||||
|
|
||||||
/* top left */
|
gdk_cairo_region (cr, shape_region);
|
||||||
x = borders->invisible.left;
|
cairo_fill (cr);
|
||||||
y = borders->invisible.top;
|
|
||||||
|
|
||||||
set_integral_bounding_rect (&corner_rects[0],
|
if (priv->window->frame != NULL)
|
||||||
x, y, top_left, top_left);
|
{
|
||||||
|
cairo_region_t *frame_paint_region, *scanned_region;
|
||||||
|
cairo_rectangle_int_t rect = { 0, 0, tex_width, tex_height };
|
||||||
|
|
||||||
cairo_arc (cr,
|
/* Make sure we don't paint the frame over the client window. */
|
||||||
x + top_left,
|
frame_paint_region = cairo_region_create_rectangle (&rect);
|
||||||
y + top_left,
|
cairo_region_subtract_rectangle (frame_paint_region, client_area);
|
||||||
top_left,
|
|
||||||
0, M_PI*2);
|
|
||||||
|
|
||||||
|
gdk_cairo_region (cr, frame_paint_region);
|
||||||
|
cairo_clip (cr);
|
||||||
|
|
||||||
/* top right */
|
/* XXX: work around cairo bug. remove when released
|
||||||
x = borders->invisible.left + outer.width - top_right;
|
* http://cgit.freedesktop.org/cairo/commit/?id=ec400daf9ec3bbd8403324db7fcdaf175e185e7b
|
||||||
y = borders->invisible.top;
|
*/
|
||||||
|
cairo_push_group (cr);
|
||||||
|
|
||||||
set_integral_bounding_rect (&corner_rects[1],
|
meta_frame_render_background (priv->window->frame, cr);
|
||||||
x, y, top_right, top_right);
|
|
||||||
|
|
||||||
cairo_arc (cr,
|
cairo_pop_group_to_source (cr);
|
||||||
x,
|
cairo_paint (cr);
|
||||||
y + top_right,
|
|
||||||
top_right,
|
|
||||||
0, M_PI*2);
|
|
||||||
|
|
||||||
/* bottom right */
|
cairo_surface_flush (surface);
|
||||||
x = borders->invisible.left + outer.width - bottom_right;
|
scanned_region = scan_visible_region (mask_data, stride, frame_paint_region);
|
||||||
y = borders->invisible.top + outer.height - bottom_right;
|
cairo_region_union (shape_region, scanned_region);
|
||||||
|
cairo_region_destroy (scanned_region);
|
||||||
|
}
|
||||||
|
|
||||||
set_integral_bounding_rect (&corner_rects[2],
|
|
||||||
x, y, bottom_right, bottom_right);
|
|
||||||
|
|
||||||
cairo_arc (cr,
|
|
||||||
x,
|
|
||||||
y,
|
|
||||||
bottom_right,
|
|
||||||
0, M_PI*2);
|
|
||||||
|
|
||||||
/* bottom left */
|
|
||||||
x = borders->invisible.left;
|
|
||||||
y = borders->invisible.top + outer.height - bottom_left;
|
|
||||||
|
|
||||||
set_integral_bounding_rect (&corner_rects[3],
|
|
||||||
x, y, bottom_left, bottom_left);
|
|
||||||
|
|
||||||
cairo_arc (cr,
|
|
||||||
x + bottom_left,
|
|
||||||
y,
|
|
||||||
bottom_left,
|
|
||||||
0, M_PI*2);
|
|
||||||
|
|
||||||
corner_path = cairo_copy_path (cr);
|
|
||||||
|
|
||||||
cairo_surface_destroy (surface);
|
|
||||||
cairo_destroy (cr);
|
cairo_destroy (cr);
|
||||||
|
cairo_surface_destroy (surface);
|
||||||
|
|
||||||
corner_region = cairo_region_create_rectangles (corner_rects, 4);
|
if (meta_texture_rectangle_check (paint_tex))
|
||||||
|
{
|
||||||
|
mask_texture = meta_texture_rectangle_new (tex_width, tex_height,
|
||||||
|
COGL_PIXEL_FORMAT_A_8,
|
||||||
|
COGL_PIXEL_FORMAT_A_8,
|
||||||
|
stride,
|
||||||
|
mask_data,
|
||||||
|
NULL /* error */);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Note: we don't allow slicing for this texture because we
|
||||||
|
* need to use it with multi-texturing which doesn't support
|
||||||
|
* sliced textures */
|
||||||
|
mask_texture = cogl_texture_new_from_data (tex_width, tex_height,
|
||||||
|
COGL_TEXTURE_NO_SLICING,
|
||||||
|
COGL_PIXEL_FORMAT_A_8,
|
||||||
|
COGL_PIXEL_FORMAT_ANY,
|
||||||
|
stride,
|
||||||
|
mask_data);
|
||||||
|
}
|
||||||
|
|
||||||
meta_shaped_texture_set_overlay_path (META_SHAPED_TEXTURE (priv->actor),
|
meta_shaped_texture_set_mask_texture (META_SHAPED_TEXTURE (priv->actor),
|
||||||
corner_region, corner_path);
|
mask_texture);
|
||||||
|
cogl_handle_unref (mask_texture);
|
||||||
cairo_region_destroy (corner_region);
|
|
||||||
|
|
||||||
|
g_free (mask_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -2170,56 +2147,30 @@ check_needs_reshape (MetaWindowActor *self)
|
|||||||
MetaDisplay *display = meta_screen_get_display (screen);
|
MetaDisplay *display = meta_screen_get_display (screen);
|
||||||
MetaFrameBorders borders;
|
MetaFrameBorders borders;
|
||||||
cairo_region_t *region;
|
cairo_region_t *region;
|
||||||
|
cairo_rectangle_int_t client_area;
|
||||||
|
|
||||||
if (!priv->needs_reshape)
|
if (!priv->needs_reshape)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_shaped_texture_set_shape_region (META_SHAPED_TEXTURE (priv->actor), NULL);
|
meta_frame_calc_borders (priv->window->frame, &borders);
|
||||||
|
|
||||||
|
client_area.x = borders.total.left;
|
||||||
|
client_area.y = borders.total.top;
|
||||||
|
client_area.width = priv->window->rect.width;
|
||||||
|
client_area.height = priv->window->rect.height;
|
||||||
|
|
||||||
|
meta_shaped_texture_set_mask_texture (META_SHAPED_TEXTURE (priv->actor), COGL_INVALID_HANDLE);
|
||||||
meta_window_actor_clear_shape_region (self);
|
meta_window_actor_clear_shape_region (self);
|
||||||
|
|
||||||
if (priv->window->frame)
|
|
||||||
meta_frame_calc_borders (priv->window->frame, &borders);
|
|
||||||
else
|
|
||||||
meta_frame_borders_clear (&borders);
|
|
||||||
|
|
||||||
region = meta_window_get_frame_bounds (priv->window);
|
|
||||||
if (region != NULL)
|
|
||||||
{
|
|
||||||
/* This returns the window's internal frame bounds region,
|
|
||||||
* so we need to copy it because we modify it below. */
|
|
||||||
region = cairo_region_copy (region);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* If we have no region, we have no frame. We have no frame,
|
|
||||||
* so just use the bounding region instead */
|
|
||||||
region = cairo_region_copy (priv->bounding_region);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_SHAPE
|
#ifdef HAVE_SHAPE
|
||||||
if (priv->window->has_shape)
|
if (priv->window->has_shape)
|
||||||
{
|
{
|
||||||
|
/* Translate the set of XShape rectangles that we
|
||||||
|
* get from the X server to a cairo_region. */
|
||||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||||
XRectangle *rects;
|
XRectangle *rects;
|
||||||
|
cairo_rectangle_int_t *cairo_rects = NULL;
|
||||||
int n_rects, ordering;
|
int n_rects, ordering;
|
||||||
cairo_rectangle_int_t client_area;
|
|
||||||
|
|
||||||
client_area.width = priv->window->rect.width;
|
|
||||||
client_area.height = priv->window->rect.height;
|
|
||||||
|
|
||||||
if (priv->window->frame)
|
|
||||||
{
|
|
||||||
client_area.x = borders.total.left;
|
|
||||||
client_area.y = borders.total.top;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
client_area.x = 0;
|
|
||||||
client_area.y = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Punch out client area. */
|
|
||||||
cairo_region_subtract_rectangle (region, &client_area);
|
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
rects = XShapeGetRectangles (xdisplay,
|
rects = XShapeGetRectangles (xdisplay,
|
||||||
@@ -2231,29 +2182,37 @@ check_needs_reshape (MetaWindowActor *self)
|
|||||||
|
|
||||||
if (rects)
|
if (rects)
|
||||||
{
|
{
|
||||||
|
cairo_rects = g_new (cairo_rectangle_int_t, n_rects);
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < n_rects; i ++)
|
for (i = 0; i < n_rects; i ++)
|
||||||
{
|
{
|
||||||
cairo_rectangle_int_t rect = { rects[i].x + client_area.x,
|
cairo_rects[i].x = client_area.x + rects[i].x;
|
||||||
rects[i].y + client_area.y,
|
cairo_rects[i].y = client_area.y + rects[i].y;
|
||||||
rects[i].width,
|
cairo_rects[i].width = rects[i].width;
|
||||||
rects[i].height };
|
cairo_rects[i].height = rects[i].height;
|
||||||
cairo_region_union_rectangle (region, &rect);
|
|
||||||
}
|
}
|
||||||
XFree (rects);
|
XFree (rects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
region = cairo_region_create_rectangles (cairo_rects, n_rects);
|
||||||
|
g_free (cairo_rects);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
/* If we don't have a shape on the server, that means that
|
||||||
|
* we have an implicit shape of one rectangle covering the
|
||||||
|
* entire window. */
|
||||||
|
region = cairo_region_create_rectangle (&client_area);
|
||||||
|
}
|
||||||
|
|
||||||
meta_shaped_texture_set_shape_region (META_SHAPED_TEXTURE (priv->actor),
|
/* This takes the region, generates a mask using GTK+
|
||||||
region);
|
* and scans the mask looking for all opaque pixels,
|
||||||
|
* adding it to region.
|
||||||
|
*/
|
||||||
|
build_and_scan_frame_mask (self, &client_area, region);
|
||||||
meta_window_actor_update_shape_region (self, region);
|
meta_window_actor_update_shape_region (self, region);
|
||||||
|
|
||||||
cairo_region_destroy (region);
|
|
||||||
|
|
||||||
update_corners (self, &borders);
|
|
||||||
|
|
||||||
priv->needs_reshape = FALSE;
|
priv->needs_reshape = FALSE;
|
||||||
meta_window_actor_invalidate_shadow (self);
|
meta_window_actor_invalidate_shadow (self);
|
||||||
}
|
}
|
||||||
@@ -2288,11 +2247,38 @@ meta_window_actor_pre_paint (MetaWindowActor *self)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priv->received_damage && !self->priv->unredirected)
|
if (priv->unredirected)
|
||||||
|
{
|
||||||
|
/* Nothing to do here until/if the window gets redirected again */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (priv->received_damage)
|
||||||
{
|
{
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
XDamageSubtract (xdisplay, priv->damage, None, None);
|
XDamageSubtract (xdisplay, priv->damage, None, None);
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
|
/* We need to make sure that any X drawing that happens before the
|
||||||
|
* XDamageSubtract() above is visible to subsequent GL rendering;
|
||||||
|
* the only standardized way to do this is EXT_x11_sync_object,
|
||||||
|
* which isn't yet widely available. For now, we count on details
|
||||||
|
* of Xorg and the open source drivers, and hope for the best
|
||||||
|
* otherwise.
|
||||||
|
*
|
||||||
|
* Xorg and open source driver specifics:
|
||||||
|
*
|
||||||
|
* The X server makes sure to flush drawing to the kernel before
|
||||||
|
* sending out damage events, but since we use DamageReportBoundingBox
|
||||||
|
* there may be drawing between the last damage event and the
|
||||||
|
* XDamageSubtract() that needs to be flushed as well.
|
||||||
|
*
|
||||||
|
* Xorg always makes sure that drawing is flushed to the kernel
|
||||||
|
* before writing events or responses to the client, so any round trip
|
||||||
|
* request at this point is sufficient to flush the GLX buffers.
|
||||||
|
*/
|
||||||
|
XSync (xdisplay, False);
|
||||||
|
|
||||||
priv->received_damage = FALSE;
|
priv->received_damage = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -145,10 +145,29 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
if (!CLUTTER_ACTOR_IS_VISIBLE (l->data))
|
if (!CLUTTER_ACTOR_IS_VISIBLE (l->data))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* If an actor has effects applied, then that can change the area
|
||||||
|
* it paints and the opacity, so we no longer can figure out what
|
||||||
|
* portion of the actor is obscured and what portion of the screen
|
||||||
|
* it obscures, so we skip the actor.
|
||||||
|
*
|
||||||
|
* This has a secondary beneficial effect: if a ClutterOffscreenEffect
|
||||||
|
* is applied to an actor, then our clipped redraws interfere with the
|
||||||
|
* caching of the FBO - even if we only need to draw a small portion
|
||||||
|
* of the window right now, ClutterOffscreenEffect may use other portions
|
||||||
|
* of the FBO later. So, skipping actors with effects applied also
|
||||||
|
* prevents these bugs.
|
||||||
|
*
|
||||||
|
* Theoretically, we should check clutter_actor_get_offscreen_redirect()
|
||||||
|
* as well for the same reason, but omitted for simplicity in the
|
||||||
|
* hopes that no-one will do that.
|
||||||
|
*/
|
||||||
|
if (clutter_actor_has_effects (l->data))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (META_IS_WINDOW_ACTOR (l->data))
|
if (META_IS_WINDOW_ACTOR (l->data))
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = l->data;
|
MetaWindowActor *window_actor = l->data;
|
||||||
gboolean x, y;
|
int x, y;
|
||||||
|
|
||||||
if (!actor_is_untransformed (CLUTTER_ACTOR (window_actor), &x, &y))
|
if (!actor_is_untransformed (CLUTTER_ACTOR (window_actor), &x, &y))
|
||||||
continue;
|
continue;
|
||||||
@@ -190,7 +209,6 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
if (META_IS_WINDOW_ACTOR (l->data))
|
if (META_IS_WINDOW_ACTOR (l->data))
|
||||||
{
|
{
|
||||||
MetaWindowActor *window_actor = l->data;
|
MetaWindowActor *window_actor = l->data;
|
||||||
window_actor = l->data;
|
|
||||||
meta_window_actor_reset_visible_regions (window_actor);
|
meta_window_actor_reset_visible_regions (window_actor);
|
||||||
}
|
}
|
||||||
else if (META_IS_BACKGROUND_ACTOR (l->data))
|
else if (META_IS_BACKGROUND_ACTOR (l->data))
|
||||||
|
@@ -16,3 +16,9 @@ pkglib_LTLIBRARIES = default.la
|
|||||||
install-exec-hook:
|
install-exec-hook:
|
||||||
-rm $(DESTDIR)$(pkglibdir)/*.a
|
-rm $(DESTDIR)$(pkglibdir)/*.a
|
||||||
-rm $(DESTDIR)$(pkglibdir)/*.la
|
-rm $(DESTDIR)$(pkglibdir)/*.la
|
||||||
|
|
||||||
|
# Since we removed the .la file, 'make uninstall' doesn't work properly,
|
||||||
|
# since it counts on libtool to remove the .la files, so just kill the
|
||||||
|
# .so file manually.
|
||||||
|
uninstall-local:
|
||||||
|
-rm -f $(DESTDIR)$(pkglibdir)/default.so
|
||||||
|
@@ -112,8 +112,6 @@ struct _MetaDefaultPluginPrivate
|
|||||||
ClutterActor *desktop2;
|
ClutterActor *desktop2;
|
||||||
|
|
||||||
MetaPluginInfo info;
|
MetaPluginInfo info;
|
||||||
|
|
||||||
gboolean debug_mode : 1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -182,34 +180,6 @@ meta_default_plugin_get_property (GObject *object,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
start (MetaPlugin *plugin)
|
|
||||||
{
|
|
||||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
|
||||||
|
|
||||||
guint destroy_timeout = DESTROY_TIMEOUT;
|
|
||||||
guint minimize_timeout = MINIMIZE_TIMEOUT;
|
|
||||||
guint maximize_timeout = MAXIMIZE_TIMEOUT;
|
|
||||||
guint map_timeout = MAP_TIMEOUT;
|
|
||||||
guint switch_timeout = SWITCH_TIMEOUT;
|
|
||||||
|
|
||||||
if (meta_plugin_debug_mode (plugin))
|
|
||||||
{
|
|
||||||
g_debug ("Plugin %s: Entering debug mode.", priv->info.name);
|
|
||||||
|
|
||||||
priv->debug_mode = TRUE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Double the effect duration to make them easier to observe.
|
|
||||||
*/
|
|
||||||
destroy_timeout *= 2;
|
|
||||||
minimize_timeout *= 2;
|
|
||||||
maximize_timeout *= 2;
|
|
||||||
map_timeout *= 2;
|
|
||||||
switch_timeout *= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_default_plugin_class_init (MetaDefaultPluginClass *klass)
|
meta_default_plugin_class_init (MetaDefaultPluginClass *klass)
|
||||||
{
|
{
|
||||||
@@ -221,7 +191,6 @@ meta_default_plugin_class_init (MetaDefaultPluginClass *klass)
|
|||||||
gobject_class->set_property = meta_default_plugin_set_property;
|
gobject_class->set_property = meta_default_plugin_set_property;
|
||||||
gobject_class->get_property = meta_default_plugin_get_property;
|
gobject_class->get_property = meta_default_plugin_get_property;
|
||||||
|
|
||||||
plugin_class->start = start;
|
|
||||||
plugin_class->map = map;
|
plugin_class->map = map;
|
||||||
plugin_class->minimize = minimize;
|
plugin_class->minimize = minimize;
|
||||||
plugin_class->maximize = maximize;
|
plugin_class->maximize = maximize;
|
||||||
@@ -284,7 +253,8 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
|
|||||||
{
|
{
|
||||||
MetaPlugin *plugin = META_PLUGIN (data);
|
MetaPlugin *plugin = META_PLUGIN (data);
|
||||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
GList *l = meta_plugin_get_window_actors (plugin);
|
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||||
|
GList *l = meta_get_window_actors (screen);
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
@@ -317,6 +287,7 @@ switch_workspace (MetaPlugin *plugin,
|
|||||||
gint from, gint to,
|
gint from, gint to,
|
||||||
MetaMotionDirection direction)
|
MetaMotionDirection direction)
|
||||||
{
|
{
|
||||||
|
MetaScreen *screen;
|
||||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||||
GList *l;
|
GList *l;
|
||||||
ClutterActor *workspace0 = clutter_group_new ();
|
ClutterActor *workspace0 = clutter_group_new ();
|
||||||
@@ -325,11 +296,13 @@ switch_workspace (MetaPlugin *plugin,
|
|||||||
int screen_width, screen_height;
|
int screen_width, screen_height;
|
||||||
ClutterAnimation *animation;
|
ClutterAnimation *animation;
|
||||||
|
|
||||||
stage = meta_plugin_get_stage (plugin);
|
screen = meta_plugin_get_screen (plugin);
|
||||||
|
stage = meta_get_stage_for_screen (screen);
|
||||||
|
|
||||||
|
meta_screen_get_size (screen,
|
||||||
|
&screen_width,
|
||||||
|
&screen_height);
|
||||||
|
|
||||||
meta_plugin_query_screen_size (plugin,
|
|
||||||
&screen_width,
|
|
||||||
&screen_height);
|
|
||||||
clutter_actor_set_anchor_point (workspace1,
|
clutter_actor_set_anchor_point (workspace1,
|
||||||
screen_width,
|
screen_width,
|
||||||
screen_height);
|
screen_height);
|
||||||
@@ -348,7 +321,7 @@ switch_workspace (MetaPlugin *plugin,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
l = g_list_last (meta_plugin_get_window_actors (plugin));
|
l = g_list_last (meta_get_window_actors (screen));
|
||||||
|
|
||||||
while (l)
|
while (l)
|
||||||
{
|
{
|
||||||
@@ -446,12 +419,19 @@ static void
|
|||||||
minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
||||||
{
|
{
|
||||||
MetaWindowType type;
|
MetaWindowType type;
|
||||||
|
MetaRectangle icon_geometry;
|
||||||
MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);
|
MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);
|
||||||
ClutterActor *actor = CLUTTER_ACTOR (window_actor);
|
ClutterActor *actor = CLUTTER_ACTOR (window_actor);
|
||||||
|
|
||||||
|
|
||||||
type = meta_window_get_window_type (meta_window);
|
type = meta_window_get_window_type (meta_window);
|
||||||
|
|
||||||
|
if (!meta_window_get_icon_geometry(meta_window, &icon_geometry))
|
||||||
|
{
|
||||||
|
icon_geometry.x = 0;
|
||||||
|
icon_geometry.y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (type == META_WINDOW_NORMAL)
|
if (type == META_WINDOW_NORMAL)
|
||||||
{
|
{
|
||||||
ClutterAnimation *animation;
|
ClutterAnimation *animation;
|
||||||
@@ -468,6 +448,8 @@ minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
|||||||
MINIMIZE_TIMEOUT,
|
MINIMIZE_TIMEOUT,
|
||||||
"scale-x", 0.0,
|
"scale-x", 0.0,
|
||||||
"scale-y", 0.0,
|
"scale-y", 0.0,
|
||||||
|
"x", (double)icon_geometry.x,
|
||||||
|
"y", (double)icon_geometry.y,
|
||||||
NULL);
|
NULL);
|
||||||
apriv->tml_minimize = clutter_animation_get_timeline (animation);
|
apriv->tml_minimize = clutter_animation_get_timeline (animation);
|
||||||
data->plugin = plugin;
|
data->plugin = plugin;
|
||||||
|
@@ -43,25 +43,10 @@
|
|||||||
/* Optimium performance seems to be with MAX_CHUNK_RECTANGLES=4; 8 is about 10% slower.
|
/* Optimium performance seems to be with MAX_CHUNK_RECTANGLES=4; 8 is about 10% slower.
|
||||||
* But using 8 may be more robust to systems with slow malloc(). */
|
* But using 8 may be more robust to systems with slow malloc(). */
|
||||||
#define MAX_CHUNK_RECTANGLES 8
|
#define MAX_CHUNK_RECTANGLES 8
|
||||||
|
/* XXX: keep in sync with region-utils.h */
|
||||||
#define MAX_LEVELS 16
|
#define MAX_LEVELS 16
|
||||||
|
|
||||||
typedef struct
|
void
|
||||||
{
|
|
||||||
/* To merge regions in binary tree order, we need to keep track of
|
|
||||||
* the regions that we've already merged together at different
|
|
||||||
* levels of the tree. We fill in an array in the pattern:
|
|
||||||
*
|
|
||||||
* |a |
|
|
||||||
* |b |a |
|
|
||||||
* |c | |ab |
|
|
||||||
* |d |c |ab |
|
|
||||||
* |e | | |abcd|
|
|
||||||
*/
|
|
||||||
cairo_region_t *levels[MAX_LEVELS];
|
|
||||||
int n_levels;
|
|
||||||
} MetaRegionBuilder;
|
|
||||||
|
|
||||||
static void
|
|
||||||
meta_region_builder_init (MetaRegionBuilder *builder)
|
meta_region_builder_init (MetaRegionBuilder *builder)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -70,7 +55,7 @@ meta_region_builder_init (MetaRegionBuilder *builder)
|
|||||||
builder->n_levels = 1;
|
builder->n_levels = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
meta_region_builder_add_rectangle (MetaRegionBuilder *builder,
|
meta_region_builder_add_rectangle (MetaRegionBuilder *builder,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
@@ -115,7 +100,7 @@ meta_region_builder_add_rectangle (MetaRegionBuilder *builder,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static cairo_region_t *
|
cairo_region_t *
|
||||||
meta_region_builder_finish (MetaRegionBuilder *builder)
|
meta_region_builder_finish (MetaRegionBuilder *builder)
|
||||||
{
|
{
|
||||||
cairo_region_t *result = NULL;
|
cairo_region_t *result = NULL;
|
||||||
|
@@ -63,6 +63,34 @@ struct _MetaRegionIterator {
|
|||||||
cairo_rectangle_int_t next_rectangle;
|
cairo_rectangle_int_t next_rectangle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef struct _MetaRegionBuilder MetaRegionBuilder;
|
||||||
|
|
||||||
|
/* XXX: keep in sync with region-utils.c */
|
||||||
|
#define MAX_LEVELS 16
|
||||||
|
struct _MetaRegionBuilder {
|
||||||
|
/* To merge regions in binary tree order, we need to keep track of
|
||||||
|
* the regions that we've already merged together at different
|
||||||
|
* levels of the tree. We fill in an array in the pattern:
|
||||||
|
*
|
||||||
|
* |a |
|
||||||
|
* |b |a |
|
||||||
|
* |c | |ab |
|
||||||
|
* |d |c |ab |
|
||||||
|
* |e | | |abcd|
|
||||||
|
*/
|
||||||
|
cairo_region_t *levels[MAX_LEVELS];
|
||||||
|
int n_levels;
|
||||||
|
};
|
||||||
|
#undef MAX_LEVELS
|
||||||
|
|
||||||
|
void meta_region_builder_init (MetaRegionBuilder *builder);
|
||||||
|
void meta_region_builder_add_rectangle (MetaRegionBuilder *builder,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int width,
|
||||||
|
int height);
|
||||||
|
cairo_region_t * meta_region_builder_finish (MetaRegionBuilder *builder);
|
||||||
|
|
||||||
void meta_region_iterator_init (MetaRegionIterator *iter,
|
void meta_region_iterator_init (MetaRegionIterator *iter,
|
||||||
cairo_region_t *region);
|
cairo_region_t *region);
|
||||||
gboolean meta_region_iterator_at_end (MetaRegionIterator *iter);
|
gboolean meta_region_iterator_at_end (MetaRegionIterator *iter);
|
||||||
|
@@ -1,400 +0,0 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2008 Thomas Thurman
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful, but
|
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
||||||
* 02111-1307, USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of screen keybinding information.
|
|
||||||
*
|
|
||||||
* Each action which can have a keystroke bound to it is listed below.
|
|
||||||
* To use this file, define keybind() to be a seven-argument macro (you can
|
|
||||||
* throw any of the arguments you please away), include this file,
|
|
||||||
* and then undefine the macro again.
|
|
||||||
*
|
|
||||||
* (If you aren't familiar with this technique, sometimes called "x-macros",
|
|
||||||
* see DDJ of May 2001: <http://www.ddj.com/cpp/184401387>.)
|
|
||||||
*
|
|
||||||
* This makes it possible to keep all information about all the keybindings
|
|
||||||
* in the same place. The only exception is the code to run when an action
|
|
||||||
* is actually invoked; while we *could* have put that in this file, it would
|
|
||||||
* have made debugging ridiculously difficult. Instead, each action should
|
|
||||||
* have a corresponding static function named handle_<name>() in
|
|
||||||
* keybindings.c.
|
|
||||||
*
|
|
||||||
* The arguments to keybind() are:
|
|
||||||
* 1) the name of the binding; a bareword identifier
|
|
||||||
* (it's fine if it happens to clash with a C reserved word)
|
|
||||||
* 2) the name of the function which implements it.
|
|
||||||
* Clearly we could have guessed this from the binding very often,
|
|
||||||
* but we choose to write it in full for the benefit of grep.
|
|
||||||
* 3) an integer parameter to pass to the handler
|
|
||||||
* 4) a set of boolean flags, ORed together:
|
|
||||||
* BINDING_PER_WINDOW - this is a window-based binding.
|
|
||||||
* It is only valid if there is a
|
|
||||||
* current window, and will operate in
|
|
||||||
* some way on that window.
|
|
||||||
* BINDING_REVERSES - the binding can reverse if you hold down Shift
|
|
||||||
* BINDING_IS_REVERSED - the same, but the senses are reversed from the
|
|
||||||
* handler's point of view (let me know if I should
|
|
||||||
* explain this better)
|
|
||||||
* or 0 if no flag applies.
|
|
||||||
*
|
|
||||||
* 5) a string representing the default binding.
|
|
||||||
* If this is NULL, the action is unbound by default.
|
|
||||||
* Please use NULL and not "disabled".
|
|
||||||
* 6) a short description.
|
|
||||||
* It must be marked translatable (i.e. inside "_(...)").
|
|
||||||
*
|
|
||||||
* Don't try to do XML entity escaping anywhere in the strings.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef keybind
|
|
||||||
#error "keybind () must be defined when you include screen-bindings.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
#ifndef _BINDINGS_DEFINED_CONSTANTS
|
|
||||||
#define _BINDINGS_DEFINED_CONSTANTS 1
|
|
||||||
|
|
||||||
#define BINDING_PER_WINDOW 0x01
|
|
||||||
#define BINDING_REVERSES 0x02
|
|
||||||
#define BINDING_IS_REVERSED 0x04
|
|
||||||
|
|
||||||
#endif /* _BINDINGS_DEFINED_CONSTANTS */
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
/* convenience, since in this file they must always be set together */
|
|
||||||
#define REVERSES_AND_REVERSED (BINDING_REVERSES | BINDING_IS_REVERSED)
|
|
||||||
|
|
||||||
keybind (switch_to_workspace_1, handle_switch_to_workspace, 0, 0, NULL,
|
|
||||||
_("Switch to workspace 1"))
|
|
||||||
keybind (switch_to_workspace_2, handle_switch_to_workspace, 1, 0, NULL,
|
|
||||||
_("Switch to workspace 2"))
|
|
||||||
keybind (switch_to_workspace_3, handle_switch_to_workspace, 2, 0, NULL,
|
|
||||||
_("Switch to workspace 3"))
|
|
||||||
keybind (switch_to_workspace_4, handle_switch_to_workspace, 3, 0, NULL,
|
|
||||||
_("Switch to workspace 4"))
|
|
||||||
keybind (switch_to_workspace_5, handle_switch_to_workspace, 4, 0, NULL,
|
|
||||||
_("Switch to workspace 5"))
|
|
||||||
keybind (switch_to_workspace_6, handle_switch_to_workspace, 5, 0, NULL,
|
|
||||||
_("Switch to workspace 6"))
|
|
||||||
keybind (switch_to_workspace_7, handle_switch_to_workspace, 6, 0, NULL,
|
|
||||||
_("Switch to workspace 7"))
|
|
||||||
keybind (switch_to_workspace_8, handle_switch_to_workspace, 7, 0, NULL,
|
|
||||||
_("Switch to workspace 8"))
|
|
||||||
keybind (switch_to_workspace_9, handle_switch_to_workspace, 8, 0, NULL,
|
|
||||||
_("Switch to workspace 9"))
|
|
||||||
keybind (switch_to_workspace_10, handle_switch_to_workspace, 9, 0, NULL,
|
|
||||||
_("Switch to workspace 10"))
|
|
||||||
keybind (switch_to_workspace_11, handle_switch_to_workspace, 10, 0, NULL,
|
|
||||||
_("Switch to workspace 11"))
|
|
||||||
keybind (switch_to_workspace_12, handle_switch_to_workspace, 11, 0, NULL,
|
|
||||||
_("Switch to workspace 12"))
|
|
||||||
|
|
||||||
/* META_MOTION_* are negative, and so distinct from workspace numbers,
|
|
||||||
* which are always zero or positive.
|
|
||||||
* If you make use of these constants, you will need to include workspace.h
|
|
||||||
* (which you're probably using already for other reasons anyway).
|
|
||||||
* If your definition of keybind() throws them away, you don't need to include
|
|
||||||
* workspace.h, of course.
|
|
||||||
*/
|
|
||||||
|
|
||||||
keybind (switch_to_workspace_left, handle_switch_to_workspace,
|
|
||||||
META_MOTION_LEFT, 0, "<Control><Alt>Left",
|
|
||||||
_("Switch to workspace on the left of the current workspace"))
|
|
||||||
|
|
||||||
keybind (switch_to_workspace_right, handle_switch_to_workspace,
|
|
||||||
META_MOTION_RIGHT, 0, "<Control><Alt>Right",
|
|
||||||
_("Switch to workspace on the right of the current workspace"))
|
|
||||||
|
|
||||||
keybind (switch_to_workspace_up, handle_switch_to_workspace,
|
|
||||||
META_MOTION_UP, 0, "<Control><Alt>Up",
|
|
||||||
_("Switch to workspace above the current workspace"))
|
|
||||||
|
|
||||||
keybind (switch_to_workspace_down, handle_switch_to_workspace,
|
|
||||||
META_MOTION_DOWN, 0, "<Control><Alt>Down",
|
|
||||||
_("Switch to workspace below the current workspace"))
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
/* The ones which have inverses. These can't be bound to any keystroke
|
|
||||||
* containing Shift because Shift will invert their "backward" state.
|
|
||||||
*
|
|
||||||
* TODO: "NORMAL" and "DOCKS" should be renamed to the same name as their
|
|
||||||
* action, for obviousness.
|
|
||||||
*
|
|
||||||
* TODO: handle_switch and handle_cycle should probably really be the
|
|
||||||
* same function checking a bit in the parameter for difference.
|
|
||||||
*/
|
|
||||||
|
|
||||||
keybind (switch_group, handle_switch, META_TAB_LIST_GROUP,
|
|
||||||
BINDING_REVERSES, "<Alt>Above_Tab",
|
|
||||||
_("Move between windows of an application, using a popup window"))
|
|
||||||
keybind (switch_group_backward, handle_switch, META_TAB_LIST_GROUP,
|
|
||||||
REVERSES_AND_REVERSED, NULL,
|
|
||||||
_("Move backward between windows of an application, "
|
|
||||||
"using a popup window"))
|
|
||||||
keybind (switch_windows, handle_switch, META_TAB_LIST_NORMAL,
|
|
||||||
BINDING_REVERSES, "<Alt>Tab",
|
|
||||||
_("Move between windows, using a popup window"))
|
|
||||||
keybind (switch_windows_backward, handle_switch, META_TAB_LIST_NORMAL,
|
|
||||||
REVERSES_AND_REVERSED, NULL,
|
|
||||||
_("Move backward between windows, using a popup window"))
|
|
||||||
keybind (switch_panels, handle_switch, META_TAB_LIST_DOCKS,
|
|
||||||
BINDING_REVERSES, "<Control><Alt>Tab",
|
|
||||||
_("Move between panels and the desktop, using a popup window"))
|
|
||||||
keybind (switch_panels_backward, handle_switch, META_TAB_LIST_DOCKS,
|
|
||||||
REVERSES_AND_REVERSED, NULL,
|
|
||||||
_("Move backward between panels and the desktop, "
|
|
||||||
"using a popup window"))
|
|
||||||
|
|
||||||
keybind (cycle_group, handle_cycle, META_TAB_LIST_GROUP,
|
|
||||||
BINDING_REVERSES, "<Alt>F6",
|
|
||||||
_("Move between windows of an application immediately"))
|
|
||||||
keybind (cycle_group_backward, handle_cycle, META_TAB_LIST_GROUP,
|
|
||||||
REVERSES_AND_REVERSED, NULL,
|
|
||||||
_("Move backward between windows of an application immediately"))
|
|
||||||
keybind (cycle_windows, handle_cycle, META_TAB_LIST_NORMAL,
|
|
||||||
BINDING_REVERSES, "<Alt>Escape",
|
|
||||||
_("Move between windows immediately"))
|
|
||||||
keybind (cycle_windows_backward, handle_cycle, META_TAB_LIST_NORMAL,
|
|
||||||
REVERSES_AND_REVERSED, NULL,
|
|
||||||
_("Move backward between windows immediately"))
|
|
||||||
keybind (cycle_panels, handle_cycle, META_TAB_LIST_DOCKS,
|
|
||||||
BINDING_REVERSES, "<Control><Alt>Escape",
|
|
||||||
_("Move between panels and the desktop immediately"))
|
|
||||||
keybind (cycle_panels_backward, handle_cycle, META_TAB_LIST_DOCKS,
|
|
||||||
REVERSES_AND_REVERSED, NULL,
|
|
||||||
_("Move backward between panels and the desktop immediately"))
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
/* These two are special pseudo-bindings that are provided for allowing
|
|
||||||
* custom handlers, but will never be bound to a key. While a tab
|
|
||||||
* grab is in effect, they are invoked for releasing the primary modifier
|
|
||||||
* or pressing some unbound key, respectively.
|
|
||||||
*/
|
|
||||||
keybind (tab_popup_select, handle_tab_popup_select, 0, 0, NULL,
|
|
||||||
"Select window from tab popup")
|
|
||||||
keybind (tab_popup_cancel, handle_tab_popup_cancel, 0, 0, NULL,
|
|
||||||
"Cancel tab popup")
|
|
||||||
|
|
||||||
/***********************************/
|
|
||||||
|
|
||||||
keybind (show_desktop, handle_show_desktop, 0, 0, "<Control><Alt>d",
|
|
||||||
_("Hide all normal windows and set focus to the desktop"))
|
|
||||||
keybind (panel_main_menu, handle_panel,
|
|
||||||
META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "<Alt>F1",
|
|
||||||
_("Show the panel's main menu"))
|
|
||||||
keybind (panel_run_dialog, handle_panel,
|
|
||||||
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Alt>F2",
|
|
||||||
_("Show the panel's \"Run Application\" dialog box"))
|
|
||||||
keybind (toggle_recording, handle_toggle_recording, 0, 0, "<Control><Shift><Alt>r",
|
|
||||||
_("Start or stop recording the session"))
|
|
||||||
|
|
||||||
/* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
|
|
||||||
* at some point.) The description is NULL here because the stanza is
|
|
||||||
* irregularly shaped in mutter.schemas.in. This will probably be fixed
|
|
||||||
* as well.
|
|
||||||
*/
|
|
||||||
keybind (run_command_1, handle_run_command, 0, 0, NULL, NULL)
|
|
||||||
keybind (run_command_2, handle_run_command, 1, 0, NULL, NULL)
|
|
||||||
keybind (run_command_3, handle_run_command, 2, 0, NULL, NULL)
|
|
||||||
keybind (run_command_4, handle_run_command, 3, 0, NULL, NULL)
|
|
||||||
keybind (run_command_5, handle_run_command, 4, 0, NULL, NULL)
|
|
||||||
keybind (run_command_6, handle_run_command, 5, 0, NULL, NULL)
|
|
||||||
keybind (run_command_7, handle_run_command, 6, 0, NULL, NULL)
|
|
||||||
keybind (run_command_8, handle_run_command, 7, 0, NULL, NULL)
|
|
||||||
keybind (run_command_9, handle_run_command, 8, 0, NULL, NULL)
|
|
||||||
keybind (run_command_10, handle_run_command, 9, 0, NULL, NULL)
|
|
||||||
keybind (run_command_11, handle_run_command, 10, 0, NULL, NULL)
|
|
||||||
keybind (run_command_12, handle_run_command, 11, 0, NULL, NULL)
|
|
||||||
keybind (run_command_13, handle_run_command, 12, 0, NULL, NULL)
|
|
||||||
keybind (run_command_14, handle_run_command, 13, 0, NULL, NULL)
|
|
||||||
keybind (run_command_15, handle_run_command, 14, 0, NULL, NULL)
|
|
||||||
keybind (run_command_16, handle_run_command, 15, 0, NULL, NULL)
|
|
||||||
keybind (run_command_17, handle_run_command, 16, 0, NULL, NULL)
|
|
||||||
keybind (run_command_18, handle_run_command, 17, 0, NULL, NULL)
|
|
||||||
keybind (run_command_19, handle_run_command, 18, 0, NULL, NULL)
|
|
||||||
keybind (run_command_20, handle_run_command, 19, 0, NULL, NULL)
|
|
||||||
keybind (run_command_21, handle_run_command, 20, 0, NULL, NULL)
|
|
||||||
keybind (run_command_22, handle_run_command, 21, 0, NULL, NULL)
|
|
||||||
keybind (run_command_23, handle_run_command, 22, 0, NULL, NULL)
|
|
||||||
keybind (run_command_24, handle_run_command, 23, 0, NULL, NULL)
|
|
||||||
keybind (run_command_25, handle_run_command, 24, 0, NULL, NULL)
|
|
||||||
keybind (run_command_26, handle_run_command, 25, 0, NULL, NULL)
|
|
||||||
keybind (run_command_27, handle_run_command, 26, 0, NULL, NULL)
|
|
||||||
keybind (run_command_28, handle_run_command, 27, 0, NULL, NULL)
|
|
||||||
keybind (run_command_29, handle_run_command, 28, 0, NULL, NULL)
|
|
||||||
keybind (run_command_30, handle_run_command, 29, 0, NULL, NULL)
|
|
||||||
keybind (run_command_31, handle_run_command, 30, 0, NULL, NULL)
|
|
||||||
keybind (run_command_32, handle_run_command, 31, 0, NULL, NULL)
|
|
||||||
|
|
||||||
keybind (run_command_screenshot, handle_run_command, 32, 0, "Print",
|
|
||||||
_("Take a screenshot"))
|
|
||||||
keybind (run_command_window_screenshot, handle_run_command, 33, 0,"<Alt>Print",
|
|
||||||
_("Take a screenshot of a window"))
|
|
||||||
|
|
||||||
keybind (run_command_terminal, handle_run_terminal, 0, 0, NULL, _("Run a terminal"))
|
|
||||||
|
|
||||||
/* No description because this is undocumented */
|
|
||||||
keybind (set_spew_mark, handle_set_spew_mark, 0, 0, NULL, NULL)
|
|
||||||
|
|
||||||
#undef REVERSES_AND_REVERSED
|
|
||||||
|
|
||||||
/************************ PER WINDOW BINDINGS ************************/
|
|
||||||
|
|
||||||
/* These take a window as an extra parameter; they have no effect
|
|
||||||
* if no window is active.
|
|
||||||
*/
|
|
||||||
|
|
||||||
keybind (activate_window_menu, handle_activate_window_menu, 0,
|
|
||||||
BINDING_PER_WINDOW, "<Alt>space",
|
|
||||||
_("Activate the window menu"))
|
|
||||||
keybind (toggle_fullscreen, handle_toggle_fullscreen, 0, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Toggle fullscreen mode"))
|
|
||||||
keybind (toggle_maximized, handle_toggle_maximized, 0, BINDING_PER_WINDOW, "<Alt>F10",
|
|
||||||
_("Toggle maximization state"))
|
|
||||||
keybind (toggle_above, handle_toggle_above, 0, BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Toggle whether a window will always be visible over other windows"))
|
|
||||||
keybind (maximize, handle_maximize, 0, BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Maximize window"))
|
|
||||||
keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW, "<Alt>F5",
|
|
||||||
_("Restore window"))
|
|
||||||
keybind (toggle_shaded, handle_toggle_shaded, 0, BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Toggle shaded state"))
|
|
||||||
keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "<Alt>F9",
|
|
||||||
_("Minimize window"))
|
|
||||||
keybind (close, handle_close, 0, BINDING_PER_WINDOW, "<Alt>F4",
|
|
||||||
_("Close window"))
|
|
||||||
keybind (begin_move, handle_begin_move, 0, BINDING_PER_WINDOW, "<Alt>F7",
|
|
||||||
_("Move window"))
|
|
||||||
keybind (begin_resize, handle_begin_resize, 0, BINDING_PER_WINDOW, "<Alt>F8",
|
|
||||||
_("Resize window"))
|
|
||||||
keybind (toggle_on_all_workspaces, handle_toggle_on_all_workspaces, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Toggle whether window is on all workspaces or just one"))
|
|
||||||
|
|
||||||
keybind (move_to_workspace_1, handle_move_to_workspace, 0, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 1"))
|
|
||||||
keybind (move_to_workspace_2, handle_move_to_workspace, 1, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 2"))
|
|
||||||
keybind (move_to_workspace_3, handle_move_to_workspace, 2, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 3"))
|
|
||||||
keybind (move_to_workspace_4, handle_move_to_workspace, 3, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 4"))
|
|
||||||
keybind (move_to_workspace_5, handle_move_to_workspace, 4, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 5"))
|
|
||||||
keybind (move_to_workspace_6, handle_move_to_workspace, 5, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 6"))
|
|
||||||
keybind (move_to_workspace_7, handle_move_to_workspace, 6, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 7"))
|
|
||||||
keybind (move_to_workspace_8, handle_move_to_workspace, 7, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 8"))
|
|
||||||
keybind (move_to_workspace_9, handle_move_to_workspace, 8, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 9"))
|
|
||||||
keybind (move_to_workspace_10, handle_move_to_workspace, 9, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 10"))
|
|
||||||
keybind (move_to_workspace_11, handle_move_to_workspace, 10, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 11"))
|
|
||||||
keybind (move_to_workspace_12, handle_move_to_workspace, 11, BINDING_PER_WINDOW,
|
|
||||||
NULL,
|
|
||||||
_("Move window to workspace 12"))
|
|
||||||
|
|
||||||
/* META_MOTION_* are negative, and so distinct from workspace numbers,
|
|
||||||
* which are always zero or positive.
|
|
||||||
* If you make use of these constants, you will need to include workspace.h
|
|
||||||
* (which you're probably using already for other reasons anyway).
|
|
||||||
* If your definition of keybind() throws them away, you don't need to include
|
|
||||||
* workspace.h, of course.
|
|
||||||
*/
|
|
||||||
|
|
||||||
keybind (move_to_workspace_left, handle_move_to_workspace,
|
|
||||||
META_MOTION_LEFT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Left",
|
|
||||||
_("Move window one workspace to the left"))
|
|
||||||
keybind (move_to_workspace_right, handle_move_to_workspace,
|
|
||||||
META_MOTION_RIGHT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Right",
|
|
||||||
_("Move window one workspace to the right"))
|
|
||||||
keybind (move_to_workspace_up, handle_move_to_workspace,
|
|
||||||
META_MOTION_UP, BINDING_PER_WINDOW, "<Control><Shift><Alt>Up",
|
|
||||||
_("Move window one workspace up"))
|
|
||||||
keybind (move_to_workspace_down, handle_move_to_workspace,
|
|
||||||
META_MOTION_DOWN, BINDING_PER_WINDOW, "<Control><Shift><Alt>Down",
|
|
||||||
_("Move window one workspace down"))
|
|
||||||
|
|
||||||
keybind (raise_or_lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Raise window if it's covered by another window, otherwise lower it"))
|
|
||||||
keybind (raise, handle_raise, 0, BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Raise window above other windows"))
|
|
||||||
keybind (lower, handle_lower, 0, BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Lower window below other windows"))
|
|
||||||
|
|
||||||
keybind (maximize_vertically, handle_maximize_vertically, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Maximize window vertically"))
|
|
||||||
|
|
||||||
keybind (maximize_horizontally, handle_maximize_horizontally, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Maximize window horizontally"))
|
|
||||||
|
|
||||||
keybind (move_to_corner_nw, handle_move_to_corner_nw, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to north-west (top left) corner"))
|
|
||||||
keybind (move_to_corner_ne, handle_move_to_corner_ne, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to north-east (top right) corner"))
|
|
||||||
keybind (move_to_corner_sw, handle_move_to_corner_sw, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to south-west (bottom left) corner"))
|
|
||||||
keybind (move_to_corner_se, handle_move_to_corner_se, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to south-east (bottom right) corner"))
|
|
||||||
|
|
||||||
keybind (move_to_side_n, handle_move_to_side_n, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to north (top) side of screen"))
|
|
||||||
keybind (move_to_side_s, handle_move_to_side_s, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to south (bottom) side of screen"))
|
|
||||||
keybind (move_to_side_e, handle_move_to_side_e, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to east (right) side of screen"))
|
|
||||||
keybind (move_to_side_w, handle_move_to_side_w, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to west (left) side of screen"))
|
|
||||||
keybind (move_to_center, handle_move_to_center, 0,
|
|
||||||
BINDING_PER_WINDOW, NULL,
|
|
||||||
_("Move window to center of screen"))
|
|
||||||
|
|
||||||
/* eof all-keybindings.h */
|
|
||||||
|
|
@@ -23,7 +23,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file bell.c Ring the bell or flash the screen
|
* SECTION:Bell
|
||||||
|
* @short_description: Ring the bell or flash the screen
|
||||||
*
|
*
|
||||||
* Sometimes, X programs "ring the bell", whatever that means. Mutter lets
|
* Sometimes, X programs "ring the bell", whatever that means. Mutter lets
|
||||||
* the user configure the bell to be audible or visible (aka visual), and
|
* the user configure the bell to be audible or visible (aka visual), and
|
||||||
@@ -57,6 +58,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* bell_flash_screen:
|
||||||
|
* @display: The display which owns the screen (rather redundant)
|
||||||
|
* @screen: The screen to flash
|
||||||
|
*
|
||||||
* Flashes one entire screen. This is done by making a window the size of the
|
* Flashes one entire screen. This is done by making a window the size of the
|
||||||
* whole screen (or reusing the old one, if it's still around), mapping it,
|
* whole screen (or reusing the old one, if it's still around), mapping it,
|
||||||
* painting it white and then black, and then unmapping it. We set saveunder so
|
* painting it white and then black, and then unmapping it. We set saveunder so
|
||||||
@@ -65,14 +70,12 @@
|
|||||||
* Unlike frame flashes, we don't do fullscreen flashes with a timeout; rather,
|
* Unlike frame flashes, we don't do fullscreen flashes with a timeout; rather,
|
||||||
* we do them in one go, because we don't have to rely on the theme code
|
* we do them in one go, because we don't have to rely on the theme code
|
||||||
* redrawing the frame for us in order to do the flash.
|
* redrawing the frame for us in order to do the flash.
|
||||||
*
|
*/
|
||||||
* \param display The display which owns the screen (rather redundant)
|
/*
|
||||||
* \param screen The screen to flash
|
* Bug: The way I read it, this appears not to do the flash
|
||||||
*
|
|
||||||
* \bug The way I read it, this appears not to do the flash
|
|
||||||
* the first time we flash a particular display. Am I wrong?
|
* the first time we flash a particular display. Am I wrong?
|
||||||
*
|
*
|
||||||
* \bug This appears to destroy our current XSync status.
|
* Bug: This appears to destroy our current XSync status.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
bell_flash_screen (MetaDisplay *display,
|
bell_flash_screen (MetaDisplay *display,
|
||||||
@@ -130,21 +133,22 @@ bell_flash_screen (MetaDisplay *display,
|
|||||||
XFreeGC (display->xdisplay, gc);
|
XFreeGC (display->xdisplay, gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK &&
|
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK &&
|
||||||
!display->mouse_mode)
|
!display->mouse_mode)
|
||||||
meta_display_increment_focus_sentinel (display);
|
meta_display_increment_focus_sentinel (display);
|
||||||
XFlush (display->xdisplay);
|
XFlush (display->xdisplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* bell_flash_fullscreen:
|
||||||
|
* @display: The display the event came in on
|
||||||
|
* @xkb_ev: The bell event
|
||||||
|
*
|
||||||
* Flashes one screen, or all screens, in response to a bell event.
|
* Flashes one screen, or all screens, in response to a bell event.
|
||||||
* If the event is on a particular window, flash the screen that
|
* If the event is on a particular window, flash the screen that
|
||||||
* window is on. Otherwise, flash every screen on this display.
|
* window is on. Otherwise, flash every screen on this display.
|
||||||
*
|
*
|
||||||
* If the configure script found we had no XKB, this does not exist.
|
* If the configure script found we had no XKB, this does not exist.
|
||||||
*
|
|
||||||
* \param display The display the event came in on
|
|
||||||
* \param xkb_ev The bell event
|
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_XKB
|
#ifdef HAVE_XKB
|
||||||
static void
|
static void
|
||||||
@@ -182,17 +186,21 @@ bell_flash_fullscreen (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* bell_unflash_frame:
|
||||||
|
* @data: The frame to unflash, cast to a gpointer so it can go into
|
||||||
|
* a callback function.
|
||||||
|
*
|
||||||
* Makes a frame be not flashed; this is the timeout half of
|
* Makes a frame be not flashed; this is the timeout half of
|
||||||
* bell_flash_window_frame(). This is done simply by clearing the
|
* bell_flash_window_frame(). This is done simply by clearing the
|
||||||
* flash flag and queuing a redraw of the frame.
|
* flash flag and queuing a redraw of the frame.
|
||||||
*
|
*
|
||||||
* If the configure script found we had no XKB, this does not exist.
|
* If the configure script found we had no XKB, this does not exist.
|
||||||
*
|
*
|
||||||
* \param data The frame to unflash, cast to a gpointer so it can go into
|
* Returns: Always FALSE, so we don't get called again.
|
||||||
* a callback function.
|
*/
|
||||||
* \return Always FALSE, so we don't get called again.
|
|
||||||
*
|
/*
|
||||||
* \bug This is the parallel to bell_flash_window_frame(), so it should
|
* Bug: This is the parallel to bell_flash_window_frame(), so it should
|
||||||
* really be called meta_bell_unflash_window_frame().
|
* really be called meta_bell_unflash_window_frame().
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -205,6 +213,9 @@ bell_unflash_frame (gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* bell_flash_window_frame:
|
||||||
|
* @window: The window to flash
|
||||||
|
*
|
||||||
* Makes a frame flash and then return to normal shortly afterwards.
|
* Makes a frame flash and then return to normal shortly afterwards.
|
||||||
* This is done by setting a flag so that the theme
|
* This is done by setting a flag so that the theme
|
||||||
* code will temporarily draw the frame as focussed if it's unfocussed and
|
* code will temporarily draw the frame as focussed if it's unfocussed and
|
||||||
@@ -212,8 +223,6 @@ bell_unflash_frame (gpointer data)
|
|||||||
* that the flag can be unset and the frame re-redrawn.
|
* that the flag can be unset and the frame re-redrawn.
|
||||||
*
|
*
|
||||||
* If the configure script found we had no XKB, this does not exist.
|
* If the configure script found we had no XKB, this does not exist.
|
||||||
*
|
|
||||||
* \param window The window to flash
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
bell_flash_window_frame (MetaWindow *window)
|
bell_flash_window_frame (MetaWindow *window)
|
||||||
@@ -231,11 +240,12 @@ bell_flash_window_frame (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* bell_flash_frame:
|
||||||
|
* @display: The display the bell event came in on
|
||||||
|
* @xkb_ev: The bell event we just received
|
||||||
|
*
|
||||||
* Flashes the frame of the focussed window. If there is no focussed window,
|
* Flashes the frame of the focussed window. If there is no focussed window,
|
||||||
* flashes the screen.
|
* flashes the screen.
|
||||||
*
|
|
||||||
* \param display The display the bell event came in on
|
|
||||||
* \param xkb_ev The bell event we just received
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
bell_flash_frame (MetaDisplay *display,
|
bell_flash_frame (MetaDisplay *display,
|
||||||
@@ -261,15 +271,18 @@ bell_flash_frame (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* bell_visual_notify:
|
||||||
|
* @display: The display the bell event came in on
|
||||||
|
* @xkb_ev: The bell event we just received
|
||||||
|
*
|
||||||
* Gives the user some kind of visual bell substitute, in response to a
|
* Gives the user some kind of visual bell substitute, in response to a
|
||||||
* bell event. What this is depends on the "visual bell type" pref.
|
* bell event. What this is depends on the "visual bell type" pref.
|
||||||
*
|
*
|
||||||
* If the configure script found we had no XKB, this does not exist.
|
* If the configure script found we had no XKB, this does not exist.
|
||||||
*
|
*/
|
||||||
* \param display The display the bell event came in on
|
|
||||||
* \param xkb_ev The bell event we just received
|
/*
|
||||||
*
|
* Bug: This should be merged with meta_bell_notify().
|
||||||
* \bug This should be merged with meta_bell_notify().
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
bell_visual_notify (MetaDisplay *display,
|
bell_visual_notify (MetaDisplay *display,
|
||||||
@@ -277,15 +290,12 @@ bell_visual_notify (MetaDisplay *display,
|
|||||||
{
|
{
|
||||||
switch (meta_prefs_get_visual_bell_type ())
|
switch (meta_prefs_get_visual_bell_type ())
|
||||||
{
|
{
|
||||||
case META_VISUAL_BELL_FULLSCREEN_FLASH:
|
case G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH:
|
||||||
bell_flash_fullscreen (display, xkb_ev);
|
bell_flash_fullscreen (display, xkb_ev);
|
||||||
break;
|
break;
|
||||||
case META_VISUAL_BELL_FRAME_FLASH:
|
case G_DESKTOP_VISUAL_BELL_FRAME_FLASH:
|
||||||
bell_flash_frame (display, xkb_ev); /* does nothing yet */
|
bell_flash_frame (display, xkb_ev); /* does nothing yet */
|
||||||
break;
|
break;
|
||||||
case META_VISUAL_BELL_INVALID:
|
|
||||||
/* do nothing */
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -294,7 +304,7 @@ meta_bell_notify (MetaDisplay *display,
|
|||||||
XkbAnyEvent *xkb_ev)
|
XkbAnyEvent *xkb_ev)
|
||||||
{
|
{
|
||||||
/* flash something */
|
/* flash something */
|
||||||
if (meta_prefs_get_visual_bell ())
|
if (meta_prefs_get_visual_bell ())
|
||||||
bell_visual_notify (display, xkb_ev);
|
bell_visual_notify (display, xkb_ev);
|
||||||
|
|
||||||
#ifdef HAVE_LIBCANBERRA
|
#ifdef HAVE_LIBCANBERRA
|
||||||
@@ -410,12 +420,13 @@ meta_bell_shutdown (MetaDisplay *display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_bell_notify_frame_destroy:
|
||||||
|
* @frame: The frame which is being destroyed
|
||||||
|
*
|
||||||
* Deals with a frame being destroyed. This is important because if we're
|
* Deals with a frame being destroyed. This is important because if we're
|
||||||
* using a visual bell, we might be flashing the edges of the frame, and
|
* using a visual bell, we might be flashing the edges of the frame, and
|
||||||
* so we'd have a timeout function waiting ready to un-flash them. If the
|
* so we'd have a timeout function waiting ready to un-flash them. If the
|
||||||
* frame's going away, we can tell the timeout not to bother.
|
* frame's going away, we can tell the timeout not to bother.
|
||||||
*
|
|
||||||
* \param frame The frame which is being destroyed
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_bell_notify_frame_destroy (MetaFrame *frame)
|
meta_bell_notify_frame_destroy (MetaFrame *frame)
|
||||||
|
@@ -1,17 +1,5 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
/**
|
|
||||||
* \file bell.h Ring the bell or flash the screen
|
|
||||||
*
|
|
||||||
* Sometimes, X programs "ring the bell", whatever that means. Mutter lets
|
|
||||||
* the user configure the bell to be audible or visible (aka visual), and
|
|
||||||
* if it's visual it can be configured to be frame-flash or fullscreen-flash.
|
|
||||||
* We never get told about audible bells; X handles them just fine by itself.
|
|
||||||
*
|
|
||||||
* The visual bell was the result of a discussion in Bugzilla here:
|
|
||||||
* <http://bugzilla.gnome.org/show_bug.cgi?id=99886>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2002 Sun Microsystems Inc.
|
* Copyright (C) 2002 Sun Microsystems Inc.
|
||||||
*
|
*
|
||||||
|
@@ -625,7 +625,6 @@ meta_rectangle_get_minimal_spanning_set_for_region (
|
|||||||
*temp_rect = *basic_rect;
|
*temp_rect = *basic_rect;
|
||||||
ret = g_list_prepend (NULL, temp_rect);
|
ret = g_list_prepend (NULL, temp_rect);
|
||||||
|
|
||||||
strut_iter = all_struts;
|
|
||||||
for (strut_iter = all_struts; strut_iter; strut_iter = strut_iter->next)
|
for (strut_iter = all_struts; strut_iter; strut_iter = strut_iter->next)
|
||||||
{
|
{
|
||||||
GList *rect_iter;
|
GList *rect_iter;
|
||||||
|
@@ -439,9 +439,13 @@ setup_constraint_info (ConstraintInfo *info,
|
|||||||
monitor_info->number);
|
monitor_info->number);
|
||||||
|
|
||||||
/* Workaround braindead legacy apps that don't know how to
|
/* Workaround braindead legacy apps that don't know how to
|
||||||
* fullscreen themselves properly.
|
* fullscreen themselves properly - don't get fooled by
|
||||||
|
* windows which hide their titlebar when maximized; that's
|
||||||
|
* not the same as fullscreen, even if there are no struts
|
||||||
|
* making the workarea smaller than the monitor.
|
||||||
*/
|
*/
|
||||||
if (meta_prefs_get_force_fullscreen() &&
|
if (meta_prefs_get_force_fullscreen() &&
|
||||||
|
!window->hide_titlebar_when_maximized &&
|
||||||
meta_rectangle_equal (new, &monitor_info->rect) &&
|
meta_rectangle_equal (new, &monitor_info->rect) &&
|
||||||
window->has_fullscreen_func &&
|
window->has_fullscreen_func &&
|
||||||
!window->fullscreen)
|
!window->fullscreen)
|
||||||
@@ -569,7 +573,7 @@ place_window_if_needed(MetaWindow *window,
|
|||||||
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
||||||
|
|
||||||
/* maximization may have changed frame geometry */
|
/* maximization may have changed frame geometry */
|
||||||
if (window->frame && !window->fullscreen)
|
if (!window->fullscreen)
|
||||||
meta_frame_calc_borders (window->frame, info->borders);
|
meta_frame_calc_borders (window->frame, info->borders);
|
||||||
|
|
||||||
if (window->fullscreen_after_placement)
|
if (window->fullscreen_after_placement)
|
||||||
@@ -805,8 +809,14 @@ constrain_maximization (MetaWindow *window,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
/* Calculate target_size = maximized size of (window + frame) */
|
/* Calculate target_size = maximized size of (window + frame) */
|
||||||
if (window->maximized_horizontally && window->maximized_vertically)
|
if (META_WINDOW_TILED_MAXIMIZED (window))
|
||||||
target_size = info->work_area_monitor;
|
{
|
||||||
|
meta_window_get_current_tile_area (window, &target_size);
|
||||||
|
}
|
||||||
|
else if (META_WINDOW_MAXIMIZED (window))
|
||||||
|
{
|
||||||
|
target_size = info->work_area_monitor;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Amount of maximization possible in a single direction depends
|
/* Amount of maximization possible in a single direction depends
|
||||||
|
@@ -212,7 +212,7 @@ lower_window_and_transients (MetaWindow *window,
|
|||||||
|
|
||||||
meta_window_foreach_transient (window, lower_window_and_transients, NULL);
|
meta_window_foreach_transient (window, lower_window_and_transients, NULL);
|
||||||
|
|
||||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
|
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
|
||||||
meta_prefs_get_raise_on_click ())
|
meta_prefs_get_raise_on_click ())
|
||||||
{
|
{
|
||||||
/* Move window to the back of the focusing workspace's MRU list.
|
/* Move window to the back of the focusing workspace's MRU list.
|
||||||
@@ -538,70 +538,70 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
|||||||
break;
|
break;
|
||||||
case META_MENU_OP_UNSTICK:
|
case META_MENU_OP_UNSTICK:
|
||||||
case META_MENU_OP_STICK:
|
case META_MENU_OP_STICK:
|
||||||
name = "toggle_on_all_workspaces";
|
name = "toggle-on-all-workspaces";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_ABOVE:
|
case META_MENU_OP_ABOVE:
|
||||||
case META_MENU_OP_UNABOVE:
|
case META_MENU_OP_UNABOVE:
|
||||||
name = "toggle_above";
|
name = "toggle-above";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_WORKSPACES:
|
case META_MENU_OP_WORKSPACES:
|
||||||
switch (workspace)
|
switch (workspace)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
name = "move_to_workspace_1";
|
name = "move-to-workspace-1";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
name = "move_to_workspace_2";
|
name = "move-to-workspace-2";
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
name = "move_to_workspace_3";
|
name = "move-to-workspace-3";
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
name = "move_to_workspace_4";
|
name = "move-to-workspace-4";
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
name = "move_to_workspace_5";
|
name = "move-to-workspace-5";
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
name = "move_to_workspace_6";
|
name = "move-to-workspace-6";
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
name = "move_to_workspace_7";
|
name = "move-to-workspace-7";
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
name = "move_to_workspace_8";
|
name = "move-to-workspace-8";
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
name = "move_to_workspace_9";
|
name = "move-to-workspace-9";
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
name = "move_to_workspace_10";
|
name = "move-to-workspace-10";
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
name = "move_to_workspace_11";
|
name = "move-to-workspace-11";
|
||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
name = "move_to_workspace_12";
|
name = "move-to-workspace-12";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_MOVE:
|
case META_MENU_OP_MOVE:
|
||||||
name = "begin_move";
|
name = "begin-move";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_RESIZE:
|
case META_MENU_OP_RESIZE:
|
||||||
name = "begin_resize";
|
name = "begin-resize";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_MOVE_LEFT:
|
case META_MENU_OP_MOVE_LEFT:
|
||||||
name = "move_to_workspace_left";
|
name = "move-to-workspace-left";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_MOVE_RIGHT:
|
case META_MENU_OP_MOVE_RIGHT:
|
||||||
name = "move_to_workspace_right";
|
name = "move-to-workspace-right";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_MOVE_UP:
|
case META_MENU_OP_MOVE_UP:
|
||||||
name = "move_to_workspace_up";
|
name = "move-to-workspace-up";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_MOVE_DOWN:
|
case META_MENU_OP_MOVE_DOWN:
|
||||||
name = "move_to_workspace_down";
|
name = "move-to-workspace-down";
|
||||||
break;
|
break;
|
||||||
case META_MENU_OP_RECOVER:
|
case META_MENU_OP_RECOVER:
|
||||||
/* No keybinding for this one */
|
/* No keybinding for this one */
|
||||||
|
@@ -73,9 +73,11 @@ typedef enum {
|
|||||||
/* This is basically a bogus number, just has to be large enough
|
/* This is basically a bogus number, just has to be large enough
|
||||||
* to handle the expected case of the alt+tab operation, where
|
* to handle the expected case of the alt+tab operation, where
|
||||||
* we want to ignore serials from UnmapNotify on the tab popup,
|
* we want to ignore serials from UnmapNotify on the tab popup,
|
||||||
* and the LeaveNotify/EnterNotify from the pointer ungrab
|
* and the LeaveNotify/EnterNotify from the pointer ungrab. It
|
||||||
|
* also has to be big enough to hold ignored serials from the point
|
||||||
|
* where we reshape the stage to the point where we get events back.
|
||||||
*/
|
*/
|
||||||
#define N_IGNORED_SERIALS 4
|
#define N_IGNORED_CROSSING_SERIALS 10
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
META_TILE_NONE,
|
META_TILE_NONE,
|
||||||
@@ -153,7 +155,7 @@ struct _MetaDisplay
|
|||||||
* correspond to an enter event we should
|
* correspond to an enter event we should
|
||||||
* ignore
|
* ignore
|
||||||
*/
|
*/
|
||||||
unsigned long ignored_serials[N_IGNORED_SERIALS];
|
unsigned long ignored_crossing_serials[N_IGNORED_CROSSING_SERIALS];
|
||||||
Window ungrab_should_not_cause_focus_window;
|
Window ungrab_should_not_cause_focus_window;
|
||||||
|
|
||||||
guint32 current_time;
|
guint32 current_time;
|
||||||
@@ -187,6 +189,7 @@ struct _MetaDisplay
|
|||||||
int grab_anchor_root_y;
|
int grab_anchor_root_y;
|
||||||
MetaRectangle grab_anchor_window_pos;
|
MetaRectangle grab_anchor_window_pos;
|
||||||
MetaTileMode grab_tile_mode;
|
MetaTileMode grab_tile_mode;
|
||||||
|
int grab_tile_monitor_number;
|
||||||
int grab_latest_motion_x;
|
int grab_latest_motion_x;
|
||||||
int grab_latest_motion_y;
|
int grab_latest_motion_y;
|
||||||
gulong grab_mask;
|
gulong grab_mask;
|
||||||
@@ -341,10 +344,6 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
|
|||||||
void meta_display_grab (MetaDisplay *display);
|
void meta_display_grab (MetaDisplay *display);
|
||||||
void meta_display_ungrab (MetaDisplay *display);
|
void meta_display_ungrab (MetaDisplay *display);
|
||||||
|
|
||||||
void meta_display_unmanage_screen (MetaDisplay *display,
|
|
||||||
MetaScreen *screen,
|
|
||||||
guint32 timestamp);
|
|
||||||
|
|
||||||
void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||||
MetaScreen *screen,
|
MetaScreen *screen,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
@@ -409,7 +408,6 @@ const char* meta_event_mode_to_string (int m);
|
|||||||
const char* meta_event_detail_to_string (int d);
|
const char* meta_event_detail_to_string (int d);
|
||||||
|
|
||||||
void meta_display_queue_retheme_all_windows (MetaDisplay *display);
|
void meta_display_queue_retheme_all_windows (MetaDisplay *display);
|
||||||
void meta_display_retheme_all (void);
|
|
||||||
|
|
||||||
void meta_display_set_cursor_theme (const char *theme,
|
void meta_display_set_cursor_theme (const char *theme,
|
||||||
int size);
|
int size);
|
||||||
|
@@ -25,9 +25,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file display.c Handles operations on an X display.
|
* SECTION:MetaDisplay
|
||||||
|
* @short_description: Handles operations on an X display.
|
||||||
*
|
*
|
||||||
* The display is represented as a MetaDisplay struct.
|
* The display is represented as a #MetaDisplay struct.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 600 /* for gethostname() */
|
#define _XOPEN_SOURCE 600 /* for gethostname() */
|
||||||
@@ -51,12 +52,8 @@
|
|||||||
#include <meta/compositor.h>
|
#include <meta/compositor.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
#ifdef HAVE_SOLARIS_XINERAMA
|
#include "mutter-enum-types.h"
|
||||||
#include <X11/extensions/xinerama.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_XFREE_XINERAMA
|
|
||||||
#include <X11/extensions/Xinerama.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_RANDR
|
#ifdef HAVE_RANDR
|
||||||
#include <X11/extensions/Xrandr.h>
|
#include <X11/extensions/Xrandr.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -85,7 +82,7 @@
|
|||||||
g == META_GRAB_OP_KEYBOARD_ESCAPING_GROUP)
|
g == META_GRAB_OP_KEYBOARD_ESCAPING_GROUP)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup pings Pings
|
* SECTION:pings
|
||||||
*
|
*
|
||||||
* Sometimes we want to see whether a window is responding,
|
* Sometimes we want to see whether a window is responding,
|
||||||
* so we send it a "ping" message and see whether it sends us back a "pong"
|
* so we send it a "ping" message and see whether it sends us back a "pong"
|
||||||
@@ -100,13 +97,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* MetaPingData:
|
||||||
|
*
|
||||||
* Describes a ping on a window. When we send a ping to a window, we build
|
* Describes a ping on a window. When we send a ping to a window, we build
|
||||||
* one of these structs, and it eventually gets passed to the timeout function
|
* one of these structs, and it eventually gets passed to the timeout function
|
||||||
* or to the function which handles the response from the window. If the window
|
* or to the function which handles the response from the window. If the window
|
||||||
* does or doesn't respond to the ping, we use this information to deal with
|
* does or doesn't respond to the ping, we use this information to deal with
|
||||||
* these facts; we have a handler function for each.
|
* these facts; we have a handler function for each.
|
||||||
*
|
|
||||||
* \ingroup pings
|
|
||||||
*/
|
*/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -135,6 +132,8 @@ enum
|
|||||||
WINDOW_CREATED,
|
WINDOW_CREATED,
|
||||||
WINDOW_DEMANDS_ATTENTION,
|
WINDOW_DEMANDS_ATTENTION,
|
||||||
WINDOW_MARKED_URGENT,
|
WINDOW_MARKED_URGENT,
|
||||||
|
GRAB_OP_BEGIN,
|
||||||
|
GRAB_OP_END,
|
||||||
LAST_SIGNAL
|
LAST_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -146,7 +145,7 @@ enum {
|
|||||||
|
|
||||||
static guint display_signals [LAST_SIGNAL] = { 0 };
|
static guint display_signals [LAST_SIGNAL] = { 0 };
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* The display we're managing. This is a singleton object. (Historically,
|
* The display we're managing. This is a singleton object. (Historically,
|
||||||
* this was a list of displays, but there was never any way to add more
|
* this was a list of displays, but there was never any way to add more
|
||||||
* than one element to it.) The goofy name is because we don't want it
|
* than one element to it.) The goofy name is because we don't want it
|
||||||
@@ -181,7 +180,7 @@ static void prefs_changed_callback (MetaPreference pref,
|
|||||||
|
|
||||||
static void sanity_check_timestamps (MetaDisplay *display,
|
static void sanity_check_timestamps (MetaDisplay *display,
|
||||||
guint32 known_good_timestamp);
|
guint32 known_good_timestamp);
|
||||||
|
|
||||||
MetaGroup* get_focussed_group (MetaDisplay *display);
|
MetaGroup* get_focussed_group (MetaDisplay *display);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -230,8 +229,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
display_signals[WINDOW_CREATED] =
|
display_signals[WINDOW_CREATED] =
|
||||||
@@ -239,8 +237,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__OBJECT,
|
|
||||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||||
|
|
||||||
display_signals[WINDOW_DEMANDS_ATTENTION] =
|
display_signals[WINDOW_DEMANDS_ATTENTION] =
|
||||||
@@ -248,8 +245,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__OBJECT,
|
|
||||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||||
|
|
||||||
display_signals[WINDOW_MARKED_URGENT] =
|
display_signals[WINDOW_MARKED_URGENT] =
|
||||||
@@ -257,11 +253,32 @@ meta_display_class_init (MetaDisplayClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__OBJECT,
|
|
||||||
G_TYPE_NONE, 1,
|
G_TYPE_NONE, 1,
|
||||||
META_TYPE_WINDOW);
|
META_TYPE_WINDOW);
|
||||||
|
|
||||||
|
display_signals[GRAB_OP_BEGIN] =
|
||||||
|
g_signal_new ("grab-op-begin",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
0,
|
||||||
|
NULL, NULL, NULL,
|
||||||
|
G_TYPE_NONE, 3,
|
||||||
|
META_TYPE_SCREEN,
|
||||||
|
META_TYPE_WINDOW,
|
||||||
|
META_TYPE_GRAB_OP);
|
||||||
|
|
||||||
|
display_signals[GRAB_OP_END] =
|
||||||
|
g_signal_new ("grab-op-end",
|
||||||
|
G_TYPE_FROM_CLASS (klass),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
0,
|
||||||
|
NULL, NULL, NULL,
|
||||||
|
G_TYPE_NONE, 3,
|
||||||
|
META_TYPE_SCREEN,
|
||||||
|
META_TYPE_WINDOW,
|
||||||
|
META_TYPE_GRAB_OP);
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
g_object_class_install_property (object_class,
|
||||||
PROP_FOCUS_WINDOW,
|
PROP_FOCUS_WINDOW,
|
||||||
g_param_spec_object ("focus-window",
|
g_param_spec_object ("focus-window",
|
||||||
@@ -273,10 +290,10 @@ meta_display_class_init (MetaDisplayClass *klass)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor for MetaPingData structs. Will destroy the
|
* ping_data_free:
|
||||||
* event source for the struct as well.
|
|
||||||
*
|
*
|
||||||
* \ingroup pings
|
* Destructor for #MetaPingData structs. Will destroy the
|
||||||
|
* event source for the struct as well.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
ping_data_free (MetaPingData *ping_data)
|
ping_data_free (MetaPingData *ping_data)
|
||||||
@@ -289,14 +306,12 @@ ping_data_free (MetaPingData *ping_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* remove_pending_pings_for_window:
|
||||||
|
* @display: The display the window appears on
|
||||||
|
* @xwindow: The X ID of the window whose pings we should remove
|
||||||
|
*
|
||||||
* Frees every pending ping structure for the given X window on the
|
* Frees every pending ping structure for the given X window on the
|
||||||
* given display. This means that we also destroy the timeouts.
|
* given display. This means that we also destroy the timeouts.
|
||||||
*
|
|
||||||
* \param display The display the window appears on
|
|
||||||
* \param xwindow The X ID of the window whose pings we should remove
|
|
||||||
*
|
|
||||||
* \ingroup pings
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
remove_pending_pings_for_window (MetaDisplay *display, Window xwindow)
|
remove_pending_pings_for_window (MetaDisplay *display, Window xwindow)
|
||||||
@@ -395,14 +410,14 @@ meta_display_init (MetaDisplay *disp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_display_open:
|
||||||
|
*
|
||||||
* Opens a new display, sets it up, initialises all the X extensions
|
* Opens a new display, sets it up, initialises all the X extensions
|
||||||
* we will need, and adds it to the list of displays.
|
* we will need, and adds it to the list of displays.
|
||||||
*
|
*
|
||||||
* \return True if the display was opened successfully, and False
|
* Returns: %TRUE if the display was opened successfully, and %FALSE
|
||||||
* otherwise-- that is, if the display doesn't exist or it already
|
* otherwise-- that is, if the display doesn't exist or it already
|
||||||
* has a window manager.
|
* has a window manager.
|
||||||
*
|
|
||||||
* \ingroup main
|
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
meta_display_open (void)
|
meta_display_open (void)
|
||||||
@@ -452,6 +467,8 @@ meta_display_open (void)
|
|||||||
buf[sizeof(buf)-1] = '\0';
|
buf[sizeof(buf)-1] = '\0';
|
||||||
the_display->hostname = g_strdup (buf);
|
the_display->hostname = g_strdup (buf);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
the_display->hostname = NULL;
|
||||||
the_display->error_trap_synced_at_last_pop = TRUE;
|
the_display->error_trap_synced_at_last_pop = TRUE;
|
||||||
the_display->error_traps = 0;
|
the_display->error_traps = 0;
|
||||||
the_display->error_trap_handler = NULL;
|
the_display->error_trap_handler = NULL;
|
||||||
@@ -532,9 +549,9 @@ meta_display_open (void)
|
|||||||
meta_unsigned_long_equal);
|
meta_unsigned_long_equal);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < N_IGNORED_SERIALS)
|
while (i < N_IGNORED_CROSSING_SERIALS)
|
||||||
{
|
{
|
||||||
the_display->ignored_serials[i] = 0;
|
the_display->ignored_crossing_serials[i] = 0;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
the_display->ungrab_should_not_cause_focus_window = None;
|
the_display->ungrab_should_not_cause_focus_window = None;
|
||||||
@@ -554,6 +571,7 @@ meta_display_open (void)
|
|||||||
the_display->grab_screen = NULL;
|
the_display->grab_screen = NULL;
|
||||||
the_display->grab_resize_popup = NULL;
|
the_display->grab_resize_popup = NULL;
|
||||||
the_display->grab_tile_mode = META_TILE_NONE;
|
the_display->grab_tile_mode = META_TILE_NONE;
|
||||||
|
the_display->grab_tile_monitor_number = -1;
|
||||||
|
|
||||||
the_display->grab_edge_resistance_data = NULL;
|
the_display->grab_edge_resistance_data = NULL;
|
||||||
|
|
||||||
@@ -1028,6 +1046,7 @@ meta_display_close (MetaDisplay *display,
|
|||||||
meta_display_free_window_prop_hooks (display);
|
meta_display_free_window_prop_hooks (display);
|
||||||
meta_display_free_group_prop_hooks (display);
|
meta_display_free_group_prop_hooks (display);
|
||||||
|
|
||||||
|
g_free (display->hostname);
|
||||||
g_free (display->name);
|
g_free (display->name);
|
||||||
|
|
||||||
meta_display_shutdown_keys (display);
|
meta_display_shutdown_keys (display);
|
||||||
@@ -1145,14 +1164,16 @@ meta_display_ungrab (MetaDisplay *display)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the singleton MetaDisplay if "xdisplay" matches the X display it's
|
* meta_display_for_x_display:
|
||||||
* managing; otherwise gives a warning and returns NULL. When we were claiming
|
* @xdisplay: An X display
|
||||||
|
*
|
||||||
|
* Returns the singleton MetaDisplay if @xdisplay matches the X display it's
|
||||||
|
* managing; otherwise gives a warning and returns %NULL. When we were claiming
|
||||||
* to be able to manage multiple displays, this was supposed to find the
|
* to be able to manage multiple displays, this was supposed to find the
|
||||||
* display out of the list which matched that display. Now it's merely an
|
* display out of the list which matched that display. Now it's merely an
|
||||||
* extra sanity check.
|
* extra sanity check.
|
||||||
*
|
*
|
||||||
* \param xdisplay An X display
|
* Returns: The singleton X display, or %NULL if @xdisplay isn't the one
|
||||||
* \return The singleton X display, or NULL if "xdisplay" isn't the one
|
|
||||||
* we're managing.
|
* we're managing.
|
||||||
*/
|
*/
|
||||||
MetaDisplay*
|
MetaDisplay*
|
||||||
@@ -1168,9 +1189,11 @@ meta_display_for_x_display (Display *xdisplay)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_get_display:
|
||||||
|
*
|
||||||
* Accessor for the singleton MetaDisplay.
|
* Accessor for the singleton MetaDisplay.
|
||||||
*
|
*
|
||||||
* \return The only MetaDisplay there is. This can be NULL, but only
|
* Returns: The only #MetaDisplay there is. This can be %NULL, but only
|
||||||
* during startup.
|
* during startup.
|
||||||
*/
|
*/
|
||||||
MetaDisplay*
|
MetaDisplay*
|
||||||
@@ -1383,37 +1406,61 @@ meta_display_get_current_time_roundtrip (MetaDisplay *display)
|
|||||||
return timestamp;
|
return timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
/**
|
||||||
add_ignored_serial (MetaDisplay *display,
|
* meta_display_get_ignored_modifier_mask:
|
||||||
unsigned long serial)
|
* @display: a #MetaDisplay
|
||||||
|
*
|
||||||
|
* Returns: a mask of modifiers that should be ignored
|
||||||
|
* when matching keybindings to events
|
||||||
|
*/
|
||||||
|
unsigned int
|
||||||
|
meta_display_get_ignored_modifier_mask (MetaDisplay *display)
|
||||||
|
{
|
||||||
|
return display->ignored_modifier_mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_display_add_ignored_crossing_serial:
|
||||||
|
* @display: a #MetaDisplay
|
||||||
|
* @serial: the serial to ignore
|
||||||
|
*
|
||||||
|
* Save the specified serial and ignore crossing events with that
|
||||||
|
* serial for the purpose of focus-follows-mouse. This can be used
|
||||||
|
* for certain changes to the window hierarchy that we don't want
|
||||||
|
* to change the focus window, even if they cause the pointer to
|
||||||
|
* end up in a new window.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
meta_display_add_ignored_crossing_serial (MetaDisplay *display,
|
||||||
|
unsigned long serial)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* don't add the same serial more than once */
|
/* don't add the same serial more than once */
|
||||||
if (display->ignored_serials[N_IGNORED_SERIALS-1] == serial)
|
if (display->ignored_crossing_serials[N_IGNORED_CROSSING_SERIALS-1] == serial)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* shift serials to the left */
|
/* shift serials to the left */
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < (N_IGNORED_SERIALS - 1))
|
while (i < (N_IGNORED_CROSSING_SERIALS - 1))
|
||||||
{
|
{
|
||||||
display->ignored_serials[i] = display->ignored_serials[i+1];
|
display->ignored_crossing_serials[i] = display->ignored_crossing_serials[i+1];
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
/* put new one on the end */
|
/* put new one on the end */
|
||||||
display->ignored_serials[i] = serial;
|
display->ignored_crossing_serials[i] = serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
serial_is_ignored (MetaDisplay *display,
|
crossing_serial_is_ignored (MetaDisplay *display,
|
||||||
unsigned long serial)
|
unsigned long serial)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < N_IGNORED_SERIALS)
|
while (i < N_IGNORED_CROSSING_SERIALS)
|
||||||
{
|
{
|
||||||
if (display->ignored_serials[i] == serial)
|
if (display->ignored_crossing_serials[i] == serial)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
@@ -1421,14 +1468,14 @@ serial_is_ignored (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
reset_ignores (MetaDisplay *display)
|
reset_ignored_crossing_serials (MetaDisplay *display)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < N_IGNORED_SERIALS)
|
while (i < N_IGNORED_CROSSING_SERIALS)
|
||||||
{
|
{
|
||||||
display->ignored_serials[i] = 0;
|
display->ignored_crossing_serials[i] = 0;
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1554,19 +1601,18 @@ handle_net_restack_window (MetaDisplay* display,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* event_callback:
|
||||||
|
* @event: The event that just happened
|
||||||
|
* @data: The #MetaDisplay that events are coming from, cast to a gpointer
|
||||||
|
* so that it can be sent to a callback
|
||||||
|
*
|
||||||
* This is the most important function in the whole program. It is the heart,
|
* This is the most important function in the whole program. It is the heart,
|
||||||
* it is the nexus, it is the Grand Central Station of Mutter's world.
|
* it is the nexus, it is the Grand Central Station of Mutter's world.
|
||||||
* When we create a MetaDisplay, we ask GDK to pass *all* events for *all*
|
* When we create a #MetaDisplay, we ask GDK to pass *all* events for *all*
|
||||||
* windows to this function. So every time anything happens that we might
|
* windows to this function. So every time anything happens that we might
|
||||||
* want to know about, this function gets called. You see why it gets a bit
|
* want to know about, this function gets called. You see why it gets a bit
|
||||||
* busy around here. Most of this function is a ginormous switch statement
|
* busy around here. Most of this function is a ginormous switch statement
|
||||||
* dealing with all the kinds of events that might turn up.
|
* dealing with all the kinds of events that might turn up.
|
||||||
*
|
|
||||||
* \param event The event that just happened
|
|
||||||
* \param data The MetaDisplay that events are coming from, cast to a gpointer
|
|
||||||
* so that it can be sent to a callback
|
|
||||||
*
|
|
||||||
* \ingroup main
|
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
event_callback (XEvent *event,
|
event_callback (XEvent *event,
|
||||||
@@ -1603,7 +1649,7 @@ event_callback (XEvent *event,
|
|||||||
if (meta_ui_window_should_not_cause_focus (display->xdisplay,
|
if (meta_ui_window_should_not_cause_focus (display->xdisplay,
|
||||||
modified))
|
modified))
|
||||||
{
|
{
|
||||||
add_ignored_serial (display, event->xany.serial);
|
meta_display_add_ignored_crossing_serial (display, event->xany.serial);
|
||||||
meta_topic (META_DEBUG_FOCUS,
|
meta_topic (META_DEBUG_FOCUS,
|
||||||
"Adding EnterNotify serial %lu to ignored focus serials\n",
|
"Adding EnterNotify serial %lu to ignored focus serials\n",
|
||||||
event->xany.serial);
|
event->xany.serial);
|
||||||
@@ -1613,7 +1659,7 @@ event_callback (XEvent *event,
|
|||||||
event->xcrossing.mode == NotifyUngrab &&
|
event->xcrossing.mode == NotifyUngrab &&
|
||||||
modified == display->ungrab_should_not_cause_focus_window)
|
modified == display->ungrab_should_not_cause_focus_window)
|
||||||
{
|
{
|
||||||
add_ignored_serial (display, event->xany.serial);
|
meta_display_add_ignored_crossing_serial (display, event->xany.serial);
|
||||||
meta_topic (META_DEBUG_FOCUS,
|
meta_topic (META_DEBUG_FOCUS,
|
||||||
"Adding LeaveNotify serial %lu to ignored focus serials\n",
|
"Adding LeaveNotify serial %lu to ignored focus serials\n",
|
||||||
event->xany.serial);
|
event->xany.serial);
|
||||||
@@ -1752,6 +1798,8 @@ event_callback (XEvent *event,
|
|||||||
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
display->overlay_key_only_pressed = FALSE;
|
||||||
|
|
||||||
if (event->xbutton.button == 4 || event->xbutton.button == 5)
|
if (event->xbutton.button == 4 || event->xbutton.button == 5)
|
||||||
/* Scrollwheel event, do nothing and deliver event to compositor below */
|
/* Scrollwheel event, do nothing and deliver event to compositor below */
|
||||||
break;
|
break;
|
||||||
@@ -1909,7 +1957,7 @@ event_callback (XEvent *event,
|
|||||||
* in application-based mode, and the different
|
* in application-based mode, and the different
|
||||||
* app is not a dock or desktop, eat the focus click.
|
* app is not a dock or desktop, eat the focus click.
|
||||||
*/
|
*/
|
||||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
|
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
|
||||||
meta_prefs_get_application_based () &&
|
meta_prefs_get_application_based () &&
|
||||||
!window->has_focus &&
|
!window->has_focus &&
|
||||||
window->type != META_WINDOW_DOCK &&
|
window->type != META_WINDOW_DOCK &&
|
||||||
@@ -1949,6 +1997,8 @@ event_callback (XEvent *event,
|
|||||||
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
display->overlay_key_only_pressed = FALSE;
|
||||||
|
|
||||||
if (display->grab_window == window &&
|
if (display->grab_window == window &&
|
||||||
grab_op_is_mouse (display->grab_op))
|
grab_op_is_mouse (display->grab_op))
|
||||||
meta_window_handle_mouse_grab_op_event (window, event);
|
meta_window_handle_mouse_grab_op_event (window, event);
|
||||||
@@ -1989,7 +2039,7 @@ event_callback (XEvent *event,
|
|||||||
/* Check if we've entered a window; do this even if window->has_focus to
|
/* Check if we've entered a window; do this even if window->has_focus to
|
||||||
* avoid races.
|
* avoid races.
|
||||||
*/
|
*/
|
||||||
if (window && !serial_is_ignored (display, event->xany.serial) &&
|
if (window && !crossing_serial_is_ignored (display, event->xany.serial) &&
|
||||||
event->xcrossing.mode != NotifyGrab &&
|
event->xcrossing.mode != NotifyGrab &&
|
||||||
event->xcrossing.mode != NotifyUngrab &&
|
event->xcrossing.mode != NotifyUngrab &&
|
||||||
event->xcrossing.detail != NotifyInferior &&
|
event->xcrossing.detail != NotifyInferior &&
|
||||||
@@ -1997,8 +2047,8 @@ event_callback (XEvent *event,
|
|||||||
{
|
{
|
||||||
switch (meta_prefs_get_focus_mode ())
|
switch (meta_prefs_get_focus_mode ())
|
||||||
{
|
{
|
||||||
case META_FOCUS_MODE_SLOPPY:
|
case G_DESKTOP_FOCUS_MODE_SLOPPY:
|
||||||
case META_FOCUS_MODE_MOUSE:
|
case G_DESKTOP_FOCUS_MODE_MOUSE:
|
||||||
display->mouse_mode = TRUE;
|
display->mouse_mode = TRUE;
|
||||||
if (window->type != META_WINDOW_DOCK &&
|
if (window->type != META_WINDOW_DOCK &&
|
||||||
window->type != META_WINDOW_DESKTOP)
|
window->type != META_WINDOW_DESKTOP)
|
||||||
@@ -2014,7 +2064,7 @@ event_callback (XEvent *event,
|
|||||||
meta_window_focus (window, event->xcrossing.time);
|
meta_window_focus (window, event->xcrossing.time);
|
||||||
|
|
||||||
/* stop ignoring stuff */
|
/* stop ignoring stuff */
|
||||||
reset_ignores (display);
|
reset_ignored_crossing_serials (display);
|
||||||
|
|
||||||
if (meta_prefs_get_auto_raise ())
|
if (meta_prefs_get_auto_raise ())
|
||||||
{
|
{
|
||||||
@@ -2036,7 +2086,7 @@ event_callback (XEvent *event,
|
|||||||
* alternative mechanism works great.
|
* alternative mechanism works great.
|
||||||
*/
|
*/
|
||||||
if (window->type == META_WINDOW_DESKTOP &&
|
if (window->type == META_WINDOW_DESKTOP &&
|
||||||
meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE &&
|
meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE &&
|
||||||
display->expected_focus_window != NULL)
|
display->expected_focus_window != NULL)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_FOCUS,
|
meta_topic (META_DEBUG_FOCUS,
|
||||||
@@ -2048,7 +2098,7 @@ event_callback (XEvent *event,
|
|||||||
event->xcrossing.time);
|
event->xcrossing.time);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case META_FOCUS_MODE_CLICK:
|
case G_DESKTOP_FOCUS_MODE_CLICK:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2283,11 +2333,8 @@ event_callback (XEvent *event,
|
|||||||
screen = meta_display_screen_for_root (display,
|
screen = meta_display_screen_for_root (display,
|
||||||
event->xconfigure.event);
|
event->xconfigure.event);
|
||||||
if (screen)
|
if (screen)
|
||||||
{
|
meta_stack_tracker_reparent_event (screen->stack_tracker,
|
||||||
if (screen)
|
&event->xreparent);
|
||||||
meta_stack_tracker_reparent_event (screen->stack_tracker,
|
|
||||||
&event->xreparent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
@@ -2524,9 +2571,6 @@ event_callback (XEvent *event,
|
|||||||
else if (event->xclient.message_type ==
|
else if (event->xclient.message_type ==
|
||||||
display->atom__MUTTER_RELOAD_THEME_MESSAGE)
|
display->atom__MUTTER_RELOAD_THEME_MESSAGE)
|
||||||
{
|
{
|
||||||
meta_verbose ("Received reload theme request\n");
|
|
||||||
meta_ui_set_current_theme (meta_prefs_get_theme (),
|
|
||||||
TRUE);
|
|
||||||
meta_display_retheme_all ();
|
meta_display_retheme_all ();
|
||||||
}
|
}
|
||||||
else if (event->xclient.message_type ==
|
else if (event->xclient.message_type ==
|
||||||
@@ -3550,7 +3594,7 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
meta_display_set_grab_op_cursor (display, screen, op, FALSE, grab_xwindow,
|
meta_display_set_grab_op_cursor (display, screen, op, FALSE, grab_xwindow,
|
||||||
timestamp);
|
timestamp);
|
||||||
|
|
||||||
if (!display->grab_have_pointer)
|
if (!display->grab_have_pointer && !grab_op_is_keyboard (op))
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
"XGrabPointer() failed\n");
|
"XGrabPointer() failed\n");
|
||||||
@@ -3585,9 +3629,15 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
display->grab_button = button;
|
display->grab_button = button;
|
||||||
display->grab_mask = modmask;
|
display->grab_mask = modmask;
|
||||||
if (window)
|
if (window)
|
||||||
display->grab_tile_mode = window->tile_mode;
|
{
|
||||||
|
display->grab_tile_mode = window->tile_mode;
|
||||||
|
display->grab_tile_monitor_number = window->tile_monitor_number;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
display->grab_tile_mode = META_TILE_NONE;
|
{
|
||||||
|
display->grab_tile_mode = META_TILE_NONE;
|
||||||
|
display->grab_tile_monitor_number = -1;
|
||||||
|
}
|
||||||
display->grab_anchor_root_x = root_x;
|
display->grab_anchor_root_x = root_x;
|
||||||
display->grab_anchor_root_y = root_y;
|
display->grab_anchor_root_y = root_y;
|
||||||
display->grab_latest_motion_x = root_x;
|
display->grab_latest_motion_x = root_x;
|
||||||
@@ -3691,6 +3741,9 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
|||||||
{
|
{
|
||||||
meta_window_refresh_resize_popup (display->grab_window);
|
meta_window_refresh_resize_popup (display->grab_window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_signal_emit (display, display_signals[GRAB_OP_BEGIN], 0,
|
||||||
|
screen, display->grab_window, display->grab_op);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -3705,6 +3758,9 @@ meta_display_end_grab_op (MetaDisplay *display,
|
|||||||
if (display->grab_op == META_GRAB_OP_NONE)
|
if (display->grab_op == META_GRAB_OP_NONE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
||||||
|
display->grab_screen, display->grab_window, display->grab_op);
|
||||||
|
|
||||||
if (display->grab_window != NULL)
|
if (display->grab_window != NULL)
|
||||||
display->grab_window->shaken_loose = FALSE;
|
display->grab_window->shaken_loose = FALSE;
|
||||||
|
|
||||||
@@ -3785,6 +3841,7 @@ meta_display_end_grab_op (MetaDisplay *display,
|
|||||||
display->grab_screen = NULL;
|
display->grab_screen = NULL;
|
||||||
display->grab_xwindow = None;
|
display->grab_xwindow = None;
|
||||||
display->grab_tile_mode = META_TILE_NONE;
|
display->grab_tile_mode = META_TILE_NONE;
|
||||||
|
display->grab_tile_monitor_number = -1;
|
||||||
display->grab_op = META_GRAB_OP_NONE;
|
display->grab_op = META_GRAB_OP_NONE;
|
||||||
|
|
||||||
if (display->grab_resize_popup)
|
if (display->grab_resize_popup)
|
||||||
@@ -3987,7 +4044,7 @@ meta_display_grab_focus_window_button (MetaDisplay *display,
|
|||||||
* focus window may not be raised, and who wants to think about
|
* focus window may not be raised, and who wants to think about
|
||||||
* mouse focus anyway.
|
* mouse focus anyway.
|
||||||
*/
|
*/
|
||||||
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
|
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
|
||||||
{
|
{
|
||||||
meta_verbose (" (well, not grabbing since not in click to focus mode)\n");
|
meta_verbose (" (well, not grabbing since not in click to focus mode)\n");
|
||||||
return;
|
return;
|
||||||
@@ -4136,21 +4193,23 @@ meta_display_set_cursor_theme (const char *theme,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Stores whether syncing is currently enabled.
|
* Stores whether syncing is currently enabled.
|
||||||
*/
|
*/
|
||||||
static gboolean is_syncing = FALSE;
|
static gboolean is_syncing = FALSE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_is_syncing:
|
||||||
|
*
|
||||||
* Returns whether X synchronisation is currently enabled.
|
* Returns whether X synchronisation is currently enabled.
|
||||||
*
|
*
|
||||||
* \return true if we must wait for events whenever we send X requests;
|
* FIXME: This is *only* called by meta_display_open(), but by that time
|
||||||
* false otherwise.
|
|
||||||
*
|
|
||||||
* \bug This is *only* called by meta_display_open, but by that time
|
|
||||||
* we have already turned syncing on or off on startup, and we don't
|
* we have already turned syncing on or off on startup, and we don't
|
||||||
* have any way to do so while Mutter is running, so it's rather
|
* have any way to do so while Mutter is running, so it's rather
|
||||||
* pointless.
|
* pointless.
|
||||||
|
*
|
||||||
|
* Returns: %TRUE if we must wait for events whenever we send X requests;
|
||||||
|
* %FALSE otherwise.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
meta_is_syncing (void)
|
meta_is_syncing (void)
|
||||||
@@ -4159,10 +4218,9 @@ meta_is_syncing (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A handy way to turn on synchronisation on or off for every display.
|
* meta_set_syncing:
|
||||||
*
|
*
|
||||||
* \bug Of course there is only one display ever anyway, so this can
|
* A handy way to turn on synchronisation on or off for every display.
|
||||||
* be rather hugely simplified.
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_set_syncing (gboolean setting)
|
meta_set_syncing (gboolean setting)
|
||||||
@@ -4175,26 +4233,25 @@ meta_set_syncing (gboolean setting)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* How long, in milliseconds, we should wait after pinging a window
|
* How long, in milliseconds, we should wait after pinging a window
|
||||||
* before deciding it's not going to get back to us.
|
* before deciding it's not going to get back to us.
|
||||||
*/
|
*/
|
||||||
#define PING_TIMEOUT_DELAY 5000
|
#define PING_TIMEOUT_DELAY 5000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_display_ping_timeout:
|
||||||
|
* @data: All the information about this ping. It is a #MetaPingData
|
||||||
|
* cast to a #gpointer in order to be passable to a timeout function.
|
||||||
|
* This function will also free this parameter.
|
||||||
|
*
|
||||||
* Does whatever it is we decided to do when a window didn't respond
|
* Does whatever it is we decided to do when a window didn't respond
|
||||||
* to a ping. We also remove the ping from the display's list of
|
* to a ping. We also remove the ping from the display's list of
|
||||||
* pending pings. This function is called by the event loop when the timeout
|
* pending pings. This function is called by the event loop when the timeout
|
||||||
* times out which we created at the start of the ping.
|
* times out which we created at the start of the ping.
|
||||||
*
|
*
|
||||||
* \param data All the information about this ping. It is a MetaPingData
|
* Returns: Always returns %FALSE, because this function is called as a
|
||||||
* cast to a void* in order to be passable to a timeout function.
|
* timeout and we don't want to run the timer again.
|
||||||
* This function will also free this parameter.
|
|
||||||
*
|
|
||||||
* \return Always returns false, because this function is called as a
|
|
||||||
* timeout and we don't want to run the timer again.
|
|
||||||
*
|
|
||||||
* \ingroup pings
|
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_display_ping_timeout (gpointer data)
|
meta_display_ping_timeout (gpointer data)
|
||||||
@@ -4221,6 +4278,17 @@ meta_display_ping_timeout (gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_display_ping_window:
|
||||||
|
* @display: The #MetaDisplay that the window is on
|
||||||
|
* @window: The #MetaWindow to send the ping to
|
||||||
|
* @timestamp: The timestamp of the ping. Used for uniqueness.
|
||||||
|
* Cannot be CurrentTime; use a real timestamp!
|
||||||
|
* @ping_reply_func: The callback to call if we get a response.
|
||||||
|
* @ping_timeout_func: The callback to call if we don't get a response.
|
||||||
|
* @user_data: Arbitrary data that will be passed to the callback
|
||||||
|
* function. (In practice it's often a pointer to
|
||||||
|
* the window.)
|
||||||
|
*
|
||||||
* Sends a ping request to a window. The window must respond to
|
* Sends a ping request to a window. The window must respond to
|
||||||
* the request within a certain amount of time. If it does, we
|
* the request within a certain amount of time. If it does, we
|
||||||
* will call one callback; if the time passes and we haven't had
|
* will call one callback; if the time passes and we haven't had
|
||||||
@@ -4230,20 +4298,9 @@ meta_display_ping_timeout (gpointer data)
|
|||||||
* This function returns straight away after setting things up;
|
* This function returns straight away after setting things up;
|
||||||
* the callbacks will be called from the event loop.
|
* the callbacks will be called from the event loop.
|
||||||
*
|
*
|
||||||
* \param display The MetaDisplay that the window is on
|
* FIXME: This should probably be a method on windows, rather than displays
|
||||||
* \param window The MetaWindow to send the ping to
|
* for one of their windows.
|
||||||
* \param timestamp The timestamp of the ping. Used for uniqueness.
|
|
||||||
* Cannot be CurrentTime; use a real timestamp!
|
|
||||||
* \param ping_reply_func The callback to call if we get a response.
|
|
||||||
* \param ping_timeout_func The callback to call if we don't get a response.
|
|
||||||
* \param user_data Arbitrary data that will be passed to the callback
|
|
||||||
* function. (In practice it's often a pointer to
|
|
||||||
* the window.)
|
|
||||||
*
|
*
|
||||||
* \bug This should probably be a method on windows, rather than displays
|
|
||||||
* for one of their windows.
|
|
||||||
*
|
|
||||||
* \ingroup pings
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_display_ping_window (MetaDisplay *display,
|
meta_display_ping_window (MetaDisplay *display,
|
||||||
@@ -4325,10 +4382,9 @@ process_request_frame_extents (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return estimated frame extents for a normal window. */
|
/* Return estimated frame extents for a normal window. */
|
||||||
meta_ui_theme_get_frame_borders (screen->ui,
|
meta_ui_get_frame_borders (screen->ui,
|
||||||
META_FRAME_TYPE_NORMAL,
|
xwindow,
|
||||||
0,
|
&borders);
|
||||||
&borders);
|
|
||||||
data[0] = borders.visible.left;
|
data[0] = borders.visible.left;
|
||||||
data[1] = borders.visible.right;
|
data[1] = borders.visible.right;
|
||||||
data[2] = borders.visible.top;
|
data[2] = borders.visible.top;
|
||||||
@@ -4351,16 +4407,15 @@ process_request_frame_extents (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* process_pong_message:
|
||||||
|
* @display: the display we got the pong from
|
||||||
|
* @event: the #XEvent which is a pong; we can tell which
|
||||||
|
* ping it corresponds to because it bears the
|
||||||
|
* same timestamp.
|
||||||
|
*
|
||||||
* Process the pong (the response message) from the ping we sent
|
* Process the pong (the response message) from the ping we sent
|
||||||
* to the window. This involves removing the timeout, calling the
|
* to the window. This involves removing the timeout, calling the
|
||||||
* reply handler function, and freeing memory.
|
* reply handler function, and freeing memory.
|
||||||
*
|
|
||||||
* \param display the display we got the pong from
|
|
||||||
* \param event the XEvent which is a pong; we can tell which
|
|
||||||
* ping it corresponds to because it bears the
|
|
||||||
* same timestamp.
|
|
||||||
*
|
|
||||||
* \ingroup pings
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
process_pong_message (MetaDisplay *display,
|
process_pong_message (MetaDisplay *display,
|
||||||
@@ -4407,18 +4462,17 @@ process_pong_message (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_display_window_has_pending_pings:
|
||||||
|
* @display: The #MetaDisplay of the window.
|
||||||
|
* @window: The #MetaWindow whose pings we want to know about.
|
||||||
|
*
|
||||||
* Finds whether a window has any pings waiting on it.
|
* Finds whether a window has any pings waiting on it.
|
||||||
*
|
*
|
||||||
* \param display The MetaDisplay of the window.
|
* FIXME: This should probably be a method on windows, rather than displays
|
||||||
* \param window The MetaWindow whose pings we want to know about.
|
* for one of their windows.
|
||||||
*
|
*
|
||||||
* \return True if there is at least one ping which has been sent
|
* Returns: %TRUE if there is at least one ping which has been sent
|
||||||
* to the window without getting a response; false otherwise.
|
* to the window without getting a response; %FALSE otherwise.
|
||||||
*
|
|
||||||
* \bug This should probably be a method on windows, rather than displays
|
|
||||||
* for one of their windows.
|
|
||||||
*
|
|
||||||
* \ingroup pings
|
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
meta_display_window_has_pending_pings (MetaDisplay *display,
|
meta_display_window_has_pending_pings (MetaDisplay *display,
|
||||||
@@ -4448,7 +4502,8 @@ get_focussed_group (MetaDisplay *display)
|
|||||||
|
|
||||||
#define IN_TAB_CHAIN(w,t) (((t) == META_TAB_LIST_NORMAL && META_WINDOW_IN_NORMAL_TAB_CHAIN (w)) \
|
#define IN_TAB_CHAIN(w,t) (((t) == META_TAB_LIST_NORMAL && META_WINDOW_IN_NORMAL_TAB_CHAIN (w)) \
|
||||||
|| ((t) == META_TAB_LIST_DOCKS && META_WINDOW_IN_DOCK_TAB_CHAIN (w)) \
|
|| ((t) == META_TAB_LIST_DOCKS && META_WINDOW_IN_DOCK_TAB_CHAIN (w)) \
|
||||||
|| ((t) == META_TAB_LIST_GROUP && META_WINDOW_IN_GROUP_TAB_CHAIN (w, get_focussed_group(w->display))))
|
|| ((t) == META_TAB_LIST_GROUP && META_WINDOW_IN_GROUP_TAB_CHAIN (w, get_focussed_group(w->display))) \
|
||||||
|
|| ((t) == META_TAB_LIST_NORMAL_ALL && META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w)))
|
||||||
|
|
||||||
static MetaWindow*
|
static MetaWindow*
|
||||||
find_tab_forward (MetaDisplay *display,
|
find_tab_forward (MetaDisplay *display,
|
||||||
@@ -4596,12 +4651,13 @@ meta_display_get_tab_list (MetaDisplay *display,
|
|||||||
tab_list = g_list_reverse (tab_list);
|
tab_list = g_list_reverse (tab_list);
|
||||||
|
|
||||||
{
|
{
|
||||||
GSList *tmp;
|
GSList *windows, *tmp;
|
||||||
MetaWindow *l_window;
|
MetaWindow *l_window;
|
||||||
|
|
||||||
tmp = meta_display_list_windows (display, META_LIST_DEFAULT);
|
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
|
||||||
|
|
||||||
/* Go through all windows */
|
/* Go through all windows */
|
||||||
|
tmp = windows;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
l_window=tmp->data;
|
l_window=tmp->data;
|
||||||
@@ -4617,6 +4673,8 @@ meta_display_get_tab_list (MetaDisplay *display,
|
|||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
} /* End while tmp!=NULL */
|
} /* End while tmp!=NULL */
|
||||||
|
|
||||||
|
g_slist_free (windows);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tab_list;
|
return tab_list;
|
||||||
@@ -5013,12 +5071,21 @@ meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
|||||||
winlist = meta_display_list_windows (display,
|
winlist = meta_display_list_windows (display,
|
||||||
META_LIST_INCLUDE_OVERRIDE_REDIRECT);
|
META_LIST_INCLUDE_OVERRIDE_REDIRECT);
|
||||||
winlist = g_slist_sort (winlist, meta_display_stack_cmp);
|
winlist = g_slist_sort (winlist, meta_display_stack_cmp);
|
||||||
|
g_slist_foreach (winlist, (GFunc)g_object_ref, NULL);
|
||||||
|
|
||||||
/* Unmanage all windows */
|
/* Unmanage all windows */
|
||||||
tmp = winlist;
|
tmp = winlist;
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
{
|
{
|
||||||
meta_window_unmanage (tmp->data, timestamp);
|
MetaWindow *window = tmp->data;
|
||||||
|
|
||||||
|
/* Check if already unmanaged for safety - in particular, catch
|
||||||
|
* the case where unmanaging a parent window can cause attached
|
||||||
|
* dialogs to be (temporarily) unmanaged.
|
||||||
|
*/
|
||||||
|
if (!window->unmanaging)
|
||||||
|
meta_window_unmanage (window, timestamp);
|
||||||
|
g_object_unref (window);
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
@@ -113,9 +113,18 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
attrs.event_mask = EVENT_MASK;
|
attrs.event_mask = EVENT_MASK;
|
||||||
XChangeWindowAttributes (window->display->xdisplay,
|
XChangeWindowAttributes (window->display->xdisplay,
|
||||||
frame->xwindow, CWEventMask, &attrs);
|
frame->xwindow, CWEventMask, &attrs);
|
||||||
|
/* stick frame to the window */
|
||||||
|
window->frame = frame;
|
||||||
|
|
||||||
meta_display_register_x_window (window->display, &frame->xwindow, window);
|
meta_display_register_x_window (window->display, &frame->xwindow, window);
|
||||||
|
|
||||||
|
meta_ui_realize_frame_window (window->screen->ui, frame->xwindow);
|
||||||
|
|
||||||
|
if (window->title)
|
||||||
|
meta_ui_set_frame_title (window->screen->ui,
|
||||||
|
window->frame->xwindow,
|
||||||
|
window->title);
|
||||||
|
|
||||||
/* Reparent the client window; it may be destroyed,
|
/* Reparent the client window; it may be destroyed,
|
||||||
* thus the error trap. We'll get a destroy notify later
|
* thus the error trap. We'll get a destroy notify later
|
||||||
* and free everything. Comment in FVWM source code says
|
* and free everything. Comment in FVWM source code says
|
||||||
@@ -148,20 +157,6 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
window->rect.y);
|
window->rect.y);
|
||||||
/* FIXME handle this error */
|
/* FIXME handle this error */
|
||||||
meta_error_trap_pop (window->display);
|
meta_error_trap_pop (window->display);
|
||||||
|
|
||||||
/* stick frame to the window */
|
|
||||||
window->frame = frame;
|
|
||||||
|
|
||||||
/* Now that frame->xwindow is registered with window, we can set its
|
|
||||||
* style and background.
|
|
||||||
*/
|
|
||||||
meta_ui_update_frame_style (window->screen->ui, frame->xwindow);
|
|
||||||
meta_ui_reset_frame_bg (window->screen->ui, frame->xwindow);
|
|
||||||
|
|
||||||
if (window->title)
|
|
||||||
meta_ui_set_frame_title (window->screen->ui,
|
|
||||||
window->frame->xwindow,
|
|
||||||
window->title);
|
|
||||||
|
|
||||||
/* Move keybindings to frame instead of window */
|
/* Move keybindings to frame instead of window */
|
||||||
meta_window_grab_keys (window);
|
meta_window_grab_keys (window);
|
||||||
@@ -173,6 +168,7 @@ void
|
|||||||
meta_window_destroy_frame (MetaWindow *window)
|
meta_window_destroy_frame (MetaWindow *window)
|
||||||
{
|
{
|
||||||
MetaFrame *frame;
|
MetaFrame *frame;
|
||||||
|
MetaFrameBorders borders;
|
||||||
|
|
||||||
if (window->frame == NULL)
|
if (window->frame == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -180,6 +176,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
|||||||
meta_verbose ("Unframing window %s\n", window->desc);
|
meta_verbose ("Unframing window %s\n", window->desc);
|
||||||
|
|
||||||
frame = window->frame;
|
frame = window->frame;
|
||||||
|
|
||||||
|
meta_frame_calc_borders (frame, &borders);
|
||||||
|
|
||||||
meta_bell_notify_frame_destroy (frame);
|
meta_bell_notify_frame_destroy (frame);
|
||||||
|
|
||||||
@@ -207,8 +205,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
|||||||
* coordinates here means we'll need to ensure a configure
|
* coordinates here means we'll need to ensure a configure
|
||||||
* notify event is sent; see bug 399552.
|
* notify event is sent; see bug 399552.
|
||||||
*/
|
*/
|
||||||
window->frame->rect.x,
|
window->frame->rect.x + borders.invisible.left,
|
||||||
window->frame->rect.y);
|
window->frame->rect.y + borders.invisible.top);
|
||||||
meta_error_trap_pop (window->display);
|
meta_error_trap_pop (window->display);
|
||||||
|
|
||||||
meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow);
|
meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow);
|
||||||
@@ -314,22 +312,23 @@ void
|
|||||||
meta_frame_calc_borders (MetaFrame *frame,
|
meta_frame_calc_borders (MetaFrame *frame,
|
||||||
MetaFrameBorders *borders)
|
MetaFrameBorders *borders)
|
||||||
{
|
{
|
||||||
meta_ui_get_frame_borders (frame->window->screen->ui,
|
/* Save on if statements and potential uninitialized values
|
||||||
frame->xwindow,
|
* in callers -- if there's no frame, then zero the borders. */
|
||||||
borders);
|
if (frame == NULL)
|
||||||
|
meta_frame_borders_clear (borders);
|
||||||
|
else
|
||||||
|
meta_ui_get_frame_borders (frame->window->screen->ui,
|
||||||
|
frame->xwindow,
|
||||||
|
borders);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_frame_get_corner_radiuses (MetaFrame *frame,
|
meta_frame_render_background (MetaFrame *frame,
|
||||||
float *top_left,
|
cairo_t *cr)
|
||||||
float *top_right,
|
|
||||||
float *bottom_left,
|
|
||||||
float *bottom_right)
|
|
||||||
{
|
{
|
||||||
meta_ui_get_corner_radiuses (frame->window->screen->ui,
|
meta_ui_render_background (frame->window->screen->ui,
|
||||||
frame->xwindow,
|
frame->xwindow,
|
||||||
top_left, top_right,
|
cr);
|
||||||
bottom_left, bottom_right);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
@@ -345,15 +344,6 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
|||||||
frame->rect.x + frame->rect.width,
|
frame->rect.x + frame->rect.width,
|
||||||
frame->rect.y + frame->rect.height);
|
frame->rect.y + frame->rect.height);
|
||||||
|
|
||||||
/* set bg to none to avoid flicker */
|
|
||||||
if (need_resize)
|
|
||||||
{
|
|
||||||
meta_ui_unflicker_frame_bg (frame->window->screen->ui,
|
|
||||||
frame->xwindow,
|
|
||||||
frame->rect.width,
|
|
||||||
frame->rect.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
meta_ui_move_resize_frame (frame->window->screen->ui,
|
meta_ui_move_resize_frame (frame->window->screen->ui,
|
||||||
frame->xwindow,
|
frame->xwindow,
|
||||||
frame->rect.x,
|
frame->rect.x,
|
||||||
@@ -363,30 +353,18 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
|||||||
|
|
||||||
if (need_resize)
|
if (need_resize)
|
||||||
{
|
{
|
||||||
meta_ui_reset_frame_bg (frame->window->screen->ui,
|
|
||||||
frame->xwindow);
|
|
||||||
|
|
||||||
/* If we're interactively resizing the frame, repaint
|
/* If we're interactively resizing the frame, repaint
|
||||||
* it immediately so we don't start to lag.
|
* it immediately so we don't start to lag.
|
||||||
*/
|
*/
|
||||||
if (frame->window->display->grab_window ==
|
if (frame->window->display->grab_window ==
|
||||||
frame->window)
|
frame->window)
|
||||||
meta_ui_repaint_frame (frame->window->screen->ui,
|
meta_ui_queue_frame_draw (frame->window->screen->ui,
|
||||||
frame->xwindow);
|
frame->xwindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
return need_resize;
|
return need_resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_region_t *
|
|
||||||
meta_frame_get_frame_bounds (MetaFrame *frame)
|
|
||||||
{
|
|
||||||
return meta_ui_get_frame_bounds (frame->window->screen->ui,
|
|
||||||
frame->xwindow,
|
|
||||||
frame->rect.width,
|
|
||||||
frame->rect.height);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_frame_queue_draw (MetaFrame *frame)
|
meta_frame_queue_draw (MetaFrame *frame)
|
||||||
{
|
{
|
||||||
|
@@ -63,19 +63,14 @@ Window meta_frame_get_xwindow (MetaFrame *frame);
|
|||||||
void meta_frame_calc_borders (MetaFrame *frame,
|
void meta_frame_calc_borders (MetaFrame *frame,
|
||||||
MetaFrameBorders *borders);
|
MetaFrameBorders *borders);
|
||||||
|
|
||||||
void meta_frame_get_corner_radiuses (MetaFrame *frame,
|
void meta_frame_render_background (MetaFrame *frame,
|
||||||
float *top_left,
|
cairo_t *cr);
|
||||||
float *top_right,
|
|
||||||
float *bottom_left,
|
|
||||||
float *bottom_right);
|
|
||||||
|
|
||||||
gboolean meta_frame_sync_to_window (MetaFrame *frame,
|
gboolean meta_frame_sync_to_window (MetaFrame *frame,
|
||||||
int gravity,
|
int gravity,
|
||||||
gboolean need_move,
|
gboolean need_move,
|
||||||
gboolean need_resize);
|
gboolean need_resize);
|
||||||
|
|
||||||
cairo_region_t *meta_frame_get_frame_bounds (MetaFrame *frame);
|
|
||||||
|
|
||||||
void meta_frame_set_screen_cursor (MetaFrame *frame,
|
void meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||||
MetaCursor cursor);
|
MetaCursor cursor);
|
||||||
|
|
||||||
|
@@ -29,8 +29,29 @@
|
|||||||
#ifndef META_KEYBINDINGS_PRIVATE_H
|
#ifndef META_KEYBINDINGS_PRIVATE_H
|
||||||
#define META_KEYBINDINGS_PRIVATE_H
|
#define META_KEYBINDINGS_PRIVATE_H
|
||||||
|
|
||||||
|
#include <gio/gio.h>
|
||||||
#include <meta/keybindings.h>
|
#include <meta/keybindings.h>
|
||||||
|
|
||||||
|
struct _MetaKeyHandler
|
||||||
|
{
|
||||||
|
char *name;
|
||||||
|
MetaKeyHandlerFunc func;
|
||||||
|
MetaKeyHandlerFunc default_func;
|
||||||
|
gint data, flags;
|
||||||
|
gpointer user_data;
|
||||||
|
GDestroyNotify user_data_free_func;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _MetaKeyBinding
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
KeySym keysym;
|
||||||
|
KeyCode keycode;
|
||||||
|
unsigned int mask;
|
||||||
|
MetaVirtualModifier modifiers;
|
||||||
|
MetaKeyHandler *handler;
|
||||||
|
};
|
||||||
|
|
||||||
void meta_display_init_keys (MetaDisplay *display);
|
void meta_display_init_keys (MetaDisplay *display);
|
||||||
void meta_display_shutdown_keys (MetaDisplay *display);
|
void meta_display_shutdown_keys (MetaDisplay *display);
|
||||||
void meta_screen_grab_keys (MetaScreen *screen);
|
void meta_screen_grab_keys (MetaScreen *screen);
|
||||||
@@ -52,6 +73,14 @@ void meta_set_keybindings_disabled (gboolean setting);
|
|||||||
void meta_display_process_mapping_event (MetaDisplay *display,
|
void meta_display_process_mapping_event (MetaDisplay *display,
|
||||||
XEvent *event);
|
XEvent *event);
|
||||||
|
|
||||||
|
gboolean meta_prefs_add_keybinding (const char *name,
|
||||||
|
GSettings *settings,
|
||||||
|
MetaKeyBindingAction action,
|
||||||
|
MetaKeyBindingFlags flags);
|
||||||
|
|
||||||
|
gboolean meta_prefs_remove_keybinding (const char *name);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
117
src/core/main.c
117
src/core/main.c
@@ -23,18 +23,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file
|
* SECTION:main
|
||||||
* Program startup.
|
* @short_description: Program startup.
|
||||||
|
*
|
||||||
* Functions which parse the command-line arguments, create the display,
|
* Functions which parse the command-line arguments, create the display,
|
||||||
* kick everything off and then close down Mutter when it's time to go.
|
* kick everything off and then close down Mutter when it's time to go.
|
||||||
*/
|
*
|
||||||
|
*
|
||||||
/**
|
*
|
||||||
* \mainpage
|
|
||||||
* Mutter - a boring window manager for the adult in you
|
* Mutter - a boring window manager for the adult in you
|
||||||
*
|
*
|
||||||
* Many window managers are like Marshmallow Froot Loops; Mutter
|
* Many window managers are like Marshmallow Froot Loops; Mutter
|
||||||
* is like Cheerios.
|
* is like Frosted Flakes: it's still plain old corn, but dusted
|
||||||
|
* with some sugar.
|
||||||
*
|
*
|
||||||
* The best way to get a handle on how the whole system fits together
|
* The best way to get a handle on how the whole system fits together
|
||||||
* is discussed in doc/code-overview.txt; if you're looking for functions
|
* is discussed in doc/code-overview.txt; if you're looking for functions
|
||||||
@@ -77,12 +78,12 @@
|
|||||||
#include <girepository.h>
|
#include <girepository.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* The exit code we'll return to our parent process when we eventually die.
|
* The exit code we'll return to our parent process when we eventually die.
|
||||||
*/
|
*/
|
||||||
static MetaExitCode meta_exit_code = META_EXIT_SUCCESS;
|
static MetaExitCode meta_exit_code = META_EXIT_SUCCESS;
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Handle on the main loop, so that we have an easy way of shutting Mutter
|
* Handle on the main loop, so that we have an easy way of shutting Mutter
|
||||||
* down.
|
* down.
|
||||||
*/
|
*/
|
||||||
@@ -92,14 +93,15 @@ static void prefs_changed_callback (MetaPreference pref,
|
|||||||
gpointer data);
|
gpointer data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* log_handler:
|
||||||
|
* @log_domain: the domain the error occurred in (we ignore this)
|
||||||
|
* @log_level: the log level so that we can filter out less
|
||||||
|
* important messages
|
||||||
|
* @message: the message to log
|
||||||
|
* @user_data: arbitrary data (we ignore this)
|
||||||
|
*
|
||||||
* Prints log messages. If Mutter was compiled with backtrace support,
|
* Prints log messages. If Mutter was compiled with backtrace support,
|
||||||
* also prints a backtrace (see meta_print_backtrace()).
|
* also prints a backtrace (see meta_print_backtrace()).
|
||||||
*
|
|
||||||
* \param log_domain the domain the error occurred in (we ignore this)
|
|
||||||
* \param log_level the log level so that we can filter out less
|
|
||||||
* important messages
|
|
||||||
* \param message the message to log
|
|
||||||
* \param user_data arbitrary data (we ignore this)
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
log_handler (const gchar *log_domain,
|
log_handler (const gchar *log_domain,
|
||||||
@@ -112,10 +114,12 @@ log_handler (const gchar *log_domain,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_print_compilation_info:
|
||||||
|
*
|
||||||
* Prints a list of which configure script options were used to
|
* Prints a list of which configure script options were used to
|
||||||
* build this copy of Mutter. This is actually always called
|
* build this copy of Mutter. This is actually always called
|
||||||
* on startup, but it's all no-op unless we're in verbose mode
|
* on startup, but it's all no-op unless we're in verbose mode
|
||||||
* (see meta_set_verbose).
|
* (see meta_set_verbose()).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_print_compilation_info (void)
|
meta_print_compilation_info (void)
|
||||||
@@ -125,21 +129,6 @@ meta_print_compilation_info (void)
|
|||||||
#else
|
#else
|
||||||
meta_verbose ("Compiled without shape extension\n");
|
meta_verbose ("Compiled without shape extension\n");
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_XINERAMA
|
|
||||||
meta_topic (META_DEBUG_XINERAMA, "Compiled with Xinerama extension\n");
|
|
||||||
#else
|
|
||||||
meta_topic (META_DEBUG_XINERAMA, "Compiled without Xinerama extension\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_XFREE_XINERAMA
|
|
||||||
meta_topic (META_DEBUG_XINERAMA, " (using XFree86 Xinerama)\n");
|
|
||||||
#else
|
|
||||||
meta_topic (META_DEBUG_XINERAMA, " (not using XFree86 Xinerama)\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_SOLARIS_XINERAMA
|
|
||||||
meta_topic (META_DEBUG_XINERAMA, " (using Solaris Xinerama)\n");
|
|
||||||
#else
|
|
||||||
meta_topic (META_DEBUG_XINERAMA, " (not using Solaris Xinerama)\n");
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_XSYNC
|
#ifdef HAVE_XSYNC
|
||||||
meta_verbose ("Compiled with sync extension\n");
|
meta_verbose ("Compiled with sync extension\n");
|
||||||
#else
|
#else
|
||||||
@@ -158,12 +147,14 @@ meta_print_compilation_info (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_print_self_identity:
|
||||||
|
*
|
||||||
* Prints the version number, the current timestamp (not the
|
* Prints the version number, the current timestamp (not the
|
||||||
* build date), the locale, the character encoding, and a list
|
* build date), the locale, the character encoding, and a list
|
||||||
* of configure script options that were used to build this
|
* of configure script options that were used to build this
|
||||||
* copy of Mutter. This is actually always called
|
* copy of Mutter. This is actually always called
|
||||||
* on startup, but it's all no-op unless we're in verbose mode
|
* on startup, but it's all no-op unless we're in verbose mode
|
||||||
* (see meta_set_verbose).
|
* (see meta_set_verbose()).
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_print_self_identity (void)
|
meta_print_self_identity (void)
|
||||||
@@ -188,7 +179,7 @@ meta_print_self_identity (void)
|
|||||||
meta_print_compilation_info ();
|
meta_print_compilation_info ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* The set of possible options that can be set on Mutter's
|
* The set of possible options that can be set on Mutter's
|
||||||
* command line.
|
* command line.
|
||||||
*/
|
*/
|
||||||
@@ -327,10 +318,12 @@ meta_clutter_init (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_select_display:
|
||||||
|
*
|
||||||
* Selects which display Mutter should use. It first tries to use
|
* Selects which display Mutter should use. It first tries to use
|
||||||
* display_name as the display. If display_name is NULL then
|
* @display_name as the display. If @display_name is %NULL then
|
||||||
* try to use the environment variable MUTTER_DISPLAY. If that
|
* try to use the environment variable MUTTER_DISPLAY. If that
|
||||||
* also is NULL, use the default - :0.0
|
* also is %NULL, use the default - :0.0
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
meta_select_display (gchar *display_name)
|
meta_select_display (gchar *display_name)
|
||||||
@@ -484,42 +477,6 @@ meta_run (void)
|
|||||||
if (g_getenv ("MUTTER_G_FATAL_WARNINGS") != NULL)
|
if (g_getenv ("MUTTER_G_FATAL_WARNINGS") != NULL)
|
||||||
g_log_set_always_fatal (G_LOG_LEVEL_MASK);
|
g_log_set_always_fatal (G_LOG_LEVEL_MASK);
|
||||||
|
|
||||||
meta_ui_set_current_theme (meta_prefs_get_theme (), FALSE);
|
|
||||||
|
|
||||||
/* Try to find some theme that'll work if the theme preference
|
|
||||||
* doesn't exist. First try Simple (the default theme) then just
|
|
||||||
* try anything in the themes directory.
|
|
||||||
*/
|
|
||||||
if (!meta_ui_have_a_theme ())
|
|
||||||
meta_ui_set_current_theme ("Simple", FALSE);
|
|
||||||
|
|
||||||
if (!meta_ui_have_a_theme ())
|
|
||||||
{
|
|
||||||
const char *dir_entry = NULL;
|
|
||||||
GError *err = NULL;
|
|
||||||
GDir *themes_dir = NULL;
|
|
||||||
|
|
||||||
if (!(themes_dir = g_dir_open (MUTTER_DATADIR"/themes", 0, &err)))
|
|
||||||
{
|
|
||||||
meta_fatal (_("Failed to scan themes directory: %s\n"), err->message);
|
|
||||||
g_error_free (err);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
while (((dir_entry = g_dir_read_name (themes_dir)) != NULL) &&
|
|
||||||
(!meta_ui_have_a_theme ()))
|
|
||||||
{
|
|
||||||
meta_ui_set_current_theme (dir_entry, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
g_dir_close (themes_dir);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!meta_ui_have_a_theme ())
|
|
||||||
meta_fatal (_("Could not find a theme! Be sure %s exists and contains the usual themes.\n"),
|
|
||||||
MUTTER_DATADIR"/themes");
|
|
||||||
|
|
||||||
/* Connect to SM as late as possible - but before managing display,
|
/* Connect to SM as late as possible - but before managing display,
|
||||||
* or we might try to manage a window before we have the session
|
* or we might try to manage a window before we have the session
|
||||||
* info
|
* info
|
||||||
@@ -560,13 +517,14 @@ meta_run (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_quit:
|
||||||
|
* @code: The success or failure code to return to the calling process.
|
||||||
|
*
|
||||||
* Stops Mutter. This tells the event loop to stop processing; it is
|
* Stops Mutter. This tells the event loop to stop processing; it is
|
||||||
* rather dangerous to use this because this will leave the user with
|
* rather dangerous to use this because this will leave the user with
|
||||||
* no window manager. We generally do this only if, for example, the
|
* no window manager. We generally do this only if, for example, the
|
||||||
* session manager asks us to; we assume the session manager knows
|
* session manager asks us to; we assume the session manager knows
|
||||||
* what it's talking about.
|
* what it's talking about.
|
||||||
*
|
|
||||||
* \param code The success or failure code to return to the calling process.
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
meta_quit (MetaExitCode code)
|
meta_quit (MetaExitCode code)
|
||||||
@@ -579,13 +537,14 @@ meta_quit (MetaExitCode code)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* prefs_changed_callback:
|
||||||
|
* @pref Which preference has changed
|
||||||
|
* @data Arbitrary data (which we ignore)
|
||||||
|
*
|
||||||
* Called on pref changes. (One of several functions of its kind and purpose.)
|
* Called on pref changes. (One of several functions of its kind and purpose.)
|
||||||
*
|
*
|
||||||
* \bug Why are these particular prefs handled in main.c and not others?
|
* FIXME: Why are these particular prefs handled in main.c and not others?
|
||||||
* Should they be?
|
* Should they be?
|
||||||
*
|
|
||||||
* \param pref Which preference has changed
|
|
||||||
* \param data Arbitrary data (which we ignore)
|
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
prefs_changed_callback (MetaPreference pref,
|
prefs_changed_callback (MetaPreference pref,
|
||||||
@@ -593,9 +552,7 @@ prefs_changed_callback (MetaPreference pref,
|
|||||||
{
|
{
|
||||||
switch (pref)
|
switch (pref)
|
||||||
{
|
{
|
||||||
case META_PREF_THEME:
|
|
||||||
case META_PREF_DRAGGABLE_BORDER_WIDTH:
|
case META_PREF_DRAGGABLE_BORDER_WIDTH:
|
||||||
meta_ui_set_current_theme (meta_prefs_get_theme (), FALSE);
|
|
||||||
meta_display_retheme_all ();
|
meta_display_retheme_all ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -25,9 +25,7 @@
|
|||||||
|
|
||||||
#include <meta/main.h>
|
#include <meta/main.h>
|
||||||
#include <meta/util.h>
|
#include <meta/util.h>
|
||||||
#ifdef HAVE_INTROSPECTION
|
|
||||||
#include "meta-plugin-manager.h"
|
#include "meta-plugin-manager.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
2604
src/core/prefs.c
2604
src/core/prefs.c
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,8 @@ struct _MetaMonitorInfo
|
|||||||
{
|
{
|
||||||
int number;
|
int number;
|
||||||
MetaRectangle rect;
|
MetaRectangle rect;
|
||||||
|
gboolean is_primary;
|
||||||
|
XID output; /* The primary or first output for this crtc, None if no xrandr */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (* MetaScreenWindowFunc) (MetaScreen *screen, MetaWindow *window,
|
typedef void (* MetaScreenWindowFunc) (MetaScreen *screen, MetaWindow *window,
|
||||||
|
@@ -39,14 +39,12 @@
|
|||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
#include "xprops.h"
|
#include "xprops.h"
|
||||||
#include <meta/compositor.h>
|
#include <meta/compositor.h>
|
||||||
#include "mutter-marshal.h"
|
|
||||||
#include "mutter-enum-types.h"
|
#include "mutter-enum-types.h"
|
||||||
|
|
||||||
#ifdef HAVE_SOLARIS_XINERAMA
|
|
||||||
#include <X11/extensions/xinerama.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_XFREE_XINERAMA
|
|
||||||
#include <X11/extensions/Xinerama.h>
|
#include <X11/extensions/Xinerama.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_RANDR
|
||||||
|
#include <X11/extensions/Xrandr.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
@@ -81,7 +79,6 @@ enum
|
|||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
RESTACKED,
|
RESTACKED,
|
||||||
TOGGLE_RECORDING,
|
|
||||||
WORKSPACE_ADDED,
|
WORKSPACE_ADDED,
|
||||||
WORKSPACE_REMOVED,
|
WORKSPACE_REMOVED,
|
||||||
WORKSPACE_SWITCHED,
|
WORKSPACE_SWITCHED,
|
||||||
@@ -159,8 +156,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (MetaScreenClass, restacked),
|
G_STRUCT_OFFSET (MetaScreenClass, restacked),
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
pspec = g_param_spec_int ("n-workspaces",
|
pspec = g_param_spec_int ("n-workspaces",
|
||||||
@@ -174,8 +170,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__INT,
|
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
@@ -185,8 +180,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__INT,
|
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
1,
|
1,
|
||||||
G_TYPE_INT);
|
G_TYPE_INT);
|
||||||
@@ -196,21 +190,19 @@ meta_screen_class_init (MetaScreenClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
_mutter_marshal_VOID__INT_INT_ENUM,
|
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
3,
|
3,
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
MUTTER_TYPE_MOTION_DIRECTION);
|
META_TYPE_MOTION_DIRECTION);
|
||||||
|
|
||||||
screen_signals[WINDOW_ENTERED_MONITOR] =
|
screen_signals[WINDOW_ENTERED_MONITOR] =
|
||||||
g_signal_new ("window-entered-monitor",
|
g_signal_new ("window-entered-monitor",
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
_mutter_marshal_VOID__INT_OBJECT,
|
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 2,
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
META_TYPE_WINDOW);
|
META_TYPE_WINDOW);
|
||||||
@@ -220,8 +212,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
_mutter_marshal_VOID__INT_OBJECT,
|
|
||||||
G_TYPE_NONE, 2,
|
G_TYPE_NONE, 2,
|
||||||
G_TYPE_INT,
|
G_TYPE_INT,
|
||||||
META_TYPE_WINDOW);
|
META_TYPE_WINDOW);
|
||||||
@@ -231,26 +222,15 @@ meta_screen_class_init (MetaScreenClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
0,
|
0,
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__POINTER,
|
|
||||||
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||||
|
|
||||||
screen_signals[TOGGLE_RECORDING] =
|
|
||||||
g_signal_new ("toggle-recording",
|
|
||||||
G_TYPE_FROM_CLASS (klass),
|
|
||||||
G_SIGNAL_RUN_LAST,
|
|
||||||
0,
|
|
||||||
NULL, NULL,
|
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
|
||||||
|
|
||||||
screen_signals[WORKAREAS_CHANGED] =
|
screen_signals[WORKAREAS_CHANGED] =
|
||||||
g_signal_new ("workareas-changed",
|
g_signal_new ("workareas-changed",
|
||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
|
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
screen_signals[MONITORS_CHANGED] =
|
screen_signals[MONITORS_CHANGED] =
|
||||||
@@ -258,8 +238,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
|||||||
G_TYPE_FROM_CLASS (object_class),
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
G_SIGNAL_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
|
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
|
||||||
NULL, NULL,
|
NULL, NULL, NULL,
|
||||||
g_cclosure_marshal_VOID__VOID,
|
|
||||||
G_TYPE_NONE, 0);
|
G_TYPE_NONE, 0);
|
||||||
|
|
||||||
g_object_class_install_property (object_class,
|
g_object_class_install_property (object_class,
|
||||||
@@ -386,6 +365,56 @@ filter_mirrored_monitors (MetaScreen *screen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_RANDR
|
||||||
|
static MetaMonitorInfo *
|
||||||
|
find_monitor_with_rect (MetaScreen *screen, int x, int y, int w, int h)
|
||||||
|
{
|
||||||
|
MetaMonitorInfo *info;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < screen->n_monitor_infos; i++)
|
||||||
|
{
|
||||||
|
info = &screen->monitor_infos[i];
|
||||||
|
if (x == info->rect.x &&
|
||||||
|
y == info->rect.y &&
|
||||||
|
w == info->rect.width &&
|
||||||
|
h == info->rect.height)
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* In the case of multiple outputs of a single crtc (mirroring), we consider one of the
|
||||||
|
* outputs the "main". This is the one we consider "owning" the windows, so if
|
||||||
|
* the mirroring is changed to a dual monitor setup then the windows are moved to the
|
||||||
|
* crtc that now has that main output. If one of the outputs is the primary that is
|
||||||
|
* always the main, otherwise we just use the first.
|
||||||
|
*/
|
||||||
|
static XID
|
||||||
|
find_main_output_for_crtc (MetaScreen *screen, XRRScreenResources *resources, XRRCrtcInfo *crtc)
|
||||||
|
{
|
||||||
|
XRROutputInfo *output;
|
||||||
|
RROutput primary_output;
|
||||||
|
int i;
|
||||||
|
XID res;
|
||||||
|
|
||||||
|
primary_output = XRRGetOutputPrimary (screen->display->xdisplay, screen->xroot);
|
||||||
|
|
||||||
|
res = None;
|
||||||
|
for (i = 0; i < crtc->noutput; i++)
|
||||||
|
{
|
||||||
|
output = XRRGetOutputInfo (screen->display->xdisplay, resources, crtc->outputs[i]);
|
||||||
|
if (output->connection != RR_Disconnected &&
|
||||||
|
(res == None || crtc->outputs[i] == primary_output))
|
||||||
|
res = crtc->outputs[i];
|
||||||
|
XRRFreeOutputInfo (output);
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
reload_monitor_infos (MetaScreen *screen)
|
reload_monitor_infos (MetaScreen *screen)
|
||||||
{
|
{
|
||||||
@@ -406,10 +435,9 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
display = screen->display;
|
display = screen->display;
|
||||||
|
|
||||||
if (screen->monitor_infos)
|
/* Any previous screen->monitor_infos is freed by the caller */
|
||||||
g_free (screen->monitor_infos);
|
|
||||||
|
|
||||||
screen->monitor_infos = NULL;
|
screen->monitor_infos = NULL;
|
||||||
screen->n_monitor_infos = 0;
|
screen->n_monitor_infos = 0;
|
||||||
screen->last_monitor_index = 0;
|
screen->last_monitor_index = 0;
|
||||||
@@ -433,7 +461,7 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
meta_topic (META_DEBUG_XINERAMA,
|
meta_topic (META_DEBUG_XINERAMA,
|
||||||
"Pretending a single monitor has two Xinerama screens\n");
|
"Pretending a single monitor has two Xinerama screens\n");
|
||||||
|
|
||||||
screen->monitor_infos = g_new (MetaMonitorInfo, 2);
|
screen->monitor_infos = g_new0 (MetaMonitorInfo, 2);
|
||||||
screen->n_monitor_infos = 2;
|
screen->n_monitor_infos = 2;
|
||||||
|
|
||||||
screen->monitor_infos[0].number = 0;
|
screen->monitor_infos[0].number = 0;
|
||||||
@@ -445,8 +473,7 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
screen->monitor_infos[1].rect.x = screen->rect.width / 2;
|
screen->monitor_infos[1].rect.x = screen->rect.width / 2;
|
||||||
screen->monitor_infos[1].rect.width = screen->rect.width / 2;
|
screen->monitor_infos[1].rect.width = screen->rect.width / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_XFREE_XINERAMA
|
|
||||||
if (screen->n_monitor_infos == 0 &&
|
if (screen->n_monitor_infos == 0 &&
|
||||||
XineramaIsActive (display->xdisplay))
|
XineramaIsActive (display->xdisplay))
|
||||||
{
|
{
|
||||||
@@ -463,7 +490,7 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
|
|
||||||
if (n_infos > 0)
|
if (n_infos > 0)
|
||||||
{
|
{
|
||||||
screen->monitor_infos = g_new (MetaMonitorInfo, n_infos);
|
screen->monitor_infos = g_new0 (MetaMonitorInfo, n_infos);
|
||||||
screen->n_monitor_infos = n_infos;
|
screen->n_monitor_infos = n_infos;
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
@@ -488,78 +515,38 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
meta_XFree (infos);
|
meta_XFree (infos);
|
||||||
|
|
||||||
|
#ifdef HAVE_RANDR
|
||||||
|
{
|
||||||
|
XRRScreenResources *resources;
|
||||||
|
|
||||||
|
resources = XRRGetScreenResourcesCurrent (display->xdisplay, screen->xroot);
|
||||||
|
if (resources)
|
||||||
|
{
|
||||||
|
for (i = 0; i < resources->ncrtc; i++)
|
||||||
|
{
|
||||||
|
XRRCrtcInfo *crtc;
|
||||||
|
MetaMonitorInfo *info;
|
||||||
|
|
||||||
|
crtc = XRRGetCrtcInfo (display->xdisplay, resources, resources->crtcs[i]);
|
||||||
|
info = find_monitor_with_rect (screen, crtc->x, crtc->y, (int)crtc->width, (int)crtc->height);
|
||||||
|
if (info)
|
||||||
|
info->output = find_main_output_for_crtc (screen, resources, crtc);
|
||||||
|
|
||||||
|
XRRFreeCrtcInfo (crtc);
|
||||||
|
}
|
||||||
|
XRRFreeScreenResources (resources);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (screen->n_monitor_infos > 0)
|
else if (screen->n_monitor_infos > 0)
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_XINERAMA,
|
meta_topic (META_DEBUG_XINERAMA,
|
||||||
"No XFree86 Xinerama extension or XFree86 Xinerama inactive on display %s\n",
|
"No Xinerama extension or Xinerama inactive on display %s\n",
|
||||||
display->name);
|
display->name);
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
meta_topic (META_DEBUG_XINERAMA,
|
|
||||||
"Mutter compiled without XFree86 Xinerama support\n");
|
|
||||||
#endif /* HAVE_XFREE_XINERAMA */
|
|
||||||
|
|
||||||
#ifdef HAVE_SOLARIS_XINERAMA
|
|
||||||
/* This code from GDK, Copyright (C) 2002 Sun Microsystems */
|
|
||||||
if (screen->n_monitor_infos == 0 &&
|
|
||||||
XineramaGetState (screen->display->xdisplay,
|
|
||||||
screen->number))
|
|
||||||
{
|
|
||||||
XRectangle monitors[MAXFRAMEBUFFERS];
|
|
||||||
unsigned char hints[16];
|
|
||||||
int result;
|
|
||||||
int n_monitors;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
n_monitors = 0;
|
|
||||||
result = XineramaGetInfo (screen->display->xdisplay,
|
|
||||||
screen->number,
|
|
||||||
monitors, hints,
|
|
||||||
&n_monitors);
|
|
||||||
/* Yes I know it should be Success but the current implementation
|
|
||||||
* returns the num of monitor
|
|
||||||
*/
|
|
||||||
if (result > 0)
|
|
||||||
{
|
|
||||||
g_assert (n_monitors > 0);
|
|
||||||
|
|
||||||
screen->monitor_infos = g_new (MetaMonitorInfo, n_monitors);
|
|
||||||
screen->n_monitor_infos = n_monitors;
|
|
||||||
|
|
||||||
i = 0;
|
|
||||||
while (i < n_monitors)
|
|
||||||
{
|
|
||||||
screen->monitor_infos[i].number = i;
|
|
||||||
screen->monitor_infos[i].rect.x = monitors[i].x;
|
|
||||||
screen->monitor_infos[i].rect.y = monitors[i].y;
|
|
||||||
screen->monitor_infos[i].rect.width = monitors[i].width;
|
|
||||||
screen->monitor_infos[i].rect.height = monitors[i].height;
|
|
||||||
|
|
||||||
meta_topic (META_DEBUG_XINERAMA,
|
|
||||||
"Monitor %d is %d,%d %d x %d\n",
|
|
||||||
screen->monitor_infos[i].number,
|
|
||||||
screen->monitor_infos[i].rect.x,
|
|
||||||
screen->monitor_infos[i].rect.y,
|
|
||||||
screen->monitor_infos[i].rect.width,
|
|
||||||
screen->monitor_infos[i].rect.height);
|
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (screen->n_monitor_infos == 0)
|
|
||||||
{
|
|
||||||
meta_topic (META_DEBUG_XINERAMA,
|
|
||||||
"No Solaris Xinerama extension or Solaris Xinerama inactive on display %s\n",
|
|
||||||
display->name);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
meta_topic (META_DEBUG_XINERAMA,
|
|
||||||
"Mutter compiled without Solaris Xinerama support\n");
|
|
||||||
#endif /* HAVE_SOLARIS_XINERAMA */
|
|
||||||
|
|
||||||
|
|
||||||
/* If no Xinerama, fill in the single screen info so
|
/* If no Xinerama, fill in the single screen info so
|
||||||
* we can use the field unconditionally
|
* we can use the field unconditionally
|
||||||
*/
|
*/
|
||||||
@@ -568,7 +555,7 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
meta_topic (META_DEBUG_XINERAMA,
|
meta_topic (META_DEBUG_XINERAMA,
|
||||||
"No Xinerama screens, using default screen info\n");
|
"No Xinerama screens, using default screen info\n");
|
||||||
|
|
||||||
screen->monitor_infos = g_new (MetaMonitorInfo, 1);
|
screen->monitor_infos = g_new0 (MetaMonitorInfo, 1);
|
||||||
screen->n_monitor_infos = 1;
|
screen->n_monitor_infos = 1;
|
||||||
|
|
||||||
screen->monitor_infos[0].number = 0;
|
screen->monitor_infos[0].number = 0;
|
||||||
@@ -577,6 +564,8 @@ reload_monitor_infos (MetaScreen *screen)
|
|||||||
|
|
||||||
filter_mirrored_monitors (screen);
|
filter_mirrored_monitors (screen);
|
||||||
|
|
||||||
|
screen->monitor_infos[screen->primary_monitor_index].is_primary = TRUE;
|
||||||
|
|
||||||
g_assert (screen->n_monitor_infos > 0);
|
g_assert (screen->n_monitor_infos > 0);
|
||||||
g_assert (screen->monitor_infos != NULL);
|
g_assert (screen->monitor_infos != NULL);
|
||||||
}
|
}
|
||||||
@@ -1106,9 +1095,11 @@ prefs_changed_callback (MetaPreference pref,
|
|||||||
{
|
{
|
||||||
MetaScreen *screen = data;
|
MetaScreen *screen = data;
|
||||||
|
|
||||||
if (pref == META_PREF_NUM_WORKSPACES)
|
if ((pref == META_PREF_NUM_WORKSPACES ||
|
||||||
|
pref == META_PREF_DYNAMIC_WORKSPACES) &&
|
||||||
|
!meta_prefs_get_dynamic_workspaces ())
|
||||||
{
|
{
|
||||||
/* GConf doesn't provide timestamps, but luckily update_num_workspaces
|
/* GSettings doesn't provide timestamps, but luckily update_num_workspaces
|
||||||
* often doesn't need it...
|
* often doesn't need it...
|
||||||
*/
|
*/
|
||||||
guint32 timestamp =
|
guint32 timestamp =
|
||||||
@@ -1416,12 +1407,14 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
|||||||
new_num = g_list_length (screen->workspaces);
|
new_num = g_list_length (screen->workspaces);
|
||||||
|
|
||||||
set_number_of_spaces_hint (screen, new_num);
|
set_number_of_spaces_hint (screen, new_num);
|
||||||
meta_prefs_set_num_workspaces (new_num);
|
|
||||||
|
if (!meta_prefs_get_dynamic_workspaces ())
|
||||||
|
meta_prefs_set_num_workspaces (new_num);
|
||||||
|
|
||||||
/* If deleting a workspace before the current workspace, the active
|
/* If deleting a workspace before the current workspace, the active
|
||||||
* workspace index changes, so we need to update that hint */
|
* workspace index changes, so we need to update that hint */
|
||||||
if (active_index_changed)
|
if (active_index_changed)
|
||||||
meta_screen_set_active_workspace_hint (workspace->screen);
|
meta_screen_set_active_workspace_hint (screen);
|
||||||
|
|
||||||
l = next;
|
l = next;
|
||||||
while (l)
|
while (l)
|
||||||
@@ -1471,7 +1464,9 @@ meta_screen_append_new_workspace (MetaScreen *screen, gboolean activate,
|
|||||||
new_num = g_list_length (screen->workspaces);
|
new_num = g_list_length (screen->workspaces);
|
||||||
|
|
||||||
set_number_of_spaces_hint (screen, new_num);
|
set_number_of_spaces_hint (screen, new_num);
|
||||||
meta_prefs_set_num_workspaces (new_num);
|
|
||||||
|
if (!meta_prefs_get_dynamic_workspaces ())
|
||||||
|
meta_prefs_set_num_workspaces (new_num);
|
||||||
|
|
||||||
meta_screen_queue_workarea_recalc (screen);
|
meta_screen_queue_workarea_recalc (screen);
|
||||||
|
|
||||||
@@ -1487,7 +1482,7 @@ static void
|
|||||||
update_num_workspaces (MetaScreen *screen,
|
update_num_workspaces (MetaScreen *screen,
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
{
|
{
|
||||||
int new_num;
|
int new_num, old_num;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
int i;
|
int i;
|
||||||
GList *extras;
|
GList *extras;
|
||||||
@@ -1517,6 +1512,7 @@ update_num_workspaces (MetaScreen *screen,
|
|||||||
++i;
|
++i;
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
old_num = i;
|
||||||
|
|
||||||
g_assert (last_remaining);
|
g_assert (last_remaining);
|
||||||
|
|
||||||
@@ -1551,22 +1547,22 @@ update_num_workspaces (MetaScreen *screen,
|
|||||||
|
|
||||||
g_assert (w->windows == NULL);
|
g_assert (w->windows == NULL);
|
||||||
meta_workspace_remove (w);
|
meta_workspace_remove (w);
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_free (extras);
|
g_list_free (extras);
|
||||||
|
|
||||||
while (i < new_num)
|
for (i = old_num; i < new_num; i++)
|
||||||
{
|
meta_workspace_new (screen);
|
||||||
meta_workspace_new (screen);
|
|
||||||
++i;
|
|
||||||
}
|
|
||||||
|
|
||||||
set_number_of_spaces_hint (screen, new_num);
|
set_number_of_spaces_hint (screen, new_num);
|
||||||
|
|
||||||
meta_screen_queue_workarea_recalc (screen);
|
meta_screen_queue_workarea_recalc (screen);
|
||||||
|
|
||||||
|
for (i = old_num; i < new_num; i++)
|
||||||
|
g_signal_emit (screen, screen_signals[WORKSPACE_ADDED], 0, i);
|
||||||
|
|
||||||
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1857,7 +1853,6 @@ meta_screen_tile_preview_update_timeout (gpointer data)
|
|||||||
{
|
{
|
||||||
MetaScreen *screen = data;
|
MetaScreen *screen = data;
|
||||||
MetaWindow *window = screen->display->grab_window;
|
MetaWindow *window = screen->display->grab_window;
|
||||||
gboolean composited = screen->display->compositor != NULL;
|
|
||||||
gboolean needs_preview = FALSE;
|
gboolean needs_preview = FALSE;
|
||||||
|
|
||||||
screen->tile_preview_timeout_id = 0;
|
screen->tile_preview_timeout_id = 0;
|
||||||
@@ -1867,8 +1862,7 @@ meta_screen_tile_preview_update_timeout (gpointer data)
|
|||||||
Window xwindow;
|
Window xwindow;
|
||||||
gulong create_serial;
|
gulong create_serial;
|
||||||
|
|
||||||
screen->tile_preview = meta_tile_preview_new (screen->number,
|
screen->tile_preview = meta_tile_preview_new (screen->number);
|
||||||
composited);
|
|
||||||
xwindow = meta_tile_preview_get_xwindow (screen->tile_preview,
|
xwindow = meta_tile_preview_get_xwindow (screen->tile_preview,
|
||||||
&create_serial);
|
&create_serial);
|
||||||
meta_stack_tracker_record_add (screen->stack_tracker,
|
meta_stack_tracker_record_add (screen->stack_tracker,
|
||||||
@@ -2882,28 +2876,17 @@ meta_screen_resize (MetaScreen *screen,
|
|||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
GSList *windows, *tmp;
|
GSList *windows, *tmp;
|
||||||
|
MetaMonitorInfo *old_monitor_infos;
|
||||||
|
|
||||||
screen->rect.width = width;
|
screen->rect.width = width;
|
||||||
screen->rect.height = height;
|
screen->rect.height = height;
|
||||||
|
|
||||||
/* Clear monitor for all windows on this screen, as it will become
|
/* Save the old monitor infos, so they stay valid during the update */
|
||||||
* invalid. */
|
old_monitor_infos = screen->monitor_infos;
|
||||||
windows = meta_display_list_windows (screen->display,
|
|
||||||
META_LIST_INCLUDE_OVERRIDE_REDIRECT);
|
|
||||||
for (tmp = windows; tmp != NULL; tmp = tmp->next)
|
|
||||||
{
|
|
||||||
MetaWindow *window = tmp->data;
|
|
||||||
|
|
||||||
if (window->screen == screen)
|
|
||||||
{
|
|
||||||
g_signal_emit_by_name (screen, "window-left-monitor", window->monitor->number, window);
|
|
||||||
window->monitor = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
reload_monitor_infos (screen);
|
reload_monitor_infos (screen);
|
||||||
set_desktop_geometry_hint (screen);
|
set_desktop_geometry_hint (screen);
|
||||||
|
|
||||||
if (screen->display->compositor)
|
if (screen->display->compositor)
|
||||||
meta_compositor_sync_screen_size (screen->display->compositor,
|
meta_compositor_sync_screen_size (screen->display->compositor,
|
||||||
screen, width, height);
|
screen, width, height);
|
||||||
@@ -2919,12 +2902,13 @@ meta_screen_resize (MetaScreen *screen,
|
|||||||
MetaWindow *window = tmp->data;
|
MetaWindow *window = tmp->data;
|
||||||
|
|
||||||
if (window->screen == screen)
|
if (window->screen == screen)
|
||||||
meta_window_update_monitor (window);
|
meta_window_update_for_monitors_changed (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (old_monitor_infos);
|
||||||
g_slist_free (windows);
|
g_slist_free (windows);
|
||||||
|
|
||||||
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0, index);
|
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -3401,9 +3385,10 @@ meta_screen_get_screen_number (MetaScreen *screen)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_screen_get_display:
|
* meta_screen_get_display:
|
||||||
* Retrieve the display associated with screen.
|
|
||||||
* @screen: A #MetaScreen
|
* @screen: A #MetaScreen
|
||||||
*
|
*
|
||||||
|
* Retrieve the display associated with screen.
|
||||||
|
*
|
||||||
* Returns: (transfer none): Display
|
* Returns: (transfer none): Display
|
||||||
*/
|
*/
|
||||||
MetaDisplay *
|
MetaDisplay *
|
||||||
@@ -3422,6 +3407,14 @@ meta_screen_get_xroot (MetaScreen *screen)
|
|||||||
return screen->xroot;
|
return screen->xroot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_screen_get_size:
|
||||||
|
* @screen: A #MetaScreen
|
||||||
|
* @width: (out): The width of the screen
|
||||||
|
* @height: (out): The height of the screen
|
||||||
|
*
|
||||||
|
* Retrieve the size of the screen.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
meta_screen_get_size (MetaScreen *screen,
|
meta_screen_get_size (MetaScreen *screen,
|
||||||
int *width,
|
int *width,
|
||||||
|
@@ -394,6 +394,8 @@ meta_stack_tracker_free (MetaStackTracker *tracker)
|
|||||||
g_queue_foreach (tracker->queued_requests, (GFunc)meta_stack_op_free, NULL);
|
g_queue_foreach (tracker->queued_requests, (GFunc)meta_stack_op_free, NULL);
|
||||||
g_queue_free (tracker->queued_requests);
|
g_queue_free (tracker->queued_requests);
|
||||||
tracker->queued_requests = NULL;
|
tracker->queued_requests = NULL;
|
||||||
|
|
||||||
|
g_free (tracker);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file stack.c Which windows cover which other windows
|
* SECTION:stack
|
||||||
|
* @short_description: Which windows cover which other windows
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -121,6 +122,7 @@ meta_stack_add (MetaStack *stack,
|
|||||||
window->desc, window->stack_position);
|
window->desc, window->stack_position);
|
||||||
|
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -156,6 +158,7 @@ meta_stack_remove (MetaStack *stack,
|
|||||||
GUINT_TO_POINTER (window->frame->xwindow));
|
GUINT_TO_POINTER (window->frame->xwindow));
|
||||||
|
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -165,6 +168,7 @@ meta_stack_update_layer (MetaStack *stack,
|
|||||||
stack->need_relayer = TRUE;
|
stack->need_relayer = TRUE;
|
||||||
|
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -174,26 +178,64 @@ meta_stack_update_transient (MetaStack *stack,
|
|||||||
stack->need_constrain = TRUE;
|
stack->need_constrain = TRUE;
|
||||||
|
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* raise/lower within a layer */
|
/* raise/lower within a layer */
|
||||||
void
|
void
|
||||||
meta_stack_raise (MetaStack *stack,
|
meta_stack_raise (MetaStack *stack,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
meta_window_set_stack_position_no_sync (window,
|
GList *l;
|
||||||
stack->n_positions - 1);
|
int max_stack_position = window->stack_position;
|
||||||
|
MetaWorkspace *workspace;
|
||||||
|
|
||||||
|
stack_ensure_sorted (stack);
|
||||||
|
|
||||||
|
workspace = meta_window_get_workspace (window);
|
||||||
|
for (l = stack->sorted; l; l = l->next)
|
||||||
|
{
|
||||||
|
MetaWindow *w = (MetaWindow *) l->data;
|
||||||
|
if (meta_window_located_on_workspace (w, workspace) &&
|
||||||
|
w->stack_position > max_stack_position)
|
||||||
|
max_stack_position = w->stack_position;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (max_stack_position == window->stack_position)
|
||||||
|
return;
|
||||||
|
|
||||||
|
meta_window_set_stack_position_no_sync (window, max_stack_position);
|
||||||
|
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_stack_lower (MetaStack *stack,
|
meta_stack_lower (MetaStack *stack,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
meta_window_set_stack_position_no_sync (window, 0);
|
GList *l;
|
||||||
|
int min_stack_position = window->stack_position;
|
||||||
|
MetaWorkspace *workspace;
|
||||||
|
|
||||||
|
stack_ensure_sorted (stack);
|
||||||
|
|
||||||
|
workspace = meta_window_get_workspace (window);
|
||||||
|
for (l = stack->sorted; l; l = l->next)
|
||||||
|
{
|
||||||
|
MetaWindow *w = (MetaWindow *) l->data;
|
||||||
|
if (meta_window_located_on_workspace (w, workspace) &&
|
||||||
|
w->stack_position < min_stack_position)
|
||||||
|
min_stack_position = w->stack_position;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (min_stack_position == window->stack_position)
|
||||||
|
return;
|
||||||
|
|
||||||
|
meta_window_set_stack_position_no_sync (window, min_stack_position);
|
||||||
|
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -209,6 +251,27 @@ meta_stack_thaw (MetaStack *stack)
|
|||||||
|
|
||||||
stack->freeze_count -= 1;
|
stack->freeze_count -= 1;
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
meta_stack_update_window_tile_matches (MetaStack *stack,
|
||||||
|
MetaWorkspace *workspace)
|
||||||
|
{
|
||||||
|
GList *windows, *tmp;
|
||||||
|
|
||||||
|
if (stack->freeze_count > 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
windows = meta_stack_list_windows (stack, workspace);
|
||||||
|
tmp = windows;
|
||||||
|
while (tmp)
|
||||||
|
{
|
||||||
|
meta_window_compute_tile_match ((MetaWindow *) tmp->data);
|
||||||
|
tmp = tmp->next;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_list_free (windows);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -737,6 +800,8 @@ apply_constraints (Constraint **constraints,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* stack_do_window_deletions:
|
||||||
|
*
|
||||||
* Go through "deleted" and take the matching windows
|
* Go through "deleted" and take the matching windows
|
||||||
* out of "windows".
|
* out of "windows".
|
||||||
*/
|
*/
|
||||||
@@ -837,6 +902,8 @@ stack_do_window_additions (MetaStack *stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* stack_do_relayer:
|
||||||
|
*
|
||||||
* Update the layers that windows are in
|
* Update the layers that windows are in
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@@ -882,6 +949,8 @@ stack_do_relayer (MetaStack *stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* stack_do_constrain:
|
||||||
|
*
|
||||||
* Update stack_position and layer to reflect transiency
|
* Update stack_position and layer to reflect transiency
|
||||||
* constraints
|
* constraints
|
||||||
*/
|
*/
|
||||||
@@ -914,6 +983,8 @@ stack_do_constrain (MetaStack *stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* stack_do_resort:
|
||||||
|
*
|
||||||
* Sort stack->sorted with layers having priority over stack_position.
|
* Sort stack->sorted with layers having priority over stack_position.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
@@ -932,6 +1003,8 @@ stack_do_resort (MetaStack *stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* stack_ensure_sorted:
|
||||||
|
*
|
||||||
* Puts the stack into canonical form.
|
* Puts the stack into canonical form.
|
||||||
*
|
*
|
||||||
* Honour the removed and added lists of the stack, and then recalculate
|
* Honour the removed and added lists of the stack, and then recalculate
|
||||||
@@ -951,6 +1024,8 @@ stack_ensure_sorted (MetaStack *stack)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* raise_window_relative_to_managed_windows:
|
||||||
|
*
|
||||||
* This function is used to avoid raising a window above popup
|
* This function is used to avoid raising a window above popup
|
||||||
* menus and other such things.
|
* menus and other such things.
|
||||||
*
|
*
|
||||||
@@ -1051,6 +1126,8 @@ raise_window_relative_to_managed_windows (MetaScreen *screen,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* stack_sync_to_server:
|
||||||
|
*
|
||||||
* Order the windows on the X server to be the same as in our structure.
|
* Order the windows on the X server to be the same as in our structure.
|
||||||
* We do this using XRestackWindows if we don't know the previous order,
|
* We do this using XRestackWindows if we don't know the previous order,
|
||||||
* or XConfigureWindow on a few particular windows if we do and can figure
|
* or XConfigureWindow on a few particular windows if we do and can figure
|
||||||
@@ -1656,6 +1733,7 @@ meta_stack_set_positions (MetaStack *stack,
|
|||||||
"Reset the stack positions of (nearly) all windows\n");
|
"Reset the stack positions of (nearly) all windows\n");
|
||||||
|
|
||||||
stack_sync_to_server (stack);
|
stack_sync_to_server (stack);
|
||||||
|
meta_stack_update_window_tile_matches (stack, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -1718,4 +1796,6 @@ meta_window_set_stack_position (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
meta_window_set_stack_position_no_sync (window, position);
|
meta_window_set_stack_position_no_sync (window, position);
|
||||||
stack_sync_to_server (window->screen->stack);
|
stack_sync_to_server (window->screen->stack);
|
||||||
|
meta_stack_update_window_tile_matches (window->screen->stack,
|
||||||
|
window->screen->active_workspace);
|
||||||
}
|
}
|
||||||
|
246
src/core/stack.h
246
src/core/stack.h
@@ -1,23 +1,5 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
/**
|
|
||||||
* \file stack.h Which windows cover which other windows
|
|
||||||
*
|
|
||||||
* There are two factors that determine window position.
|
|
||||||
*
|
|
||||||
* One is window->stack_position, which is a unique integer
|
|
||||||
* indicating how windows are ordered with respect to one
|
|
||||||
* another. The ordering here transcends layers; it isn't changed
|
|
||||||
* as the window is moved among layers. This allows us to move several
|
|
||||||
* windows from one layer to another, while preserving the relative
|
|
||||||
* order of the moved windows. Also, it allows us to restore
|
|
||||||
* the stacking order from a saved session.
|
|
||||||
*
|
|
||||||
* However when actually stacking windows on the screen, the
|
|
||||||
* layer overrides the stack_position; windows are first sorted
|
|
||||||
* by layer, then by stack_position within each layer.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2001 Havoc Pennington
|
* Copyright (C) 2001 Havoc Pennington
|
||||||
* Copyright (C) 2005 Elijah Newren
|
* Copyright (C) 2005 Elijah Newren
|
||||||
@@ -41,6 +23,25 @@
|
|||||||
#ifndef META_STACK_H
|
#ifndef META_STACK_H
|
||||||
#define META_STACK_H
|
#define META_STACK_H
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:stack
|
||||||
|
* @short_description: Which windows cover which other windows
|
||||||
|
*
|
||||||
|
* There are two factors that determine window position.
|
||||||
|
*
|
||||||
|
* One is window->stack_position, which is a unique integer
|
||||||
|
* indicating how windows are ordered with respect to one
|
||||||
|
* another. The ordering here transcends layers; it isn't changed
|
||||||
|
* as the window is moved among layers. This allows us to move several
|
||||||
|
* windows from one layer to another, while preserving the relative
|
||||||
|
* order of the moved windows. Also, it allows us to restore
|
||||||
|
* the stacking order from a saved session.
|
||||||
|
*
|
||||||
|
* However when actually stacking windows on the screen, the
|
||||||
|
* layer overrides the stack_position; windows are first sorted
|
||||||
|
* by layer, then by stack_position within each layer.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "screen-private.h"
|
#include "screen-private.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -123,192 +124,214 @@ struct _MetaStack
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_new:
|
||||||
|
* @screen: The MetaScreen which will be the parent of this stack.
|
||||||
|
*
|
||||||
* Creates and initialises a MetaStack.
|
* Creates and initialises a MetaStack.
|
||||||
*
|
*
|
||||||
* \param screen The MetaScreen which will be the parent of this stack.
|
* Returns: The new screen.
|
||||||
* \return The new screen.
|
|
||||||
*/
|
*/
|
||||||
MetaStack *meta_stack_new (MetaScreen *screen);
|
MetaStack *meta_stack_new (MetaScreen *screen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroys and frees a MetaStack.
|
* meta_stack_free:
|
||||||
|
* @stack: The stack to destroy.
|
||||||
*
|
*
|
||||||
* \param stack The stack to destroy.
|
* Destroys and frees a MetaStack.
|
||||||
*/
|
*/
|
||||||
void meta_stack_free (MetaStack *stack);
|
void meta_stack_free (MetaStack *stack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_add:
|
||||||
|
* @stack: The stack to add it to
|
||||||
|
* @window: The window to add
|
||||||
|
*
|
||||||
* Adds a window to the local stack. It is a fatal error to call this
|
* Adds a window to the local stack. It is a fatal error to call this
|
||||||
* function on a window which already exists on the stack of any screen.
|
* function on a window which already exists on the stack of any screen.
|
||||||
*
|
|
||||||
* \param window The window to add
|
|
||||||
* \param stack The stack to add it to
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_add (MetaStack *stack,
|
void meta_stack_add (MetaStack *stack,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_remove:
|
||||||
|
* @stack: The stack to remove it from
|
||||||
|
* @window: The window to remove
|
||||||
|
*
|
||||||
* Removes a window from the local stack. It is a fatal error to call this
|
* Removes a window from the local stack. It is a fatal error to call this
|
||||||
* function on a window which exists on the stack of any screen.
|
* function on a window which exists on the stack of any screen.
|
||||||
*
|
|
||||||
* \param window The window to remove
|
|
||||||
* \param stack The stack to remove it from
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_remove (MetaStack *stack,
|
void meta_stack_remove (MetaStack *stack,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_update_layer:
|
||||||
|
* @stack: The stack to recalculate
|
||||||
|
* @window: Dummy parameter
|
||||||
|
*
|
||||||
* Recalculates the correct layer for all windows in the stack,
|
* Recalculates the correct layer for all windows in the stack,
|
||||||
* and moves them about accordingly.
|
* and moves them about accordingly.
|
||||||
*
|
*
|
||||||
* \param window Dummy parameter
|
|
||||||
* \param stack The stack to recalculate
|
|
||||||
* \bug What's with the dummy parameter?
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_update_layer (MetaStack *stack,
|
void meta_stack_update_layer (MetaStack *stack,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_update_transient:
|
||||||
|
* @stack: The stack to recalculate
|
||||||
|
* @window: Dummy parameter
|
||||||
|
*
|
||||||
* Recalculates the correct stacking order for all windows in the stack
|
* Recalculates the correct stacking order for all windows in the stack
|
||||||
* according to their transience, and moves them about accordingly.
|
* according to their transience, and moves them about accordingly.
|
||||||
*
|
*
|
||||||
* \param window Dummy parameter
|
* FIXME: What's with the dummy parameter?
|
||||||
* \param stack The stack to recalculate
|
|
||||||
* \bug What's with the dummy parameter?
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_update_transient (MetaStack *stack,
|
void meta_stack_update_transient (MetaStack *stack,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move a window to the top of its layer.
|
* meta_stack_raise:
|
||||||
|
* @stack: The stack to modify.
|
||||||
|
* @window: The window that's making an ascension.
|
||||||
|
* (Amulet of Yendor not required.)
|
||||||
*
|
*
|
||||||
* \param stack The stack to modify.
|
* Move a window to the top of its layer.
|
||||||
* \param window The window that's making an ascension.
|
|
||||||
* (Amulet of Yendor not required.)
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_raise (MetaStack *stack,
|
void meta_stack_raise (MetaStack *stack,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
/**
|
/**
|
||||||
* Move a window to the bottom of its layer.
|
* meta_stack_lower:
|
||||||
|
* @stack: The stack to modify.
|
||||||
|
* @window: The window that's on the way downwards.
|
||||||
*
|
*
|
||||||
* \param stack The stack to modify.
|
* Move a window to the bottom of its layer.
|
||||||
* \param window The window that's on the way downwards.
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_lower (MetaStack *stack,
|
void meta_stack_lower (MetaStack *stack,
|
||||||
MetaWindow *window);
|
MetaWindow *window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_freeze:
|
||||||
|
* @stack: The stack to freeze.
|
||||||
|
*
|
||||||
* Prevent syncing to server until the next call of meta_stack_thaw(),
|
* Prevent syncing to server until the next call of meta_stack_thaw(),
|
||||||
* so that we can carry out multiple operations in one go without having
|
* so that we can carry out multiple operations in one go without having
|
||||||
* everything halfway reflected on the X server.
|
* everything halfway reflected on the X server.
|
||||||
*
|
*
|
||||||
* (Calls to meta_stack_freeze() nest, so that multiple calls to
|
* (Calls to meta_stack_freeze() nest, so that multiple calls to
|
||||||
* meta_stack_freeze will require multiple calls to meta_stack_thaw().)
|
* meta_stack_freeze will require multiple calls to meta_stack_thaw().)
|
||||||
*
|
|
||||||
* \param stack The stack to freeze.
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_freeze (MetaStack *stack);
|
void meta_stack_freeze (MetaStack *stack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_thaw:
|
||||||
|
* @stack: The stack to thaw.
|
||||||
|
*
|
||||||
* Undoes a meta_stack_freeze(), and processes anything which has become
|
* Undoes a meta_stack_freeze(), and processes anything which has become
|
||||||
* necessary during the freeze. It is an error to call this function if
|
* necessary during the freeze. It is an error to call this function if
|
||||||
* the stack has not been frozen.
|
* the stack has not been frozen.
|
||||||
*
|
|
||||||
* \param stack The stack to thaw.
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_thaw (MetaStack *stack);
|
void meta_stack_thaw (MetaStack *stack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_get_top:
|
||||||
|
* @stack: The stack to examine.
|
||||||
|
*
|
||||||
* Finds the top window on the stack.
|
* Finds the top window on the stack.
|
||||||
*
|
*
|
||||||
* \param stack The stack to examine.
|
* Returns: The top window on the stack, or %NULL in the vanishingly unlikely
|
||||||
* \return The top window on the stack, or NULL in the vanishingly unlikely
|
* event that you have no windows on your screen whatsoever.
|
||||||
* event that you have no windows on your screen whatsoever.
|
|
||||||
*/
|
*/
|
||||||
MetaWindow* meta_stack_get_top (MetaStack *stack);
|
MetaWindow* meta_stack_get_top (MetaStack *stack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_get_bottom:
|
||||||
|
* @stack: The stack to search
|
||||||
|
*
|
||||||
* Finds the window at the bottom of the stack. Since that's pretty much
|
* Finds the window at the bottom of the stack. Since that's pretty much
|
||||||
* always the desktop, this isn't the most useful of functions, and nobody
|
* always the desktop, this isn't the most useful of functions, and nobody
|
||||||
* actually calls it. We should probably get rid of it.
|
* actually calls it. We should probably get rid of it.
|
||||||
*
|
|
||||||
* \param stack The stack to search
|
|
||||||
*/
|
*/
|
||||||
MetaWindow* meta_stack_get_bottom (MetaStack *stack);
|
MetaWindow* meta_stack_get_bottom (MetaStack *stack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_get_above:
|
||||||
|
* @stack: The stack to search.
|
||||||
|
* @window: The window to look above.
|
||||||
|
* @only_within_layer: If %TRUE, will return %NULL if @window is the
|
||||||
|
* top window in its layer.
|
||||||
|
*
|
||||||
* Finds the window above a given window in the stack.
|
* Finds the window above a given window in the stack.
|
||||||
* It is not an error to pass in a window which does not exist in
|
* It is not an error to pass in a window which does not exist in
|
||||||
* the stack; the function will merely return NULL.
|
* the stack; the function will merely return %NULL.
|
||||||
*
|
*
|
||||||
* \param stack The stack to search.
|
* Returns: %NULL if there is no such window;
|
||||||
* \param window The window to look above.
|
* the window above @window otherwise.
|
||||||
* \param only_within_layer If true, will return NULL if "window" is the
|
|
||||||
* top window in its layer.
|
|
||||||
* \return NULL if there is no such window;
|
|
||||||
* the window above "window" otherwise.
|
|
||||||
*/
|
*/
|
||||||
MetaWindow* meta_stack_get_above (MetaStack *stack,
|
MetaWindow* meta_stack_get_above (MetaStack *stack,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean only_within_layer);
|
gboolean only_within_layer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_get_below:
|
||||||
|
* @stack: The stack to search.
|
||||||
|
* @window: The window to look below.
|
||||||
|
* @only_within_layer: If %TRUE, will return %NULL if window is the
|
||||||
|
* bottom window in its layer.
|
||||||
|
*
|
||||||
* Finds the window below a given window in the stack.
|
* Finds the window below a given window in the stack.
|
||||||
* It is not an error to pass in a window which does not exist in
|
* It is not an error to pass in a window which does not exist in
|
||||||
* the stack; the function will merely return NULL.
|
* the stack; the function will merely return %NULL.
|
||||||
*
|
*
|
||||||
* \param stack The stack to search.
|
*
|
||||||
* \param window The window to look below.
|
* Returns: %NULL if there is no such window;
|
||||||
* \param only_within_layer If true, will return NULL if "window" is the
|
* the window below @window otherwise.
|
||||||
* bottom window in its layer.
|
|
||||||
* \return NULL if there is no such window;
|
|
||||||
* the window below "window" otherwise.
|
|
||||||
*/
|
*/
|
||||||
MetaWindow* meta_stack_get_below (MetaStack *stack,
|
MetaWindow* meta_stack_get_below (MetaStack *stack,
|
||||||
MetaWindow *window,
|
MetaWindow *window,
|
||||||
gboolean only_within_layer);
|
gboolean only_within_layer);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the topmost, focusable, mapped, window in a stack. If you supply
|
* meta_stack_get_default_focus_window:
|
||||||
* a window as "not_this_one", we won't return that one (presumably
|
* @stack: The stack to search.
|
||||||
* because it's going to be going away). But if you do supply "not_this_one"
|
* @workspace: %NULL to search all workspaces; otherwise only windows
|
||||||
* and we find its parent, we'll return that; and if "not_this_one" is in
|
* from that workspace will be returned.
|
||||||
|
* @not_this_one: Window to ignore because it's being unfocussed or
|
||||||
|
* going away.
|
||||||
|
*
|
||||||
|
* Find the topmost, focusable, mapped, window in a stack. If you supply
|
||||||
|
* a window as @not_this_one, we won't return that one (presumably
|
||||||
|
* because it's going to be going away). But if you do supply @not_this_one
|
||||||
|
* and we find its parent, we'll return that; and if @not_this_one is in
|
||||||
* a group, we'll return the top window of that group.
|
* a group, we'll return the top window of that group.
|
||||||
*
|
*
|
||||||
* Also, we are prejudiced against dock windows. Every kind of window, even
|
* Also, we are prejudiced against dock windows. Every kind of window, even
|
||||||
* the desktop, will be returned in preference to a dock window.
|
* the desktop, will be returned in preference to a dock window.
|
||||||
*
|
*
|
||||||
* \param stack The stack to search.
|
* Returns: The window matching all these constraints or %NULL if none does.
|
||||||
* \param workspace NULL to search all workspaces; otherwise only windows
|
|
||||||
* from that workspace will be returned.
|
|
||||||
* \param not_this_one Window to ignore because it's being unfocussed or
|
|
||||||
* going away.
|
|
||||||
* \return The window matching all these constraints or NULL if none does.
|
|
||||||
*
|
|
||||||
* \bug Never called!
|
|
||||||
*/
|
*/
|
||||||
MetaWindow* meta_stack_get_default_focus_window (MetaStack *stack,
|
MetaWindow* meta_stack_get_default_focus_window (MetaStack *stack,
|
||||||
MetaWorkspace *workspace,
|
MetaWorkspace *workspace,
|
||||||
MetaWindow *not_this_one);
|
MetaWindow *not_this_one);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_get_default_focus_window_at_point:
|
||||||
|
* @stack: The stack to search.
|
||||||
|
* @workspace: %NULL to search all workspaces; otherwise only windows
|
||||||
|
* from that workspace will be returned.
|
||||||
|
* @not_this_one: Window to ignore because it's being unfocussed or
|
||||||
|
* going away.
|
||||||
|
* @root_x: The returned window must contain this point,
|
||||||
|
* unless it's a dock.
|
||||||
|
* @root_y: See root_x.
|
||||||
|
*
|
||||||
* Find the topmost, focusable, mapped, window in a stack. If you supply
|
* Find the topmost, focusable, mapped, window in a stack. If you supply
|
||||||
* a window as "not_this_one", we won't return that one (presumably
|
* a window as @not_this_one, we won't return that one (presumably
|
||||||
* because it's going to be going away). But if you do supply "not_this_one"
|
* because it's going to be going away). But if you do supply @not_this_one
|
||||||
* and we find its parent, we'll return that; and if "not_this_one" is in
|
* and we find its parent, we'll return that; and if @not_this_one is in
|
||||||
* a group, we'll return the top window of that group.
|
* a group, we'll return the top window of that group.
|
||||||
*
|
*
|
||||||
* Also, we are prejudiced against dock windows. Every kind of window, even
|
* Also, we are prejudiced against dock windows. Every kind of window, even
|
||||||
* the desktop, will be returned in preference to a dock window.
|
* the desktop, will be returned in preference to a dock window.
|
||||||
*
|
*
|
||||||
* \param stack The stack to search.
|
* Returns: The window matching all these constraints or %NULL if none does.
|
||||||
* \param workspace NULL to search all workspaces; otherwise only windows
|
|
||||||
* from that workspace will be returned.
|
|
||||||
* \param not_this_one Window to ignore because it's being unfocussed or
|
|
||||||
* going away.
|
|
||||||
* \param root_x The returned window must contain this point,
|
|
||||||
* unless it's a dock.
|
|
||||||
* \param root_y See root_x.
|
|
||||||
* \return The window matching all these constraints or NULL if none does.
|
|
||||||
*/
|
*/
|
||||||
MetaWindow* meta_stack_get_default_focus_window_at_point (MetaStack *stack,
|
MetaWindow* meta_stack_get_default_focus_window_at_point (MetaStack *stack,
|
||||||
MetaWorkspace *workspace,
|
MetaWorkspace *workspace,
|
||||||
@@ -317,18 +340,25 @@ MetaWindow* meta_stack_get_default_focus_window_at_point (MetaStack *stack,
|
|||||||
int root_y);
|
int root_y);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_list_windows:
|
||||||
|
* @stack: The stack to examine.
|
||||||
|
* @workspace: If not %NULL, only windows on this workspace will be
|
||||||
|
* returned; otherwise all windows in the stack will be
|
||||||
|
* returned.
|
||||||
|
*
|
||||||
* Finds all the windows in the stack, in order.
|
* Finds all the windows in the stack, in order.
|
||||||
*
|
*
|
||||||
* \param stack The stack to examine.
|
* Returns: A list of windows, in stacking order, honouring layers.
|
||||||
* \param workspace If non-NULL, only windows on this workspace will be
|
|
||||||
* returned; otherwise all windows in the stack will be
|
|
||||||
* returned.
|
|
||||||
* \return A list of windows, in stacking order, honouring layers.
|
|
||||||
*/
|
*/
|
||||||
GList* meta_stack_list_windows (MetaStack *stack,
|
GList* meta_stack_list_windows (MetaStack *stack,
|
||||||
MetaWorkspace *workspace);
|
MetaWorkspace *workspace);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_windows_cmp:
|
||||||
|
* @stack: A stack containing both window_a and window_b
|
||||||
|
* @window_a: A window
|
||||||
|
* @window_b Another window
|
||||||
|
*
|
||||||
* Comparison function for windows within a stack. This is not directly
|
* Comparison function for windows within a stack. This is not directly
|
||||||
* suitable for use within a standard comparison routine, because it takes
|
* suitable for use within a standard comparison routine, because it takes
|
||||||
* an extra parameter; you will need to wrap it.
|
* an extra parameter; you will need to wrap it.
|
||||||
@@ -339,9 +369,6 @@ GList* meta_stack_list_windows (MetaStack *stack,
|
|||||||
*
|
*
|
||||||
* (FIXME: Apparently identical to compare_window_position(). Merge them.)
|
* (FIXME: Apparently identical to compare_window_position(). Merge them.)
|
||||||
*
|
*
|
||||||
* \param stack A stack containing both window_a and window_b
|
|
||||||
* \param window_a A window
|
|
||||||
* \param window_b Another window
|
|
||||||
* \return -1 if window_a is below window_b, honouring layers; 1 if it's
|
* \return -1 if window_a is below window_b, honouring layers; 1 if it's
|
||||||
* above it; 0 if you passed in the same window twice!
|
* above it; 0 if you passed in the same window twice!
|
||||||
*/
|
*/
|
||||||
@@ -350,37 +377,44 @@ int meta_stack_windows_cmp (MetaStack *stack,
|
|||||||
MetaWindow *window_b);
|
MetaWindow *window_b);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_window_set_stack_position:
|
||||||
|
* @window: The window which is moving.
|
||||||
|
* @position: Where it should move to (0 is the bottom).
|
||||||
|
*
|
||||||
* Sets the position of a window within the stack. This will only move it
|
* Sets the position of a window within the stack. This will only move it
|
||||||
* up or down within its layer. It is an error to attempt to move this
|
* up or down within its layer. It is an error to attempt to move this
|
||||||
* below position zero or above the last position in the stack (however, since
|
* below position zero or above the last position in the stack (however, since
|
||||||
* we don't provide a simple way to tell the number of windows in the stack,
|
* we don't provide a simple way to tell the number of windows in the stack,
|
||||||
* this requirement may not be easy to fulfil).
|
* this requirement may not be easy to fulfil).
|
||||||
*
|
|
||||||
* \param window The window which is moving.
|
|
||||||
* \param position Where it should move to (0 is the bottom).
|
|
||||||
*/
|
*/
|
||||||
void meta_window_set_stack_position (MetaWindow *window,
|
void meta_window_set_stack_position (MetaWindow *window,
|
||||||
int position);
|
int position);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_get_positions:
|
||||||
|
* @stack: The stack to examine.
|
||||||
|
*
|
||||||
* Returns the current stack state, allowing rudimentary transactions.
|
* Returns the current stack state, allowing rudimentary transactions.
|
||||||
*
|
*
|
||||||
* \param stack The stack to examine.
|
* Returns: An opaque GList representing the current stack sort order;
|
||||||
* \return An opaque GList representing the current stack sort order;
|
* it is the caller's responsibility to free it.
|
||||||
* it is the caller's responsibility to free it.
|
* Pass this to meta_stack_set_positions() later if you want to restore
|
||||||
* Pass this to meta_stack_set_positions() later if you want to restore
|
* the state to where it was when you called this function.
|
||||||
* the state to where it was when you called this function.
|
|
||||||
*/
|
*/
|
||||||
GList* meta_stack_get_positions (MetaStack *stack);
|
GList* meta_stack_get_positions (MetaStack *stack);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_stack_set_positions:
|
||||||
|
* @stack: The stack to roll back.
|
||||||
|
* @windows: The list returned from meta_stack_get_positions().
|
||||||
|
*
|
||||||
* Rolls back a transaction, given the list returned from
|
* Rolls back a transaction, given the list returned from
|
||||||
* meta_stack_get_positions().
|
* meta_stack_get_positions().
|
||||||
*
|
*
|
||||||
* \param stack The stack to roll back.
|
|
||||||
* \param windows The list returned from meta_stack_get_positions().
|
|
||||||
*/
|
*/
|
||||||
void meta_stack_set_positions (MetaStack *stack,
|
void meta_stack_set_positions (MetaStack *stack,
|
||||||
GList *windows);
|
GList *windows);
|
||||||
|
|
||||||
|
void meta_stack_update_window_tile_matches (MetaStack *stack,
|
||||||
|
MetaWorkspace *workspace);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -636,8 +636,7 @@ meta_show_dialog (const char *type,
|
|||||||
append_argument (args, "--class");
|
append_argument (args, "--class");
|
||||||
append_argument (args, "mutter-dialog");
|
append_argument (args, "mutter-dialog");
|
||||||
append_argument (args, "--title");
|
append_argument (args, "--title");
|
||||||
/* Translators: This is the title used on dialog boxes */
|
append_argument (args, "");
|
||||||
append_argument (args, _("Mutter"));
|
|
||||||
append_argument (args, "--text");
|
append_argument (args, "--text");
|
||||||
append_argument (args, message);
|
append_argument (args, message);
|
||||||
|
|
||||||
@@ -917,14 +916,53 @@ meta_later_remove (guint later_id)
|
|||||||
MetaLater *later = l->data;
|
MetaLater *later = l->data;
|
||||||
if (later->id == later_id)
|
if (later->id == later_id)
|
||||||
{
|
{
|
||||||
laters = g_slist_remove_link (laters, l);
|
laters = g_slist_delete_link (laters, l);
|
||||||
/* If this was a "repaint func" later, we just let the
|
/* If this was a "repaint func" later, we just let the
|
||||||
* repaint func run and get removed
|
* repaint func run and get removed
|
||||||
*/
|
*/
|
||||||
destroy_later (later);
|
destroy_later (later);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* meta_frame_type_to_string:
|
||||||
|
*
|
||||||
|
* Converts a frame type enum value to the name string that would
|
||||||
|
* appear in the theme definition file.
|
||||||
|
*
|
||||||
|
* Return value: the string value
|
||||||
|
*/
|
||||||
|
const char*
|
||||||
|
meta_frame_type_to_string (MetaFrameType type)
|
||||||
|
{
|
||||||
|
switch (type)
|
||||||
|
{
|
||||||
|
case META_FRAME_TYPE_NORMAL:
|
||||||
|
return "normal";
|
||||||
|
case META_FRAME_TYPE_DIALOG:
|
||||||
|
return "dialog";
|
||||||
|
case META_FRAME_TYPE_MODAL_DIALOG:
|
||||||
|
return "modal_dialog";
|
||||||
|
case META_FRAME_TYPE_UTILITY:
|
||||||
|
return "utility";
|
||||||
|
case META_FRAME_TYPE_MENU:
|
||||||
|
return "menu";
|
||||||
|
case META_FRAME_TYPE_BORDER:
|
||||||
|
return "border";
|
||||||
|
case META_FRAME_TYPE_ATTACHED:
|
||||||
|
return "attached";
|
||||||
|
#if 0
|
||||||
|
case META_FRAME_TYPE_TOOLBAR:
|
||||||
|
return "toolbar";
|
||||||
|
#endif
|
||||||
|
case META_FRAME_TYPE_LAST:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return "<unknown>";
|
||||||
|
}
|
||||||
|
|
||||||
/* eof util.c */
|
/* eof util.c */
|
||||||
|
|
||||||
|
@@ -97,10 +97,18 @@ struct _MetaWindow
|
|||||||
char *role;
|
char *role;
|
||||||
char *sm_client_id;
|
char *sm_client_id;
|
||||||
char *wm_client_machine;
|
char *wm_client_machine;
|
||||||
|
|
||||||
char *startup_id;
|
char *startup_id;
|
||||||
char *mutter_hints;
|
char *mutter_hints;
|
||||||
char *gtk_theme_variant;
|
char *gtk_theme_variant;
|
||||||
|
char *gtk_application_id;
|
||||||
|
char *gtk_unique_bus_name;
|
||||||
|
char *gtk_application_object_path;
|
||||||
|
char *gtk_window_object_path;
|
||||||
|
char *gtk_app_menu_object_path;
|
||||||
|
char *gtk_menubar_object_path;
|
||||||
|
|
||||||
|
int hide_titlebar_when_maximized;
|
||||||
int net_wm_pid;
|
int net_wm_pid;
|
||||||
|
|
||||||
Window xtransient_for;
|
Window xtransient_for;
|
||||||
@@ -129,6 +137,10 @@ struct _MetaWindow
|
|||||||
* this is the current mode. If not, it is the mode which will be
|
* this is the current mode. If not, it is the mode which will be
|
||||||
* requested after the window grab is released */
|
* requested after the window grab is released */
|
||||||
guint tile_mode : 2;
|
guint tile_mode : 2;
|
||||||
|
/* The last "full" maximized/unmaximized state. We need to keep track of
|
||||||
|
* that to toggle between normal/tiled or maximized/tiled states. */
|
||||||
|
guint saved_maximize : 1;
|
||||||
|
int tile_monitor_number;
|
||||||
|
|
||||||
/* Whether we're shaded */
|
/* Whether we're shaded */
|
||||||
guint shaded : 1;
|
guint shaded : 1;
|
||||||
@@ -321,9 +333,6 @@ struct _MetaWindow
|
|||||||
/* if TRUE, window is attached to its parent */
|
/* if TRUE, window is attached to its parent */
|
||||||
guint attached : 1;
|
guint attached : 1;
|
||||||
|
|
||||||
/* if non-NULL, the bounds of the window frame */
|
|
||||||
cairo_region_t *frame_bounds;
|
|
||||||
|
|
||||||
/* Note: can be NULL */
|
/* Note: can be NULL */
|
||||||
GSList *struts;
|
GSList *struts;
|
||||||
|
|
||||||
@@ -398,6 +407,9 @@ struct _MetaWindow
|
|||||||
|
|
||||||
/* Focused window that is (directly or indirectly) attached to this one */
|
/* Focused window that is (directly or indirectly) attached to this one */
|
||||||
MetaWindow *attached_focus_window;
|
MetaWindow *attached_focus_window;
|
||||||
|
|
||||||
|
/* The currently complementary tiled window, if any */
|
||||||
|
MetaWindow *tile_match;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _MetaWindowClass
|
struct _MetaWindowClass
|
||||||
@@ -425,6 +437,8 @@ struct _MetaWindowClass
|
|||||||
(w)->tile_mode == META_TILE_LEFT)
|
(w)->tile_mode == META_TILE_LEFT)
|
||||||
#define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
#define META_WINDOW_TILED_RIGHT(w) (META_WINDOW_TILED_SIDE_BY_SIDE(w) && \
|
||||||
(w)->tile_mode == META_TILE_RIGHT)
|
(w)->tile_mode == META_TILE_RIGHT)
|
||||||
|
#define META_WINDOW_TILED_MAXIMIZED(w)(META_WINDOW_MAXIMIZED(w) && \
|
||||||
|
(w)->tile_mode == META_TILE_MAXIMIZED)
|
||||||
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
|
#define META_WINDOW_ALLOWS_MOVE(w) ((w)->has_move_func && !(w)->fullscreen)
|
||||||
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED_SIDE_BY_SIDE(w) && !(w)->fullscreen && !(w)->shaded)
|
#define META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS(w) ((w)->has_resize_func && !META_WINDOW_MAXIMIZED (w) && !META_WINDOW_TILED_SIDE_BY_SIDE(w) && !(w)->fullscreen && !(w)->shaded)
|
||||||
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
|
#define META_WINDOW_ALLOWS_RESIZE(w) (META_WINDOW_ALLOWS_RESIZE_EXCEPT_HINTS (w) && \
|
||||||
@@ -640,12 +654,15 @@ void meta_window_update_icon_now (MetaWindow *window);
|
|||||||
|
|
||||||
void meta_window_update_role (MetaWindow *window);
|
void meta_window_update_role (MetaWindow *window);
|
||||||
void meta_window_update_net_wm_type (MetaWindow *window);
|
void meta_window_update_net_wm_type (MetaWindow *window);
|
||||||
void meta_window_update_monitor (MetaWindow *window);
|
void meta_window_update_for_monitors_changed (MetaWindow *window);
|
||||||
void meta_window_update_on_all_workspaces (MetaWindow *window);
|
void meta_window_update_on_all_workspaces (MetaWindow *window);
|
||||||
|
|
||||||
void meta_window_propagate_focus_appearance (MetaWindow *window,
|
void meta_window_propagate_focus_appearance (MetaWindow *window,
|
||||||
gboolean focused);
|
gboolean focused);
|
||||||
|
|
||||||
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
|
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
|
||||||
|
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
|
||||||
|
|
||||||
|
void meta_window_compute_tile_match (MetaWindow *window);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file window-props.c MetaWindow property handling
|
* SECTION:window-props
|
||||||
|
* @short_description: #MetaWindow property handling
|
||||||
*
|
*
|
||||||
* A system which can inspect sets of properties of given windows
|
* A system which can inspect sets of properties of given windows
|
||||||
* and take appropriate action given their values.
|
* and take appropriate action given their values.
|
||||||
@@ -389,11 +390,13 @@ reload_net_wm_user_time_window (MetaWindow *window,
|
|||||||
#define MAX_TITLE_LENGTH 512
|
#define MAX_TITLE_LENGTH 512
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by set_window_title and set_icon_title to set the value of
|
* set_title_text:
|
||||||
* *target to title. It required and atom is set, it will update the
|
*
|
||||||
|
* Called by set_window_title() and set_icon_title() to set the value of
|
||||||
|
* @target to @title. It required and @atom is set, it will update the
|
||||||
* appropriate property.
|
* appropriate property.
|
||||||
*
|
*
|
||||||
* Returns TRUE if a new title was set.
|
* Returns: %TRUE if a new title was set.
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
set_title_text (MetaWindow *window,
|
set_title_text (MetaWindow *window,
|
||||||
@@ -1578,21 +1581,74 @@ reload_gtk_theme_variant (MetaWindow *window,
|
|||||||
requested_variant, window->desc);
|
requested_variant, window->desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_strcmp0 (requested_variant, current_variant))
|
if (g_strcmp0 (requested_variant, current_variant) != 0)
|
||||||
{
|
{
|
||||||
g_free (current_variant);
|
g_free (current_variant);
|
||||||
|
|
||||||
if (requested_variant)
|
window->gtk_theme_variant = g_strdup (requested_variant);
|
||||||
window->gtk_theme_variant = g_strdup (requested_variant);
|
|
||||||
else
|
|
||||||
window->gtk_theme_variant = NULL;
|
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
|
meta_ui_queue_frame_draw (window->screen->ui, window->frame->xwindow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
|
||||||
|
MetaPropValue *value,
|
||||||
|
gboolean initial)
|
||||||
|
{
|
||||||
|
gboolean requested_value = FALSE;
|
||||||
|
gboolean current_value = window->hide_titlebar_when_maximized;
|
||||||
|
|
||||||
|
if (value->type != META_PROP_VALUE_INVALID)
|
||||||
|
{
|
||||||
|
requested_value = ((int) value->v.cardinal == 1);
|
||||||
|
meta_verbose ("Request to hide titlebar for window %s.\n", window->desc);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requested_value == current_value)
|
||||||
|
return;
|
||||||
|
|
||||||
|
window->hide_titlebar_when_maximized = requested_value;
|
||||||
|
|
||||||
|
if (META_WINDOW_MAXIMIZED (window))
|
||||||
|
{
|
||||||
|
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||||
|
|
||||||
|
if (window->frame)
|
||||||
|
meta_ui_queue_frame_draw (window->screen->ui, window->frame->xwindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#define RELOAD_STRING(var_name, propname) \
|
||||||
|
static void \
|
||||||
|
reload_ ## var_name (MetaWindow *window, \
|
||||||
|
MetaPropValue *value, \
|
||||||
|
gboolean initial) \
|
||||||
|
{ \
|
||||||
|
g_free (window->var_name); \
|
||||||
|
\
|
||||||
|
if (value->type != META_PROP_VALUE_INVALID) \
|
||||||
|
window->var_name = g_strdup (value->v.str); \
|
||||||
|
else \
|
||||||
|
window->var_name = NULL; \
|
||||||
|
\
|
||||||
|
g_object_notify (G_OBJECT (window), propname); \
|
||||||
|
}
|
||||||
|
|
||||||
|
RELOAD_STRING (gtk_unique_bus_name, "gtk-unique-bus-name")
|
||||||
|
RELOAD_STRING (gtk_application_id, "gtk-application-id")
|
||||||
|
RELOAD_STRING (gtk_application_object_path, "gtk-application-object-path")
|
||||||
|
RELOAD_STRING (gtk_window_object_path, "gtk-window-object-path")
|
||||||
|
RELOAD_STRING (gtk_app_menu_object_path, "gtk-app-menu-object-path")
|
||||||
|
RELOAD_STRING (gtk_menubar_object_path, "gtk-menubar-object-path")
|
||||||
|
|
||||||
|
#undef RELOAD_STRING
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_display_init_window_prop_hooks:
|
||||||
|
* @display: The #MetaDisplay
|
||||||
|
*
|
||||||
* Initialises the property hooks system. Each row in the table named "hooks"
|
* Initialises the property hooks system. Each row in the table named "hooks"
|
||||||
* represents an action to take when a property is found on a newly-created
|
* represents an action to take when a property is found on a newly-created
|
||||||
* window, or when a property changes its value.
|
* window, or when a property changes its value.
|
||||||
@@ -1645,6 +1701,13 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
|
|||||||
{ display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, TRUE, FALSE },
|
{ display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, TRUE, FALSE },
|
||||||
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, TRUE, FALSE },
|
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, TRUE, FALSE },
|
||||||
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, TRUE, FALSE },
|
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, TRUE, FALSE },
|
||||||
|
{ display->atom__GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, META_PROP_VALUE_CARDINAL, reload_gtk_hide_titlebar_when_maximized, TRUE, FALSE },
|
||||||
|
{ display->atom__GTK_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_gtk_application_id, TRUE, FALSE },
|
||||||
|
{ display->atom__GTK_UNIQUE_BUS_NAME, META_PROP_VALUE_UTF8, reload_gtk_unique_bus_name, TRUE, FALSE },
|
||||||
|
{ display->atom__GTK_APPLICATION_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_application_object_path, TRUE, FALSE },
|
||||||
|
{ display->atom__GTK_WINDOW_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_window_object_path, TRUE, FALSE },
|
||||||
|
{ display->atom__GTK_APP_MENU_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_app_menu_object_path, TRUE, FALSE },
|
||||||
|
{ display->atom__GTK_MENUBAR_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_menubar_object_path, TRUE, FALSE },
|
||||||
{ display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window, TRUE, FALSE },
|
{ display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window, TRUE, FALSE },
|
||||||
{ display->atom_WM_STATE, META_PROP_VALUE_INVALID, NULL, FALSE, FALSE },
|
{ display->atom_WM_STATE, META_PROP_VALUE_INVALID, NULL, FALSE, FALSE },
|
||||||
{ display->atom__NET_WM_ICON, META_PROP_VALUE_INVALID, reload_net_wm_icon, FALSE, FALSE },
|
{ display->atom__NET_WM_ICON, META_PROP_VALUE_INVALID, reload_net_wm_icon, FALSE, FALSE },
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \file window-props.h MetaWindow property handling
|
* SECTION:window-props
|
||||||
|
* @short_description: MetaWindow property handling
|
||||||
*
|
*
|
||||||
* A system which can inspect sets of properties of given windows
|
* A system which can inspect sets of properties of given windows
|
||||||
* and take appropriate action given their values.
|
* and take appropriate action given their values.
|
||||||
@@ -35,12 +36,13 @@
|
|||||||
#include "window-private.h"
|
#include "window-private.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_window_reload_property:
|
||||||
|
* @window: The window.
|
||||||
|
* @property: A single X atom.
|
||||||
|
*
|
||||||
* Requests the current values of a single property for a given
|
* Requests the current values of a single property for a given
|
||||||
* window from the server, and deals with it appropriately.
|
* window from the server, and deals with it appropriately.
|
||||||
* Does not return it to the caller (it's been dealt with!)
|
* Does not return it to the caller (it's been dealt with!)
|
||||||
*
|
|
||||||
* \param window The window.
|
|
||||||
* \param property A single X atom.
|
|
||||||
*/
|
*/
|
||||||
void meta_window_reload_property (MetaWindow *window,
|
void meta_window_reload_property (MetaWindow *window,
|
||||||
Atom property,
|
Atom property,
|
||||||
@@ -48,13 +50,14 @@ void meta_window_reload_property (MetaWindow *window,
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_window_reload_properties:
|
||||||
|
* @window: The window.
|
||||||
|
* @properties: A pointer to a list of X atoms, "n_properties" long.
|
||||||
|
* @n_properties: The length of the properties list.
|
||||||
|
*
|
||||||
* Requests the current values of a set of properties for a given
|
* Requests the current values of a set of properties for a given
|
||||||
* window from the server, and deals with them appropriately.
|
* window from the server, and deals with them appropriately.
|
||||||
* Does not return them to the caller (they've been dealt with!)
|
* Does not return them to the caller (they've been dealt with!)
|
||||||
*
|
|
||||||
* \param window The window.
|
|
||||||
* \param properties A pointer to a list of X atoms, "n_properties" long.
|
|
||||||
* \param n_properties The length of the properties list.
|
|
||||||
*/
|
*/
|
||||||
void meta_window_reload_properties (MetaWindow *window,
|
void meta_window_reload_properties (MetaWindow *window,
|
||||||
const Atom *properties,
|
const Atom *properties,
|
||||||
@@ -62,14 +65,15 @@ void meta_window_reload_properties (MetaWindow *window,
|
|||||||
gboolean initial);
|
gboolean initial);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_window_reload_property_from_xwindow:
|
||||||
|
* @window: A window on the same display as the one we're
|
||||||
|
* investigating (only used to find the display)
|
||||||
|
* @xwindow: The X handle for the window.
|
||||||
|
* @property: A single X atom.
|
||||||
|
*
|
||||||
* Requests the current values of a single property for a given
|
* Requests the current values of a single property for a given
|
||||||
* window from the server, and deals with it appropriately.
|
* window from the server, and deals with it appropriately.
|
||||||
* Does not return it to the caller (it's been dealt with!)
|
* Does not return it to the caller (it's been dealt with!)
|
||||||
*
|
|
||||||
* \param window A window on the same display as the one we're
|
|
||||||
* investigating (only used to find the display)
|
|
||||||
* \param xwindow The X handle for the window.
|
|
||||||
* \param property A single X atom.
|
|
||||||
*/
|
*/
|
||||||
void meta_window_reload_property_from_xwindow
|
void meta_window_reload_property_from_xwindow
|
||||||
(MetaWindow *window,
|
(MetaWindow *window,
|
||||||
@@ -78,15 +82,16 @@ void meta_window_reload_property_from_xwindow
|
|||||||
gboolean initial);
|
gboolean initial);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_window_reload_properties_from_xwindow:
|
||||||
|
* @window: A window on the same display as the one we're
|
||||||
|
* investigating (only used to find the display)
|
||||||
|
* @xwindow: The X handle for the window.
|
||||||
|
* @properties: A pointer to a list of X atoms, "n_properties" long.
|
||||||
|
* @n_properties: The length of the properties list.
|
||||||
|
*
|
||||||
* Requests the current values of a set of properties for a given
|
* Requests the current values of a set of properties for a given
|
||||||
* window from the server, and deals with them appropriately.
|
* window from the server, and deals with them appropriately.
|
||||||
* Does not return them to the caller (they've been dealt with!)
|
* Does not return them to the caller (they've been dealt with!)
|
||||||
*
|
|
||||||
* \param window A window on the same display as the one we're
|
|
||||||
* investigating (only used to find the display)
|
|
||||||
* \param xwindow The X handle for the window.
|
|
||||||
* \param properties A pointer to a list of X atoms, "n_properties" long.
|
|
||||||
* \param n_properties The length of the properties list.
|
|
||||||
*/
|
*/
|
||||||
void meta_window_reload_properties_from_xwindow
|
void meta_window_reload_properties_from_xwindow
|
||||||
(MetaWindow *window,
|
(MetaWindow *window,
|
||||||
@@ -96,41 +101,44 @@ void meta_window_reload_properties_from_xwindow
|
|||||||
gboolean initial);
|
gboolean initial);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_window_load_initial_properties:
|
||||||
|
* @window: The window.
|
||||||
|
*
|
||||||
* Requests the current values for standard properties for a given
|
* Requests the current values for standard properties for a given
|
||||||
* window from the server, and deals with them appropriately.
|
* window from the server, and deals with them appropriately.
|
||||||
* Does not return them to the caller (they've been dealt with!)
|
* Does not return them to the caller (they've been dealt with!)
|
||||||
*
|
|
||||||
* \param window The window.
|
|
||||||
*/
|
*/
|
||||||
void meta_window_load_initial_properties (MetaWindow *window);
|
void meta_window_load_initial_properties (MetaWindow *window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_display_init_window_prop_hooks:
|
||||||
|
* @display: The display.
|
||||||
|
*
|
||||||
* Initialises the hooks used for the reload_propert* functions
|
* Initialises the hooks used for the reload_propert* functions
|
||||||
* on a particular display, and stores a pointer to them in the
|
* on a particular display, and stores a pointer to them in the
|
||||||
* display.
|
* display.
|
||||||
*
|
|
||||||
* \param display The display.
|
|
||||||
*/
|
*/
|
||||||
void meta_display_init_window_prop_hooks (MetaDisplay *display);
|
void meta_display_init_window_prop_hooks (MetaDisplay *display);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_display_free_window_prop_hooks:
|
||||||
|
* @display: The display.
|
||||||
* Frees the hooks used for the reload_propert* functions
|
* Frees the hooks used for the reload_propert* functions
|
||||||
* for a particular display.
|
* for a particular display.
|
||||||
*
|
|
||||||
* \param display The display.
|
|
||||||
*/
|
*/
|
||||||
void meta_display_free_window_prop_hooks (MetaDisplay *display);
|
void meta_display_free_window_prop_hooks (MetaDisplay *display);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* meta_set_normal_hints:
|
||||||
|
* @window: The window to set the size hints on.
|
||||||
|
* @hints: Either some X size hints, or NULL for default.
|
||||||
|
*
|
||||||
* Sets the size hints for a window. This happens when a
|
* Sets the size hints for a window. This happens when a
|
||||||
* WM_NORMAL_HINTS property is set on a window, but it is public
|
* WM_NORMAL_HINTS property is set on a window, but it is public
|
||||||
* because the size hints are set to defaults when a window is
|
* because the size hints are set to defaults when a window is
|
||||||
* created. See
|
* created. See
|
||||||
* http://tronche.com/gui/x/icccm/sec-4.html#WM_NORMAL_HINTS
|
* http://tronche.com/gui/x/icccm/sec-4.html#WM_NORMAL_HINTS
|
||||||
* for the X details.
|
* for the X details.
|
||||||
*
|
|
||||||
* \param window The window to set the size hints on.
|
|
||||||
* \param hints Either some X size hints, or NULL for default.
|
|
||||||
*/
|
*/
|
||||||
void meta_set_normal_hints (MetaWindow *window,
|
void meta_set_normal_hints (MetaWindow *window,
|
||||||
XSizeHints *hints);
|
XSizeHints *hints);
|
||||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user