Compare commits
481 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5d33a1bbb8 | ||
![]() |
9da34955f7 | ||
![]() |
536bb240ef | ||
![]() |
ef1c6e9214 | ||
![]() |
90359a5346 | ||
![]() |
9e341dd4d8 | ||
![]() |
2168cd3eb7 | ||
![]() |
25910508ae | ||
![]() |
c4fa0d118c | ||
![]() |
ca3ed6a1eb | ||
![]() |
0201fcfc6c | ||
![]() |
07e4cacf14 | ||
![]() |
79eb53bd53 | ||
![]() |
b694312f1c | ||
![]() |
3cca3f3ee9 | ||
![]() |
b01408f358 | ||
![]() |
4fc6a7ce65 | ||
![]() |
e657ef87ab | ||
![]() |
3bc5cc1ce7 | ||
![]() |
49971fc1ef | ||
![]() |
569ff8a34c | ||
![]() |
2d73af1530 | ||
![]() |
470dc30174 | ||
![]() |
7dd25001ce | ||
![]() |
9b0ba2f274 | ||
![]() |
8938ea3fa1 | ||
![]() |
df93236627 | ||
![]() |
5c587726ae | ||
![]() |
87100b64d9 | ||
![]() |
def5a12ff0 | ||
![]() |
31f0853ca8 | ||
![]() |
fb41e2bc8d | ||
![]() |
aa077d95c0 | ||
![]() |
b004ef4e15 | ||
![]() |
7c58ecb657 | ||
![]() |
8144a962e7 | ||
![]() |
8c3bce3f98 | ||
![]() |
3b0478776d | ||
![]() |
c53538b1c2 | ||
![]() |
2ba196b310 | ||
![]() |
4beb9df364 | ||
![]() |
6fb90bc723 | ||
![]() |
dd86330ff8 | ||
![]() |
f9772ac685 | ||
![]() |
312454150b | ||
![]() |
3fac671fc8 | ||
![]() |
dc5dff7e9a | ||
![]() |
199e2b6988 | ||
![]() |
d3f1996655 | ||
![]() |
277236f730 | ||
![]() |
0d06471910 | ||
![]() |
4de104f9cf | ||
![]() |
189c8b9b11 | ||
![]() |
555d7dc90c | ||
![]() |
2ab4a35c53 | ||
![]() |
b62aba4401 | ||
![]() |
3800dac492 | ||
![]() |
bba4df7187 | ||
![]() |
c808195eef | ||
![]() |
cb595266fd | ||
![]() |
3ba437d508 | ||
![]() |
28ae1b40df | ||
![]() |
b2352cf9e2 | ||
![]() |
3d62fedfa2 | ||
![]() |
6c6d871abc | ||
![]() |
39b7e2ed79 | ||
![]() |
dc856f0fdb | ||
![]() |
39cb0ee987 | ||
![]() |
78634dd4b8 | ||
![]() |
7c8f91a3a9 | ||
![]() |
e199b946ee | ||
![]() |
6b8a3a1af5 | ||
![]() |
445e982894 | ||
![]() |
d80721697d | ||
![]() |
d818e18d81 | ||
![]() |
f89973dbfc | ||
![]() |
c35fbb3f5f | ||
![]() |
d9b4fdd845 | ||
![]() |
0484ecd355 | ||
![]() |
277af5e783 | ||
![]() |
3274df7df1 | ||
![]() |
7a68a53322 | ||
![]() |
c7c4efa1c1 | ||
![]() |
e38609f4a2 | ||
![]() |
9d320ba435 | ||
![]() |
18107f5f36 | ||
![]() |
88b9efd0b7 | ||
![]() |
b42e848986 | ||
![]() |
7489dbc34e | ||
![]() |
4c96afba71 | ||
![]() |
7ea55a1e54 | ||
![]() |
77a207c9cc | ||
![]() |
1bea8254ba | ||
![]() |
1f5130dc93 | ||
![]() |
1d92dcdadd | ||
![]() |
e7b08814ec | ||
![]() |
69e245b237 | ||
![]() |
9ad9fd4290 | ||
![]() |
c47e425527 | ||
![]() |
9051b70d40 | ||
![]() |
43b5985c20 | ||
![]() |
0ec2133e81 | ||
![]() |
9fe845581b | ||
![]() |
fc23f9b22f | ||
![]() |
cbd0312605 | ||
![]() |
57bedc42a4 | ||
![]() |
acc6c97997 | ||
![]() |
dcef402d68 | ||
![]() |
d4973e8d1b | ||
![]() |
1dd78e38ff | ||
![]() |
adc46fc970 | ||
![]() |
3917d818f5 | ||
![]() |
cc5def1021 | ||
![]() |
77a331a1e3 | ||
![]() |
c12dc9de3c | ||
![]() |
ab7f789cb0 | ||
![]() |
ae86fcd5b2 | ||
![]() |
74d4768b8e | ||
![]() |
fe74d5da13 | ||
![]() |
1fec6583ff | ||
![]() |
bf6da74e6a | ||
![]() |
e8fb842aad | ||
![]() |
76e4fd8a07 | ||
![]() |
3cca3381ba | ||
![]() |
7d8087f3e8 | ||
![]() |
419e063a24 | ||
![]() |
05323ef21a | ||
![]() |
6e4d6da191 | ||
![]() |
9c75b95146 | ||
![]() |
edfaf1a6bc | ||
![]() |
1538ffa04c | ||
![]() |
3d661f9bc7 | ||
![]() |
34662a6a3a | ||
![]() |
92dff14d55 | ||
![]() |
61e1bb57e7 | ||
![]() |
5e85bf7210 | ||
![]() |
85f9c499fb | ||
![]() |
42dd771506 | ||
![]() |
8afa1da3a7 | ||
![]() |
f0c5312b6e | ||
![]() |
af8e3c0d93 | ||
![]() |
69f1a9d3bd | ||
![]() |
b126f61eed | ||
![]() |
b1ba1cbad0 | ||
![]() |
a58ea99379 | ||
![]() |
cb38ccc57f | ||
![]() |
41ae99000b | ||
![]() |
0f05948c95 | ||
![]() |
5744f08056 | ||
![]() |
6681725dcd | ||
![]() |
a99a2ab14c | ||
![]() |
616bffdeef | ||
![]() |
a067105a14 | ||
![]() |
76291d31b7 | ||
![]() |
bcbdfbe177 | ||
![]() |
5eaf79f6fa | ||
![]() |
1cabbfef25 | ||
![]() |
454638fd0c | ||
![]() |
4a06163710 | ||
![]() |
83f82e5f28 | ||
![]() |
db87abfb19 | ||
![]() |
35b47b59ab | ||
![]() |
a8f382019a | ||
![]() |
a1324af018 | ||
![]() |
ed37bcc258 | ||
![]() |
cb84bc3e1d | ||
![]() |
76dff49a3e | ||
![]() |
5af52e9fe1 | ||
![]() |
6dfb56cc77 | ||
![]() |
ab1adf6c06 | ||
![]() |
0ca0bca0d0 | ||
![]() |
3ae4e25162 | ||
![]() |
7535f0f58a | ||
![]() |
ca3236f76c | ||
![]() |
7d2f0bf1fe | ||
![]() |
3f4e194c8f | ||
![]() |
22bc36eb3b | ||
![]() |
7592470dab | ||
![]() |
179987132c | ||
![]() |
1e64cf4a8b | ||
![]() |
7859b69a88 | ||
![]() |
3e5b9776c6 | ||
![]() |
cdb94d7e57 | ||
![]() |
3e394580da | ||
![]() |
23a5f5bb58 | ||
![]() |
78826fd35c | ||
![]() |
616ce23a9a | ||
![]() |
3c24269ceb | ||
![]() |
ac606c6223 | ||
![]() |
1a16108310 | ||
![]() |
3cb72d338c | ||
![]() |
51ade19ae9 | ||
![]() |
fb3b5c92f8 | ||
![]() |
ff87e70e8d | ||
![]() |
34cb1840cf | ||
![]() |
9f21db5366 | ||
![]() |
0dcc85e79a | ||
![]() |
acb5e483a9 | ||
![]() |
5750974d5d | ||
![]() |
b62dd8d130 | ||
![]() |
e9c8fd8527 | ||
![]() |
addc04f463 | ||
![]() |
411fd3db44 | ||
![]() |
451c990dd5 | ||
![]() |
3a6dd75f63 | ||
![]() |
975130ff70 | ||
![]() |
abde6fc359 | ||
![]() |
10f3ce3de0 | ||
![]() |
618d282893 | ||
![]() |
ba1e888cba | ||
![]() |
7e78d707ea | ||
![]() |
12d5978268 | ||
![]() |
d769484f35 | ||
![]() |
a524fb9c9c | ||
![]() |
239cf4a060 | ||
![]() |
984154e011 | ||
![]() |
14f120f131 | ||
![]() |
c118c50117 | ||
![]() |
89f01eb73a | ||
![]() |
ae85a33614 | ||
![]() |
fe47d4436d | ||
![]() |
fee1fb094a | ||
![]() |
83d21b97c4 | ||
![]() |
f908d78e4b | ||
![]() |
e2ea1cf722 | ||
![]() |
10f0cfd2dc | ||
![]() |
7e2d5185a0 | ||
![]() |
5bf3e39ef6 | ||
![]() |
a03e78210f | ||
![]() |
ecf75915b9 | ||
![]() |
2214fd75d9 | ||
![]() |
1dea155c8c | ||
![]() |
694a4352bc | ||
![]() |
4cbe4e7558 | ||
![]() |
4f99d7e17f | ||
![]() |
3d4717c8e1 | ||
![]() |
bf4172dc7c | ||
![]() |
4d097fbc18 | ||
![]() |
13cdd8ad3d | ||
![]() |
c7c9f0ee52 | ||
![]() |
ea50cc7239 | ||
![]() |
59d99fb9d1 | ||
![]() |
4b683fdbf2 | ||
![]() |
4730cb57bd | ||
![]() |
c2b4a65e75 | ||
![]() |
793c1d7a43 | ||
![]() |
123684d80b | ||
![]() |
8674051c58 | ||
![]() |
cb109b9637 | ||
![]() |
6445d16fd5 | ||
![]() |
21d5a43c29 | ||
![]() |
f7a202eb81 | ||
![]() |
eb102ab37f | ||
![]() |
aaafd14124 | ||
![]() |
3bf211c89f | ||
![]() |
127a89886b | ||
![]() |
82a6c99485 | ||
![]() |
d0564def9c | ||
![]() |
1f7446cd88 | ||
![]() |
cf3deef6ea | ||
![]() |
28aeacb247 | ||
![]() |
d75c170fef | ||
![]() |
ea1568c720 | ||
![]() |
9b6aeeef12 | ||
![]() |
25923105e4 | ||
![]() |
09a5c23585 | ||
![]() |
8f59776087 | ||
![]() |
905b4e8e0d | ||
![]() |
b11ac45352 | ||
![]() |
fd1e1c76e8 | ||
![]() |
c5d4cbd742 | ||
![]() |
fc7a246074 | ||
![]() |
bdb60c4e72 | ||
![]() |
d07fccc8b1 | ||
![]() |
543f85a1db | ||
![]() |
ab176cf831 | ||
![]() |
ef47c243c5 | ||
![]() |
01cd31f7f4 | ||
![]() |
ad2c7c6ce3 | ||
![]() |
4d6ee9ea49 | ||
![]() |
a401b82089 | ||
![]() |
54751db00a | ||
![]() |
16de3b603b | ||
![]() |
5f30265879 | ||
![]() |
0b5f11ae5a | ||
![]() |
6ef997d3ad | ||
![]() |
369ab5bc2b | ||
![]() |
188bc50a35 | ||
![]() |
042f5e3e6b | ||
![]() |
82a3cad018 | ||
![]() |
c910286c02 | ||
![]() |
07ef2db60c | ||
![]() |
5f3b961989 | ||
![]() |
3393f4707c | ||
![]() |
77b8ed579a | ||
![]() |
d02815b364 | ||
![]() |
9cfa08d4f4 | ||
![]() |
77440097e1 | ||
![]() |
985195858d | ||
![]() |
d161ddcff8 | ||
![]() |
e27bebc49b | ||
![]() |
9ac0eab5c3 | ||
![]() |
4d220adc32 | ||
![]() |
7750026603 | ||
![]() |
92ac98ef47 | ||
![]() |
1161cfdeba | ||
![]() |
8d0a3358c7 | ||
![]() |
20c9efaf82 | ||
![]() |
192943640e | ||
![]() |
46bdc87e94 | ||
![]() |
35674ae862 | ||
![]() |
04433e5b9d | ||
![]() |
f8cd8ae75f | ||
![]() |
94d4d039c2 | ||
![]() |
3c6b291641 | ||
![]() |
8c2a5dbc19 | ||
![]() |
92971d6377 | ||
![]() |
add8531eb4 | ||
![]() |
eed6f29b30 | ||
![]() |
832968ddd6 | ||
![]() |
7a8e3c94fd | ||
![]() |
4d0d192761 | ||
![]() |
c3ed3a3090 | ||
![]() |
b7c040be26 | ||
![]() |
e92403441a | ||
![]() |
9232b75ef4 | ||
![]() |
1b7d0fbc87 | ||
![]() |
0a1a7e523c | ||
![]() |
d3e27ed02a | ||
![]() |
3e01e149eb | ||
![]() |
04a4f7c363 | ||
![]() |
6a08faf99b | ||
![]() |
a3e7c9c222 | ||
![]() |
1a430825c3 | ||
![]() |
82664c5d76 | ||
![]() |
f8f6016970 | ||
![]() |
b1847959b1 | ||
![]() |
e4cf87c985 | ||
![]() |
928364e915 | ||
![]() |
78ce6d6a60 | ||
![]() |
a6b60a2024 | ||
![]() |
f5fdb07165 | ||
![]() |
f127b2bc98 | ||
![]() |
5352caac31 | ||
![]() |
d24fa066a4 | ||
![]() |
d010bbb5ed | ||
![]() |
636da5ebff | ||
![]() |
a42e4dac42 | ||
![]() |
f966ab041b | ||
![]() |
9e17747f3c | ||
![]() |
5a85bf18fe | ||
![]() |
833fc11c47 | ||
![]() |
8215a35993 | ||
![]() |
f3ade45b96 | ||
![]() |
71b27c6228 | ||
![]() |
053759fad6 | ||
![]() |
f6738a930c | ||
![]() |
0f48ff448c | ||
![]() |
ca539199b2 | ||
![]() |
c348794431 | ||
![]() |
0610f92f0f | ||
![]() |
b3e0208afa | ||
![]() |
8ceb613668 | ||
![]() |
500bbefc6a | ||
![]() |
d0e8371494 | ||
![]() |
ce3299e815 | ||
![]() |
0e8c8eb6b5 | ||
![]() |
cb298b9279 | ||
![]() |
74510389bc | ||
![]() |
0654163d8a | ||
![]() |
7aebefad3c | ||
![]() |
4b6a87acb5 | ||
![]() |
f39bcff434 | ||
![]() |
abde4a3769 | ||
![]() |
d49bb492fe | ||
![]() |
14f72c89e3 | ||
![]() |
b5c199c6e6 | ||
![]() |
63d978d228 | ||
![]() |
f839edda05 | ||
![]() |
d6ace0d2d4 | ||
![]() |
bcadc0ce3a | ||
![]() |
fdd47d79b4 | ||
![]() |
891e59e597 | ||
![]() |
297e0e466f | ||
![]() |
be036ca300 | ||
![]() |
5a49bc8f91 | ||
![]() |
2360ba0aeb | ||
![]() |
2bcbabf6ec | ||
![]() |
e7675e8069 | ||
![]() |
405e21a82a | ||
![]() |
9abec54da6 | ||
![]() |
095359b58d | ||
![]() |
99c3ce1ef9 | ||
![]() |
0375976ef0 | ||
![]() |
9a91c8066a | ||
![]() |
9ce85d7657 | ||
![]() |
8808c8b500 | ||
![]() |
5c29242d4a | ||
![]() |
c0f4b9d2d4 | ||
![]() |
e44e8c93aa | ||
![]() |
c8d135b353 | ||
![]() |
8e5425a86f | ||
![]() |
0ea8552531 | ||
![]() |
dcec11274a | ||
![]() |
6f318f1a75 | ||
![]() |
5568f75cb0 | ||
![]() |
e272295976 | ||
![]() |
a556a7334a | ||
![]() |
af14d9d2a1 | ||
![]() |
32d4bd6b63 | ||
![]() |
4c10722262 | ||
![]() |
cc790655f2 | ||
![]() |
1bce2c55fe | ||
![]() |
5f9a097d2c | ||
![]() |
24976318b5 | ||
![]() |
59d7d891db | ||
![]() |
8638300708 | ||
![]() |
a42d6647b5 | ||
![]() |
0a815fb8f8 | ||
![]() |
4dd216f5a8 | ||
![]() |
4d868c1ddc | ||
![]() |
97981e4322 | ||
![]() |
35dae65862 | ||
![]() |
fac7010411 | ||
![]() |
d552ca35f6 | ||
![]() |
9fdd3d165d | ||
![]() |
ef792fc1f7 | ||
![]() |
50bcc976bc | ||
![]() |
def12b85b8 | ||
![]() |
5a652acf88 | ||
![]() |
efe25a80ed | ||
![]() |
f9d11c0be6 | ||
![]() |
fea6191473 | ||
![]() |
0eab7bd14c | ||
![]() |
9ec589b3b8 | ||
![]() |
d0b1dab993 | ||
![]() |
4689944194 | ||
![]() |
1f6dbf75fa | ||
![]() |
51b8c402d8 | ||
![]() |
f0322ee76c | ||
![]() |
5913b8c5ab | ||
![]() |
52df880f32 | ||
![]() |
f6270596de | ||
![]() |
a4d1c6fd61 | ||
![]() |
0f8add8b37 | ||
![]() |
8c5b6c875a | ||
![]() |
ae52d731be | ||
![]() |
d884f9ce8a | ||
![]() |
ee54debd6a | ||
![]() |
24cfed8cf0 | ||
![]() |
008a811e10 | ||
![]() |
de65967b62 | ||
![]() |
35532d14cb | ||
![]() |
9516694385 | ||
![]() |
9eb56f151c | ||
![]() |
e3ff2316fe | ||
![]() |
ab0ba52f89 | ||
![]() |
339948fcf2 | ||
![]() |
ebd0c7e9a6 | ||
![]() |
d530c3e405 | ||
![]() |
be86740b3d | ||
![]() |
d4771cd9cf | ||
![]() |
a59f14adbc | ||
![]() |
703f58cdf7 | ||
![]() |
5e9f20e94c | ||
![]() |
a710235e86 | ||
![]() |
53cba6ed37 | ||
![]() |
7e821f37fd | ||
![]() |
830baad257 | ||
![]() |
6a9242b192 | ||
![]() |
013c8b82db | ||
![]() |
37fb0af742 | ||
![]() |
12193322a8 | ||
![]() |
d9721257d2 | ||
![]() |
c08a660368 | ||
![]() |
77b148afdc | ||
![]() |
b4635f2143 | ||
![]() |
b3f465c727 | ||
![]() |
616d778f6b | ||
![]() |
6fa00967a5 | ||
![]() |
35925d1cf1 |
@@ -29,3 +29,7 @@ COPYING
|
||||
intltool-*
|
||||
metacity.spec
|
||||
autom4te.cache
|
||||
compile
|
||||
depcomp
|
||||
omf.make
|
||||
xmldocs.make
|
||||
|
61
HACKING
61
HACKING
@@ -11,6 +11,7 @@ is nonetheless useful.
|
||||
|
||||
Overview
|
||||
Administrative issues
|
||||
Minimal Building/Testing Environment
|
||||
Relevant standards and X properties
|
||||
Debugging and testing
|
||||
Debugging logs
|
||||
@@ -34,6 +35,32 @@ Administrative issues
|
||||
instructions is that the minor version number of a Metacity release
|
||||
should always be a number from the Fibonacci sequence.
|
||||
|
||||
Minimal Building/Testing Environment
|
||||
You do not need to _install_ a development version of Metacity to
|
||||
build, run and test it; you can run it from some temporary
|
||||
directory. Also, you do not need to build all of Gnome in order to
|
||||
build a development version of Metacity -- odds are, you may be able
|
||||
to build metacity from CVS without building any other modules.
|
||||
|
||||
As long as you have gtk+ >= 2.10 with your distro (gtk+ >= 2.6 if
|
||||
you manually revert the change from bug 348633), you should be able
|
||||
to install your distro's development packages (e.g. gtk2-devel,
|
||||
GConf2-devel, startup-notification-devel on Fedora; also, remember
|
||||
to install the gnome-common package which is needed for building cvs
|
||||
versions of Gnome modules like Metacity) as well as the standard
|
||||
development tools (gcc, autoconf, automake, pkg-config, intltool,
|
||||
and libtool) and be ready to build and test Metacity. Steps to do
|
||||
so:
|
||||
|
||||
$ cvs -q -z3 -d :pserver:anonymous@anoncvs.gnome.org:/cvs/gnome \
|
||||
checkout metacity
|
||||
$ cd metacity
|
||||
$ ./autogen.sh --prefix /usr
|
||||
$ make
|
||||
$ ./src/metacity --replace
|
||||
|
||||
Again, note that you do not need to run 'make install'.
|
||||
|
||||
Relevant standards and X properties
|
||||
There are two documents that describe some basics about how window
|
||||
managers should behave: the ICCCM (Inter-Client Communication Conventions
|
||||
@@ -184,17 +211,43 @@ Debugging information
|
||||
metacity-message restart
|
||||
metacity-message enable-keybindings
|
||||
metacity-message disable-keybindings
|
||||
The first of these is useful for testing themes, the second is just
|
||||
another way (besides the --restart flag to metacity itself) of
|
||||
restarting metacity, and the third is useful for testing Metacity when
|
||||
running it under an Xnest (typically, the Metacity under the Xnest
|
||||
wouldn't get keybinding notifications--making keyboard navigation not
|
||||
work--but if you disable the keybindings for the global Metacity then
|
||||
the Metacity under the Xnest can then get those keybinding notifications).
|
||||
|
||||
metacity-window-demo
|
||||
metacity-window-demo is good for trying behavior of various kinds
|
||||
of window without launching a full desktop.
|
||||
|
||||
Technical gotchas to keep in mind
|
||||
Files that include gdk.h or gtk.h are not supposed to include display.h
|
||||
or window.h or other core files.
|
||||
Files that include gdk.h or gtk.h are not supposed to include
|
||||
display.h or window.h or other core files. Files in the core
|
||||
(display.[hc], window.[hc]) are not supposed to include gdk.h or
|
||||
gtk.h. Reasons:
|
||||
|
||||
Files in the core (display.[hc], window.[hc]) are not supposed to include
|
||||
gdk.h or gtk.h.
|
||||
"Basically you don't want GDK most of the time. It adds
|
||||
abstractions that cause problems, because they aren't designed to
|
||||
be used in a WM where we do weird stuff (display grabs, and just
|
||||
being the WM). At best GDK adds inefficiency, at worst it breaks
|
||||
things in weird ways where you have to be a GDK guru to figure
|
||||
them out. Owen also told me that they didn't want to start adding
|
||||
a lot of hacks to GDK to let a WM use it; we both agreed back in
|
||||
the mists of time that metacity would only use it for the "UI"
|
||||
bits as it does.
|
||||
|
||||
Having the split in the source code contains and makes very clear
|
||||
the interface between the WM and GDK/GTK. This keeps people from
|
||||
introducing extra GDK/GTK usage when it isn't needed or
|
||||
appropriate. Also, it speeds up the compilation a bit, though this
|
||||
was perhaps more relevant 5 years ago than it is now.
|
||||
|
||||
There was also a very old worry that the GDK stuff might have to
|
||||
be in a separate process to work right; that turned out to be
|
||||
untrue. Though who knows what issues the CM will introduce."
|
||||
|
||||
Remember that strings stored in X properties are not in UTF-8, and they
|
||||
have to end up in UTF-8 before we try putting them through Pango.
|
||||
|
14
MAINTAINERS
Normal file
14
MAINTAINERS
Normal file
@@ -0,0 +1,14 @@
|
||||
Currently active maintainers
|
||||
----------------------------
|
||||
|
||||
Havoc Pennington
|
||||
E-mail: hp@redhat.com
|
||||
|
||||
Elijah Newren
|
||||
E-mail: newren@gmail.com
|
||||
|
||||
Søren Sandmann
|
||||
E-mail: sandmann@redhat.com
|
||||
|
||||
Thomas Thurman
|
||||
E-mail: thomas@thurman.org.uk
|
@@ -4,4 +4,4 @@ SUBDIRS=src po doc
|
||||
EXTRA_DIST=HACKING rationales.txt \
|
||||
intltool-extract.in intltool-merge.in intltool-update.in
|
||||
|
||||
DISTCLEANFILES = intltool-extract intltool-merge intltool-update
|
||||
DISTCLEANFILES = intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache
|
||||
|
597
NEWS
597
NEWS
@@ -1,3 +1,560 @@
|
||||
2.17.0
|
||||
======
|
||||
|
||||
Thanks to Elijah Newren, Jens Granseuer, Bruno Boaventura, Carlo Wood,
|
||||
and Thomas Thurman for changes in this release.
|
||||
|
||||
- version 2 of theme format: stick, shade and above buttons on titlebar,
|
||||
variable rounding on corners, variable transparency on window
|
||||
backgrounds, stock icons in themes, can remove all titlebar buttons
|
||||
from certain classes of window, and more (Thomas) [#102547 and
|
||||
dependencies]
|
||||
- improve "Force Quit" dialog (Bruno) [#121936]
|
||||
- ignore edge resistance when resizing with keyboard (Elijah) [#346782]
|
||||
- maintain window size and placement across restarts (Carlo) [#358042]
|
||||
- prevent crash when closing certain remote apps (Elijah) [#358514]
|
||||
- longstanding mouse-focus bug fixed which affected firefox's
|
||||
autocompletion (Elijah) [#357695]
|
||||
- ignore maximum size constraints when maximising (Elijah) [#327543]
|
||||
- warn translators to keep translations in sync with libwnck (Bruno)
|
||||
[#355620]
|
||||
- fixes for compilation warnings, etc (Elijah, Jens) [#348067, #356631]
|
||||
|
||||
Translators
|
||||
Ivar Smolin (et), Gabor Kelemen (hu), Luca Ferretti (it),
|
||||
Runa Bhattacharjee (bn_IN)
|
||||
|
||||
2.16.2
|
||||
======
|
||||
|
||||
Thanks to Eljah Newren, Maik Beckmann, Christian Hamar, Thomas Andersen,
|
||||
and Bruno Boaventura de Oliveira for changes in this release.
|
||||
|
||||
- partial audit to fix timestamp usage (Elijah) [part of #355180]
|
||||
- remove compilation warnings (Maik) [#355876]; (Bruno) [#355490,
|
||||
#355489]
|
||||
- automatic detection of stable/unstable in configure script
|
||||
(Christian/Elijah) [#356122]
|
||||
- make windows be stacked correctly before showing them (Thomas)
|
||||
[#332385]
|
||||
- use guint32 for timestamps (Elijah) [#348305]
|
||||
|
||||
Translators
|
||||
Wouter Bolsterlee (nl), Matic Žgur (sl), Francisco Javier F. Serrador (es),
|
||||
Vladimir Petkov (bg), Jordi Mallach (ca), Ilkka Tuohela (fi),
|
||||
Rajesh Ranjan (hi), Woodman Tuen (zh_HK, zh_TW), Ani Peter (ml),
|
||||
Felix (ta), Ankit Patel (gu), Mohammad DAMT (id)
|
||||
|
||||
2.16.1
|
||||
======
|
||||
|
||||
Thanks to Elijah Newren, Colin Watson, and Bruno Boaventura de Oliveira
|
||||
Lacerda for changes in this release.
|
||||
|
||||
- fix stuck grab, letting focus be transferred between windows (Elijah)
|
||||
[#354422 partial]
|
||||
- windows returning from fullscreen are constrained to be onscreen
|
||||
(Elijah) [#353699]
|
||||
- Clear the transient_for flag of a window after emitting a warning
|
||||
(Colin)
|
||||
- Replace copy_of_gdk_x11_window_set_user_time() with the real thing
|
||||
(Bruno) [#352293]
|
||||
|
||||
Translators
|
||||
David Lodge (en_GB), Ivar Smolin (et), Matic Žgur (sl),
|
||||
Vasiliy Faronov (ru)
|
||||
|
||||
2.16.0
|
||||
==
|
||||
|
||||
Thanks to Jens Granseuer for changes in this release.
|
||||
|
||||
- Fix the build with c89/gcc 2.95.
|
||||
|
||||
Translators
|
||||
Rahul Bhalerao (mr), Runa Bhattacharjee (bn_IN), Woodman Tuen
|
||||
(zh_HK, zh_TW), Kostas Papadimas (el), Ani Peter (ml),
|
||||
Jonathan Ernst (fr), Горан Ракић (sr, Gabor Kelemen (hu),
|
||||
Maxim Dziumanenko (uk), Duarte Loreto (pt), Jordi Mallach (ca),
|
||||
Gintautas Miliauskas (lt)
|
||||
|
||||
2.15.34
|
||||
==
|
||||
|
||||
Thanks to Stéphane Rosi, Vytautus Liuolia, Will Walker, Baptiste
|
||||
Mille-Mathias, Elijah Newren, Ed Catmur, and Thomas Andersen for fixes
|
||||
in this release.
|
||||
|
||||
- allow moving maximized windows between xineramas again (Stéphane)
|
||||
[#338660]
|
||||
- fix an uninitialized-usage bug with net_wm_user_time that breaks
|
||||
focus with new windows (Vytautus)
|
||||
- re-fix accessibility events for the alt-tab popup (Will) [#350624]
|
||||
- update the close pixmap to fit better with the other pixmaps of the
|
||||
menu (Baptiste) [#345498]
|
||||
- fix several fullscreen handling bugs I introduced, causing
|
||||
fullscreen windows to not actually be shown fullscreen (Elijah)
|
||||
[#343115]
|
||||
- fix keybindings with hex-values, coming from special extended
|
||||
keyboard keys (Ed) [#140448]
|
||||
- fix metacity-dialog handling of arguments (Thomas) [#340690]
|
||||
|
||||
Translators
|
||||
Vladimir Petkov (bg), Jordi Mallach (ca), Gabor Kelemen (hu),
|
||||
Mohammad DAMT (id), Wouter Bolsterlee (nl), Daniel Nylander (sv),
|
||||
Funda Wang (zh_CN)
|
||||
|
||||
2.15.21
|
||||
==
|
||||
|
||||
Thanks to Vincent Untz, Jens Granseuer, Björn Lindqvist, Dmitry
|
||||
Timoshkov, Thomas Thurman, Vytautas Liuolia, Thomas Andersen, Chris
|
||||
Ball, and Elijah Newren for fixes in this release.
|
||||
|
||||
- kill usage of libegg (Vincent) [#348633]
|
||||
- fix another C89 vs. C99 issue (Jens) [#347621]
|
||||
- make it so maximized windows do not have rounded corners (Björn)
|
||||
[#336850]
|
||||
- fix the heuristic for determining if windows can be made
|
||||
fullscreen, needed for WINE and possible also some legacy
|
||||
applications (Dmitry) [#346927]
|
||||
- make sure window features get recalculated when the screen is
|
||||
resized via XRandR (Dmitry) [#346927]
|
||||
- fitts' law fixes for titlebar buttons on maximized windows (Thomas
|
||||
Thurman) [#97703]
|
||||
- react to _NET_STARTUP_ID changes, as proposed for the new
|
||||
startup-notification/EWMH spec (Vytautas) [#347515]
|
||||
- return the window to maximized state if the window was "shaken
|
||||
loose" from maximized state during a resize but the resize is later
|
||||
aborted (Thomas Andersen) [#346719]
|
||||
- fix button lighting with dragged clicks (Björn) [#321474]
|
||||
- don't minimize in response to double clicks on the titlebar when
|
||||
minimiziation should not be allowed (Chris) [#347377]
|
||||
- fix some titlebar-not-on-screen constraint issues (Elijah)
|
||||
[#333328, #345522]
|
||||
|
||||
Translators
|
||||
Mahay Alam Khan (bn_IN), Jakub Friedl (cs), Iñaki Larrañaga
|
||||
Murgoitio (eu), Yuval Tanny (he), Rajesh Ranjan (hi), Jovan
|
||||
Naumovski (mk) Kjartan Maraas (nb), Leonid Kanter (ru)
|
||||
|
||||
2.15.13
|
||||
==
|
||||
|
||||
Thanks to Björn Lindqvist and Thomas Thurman for improvements in this
|
||||
release.
|
||||
|
||||
- grab alt+shift+button1 when trying to snap-move windows (Björn)
|
||||
- avoid a case where memory is written after it's freed (Thomas)
|
||||
|
||||
Translators
|
||||
Hendrik Richter (de), Kostas Papadimas (el), Jonathan Ernst (fr),
|
||||
Satoru SATOH (ja)
|
||||
|
||||
2.15.8
|
||||
==
|
||||
|
||||
Known as the "Elijah sucks for not reviewing a couple dozen patches"
|
||||
release. And for not getting on IRC soon enough to catch Marnanel and
|
||||
show him how to do the release. So, just translations this time.
|
||||
|
||||
Translations
|
||||
|
||||
Mahay Alam Khan (bn_IN), Rhys Jones (cy), Francisco Javier
|
||||
F. Serrador (es), Ilkka Tuohela (fi), Rajesh Ranjan (hi), Changwoo
|
||||
Ryu (ko), Fano Rajaonarisoa (mg), Sanlig Badral (mn), Слободан Д.
|
||||
Средојевић (sr), Funda Wang (zh_CN)
|
||||
|
||||
2.15.5
|
||||
==
|
||||
|
||||
Thanks to Björn Lindqvist, Søren Sandmann, Adam Jackson, Elijah
|
||||
Newren, and Aidan Delaney for improvements in this release.
|
||||
|
||||
- code cleanup in resizepopup.c (Björn) [#341648]
|
||||
- fix a logic bug so that the whole titlebar becomes sensitive to
|
||||
mouse clicks (Björn) [#336320]
|
||||
- make mouse cursor when moving windows become a hand (Björn) [#337376]
|
||||
- lots and lots of compositor improvements -- beginning of a new
|
||||
layer to abstract transition effects, shrinking and minimizing and
|
||||
exploding effects, fading in and out, unminimize animation that
|
||||
reverses minimize one, translucent menus, bounce on window focus,
|
||||
and all kinds of stuff I don't understand and can't summarize well
|
||||
(Søren, Adam)
|
||||
- Fix a crash on exit/logout from assuming a compositor would always
|
||||
exist (Elijah) [#342166]
|
||||
- code cleanup in tabpopup.c (Aidan Delaney) [#166890]
|
||||
|
||||
Translations
|
||||
Pema Geyleg (dz), Iñaki Larrañaga Murgoitio (eu), Theppitak
|
||||
Karoonboonyanan (th), Clytie Siddall (vi)
|
||||
|
||||
2.15.3
|
||||
==
|
||||
|
||||
Thanks to Søren Sandmann, Elijah Newren, Paolo Borelli, Björn
|
||||
Lindqvist, jylefort at FreeBSD org,
|
||||
|
||||
- various code cleanups (Søren)
|
||||
- prevent long titles from "sticking" in the tasklist (Elijah) [#330671]
|
||||
- handle sync counter notifications in the compositor (Søren)
|
||||
- notes/documentation updates (Elijah)
|
||||
- plug a small leak (Paolo)
|
||||
- remove a lot of dead code obsoleted by the new edge-resistance
|
||||
stuff (Björn) [#341561]
|
||||
- prevent a crash when changing resolution (jylefort) [#340847]
|
||||
- revert an accessibility module loading workaround from Gnome 2.6
|
||||
that has long since been fixed for us in gtk+ (Elijah) [#123372]
|
||||
|
||||
Translations
|
||||
Francisco Javier F. Serrador (es), Ignacio Casal Quinteiro (gl),
|
||||
Raivis Dejus (lv), Kjartan Maraas (nb), Funda Wang (zh_CN), Woodman
|
||||
Tuen (zh_HK), Woodman Tuen (zh_TW)
|
||||
|
||||
2.15.2
|
||||
==
|
||||
|
||||
Here's hoping that "third time's a charm." ;-) This release just
|
||||
fixes the translations-not-included issue. See
|
||||
http://mail.gnome.org/archives/desktop-devel-list/2006-April/msg00483.html
|
||||
for more details.
|
||||
|
||||
- Use gnome-autogen.sh like most other modules (Rodney)
|
||||
|
||||
2.15.1
|
||||
==
|
||||
|
||||
This release just fixes the control-center build (which depends upon
|
||||
libmetacity-private). Thanks to Vincent for catching the problem.
|
||||
|
||||
- Include boxes.h in the includes dir (Elijah) [#339708]
|
||||
|
||||
2.15.0
|
||||
==
|
||||
|
||||
Thanks to Thomas Thurman, Elijah Newren, Havoc Pennington, Björn
|
||||
Lindqvist, Gora Mohanty, Alejandro Andres, Andy Morum, Dan Sanders,
|
||||
Thomas Andersen, Brian Pepple, and Søren Sandmann for improvements in
|
||||
this release. (Note that "Thomas" below refers to Thomas Thurman if
|
||||
last name isn't specified)
|
||||
|
||||
- An endless array of compositor updates, not all of which are well
|
||||
explained in the ChangeLog. ;-) Includes an ability to enable and
|
||||
disable the compositor at runtime, fixed up wobbling effect and new
|
||||
explosion effect, special magnification handling, different opacity
|
||||
for different window types like menus, a way of scaling windows,
|
||||
handling of foreign displays, improved handling of window
|
||||
moving/resizing, various code restructuring, special runtime checks
|
||||
for correct extensions and other compositors, lots of bug fixes,
|
||||
and possibly other stuff I'm missing or not understanding (Søren)
|
||||
- Removed "move to another workspace" menu when there are exactly two
|
||||
workspaces (Thomas) [#151183]
|
||||
- fix type for compositing_manager schema entry (Elijah) [#335901]
|
||||
- Port more properties to our async system for code cleanliness and
|
||||
speed improvements (Havoc, Thomas)
|
||||
- Lots of code cleanup, even more code cleanup, wow our code was
|
||||
messy (Björn) [#335177, #337507, #336890, #338359]
|
||||
- Abstract out the functions for setting/unsetting demands attention
|
||||
hint and avoid doing it when the window isn't obscured (Thomas)
|
||||
[#305882]
|
||||
- Change strings to make them more readable, and more
|
||||
translatable (Gora) [#335720]
|
||||
- Reduce compiling warnings -- add a number of casts and change
|
||||
signedness on a number of variables (Björn) [#336032]
|
||||
- Fixed broken links in README (Alejandro) [#333303]
|
||||
- Add a tabbing function, bound to alt-f6 by default, to cycle
|
||||
through the windows of the current application (Thomas) [#94682]
|
||||
- Fix the build with --disable-xsync (Andy) [#336605]
|
||||
- Raise windows on maximize/unmaximize (Dan) [#335076]
|
||||
- Don't have confirmation windows make applications appear to be
|
||||
locked when closing via the window list (Dan) [#334899]
|
||||
- Allow any keybinding pref to be specified either with <foo>, a
|
||||
string, or <foo>_list, a list of strings, or both (Thomas)
|
||||
[#164831]
|
||||
- warn and ignore if transient_for is set to a non-top-level window
|
||||
(Thomas Andersen) [#335524]
|
||||
- Use po/LINGUAS for listing supported languages (Brian) [#337951]
|
||||
|
||||
Translations
|
||||
Vladimir Petkov (bg), Jordi Mallach (ca), Miloslav Trmac (cs), Rhys
|
||||
Jones (cy), Lasse Bang Mikkelsen (da), Frank Arnold (de), Kostas
|
||||
Papadimas (el), Francisco Javier F. Serrador (es), Ivar Smolin (et), Iñaki
|
||||
Larrañaga (eu), Farzaneh Sarafraz (fa), Ilkka Tuohela (fi), Ignacio Casal
|
||||
Quinteiro (gl), Ankit Patel (gu), Rajesh Ranjan (hi), Gabor Kelemen (hu),
|
||||
Satoru SATOH (ja), Alexander Didebulidze (ka), Žygimantas Beručka (lt),
|
||||
Kjartan Maraas (nb), Michiel Sikkes (nl), Åsmund Skjæveland (nn), Gora
|
||||
Mohanty (or), Raphael Higino (pt_BR), Duarte Loreto (pt), Mugurel Tudor (ro),
|
||||
Leonid Kanter (ru), Steve Murphy (rw), Laurent Dhima (sq), Слободан Д.
|
||||
Средојевић (sr), Daniel Nylander (sv), Theppitak Karoonboonyanan (th), Maxim
|
||||
Dziumanenko (uk), Clytie Siddall (vi), Funda Wang (zh_CN)
|
||||
|
||||
2.14.3
|
||||
==
|
||||
|
||||
This release just reverts the widely hated new focus behavior of Metacity
|
||||
2.14.x to the behavior found in 2.12.x. Patch came from Ron Yorston.
|
||||
See http://blogs.gnome.org/view/newren/2006/04/13/0 and
|
||||
http://mail.gnome.org/archives/release-team/2006-April/msg00025.html for
|
||||
more details.
|
||||
|
||||
- Add a focus_new_windows gconf key, change the default to 'smart' (2.12
|
||||
behavior) and add a 'strict' option to get 2.14 behavior. (Ron)
|
||||
[#326159]
|
||||
|
||||
Translations
|
||||
Vladimir Petkov (bg), Miloslav Trmac (cs), Frank Arnold (de), Francisco
|
||||
Javier F. Serrador (es), Ilkka Tuohela (fi), Tino Meinen (nl), Åsmund
|
||||
Skjæveland (nn), Raphael Higino (pt_BR), Daniel Nylander (sv)
|
||||
|
||||
2.14.2
|
||||
==
|
||||
|
||||
Thanks to Thomas Thurman, Paolo Borelli, Björn Lindqvist, and
|
||||
Elijah Newren for fixes in this release.
|
||||
|
||||
- Fix constraints bug causing negative width windows and crashes
|
||||
(Elijah) [#336651]
|
||||
- Fix window grouping with parent/child windows (Björn) [#336184]
|
||||
- use g_str_has_prefix instead of a local copy of the function
|
||||
(Paolo) [#334643]
|
||||
- Make sure pager can refresh when window is minimized on a different
|
||||
workspace (Thomas) [#315142]
|
||||
- Add debugging information for edge resistance (Elijah)
|
||||
|
||||
Translations
|
||||
|
||||
Vladimir Petkov (bg), tangi.bzh (br), Jordi Mallach (ca), Miloslav
|
||||
Trmac (cs), Rhys Jones (cy), Lasse Bang Mikkelsen (da), Frank
|
||||
Arnold (de), Mindu Dorji (dz), Kostas Papadimas (el), Francisco
|
||||
Javier F. Serrador (es), Ivar Smolin (et), Iñaki Larrañaga
|
||||
Murgoitio (eu), Elnaz Sarbar (fa), Ilkka Tuohela (fi),
|
||||
Ignacio Casal Quinteiro (gl), Ankit Patel (gu), Rajesh Ranjan (hi)
|
||||
Gabor Kelemen (hu), Luca Ferretti (it), Satoru SATOH (ja), Vladimer
|
||||
Sichinava (ka), Žygimantas Beručka (lt), Kjartan Maraas (nb),
|
||||
Tino Meinen (nl), Kjartan Maraas (no), Gora Mohanty (or), Gnome PL
|
||||
Team (pl), Evandro Fernandes Giovanini (pt_BR), Duarte Loreto (pt),
|
||||
Mugurel Tudor (ro), Leonid Kanter (ru), Laurent Dhima (sq),
|
||||
Слободан Д. Средојевић (sr), Daniel Nylander (sv), Theppitak
|
||||
Karoonboonyanan (th), Maxim Dziumanenko (uk), Clytie Siddall (vi),
|
||||
Funda Wang (zh_CN)
|
||||
|
||||
2.14.1
|
||||
==
|
||||
|
||||
The only change since 2.14.0 is to remove the "This is the UNSTABLE
|
||||
branch" warning from configure for those compiling Metacity from
|
||||
source.
|
||||
|
||||
2.14.0
|
||||
==
|
||||
|
||||
Thanks to Ryan Lortie and Thomas Thurman for fixes in this release.
|
||||
|
||||
- Mark the app-running-remotely-window-title string for translation
|
||||
(Thomas) [#334332]
|
||||
- Only unmaximise window before freeing if the window is actually
|
||||
maximised (Ryan) [#333563]
|
||||
|
||||
Translations
|
||||
Jordi Mallach (ca), Frank Arnold (de), Luca Ferretti (it), Evandro
|
||||
Fernandes Giovanini (pt_BR), Theppitak Karoonboonyanan (th)
|
||||
|
||||
2.13.144
|
||||
==
|
||||
|
||||
Thanks to Jens Granseuer, Kristian, Søren Sandmann, Sylvain
|
||||
Bertrand, and Thomas Thurman for improvements in this release.
|
||||
|
||||
- Fix build with gcc 2.95 (Jens) [#331166]
|
||||
- Compositor improvements [remember, still off by default]: add
|
||||
unused wobbly (un)minimize animation (Kristian), add support for
|
||||
turning updates on and off (Søren), use sync counter to make
|
||||
composited resizing tear free (Søren), add ability to unmanage
|
||||
the screen (Søren),
|
||||
- Fix build issue with library search order (Sylvain) [#330695]
|
||||
- Work around buggy application grouping with transient windows
|
||||
(Thomas) [#328211]
|
||||
- Prevent setting cycle_windows to keybindings that won't work.
|
||||
(Thomas) [#329676]
|
||||
|
||||
2.13.89
|
||||
==
|
||||
|
||||
Thanks to Søren Sandmann, Thomas Thurman, Thom May, Akira Tagoh,
|
||||
Luke Morton, and Philip O'Brien for improvements in this release.
|
||||
|
||||
- Compositor improvements [remember that the compositor is still
|
||||
disabled by default]: New fancy minimize animation that fades in
|
||||
and out, new debug stuff, various bug fixes (Søren)
|
||||
- When buggy apps create synthetic button or keypresses without a
|
||||
timestamp, produce a warning instead of failing an assertion
|
||||
(Thomas) [#313490]
|
||||
- Avoid a memory leak when checking which workspace(s) a window is
|
||||
on (Thomas) [#322059]
|
||||
- Add a man page for metacity (Thom, Akira, Luke, Philip) [#321279]
|
||||
- Disable alt-f7 if a window can't be moved, and alt-f8 if it can't
|
||||
be resized (Thomas) [#328920]
|
||||
- Allow alt-escape to cancel alt-tabbing, and vice versa (Thomas)
|
||||
[#141425]
|
||||
|
||||
Translations
|
||||
Miloslav Trmac (cs), Kjartan Maraas (nb), Tino Meinen (nl),
|
||||
Kjartan Maraas (no), Слободан Д. Средојевић (sr), Funda Wang (zh_CN)
|
||||
|
||||
2.13.55
|
||||
==
|
||||
|
||||
Thanks to Dick Marinus, Christian Kirbach, and Elijah Newren for
|
||||
improvements in this release.
|
||||
|
||||
- Add a minimize and none double-click-titlebar-action (Dick)
|
||||
[#300210]
|
||||
- Prevent a critical warning crasher when switching themes
|
||||
(Christian) [#327847]
|
||||
- Fix some uninitialized value problems (Elijah)
|
||||
- If the mouse enters a window on a different screen, activate the
|
||||
default window on the new screen (Elijah) [#319348]
|
||||
|
||||
Translations
|
||||
Jordi Mallach (ca), Adam Weinberger (en_CA), Francisco Javier
|
||||
F. Serrador (es), Ilkka Tuohela (fi), Ignacio Casal Quinteiro (gl),
|
||||
Ankit Patel (gu), Kjartan Maraas (nb), Kjartan Maraas (no), Evandro
|
||||
Fernandes Giovanini (pt_BR), Theppitak Karoonboonyanan (th), Clytie
|
||||
Siddall (vi), Funda Wang (zh_CN)
|
||||
|
||||
2.13.34
|
||||
==
|
||||
|
||||
Thanks to Damien Carbery, Havoc Pennington, Søren Sandmann,
|
||||
Björn Lindqvist, Kjartan Maraas, Elijah Newren for improvements in
|
||||
this release.
|
||||
|
||||
- manually define HOST_NAME_MAX if not already defined to fix Solaris
|
||||
compilation issue (Damien, Havoc) [#326745]
|
||||
- compositor improvements: port to changes in libcm, do it again, fix
|
||||
unrefing, make minimize animation update again (all done by Søren)
|
||||
- make sure an outline border is shown even if a window decoration's
|
||||
width is 0 (Björn) [#98340]
|
||||
- correctly handle window alt-tab outlines in showing desktop mode
|
||||
(Björn) [#98340]
|
||||
- fix lots of tiny issues spotted by the intel compiler (Kjartan)
|
||||
[#321439]
|
||||
- prevent rapidly repeated visual bells from hanging metacity
|
||||
(Elijah) [#322032]
|
||||
- more careful error handling of values returned by GConf (Elijah)
|
||||
[#326615]
|
||||
- fix various initialization and default issues, especially for
|
||||
running with --disable-gconf. Make --disable-gconf actually work.
|
||||
(Elijah) [#326661]
|
||||
- fix some reading-from-free'd-data errors (Søren) [#327575]
|
||||
- fix an unitialized value problem when in raise-on-click mode
|
||||
(Søren) [#327572]
|
||||
- avoid flashing original-sized window when closing a maximized
|
||||
window (Elijah) [#317254]
|
||||
- prevent windows from sometimes getting shoved and smashed by
|
||||
sliding (and possibly auto-hiding) panels (Elijah) [#327822]
|
||||
|
||||
Translations
|
||||
Ilkka Tuohela (fi), Ignacio Casal Quinteiro (gl), Tino Meinen (nl),
|
||||
Funda Wang (zh_CN)
|
||||
|
||||
2.13.21
|
||||
==
|
||||
|
||||
Thanks to Damien Carbery, Ray Strode, Søren Sandmann, Elijah
|
||||
Newren, Jens Granseuer, and Kyle Ambroff for improvements in this
|
||||
release.
|
||||
|
||||
- Fix Solaris compilation issues (Ray, Damien) [#326281, #326746]
|
||||
- Merge compositor work from branches to get the beginnings of an openGL
|
||||
based compositor. Still not ready and thus disabled by default.
|
||||
(Søren)
|
||||
- Composite fixes: Only update composite on damage events (Søren), get
|
||||
non-composite compilation working again (Elijah), Really turn off
|
||||
draw-in-a-loop (Søren)
|
||||
- Don't dereference a NULL string (Elijah) [#327013]
|
||||
- GCC 2.95 fix; remove more C99 style variable initiailizations (Jens)
|
||||
[#327050]
|
||||
- Fix accidental overzealous focus holding by the terminal (introduced in
|
||||
last release) so that windows launched from panel icons, the panel
|
||||
menu, or global keybindings should get focus now. (Elijah) [#326159]
|
||||
- If no valid window is found in the MRU list, then set focus to the
|
||||
desktop window. (Kyle) [#317405]
|
||||
|
||||
Translations
|
||||
Adam Weinberger (en_CA), Francisco Javier F. Serrador (es), Ankit
|
||||
Patel (gu), Takeshi AIHANA (ja), Theppitak Karoonboonyanan (th),
|
||||
Clytie Siddall (vi)
|
||||
|
||||
2.13.13
|
||||
==
|
||||
|
||||
Thanks to Jens Granseuer, Björn Lindqvist, and Elijah Newren for
|
||||
improvements in this release.
|
||||
|
||||
- Remove C99 style variable initiailization (Jens) [#322622]
|
||||
- Fix a logic error (Björn) [#322149]
|
||||
- Plug a few leaks (Elijah) [#309178]
|
||||
- Allow edge resistance at both sides of a window and also when edges
|
||||
don't overlap but are a single pixel away from doing so (Elijah)
|
||||
[part of #321905]
|
||||
- Remove the timeout resistance at screen/xinerama edges (Elijah)
|
||||
[part of #321905]
|
||||
- Revert to the old edge resistance behavior for keyboard
|
||||
movement/resizing based resistance (Elijah) [part of #321905]
|
||||
- Remove the "pull-away" edge resistance (Elijah) [part of #321905]
|
||||
- Avoid crashing when visual bell is in use and focus window is
|
||||
closed (Elijah) [#322031]
|
||||
- Be more strict about what is considered a valid region with partial
|
||||
struts (Elijah) [#322070]
|
||||
- Fix reduced resources resize handling for windows with sizing or
|
||||
resizing constraints (Elijah) [#325774]
|
||||
- Fix window outline for minimized windows when using alt-esc
|
||||
(Elijah) [#325092]
|
||||
- Make the taskbar less flash happy and fix up some related stacking
|
||||
issues (Elijah) [#326035]
|
||||
- More thorough handling of source indication (Elijah) [part of #326041]
|
||||
- Don't "steal" focus from terminal windows for new window mappings
|
||||
as the difference in usage between terminals and other apps seems
|
||||
to suggest this difference in treatment. See bug #326159 for
|
||||
details, feedback welcome (Elijah) [#326159]
|
||||
- Add a raise on click option, basically only because all the major
|
||||
distros are patching it in anyway (though each and every one of
|
||||
them has bugs in their implementations). (Elijah) [#326156]
|
||||
|
||||
Translations
|
||||
Kjartan Maraas (nb), Kjartan Maraas (no)
|
||||
|
||||
2.13.8
|
||||
==
|
||||
|
||||
Thanks to Kang Jeong-Hee and Elijah Newren for improvements in this
|
||||
release.
|
||||
|
||||
- Fix some compilation warnings and issues (Kang)
|
||||
- Escape the title since it is going to be treated as Markup (Elijah)
|
||||
[#324846]
|
||||
- Make the workspace switcher work with dual-head (non-xinerama)
|
||||
setups (Elijah) [#319423]
|
||||
|
||||
Translations
|
||||
Ilkka Tuohela (fi), Ankit Patel (gu), Kang Joeng-Hee (ko)
|
||||
|
||||
2.13.5
|
||||
==
|
||||
|
||||
Thanks to Davyd Madeley, Kjartan Maraas, and Björn Lindqvist for
|
||||
improvements in this release.
|
||||
|
||||
- Make a debugging message actually correspond to the code (Björn)
|
||||
[#322051]
|
||||
- Make the wireframe a bit slimmer (Kjartan) [#320051]
|
||||
- Display hostname in titlebar for remote X clients (Davyd) [#322202]
|
||||
|
||||
Translations
|
||||
Miloslav Trmac (cs), Adam Weinberger (en_CA), Ankit Patel (gu),
|
||||
Kjartan Maraas (nb), Kjartan Maraas (no), Marcel Telka (sk)
|
||||
|
||||
2.13.3
|
||||
==
|
||||
|
||||
@@ -163,16 +720,16 @@ Translations
|
||||
2.13.0
|
||||
==
|
||||
|
||||
Thanks to Bj<EFBFBD>rn Lindqvist, Kjartan Maraas, S<EFBFBD>ren Sandmann,
|
||||
Thanks to Björn Lindqvist, Kjartan Maraas, Søren Sandmann,
|
||||
Elijah Newren, Ross Cohen, and Muktha for improvements in this release
|
||||
since 2.12.1.
|
||||
|
||||
- Mave ancestors come along with the transient when moving the window from
|
||||
one workspace to another (Bj<EFBFBD>rn) [#314977]
|
||||
one workspace to another (Björn) [#314977]
|
||||
- Fix the workspace switcher tabpopup to display the right windows and to
|
||||
fix the pick-a-new-window-to-focus algorithm in order to not select
|
||||
windows that aren't showing (Bj<EFBFBD>rn) [#170475]
|
||||
- Fix a couple memory leaks (Kjartan, S<EFBFBD>ren, Elijah) [#313030]
|
||||
windows that aren't showing (Björn) [#170475]
|
||||
- Fix a couple memory leaks (Kjartan, Søren, Elijah) [#313030]
|
||||
- Make alt-esc (the "switch between windows immediately" keybinding)
|
||||
actually show minimized windows too (Ross) [#107072]
|
||||
- Make alt-esc consistent with alt-tab by leaving stacking of unselected
|
||||
@@ -203,7 +760,7 @@ improvements in this release.
|
||||
|
||||
Translations
|
||||
Mahay Alam Khan (bn), Francisco Javier F. Serrador (es), Ivar Smolin (et),
|
||||
I<EFBFBD>aki Larra<EFBFBD>aga Murgoitio (eu), Luca Ferretti (it), Christian Rose (sv),
|
||||
Iñaki Larrañaga Murgoitio (eu), Luca Ferretti (it), Christian Rose (sv),
|
||||
Clytie Siddall (vi), Funda Wang (zh_CN)
|
||||
|
||||
2.12.0
|
||||
@@ -216,16 +773,16 @@ Thanks to Brent Smith for finding the crasher in the release candidate!
|
||||
Translations
|
||||
Bryn Salisbury (cy), Hendrik Richter (de), Christophe Merlet (RedFox) (fr),
|
||||
Ignacio Casal Quinteiro (gl), Norayr Chilingaryan (hy), Young-Ho Cha (ko),
|
||||
<EFBFBD>ygimantas Berucka (lt), Michiel Sikkes (nl), Leonid Kanter (ru), Danilo
|
||||
<1B>egan(sr), Baris Cicek (tr)
|
||||
Žygimantas Berucka (lt), Michiel Sikkes (nl), Leonid Kanter (ru), Danilo
|
||||
Šegan (sr), Baris Cicek (tr)
|
||||
|
||||
2.11.3
|
||||
==
|
||||
|
||||
Thanks to Bj<EFBFBD>rn Lindqvist and Elijah Newren for improvements in
|
||||
Thanks to Björn Lindqvist and Elijah Newren for improvements in
|
||||
this release.
|
||||
|
||||
- Check for the right versions of glib and gtk+ (Bj<EFBFBD>rn) [#314116]
|
||||
- Check for the right versions of glib and gtk+ (Björn) [#314116]
|
||||
- Avoid obscuring centered-on-desktop windows which are denied focus
|
||||
(Elijah) [#313234]
|
||||
|
||||
@@ -293,13 +850,13 @@ Translations
|
||||
|
||||
This release contains all fixes up to Metacity 2.10.2 plus some new goodies.
|
||||
|
||||
Thanks to Matthias Clasen, Aivars Kalvans, Bj<EFBFBD>rn Lindqvist, and
|
||||
Thanks to Matthias Clasen, Aivars Kalvans, Björn Lindqvist, and
|
||||
Andrew Johnson for improvements in this release.
|
||||
|
||||
- React to cursor theme changes (Matthias) [#308106]
|
||||
- Plug a small leak with xinerama information (Aivars) [#307884]
|
||||
- Split up main() into more manageable chunks and make use of GOpt
|
||||
(Bj<EFBFBD>rn) [#305331]
|
||||
(Björn) [#305331]
|
||||
- Speed up vertical gradients (Andrew) [#169982]
|
||||
|
||||
Translations
|
||||
@@ -360,8 +917,8 @@ The only difference between this version and 2.9.34 is some
|
||||
translation updates.
|
||||
|
||||
Translations
|
||||
Vladimir Petkov (bg), Gabor Kelemen (hu), <EFBFBD>ygimantas Berucka (lt),
|
||||
Reinout van Schouwen (nl), Mugurel Tudor (ro), Danilo <EFBFBD>egan (sr),
|
||||
Vladimir Petkov (bg), Gabor Kelemen (hu), Žygimantas Berucka (lt),
|
||||
Reinout van Schouwen (nl), Mugurel Tudor (ro), Danilo Šegan (sr),
|
||||
Woodman Tuen (zh_TW)
|
||||
|
||||
2.9.34
|
||||
@@ -426,7 +983,7 @@ Marcus Clarke for fixes in this release.
|
||||
Translations
|
||||
Jordi Mallach (ca), Martin Willemoes Hansen (da),
|
||||
Kostas Papadimas (el), David Lodge (en_GB),
|
||||
Francisco Javier F. Serrador (es), T<EFBFBD>ivo Leedj<EFBFBD>rv (et),
|
||||
Francisco Javier F. Serrador (es), Tõivo Leedjärv (et),
|
||||
Christophe Merlet (RedFox) (fr), Takeshi AIHANA (ja),
|
||||
Young-Ho, Cha (ko), Kjartan Maraas (nb), Michiel Sikkes (nl),
|
||||
Kjartan Maraas (no), Duarte Loreto (pt), Leonid Kanter (ru),
|
||||
@@ -494,7 +1051,7 @@ Translations
|
||||
Vladimir Petkov (bg), Miloslav Trmac (cs), Frank Arnold (de),
|
||||
Adam Weinberger (en_CA), David Lodge (en_GB),
|
||||
Francisco Javier F. Serrador (es), Pauli Virtanen (fi),
|
||||
Young-Ho, Changwoo Ryu (ko), <EFBFBD>ygimantas Berucka (lt),
|
||||
Young-Ho, Changwoo Ryu (ko), Žygimantas Berucka (lt),
|
||||
Kjartan Maraas (nb), Kjartan Maraas (no), Duarte Loreto (pt),
|
||||
Marcel Telka (sk), Christian Rose (sv),
|
||||
Theppitak Karoonboonyanan (th)
|
||||
@@ -601,7 +1158,7 @@ Vincent Untz for fixes/features in this release.
|
||||
|
||||
Translations
|
||||
da (Martin Willemoes Hansen), fr(Christophe Merlet, Baptiste
|
||||
Mille-Mathias), lt(<EFBFBD>ygimantas Berucka), ja(Takeshi AIHANA)
|
||||
Mille-Mathias), lt(Žygimantas Berucka), ja(Takeshi AIHANA)
|
||||
|
||||
2.9.0
|
||||
==
|
||||
@@ -632,7 +1189,7 @@ and Vincent Untz for fixes and features in this release.
|
||||
- Re-enable focus stealing prevention (Elijah)
|
||||
|
||||
Translations
|
||||
es(Francisco Javier F. Serrador), sq(Laurent Dhima), sr(Danilo <EFBFBD>egan),
|
||||
es(Francisco Javier F. Serrador), sq(Laurent Dhima), sr(Danilo Šegan),
|
||||
cs(Miloslav Trmac), en_CA(Adam Weinberger), en_GB(David Lodge)
|
||||
|
||||
2.8.6
|
||||
@@ -667,7 +1224,7 @@ Translations
|
||||
|
||||
* ar(Abdulaziz Al-Arfaj), cs(Miloslav Trmac), cy(Dafydd Harries),
|
||||
en_GB(David Lodge), fr(Christophe Merlet (RedFox)),
|
||||
nn(<EFBFBD>smund Skj<EFBFBD>veland), or(Gora Mohanty),
|
||||
nn(Åsmund Skjæveland), or(Gora Mohanty),
|
||||
pr_BR(Gustavo Noronha Silva), ro(Mugurel Tudor),
|
||||
th(Paisa Seeluangsawat), tr(Baris Cicek), zh_TW(Woodman Tuen)
|
||||
|
||||
@@ -705,7 +1262,7 @@ Fixes
|
||||
Translations
|
||||
* az(Metin Amiroff), bs(Kemal Sanjta), ca(Jordi Mallach),
|
||||
el(Kostas Papadimas), es(Francisco Javier F. Serrador),
|
||||
eu(I<EFBFBD><EFBFBD>aki Larra<EFBFBD><EFBFBD>aga Murgoitio), fi(Pauli Virtanen),
|
||||
eu(Iñaki Larrañaga Murgoitio), fi(Pauli Virtanen),
|
||||
nb(Kjartan Maraas), sq(Laurent Dhima), uk(Maxim Dziumanenko)
|
||||
|
||||
|
||||
@@ -733,7 +1290,7 @@ Fixes
|
||||
|
||||
Translations
|
||||
* fi (Pauli Virtanen), ja (Takeshi AIHANA), ko (Young-Ho, Cha),
|
||||
pl (Gnome PL Team), ru (Dmitry G. Mastrukov), sr (Danilo <EFBFBD>Ł<EFBFBD>egan),
|
||||
pl (Gnome PL Team), ru (Dmitry G. Mastrukov), sr (Danilo Šegan),
|
||||
tk (Gurban M. Tewekgeli), zh_CN (Funda Wang)
|
||||
|
||||
2.8.2
|
||||
|
11
README
11
README
@@ -6,10 +6,11 @@ on UNIX keyboards.
|
||||
The first release of Metacity was version 2.3. Metacity has no need for
|
||||
your petty hangups about version numbers.
|
||||
|
||||
The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-, 2.10.x,
|
||||
2.12.x.
|
||||
The stable releases so far are 2.4.x, 2.6.x, 2.8.[01], 2.8.1.x, 2.8.5-,
|
||||
2.10.x, 2.12.x, 2.14.x, 2.16.x.
|
||||
|
||||
Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x
|
||||
Unstable branches are 2.3.x, 2.5.x, 2.8.2-4, 2.9.x, 2.11.x, 2.13.x,
|
||||
2.15.x, 2.17.x.
|
||||
|
||||
COMPILING METACITY
|
||||
===
|
||||
@@ -315,8 +316,8 @@ A: Metacity only stores sizes/positions for apps that are session
|
||||
archaic than twm - and you should flame them. ;-)
|
||||
|
||||
Docs on session management:
|
||||
ftp://ftp.x.org/pub/R6.4/xc/doc/hardcopy/SM/xsmp.PS.gz
|
||||
ftp://ftp.x.org:21/pub/R6.4/xc/doc/hardcopy/SM/SMlib.PS.gz
|
||||
http://www.fifi.org/doc/xspecs/xsmp.txt.gz
|
||||
http://www.fifi.org/doc/xspecs/SMlib.txt.gz
|
||||
|
||||
See also the ICCCM section on SM. For GNOME apps, use the
|
||||
GnomeClient object. For a simple example of using libSM directly,
|
||||
|
144
autogen.sh
144
autogen.sh
@@ -4,140 +4,18 @@
|
||||
srcdir=`dirname $0`
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
||||
ORIGDIR=`pwd`
|
||||
cd $srcdir
|
||||
PROJECT=metacity
|
||||
TEST_TYPE=-f
|
||||
FILE=src/display.c
|
||||
PKG_NAME="metacity"
|
||||
REQUIRED_AUTOMAKE_VERSION=1.7
|
||||
|
||||
DIE=0
|
||||
|
||||
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "You must have autoconf installed to compile $PROJECT."
|
||||
echo "Download the appropriate package for your distribution,"
|
||||
echo "or get the source tarball at http://ftp.gnu.org/gnu/autoconf/"
|
||||
DIE=1
|
||||
(test -f $srcdir/configure.in \
|
||||
&& test -d $srcdir/src) || {
|
||||
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
|
||||
echo " top-level metacity directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if automake-1.9 --version < /dev/null > /dev/null 2>&1; then
|
||||
AUTOMAKE=automake-1.9
|
||||
ACLOCAL=aclocal-1.9
|
||||
elif automake-1.8 --version < /dev/null > /dev/null 2>&1; then
|
||||
AUTOMAKE=automake-1.8
|
||||
ACLOCAL=aclocal-1.8
|
||||
elif automake-1.7 --version < /dev/null > /dev/null 2>&1; then
|
||||
AUTOMAKE=automake-1.7
|
||||
ACLOCAL=aclocal-1.7
|
||||
else
|
||||
echo
|
||||
echo "You must have automake >= 1.7 installed to compile $PROJECT."
|
||||
echo "Get http://ftp.gnu.org/gnu/automake/automake-1.9.3.tar.bz2"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
fi
|
||||
|
||||
(grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
|
||||
(libtool --version) < /dev/null > /dev/null 2>&1 || {
|
||||
echo
|
||||
echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
|
||||
echo "Get http://ftp.gnu.org/gnu/libtool/libtool-1.5.10.tar.gz"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
}
|
||||
which gnome-autogen.sh || {
|
||||
echo "You need to install gnome-common from the GNOME CVS"
|
||||
exit 1
|
||||
}
|
||||
|
||||
CONFIGURE=configure.in
|
||||
if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
|
||||
if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
|
||||
GETTEXTIZE=""
|
||||
else
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
|
||||
GETTEXTIZE="glib-gettextize"
|
||||
GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
|
||||
else
|
||||
GETTEXTIZE="gettextize"
|
||||
GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
|
||||
fi
|
||||
|
||||
$GETTEXTIZE --version < /dev/null > /dev/null 2>&1
|
||||
if test $? -ne 0; then
|
||||
echo
|
||||
echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
|
||||
echo "Get $GETTEXTIZE_URL"
|
||||
echo "(or a newer version if it is available)"
|
||||
DIE=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$DIE" -eq 1; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
test $TEST_TYPE $FILE || {
|
||||
echo "You must run this script in the top-level $PROJECT directory"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if test -z "$*"; then
|
||||
echo "I am going to run ./configure with no arguments - if you wish "
|
||||
echo "to pass any to it, please specify them on the $0 command line."
|
||||
fi
|
||||
|
||||
topdir=`pwd`
|
||||
for coin in .
|
||||
do
|
||||
dr=`dirname $coin`
|
||||
if test -f $dr/NO-AUTO-GEN; then
|
||||
echo skipping $dr -- flagged as no auto-gen
|
||||
else
|
||||
echo processing $dr
|
||||
cd $dr
|
||||
if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then
|
||||
if grep "sed.*POTFILES" configure.in >/dev/null; then
|
||||
: do nothing -- we still have an old unmodified configure.in
|
||||
else
|
||||
echo "Creating $dr/aclocal.m4 ..."
|
||||
test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
|
||||
echo "Running glib-gettextize... Ignore non-fatal messages."
|
||||
echo "no" | glib-gettextize --force --copy || exit $?
|
||||
echo "Making $dr/aclocal.m4 writable ..."
|
||||
test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
|
||||
fi
|
||||
fi
|
||||
if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then
|
||||
echo "Running intltoolize..."
|
||||
intltoolize --force --copy --automake || exit $?
|
||||
fi
|
||||
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
|
||||
echo "Running libtoolize..."
|
||||
libtoolize --force --copy || exit $?
|
||||
fi
|
||||
|
||||
echo "Running $ACLOCAL $ACLOCAL_FLAGS ..."
|
||||
$ACLOCAL $ACLOCAL_FLAGS || exit $?
|
||||
echo "Running autoconf ..."
|
||||
autoconf || exit $?
|
||||
if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
|
||||
echo "Running autoheader..."
|
||||
autoheader || exit $?
|
||||
fi
|
||||
echo "Running $AUTOMAKE..."
|
||||
$AUTOMAKE --add-missing --force --gnu || exit $?
|
||||
|
||||
cd $topdir
|
||||
fi
|
||||
done
|
||||
|
||||
conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
|
||||
|
||||
cd "$ORIGDIR"
|
||||
|
||||
if test x$NOCONFIGURE = x; then
|
||||
echo Running $srcdir/configure $conf_flags "$@" ...
|
||||
$srcdir/configure $conf_flags "$@" \
|
||||
&& echo Now type \`make\' to compile $PROJECT || exit $?
|
||||
else
|
||||
echo Skipping configure process.
|
||||
fi
|
||||
USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
|
||||
|
45
configure.in
45
configure.in
@@ -1,8 +1,14 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([metacity_major_version], [2])
|
||||
m4_define([metacity_minor_version], [17])
|
||||
# Fibonacci sequence for micro version numbering:
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
AC_INIT([metacity], [2.13.3],
|
||||
m4_define([metacity_micro_version], [0])
|
||||
|
||||
m4_define([metacity_version],
|
||||
[metacity_major_version.metacity_minor_version.metacity_micro_version])
|
||||
AC_INIT([metacity], [metacity_version],
|
||||
[http://bugzilla.gnome.org/enter_bug.cgi?product=metacity])
|
||||
|
||||
AC_CONFIG_SRCDIR(src/display.c)
|
||||
@@ -18,7 +24,7 @@ GETTEXT_PACKAGE=metacity
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Name of default gettext domain])
|
||||
|
||||
AC_PROG_INTLTOOL([0.21])
|
||||
IT_PROG_INTLTOOL([0.34.90])
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AC_HEADER_STDC
|
||||
@@ -101,7 +107,7 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0'
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.10.0 pango >= 1.2.0'
|
||||
|
||||
AC_ARG_ENABLE(gconf,
|
||||
AC_HELP_STRING([--disable-gconf],
|
||||
@@ -155,7 +161,6 @@ AC_ARG_ENABLE(shape,
|
||||
## try definining HAVE_BACKTRACE
|
||||
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
|
||||
|
||||
ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy id is it ja ko ku lt lv mk ml mn ms nb ne nl nn no or pa pl pt pt_BR ro ru rw sl sk sq sr sr@Latn sv ta th tk tr uk vi wa xh zh_CN zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
## here we get the flags we'll actually use
|
||||
@@ -222,7 +227,7 @@ fi
|
||||
|
||||
if test x$have_xcomposite = xyes; then
|
||||
echo "Building with CompositeExt"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
||||
METACITY_PC_MODULES="$METACITY_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage cm"
|
||||
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, , [Building with compositing manager support])
|
||||
|
||||
## force on render also
|
||||
@@ -404,10 +409,10 @@ if test "x$found_xsync" = "xyes"; then
|
||||
AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
|
||||
fi
|
||||
|
||||
METACITY_LIBS="$XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_LIBS"
|
||||
METACITY_MESSAGE_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_MESSAGE_LIBS"
|
||||
METACITY_WINDOW_DEMO_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_WINDOW_DEMO_LIBS"
|
||||
METACITY_PROPS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS $METACITY_PROPS_LIBS"
|
||||
METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
|
||||
found_sm=no
|
||||
case "$METACITY_LIBS" in
|
||||
@@ -463,6 +468,9 @@ if test x$enable_gconf = xyes; then
|
||||
fi
|
||||
|
||||
AM_GCONF_SOURCE_2
|
||||
else
|
||||
GCONF_SCHEMAS_INSTALL_TRUE='#'
|
||||
GCONF_SCHEMAS_INSTALL_FALSE=
|
||||
fi
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
@@ -481,11 +489,8 @@ AC_OUTPUT
|
||||
|
||||
if test x$enable_gconf = xno; then
|
||||
echo "*** WARNING WARNING WARNING WARNING WARNING"
|
||||
echo "*** Building without GConf"
|
||||
echo "*** This means there's no way to change prefs except"
|
||||
echo "*** hacking source code, at least for now."
|
||||
echo "*** Also, some prefs may have broken defaults."
|
||||
echo "*** Patches needed for a simple no-gconf config file."
|
||||
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
|
||||
|
||||
@@ -517,5 +522,13 @@ metacity-$VERSION:
|
||||
Render: ${have_xrender}
|
||||
Xcursor: ${have_xcursor}
|
||||
"
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo "Use 2.12.x for stable (gnome-2-12 branch in CVS)"
|
||||
|
||||
METACITY_MINOR_VERSION=metacity_minor_version
|
||||
if test $(( $(echo $METACITY_MINOR_VERSION) %2)) == "1"; then
|
||||
stable_version=$(( ($METACITY_MINOR_VERSION / 2) * 2))
|
||||
echo "This is the UNSTABLE branch of metacity"
|
||||
echo -n "Use 2.$stable_version.x for stable "
|
||||
echo "(gnome-2-$stable_version branch in CVS)"
|
||||
else
|
||||
echo "This is the stable branch of metacity"
|
||||
fi
|
||||
|
@@ -9,7 +9,8 @@ basics are easy:
|
||||
Focus method Behavior
|
||||
click When a user clicks on a window, focus it
|
||||
sloppy When an EnterNotify is received, focus the window
|
||||
mouse Same as sloppy, but also defocus on LeaveNotify
|
||||
mouse Same as sloppy, but also defocus when mouse enters DESKTOP
|
||||
window
|
||||
|
||||
Note that these choices (along with the choice that clicking on a
|
||||
window raises it for the click focus method) introduces the following
|
||||
@@ -20,8 +21,9 @@ Focus method Invariant
|
||||
sloppy If the mouse is in a window, then it is focused; if the
|
||||
mouse is not in a window, then the most recently used
|
||||
window is focused.
|
||||
mouse If the mouse is in a window, then it is focused; otherwise,
|
||||
the designated "no_focus_window" is focused
|
||||
|
||||
mouse If the mouse is in a non-DESKTOP window, then it is focused;
|
||||
otherwise, the designated "no_focus_window" is focused
|
||||
|
||||
However, there are a number of cases where the current focus window
|
||||
becomes invalid and another should be chosen. Some examples are when
|
||||
@@ -34,8 +36,10 @@ Focus method Behavior
|
||||
on top)
|
||||
sloppy Focus the window containing the pointer if there is such
|
||||
a window, otherwise focus the most recently used window.
|
||||
mouse Focus the window containing the pointer if there is one,
|
||||
otherwise focus the designated "no_focus_window".
|
||||
|
||||
mouse Focus the non-DESKTOP window containing the pointer if
|
||||
there is one, otherwise focus the designated
|
||||
"no_focus_window".
|
||||
|
||||
Note that "most recently used window", as used here, has a slightly
|
||||
different connotation than "most recent to have keyboard focus". This
|
||||
@@ -123,6 +127,7 @@ To read more about the bugs that inspired these choices:
|
||||
- Mousenav vs. Keynav in mouse and sloppy focus modes
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=167545
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=101190
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=357695
|
||||
- Not focusing panels
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=160470
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=120100
|
||||
|
@@ -1,3 +1,3 @@
|
||||
man_MANS = metacity-theme-viewer.1 metacity-window-demo.1
|
||||
man_MANS = metacity.1 metacity-theme-viewer.1 metacity-window-demo.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
||||
|
60
doc/man/metacity.1
Normal file
60
doc/man/metacity.1
Normal file
@@ -0,0 +1,60 @@
|
||||
.\" Hey, EMACS: -*- nroff -*-
|
||||
.\" First parameter, NAME, should be all caps
|
||||
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
|
||||
.\" other parameters are allowed: see man(7), man(1)
|
||||
.TH METACITY 1 "11 February 2006"
|
||||
.\" Please adjust this date whenever revising the manpage.
|
||||
.\"
|
||||
.\" Some roff macros, for reference:
|
||||
.\" .nh disable hyphenation
|
||||
.\" .hy enable hyphenation
|
||||
.\" .ad l left justify
|
||||
.\" .ad b justify to both left and right margins
|
||||
.\" .nf disable filling
|
||||
.\" .fi enable filling
|
||||
.\" .br insert line break
|
||||
.\" .sp <n> insert n+1 empty lines
|
||||
.\" for manpage-specific macros, see man(7)
|
||||
.SH NAME
|
||||
METACITY \- minimal GTK2 Window Manager
|
||||
.SH SYNOPSIS
|
||||
.B metacity
|
||||
[\-\-display=\fIDISPLAY\fP] [\-\-replace] [\-\-sm\-client\-id=\fIID\fP] [\-\-sm\-disable] [\-\-sm\-save\-file=\fIFILENAME\fP] [\-\-version] [\-\-help]
|
||||
.SH DESCRIPTION
|
||||
This manual page documents briefly
|
||||
.B metacity\fP.
|
||||
.PP
|
||||
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
|
||||
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
|
||||
.\" respectively.
|
||||
\fBmetacity\fP is a minimal X window manager aimed at nontechnical users and is designed to integrate well with the GNOME desktop. \fBmetacity\fP lacks some features that may be expected by traditional UNIX or other technical users; these users may want to investigate other available window managers for use with GNOME or standalone.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-\-display=DISPLAY
|
||||
Connect to X display \fIDISPLAY\fP.
|
||||
.TP
|
||||
.B \-\-replace
|
||||
a window manager which is running is replaced by \fBmetacity\fP. Users are encouraged to change the GNOME window manager by running the new WM with the --replace or -replace option, and subsequently saving the session.
|
||||
.TP
|
||||
.B \-\-sm\-client\-id=ID
|
||||
Specify a session management \fIID\fP.
|
||||
.TP
|
||||
.B \-\-sm\-disable
|
||||
Disable the session management.
|
||||
.TP
|
||||
.B \-\-sm\-save\-file=FILENAME
|
||||
Load a session from \fIFILENAME\fP.
|
||||
.TP
|
||||
.B \-\-version
|
||||
Print the version number.
|
||||
.TP
|
||||
.B \-?, \-\-help
|
||||
Show summary of options.
|
||||
.SH CONFIGURATION
|
||||
\fBmetacity\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gconf editing (gconf-editor or gconftool-2).
|
||||
.SH SEE ALSO
|
||||
.BR metacity-message (1)
|
||||
.SH AUTHOR
|
||||
The original manual page was written by Thom May <thom@debian.org>. It was updated by Akira TAGOH <tagoh@debian.org>
|
||||
for the Debian GNU/Linux system (with permission to use by others), and then updated by Luke Morton and Philip O'Brien
|
||||
for inclusion in metacity.
|
@@ -1,6 +1,91 @@
|
||||
Docs on the theme format
|
||||
Themes are in a simple XML-subset format. There are multiple versions
|
||||
of the theme format, and a given theme can support more than one format.
|
||||
|
||||
Themes are in a simple XML-subset format.
|
||||
Version 1: THEMEDIR/metacity-1/metacity-theme-1.xml
|
||||
(original metacity format)
|
||||
Version 2: THEMEDIR/metacity-1/metacity-theme-2.xml
|
||||
|
||||
The subdirectory name is "metacity-1" in all versions.
|
||||
|
||||
As you might expect, older versions of metacity will not understand
|
||||
newer theme formats. However, newer versions will use old themes.
|
||||
Metacity will always use the newest theme format it understands that
|
||||
the X server supports. Some format versions are only supported if you
|
||||
have the right X server features.
|
||||
|
||||
Each format *requires* the corresponding filename. If you put version
|
||||
2 format features in the metacity-1/metacity-theme-1.xml file, then
|
||||
metacity will get angry.
|
||||
|
||||
This document has separate sections for each format version. You may
|
||||
want to read the document in reverse order, since the base features
|
||||
are discussed under version 1.
|
||||
|
||||
New Features in Theme Format Version 2
|
||||
======================================
|
||||
|
||||
The optional attributes rounded_top_left, rounded_top_right,
|
||||
rounded_bottom_left and rounded_bottom_right on <frame_geometry>
|
||||
should now be the radius of the corner in pixels. You may still use
|
||||
the values "false" for 0 and "true" for 5, which means v1 values will
|
||||
still work just fine.
|
||||
|
||||
<frame_geometry> has a new optional attribute, hide_buttons. If this
|
||||
is true, no buttons will be displayed on the titlebar.
|
||||
|
||||
Anywhere you can use a positive integer, you can use an integer constant.
|
||||
|
||||
As well as constant integers and reals, you may define constant colours,
|
||||
thus:
|
||||
<constant name="RevoltingPink" value="#FF00FF"/>
|
||||
<constant name="Background" value="gtk:bg[NORMAL]"/>
|
||||
|
||||
<frame_style> has two new optional attributes, background and alpha.
|
||||
If you specify alpha, you must specify background. background is a
|
||||
colour used for the background of the frame. alpha is the transparency
|
||||
as a real between 0.0 and 1.0. If the current X server does not support
|
||||
alpha channels, the value is ignored.
|
||||
|
||||
The filename attribute of <image> may begin with "theme:". If so, the
|
||||
rest of the string is the name of a theme icon. The 64x64 version of the
|
||||
icon is used, except for fallback mini_icons, which use the 16x16 version.
|
||||
This does not affect ordinary resizing. For example:
|
||||
<button function="close" state="normal">
|
||||
<draw_ops>
|
||||
<include name="active_button"/>
|
||||
<image filename="theme:gnome-logout" x="2" y="2"
|
||||
width="width-4" height="height-4"/>
|
||||
<!-- Note: not "theme:gnome-logout.png" or similar. -->
|
||||
</draw_ops>
|
||||
</button>
|
||||
|
||||
<menu_icon>s are parsed but ignored.
|
||||
|
||||
Fallback icons can be specified using <fallback>. There are two
|
||||
optional arguments, icon and mini_icon. The values of these arguments
|
||||
are identical to that of the filename attribute of <image>. Fallback
|
||||
icons are used when a window does not supply its own icon. If a fallback
|
||||
icon is not specified with <fallback>, Metacity will use a built-in
|
||||
icon, as in metacity-theme-1.
|
||||
|
||||
The <arc> element, as well as the original start_angle and end_angle
|
||||
attributes, may be given from and to attributes. The values of these
|
||||
attributes are given in degrees clockwise, with 0 being straight up.
|
||||
For example:
|
||||
<arc from="0.0" to="90.0" filled="true" color="#FF00FF"
|
||||
x="0" y="5" width="15" height="15"/>
|
||||
|
||||
<frame state="shaded"> may now take an optional resize attribute, with
|
||||
the same interpretation as the resize attribute on <frame state="normal">.
|
||||
If this attribute is omitted for state="shaded", it defaults to "both".
|
||||
(If it is omitted for state="normal", it remains an error.)
|
||||
|
||||
In addition to the four <button> functions which are required in
|
||||
metacity-theme-1, there are six new functions in metacity-theme-2:
|
||||
shade, unshade, above, unabove, stick and unstick.
|
||||
|
||||
Overview of Theme Format Version 1
|
||||
==================================
|
||||
|
||||
<?xml version="1.0"?>
|
||||
<metacity_theme>
|
||||
|
@@ -9,3 +9,4 @@ cat-id-tbl.c
|
||||
messages
|
||||
missing
|
||||
stamp-cat-id
|
||||
stamp-it
|
||||
|
858
po/ChangeLog
858
po/ChangeLog
File diff suppressed because it is too large
Load Diff
77
po/LINGUAS
Normal file
77
po/LINGUAS
Normal file
@@ -0,0 +1,77 @@
|
||||
# please keep this list sorted alphabetically
|
||||
#
|
||||
am
|
||||
ar
|
||||
az
|
||||
be
|
||||
bg
|
||||
bn
|
||||
bn_IN
|
||||
bs
|
||||
ca
|
||||
cs
|
||||
cy
|
||||
da
|
||||
de
|
||||
dz
|
||||
el
|
||||
en_CA
|
||||
en_GB
|
||||
es
|
||||
et
|
||||
eu
|
||||
fa
|
||||
fi
|
||||
fr
|
||||
ga
|
||||
gl
|
||||
gu
|
||||
he
|
||||
hi
|
||||
hr
|
||||
hu
|
||||
hy
|
||||
id
|
||||
is
|
||||
it
|
||||
ja
|
||||
ka
|
||||
ko
|
||||
ku
|
||||
lt
|
||||
lv
|
||||
mg
|
||||
mk
|
||||
ml
|
||||
mn
|
||||
mr
|
||||
ms
|
||||
nb
|
||||
ne
|
||||
nl
|
||||
nn
|
||||
or
|
||||
pa
|
||||
pl
|
||||
pt
|
||||
pt_BR
|
||||
ro
|
||||
ru
|
||||
rw
|
||||
sk
|
||||
sl
|
||||
sq
|
||||
sr
|
||||
sr@Latn
|
||||
sv
|
||||
ta
|
||||
th
|
||||
tk
|
||||
tr
|
||||
uk
|
||||
vi
|
||||
wa
|
||||
xh
|
||||
zh_CN
|
||||
zh_HK
|
||||
zh_TW
|
2843
po/bn_IN.po
Normal file
2843
po/bn_IN.po
Normal file
File diff suppressed because it is too large
Load Diff
1058
po/en_CA.po
1058
po/en_CA.po
File diff suppressed because it is too large
Load Diff
2571
po/en_GB.po
2571
po/en_GB.po
File diff suppressed because it is too large
Load Diff
2464
po/pt_BR.po
2464
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
146
po/sk.po
146
po/sk.po
@@ -13,8 +13,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2005-10-17 06:12+0200\n"
|
||||
"PO-Revision-Date: 2005-10-17 06:27+0200\n"
|
||||
"POT-Creation-Date: 2005-11-22 23:56+0100\n"
|
||||
"PO-Revision-Date: 2005-11-23 00:07+0100\n"
|
||||
"Last-Translator: Marcel Telka <marcel@telka.sk>\n"
|
||||
"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -26,7 +26,7 @@ msgstr ""
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "Použitie: %s\n"
|
||||
|
||||
#: ../src/tools/metacity-message.c:176 ../src/util.c:129
|
||||
#: ../src/tools/metacity-message.c:176 ../src/util.c:130
|
||||
msgid "Metacity was compiled without support for verbose mode\n"
|
||||
msgstr "Metacity bol skompilovaný bez podpory zobrazovania informácií\n"
|
||||
|
||||
@@ -83,27 +83,27 @@ msgstr ""
|
||||
msgid "Fatal IO error %d (%s) on display '%s'.\n"
|
||||
msgstr "Kritická chyba V/V %d (%s) na displeji '%s'\n"
|
||||
|
||||
#: ../src/frames.c:1122
|
||||
#: ../src/frames.c:1123
|
||||
msgid "Close Window"
|
||||
msgstr "Zavrieť okno"
|
||||
|
||||
#: ../src/frames.c:1125
|
||||
#: ../src/frames.c:1126
|
||||
msgid "Window Menu"
|
||||
msgstr "Menu okna"
|
||||
|
||||
#: ../src/frames.c:1128
|
||||
#: ../src/frames.c:1129
|
||||
msgid "Minimize Window"
|
||||
msgstr "Minimalizovať okno"
|
||||
|
||||
#: ../src/frames.c:1131
|
||||
#: ../src/frames.c:1132
|
||||
msgid "Maximize Window"
|
||||
msgstr "Maximalizovať okno"
|
||||
|
||||
#: ../src/frames.c:1134
|
||||
#: ../src/frames.c:1135
|
||||
msgid "Unmaximize Window"
|
||||
msgstr "Odmaximalizovať okno"
|
||||
|
||||
#: ../src/keybindings.c:995
|
||||
#: ../src/keybindings.c:996
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Some other program is already using the key %s with modifiers %x as a "
|
||||
@@ -111,17 +111,17 @@ msgid ""
|
||||
msgstr ""
|
||||
"Iný program už používa kláves %s s modifikátormi %x ako klávesovú skratku.\n"
|
||||
|
||||
#: ../src/keybindings.c:2655
|
||||
#: ../src/keybindings.c:2494
|
||||
#, c-format
|
||||
msgid "Error launching metacity-dialog to print an error about a command: %s\n"
|
||||
msgstr "Chyba pri spustení dialógu metacity pre zobrazenie chyby príkazu: %s\n"
|
||||
|
||||
#: ../src/keybindings.c:2760
|
||||
#: ../src/keybindings.c:2599
|
||||
#, c-format
|
||||
msgid "No command %d has been defined.\n"
|
||||
msgstr "Nedefinovaný príkaz %d.\n"
|
||||
|
||||
#: ../src/keybindings.c:3610
|
||||
#: ../src/keybindings.c:3461
|
||||
msgid "No terminal command has been defined.\n"
|
||||
msgstr "Nebol definovaný terminálový príkaz.\n"
|
||||
|
||||
@@ -181,83 +181,87 @@ msgstr ""
|
||||
msgid "Failed to restart: %s\n"
|
||||
msgstr "Nepodarilo znovu spustiť: %s\n"
|
||||
|
||||
#: ../src/menu.c:54
|
||||
#: ../src/menu.c:55
|
||||
msgid "Mi_nimize"
|
||||
msgstr "_Minimalizovať"
|
||||
|
||||
#: ../src/menu.c:55
|
||||
#: ../src/menu.c:56
|
||||
msgid "Ma_ximize"
|
||||
msgstr "Ma_ximalizovať"
|
||||
|
||||
#: ../src/menu.c:56
|
||||
#: ../src/menu.c:57
|
||||
msgid "Unma_ximize"
|
||||
msgstr "_Odmaximalizovať"
|
||||
|
||||
#: ../src/menu.c:57
|
||||
#: ../src/menu.c:58
|
||||
msgid "Roll _Up"
|
||||
msgstr "_Zabaliť"
|
||||
|
||||
#: ../src/menu.c:58
|
||||
#: ../src/menu.c:59
|
||||
msgid "_Unroll"
|
||||
msgstr "_Rozbaliť"
|
||||
|
||||
#: ../src/menu.c:59 ../src/menu.c:60
|
||||
#: ../src/menu.c:60 ../src/menu.c:61
|
||||
msgid "On _Top"
|
||||
msgstr "Na_vrch"
|
||||
|
||||
#: ../src/menu.c:61
|
||||
#: ../src/menu.c:62
|
||||
msgid "_Move"
|
||||
msgstr "_Presunúť"
|
||||
|
||||
#: ../src/menu.c:62
|
||||
#: ../src/menu.c:63
|
||||
msgid "_Resize"
|
||||
msgstr "Zmeniť _veľkosť"
|
||||
|
||||
#. separator
|
||||
#: ../src/menu.c:64
|
||||
msgid "Move Titlebar On_screen"
|
||||
msgstr "Presunúť titulok na _obrazovku"
|
||||
|
||||
#. separator
|
||||
#: ../src/menu.c:66
|
||||
msgid "_Close"
|
||||
msgstr "_Zavrieť"
|
||||
|
||||
#. separator
|
||||
#: ../src/menu.c:66
|
||||
#: ../src/menu.c:68
|
||||
msgid "_Always on Visible Workspace"
|
||||
msgstr "_Vždy na viditeľnej pracovnej ploche"
|
||||
|
||||
#: ../src/menu.c:67
|
||||
#: ../src/menu.c:69
|
||||
msgid "_Only on This Workspace"
|
||||
msgstr "_Len na tejto pracovnej ploche"
|
||||
|
||||
#: ../src/menu.c:68
|
||||
#: ../src/menu.c:70
|
||||
msgid "Move to Workspace _Left"
|
||||
msgstr "Presunúť na pracovnú plochu _vľavo"
|
||||
|
||||
#: ../src/menu.c:69
|
||||
#: ../src/menu.c:71
|
||||
msgid "Move to Workspace R_ight"
|
||||
msgstr "Presunúť na pracovnú plochu v_pravo"
|
||||
|
||||
#: ../src/menu.c:70
|
||||
#: ../src/menu.c:72
|
||||
msgid "Move to Workspace _Up"
|
||||
msgstr "Presunúť na pracovnú plochu _hore"
|
||||
|
||||
#: ../src/menu.c:71
|
||||
#: ../src/menu.c:73
|
||||
msgid "Move to Workspace _Down"
|
||||
msgstr "Presunúť na pracovnú plochu _dole"
|
||||
|
||||
#: ../src/menu.c:162 ../src/prefs.c:2106
|
||||
#: ../src/menu.c:164 ../src/prefs.c:2112
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Pracovná plocha %d"
|
||||
|
||||
#: ../src/menu.c:171
|
||||
#: ../src/menu.c:173
|
||||
msgid "Workspace 1_0"
|
||||
msgstr "Pracovná plocha 1_0"
|
||||
|
||||
#: ../src/menu.c:173
|
||||
#: ../src/menu.c:175
|
||||
#, c-format
|
||||
msgid "Workspace %s%d"
|
||||
msgstr "Pracovná plocha %s%d"
|
||||
|
||||
#: ../src/menu.c:368
|
||||
#: ../src/menu.c:370
|
||||
msgid "Move to Another _Workspace"
|
||||
msgstr "Presunúť na inú _pracovnú plochu"
|
||||
|
||||
@@ -507,16 +511,16 @@ msgid ""
|
||||
"a window during drag and drop (because that results in the application "
|
||||
"grabbing the mouse)"
|
||||
msgstr ""
|
||||
"Ak je true a režim aktivácie je buď \"sloppy\" alebo \"mouse\", aktívne "
|
||||
"okno sa automaticky po danej dobe posunie dopredu (čakanie je nastavené v "
|
||||
"kľúči auto_raise_delay). Táto predvoľba je zle pomenovaná, ale je ponechaná "
|
||||
"pre spätnú kompatibilitu. Aby to bolo viac jasné (aspoň po technickej stránke), "
|
||||
"Ak je true a režim aktivácie je buď \"sloppy\" alebo \"mouse\", aktívne okno "
|
||||
"sa automaticky po danej dobe posunie dopredu (čakanie je nastavené v kľúči "
|
||||
"auto_raise_delay). Táto predvoľba je zle pomenovaná, ale je ponechaná pre "
|
||||
"spätnú kompatibilitu. Aby to bolo viac jasné (aspoň po technickej stránke), "
|
||||
"jej význam je \"automaticky presunúť okno nad ostatné po uplynutí časového "
|
||||
"limitu, ktorý je spustený nezachyteným vstupom myši v režimoch aktivácie 'sloppy' "
|
||||
"alebo 'mouse'\". Nemá to vzťah k správaniu sa klikania (t.j. nemá to vzťah k "
|
||||
"posunúť-dopredu-pri-kliknutí/ortogonálne-posunutie-dopredu). Nemá to vzťah k "
|
||||
"vstupu do okna počas 'presuň a pusť' (pretože to má za následok zachytenie myši "
|
||||
"aplikáciou)"
|
||||
"limitu, ktorý je spustený nezachyteným vstupom myši v režimoch aktivácie "
|
||||
"'sloppy' alebo 'mouse'\". Nemá to vzťah k správaniu sa klikania (t.j. nemá "
|
||||
"to vzťah k posunúť-dopredu-pri-kliknutí/ortogonálne-posunutie-dopredu). Nemá "
|
||||
"to vzťah k vstupu do okna počas 'presuň a pusť' (pretože to má za následok "
|
||||
"zachytenie myši aplikáciou)"
|
||||
|
||||
#: ../src/metacity.schemas.in.h:18
|
||||
msgid ""
|
||||
@@ -1999,12 +2003,12 @@ msgstr ""
|
||||
msgid "%d stored in GConf key %s is out of range 0 to %d\n"
|
||||
msgstr "Hodnota %d uložená v GConf kľúči %s nie je v rozsahu od 0 do %d\n"
|
||||
|
||||
#: ../src/prefs.c:1589
|
||||
#: ../src/prefs.c:1595
|
||||
#, c-format
|
||||
msgid "Error setting number of workspaces to %d: %s\n"
|
||||
msgstr "Chyba pri nastavovaní počtu pracovných plôch na %d: %s\n"
|
||||
|
||||
#: ../src/prefs.c:1833
|
||||
#: ../src/prefs.c:1839
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||
@@ -2013,7 +2017,7 @@ msgstr ""
|
||||
"V konfiguračnej databázi nájdené \"%s\", čo nie je platná hodnota pre "
|
||||
"klávesovú skratku \"%s\".\n"
|
||||
|
||||
#: ../src/prefs.c:2187
|
||||
#: ../src/prefs.c:2193
|
||||
#, c-format
|
||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||
msgstr "Chyba pri nastavovaní mena pracovnej plochy %d na \"%s\": %s\n"
|
||||
@@ -2023,12 +2027,12 @@ msgstr "Chyba pri nastavovaní mena pracovnej plochy %d na \"%s\": %s\n"
|
||||
msgid "%d x %d"
|
||||
msgstr "%d x %d"
|
||||
|
||||
#: ../src/screen.c:409
|
||||
#: ../src/screen.c:403
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Obrazovka %d na displeji '%s' nie je platná\n"
|
||||
|
||||
#: ../src/screen.c:425
|
||||
#: ../src/screen.c:419
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||
@@ -2037,7 +2041,7 @@ msgstr ""
|
||||
"Obrazovka %d na displeji \"%s\" už má správcu okien. Skúste použiť prepínač "
|
||||
"--replace, aby sa aktuálny správca predefinoval.\n"
|
||||
|
||||
#: ../src/screen.c:449
|
||||
#: ../src/screen.c:443
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
@@ -2045,80 +2049,80 @@ msgstr ""
|
||||
"Nepodarilo sa získať výber správcu okien pre obrazovku %d na displeji \"%s"
|
||||
"\".\n"
|
||||
|
||||
#: ../src/screen.c:507
|
||||
#: ../src/screen.c:501
|
||||
#, c-format
|
||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
||||
msgstr "Obrazovka %d na displeji \"%s\" už má správcu okien\n"
|
||||
|
||||
#: ../src/screen.c:717
|
||||
#: ../src/screen.c:712
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "Nepodarilo sa uvoľniť obrazovku %d na displeji \"%s\"\n"
|
||||
|
||||
#: ../src/session.c:885 ../src/session.c:892
|
||||
#: ../src/session.c:844 ../src/session.c:851
|
||||
#, c-format
|
||||
msgid "Could not create directory '%s': %s\n"
|
||||
msgstr "Nepodarilo sa vytvoriť priečinok '%s': %s\n"
|
||||
|
||||
#: ../src/session.c:902
|
||||
#: ../src/session.c:861
|
||||
#, c-format
|
||||
msgid "Could not open session file '%s' for writing: %s\n"
|
||||
msgstr "Nepodarilo sa otvoriť súbor sedenia '%s' pre zápis: %s\n"
|
||||
|
||||
#: ../src/session.c:1054
|
||||
#: ../src/session.c:1013
|
||||
#, c-format
|
||||
msgid "Error writing session file '%s': %s\n"
|
||||
msgstr "Chyba pri zápise súboru sedenia '%s': %s\n"
|
||||
|
||||
#: ../src/session.c:1059
|
||||
#: ../src/session.c:1018
|
||||
#, c-format
|
||||
msgid "Error closing session file '%s': %s\n"
|
||||
msgstr "Chyba pri zatváraní súboru sedenia '%s': %s\n"
|
||||
|
||||
#: ../src/session.c:1134
|
||||
#: ../src/session.c:1093
|
||||
#, c-format
|
||||
msgid "Failed to read saved session file %s: %s\n"
|
||||
msgstr "Nepodarilo sa prečítať uložený súbor sedenia %s: %s\n"
|
||||
|
||||
#: ../src/session.c:1169
|
||||
#: ../src/session.c:1128
|
||||
#, c-format
|
||||
msgid "Failed to parse saved session file: %s\n"
|
||||
msgstr "Nepodarilo sa spracovať uložený súbor sedenia: %s\n"
|
||||
|
||||
#: ../src/session.c:1218
|
||||
#: ../src/session.c:1177
|
||||
msgid "<metacity_session> attribute seen but we already have the session ID"
|
||||
msgstr "Nájdený atribút <metacity_session>, ale ID sedenia už je nastavené"
|
||||
|
||||
#: ../src/session.c:1231
|
||||
#: ../src/session.c:1190
|
||||
#, c-format
|
||||
msgid "Unknown attribute %s on <metacity_session> element"
|
||||
msgstr "Neznámy atribút %s v elemente <metacity_session>"
|
||||
|
||||
#: ../src/session.c:1248
|
||||
#: ../src/session.c:1207
|
||||
msgid "nested <window> tag"
|
||||
msgstr "vnorená značka <window>"
|
||||
|
||||
#: ../src/session.c:1306 ../src/session.c:1338
|
||||
#: ../src/session.c:1265 ../src/session.c:1297
|
||||
#, c-format
|
||||
msgid "Unknown attribute %s on <window> element"
|
||||
msgstr "Neznámy atribúť %s v elemente <window>"
|
||||
|
||||
#: ../src/session.c:1410
|
||||
#: ../src/session.c:1369
|
||||
#, c-format
|
||||
msgid "Unknown attribute %s on <maximized> element"
|
||||
msgstr "Neznámy atribút %s v elemente <maximized>"
|
||||
|
||||
#: ../src/session.c:1470
|
||||
#: ../src/session.c:1429
|
||||
#, c-format
|
||||
msgid "Unknown attribute %s on <geometry> element"
|
||||
msgstr "Neznámy atribúť %s v elemente <geometry>"
|
||||
|
||||
#: ../src/session.c:1490
|
||||
#: ../src/session.c:1449
|
||||
#, c-format
|
||||
msgid "Unknown element %s"
|
||||
msgstr "Neznámy element %s"
|
||||
|
||||
#: ../src/session.c:1962
|
||||
#: ../src/session.c:1921
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Error launching metacity-dialog to warn about apps that don't support "
|
||||
@@ -3113,34 +3117,34 @@ msgstr "Používateľské konštanty musia začítať veľkým písmenom, \"%s\"
|
||||
msgid "Constant \"%s\" has already been defined"
|
||||
msgstr "Konštanta \"%s\" už je definovaná"
|
||||
|
||||
#: ../src/util.c:94
|
||||
#: ../src/util.c:95
|
||||
#, c-format
|
||||
msgid "Failed to open debug log: %s\n"
|
||||
msgstr "Nepodarilo sa otvoriť záznam pre ladenie: %s\n"
|
||||
|
||||
#: ../src/util.c:104
|
||||
#: ../src/util.c:105
|
||||
#, c-format
|
||||
msgid "Failed to fdopen() log file %s: %s\n"
|
||||
msgstr "Nepodarilo sa otvoriť súbor so záznamom pomocou fdopen() %s: %s\n"
|
||||
|
||||
#: ../src/util.c:110
|
||||
#: ../src/util.c:111
|
||||
#, c-format
|
||||
msgid "Opened log file %s\n"
|
||||
msgstr "Otvorený súbor so záznamom %s\n"
|
||||
|
||||
#: ../src/util.c:218
|
||||
#: ../src/util.c:219
|
||||
msgid "Window manager: "
|
||||
msgstr "Správca okien:"
|
||||
|
||||
#: ../src/util.c:364
|
||||
#: ../src/util.c:365
|
||||
msgid "Bug in window manager: "
|
||||
msgstr "Chyba v správcovi okien:"
|
||||
|
||||
#: ../src/util.c:393
|
||||
#: ../src/util.c:394
|
||||
msgid "Window manager warning: "
|
||||
msgstr "Varovanie správcu okien:"
|
||||
|
||||
#: ../src/util.c:417
|
||||
#: ../src/util.c:418
|
||||
msgid "Window manager error: "
|
||||
msgstr "Chyba správcu okien:"
|
||||
|
||||
@@ -3150,7 +3154,7 @@ msgid "Application set a bogus _NET_WM_PID %ld\n"
|
||||
msgstr "Aplikácia nastavila neplatné _NET_WM_PID %ld\n"
|
||||
|
||||
#. first time through
|
||||
#: ../src/window.c:5209
|
||||
#: ../src/window.c:5238
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@@ -3166,7 +3170,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/window.c:5880
|
||||
#: ../src/window.c:5878
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size %"
|
||||
|
1616
po/sr@Latn.po
1616
po/sr@Latn.po
File diff suppressed because it is too large
Load Diff
1204
po/zh_CN.po
1204
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
2830
po/zh_HK.po
Normal file
2830
po/zh_HK.po
Normal file
File diff suppressed because it is too large
Load Diff
1690
po/zh_TW.po
1690
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -39,10 +39,22 @@ workspace wrapping:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=89315
|
||||
|
||||
raise windows on click:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=326156
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=86108
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=115072
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=115753
|
||||
|
||||
Pointer warping:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=134353
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=134352
|
||||
(Think about tasklist & window selector too; this would be a very bad idea)
|
||||
|
||||
|
||||
Bugs for easy dupe-finding that seem to be hard to find otherwise:
|
||||
===
|
||||
Applications opening in wrong workspace:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=160687
|
||||
|
||||
|
||||
Tracking bugs
|
||||
====
|
||||
@@ -60,3 +72,8 @@ moving/resizing (constraints): http://bugzilla.gnome.org/show_bug.cgi?id=155458
|
||||
window placement: http://bugzilla.gnome.org/show_bug.cgi?id=155460
|
||||
logout/system-monitor keys: http://bugzilla.gnome.org/show_bug.cgi?id=155462
|
||||
modal dialogs: http://bugzilla.gnome.org/show_bug.cgi?id=164841
|
||||
multi-head sans xinerama: http://bugzilla.gnome.org/show_bug.cgi?id=324772
|
||||
xinerama: http://bugzilla.gnome.org/show_bug.cgi?id=324773
|
||||
output-only windows: http://bugzilla.gnome.org/show_bug.cgi?id=340584
|
||||
allowed actions/window-type: http://bugzilla.gnome.org/show_bug.cgi?id=340682
|
||||
EWMH/ICCCM compliance: http://bugzilla.gnome.org/show_bug.cgi?id=340691
|
||||
|
@@ -2,11 +2,7 @@ lib_LTLIBRARIES = libmetacity-private.la
|
||||
|
||||
SUBDIRS=wm-tester tools themes
|
||||
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DMETACITY_LIBDIR=\"$(libdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
|
||||
EGGFILES= \
|
||||
eggaccelerators.c \
|
||||
eggaccelerators.h
|
||||
INCLUDES=@METACITY_CFLAGS@ -DMETACITY_LIBEXECDIR=\"$(libexecdir)\" -DHOST_ALIAS=\"@HOST_ALIAS@\" -DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DMETACITY_PKGDATADIR=\"$(pkgdatadir)\" -DMETACITY_DATADIR=\"$(datadir)\" -DG_LOG_DOMAIN=\"metacity\" -DSN_API_NOT_YET_FROZEN=1
|
||||
|
||||
metacity_SOURCES= \
|
||||
async-getprop.c \
|
||||
@@ -16,6 +12,10 @@ metacity_SOURCES= \
|
||||
boxes.h \
|
||||
boxes.c \
|
||||
common.h \
|
||||
c-screen.c \
|
||||
c-screen.h \
|
||||
c-window.c \
|
||||
c-window.h \
|
||||
compositor.c \
|
||||
compositor.h \
|
||||
constraints.c \
|
||||
@@ -70,6 +70,8 @@ metacity_SOURCES= \
|
||||
screen.h \
|
||||
session.c \
|
||||
session.h \
|
||||
spring-model.c \
|
||||
spring-model.h \
|
||||
stack.c \
|
||||
stack.h \
|
||||
tabpopup.c \
|
||||
@@ -91,13 +93,14 @@ metacity_SOURCES= \
|
||||
workspace.c \
|
||||
workspace.h \
|
||||
xprops.c \
|
||||
xprops.h \
|
||||
$(EGGFILES)
|
||||
xprops.h
|
||||
|
||||
# by setting libmetacity_private_la_CFLAGS, the files shared with
|
||||
# metacity proper will be compiled with different names.
|
||||
libmetacity_private_la_CFLAGS =
|
||||
libmetacity_private_la_SOURCES= \
|
||||
boxes.c \
|
||||
boxes.h \
|
||||
gradient.c \
|
||||
gradient.h \
|
||||
preview-widget.c \
|
||||
@@ -116,6 +119,7 @@ libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
||||
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
|
||||
|
||||
libmetacityinclude_HEADERS = \
|
||||
boxes.h \
|
||||
common.h \
|
||||
gradient.h \
|
||||
preview-widget.h \
|
||||
@@ -184,13 +188,6 @@ pkgconfig_DATA = libmetacity-private.pc
|
||||
|
||||
EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) $(schema_DATA) \
|
||||
update-from-egg.sh \
|
||||
$(desktopfiles_in_files) \
|
||||
$(schema_in_files) \
|
||||
libmetacity-private.pc.in
|
||||
|
||||
|
||||
EGGDIR=$(srcdir)/../../libegg/libegg
|
||||
|
||||
regenerate-built-sources:
|
||||
EGGFILES="$(EGGFILES)" EGGDIR="$(EGGDIR)" $(srcdir)/update-from-egg.sh
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity misc. public entry points */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Asynchronous X property getting hack */
|
||||
|
||||
/*
|
||||
@@ -66,7 +68,7 @@ struct _AgGetPropertyTask
|
||||
|
||||
unsigned long n_items;
|
||||
unsigned long bytes_after;
|
||||
unsigned char *data;
|
||||
char *data;
|
||||
|
||||
Bool have_reply;
|
||||
};
|
||||
@@ -316,7 +318,7 @@ async_get_property_handler (Display *dpy,
|
||||
/* there's padding to word boundary */
|
||||
netbytes = ALIGN_VALUE (nbytes, 4);
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
(task->data = (char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
{
|
||||
#ifdef DEBUG_SPEW
|
||||
printf ("%s: already read %d bytes using %ld, more eating %ld more\n",
|
||||
@@ -334,7 +336,7 @@ async_get_property_handler (Display *dpy,
|
||||
netbytes = reply->nItems << 1;
|
||||
netbytes = ALIGN_VALUE (netbytes, 4); /* align to word boundary */
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
(task->data = (char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
{
|
||||
#ifdef DEBUG_SPEW
|
||||
printf ("%s: already read %d bytes using %ld more, eating %ld more\n",
|
||||
@@ -351,7 +353,7 @@ async_get_property_handler (Display *dpy,
|
||||
nbytes = reply->nItems * sizeof (long);
|
||||
netbytes = reply->nItems << 2; /* wire size is always 32 bits though */
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
(task->data = (char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
{
|
||||
#ifdef DEBUG_SPEW
|
||||
printf ("%s: already read %d bytes using %ld more, eating %ld more\n",
|
||||
@@ -363,9 +365,9 @@ async_get_property_handler (Display *dpy,
|
||||
*/
|
||||
if (sizeof (long) == 8)
|
||||
{
|
||||
unsigned char *netdata;
|
||||
unsigned char *lptr;
|
||||
unsigned char *end_lptr;
|
||||
char *netdata;
|
||||
char *lptr;
|
||||
char *end_lptr;
|
||||
|
||||
/* Store the 32-bit values in the end of the array */
|
||||
netdata = task->data + nbytes / 2;
|
||||
@@ -522,7 +524,6 @@ ag_task_create (Display *dpy,
|
||||
{
|
||||
AgGetPropertyTask *task;
|
||||
xGetPropertyReq *req;
|
||||
xError error;
|
||||
AgPerDisplayData *dd;
|
||||
|
||||
/* Fire up our request */
|
||||
@@ -543,8 +544,6 @@ ag_task_create (Display *dpy,
|
||||
req->longOffset = offset;
|
||||
req->longLength = length;
|
||||
|
||||
error.sequenceNumber = dpy->request;
|
||||
|
||||
/* Queue up our async task */
|
||||
task = Xcalloc (1, sizeof (AgGetPropertyTask));
|
||||
if (task == NULL)
|
||||
@@ -587,7 +586,7 @@ ag_task_get_reply_and_free (AgGetPropertyTask *task,
|
||||
int *actual_format,
|
||||
unsigned long *nitems,
|
||||
unsigned long *bytesafter,
|
||||
unsigned char **prop)
|
||||
char **prop)
|
||||
{
|
||||
Display *dpy;
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Asynchronous X property getting hack */
|
||||
|
||||
/*
|
||||
@@ -45,7 +47,7 @@ Status ag_task_get_reply_and_free (AgGetPropertyTask *task,
|
||||
int *actual_format,
|
||||
unsigned long *nitems,
|
||||
unsigned long *bytesafter,
|
||||
unsigned char **prop);
|
||||
char **prop);
|
||||
|
||||
Bool ag_task_have_reply (AgGetPropertyTask *task);
|
||||
Atom ag_task_get_property (AgGetPropertyTask *task);
|
||||
|
@@ -1,8 +1,10 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity visual bell */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Sun Microsystems Inc.
|
||||
* Copyright (C) 2005 Elijah Newren
|
||||
* Copyright (C) 2005, 2006 Elijah Newren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -252,5 +254,5 @@ void
|
||||
meta_bell_notify_frame_destroy (MetaFrame *frame)
|
||||
{
|
||||
if (frame->is_flashing)
|
||||
g_idle_remove_by_data (frame);
|
||||
g_source_remove_by_funcs_user_data (&g_timeout_funcs, frame);
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/* Metacity visual bell */
|
||||
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2002 Sun Microsystems Inc.
|
||||
*
|
||||
|
166
src/boxes.c
166
src/boxes.c
@@ -1,7 +1,9 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Simple box operations */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2005 Elijah Newren
|
||||
* Copyright (C) 2005, 2006 Elijah Newren
|
||||
* [meta_rectangle_intersect() is copyright the GTK+ Team according to Havoc,
|
||||
* see gdkrectangle.c. As far as Havoc knows, he probably wrote
|
||||
* meta_rectangle_equal(), and I'm guessing it's (C) Red Hat. So...]
|
||||
@@ -55,11 +57,12 @@ meta_rectangle_region_to_string (GList *region,
|
||||
*/
|
||||
char rect_string[RECT_LENGTH];
|
||||
|
||||
GList *tmp = region;
|
||||
char *cur = output;
|
||||
|
||||
if (region == NULL)
|
||||
snprintf (output, 10, "(EMPTY)");
|
||||
|
||||
char *cur = output;
|
||||
GList *tmp = region;
|
||||
while (tmp)
|
||||
{
|
||||
MetaRectangle *rect = tmp->data;
|
||||
@@ -107,11 +110,12 @@ meta_rectangle_edge_list_to_string (GList *edge_list,
|
||||
*/
|
||||
char rect_string[EDGE_LENGTH];
|
||||
|
||||
char *cur = output;
|
||||
GList *tmp = edge_list;
|
||||
|
||||
if (edge_list == NULL)
|
||||
snprintf (output, 10, "(EMPTY)");
|
||||
|
||||
char *cur = output;
|
||||
GList *tmp = edge_list;
|
||||
while (tmp)
|
||||
{
|
||||
MetaEdge *edge = tmp->data;
|
||||
@@ -620,15 +624,38 @@ meta_rectangle_expand_region (GList *region,
|
||||
const int top_expand,
|
||||
const int bottom_expand)
|
||||
{
|
||||
/* Now it's time to do the directional expansion */
|
||||
return meta_rectangle_expand_region_conditionally (region,
|
||||
left_expand,
|
||||
right_expand,
|
||||
top_expand,
|
||||
bottom_expand,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
|
||||
GList*
|
||||
meta_rectangle_expand_region_conditionally (GList *region,
|
||||
const int left_expand,
|
||||
const int right_expand,
|
||||
const int top_expand,
|
||||
const int bottom_expand,
|
||||
const int min_x,
|
||||
const int min_y)
|
||||
{
|
||||
GList *tmp_list = region;
|
||||
while (tmp_list)
|
||||
{
|
||||
MetaRectangle *rect = (MetaRectangle*) tmp_list->data;
|
||||
rect->x -= left_expand;
|
||||
rect->width += (left_expand + right_expand);
|
||||
rect->y -= top_expand;
|
||||
rect->height += (top_expand + bottom_expand);
|
||||
if (rect->width >= min_x)
|
||||
{
|
||||
rect->x -= left_expand;
|
||||
rect->width += (left_expand + right_expand);
|
||||
}
|
||||
if (rect->height >= min_y)
|
||||
{
|
||||
rect->y -= top_expand;
|
||||
rect->height += (top_expand + bottom_expand);
|
||||
}
|
||||
tmp_list = tmp_list->next;
|
||||
}
|
||||
|
||||
@@ -680,6 +707,25 @@ meta_rectangle_contained_in_region (const GList *spanning_rects,
|
||||
return contained;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_rectangle_overlaps_with_region (const GList *spanning_rects,
|
||||
const MetaRectangle *rect)
|
||||
{
|
||||
const GList *temp;
|
||||
gboolean overlaps;
|
||||
|
||||
temp = spanning_rects;
|
||||
overlaps = FALSE;
|
||||
while (!overlaps && temp != NULL)
|
||||
{
|
||||
overlaps = overlaps || meta_rectangle_overlap (temp->data, rect);
|
||||
temp = temp->next;
|
||||
}
|
||||
|
||||
return overlaps;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_rectangle_clamp_to_fit_into_region (const GList *spanning_rects,
|
||||
FixedDirections fixed_directions,
|
||||
@@ -1010,6 +1056,30 @@ meta_rectangle_find_linepoint_closest_to_point (double x1,
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
gboolean
|
||||
meta_rectangle_edge_aligns (const MetaRectangle *rect, const MetaEdge *edge)
|
||||
{
|
||||
/* The reason for the usage of <= below instead of < is because we are
|
||||
* interested in in-the-way-or-adject'ness. So, a left (i.e. vertical
|
||||
* edge) occupying y positions 0-9 (which has a y of 0 and a height of
|
||||
* 10) and a rectangle with top at y=10 would be considered to "align" by
|
||||
* this function.
|
||||
*/
|
||||
switch (edge->side_type)
|
||||
{
|
||||
case META_DIRECTION_LEFT:
|
||||
case META_DIRECTION_RIGHT:
|
||||
return BOX_TOP (*rect) <= BOX_BOTTOM (edge->rect) &&
|
||||
BOX_TOP (edge->rect) <= BOX_BOTTOM (*rect);
|
||||
case META_DIRECTION_TOP:
|
||||
case META_DIRECTION_BOTTOM:
|
||||
return BOX_LEFT (*rect) <= BOX_RIGHT (edge->rect) &&
|
||||
BOX_LEFT (edge->rect) <= BOX_RIGHT (*rect);
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
static GList*
|
||||
get_rect_minus_overlap (const GList *rect_in_list,
|
||||
MetaRectangle *overlap)
|
||||
@@ -1065,8 +1135,7 @@ replace_rect_with_list (GList *old_element,
|
||||
if (!new_list)
|
||||
{
|
||||
/* If there is no new list, just remove the old_element */
|
||||
ret = old_element->next;
|
||||
g_list_remove_link (old_element, old_element);
|
||||
ret = g_list_remove_link (old_element, old_element);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1173,6 +1242,49 @@ get_disjoint_strut_list_in_region (const GSList *old_struts,
|
||||
return struts;
|
||||
}
|
||||
|
||||
gint
|
||||
meta_rectangle_edge_cmp_ignore_type (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
const MetaEdge *a_edge_rect = (gconstpointer) a;
|
||||
const MetaEdge *b_edge_rect = (gconstpointer) b;
|
||||
int a_compare, b_compare;
|
||||
|
||||
/* Edges must be both vertical or both horizontal, or it doesn't make
|
||||
* sense to compare them.
|
||||
*/
|
||||
g_assert ((a_edge_rect->rect.width == 0 && b_edge_rect->rect.width == 0) ||
|
||||
(a_edge_rect->rect.height == 0 && b_edge_rect->rect.height == 0));
|
||||
|
||||
a_compare = b_compare = 0; /* gcc-3.4.2 sucks at figuring initialized'ness */
|
||||
|
||||
if (a_edge_rect->side_type == META_DIRECTION_LEFT ||
|
||||
a_edge_rect->side_type == META_DIRECTION_RIGHT)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.x;
|
||||
b_compare = b_edge_rect->rect.x;
|
||||
if (a_compare == b_compare)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.y;
|
||||
b_compare = b_edge_rect->rect.y;
|
||||
}
|
||||
}
|
||||
else if (a_edge_rect->side_type == META_DIRECTION_TOP ||
|
||||
a_edge_rect->side_type == META_DIRECTION_BOTTOM)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.y;
|
||||
b_compare = b_edge_rect->rect.y;
|
||||
if (a_compare == b_compare)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.x;
|
||||
b_compare = b_edge_rect->rect.x;
|
||||
}
|
||||
}
|
||||
else
|
||||
g_assert ("Some idiot wanted to sort sides of different types.\n");
|
||||
|
||||
return a_compare - b_compare; /* positive value denotes a > b ... */
|
||||
}
|
||||
|
||||
/* To make things easily testable, provide a nice way of sorting edges */
|
||||
gint
|
||||
meta_rectangle_edge_cmp (gconstpointer a, gconstpointer b)
|
||||
@@ -1186,32 +1298,7 @@ meta_rectangle_edge_cmp (gconstpointer a, gconstpointer b)
|
||||
b_compare = b_edge_rect->side_type;
|
||||
|
||||
if (a_compare == b_compare)
|
||||
{
|
||||
if (a_edge_rect->side_type == META_DIRECTION_LEFT ||
|
||||
a_edge_rect->side_type == META_DIRECTION_RIGHT)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.x;
|
||||
b_compare = b_edge_rect->rect.x;
|
||||
if (a_compare == b_compare)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.y;
|
||||
b_compare = b_edge_rect->rect.y;
|
||||
}
|
||||
}
|
||||
else if (a_edge_rect->side_type == META_DIRECTION_TOP ||
|
||||
a_edge_rect->side_type == META_DIRECTION_BOTTOM)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.y;
|
||||
b_compare = b_edge_rect->rect.y;
|
||||
if (a_compare == b_compare)
|
||||
{
|
||||
a_compare = a_edge_rect->rect.x;
|
||||
b_compare = b_edge_rect->rect.x;
|
||||
}
|
||||
}
|
||||
else
|
||||
g_assert ("Some idiot wanted to sort sides of different types.\n");
|
||||
}
|
||||
return meta_rectangle_edge_cmp_ignore_type (a, b);
|
||||
|
||||
return a_compare - b_compare; /* positive value denotes a > b ... */
|
||||
}
|
||||
@@ -1453,11 +1540,12 @@ fix_up_edges (MetaRectangle *strut, MetaEdge *edge,
|
||||
/* If this is the edge that overlaps, then we need to split it */
|
||||
if (edges_overlap (cur, &overlap))
|
||||
{
|
||||
GList *delete_me = tmp;
|
||||
|
||||
/* Split this edge into some new ones */
|
||||
*strut_edges = split_edge (*strut_edges, cur, &overlap);
|
||||
|
||||
/* Delete the old one */
|
||||
GList *delete_me = tmp;
|
||||
tmp = tmp->next;
|
||||
g_free (cur);
|
||||
*strut_edges = g_list_delete_link (*strut_edges, delete_me);
|
||||
|
31
src/boxes.h
31
src/boxes.h
@@ -1,7 +1,9 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Simple box operations */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2005 Elijah Newren
|
||||
* Copyright (C) 2005, 2006 Elijah Newren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -146,11 +148,23 @@ GList* meta_rectangle_get_minimal_spanning_set_for_region (
|
||||
const MetaRectangle *basic_rect,
|
||||
const GSList *all_struts);
|
||||
|
||||
/* Expand all rectangles in region by the given amount on each side */
|
||||
GList* meta_rectangle_expand_region (GList *region,
|
||||
const int left_expand,
|
||||
const int right_expand,
|
||||
const int top_expand,
|
||||
const int bottom_expand);
|
||||
/* Same as for meta_rectangle_expand_region except that rectangles not at
|
||||
* least min_x or min_y in size are not expanded in that direction
|
||||
*/
|
||||
GList* meta_rectangle_expand_region_conditionally (
|
||||
GList *region,
|
||||
const int left_expand,
|
||||
const int right_expand,
|
||||
const int top_expand,
|
||||
const int bottom_expand,
|
||||
const int min_x,
|
||||
const int min_y);
|
||||
|
||||
/* Free the list created by
|
||||
* meta_rectangle_get_minimal_spanning_set_for_region()
|
||||
@@ -171,6 +185,9 @@ gboolean meta_rectangle_could_fit_in_region (
|
||||
gboolean meta_rectangle_contained_in_region (
|
||||
const GList *spanning_rects,
|
||||
const MetaRectangle *rect);
|
||||
gboolean meta_rectangle_overlaps_with_region (
|
||||
const GList *spanning_rects,
|
||||
const MetaRectangle *rect);
|
||||
|
||||
/* Make the rectangle small enough to fit into one of the spanning_rects,
|
||||
* but make it no smaller than min_size.
|
||||
@@ -211,11 +228,23 @@ void meta_rectangle_find_linepoint_closest_to_point (double x1, double y1,
|
||||
/* */
|
||||
/***************************************************************************/
|
||||
|
||||
/* Return whether an edge overlaps or is adjacent to the rectangle in the
|
||||
* nonzero-width dimension of the edge.
|
||||
*/
|
||||
gboolean meta_rectangle_edge_aligns (const MetaRectangle *rect,
|
||||
const MetaEdge *edge);
|
||||
|
||||
/* Compare two edges, so that sorting functions can put a list of edges in
|
||||
* canonical order.
|
||||
*/
|
||||
gint meta_rectangle_edge_cmp (gconstpointer a, gconstpointer b);
|
||||
|
||||
/* Compare two edges, so that sorting functions can put a list of edges in
|
||||
* order. This function doesn't separate left edges first, then right edges,
|
||||
* etc., but rather compares only upon location.
|
||||
*/
|
||||
gint meta_rectangle_edge_cmp_ignore_type (gconstpointer a, gconstpointer b);
|
||||
|
||||
/* Removes an parts of edges in the given list that intersect any box in the
|
||||
* given rectangle list. Returns the result.
|
||||
*/
|
||||
|
679
src/c-screen.c
Normal file
679
src/c-screen.c
Normal file
@@ -0,0 +1,679 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef HAVE_COMPOSITE_EXTENSIONS
|
||||
#include <cm/ws.h>
|
||||
#include <cm/stacker.h>
|
||||
#include <cm/wsint.h>
|
||||
#include <cm/drawable-node.h>
|
||||
#include <cm/state.h>
|
||||
#include <cm/magnifier.h>
|
||||
#include <cm/square.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "screen.h"
|
||||
#include "c-screen.h"
|
||||
#include "c-window.h"
|
||||
|
||||
struct MetaCompScreen
|
||||
{
|
||||
WsDisplay *display;
|
||||
CmStacker *stacker;
|
||||
CmMagnifier *magnifier;
|
||||
|
||||
WsWindow *gl_window;
|
||||
WsWindow *root_window;
|
||||
|
||||
WsScreen *screen;
|
||||
MetaScreen *meta_screen;
|
||||
|
||||
int repaint_id;
|
||||
int idle_id;
|
||||
|
||||
WsWindow *selection_window;
|
||||
|
||||
GHashTable *windows_by_xid;
|
||||
};
|
||||
|
||||
static MetaCompWindow *
|
||||
meta_comp_window_lookup (MetaCompScreen *info,
|
||||
Window xid)
|
||||
{
|
||||
MetaCompWindow *window;
|
||||
|
||||
window = g_hash_table_lookup (info->windows_by_xid, (gpointer)xid);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
MetaCompWindow *
|
||||
meta_comp_screen_lookup_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
return meta_comp_window_lookup (info, xwindow);
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
update_frame_counter (void)
|
||||
{
|
||||
#define BUFSIZE 128
|
||||
static GTimer *timer;
|
||||
static double buffer [BUFSIZE];
|
||||
static int next = 0;
|
||||
|
||||
if (!timer)
|
||||
timer = g_timer_new ();
|
||||
|
||||
buffer[next++] = g_timer_elapsed (timer, NULL);
|
||||
|
||||
if (next == BUFSIZE)
|
||||
{
|
||||
int i;
|
||||
double total;
|
||||
|
||||
next = 0;
|
||||
|
||||
total = 0.0;
|
||||
for (i = 1; i < BUFSIZE; ++i)
|
||||
total += buffer[i] - buffer[i - 1];
|
||||
|
||||
g_print ("frames per second: %f\n", 1 / (total / (BUFSIZE - 1)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
dump_stacking_order (GList *nodes)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = nodes; list != NULL; list = list->next)
|
||||
{
|
||||
CmDrawableNode *node = list->data;
|
||||
|
||||
if (node)
|
||||
g_print ("%lx, ", WS_RESOURCE_XID (node->drawable));
|
||||
}
|
||||
g_print ("\n");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
repaint (gpointer data)
|
||||
{
|
||||
MetaCompScreen *info = data;
|
||||
CmState *state;
|
||||
#if 0
|
||||
g_print ("repaint\n");
|
||||
#endif
|
||||
glViewport (0, 0,
|
||||
info->meta_screen->rect.width,
|
||||
info->meta_screen->rect.height);
|
||||
|
||||
glLoadIdentity();
|
||||
|
||||
#if 0
|
||||
glClearColor (0, 0, 0, 1.0);
|
||||
glClear (GL_COLOR_BUFFER_BIT);
|
||||
#endif
|
||||
|
||||
ws_window_raise (info->gl_window);
|
||||
|
||||
#if 0
|
||||
glDisable (GL_TEXTURE_2D);
|
||||
glDisable (GL_TEXTURE_RECTANGLE_ARB);
|
||||
glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
|
||||
glColor4f (0.0, 1.0, 0.0, 1.0);
|
||||
glRectf (-1.0, -1.0, 1.0, 1.0);
|
||||
glFinish();
|
||||
#endif
|
||||
|
||||
state = cm_state_new ();
|
||||
|
||||
cm_state_disable_depth_buffer_update (state);
|
||||
|
||||
cm_node_render (CM_NODE (info->magnifier), state);
|
||||
|
||||
cm_state_enable_depth_buffer_update (state);
|
||||
|
||||
g_object_unref (state);
|
||||
|
||||
ws_window_gl_swap_buffers (info->gl_window);
|
||||
glFinish();
|
||||
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
info->idle_id = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static MetaCompWindow *
|
||||
find_comp_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
return meta_comp_window_lookup (info, xwindow);
|
||||
}
|
||||
|
||||
static CmNode *
|
||||
find_node (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (window)
|
||||
return meta_comp_window_get_node (window);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static GList *all_screen_infos;
|
||||
|
||||
MetaCompScreen *
|
||||
meta_comp_screen_get_by_xwindow (Window xwindow)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = all_screen_infos; list != NULL; list = list->next)
|
||||
{
|
||||
MetaCompScreen *info = list->data;
|
||||
|
||||
if (find_node (info, xwindow))
|
||||
return info;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MetaCompScreen *
|
||||
meta_comp_screen_new (WsDisplay *display,
|
||||
MetaScreen *screen)
|
||||
{
|
||||
MetaCompScreen *scr_info = g_new0 (MetaCompScreen, 1);
|
||||
|
||||
scr_info->screen = ws_display_get_screen_from_number (
|
||||
display, screen->number);
|
||||
scr_info->root_window = ws_screen_get_root_window (scr_info->screen);
|
||||
scr_info->display = display;
|
||||
scr_info->meta_screen = screen;
|
||||
scr_info->windows_by_xid = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
|
||||
all_screen_infos = g_list_prepend (all_screen_infos, scr_info);
|
||||
|
||||
return scr_info;
|
||||
}
|
||||
|
||||
static char *
|
||||
make_selection_name (MetaCompScreen *info)
|
||||
{
|
||||
char *buffer;
|
||||
|
||||
buffer = g_strdup_printf ("_NET_WM_CM_S%d", info->meta_screen->number);
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static void
|
||||
on_selection_clear (WsWindow *window,
|
||||
WsSelectionClearEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
MetaCompScreen *info = data;
|
||||
char *buffer = make_selection_name (info);
|
||||
|
||||
if (strcmp (event->selection, buffer))
|
||||
{
|
||||
/* We lost the selection */
|
||||
meta_comp_screen_unredirect (info);
|
||||
}
|
||||
}
|
||||
|
||||
static WsWindow *
|
||||
claim_selection (MetaCompScreen *info)
|
||||
{
|
||||
WsWindow *window = ws_window_new (info->root_window);
|
||||
char *buffer = make_selection_name (info);
|
||||
|
||||
#if 0
|
||||
g_print ("selection window: %lx\n", WS_RESOURCE_XID (window));
|
||||
#endif
|
||||
|
||||
ws_window_own_selection (window, buffer, WS_CURRENT_TIME);
|
||||
|
||||
g_signal_connect (window, "selection_clear_event", G_CALLBACK (on_selection_clear), info);
|
||||
|
||||
g_free (buffer);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
static void
|
||||
queue_paint (CmNode *node,
|
||||
MetaCompScreen *info)
|
||||
{
|
||||
#if 0
|
||||
g_print ("queueing %s\n", G_OBJECT_TYPE_NAME (node));
|
||||
#endif
|
||||
meta_comp_screen_queue_paint (info);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_redirect (MetaCompScreen *info)
|
||||
{
|
||||
WsWindow *root = ws_screen_get_root_window (info->screen);
|
||||
WsRectangle source;
|
||||
WsRectangle target;
|
||||
WsServerRegion *region;
|
||||
int screen_w;
|
||||
int screen_h;
|
||||
CmSquare *square;
|
||||
|
||||
#if 0
|
||||
g_print ("redirecting %lx\n", WS_RESOURCE_XID (root));
|
||||
#endif
|
||||
|
||||
ws_window_redirect_subwindows (root);
|
||||
info->gl_window = ws_screen_get_gl_window (info->screen);
|
||||
/* FIXME: This should probably happen in libcm */
|
||||
ws_window_set_override_redirect (info->gl_window, TRUE);
|
||||
region = ws_server_region_new (info->display);
|
||||
ws_window_set_input_shape (info->gl_window, region);
|
||||
g_object_unref (G_OBJECT (region));
|
||||
|
||||
ws_display_begin_error_trap (info->display);
|
||||
|
||||
ws_window_unredirect (info->gl_window);
|
||||
|
||||
ws_display_end_error_trap (info->display);
|
||||
|
||||
info->selection_window = claim_selection (info);
|
||||
|
||||
ws_window_map (info->gl_window);
|
||||
|
||||
info->stacker = cm_stacker_new ();
|
||||
|
||||
square = cm_square_new (0.3, 0.3, 0.8, 1.0);
|
||||
|
||||
cm_stacker_add_child (info->stacker, CM_NODE (square));
|
||||
|
||||
g_object_unref (square);
|
||||
|
||||
screen_w = ws_screen_get_width (info->screen);
|
||||
screen_h = ws_screen_get_height (info->screen);
|
||||
|
||||
#if 0
|
||||
g_print ("width: %d height %d\n", screen_w, screen_h);
|
||||
#endif
|
||||
|
||||
source.x = (screen_w - (screen_w / 4)) / 2;
|
||||
source.y = screen_h / 16;
|
||||
source.width = screen_w / 4;
|
||||
source.height = screen_h / 16;
|
||||
|
||||
target.x = 0;
|
||||
target.y = screen_h - screen_h / 4;
|
||||
target.width = screen_w;
|
||||
target.height = screen_h / 4;
|
||||
|
||||
info->magnifier = cm_magnifier_new (CM_NODE (info->stacker), &source, &target);
|
||||
|
||||
g_object_unref (info->stacker);
|
||||
|
||||
if (g_getenv ("USE_MAGNIFIER"))
|
||||
cm_magnifier_set_active (info->magnifier, TRUE);
|
||||
else
|
||||
cm_magnifier_set_active (info->magnifier, FALSE);
|
||||
|
||||
info->repaint_id =
|
||||
g_signal_connect (info->magnifier, "need_repaint",
|
||||
G_CALLBACK (queue_paint), info);
|
||||
|
||||
ws_display_sync (info->display);
|
||||
}
|
||||
|
||||
static void
|
||||
listify (gpointer key,
|
||||
gpointer value,
|
||||
gpointer data)
|
||||
{
|
||||
GList **windows = data;
|
||||
|
||||
*windows = g_list_prepend (*windows, (gpointer)value);
|
||||
}
|
||||
|
||||
static void
|
||||
free_all_windows (MetaCompScreen *info)
|
||||
{
|
||||
GList *windows = NULL, *list;
|
||||
|
||||
g_hash_table_foreach (info->windows_by_xid, listify, &windows);
|
||||
|
||||
for (list = windows; list != NULL; list = list->next)
|
||||
{
|
||||
MetaCompWindow *window = list->data;
|
||||
|
||||
meta_comp_window_free (window);
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unredirect (MetaCompScreen *info)
|
||||
{
|
||||
WsScreen *ws_screen = info->screen;
|
||||
WsWindow *root = ws_screen_get_root_window (ws_screen);
|
||||
|
||||
g_signal_handler_disconnect (info->magnifier, info->repaint_id);
|
||||
g_object_unref (info->magnifier);
|
||||
|
||||
ws_window_unredirect_subwindows (root);
|
||||
ws_screen_release_gl_window (ws_screen);
|
||||
|
||||
free_all_windows (info);
|
||||
|
||||
ws_display_sync (info->display);
|
||||
|
||||
/* FIXME: libcm needs a way to guarantee that a window is destroyed,
|
||||
* without relying on ref counting having it as a side effect
|
||||
*/
|
||||
g_object_unref (info->selection_window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_queue_paint (MetaCompScreen *info)
|
||||
{
|
||||
#if 0
|
||||
g_print ("queuing\n");
|
||||
#endif
|
||||
if (!info->idle_id)
|
||||
info->idle_id = g_idle_add (repaint, info);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_restack (MetaCompScreen *info,
|
||||
Window window,
|
||||
Window above_this)
|
||||
{
|
||||
MetaCompWindow *comp_window = find_comp_window (info, window);
|
||||
MetaCompWindow *above_comp_window = find_comp_window (info, above_this);
|
||||
CmNode *window_node = find_node (info, window);
|
||||
CmNode *above_node = find_node (info, above_this);
|
||||
|
||||
if ((comp_window && meta_comp_window_stack_frozen (comp_window)) ||
|
||||
(above_comp_window && meta_comp_window_stack_frozen (above_comp_window)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
if (window_node == above_node)
|
||||
return;
|
||||
|
||||
if (window_node && above_this == WS_RESOURCE_XID (info->gl_window))
|
||||
{
|
||||
cm_stacker_raise_child (info->stacker, window_node);
|
||||
}
|
||||
else if (window_node && above_this == None)
|
||||
{
|
||||
cm_stacker_lower_child (info->stacker, window_node);
|
||||
}
|
||||
else if (window_node && above_node)
|
||||
{
|
||||
cm_stacker_restack_child (info->stacker, window_node, above_node);
|
||||
}
|
||||
#if 0
|
||||
else
|
||||
g_print ("nothing happened\n");
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
g_print ("done restacking; new order:\n");
|
||||
#endif
|
||||
#if 0
|
||||
dump_stacking_order (info->stacker->children);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_raise_window (MetaCompScreen *info,
|
||||
Window window)
|
||||
{
|
||||
CmNode *node = find_node (info, window);
|
||||
|
||||
if (node)
|
||||
cm_stacker_raise_child (info->stacker, node);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
{
|
||||
WsRectangle rect;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
meta_comp_window_set_size (comp_window, &rect);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_child_titles (WsWindow *window)
|
||||
{
|
||||
GList *children = ws_window_query_subwindows (window);
|
||||
GList *list;
|
||||
int i;
|
||||
|
||||
g_print ("window: %lx %s\n", WS_RESOURCE_XID (window), ws_window_query_title (window));
|
||||
|
||||
i = 0;
|
||||
for (list = children; list != NULL; list = list->next)
|
||||
{
|
||||
WsWindow *child = list->data;
|
||||
|
||||
g_print (" %d adding: %lx %s\n", i++, WS_RESOURCE_XID (child), ws_window_query_title (child));
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaCompScreen *cscreen;
|
||||
XID xid;
|
||||
} DestroyData;
|
||||
|
||||
static void
|
||||
on_window_destroy (MetaCompWindow *comp_window,
|
||||
gpointer closure)
|
||||
{
|
||||
DestroyData *data = closure;
|
||||
CmNode *node = meta_comp_window_get_node (comp_window);
|
||||
|
||||
cm_stacker_remove_child (data->cscreen->stacker, node);
|
||||
g_hash_table_remove (data->cscreen->windows_by_xid, (gpointer)data->xid);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_add_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
WsDrawable *drawable;
|
||||
MetaCompWindow *comp_window;
|
||||
DestroyData *data;
|
||||
|
||||
ws_display_begin_error_trap (info->display);
|
||||
|
||||
comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
goto out;
|
||||
|
||||
drawable = WS_DRAWABLE (ws_window_lookup (info->display, xwindow));
|
||||
|
||||
if (ws_window_query_input_only (WS_WINDOW (drawable)))
|
||||
goto out;
|
||||
|
||||
if (WS_WINDOW (drawable) == info->gl_window ||
|
||||
WS_WINDOW (drawable) == info->screen->overlay_window)
|
||||
{
|
||||
#if 0
|
||||
g_print ("gl window\n");
|
||||
#endif
|
||||
goto out;
|
||||
}
|
||||
|
||||
data = g_new (DestroyData, 1);
|
||||
data->cscreen = info;
|
||||
data->xid = WS_RESOURCE_XID (drawable);
|
||||
|
||||
comp_window = meta_comp_window_new (info->meta_screen, drawable,
|
||||
on_window_destroy, data);
|
||||
|
||||
g_hash_table_insert (info->windows_by_xid, (gpointer)WS_RESOURCE_XID (drawable), comp_window);
|
||||
|
||||
cm_stacker_add_child (info->stacker, meta_comp_window_get_node (comp_window));
|
||||
|
||||
out:
|
||||
if (comp_window)
|
||||
{
|
||||
/* This function is called both when windows are created and when they
|
||||
* are mapped, so for now we have this silly function.
|
||||
*/
|
||||
meta_comp_window_refresh_attrs (comp_window);
|
||||
}
|
||||
|
||||
ws_display_end_error_trap (info->display);
|
||||
|
||||
#if 0
|
||||
g_print ("done checking\n");
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_comp_screen_remove_window (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
if (comp_window)
|
||||
meta_comp_window_free (comp_window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_updates (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gboolean updates)
|
||||
{
|
||||
MetaCompWindow *comp_window = meta_comp_window_lookup (info, xwindow);
|
||||
|
||||
meta_comp_window_set_updates (comp_window, updates);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
meta_comp_screen_set_patch (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4])
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_set_patch (node, points);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unset_patch (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_unset_patch (node);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_alpha (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble alpha)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
#if 0
|
||||
g_print ("alpha: %f\n", alpha);
|
||||
#endif
|
||||
cm_drawable_node_set_alpha (node, alpha);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_get_real_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (!size)
|
||||
return;
|
||||
|
||||
cm_drawable_node_get_clipbox (node, size);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_unmap (MetaCompScreen *info,
|
||||
Window xwindow)
|
||||
{
|
||||
MetaCompWindow *window = find_comp_window (info, xwindow);
|
||||
|
||||
if (window)
|
||||
meta_comp_window_hide (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_comp_screen_set_target_rect (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect)
|
||||
{
|
||||
CmDrawableNode *node = CM_DRAWABLE_NODE (find_node (info, xwindow));
|
||||
|
||||
if (node)
|
||||
cm_drawable_node_set_scale_rect (node, rect);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
53
src/c-screen.h
Normal file
53
src/c-screen.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#include "screen.h"
|
||||
#include "c-window.h"
|
||||
|
||||
typedef struct MetaCompScreen MetaCompScreen;
|
||||
|
||||
MetaCompScreen *meta_comp_screen_new (WsDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaCompScreen *meta_comp_screen_get_by_xwindow (Window xwindow);
|
||||
void meta_comp_screen_destroy (MetaCompScreen *scr_info);
|
||||
void meta_comp_screen_redirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_unredirect (MetaCompScreen *info);
|
||||
void meta_comp_screen_add_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_remove_window (MetaCompScreen *scr_info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_restack (MetaCompScreen *scr_info,
|
||||
Window window,
|
||||
Window above_this);
|
||||
void meta_comp_screen_set_size (MetaCompScreen *info,
|
||||
Window window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void meta_comp_screen_raise_window (MetaCompScreen *scr_info,
|
||||
Window window);
|
||||
void meta_comp_screen_queue_paint (MetaCompScreen *info);
|
||||
void meta_comp_screen_set_updates (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gboolean updates);
|
||||
void meta_comp_screen_set_patch (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
CmPoint points[4][4]);
|
||||
void meta_comp_screen_unset_patch (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
void meta_comp_screen_set_alpha (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble alpha);
|
||||
void meta_comp_screen_get_real_size (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *size);
|
||||
void meta_comp_screen_set_target_rect (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
WsRectangle *rect);
|
||||
void meta_comp_screen_set_explode (MetaCompScreen *info,
|
||||
Window xwindow,
|
||||
gdouble level);
|
||||
void meta_comp_screen_unmap (MetaCompScreen *info,
|
||||
Window xwindow);
|
||||
MetaCompWindow *meta_comp_screen_lookup_window (MetaCompScreen *info,
|
||||
Window xwindow);
|
1262
src/c-window.c
Normal file
1262
src/c-window.c
Normal file
File diff suppressed because it is too large
Load Diff
72
src/c-window.h
Normal file
72
src/c-window.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
/*
|
||||
* Copyright (C) 2006 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <cm/node.h>
|
||||
#include "display.h"
|
||||
#include "effects.h"
|
||||
|
||||
#ifndef C_WINDOW_H
|
||||
#define C_WINDOW_H
|
||||
|
||||
typedef struct _MetaCompWindow MetaCompWindow;
|
||||
|
||||
typedef void (* MetaCompWindowDestroy) (MetaCompWindow *window,
|
||||
gpointer closure);
|
||||
|
||||
MetaCompWindow *meta_comp_window_new (MetaScreen *screen,
|
||||
WsDrawable *drawable,
|
||||
MetaCompWindowDestroy destroy,
|
||||
gpointer data);
|
||||
CmNode *meta_comp_window_get_node (MetaCompWindow *window);
|
||||
gboolean meta_comp_window_free (MetaCompWindow *window);
|
||||
void meta_comp_window_set_size (MetaCompWindow *window,
|
||||
WsRectangle *size);
|
||||
|
||||
void meta_comp_window_hide (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_show (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_refresh_attrs (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_set_updates (MetaCompWindow *comp_window,
|
||||
gboolean updates);
|
||||
|
||||
void meta_comp_window_explode (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_shrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_unshrink (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_focus (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_restack (MetaCompWindow *comp_window,
|
||||
MetaCompWindow *above);
|
||||
void meta_comp_window_freeze_stack (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_thaw_stack (MetaCompWindow *comp_window);
|
||||
gboolean meta_comp_window_stack_frozen (MetaCompWindow *comp_window);
|
||||
void meta_comp_window_run_minimize (MetaCompWindow *window,
|
||||
MetaEffect *effect);
|
||||
void meta_comp_window_run_unminimize (MetaCompWindow *comp_window,
|
||||
MetaEffect *effect);
|
||||
|
||||
#if 0
|
||||
void meta_comp_window_set_explode (MetaCompWindow *comp_window,
|
||||
double level);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity RGB color stuff */
|
||||
|
||||
/*
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity RGB color stuff */
|
||||
|
||||
/*
|
||||
|
38
src/common.h
38
src/common.h
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity common types shared by core.h and ui.h */
|
||||
|
||||
/*
|
||||
@@ -44,7 +46,8 @@ typedef enum
|
||||
META_FRAME_ALLOWS_SHADE = 1 << 10,
|
||||
META_FRAME_ALLOWS_MOVE = 1 << 11,
|
||||
META_FRAME_FULLSCREEN = 1 << 12,
|
||||
META_FRAME_IS_FLASHING = 1 << 13
|
||||
META_FRAME_IS_FLASHING = 1 << 13,
|
||||
META_FRAME_ABOVE = 1 << 14
|
||||
} MetaFrameFlags;
|
||||
|
||||
typedef enum
|
||||
@@ -74,7 +77,7 @@ typedef struct _MetaWindowMenu MetaWindowMenu;
|
||||
typedef void (* MetaWindowMenuFunc) (MetaWindowMenu *menu,
|
||||
Display *xdisplay,
|
||||
Window client_xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
MetaMenuOp op,
|
||||
int workspace,
|
||||
gpointer data);
|
||||
@@ -116,6 +119,11 @@ typedef enum
|
||||
/* Alt+Esc */
|
||||
META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL,
|
||||
META_GRAB_OP_KEYBOARD_ESCAPING_DOCK,
|
||||
|
||||
META_GRAB_OP_KEYBOARD_ESCAPING_GROUP,
|
||||
|
||||
/* Alt+F6 */
|
||||
META_GRAB_OP_KEYBOARD_TABBING_GROUP,
|
||||
|
||||
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
|
||||
|
||||
@@ -124,7 +132,13 @@ typedef enum
|
||||
META_GRAB_OP_CLICKING_MAXIMIZE,
|
||||
META_GRAB_OP_CLICKING_UNMAXIMIZE,
|
||||
META_GRAB_OP_CLICKING_DELETE,
|
||||
META_GRAB_OP_CLICKING_MENU
|
||||
META_GRAB_OP_CLICKING_MENU,
|
||||
META_GRAB_OP_CLICKING_SHADE,
|
||||
META_GRAB_OP_CLICKING_UNSHADE,
|
||||
META_GRAB_OP_CLICKING_ABOVE,
|
||||
META_GRAB_OP_CLICKING_UNABOVE,
|
||||
META_GRAB_OP_CLICKING_STICK,
|
||||
META_GRAB_OP_CLICKING_UNSTICK
|
||||
} MetaGrabOp;
|
||||
|
||||
typedef enum
|
||||
@@ -138,8 +152,7 @@ typedef enum
|
||||
META_CURSOR_SW_RESIZE,
|
||||
META_CURSOR_NE_RESIZE,
|
||||
META_CURSOR_NW_RESIZE,
|
||||
META_CURSOR_MOVE_WINDOW,
|
||||
META_CURSOR_RESIZE_WINDOW,
|
||||
META_CURSOR_MOVE_OR_RESIZE_WINDOW,
|
||||
META_CURSOR_BUSY
|
||||
|
||||
} MetaCursor;
|
||||
@@ -151,10 +164,18 @@ typedef enum
|
||||
META_FOCUS_MODE_MOUSE
|
||||
} MetaFocusMode;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_FOCUS_NEW_WINDOWS_SMART,
|
||||
META_FOCUS_NEW_WINDOWS_STRICT
|
||||
} MetaFocusNewWindows;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_SHADE,
|
||||
META_ACTION_DOUBLE_CLICK_TITLEBAR_TOGGLE_MAXIMIZE,
|
||||
META_ACTION_DOUBLE_CLICK_TITLEBAR_MINIMIZE,
|
||||
META_ACTION_DOUBLE_CLICK_TITLEBAR_NONE,
|
||||
META_ACTION_DOUBLE_CLICK_TITLEBAR_LAST
|
||||
} MetaActionDoubleClickTitlebar;
|
||||
|
||||
@@ -188,7 +209,6 @@ typedef enum
|
||||
|
||||
/* Relative directions or sides seem to come up all over the place... */
|
||||
/* FIXME: Replace
|
||||
* place.[ch]:MetaWindowEdgePosition,
|
||||
* screen.[ch]:MetaScreenDirection,
|
||||
* workspace.[ch]:MetaMotionDirection,
|
||||
* with the use of MetaDirection.
|
||||
@@ -213,6 +233,12 @@ typedef enum
|
||||
META_BUTTON_FUNCTION_MINIMIZE,
|
||||
META_BUTTON_FUNCTION_MAXIMIZE,
|
||||
META_BUTTON_FUNCTION_CLOSE,
|
||||
META_BUTTON_FUNCTION_SHADE,
|
||||
META_BUTTON_FUNCTION_ABOVE,
|
||||
META_BUTTON_FUNCTION_STICK,
|
||||
META_BUTTON_FUNCTION_UNSHADE,
|
||||
META_BUTTON_FUNCTION_UNABOVE,
|
||||
META_BUTTON_FUNCTION_UNSTICK,
|
||||
META_BUTTON_FUNCTION_LAST
|
||||
} MetaButtonFunction;
|
||||
|
||||
|
1681
src/compositor.c
1681
src/compositor.c
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity compositing manager */
|
||||
|
||||
/*
|
||||
@@ -25,6 +27,11 @@
|
||||
#include "util.h"
|
||||
#include "display.h"
|
||||
|
||||
typedef void (* MetaAnimationFinishedFunc) (gpointer data);
|
||||
|
||||
/* XXX namespace me */
|
||||
void compute_window_rect (MetaWindow *window, MetaRectangle *rect);
|
||||
|
||||
MetaCompositor* meta_compositor_new (MetaDisplay *display);
|
||||
void meta_compositor_unref (MetaCompositor *compositor);
|
||||
void meta_compositor_process_event (MetaCompositor *compositor,
|
||||
@@ -35,22 +42,44 @@ void meta_compositor_add_window (MetaCompositor *compositor,
|
||||
XWindowAttributes *attrs);
|
||||
void meta_compositor_remove_window (MetaCompositor *compositor,
|
||||
Window xwindow);
|
||||
void meta_compositor_set_debug_updates (MetaCompositor *compositor,
|
||||
gboolean debug_updates);
|
||||
|
||||
void meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
void meta_compositor_unmanage_screen (MetaCompositor *compositor,
|
||||
MetaScreen *screen);
|
||||
|
||||
void meta_compositor_damage_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
#if 0
|
||||
void meta_compositor_minimize (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
MetaAnimationFinishedFunc finished_cb,
|
||||
gpointer finished_data);
|
||||
#endif
|
||||
|
||||
void
|
||||
meta_compositor_set_updates (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
gboolean updates);
|
||||
void
|
||||
meta_compositor_destroy (MetaCompositor *compositor);
|
||||
|
||||
void meta_compositor_begin_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
MetaRectangle *initial,
|
||||
int grab_x, int grab_y);
|
||||
void meta_compositor_update_move (MetaCompositor *compositor,
|
||||
MetaWindow *window,
|
||||
int x, int y);
|
||||
void meta_compositor_end_move (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
void meta_compositor_free_window (MetaCompositor *compositor,
|
||||
MetaWindow *window);
|
||||
|
||||
#endif /* META_COMPOSITOR_H */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,9 +1,11 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity size/position constraints */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002, 2003 Red Hat, Inc.
|
||||
* Copyright (C) 2003, 2004 Rob Adams
|
||||
* Copyright (C) 2005 Elijah Newren
|
||||
* Copyright (C) 2005, 2006 Elijah Newren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -97,6 +99,7 @@ typedef enum
|
||||
PRIORITY_MAXIMIZATION = 2,
|
||||
PRIORITY_FULLSCREEN = 2,
|
||||
PRIORITY_SIZE_HINTS_LIMITS = 3,
|
||||
PRIORITY_TITLEBAR_VISIBLE = 4,
|
||||
PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA = 4,
|
||||
PRIORITY_MAXIMUM = 4 // Dummy value used for loop end = max(all priorities)
|
||||
} ConstraintPriority;
|
||||
@@ -165,6 +168,10 @@ static gboolean constrain_fully_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
static gboolean constrain_titlebar_visible (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only);
|
||||
static gboolean constrain_partially_onscreen (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
@@ -209,6 +216,7 @@ static const Constraint all_constraints[] = {
|
||||
{constrain_aspect_ratio, "constrain_aspect_ratio"},
|
||||
{constrain_to_single_xinerama, "constrain_to_single_xinerama"},
|
||||
{constrain_fully_onscreen, "constrain_fully_onscreen"},
|
||||
{constrain_titlebar_visible, "constrain_titlebar_visible"},
|
||||
{constrain_partially_onscreen, "constrain_partially_onscreen"},
|
||||
{NULL, NULL}
|
||||
};
|
||||
@@ -261,6 +269,8 @@ meta_window_constrain (MetaWindow *window,
|
||||
MetaRectangle *new)
|
||||
{
|
||||
ConstraintInfo info;
|
||||
ConstraintPriority priority = PRIORITY_MINIMUM;
|
||||
gboolean satisfied = FALSE;
|
||||
|
||||
/* WARNING: orig and new specify positions and sizes of the inner window,
|
||||
* not the outer. This is a common gotcha since half the constraints
|
||||
@@ -282,8 +292,6 @@ meta_window_constrain (MetaWindow *window,
|
||||
new);
|
||||
place_window_if_needed (window, &info);
|
||||
|
||||
ConstraintPriority priority = PRIORITY_MINIMUM;
|
||||
gboolean satisfied = FALSE;
|
||||
while (!satisfied && priority <= PRIORITY_MAXIMUM) {
|
||||
gboolean check_only = TRUE;
|
||||
|
||||
@@ -325,6 +333,9 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
const MetaRectangle *orig,
|
||||
MetaRectangle *new)
|
||||
{
|
||||
const MetaXineramaScreenInfo *xinerama_info;
|
||||
MetaWorkspace *cur_workspace;
|
||||
|
||||
info->orig = *orig;
|
||||
info->current = *new;
|
||||
|
||||
@@ -348,6 +359,12 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
|
||||
info->resize_gravity = resize_gravity;
|
||||
|
||||
/* FIXME: fixed_directions might be more sane if we (a) made it
|
||||
* depend on the grab_op type instead of current amount of movement
|
||||
* (thus implying that it only has effect when user_action is true,
|
||||
* and (b) ignored it for aspect ratio windows -- at least in those
|
||||
* cases where both directions do actually change size.
|
||||
*/
|
||||
info->fixed_directions = 0;
|
||||
/* If x directions don't change but either y direction does */
|
||||
if ( orig->x == new->x && orig->x + orig->width == new->x + new->width &&
|
||||
@@ -361,20 +378,46 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
{
|
||||
info->fixed_directions = FIXED_DIRECTION_Y;
|
||||
}
|
||||
/* The point of fixed directions is just that "move to nearest valid
|
||||
* position" is sometimes a poorer choice than "move to nearest
|
||||
* valid position but only change this coordinate" for windows the
|
||||
* user is explicitly moving. This isn't ever true for things that
|
||||
* aren't explicit user interaction, though, so just clear it out.
|
||||
*/
|
||||
if (!info->is_user_action)
|
||||
info->fixed_directions = 0;
|
||||
|
||||
meta_window_get_work_area_current_xinerama (window, &info->work_area_xinerama);
|
||||
|
||||
const MetaXineramaScreenInfo *xinerama_info =
|
||||
meta_screen_get_xinerama_for_window (window->screen, window);
|
||||
xinerama_info =
|
||||
meta_screen_get_xinerama_for_rect (window->screen, &info->current);
|
||||
meta_window_get_work_area_for_xinerama (window,
|
||||
xinerama_info->number,
|
||||
&info->work_area_xinerama);
|
||||
info->entire_xinerama = xinerama_info->rect;
|
||||
|
||||
MetaWorkspace *cur_workspace = window->screen->active_workspace;
|
||||
cur_workspace = window->screen->active_workspace;
|
||||
info->usable_screen_region =
|
||||
meta_workspace_get_onscreen_region (cur_workspace);
|
||||
info->usable_xinerama_region =
|
||||
meta_workspace_get_onxinerama_region (cur_workspace,
|
||||
xinerama_info->number);
|
||||
|
||||
/* Workaround braindead legacy apps that don't know how to
|
||||
* fullscreen themselves properly.
|
||||
*/
|
||||
if (meta_rectangle_equal (new, &xinerama_info->rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
/*
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
*/
|
||||
meta_warning (
|
||||
"Treating resize request of legacy application %s as a "
|
||||
"fullscreen request\n",
|
||||
window->desc);
|
||||
meta_window_make_fullscreen_internal (window);
|
||||
}
|
||||
|
||||
/* Log all this information for debugging */
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Setting up constraint info:\n"
|
||||
@@ -417,16 +460,20 @@ place_window_if_needed(MetaWindow *window,
|
||||
|
||||
/* Do placement if any, so we go ahead and apply position
|
||||
* constraints in a move-only context. Don't place
|
||||
* maximized/fullscreen windows until they are unmaximized
|
||||
* and unfullscreened
|
||||
* maximized/minimized/fullscreen windows until they are
|
||||
* unmaximized, unminimized and unfullscreened.
|
||||
*/
|
||||
did_placement = FALSE;
|
||||
if (!window->placed &&
|
||||
window->calc_placement &&
|
||||
!META_WINDOW_MAXIMIZED (window) &&
|
||||
!(window->maximized_horizontally ||
|
||||
window->maximized_vertically) &&
|
||||
!window->minimized &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
MetaRectangle placed_rect = info->orig;
|
||||
MetaWorkspace *cur_workspace;
|
||||
const MetaXineramaScreenInfo *xinerama_info;
|
||||
|
||||
meta_window_place (window, info->fgeom, info->orig.x, info->orig.y,
|
||||
&placed_rect.x, &placed_rect.y);
|
||||
@@ -435,13 +482,13 @@ place_window_if_needed(MetaWindow *window,
|
||||
/* placing the window may have changed the xinerama. Find the
|
||||
* new xinerama and update the ConstraintInfo
|
||||
*/
|
||||
const MetaXineramaScreenInfo *xinerama_info =
|
||||
xinerama_info =
|
||||
meta_screen_get_xinerama_for_rect (window->screen, &placed_rect);
|
||||
info->entire_xinerama = xinerama_info->rect;
|
||||
meta_window_get_work_area_for_xinerama (window,
|
||||
xinerama_info->number,
|
||||
&info->work_area_xinerama);
|
||||
MetaWorkspace *cur_workspace = window->screen->active_workspace;
|
||||
cur_workspace = window->screen->active_workspace;
|
||||
info->usable_xinerama_region =
|
||||
meta_workspace_get_onxinerama_region (cur_workspace,
|
||||
xinerama_info->number);
|
||||
@@ -456,53 +503,47 @@ place_window_if_needed(MetaWindow *window,
|
||||
info->fixed_directions = 0;
|
||||
}
|
||||
|
||||
if ((window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement) &&
|
||||
(window->placed || did_placement))
|
||||
if (window->placed || did_placement)
|
||||
{
|
||||
/* define a sane saved_rect so that the user can unmaximize to
|
||||
* something reasonable.
|
||||
*/
|
||||
if (info->current.width >= info->work_area_xinerama.width)
|
||||
{
|
||||
info->current.width = .75 * info->work_area_xinerama.width;
|
||||
info->current.x = info->work_area_xinerama.x +
|
||||
.125 * info->work_area_xinerama.width;
|
||||
}
|
||||
if (info->current.height >= info->work_area_xinerama.height)
|
||||
{
|
||||
info->current.height = .75 * info->work_area_xinerama.height;
|
||||
info->current.y = info->work_area_xinerama.y +
|
||||
.083 * info->work_area_xinerama.height;
|
||||
}
|
||||
|
||||
if (window->maximize_horizontally_after_placement &&
|
||||
if (window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement)
|
||||
meta_window_maximize_internal (window,
|
||||
META_MAXIMIZE_HORIZONTAL |
|
||||
META_MAXIMIZE_VERTICAL,
|
||||
&info->current);
|
||||
else if (window->maximize_horizontally_after_placement)
|
||||
{
|
||||
info->current.x = info->work_area_xinerama.x
|
||||
+ info->fgeom->left_width;
|
||||
info->current.width = info->work_area_xinerama.width
|
||||
- info->fgeom->left_width - info->fgeom->right_width;
|
||||
/* define a sane saved_rect so that the user can unmaximize to
|
||||
* something reasonable.
|
||||
*/
|
||||
if (info->current.width >= info->work_area_xinerama.width)
|
||||
{
|
||||
info->current.width = .75 * info->work_area_xinerama.width;
|
||||
info->current.x = info->work_area_xinerama.x +
|
||||
.125 * info->work_area_xinerama.width;
|
||||
}
|
||||
if (info->current.height >= info->work_area_xinerama.height)
|
||||
{
|
||||
info->current.height = .75 * info->work_area_xinerama.height;
|
||||
info->current.y = info->work_area_xinerama.y +
|
||||
.083 * info->work_area_xinerama.height;
|
||||
}
|
||||
|
||||
if (window->maximize_horizontally_after_placement ||
|
||||
window->maximize_vertically_after_placement)
|
||||
meta_window_maximize_internal (window,
|
||||
(window->maximize_horizontally_after_placement ?
|
||||
META_MAXIMIZE_HORIZONTAL : 0 ) |
|
||||
(window->maximize_vertically_after_placement ?
|
||||
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (window->frame && !window->fullscreen)
|
||||
meta_frame_calc_geometry (window->frame, info->fgeom);
|
||||
|
||||
window->maximize_horizontally_after_placement = FALSE;
|
||||
window->maximize_vertically_after_placement = FALSE;
|
||||
}
|
||||
else if (window->maximize_vertically_after_placement);
|
||||
if (window->minimize_after_placement)
|
||||
{
|
||||
info->current.y = info->work_area_xinerama.y
|
||||
+ info->fgeom->top_height;
|
||||
info->current.height = info->work_area_xinerama.height
|
||||
- info->fgeom->top_height - info->fgeom->bottom_height;
|
||||
meta_window_minimize (window);
|
||||
window->minimize_after_placement = FALSE;
|
||||
}
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (window->frame && !window->fullscreen)
|
||||
meta_frame_calc_geometry (window->frame, info->fgeom);
|
||||
|
||||
window->maximize_horizontally_after_placement = FALSE;
|
||||
window->maximize_vertically_after_placement = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,23 +558,33 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
window->type == META_WINDOW_DOCK)
|
||||
return;
|
||||
|
||||
/* USABILITY NOTE: Naturally, I only want the require_fully_onscreen and
|
||||
* require_on_single_xinerama flags to *become false* due to user
|
||||
* interactions (which is allowed since certain constraints are ignored
|
||||
* for user interactions regardless of the setting of these flags).
|
||||
* However, whether to make these flags *become true* due to just an
|
||||
* application interaction is a little trickier. It's possible that
|
||||
* users may find not doing that strange since two application
|
||||
* interactions that resize in opposite ways don't necessarily end up
|
||||
* cancelling--but it may also be strange for the user to have an
|
||||
* application resize the window so that it's onscreen, the user forgets
|
||||
* about it, and then later the app is able to resize itself off the
|
||||
* screen. Anyway, for now, I'm think the latter is the more problematic
|
||||
* case but this may need to be revisited.
|
||||
/* We don't want to update the requirements for fullscreen windows;
|
||||
* fullscreen windows are specially handled anyway, and it updating
|
||||
* the requirements when windows enter fullscreen mode mess up the
|
||||
* handling of the window when it leaves that mode (especially when
|
||||
* the application sends a bunch of configurerequest events). See
|
||||
* #353699.
|
||||
*/
|
||||
if (window->fullscreen)
|
||||
return;
|
||||
|
||||
/* USABILITY NOTE: Naturally, I only want the require_fully_onscreen,
|
||||
* require_on_single_xinerama, and require_titlebar_visible flags to
|
||||
* *become false* due to user interactions (which is allowed since
|
||||
* certain constraints are ignored for user interactions regardless of
|
||||
* the setting of these flags). However, whether to make these flags
|
||||
* *become true* due to just an application interaction is a little
|
||||
* trickier. It's possible that users may find not doing that strange
|
||||
* since two application interactions that resize in opposite ways don't
|
||||
* necessarily end up cancelling--but it may also be strange for the user
|
||||
* to have an application resize the window so that it's onscreen, the
|
||||
* user forgets about it, and then later the app is able to resize itself
|
||||
* off the screen. Anyway, for now, I think the latter is the more
|
||||
* problematic case but this may need to be revisited.
|
||||
*/
|
||||
|
||||
/* The require onscreen/on-single-xinerama stuff is relative to the
|
||||
* outer window, not the inner
|
||||
/* The require onscreen/on-single-xinerama and titlebar_visible
|
||||
* stuff is relative to the outer window, not the inner
|
||||
*/
|
||||
extend_by_frame (&info->current, info->fgeom);
|
||||
|
||||
@@ -563,6 +614,26 @@ update_onscreen_requirements (MetaWindow *window,
|
||||
window->desc,
|
||||
window->require_on_single_xinerama ? "TRUE" : "FALSE");
|
||||
|
||||
/* Update whether we want future constraint runs to require the
|
||||
* titlebar to be visible.
|
||||
*/
|
||||
if (window->frame && window->decorated)
|
||||
{
|
||||
MetaRectangle titlebar_rect;
|
||||
|
||||
titlebar_rect = info->current;
|
||||
titlebar_rect.height = info->fgeom->top_height;
|
||||
old = window->require_titlebar_visible;
|
||||
window->require_titlebar_visible =
|
||||
meta_rectangle_overlaps_with_region (info->usable_screen_region,
|
||||
&titlebar_rect);
|
||||
if (old ^ window->require_titlebar_visible)
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"require_titlebar_visible for %s toggled to %s\n",
|
||||
window->desc,
|
||||
window->require_titlebar_visible ? "TRUE" : "FALSE");
|
||||
}
|
||||
|
||||
/* Don't forget to restore the position of the window */
|
||||
unextend_by_frame (&info->current, info->fgeom);
|
||||
}
|
||||
@@ -620,6 +691,11 @@ constrain_maximization (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size, work_area;
|
||||
gboolean hminbad, vminbad;
|
||||
gboolean horiz_equal, vert_equal;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
if (priority > PRIORITY_MAXIMIZATION)
|
||||
return TRUE;
|
||||
|
||||
@@ -627,26 +703,21 @@ constrain_maximization (MetaWindow *window,
|
||||
if (!window->maximized_horizontally && !window->maximized_vertically)
|
||||
return TRUE;
|
||||
|
||||
MetaRectangle min_size, max_size;
|
||||
MetaRectangle work_area = info->work_area_xinerama;
|
||||
work_area = info->work_area_xinerama;
|
||||
unextend_by_frame (&work_area, info->fgeom);
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
|
||||
gboolean hminbad, vminbad, hmaxbad, vmaxbad;
|
||||
hminbad = work_area.width < min_size.width && window->maximized_horizontally;
|
||||
vminbad = work_area.height < min_size.height && window->maximized_vertically;
|
||||
hmaxbad = work_area.width > max_size.width && window->maximized_horizontally;
|
||||
vmaxbad = work_area.height > max_size.height && window->maximized_vertically;
|
||||
if (hminbad || vminbad || hmaxbad || vmaxbad)
|
||||
if (hminbad || vminbad)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
gboolean horiz_equal, vert_equal;
|
||||
horiz_equal = work_area.x == info->current.x &&
|
||||
work_area.width == info->current.width;
|
||||
vert_equal = work_area.y == info->current.y &&
|
||||
work_area.height == info->current.height;
|
||||
gboolean constraint_already_satisfied =
|
||||
constraint_already_satisfied =
|
||||
(horiz_equal || !window->maximized_horizontally) &&
|
||||
(vert_equal || !window->maximized_vertically);
|
||||
if (check_only || constraint_already_satisfied)
|
||||
@@ -672,22 +743,24 @@ constrain_fullscreen (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size, xinerama;
|
||||
gboolean too_big, too_small, constraint_already_satisfied;
|
||||
|
||||
if (priority > PRIORITY_FULLSCREEN)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
if (!window->fullscreen)
|
||||
return TRUE;
|
||||
MetaRectangle min_size, max_size;
|
||||
MetaRectangle xinerama = info->entire_xinerama;
|
||||
xinerama = info->entire_xinerama;
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
gboolean too_big = !meta_rectangle_could_fit_rect (&xinerama, &min_size);
|
||||
gboolean too_small = !meta_rectangle_could_fit_rect (&max_size, &xinerama);
|
||||
too_big = !meta_rectangle_could_fit_rect (&xinerama, &min_size);
|
||||
too_small = !meta_rectangle_could_fit_rect (&max_size, &xinerama);
|
||||
if (too_big || too_small)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
gboolean constraint_already_satisfied =
|
||||
constraint_already_satisfied =
|
||||
meta_rectangle_equal (&info->current, &xinerama);
|
||||
if (check_only || constraint_already_satisfied)
|
||||
return constraint_already_satisfied;
|
||||
@@ -703,6 +776,9 @@ constrain_size_increments (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
int bh, hi, bw, wi, extra_height, extra_width;
|
||||
gboolean constraint_already_satisfied;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_INCREMENTS)
|
||||
return TRUE;
|
||||
|
||||
@@ -712,7 +788,6 @@ constrain_size_increments (MetaWindow *window,
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
int bh, hi, bw, wi, extra_height, extra_width;
|
||||
bh = window->size_hints.base_height;
|
||||
hi = window->size_hints.height_inc;
|
||||
bw = window->size_hints.base_width;
|
||||
@@ -723,7 +798,7 @@ constrain_size_increments (MetaWindow *window,
|
||||
extra_width *= 0;
|
||||
if (window->maximized_vertically)
|
||||
extra_height *= 0;
|
||||
gboolean constraint_already_satisfied =
|
||||
constraint_already_satisfied =
|
||||
(extra_height == 0 && extra_width == 0);
|
||||
|
||||
if (check_only || constraint_already_satisfied)
|
||||
@@ -745,6 +820,10 @@ constrain_size_limits (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
MetaRectangle min_size, max_size;
|
||||
gboolean too_big, too_small, constraint_already_satisfied;
|
||||
int new_width, new_height;
|
||||
|
||||
if (priority > PRIORITY_SIZE_HINTS_LIMITS)
|
||||
return TRUE;
|
||||
|
||||
@@ -757,18 +836,19 @@ constrain_size_limits (MetaWindow *window,
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
MetaRectangle min_size, max_size;
|
||||
get_size_limits (window, info->fgeom, FALSE, &min_size, &max_size);
|
||||
gboolean too_big =
|
||||
!meta_rectangle_could_fit_rect (&info->current, &min_size);
|
||||
gboolean too_small =
|
||||
!meta_rectangle_could_fit_rect (&max_size, &info->current);
|
||||
gboolean constraint_already_satisfied = !too_big && !too_small;
|
||||
/* We ignore max-size limits for maximized windows; see #327543 */
|
||||
if (window->maximized_horizontally)
|
||||
max_size.width = MAX (max_size.width, info->current.width);
|
||||
if (window->maximized_vertically)
|
||||
max_size.height = MAX (max_size.height, info->current.height);
|
||||
too_small = !meta_rectangle_could_fit_rect (&info->current, &min_size);
|
||||
too_big = !meta_rectangle_could_fit_rect (&max_size, &info->current);
|
||||
constraint_already_satisfied = !too_big && !too_small;
|
||||
if (check_only || constraint_already_satisfied)
|
||||
return constraint_already_satisfied;
|
||||
|
||||
/*** Enforce constraint ***/
|
||||
int new_width, new_height;
|
||||
new_width = CLAMP (info->current.width, min_size.width, max_size.width);
|
||||
new_height = CLAMP (info->current.height, min_size.height, max_size.height);
|
||||
meta_rectangle_resize_with_gravity (&info->orig,
|
||||
@@ -785,16 +865,21 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
double minr, maxr;
|
||||
gboolean constraints_are_inconsistent, constraint_already_satisfied;
|
||||
int fudge, new_width, new_height;
|
||||
double best_width, best_height;
|
||||
double alt_width, alt_height;
|
||||
|
||||
if (priority > PRIORITY_ASPECT_RATIO)
|
||||
return TRUE;
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't. */
|
||||
double minr, maxr;
|
||||
minr = window->size_hints.min_aspect.x /
|
||||
(double)window->size_hints.min_aspect.y;
|
||||
maxr = window->size_hints.max_aspect.x /
|
||||
(double)window->size_hints.max_aspect.y;
|
||||
gboolean constraints_are_inconsistent = minr > maxr;
|
||||
constraints_are_inconsistent = minr > maxr;
|
||||
if (constraints_are_inconsistent ||
|
||||
META_WINDOW_MAXIMIZED (window) || window->fullscreen ||
|
||||
info->action_type == ACTION_MOVE)
|
||||
@@ -816,7 +901,6 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
* being a resize increment (FIXME: I should handle real resize
|
||||
* increments better here...)
|
||||
*/
|
||||
int fudge;
|
||||
switch (info->resize_gravity)
|
||||
{
|
||||
case WestGravity:
|
||||
@@ -836,16 +920,13 @@ constrain_aspect_ratio (MetaWindow *window,
|
||||
fudge = 1;
|
||||
break;
|
||||
}
|
||||
gboolean constraint_already_satisfied =
|
||||
constraint_already_satisfied =
|
||||
info->current.width - (info->current.height * minr ) > -minr*fudge &&
|
||||
info->current.width - (info->current.height * maxr ) < maxr*fudge;
|
||||
if (check_only || constraint_already_satisfied)
|
||||
return constraint_already_satisfied;
|
||||
|
||||
/*** Enforce constraint ***/
|
||||
int new_width, new_height;
|
||||
double best_width, best_height;
|
||||
double alt_width, alt_height;
|
||||
new_width = info->current.width;
|
||||
new_height = info->current.height;
|
||||
|
||||
@@ -910,7 +991,8 @@ do_screen_and_xinerama_relative_constraints (
|
||||
ConstraintInfo *info,
|
||||
gboolean check_only)
|
||||
{
|
||||
gboolean exit_early = FALSE;
|
||||
gboolean exit_early = FALSE, constraint_satisfied;
|
||||
MetaRectangle how_far_it_can_be_smushed, min_size, max_size;
|
||||
|
||||
/* First, log some debugging information */
|
||||
char spanning_region[1 + 28 * g_list_length (region_spanning_rectangles)];
|
||||
@@ -921,7 +1003,6 @@ do_screen_and_xinerama_relative_constraints (
|
||||
spanning_region));
|
||||
|
||||
/* Determine whether constraint applies; exit if it doesn't */
|
||||
MetaRectangle how_far_it_can_be_smushed, min_size, max_size;
|
||||
how_far_it_can_be_smushed = info->current;
|
||||
get_size_limits (window, info->fgeom, TRUE, &min_size, &max_size);
|
||||
extend_by_frame (&info->current, info->fgeom);
|
||||
@@ -939,7 +1020,7 @@ do_screen_and_xinerama_relative_constraints (
|
||||
exit_early = TRUE;
|
||||
|
||||
/* Determine whether constraint is already satisfied; exit if it is */
|
||||
gboolean constraint_satisfied =
|
||||
constraint_satisfied =
|
||||
meta_rectangle_contained_in_region (region_spanning_rectangles,
|
||||
&info->current);
|
||||
if (exit_early || constraint_satisfied || check_only)
|
||||
@@ -995,14 +1076,10 @@ constrain_to_single_xinerama (MetaWindow *window,
|
||||
return TRUE;
|
||||
|
||||
/* Have a helper function handle the constraint for us */
|
||||
gboolean retval =
|
||||
do_screen_and_xinerama_relative_constraints (window,
|
||||
return do_screen_and_xinerama_relative_constraints (window,
|
||||
info->usable_xinerama_region,
|
||||
info,
|
||||
check_only);
|
||||
|
||||
/* Free up the data we allocated */
|
||||
return retval;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1020,16 +1097,102 @@ constrain_fully_onscreen (MetaWindow *window,
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->fullscreen ||
|
||||
!window->require_fully_onscreen ||
|
||||
info->is_user_action)
|
||||
return TRUE;
|
||||
|
||||
/* Have a helper function handle the constraint for us */
|
||||
gboolean retval =
|
||||
return do_screen_and_xinerama_relative_constraints (window,
|
||||
info->usable_screen_region,
|
||||
info,
|
||||
check_only);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
constrain_titlebar_visible (MetaWindow *window,
|
||||
ConstraintInfo *info,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
gboolean unconstrained_user_action;
|
||||
gboolean retval;
|
||||
int bottom_amount;
|
||||
int horiz_amount_offscreen, vert_amount_offscreen;
|
||||
int horiz_amount_onscreen, vert_amount_onscreen;
|
||||
|
||||
if (priority > PRIORITY_TITLEBAR_VISIBLE)
|
||||
return TRUE;
|
||||
|
||||
/* Allow the titlebar beyond the top of the screen only if the user wasn't
|
||||
* clicking on the titlebar to start the move.
|
||||
* FIXME: This is kind of a hack; nearly as ugly as the old infinite edge
|
||||
* resistance.
|
||||
*/
|
||||
unconstrained_user_action =
|
||||
info->is_user_action &&
|
||||
window->display->grab_anchor_root_y >= window->display->grab_initial_window_pos.y;
|
||||
|
||||
/* Exit early if we know the constraint won't apply--note that this constraint
|
||||
* is only meant for normal windows (e.g. we don't want docks to be shoved
|
||||
* "onscreen" by their own strut).
|
||||
*/
|
||||
if (window->type == META_WINDOW_DESKTOP ||
|
||||
window->type == META_WINDOW_DOCK ||
|
||||
window->fullscreen ||
|
||||
!window->require_titlebar_visible ||
|
||||
!window->decorated ||
|
||||
unconstrained_user_action)
|
||||
return TRUE;
|
||||
|
||||
/* Determine how much offscreen things are allowed. We first need to
|
||||
* figure out how much must remain on the screen. For that, we use 25%
|
||||
* window width/height but clamp to the range of (10,75) pixels. This is
|
||||
* somewhat of a seat of my pants random guess at what might look good.
|
||||
* Then, the amount that is allowed off is just the window size minus
|
||||
* this amount (but no less than 0 for tiny windows).
|
||||
*/
|
||||
horiz_amount_onscreen = info->current.width / 4;
|
||||
vert_amount_onscreen = info->current.height / 4;
|
||||
horiz_amount_onscreen = CLAMP (horiz_amount_onscreen, 10, 75);
|
||||
vert_amount_onscreen = CLAMP (vert_amount_onscreen, 10, 75);
|
||||
horiz_amount_offscreen = info->current.width - horiz_amount_onscreen;
|
||||
vert_amount_offscreen = info->current.height - vert_amount_onscreen;
|
||||
horiz_amount_offscreen = MAX (horiz_amount_offscreen, 0);
|
||||
vert_amount_offscreen = MAX (vert_amount_offscreen, 0);
|
||||
/* Allow the titlebar to touch the bottom panel; If there is no titlebar,
|
||||
* require vert_amount to remain on the screen.
|
||||
*/
|
||||
if (window->frame)
|
||||
{
|
||||
bottom_amount = info->current.height + info->fgeom->bottom_height;
|
||||
vert_amount_onscreen = info->fgeom->top_height;
|
||||
}
|
||||
else
|
||||
bottom_amount = vert_amount_offscreen;
|
||||
|
||||
/* Extend the region, have a helper function handle the constraint,
|
||||
* then return the region to its original size.
|
||||
*/
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
horiz_amount_offscreen,
|
||||
horiz_amount_offscreen,
|
||||
0, /* Don't let titlebar off */
|
||||
bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
retval =
|
||||
do_screen_and_xinerama_relative_constraints (window,
|
||||
info->usable_screen_region,
|
||||
info,
|
||||
check_only);
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
-horiz_amount_offscreen,
|
||||
-horiz_amount_offscreen,
|
||||
0, /* Don't let titlebar off */
|
||||
-bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@@ -1040,6 +1203,11 @@ constrain_partially_onscreen (MetaWindow *window,
|
||||
ConstraintPriority priority,
|
||||
gboolean check_only)
|
||||
{
|
||||
gboolean retval;
|
||||
int top_amount, bottom_amount;
|
||||
int horiz_amount_offscreen, vert_amount_offscreen;
|
||||
int horiz_amount_onscreen, vert_amount_onscreen;
|
||||
|
||||
if (priority > PRIORITY_PARTIALLY_VISIBLE_ON_WORKAREA)
|
||||
return TRUE;
|
||||
|
||||
@@ -1056,42 +1224,50 @@ constrain_partially_onscreen (MetaWindow *window,
|
||||
* window width/height but clamp to the range of (10,75) pixels. This is
|
||||
* somewhat of a seat of my pants random guess at what might look good.
|
||||
* Then, the amount that is allowed off is just the window size minus
|
||||
* this amount.
|
||||
* this amount (but no less than 0 for tiny windows).
|
||||
*/
|
||||
int top_amount, bottom_amount;
|
||||
int horiz_amount = info->current.width / 4;
|
||||
int vert_amount = info->current.height / 4;
|
||||
horiz_amount = CLAMP (horiz_amount, 10, 75);
|
||||
vert_amount = CLAMP (vert_amount, 10, 75);
|
||||
horiz_amount = info->current.width - horiz_amount;
|
||||
vert_amount = info->current.height - vert_amount;
|
||||
top_amount = vert_amount;
|
||||
horiz_amount_onscreen = info->current.width / 4;
|
||||
vert_amount_onscreen = info->current.height / 4;
|
||||
horiz_amount_onscreen = CLAMP (horiz_amount_onscreen, 10, 75);
|
||||
vert_amount_onscreen = CLAMP (vert_amount_onscreen, 10, 75);
|
||||
horiz_amount_offscreen = info->current.width - horiz_amount_onscreen;
|
||||
vert_amount_offscreen = info->current.height - vert_amount_onscreen;
|
||||
horiz_amount_offscreen = MAX (horiz_amount_offscreen, 0);
|
||||
vert_amount_offscreen = MAX (vert_amount_offscreen, 0);
|
||||
top_amount = vert_amount_offscreen;
|
||||
/* Allow the titlebar to touch the bottom panel; If there is no titlebar,
|
||||
* require vert_amount to remain on the screen.
|
||||
*/
|
||||
if (window->frame)
|
||||
bottom_amount = info->current.height + info->fgeom->bottom_height;
|
||||
{
|
||||
bottom_amount = info->current.height + info->fgeom->bottom_height;
|
||||
vert_amount_onscreen = info->fgeom->top_height;
|
||||
}
|
||||
else
|
||||
bottom_amount = vert_amount;
|
||||
bottom_amount = vert_amount_offscreen;
|
||||
|
||||
/* Extend the region, have a helper function handle the constraint,
|
||||
* then return the region to its original size.
|
||||
*/
|
||||
meta_rectangle_expand_region (info->usable_screen_region,
|
||||
horiz_amount,
|
||||
horiz_amount,
|
||||
top_amount,
|
||||
bottom_amount);
|
||||
gboolean retval =
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
horiz_amount_offscreen,
|
||||
horiz_amount_offscreen,
|
||||
top_amount,
|
||||
bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
retval =
|
||||
do_screen_and_xinerama_relative_constraints (window,
|
||||
info->usable_screen_region,
|
||||
info,
|
||||
check_only);
|
||||
meta_rectangle_expand_region (info->usable_screen_region,
|
||||
-horiz_amount,
|
||||
-horiz_amount,
|
||||
-top_amount,
|
||||
-bottom_amount);
|
||||
meta_rectangle_expand_region_conditionally (info->usable_screen_region,
|
||||
-horiz_amount_offscreen,
|
||||
-horiz_amount_offscreen,
|
||||
-top_amount,
|
||||
-bottom_amount,
|
||||
horiz_amount_onscreen,
|
||||
vert_amount_onscreen);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity size/position constraints */
|
||||
|
||||
/*
|
||||
|
387
src/core.c
387
src/core.c
@@ -1,9 +1,11 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity interface used by GTK+ UI to talk to core */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2003 Rob Adams
|
||||
* Copyright (C) 2004, 2005 Elijah Newren
|
||||
* Copyright (C) 2004-2006 Elijah Newren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -27,11 +29,20 @@
|
||||
#include "workspace.h"
|
||||
#include "prefs.h"
|
||||
|
||||
void
|
||||
meta_core_get_client_size (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *width,
|
||||
int *height)
|
||||
/* Looks up the MetaWindow representing the frame of the given X window.
|
||||
* Used as a helper function by a bunch of the functions below.
|
||||
*
|
||||
* FIXME: The functions that use this function throw the result away
|
||||
* after use. Many of these functions tend to be called in small groups,
|
||||
* which results in get_window() getting called several times in succession
|
||||
* with the same parameters. We should profile to see whether this wastes
|
||||
* much time, and if it does we should look into a generalised
|
||||
* meta_core_get_window_info() which takes a bunch of pointers to variables
|
||||
* to put its results in, and only fills in the non-null ones.
|
||||
*/
|
||||
static MetaWindow *
|
||||
get_window (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
@@ -40,7 +51,21 @@ meta_core_get_client_size (Display *xdisplay,
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
{
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_get_client_size (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (width)
|
||||
*width = window->rect.width;
|
||||
@@ -49,8 +74,8 @@ meta_core_get_client_size (Display *xdisplay,
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
meta_core_window_has_frame (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
@@ -58,25 +83,23 @@ meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
return window != NULL && window->frame != NULL;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return meta_window_titlebar_is_onscreen (window);
|
||||
}
|
||||
|
||||
|
||||
Window
|
||||
meta_core_get_client_xwindow (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->xwindow;
|
||||
}
|
||||
@@ -85,15 +108,8 @@ MetaFrameFlags
|
||||
meta_core_get_frame_flags (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
return meta_frame_get_flags (window->frame);
|
||||
}
|
||||
|
||||
@@ -101,15 +117,10 @@ MetaFrameType
|
||||
meta_core_get_frame_type (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaFrameType base_type;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
base_type = META_FRAME_TYPE_LAST;
|
||||
|
||||
@@ -156,14 +167,7 @@ GdkPixbuf*
|
||||
meta_core_get_mini_icon (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->mini_icon;
|
||||
}
|
||||
@@ -172,14 +176,7 @@ GdkPixbuf*
|
||||
meta_core_get_icon (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return window->icon;
|
||||
}
|
||||
@@ -188,14 +185,7 @@ void
|
||||
meta_core_queue_frame_resize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_queue_move_resize (window);
|
||||
}
|
||||
@@ -206,14 +196,7 @@ meta_core_user_move (Display *xdisplay,
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_move (window, TRUE, x, y);
|
||||
}
|
||||
@@ -225,14 +208,7 @@ meta_core_user_resize (Display *xdisplay,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_resize_with_gravity (window, TRUE, width, height, gravity);
|
||||
}
|
||||
@@ -241,14 +217,7 @@ void
|
||||
meta_core_user_raise (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_raise (window);
|
||||
}
|
||||
@@ -256,20 +225,14 @@ meta_core_user_raise (Display *xdisplay,
|
||||
void
|
||||
meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_lower (window);
|
||||
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
|
||||
meta_prefs_get_raise_on_click ())
|
||||
{
|
||||
/* Move window to the back of the focusing workspace's MRU list.
|
||||
* Do extra sanity checks to avoid possible race conditions.
|
||||
@@ -305,16 +268,9 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
void
|
||||
meta_core_user_focus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_focus (window, timestamp);
|
||||
}
|
||||
@@ -325,14 +281,7 @@ meta_core_get_position (Display *xdisplay,
|
||||
int *x,
|
||||
int *y)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_get_position (window, x, y);
|
||||
}
|
||||
@@ -343,14 +292,7 @@ meta_core_get_size (Display *xdisplay,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (width)
|
||||
*width = window->rect.width;
|
||||
@@ -363,14 +305,7 @@ void
|
||||
meta_core_minimize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_minimize (window);
|
||||
}
|
||||
@@ -379,14 +314,10 @@ void
|
||||
meta_core_maximize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
||||
meta_window_maximize (window,
|
||||
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
||||
@@ -396,14 +327,10 @@ void
|
||||
meta_core_toggle_maximize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
||||
if (META_WINDOW_MAXIMIZED (window))
|
||||
meta_window_unmaximize (window,
|
||||
@@ -417,14 +344,10 @@ void
|
||||
meta_core_unmaximize (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
|
||||
meta_window_unmaximize (window,
|
||||
META_MAXIMIZE_HORIZONTAL | META_MAXIMIZE_VERTICAL);
|
||||
@@ -435,78 +358,63 @@ meta_core_delete (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_delete (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_unshade (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
meta_window_unshade (window);
|
||||
meta_window_unshade (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_shade (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
meta_window_shade (window);
|
||||
meta_window_shade (window, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_unstick (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_unstick (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_make_above (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_make_above (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_unmake_above (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_unmake_above (window);
|
||||
}
|
||||
|
||||
void
|
||||
meta_core_stick (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_stick (window);
|
||||
}
|
||||
@@ -516,14 +424,7 @@ meta_core_change_workspace (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int new_workspace)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
meta_window_change_workspace (window,
|
||||
meta_screen_get_workspace_by_index (window->screen,
|
||||
@@ -554,14 +455,7 @@ int
|
||||
meta_core_get_frame_workspace (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
return meta_window_get_net_wm_desktop (window);
|
||||
}
|
||||
@@ -574,14 +468,7 @@ meta_core_get_frame_extents (Display *xdisplay,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
if (x)
|
||||
*x = window->frame->rect.x;
|
||||
@@ -600,18 +487,12 @@ meta_core_show_window_menu (Display *xdisplay,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
meta_window_raise (window);
|
||||
if (meta_prefs_get_raise_on_click ())
|
||||
meta_window_raise (window);
|
||||
meta_window_focus (window, timestamp);
|
||||
|
||||
meta_window_show_menu (window, root_x, root_y, button, timestamp);
|
||||
@@ -752,23 +633,19 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
MetaWindow *window = get_window (xdisplay, frame_xwindow);
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
MetaScreen *screen;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
screen = meta_display_screen_for_xwindow (display, frame_xwindow);
|
||||
window = meta_display_lookup_x_window (display, frame_xwindow);
|
||||
|
||||
g_assert (screen != NULL);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_xwindow);
|
||||
|
||||
return meta_display_begin_grab_op (display, screen, window,
|
||||
op, pointer_already_grabbed,
|
||||
event_serial,
|
||||
@@ -778,7 +655,7 @@ meta_core_begin_grab_op (Display *xdisplay,
|
||||
|
||||
void
|
||||
meta_core_end_grab_op (Display *xdisplay,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
@@ -836,7 +713,7 @@ meta_core_grab_buttons (Display *xdisplay,
|
||||
Window frame_xwindow)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
|
||||
meta_verbose ("Grabbing buttons on frame 0x%lx\n", frame_xwindow);
|
||||
@@ -848,14 +725,7 @@ meta_core_set_screen_cursor (Display *xdisplay,
|
||||
Window frame_on_screen,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_on_screen);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_on_screen);
|
||||
MetaWindow *window = get_window (xdisplay, frame_on_screen);
|
||||
|
||||
meta_frame_set_screen_cursor (window->frame, cursor);
|
||||
}
|
||||
@@ -866,14 +736,7 @@ meta_core_get_screen_size (Display *xdisplay,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaDisplay *display;
|
||||
MetaWindow *window;
|
||||
|
||||
display = meta_display_for_x_display (xdisplay);
|
||||
window = meta_display_lookup_x_window (display, frame_on_screen);
|
||||
|
||||
if (window == NULL || window->frame == NULL)
|
||||
meta_bug ("No such frame window 0x%lx!\n", frame_on_screen);
|
||||
MetaWindow *window = get_window (xdisplay, frame_on_screen);
|
||||
|
||||
if (width)
|
||||
*width = window->screen->rect.width;
|
||||
@@ -891,3 +754,31 @@ meta_core_increment_event_serial (Display *xdisplay)
|
||||
meta_display_increment_event_serial (display);
|
||||
}
|
||||
|
||||
void
|
||||
meta_invalidate_default_icons (void)
|
||||
{
|
||||
GSList *displays, *windows;
|
||||
|
||||
for (displays = meta_displays_list ();
|
||||
displays != NULL;
|
||||
displays = displays->next)
|
||||
{
|
||||
|
||||
for (windows = meta_display_list_windows (displays->data);
|
||||
windows != NULL;
|
||||
windows = windows->next)
|
||||
{
|
||||
|
||||
MetaWindow *window = (MetaWindow*)windows->data;
|
||||
|
||||
if (window->icon_cache.origin == USING_FALLBACK_ICON)
|
||||
{
|
||||
meta_icon_cache_free (&(window->icon_cache));
|
||||
meta_window_update_icon_now (window);
|
||||
}
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
}
|
||||
|
||||
|
28
src/core.h
28
src/core.h
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity interface used by GTK+ UI to talk to core */
|
||||
|
||||
/*
|
||||
@@ -35,6 +37,10 @@ void meta_core_get_client_size (Display *xdisplay,
|
||||
gboolean meta_core_titlebar_is_onscreen (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
|
||||
gboolean meta_core_window_has_frame (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
|
||||
|
||||
Window meta_core_get_client_xwindow (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
|
||||
@@ -66,11 +72,11 @@ void meta_core_user_raise (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_user_lower_and_unfocus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_core_user_focus (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
/* get position of client, same coord space expected by move */
|
||||
void meta_core_get_position (Display *xdisplay,
|
||||
@@ -95,13 +101,19 @@ void meta_core_delete (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp);
|
||||
void meta_core_unshade (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp);
|
||||
void meta_core_shade (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
Window frame_xwindow,
|
||||
guint32 timestamp);
|
||||
void meta_core_unstick (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_stick (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_unmake_above (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_make_above (Display *xdisplay,
|
||||
Window frame_xwindow);
|
||||
void meta_core_change_workspace (Display *xdisplay,
|
||||
Window frame_xwindow,
|
||||
int new_workspace);
|
||||
@@ -127,7 +139,7 @@ void meta_core_show_window_menu (Display *xdisplay,
|
||||
int root_x,
|
||||
int root_y,
|
||||
int button,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_core_get_menu_accelerator (MetaMenuOp menu_op,
|
||||
int workspace,
|
||||
@@ -141,11 +153,11 @@ gboolean meta_core_begin_grab_op (Display *xdisplay,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y);
|
||||
void meta_core_end_grab_op (Display *xdisplay,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
MetaGrabOp meta_core_get_grab_op (Display *xdisplay);
|
||||
Window meta_core_get_grab_frame (Display *xdisplay);
|
||||
int meta_core_get_grab_button (Display *xdisplay);
|
||||
@@ -171,6 +183,8 @@ void meta_core_increment_event_serial (Display *display);
|
||||
|
||||
int meta_ui_get_last_event_serial (Display *xdisplay);
|
||||
|
||||
void meta_invalidate_default_icons (void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
22
src/delete.c
22
src/delete.c
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity window deletion */
|
||||
|
||||
/*
|
||||
@@ -34,12 +36,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static void meta_window_present_delete_dialog (MetaWindow *window);
|
||||
static void meta_window_present_delete_dialog (MetaWindow *window,
|
||||
guint32 timestamp);
|
||||
|
||||
static void
|
||||
delete_ping_reply_func (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
void *user_data)
|
||||
{
|
||||
meta_topic (META_DEBUG_PING,
|
||||
@@ -248,7 +251,7 @@ io_from_ping_dialog (GIOChannel *channel,
|
||||
if (condition & G_IO_IN)
|
||||
{
|
||||
char *str;
|
||||
int len;
|
||||
unsigned int len;
|
||||
GError *err;
|
||||
|
||||
/* Go ahead and block for all data from child */
|
||||
@@ -292,7 +295,7 @@ io_from_ping_dialog (GIOChannel *channel,
|
||||
static void
|
||||
delete_ping_timeout_func (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
void *user_data)
|
||||
{
|
||||
MetaWindow *window = user_data;
|
||||
@@ -311,14 +314,14 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
|
||||
if (window->dialog_pid >= 0)
|
||||
{
|
||||
meta_window_present_delete_dialog (window);
|
||||
meta_window_present_delete_dialog (window, timestamp);
|
||||
return;
|
||||
}
|
||||
|
||||
window_id_str = g_strdup_printf ("0x%lx", window->xwindow);
|
||||
|
||||
sprintf (numbuf, "%d", window->screen->number);
|
||||
sprintf (timestampbuf, "%lu", timestamp);
|
||||
sprintf (timestampbuf, "%u", timestamp);
|
||||
|
||||
argv[0] = METACITY_LIBEXECDIR"/metacity-dialog";
|
||||
argv[1] = "--screen";
|
||||
@@ -364,7 +367,7 @@ delete_ping_timeout_func (MetaDisplay *display,
|
||||
|
||||
void
|
||||
meta_window_delete (MetaWindow *window,
|
||||
Time timestamp)
|
||||
guint32 timestamp)
|
||||
{
|
||||
meta_error_trap_push (window->display);
|
||||
if (window->delete_window)
|
||||
@@ -476,7 +479,7 @@ meta_window_free_delete_dialog (MetaWindow *window)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_present_delete_dialog (MetaWindow *window)
|
||||
meta_window_present_delete_dialog (MetaWindow *window, guint32 timestamp)
|
||||
{
|
||||
meta_topic (META_DEBUG_PING,
|
||||
"Presenting existing ping dialog for %s\n",
|
||||
@@ -501,8 +504,7 @@ meta_window_present_delete_dialog (MetaWindow *window)
|
||||
w->res_class &&
|
||||
g_strcasecmp (w->res_class, "metacity-dialog") == 0)
|
||||
{
|
||||
meta_window_activate (w,
|
||||
meta_display_get_current_time (w->display));
|
||||
meta_window_activate (w, timestamp);
|
||||
break;
|
||||
}
|
||||
|
||||
|
834
src/display.c
834
src/display.c
File diff suppressed because it is too large
Load Diff
107
src/display.h
107
src/display.h
@@ -1,10 +1,12 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Metacity X display handler */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2002 Red Hat, Inc.
|
||||
* Copyright (C) 2003 Rob Adams
|
||||
* Copyright (C) 2004, 2005 Elijah Newren
|
||||
* Copyright (C) 2004-2006 Elijah Newren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -62,7 +64,7 @@ typedef struct MetaEdgeResistanceData MetaEdgeResistanceData;
|
||||
|
||||
typedef void (* MetaWindowPingFunc) (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
gpointer user_data);
|
||||
|
||||
|
||||
@@ -194,39 +196,38 @@ struct _MetaDisplay
|
||||
MetaWindow *expected_focus_window;
|
||||
|
||||
/* last timestamp passed to XSetInputFocus */
|
||||
Time last_focus_time;
|
||||
guint32 last_focus_time;
|
||||
|
||||
/* last user interaction time in any app */
|
||||
Time last_user_time;
|
||||
guint32 last_user_time;
|
||||
|
||||
/* whether we're using mousenav (only relevant for sloppy&mouse focus modes;
|
||||
* !mouse_mode means "keynav mode")
|
||||
*/
|
||||
guint mouse_mode : 1;
|
||||
|
||||
/* Helper var used when focus_new_windows setting is 'strict'; only
|
||||
* relevant in 'strict' mode and if the focus window is a terminal.
|
||||
* In that case, we don't allow new windows to take focus away from
|
||||
* a terminal, but if the user explicitly did something that should
|
||||
* allow a different window to gain focus (e.g. global keybinding or
|
||||
* clicking on a dock), then we will allow the transfer.
|
||||
*/
|
||||
guint allow_terminal_deactivation : 1;
|
||||
|
||||
guint static_gravity_works : 1;
|
||||
|
||||
/*< private-ish >*/
|
||||
guint error_trap_synced_at_last_pop : 1;
|
||||
MetaEventQueue *events;
|
||||
GSList *screens;
|
||||
MetaScreen *active_screen;
|
||||
GHashTable *window_ids;
|
||||
int error_traps;
|
||||
int (* error_trap_handler) (Display *display,
|
||||
XErrorEvent *error);
|
||||
int server_grab_count;
|
||||
|
||||
/* This window holds the focus when we don't want to focus
|
||||
* any actual clients
|
||||
*/
|
||||
Window no_focus_window;
|
||||
|
||||
/* for double click */
|
||||
Time last_button_time;
|
||||
Window last_button_xwindow;
|
||||
int last_button_num;
|
||||
guint is_double_click : 1;
|
||||
|
||||
/* serials of leave/unmap events that may
|
||||
* correspond to an enter event we should
|
||||
* ignore
|
||||
@@ -262,18 +263,21 @@ struct _MetaDisplay
|
||||
guint grab_have_pointer : 1;
|
||||
guint grab_have_keyboard : 1;
|
||||
guint grab_wireframe_active : 1;
|
||||
guint grab_was_cancelled : 1;
|
||||
guint grab_was_cancelled : 1; /* Only used in wireframe mode */
|
||||
MetaRectangle grab_wireframe_rect;
|
||||
MetaRectangle grab_wireframe_last_xor_rect;
|
||||
MetaRectangle grab_initial_window_pos;
|
||||
int grab_initial_x, grab_initial_y; /* These are only relevant for */
|
||||
gboolean grab_threshold_movement_reached; /* raise_on_click == FALSE. */
|
||||
MetaResizePopup *grab_resize_popup;
|
||||
GTimeVal grab_last_moveresize_time;
|
||||
Time grab_motion_notify_time;
|
||||
guint32 grab_motion_notify_time;
|
||||
int grab_wireframe_last_display_width;
|
||||
int grab_wireframe_last_display_height;
|
||||
GList* grab_old_window_stacking;
|
||||
MetaEdgeResistanceData *grab_edge_resistance_data;
|
||||
|
||||
unsigned int grab_last_user_action_was_snap;
|
||||
|
||||
/* we use property updates as sentinels for certain window focus events
|
||||
* to avoid some race conditions on EnterNotify events
|
||||
*/
|
||||
@@ -281,6 +285,7 @@ struct _MetaDisplay
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
int xkb_base_event_type;
|
||||
guint32 last_bell_time;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
/* alarm monitoring client's _NET_WM_SYNC_REQUEST_COUNTER */
|
||||
@@ -293,8 +298,8 @@ struct _MetaDisplay
|
||||
int n_screen_bindings;
|
||||
MetaKeyBinding *window_bindings;
|
||||
int n_window_bindings;
|
||||
unsigned int min_keycode;
|
||||
unsigned int max_keycode;
|
||||
int min_keycode;
|
||||
int max_keycode;
|
||||
KeySym *keymap;
|
||||
int keysyms_per_keycode;
|
||||
XModifierKeymap *modmap;
|
||||
@@ -308,6 +313,9 @@ struct _MetaDisplay
|
||||
/* Xinerama cache */
|
||||
unsigned int xinerama_cache_invalidated : 1;
|
||||
|
||||
/* Opening the display */
|
||||
unsigned int display_opening : 1;
|
||||
|
||||
/* Closing down the display */
|
||||
int closing;
|
||||
|
||||
@@ -343,7 +351,6 @@ struct _MetaDisplay
|
||||
int render_error_base;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
unsigned int grab_last_user_action_was_snap;
|
||||
unsigned int have_xsync : 1;
|
||||
#define META_DISPLAY_HAS_XSYNC(display) ((display)->have_xsync)
|
||||
#else
|
||||
@@ -376,17 +383,18 @@ struct _MetaDisplay
|
||||
* the result.
|
||||
*/
|
||||
#define XSERVER_TIME_IS_BEFORE_ASSUMING_REAL_TIMESTAMPS(time1, time2) \
|
||||
( (( time1 < time2 ) && ( time2 - time1 < ((guint32)-1)/2 )) || \
|
||||
(( time1 > time2 ) && ( time1 - time2 > ((guint32)-1)/2 )) \
|
||||
( (( (time1) < (time2) ) && ( (time2) - (time1) < ((guint32)-1)/2 )) || \
|
||||
(( (time1) > (time2) ) && ( (time1) - (time2) > ((guint32)-1)/2 )) \
|
||||
)
|
||||
#define XSERVER_TIME_IS_BEFORE(time1, time2) \
|
||||
( time1 == 0 || \
|
||||
( (time1) == 0 || \
|
||||
(XSERVER_TIME_IS_BEFORE_ASSUMING_REAL_TIMESTAMPS(time1, time2) && \
|
||||
time2 != 0) \
|
||||
(time2) != 0) \
|
||||
)
|
||||
|
||||
gboolean meta_display_open (const char *name);
|
||||
void meta_display_close (MetaDisplay *display);
|
||||
gboolean meta_display_open (void);
|
||||
void meta_display_close (MetaDisplay *display,
|
||||
guint32 timestamp);
|
||||
MetaScreen* meta_display_screen_for_root (MetaDisplay *display,
|
||||
Window xroot);
|
||||
MetaScreen* meta_display_screen_for_x_screen (MetaDisplay *display,
|
||||
@@ -395,13 +403,14 @@ MetaScreen* meta_display_screen_for_xwindow (MetaDisplay *display,
|
||||
Window xindow);
|
||||
void meta_display_grab (MetaDisplay *display);
|
||||
void meta_display_ungrab (MetaDisplay *display);
|
||||
gboolean meta_display_is_double_click (MetaDisplay *display);
|
||||
|
||||
void meta_display_unmanage_screen (MetaDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||
MetaScreen *screen);
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
/* A given MetaWindow may have various X windows that "belong"
|
||||
* to it, such as the frame window.
|
||||
@@ -413,6 +422,9 @@ void meta_display_register_x_window (MetaDisplay *display,
|
||||
MetaWindow *window);
|
||||
void meta_display_unregister_x_window (MetaDisplay *display,
|
||||
Window xwindow);
|
||||
/* Return whether the xwindow is a no focus window for any of the screens */
|
||||
gboolean meta_display_xwindow_is_a_no_focus_window (MetaDisplay *display,
|
||||
Window xwindow);
|
||||
|
||||
GSList* meta_display_list_windows (MetaDisplay *display);
|
||||
|
||||
@@ -427,7 +439,7 @@ void meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
MetaGrabOp op,
|
||||
gboolean change_pointer,
|
||||
Window grab_xwindow,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -437,12 +449,15 @@ gboolean meta_display_begin_grab_op (MetaDisplay *display,
|
||||
int event_serial,
|
||||
int button,
|
||||
gulong modmask,
|
||||
Time timestamp,
|
||||
guint32 timestamp,
|
||||
int root_x,
|
||||
int root_y);
|
||||
void meta_display_end_grab_op (MetaDisplay *display,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_check_threshold_reached (MetaDisplay *display,
|
||||
int x,
|
||||
int y);
|
||||
void meta_display_grab_window_buttons (MetaDisplay *display,
|
||||
Window xwindow);
|
||||
void meta_display_ungrab_window_buttons (MetaDisplay *display,
|
||||
@@ -475,21 +490,28 @@ void meta_display_retheme_all (void);
|
||||
void meta_display_set_cursor_theme (const char *theme,
|
||||
int size);
|
||||
|
||||
void meta_display_ping_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
Time timestamp,
|
||||
MetaWindowPingFunc ping_reply_func,
|
||||
MetaWindowPingFunc ping_timeout_func,
|
||||
void *user_data);
|
||||
void meta_display_ping_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
guint32 timestamp,
|
||||
MetaWindowPingFunc ping_reply_func,
|
||||
MetaWindowPingFunc ping_timeout_func,
|
||||
void *user_data);
|
||||
gboolean meta_display_window_has_pending_pings (MetaDisplay *display,
|
||||
MetaWindow *window);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_TAB_LIST_NORMAL,
|
||||
META_TAB_LIST_DOCKS
|
||||
META_TAB_LIST_DOCKS,
|
||||
META_TAB_LIST_GROUP
|
||||
} MetaTabList;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_TAB_SHOW_ICON, /* Alt-Tab mode */
|
||||
META_TAB_SHOW_INSTANTLY /* Alt-Esc mode */
|
||||
} MetaTabShowType;
|
||||
|
||||
GList* meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
@@ -532,14 +554,15 @@ gboolean meta_display_focus_sentinel_clear (MetaDisplay *display);
|
||||
void meta_display_set_input_focus_window (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
gboolean focus_frame,
|
||||
Time timestamp);
|
||||
guint32 timestamp);
|
||||
|
||||
/* meta_display_focus_the_no_focus_window is called when the
|
||||
* designated no_focus_window should be focused, but is otherwise the
|
||||
* same as meta_display_set_input_focus_window
|
||||
*/
|
||||
void meta_display_focus_the_no_focus_window (MetaDisplay *display,
|
||||
Time timestamp);
|
||||
MetaScreen *screen,
|
||||
guint32 timestamp);
|
||||
|
||||
void meta_display_queue_autoraise_callback (MetaDisplay *display,
|
||||
MetaWindow *window);
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Draw a workspace */
|
||||
|
||||
/* This file should not be modified to depend on other files in
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Draw a workspace */
|
||||
|
||||
/* This file should not be modified to depend on other files in
|
||||
|
@@ -1,7 +1,9 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Edge resistance for move/resize operations */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2005 Elijah Newren
|
||||
* Copyright (C) 2005, 2006 Elijah Newren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -44,7 +46,6 @@ struct ResistanceDataForAnEdge
|
||||
GSourceFunc timeout_func;
|
||||
MetaWindow *window;
|
||||
int keyboard_buildup;
|
||||
gboolean allow_past_screen_edge;
|
||||
};
|
||||
typedef struct ResistanceDataForAnEdge ResistanceDataForAnEdge;
|
||||
|
||||
@@ -187,6 +188,7 @@ find_nearest_position (const GArray *edges,
|
||||
int compare;
|
||||
MetaEdge *edge;
|
||||
int best, best_dist, i;
|
||||
gboolean edges_align;
|
||||
|
||||
/* Initialize mid, edge, & compare in the off change that the array only
|
||||
* has one element.
|
||||
@@ -223,9 +225,7 @@ find_nearest_position (const GArray *edges,
|
||||
/* Start the search at mid */
|
||||
edge = g_array_index (edges, MetaEdge*, mid);
|
||||
compare = horizontal ? edge->rect.x : edge->rect.y;
|
||||
gboolean edges_align = horizontal ?
|
||||
meta_rectangle_vert_overlap (&edge->rect, new_rect) :
|
||||
meta_rectangle_horiz_overlap (&edge->rect, new_rect);
|
||||
edges_align = meta_rectangle_edge_aligns (new_rect, edge);
|
||||
if (edges_align &&
|
||||
(!only_forward || !points_on_same_side (position, compare, old_position)))
|
||||
{
|
||||
@@ -243,7 +243,7 @@ find_nearest_position (const GArray *edges,
|
||||
edge = g_array_index (edges, MetaEdge*, i);
|
||||
compare = horizontal ? edge->rect.x : edge->rect.y;
|
||||
|
||||
gboolean edges_align = horizontal ?
|
||||
edges_align = horizontal ?
|
||||
meta_rectangle_vert_overlap (&edge->rect, new_rect) :
|
||||
meta_rectangle_horiz_overlap (&edge->rect, new_rect);
|
||||
|
||||
@@ -267,7 +267,7 @@ find_nearest_position (const GArray *edges,
|
||||
edge = g_array_index (edges, MetaEdge*, i);
|
||||
compare = horizontal ? edge->rect.x : edge->rect.y;
|
||||
|
||||
gboolean edges_align = horizontal ?
|
||||
edges_align = horizontal ?
|
||||
meta_rectangle_vert_overlap (&edge->rect, new_rect) :
|
||||
meta_rectangle_horiz_overlap (&edge->rect, new_rect);
|
||||
|
||||
@@ -321,6 +321,7 @@ static int
|
||||
apply_edge_resistance (MetaWindow *window,
|
||||
int old_pos,
|
||||
int new_pos,
|
||||
const MetaRectangle *old_rect,
|
||||
const MetaRectangle *new_rect,
|
||||
GArray *edges,
|
||||
ResistanceDataForAnEdge *resistance_data,
|
||||
@@ -329,26 +330,18 @@ apply_edge_resistance (MetaWindow *window,
|
||||
gboolean keyboard_op)
|
||||
{
|
||||
int i, begin, end;
|
||||
gboolean okay_to_clear_keyboard_buildup = FALSE;
|
||||
int keyboard_buildup_edge = G_MAXINT;
|
||||
gboolean increasing = new_pos > old_pos;
|
||||
int increment = increasing ? 1 : -1;
|
||||
|
||||
const int PIXEL_DISTANCE_THRESHOLD_TOWARDS_WINDOW = 16;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_WINDOW = 8;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_WINDOW = 0;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_TOWARDS_XINERAMA = 32;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_XINERAMA = 8;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_XINERAMA = 0;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_TOWARDS_SCREEN = 32;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_SCREEN = 8;
|
||||
const int PIXEL_DISTANCE_THRESHOLD_AWAYFROM_SCREEN = 0;
|
||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_WINDOW = 0;
|
||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_XINERAMA = 100;
|
||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_SCREEN = 750;
|
||||
const int KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_WINDOW = 16;
|
||||
const int KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_WINDOW = 16;
|
||||
const int KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_XINERAMA = 24;
|
||||
const int KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_XINERAMA = 16;
|
||||
const int KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_SCREEN = 32;
|
||||
const int KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_SCREEN = 16;
|
||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_XINERAMA = 0;
|
||||
const int TIMEOUT_RESISTANCE_LENGTH_MS_SCREEN = 0;
|
||||
|
||||
/* Quit if no movement was specified */
|
||||
if (old_pos == new_pos)
|
||||
@@ -383,9 +376,8 @@ apply_edge_resistance (MetaWindow *window,
|
||||
int compare = xdir ? edge->rect.x : edge->rect.y;
|
||||
|
||||
/* Find out if this edge is relevant */
|
||||
edges_align = xdir ?
|
||||
meta_rectangle_vert_overlap (&edge->rect, new_rect) :
|
||||
meta_rectangle_horiz_overlap (&edge->rect, new_rect);
|
||||
edges_align = meta_rectangle_edge_aligns (new_rect, edge) ||
|
||||
meta_rectangle_edge_aligns (old_rect, edge);
|
||||
|
||||
/* Nothing to do unless the edges align */
|
||||
if (!edges_align)
|
||||
@@ -398,85 +390,13 @@ apply_edge_resistance (MetaWindow *window,
|
||||
/* Rest is easier to read if we split on keyboard vs. mouse op */
|
||||
if (keyboard_op)
|
||||
{
|
||||
/* KEYBOARD ENERGY BUILDUP RESISTANCE: If the user has is moving
|
||||
* fast enough or has already built up enough "energy", then let
|
||||
* the user past the edge, otherwise stop at this edge. If the
|
||||
* user was previously stopped at this edge, add movement amount
|
||||
* to the built up energy.
|
||||
*/
|
||||
|
||||
/* First, determine the amount of the resistance */
|
||||
int resistance = 0;
|
||||
switch (edge->edge_type)
|
||||
{
|
||||
case META_EDGE_WINDOW:
|
||||
if (movement_towards_edge (edge->side_type, increment))
|
||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_WINDOW;
|
||||
else
|
||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_WINDOW;
|
||||
break;
|
||||
case META_EDGE_XINERAMA:
|
||||
if (movement_towards_edge (edge->side_type, increment))
|
||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_XINERAMA;
|
||||
else
|
||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_XINERAMA;
|
||||
break;
|
||||
case META_EDGE_SCREEN:
|
||||
if (movement_towards_edge (edge->side_type, increment))
|
||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_TOWARDS_SCREEN;
|
||||
else
|
||||
resistance = KEYBOARD_BUILDUP_THRESHOLD_AWAYFROM_SCREEN;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Clear any previous buildup if we've run into an edge at a
|
||||
* different location than what we were building up on before.
|
||||
* See below for more details where these get set.
|
||||
*/
|
||||
if (okay_to_clear_keyboard_buildup &&
|
||||
compare != keyboard_buildup_edge)
|
||||
{
|
||||
okay_to_clear_keyboard_buildup = FALSE;
|
||||
resistance_data->keyboard_buildup = 0;
|
||||
}
|
||||
|
||||
/* Determine the threshold */
|
||||
int threshold = resistance - resistance_data->keyboard_buildup;
|
||||
|
||||
/* See if threshold hasn't been met yet or not */
|
||||
if (ABS (compare - new_pos) < threshold)
|
||||
{
|
||||
if (resistance_data->keyboard_buildup != 0)
|
||||
resistance_data->keyboard_buildup += ABS (new_pos - compare);
|
||||
else
|
||||
resistance_data->keyboard_buildup = 1; /* 0 causes stuckage */
|
||||
return compare;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* It may be the case that there are two windows with edges
|
||||
* at the same location. If so, the buildup ought to count
|
||||
* towards both edges. So we just not that it's okay to
|
||||
* clear the buildup once we find an edge at a different
|
||||
* location.
|
||||
*/
|
||||
okay_to_clear_keyboard_buildup = TRUE;
|
||||
keyboard_buildup_edge = compare;
|
||||
}
|
||||
if ((old_pos < compare && compare < new_pos) ||
|
||||
(old_pos > compare && compare > new_pos))
|
||||
return compare;
|
||||
}
|
||||
else /* mouse op */
|
||||
{
|
||||
/* INFINITE RESISTANCE for screen edges under certain cases; If
|
||||
* the edge is relevant and we're moving towards it and it's a
|
||||
* screen edge and infinite resistance has been requested for
|
||||
* this particular grab op then don't allow movement past it.
|
||||
*/
|
||||
if (edge->edge_type == META_EDGE_SCREEN &&
|
||||
!resistance_data->allow_past_screen_edge &&
|
||||
movement_towards_edge (edge->side_type, increment))
|
||||
{
|
||||
return compare;
|
||||
}
|
||||
int threshold;
|
||||
|
||||
/* TIMEOUT RESISTANCE: If the edge is relevant and we're moving
|
||||
* towards it, then we may want to have some kind of time delay
|
||||
@@ -492,12 +412,10 @@ apply_edge_resistance (MetaWindow *window,
|
||||
timeout_length_ms = TIMEOUT_RESISTANCE_LENGTH_MS_WINDOW;
|
||||
break;
|
||||
case META_EDGE_XINERAMA:
|
||||
if (window->require_on_single_xinerama)
|
||||
timeout_length_ms = TIMEOUT_RESISTANCE_LENGTH_MS_XINERAMA;
|
||||
timeout_length_ms = TIMEOUT_RESISTANCE_LENGTH_MS_XINERAMA;
|
||||
break;
|
||||
case META_EDGE_SCREEN:
|
||||
if (window->require_fully_onscreen)
|
||||
timeout_length_ms = TIMEOUT_RESISTANCE_LENGTH_MS_SCREEN;
|
||||
timeout_length_ms = TIMEOUT_RESISTANCE_LENGTH_MS_SCREEN;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -529,7 +447,7 @@ apply_edge_resistance (MetaWindow *window,
|
||||
*/
|
||||
|
||||
/* First, determine the threshold */
|
||||
int threshold = 0;
|
||||
threshold = 0;
|
||||
switch (edge->edge_type)
|
||||
{
|
||||
case META_EDGE_WINDOW:
|
||||
@@ -560,12 +478,6 @@ apply_edge_resistance (MetaWindow *window,
|
||||
i += increment;
|
||||
}
|
||||
|
||||
/* If we didn't run into any new edges in keyboard buildup but had moved
|
||||
* far enough to get past the last one, clear the buildup
|
||||
*/
|
||||
if (okay_to_clear_keyboard_buildup && new_pos != keyboard_buildup_edge)
|
||||
resistance_data->keyboard_buildup = 0;
|
||||
|
||||
return new_pos;
|
||||
}
|
||||
|
||||
@@ -573,50 +485,21 @@ static int
|
||||
apply_edge_snapping (int old_pos,
|
||||
int new_pos,
|
||||
const MetaRectangle *new_rect,
|
||||
GArray *edges1,
|
||||
GArray *edges2,
|
||||
GArray *edges,
|
||||
gboolean xdir,
|
||||
gboolean keyboard_op)
|
||||
{
|
||||
int pos1, pos2;
|
||||
int best;
|
||||
int snap_to;
|
||||
|
||||
if (old_pos == new_pos)
|
||||
return new_pos;
|
||||
|
||||
/* We look at two sets of edges (e.g. left and right) individually
|
||||
* finding the nearest position among each set of edges and then later
|
||||
* finding the better of these two bests.
|
||||
*/
|
||||
pos1 = find_nearest_position (edges1,
|
||||
new_pos,
|
||||
old_pos,
|
||||
new_rect,
|
||||
xdir,
|
||||
keyboard_op);
|
||||
pos2 = find_nearest_position (edges2,
|
||||
new_pos,
|
||||
old_pos,
|
||||
new_rect,
|
||||
xdir,
|
||||
keyboard_op);
|
||||
|
||||
/* For keyboard snapping, ignore either pos1 or pos2 if they aren't in the
|
||||
* right direction.
|
||||
*/
|
||||
if (keyboard_op)
|
||||
{
|
||||
if (!points_on_same_side (old_pos, pos1, new_pos))
|
||||
return pos2;
|
||||
if (!points_on_same_side (old_pos, pos2, new_pos))
|
||||
return pos1;
|
||||
}
|
||||
|
||||
/* Find the better of pos1 and pos2 and return it */
|
||||
if (ABS (pos1 - new_pos) < ABS (pos2 - new_pos))
|
||||
best = pos1;
|
||||
else
|
||||
best = pos2;
|
||||
snap_to = find_nearest_position (edges,
|
||||
new_pos,
|
||||
old_pos,
|
||||
new_rect,
|
||||
xdir,
|
||||
keyboard_op);
|
||||
|
||||
/* If mouse snap-moving, the user could easily accidentally move just a
|
||||
* couple pixels in a direction they didn't mean to move; so ignore snap
|
||||
@@ -624,12 +507,12 @@ apply_edge_snapping (int old_pos,
|
||||
* anyway.
|
||||
*/
|
||||
if (!keyboard_op &&
|
||||
ABS (best - old_pos) >= 8 &&
|
||||
ABS (snap_to - old_pos) >= 8 &&
|
||||
ABS (new_pos - old_pos) < 8)
|
||||
return old_pos;
|
||||
else
|
||||
/* Otherwise, return the best of the snapping positions found */
|
||||
return best;
|
||||
/* Otherwise, return the snapping position found */
|
||||
return snap_to;
|
||||
}
|
||||
|
||||
/* This function takes the position (including any frame) of the window and
|
||||
@@ -647,7 +530,8 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
MetaRectangle *new_outer,
|
||||
GSourceFunc timeout_func,
|
||||
gboolean auto_snap,
|
||||
gboolean keyboard_op)
|
||||
gboolean keyboard_op,
|
||||
gboolean is_resize)
|
||||
{
|
||||
MetaEdgeResistanceData *edge_data;
|
||||
MetaRectangle modified_rect;
|
||||
@@ -668,14 +552,12 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
BOX_LEFT (*new_outer),
|
||||
new_outer,
|
||||
edge_data->left_edges,
|
||||
edge_data->right_edges,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
|
||||
new_right = apply_edge_snapping (BOX_RIGHT (*old_outer),
|
||||
BOX_RIGHT (*new_outer),
|
||||
new_outer,
|
||||
edge_data->left_edges,
|
||||
edge_data->right_edges,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
@@ -684,57 +566,80 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
BOX_TOP (*new_outer),
|
||||
new_outer,
|
||||
edge_data->top_edges,
|
||||
edge_data->bottom_edges,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
|
||||
new_bottom = apply_edge_snapping (BOX_BOTTOM (*old_outer),
|
||||
BOX_BOTTOM (*new_outer),
|
||||
new_outer,
|
||||
edge_data->top_edges,
|
||||
edge_data->bottom_edges,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Now, apply the normal edge resistance */
|
||||
new_left = apply_edge_resistance (window,
|
||||
BOX_LEFT (*old_outer),
|
||||
BOX_LEFT (*new_outer),
|
||||
new_outer,
|
||||
edge_data->left_edges,
|
||||
&edge_data->left_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
new_right = apply_edge_resistance (window,
|
||||
BOX_RIGHT (*old_outer),
|
||||
BOX_RIGHT (*new_outer),
|
||||
new_outer,
|
||||
edge_data->right_edges,
|
||||
&edge_data->right_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
new_top = apply_edge_resistance (window,
|
||||
BOX_TOP (*old_outer),
|
||||
BOX_TOP (*new_outer),
|
||||
new_outer,
|
||||
edge_data->top_edges,
|
||||
&edge_data->top_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
new_bottom = apply_edge_resistance (window,
|
||||
BOX_BOTTOM (*old_outer),
|
||||
BOX_BOTTOM (*new_outer),
|
||||
new_outer,
|
||||
edge_data->bottom_edges,
|
||||
&edge_data->bottom_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
/* Disable edge resistance for resizes when windows have size
|
||||
* increment hints; see #346782. For all other cases, apply
|
||||
* them.
|
||||
*/
|
||||
if (!is_resize || window->size_hints.width_inc == 1)
|
||||
{
|
||||
/* Now, apply the normal horizontal edge resistance */
|
||||
new_left = apply_edge_resistance (window,
|
||||
BOX_LEFT (*old_outer),
|
||||
BOX_LEFT (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->left_edges,
|
||||
&edge_data->left_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
new_right = apply_edge_resistance (window,
|
||||
BOX_RIGHT (*old_outer),
|
||||
BOX_RIGHT (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->right_edges,
|
||||
&edge_data->right_data,
|
||||
timeout_func,
|
||||
TRUE,
|
||||
keyboard_op);
|
||||
}
|
||||
else
|
||||
{
|
||||
new_left = new_outer->x;
|
||||
new_right = new_outer->x + new_outer->width;
|
||||
}
|
||||
/* Same for vertical resizes... */
|
||||
if (!is_resize || window->size_hints.height_inc == 1)
|
||||
{
|
||||
new_top = apply_edge_resistance (window,
|
||||
BOX_TOP (*old_outer),
|
||||
BOX_TOP (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->top_edges,
|
||||
&edge_data->top_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
new_bottom = apply_edge_resistance (window,
|
||||
BOX_BOTTOM (*old_outer),
|
||||
BOX_BOTTOM (*new_outer),
|
||||
old_outer,
|
||||
new_outer,
|
||||
edge_data->bottom_edges,
|
||||
&edge_data->bottom_data,
|
||||
timeout_func,
|
||||
FALSE,
|
||||
keyboard_op);
|
||||
}
|
||||
else
|
||||
{
|
||||
new_top = new_outer->y;
|
||||
new_bottom = new_outer->y + new_outer->height;
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine whether anything changed, and save the changes */
|
||||
@@ -750,27 +655,36 @@ apply_edge_resistance_to_each_side (MetaDisplay *display,
|
||||
void
|
||||
meta_display_cleanup_edges (MetaDisplay *display)
|
||||
{
|
||||
MetaEdgeResistanceData *edge_data = display->grab_edge_resistance_data;
|
||||
g_assert (edge_data != NULL);
|
||||
guint i,j;
|
||||
MetaEdgeResistanceData *edge_data = display->grab_edge_resistance_data;
|
||||
GHashTable *edges_to_be_freed;
|
||||
|
||||
g_assert (edge_data != NULL);
|
||||
|
||||
/* We first need to clean out any window edges */
|
||||
edges_to_be_freed = g_hash_table_new_full (g_direct_hash, g_direct_equal,
|
||||
g_free, NULL);
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
GArray *tmp = NULL;
|
||||
MetaDirection dir;
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
tmp = edge_data->left_edges;
|
||||
dir = META_DIRECTION_LEFT;
|
||||
break;
|
||||
case 1:
|
||||
tmp = edge_data->right_edges;
|
||||
dir = META_DIRECTION_RIGHT;
|
||||
break;
|
||||
case 2:
|
||||
tmp = edge_data->top_edges;
|
||||
dir = META_DIRECTION_TOP;
|
||||
break;
|
||||
case 3:
|
||||
tmp = edge_data->bottom_edges;
|
||||
dir = META_DIRECTION_BOTTOM;
|
||||
break;
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
@@ -779,16 +693,31 @@ meta_display_cleanup_edges (MetaDisplay *display)
|
||||
for (j = 0; j < tmp->len; j++)
|
||||
{
|
||||
MetaEdge *edge = g_array_index (tmp, MetaEdge*, j);
|
||||
if (edge->edge_type == META_EDGE_WINDOW)
|
||||
g_free (edge);
|
||||
if (edge->edge_type == META_EDGE_WINDOW &&
|
||||
edge->side_type == dir)
|
||||
{
|
||||
/* The same edge will appear in two arrays, and we can't free
|
||||
* it yet we still need to compare edge->side_type for the other
|
||||
* array that it is in. So store it in a hash table for later
|
||||
* freeing. Could also do this in a simple linked list.
|
||||
*/
|
||||
g_hash_table_insert (edges_to_be_freed, edge, edge);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Now free all the window edges (the key destroy function is g_free) */
|
||||
g_hash_table_destroy (edges_to_be_freed);
|
||||
|
||||
/* Now free the arrays and data */
|
||||
g_array_free (edge_data->left_edges, TRUE);
|
||||
g_array_free (edge_data->right_edges, TRUE);
|
||||
g_array_free (edge_data->top_edges, TRUE);
|
||||
g_array_free (edge_data->bottom_edges, TRUE);
|
||||
edge_data->left_edges = NULL;
|
||||
edge_data->right_edges = NULL;
|
||||
edge_data->top_edges = NULL;
|
||||
edge_data->bottom_edges = NULL;
|
||||
|
||||
/* Cleanup the timeouts */
|
||||
if (edge_data->left_data.timeout_setup &&
|
||||
@@ -814,7 +743,7 @@ stupid_sort_requiring_extra_pointer_dereference (gconstpointer a,
|
||||
{
|
||||
const MetaEdge * const *a_edge = a;
|
||||
const MetaEdge * const *b_edge = b;
|
||||
return meta_rectangle_edge_cmp (*a_edge, *b_edge);
|
||||
return meta_rectangle_edge_cmp_ignore_type (*a_edge, *b_edge);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -828,6 +757,31 @@ cache_edges (MetaDisplay *display,
|
||||
int num_left, num_right, num_top, num_bottom;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* 0th: Print debugging information to the log about the edges
|
||||
*/
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
if (meta_is_verbose())
|
||||
{
|
||||
int max_edges = MAX (MAX( g_list_length (window_edges),
|
||||
g_list_length (xinerama_edges)),
|
||||
g_list_length (screen_edges));
|
||||
char big_buffer[(EDGE_LENGTH+2)*max_edges];
|
||||
|
||||
meta_rectangle_edge_list_to_string (window_edges, ", ", big_buffer);
|
||||
meta_topic (META_DEBUG_EDGE_RESISTANCE,
|
||||
"Window edges for resistance : %s\n", big_buffer);
|
||||
|
||||
meta_rectangle_edge_list_to_string (xinerama_edges, ", ", big_buffer);
|
||||
meta_topic (META_DEBUG_EDGE_RESISTANCE,
|
||||
"Xinerama edges for resistance: %s\n", big_buffer);
|
||||
|
||||
meta_rectangle_edge_list_to_string (screen_edges, ", ", big_buffer);
|
||||
meta_topic (META_DEBUG_EDGE_RESISTANCE,
|
||||
"Screen edges for resistance : %s\n", big_buffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 1st: Get the total number of each kind of edge
|
||||
*/
|
||||
@@ -883,24 +837,23 @@ cache_edges (MetaDisplay *display,
|
||||
edge_data->left_edges = g_array_sized_new (FALSE,
|
||||
FALSE,
|
||||
sizeof(MetaEdge*),
|
||||
num_left);
|
||||
num_left + num_right);
|
||||
edge_data->right_edges = g_array_sized_new (FALSE,
|
||||
FALSE,
|
||||
sizeof(MetaEdge*),
|
||||
num_right);
|
||||
num_left + num_right);
|
||||
edge_data->top_edges = g_array_sized_new (FALSE,
|
||||
FALSE,
|
||||
sizeof(MetaEdge*),
|
||||
num_top);
|
||||
num_top + num_bottom);
|
||||
edge_data->bottom_edges = g_array_sized_new (FALSE,
|
||||
FALSE,
|
||||
sizeof(MetaEdge*),
|
||||
num_bottom);
|
||||
num_top + num_bottom);
|
||||
|
||||
/*
|
||||
* 3rd: Add the edges to the arrays
|
||||
*/
|
||||
num_left = num_right = num_top = num_bottom = 0;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
tmp = NULL;
|
||||
@@ -925,15 +878,13 @@ cache_edges (MetaDisplay *display,
|
||||
switch (edge->side_type)
|
||||
{
|
||||
case META_DIRECTION_LEFT:
|
||||
g_array_append_val (edge_data->left_edges, edge);
|
||||
break;
|
||||
case META_DIRECTION_RIGHT:
|
||||
g_array_append_val (edge_data->left_edges, edge);
|
||||
g_array_append_val (edge_data->right_edges, edge);
|
||||
break;
|
||||
case META_DIRECTION_TOP:
|
||||
g_array_append_val (edge_data->top_edges, edge);
|
||||
break;
|
||||
case META_DIRECTION_BOTTOM:
|
||||
g_array_append_val (edge_data->top_edges, edge);
|
||||
g_array_append_val (edge_data->bottom_edges, edge);
|
||||
break;
|
||||
default:
|
||||
@@ -973,12 +924,6 @@ initialize_grab_edge_resistance_data (MetaDisplay *display)
|
||||
edge_data->right_data.keyboard_buildup = 0;
|
||||
edge_data->top_data.keyboard_buildup = 0;
|
||||
edge_data->bottom_data.keyboard_buildup = 0;
|
||||
|
||||
edge_data->left_data.allow_past_screen_edge = TRUE;
|
||||
edge_data->right_data.allow_past_screen_edge = TRUE;
|
||||
edge_data->bottom_data.allow_past_screen_edge = TRUE;
|
||||
edge_data->top_data.allow_past_screen_edge =
|
||||
display->grab_anchor_root_y >= display->grab_initial_window_pos.y;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1181,6 +1126,7 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
gboolean is_keyboard_op)
|
||||
{
|
||||
MetaRectangle old_outer, proposed_outer, new_outer;
|
||||
gboolean is_resize;
|
||||
|
||||
if (window == window->display->grab_window &&
|
||||
window->display->grab_wireframe_active)
|
||||
@@ -1199,13 +1145,15 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
new_outer = proposed_outer;
|
||||
|
||||
window->display->grab_last_user_action_was_snap = snap;
|
||||
is_resize = FALSE;
|
||||
if (apply_edge_resistance_to_each_side (window->display,
|
||||
window,
|
||||
&old_outer,
|
||||
&new_outer,
|
||||
timeout_func,
|
||||
snap,
|
||||
is_keyboard_op))
|
||||
is_keyboard_op,
|
||||
is_resize))
|
||||
{
|
||||
/* apply_edge_resistance_to_each_side independently applies
|
||||
* resistance to both the right and left edges of new_outer as both
|
||||
@@ -1248,6 +1196,12 @@ meta_window_edge_resistance_for_move (MetaWindow *window,
|
||||
(BOX_LEFT (*reference) - BOX_LEFT (old_outer));
|
||||
*new_y = old_y + smaller_y_change +
|
||||
(BOX_TOP (*reference) - BOX_TOP (old_outer));
|
||||
|
||||
meta_topic (META_DEBUG_EDGE_RESISTANCE,
|
||||
"outer x & y move-to coordinate changed from %d,%d to %d,%d\n",
|
||||
proposed_outer.x, proposed_outer.y,
|
||||
old_outer.x + (*new_x - old_x),
|
||||
old_outer.y + (*new_y - old_y));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1266,7 +1220,8 @@ meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
gboolean is_keyboard_op)
|
||||
{
|
||||
MetaRectangle old_outer, new_outer;
|
||||
int new_outer_width, new_outer_height;
|
||||
int proposed_outer_width, proposed_outer_height;
|
||||
gboolean is_resize;
|
||||
|
||||
if (window == window->display->grab_window &&
|
||||
window->display->grab_wireframe_active)
|
||||
@@ -1279,24 +1234,31 @@ meta_window_edge_resistance_for_resize (MetaWindow *window,
|
||||
{
|
||||
meta_window_get_outer_rect (window, &old_outer);
|
||||
}
|
||||
new_outer_width = old_outer.width + (*new_width - old_width);
|
||||
new_outer_height = old_outer.height + (*new_height - old_height);
|
||||
proposed_outer_width = old_outer.width + (*new_width - old_width);
|
||||
proposed_outer_height = old_outer.height + (*new_height - old_height);
|
||||
meta_rectangle_resize_with_gravity (&old_outer,
|
||||
&new_outer,
|
||||
gravity,
|
||||
new_outer_width,
|
||||
new_outer_height);
|
||||
proposed_outer_width,
|
||||
proposed_outer_height);
|
||||
|
||||
window->display->grab_last_user_action_was_snap = snap;
|
||||
is_resize = TRUE;
|
||||
if (apply_edge_resistance_to_each_side (window->display,
|
||||
window,
|
||||
&old_outer,
|
||||
&new_outer,
|
||||
timeout_func,
|
||||
snap,
|
||||
is_keyboard_op))
|
||||
is_keyboard_op,
|
||||
is_resize))
|
||||
{
|
||||
*new_width = old_width + (new_outer.width - old_outer.width);
|
||||
*new_height = old_height + (new_outer.height - old_outer.height);
|
||||
|
||||
meta_topic (META_DEBUG_EDGE_RESISTANCE,
|
||||
"outer width & height got changed from %d,%d to %d,%d\n",
|
||||
proposed_outer_width, proposed_outer_height,
|
||||
new_outer.width, new_outer.height);
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user