Compare commits
251 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b413f5e7e0 | ||
![]() |
d75b9158bd | ||
![]() |
b5b127f083 | ||
![]() |
1206f9880e | ||
![]() |
629af6bb36 | ||
![]() |
08ca40aad9 | ||
![]() |
fa4c0bf54a | ||
![]() |
01f94925a5 | ||
![]() |
ae83b19b28 | ||
![]() |
9cdbfc53a8 | ||
![]() |
a13dbea266 | ||
![]() |
a236cfd7a8 | ||
![]() |
27b4e46a16 | ||
![]() |
9ddacb019e | ||
![]() |
a4a32a54c3 | ||
![]() |
8ff2a10c96 | ||
![]() |
586eda6199 | ||
![]() |
a522c3479e | ||
![]() |
e5a2ddd777 | ||
![]() |
77fb995c4c | ||
![]() |
0494e221af | ||
![]() |
6e77b6f656 | ||
![]() |
dbcf03535d | ||
![]() |
a644753073 | ||
![]() |
23b5ea0eee | ||
![]() |
a2b6ff6d42 | ||
![]() |
5ea067a1d8 | ||
![]() |
8b924ece14 | ||
![]() |
9615538389 | ||
![]() |
9c53e2f5f1 | ||
![]() |
81da59a8a4 | ||
![]() |
22eab481b1 | ||
![]() |
71cd8948d2 | ||
![]() |
288e10f7fe | ||
![]() |
a9e5560c36 | ||
![]() |
fcd56c3ef0 | ||
![]() |
7dc793c3be | ||
![]() |
2fc880db19 | ||
![]() |
60a453f5a0 | ||
![]() |
32a587e4a3 | ||
![]() |
8deed5d601 | ||
![]() |
f8b4a391e3 | ||
![]() |
2f3ed8ab65 | ||
![]() |
306fc4ee61 | ||
![]() |
5200e59ba3 | ||
![]() |
d06dee2778 | ||
![]() |
19105eedb2 | ||
![]() |
a252050cb8 | ||
![]() |
435bf3f2e4 | ||
![]() |
1fcd5e9704 | ||
![]() |
5188e9c4d0 | ||
![]() |
1d57293511 | ||
![]() |
ebbc388205 | ||
![]() |
fb5f3f6bb0 | ||
![]() |
5558451c11 | ||
![]() |
5727235572 | ||
![]() |
74fa2a7ab2 | ||
![]() |
e49cc883bb | ||
![]() |
3b54d71058 | ||
![]() |
2a90c0225d | ||
![]() |
f7e42bc4c4 | ||
![]() |
2ffc505c19 | ||
![]() |
154da1f68a | ||
![]() |
b45a357652 | ||
![]() |
7962cfa83e | ||
![]() |
2d89ba9c87 | ||
![]() |
00672554ed | ||
![]() |
f2c0ff8979 | ||
![]() |
dc52a32aad | ||
![]() |
bd779534af | ||
![]() |
cf0bd5bdc1 | ||
![]() |
5dcc25693a | ||
![]() |
1443f06471 | ||
![]() |
63a6f2121e | ||
![]() |
68fca2e5e5 | ||
![]() |
42182cbe77 | ||
![]() |
d08fa29612 | ||
![]() |
311f435120 | ||
![]() |
788ea66b1f | ||
![]() |
fa075eb8f1 | ||
![]() |
e1102bc6ff | ||
![]() |
f92eadf9d6 | ||
![]() |
34ec58af0a | ||
![]() |
b6389fbf60 | ||
![]() |
e26992e419 | ||
![]() |
40ea74f46c | ||
![]() |
971f3f1207 | ||
![]() |
3a39036dcb | ||
![]() |
3428ed1adf | ||
![]() |
81e4cb44aa | ||
![]() |
acb625ddeb | ||
![]() |
44508380dc | ||
![]() |
4d8414acfd | ||
![]() |
70d0446190 | ||
![]() |
793a630e2f | ||
![]() |
2936391fc8 | ||
![]() |
85826d0d9a | ||
![]() |
0a20419628 | ||
![]() |
2d4503ee59 | ||
![]() |
010e620a34 | ||
![]() |
3f6bad087d | ||
![]() |
c523d2827c | ||
![]() |
a53fea96ab | ||
![]() |
0bb8538e2f | ||
![]() |
03b3e98a51 | ||
![]() |
e0963e6b66 | ||
![]() |
6262db51a2 | ||
![]() |
58df4ee985 | ||
![]() |
85abc9bfe7 | ||
![]() |
993c7075f3 | ||
![]() |
4469a42a77 | ||
![]() |
bf965f8465 | ||
![]() |
f87a8c212f | ||
![]() |
3663ba0259 | ||
![]() |
b9900681e7 | ||
![]() |
3edad8599c | ||
![]() |
903f3d7e6e | ||
![]() |
051e404d09 | ||
![]() |
d1a853557b | ||
![]() |
f441033959 | ||
![]() |
0fa4954c46 | ||
![]() |
59958b0f0a | ||
![]() |
4549e42480 | ||
![]() |
1620fd5408 | ||
![]() |
1d692936e0 | ||
![]() |
6153a17a64 | ||
![]() |
b77590ba7a | ||
![]() |
c9df553d02 | ||
![]() |
967ac0f1d9 | ||
![]() |
ebf2c77c50 | ||
![]() |
c370a3e503 | ||
![]() |
9e2608524d | ||
![]() |
7fc6c99987 | ||
![]() |
3ad5618596 | ||
![]() |
4b02b0ddf1 | ||
![]() |
1ac3f938de | ||
![]() |
b422d86256 | ||
![]() |
8ac4e04e12 | ||
![]() |
d05cfba523 | ||
![]() |
6f458fc9d6 | ||
![]() |
a0d8c3c703 | ||
![]() |
11ee26bb65 | ||
![]() |
96e20f83bb | ||
![]() |
e841a492c8 | ||
![]() |
d93b0d319c | ||
![]() |
a7c344bbc5 | ||
![]() |
f64a231620 | ||
![]() |
a8f9e2e919 | ||
![]() |
9569096991 | ||
![]() |
2722c277ee | ||
![]() |
2eec8daff5 | ||
![]() |
75fa56391d | ||
![]() |
ec9cf27a81 | ||
![]() |
0996da5e8e | ||
![]() |
a8708e1c55 | ||
![]() |
7c5e40e0ea | ||
![]() |
e1d2b95459 | ||
![]() |
9bd17f4fae | ||
![]() |
40ec58787f | ||
![]() |
304fae9369 | ||
![]() |
72a7f57e5d | ||
![]() |
0fee2ac499 | ||
![]() |
708a86cfee | ||
![]() |
04fcad7c13 | ||
![]() |
ebbc4c499b | ||
![]() |
3c8b051e31 | ||
![]() |
d34e54785d | ||
![]() |
51e74d4027 | ||
![]() |
2d662f67a5 | ||
![]() |
67cbbeb6c1 | ||
![]() |
cc7493cac9 | ||
![]() |
be96be95f6 | ||
![]() |
6b144cd2eb | ||
![]() |
38412b4460 | ||
![]() |
b8287d3aca | ||
![]() |
5eb4eea57e | ||
![]() |
af3b5b77b1 | ||
![]() |
5f75334d57 | ||
![]() |
4481be72d1 | ||
![]() |
c595a7ac0f | ||
![]() |
fa3de81741 | ||
![]() |
6094763def | ||
![]() |
4e96dd7ea6 | ||
![]() |
6e6e85632a | ||
![]() |
6af9a11361 | ||
![]() |
8377c7776c | ||
![]() |
73cce3b174 | ||
![]() |
947adb6d07 | ||
![]() |
d0f1f084e8 | ||
![]() |
c27d89218c | ||
![]() |
15c5ddbec4 | ||
![]() |
546679cbd1 | ||
![]() |
b54c422b93 | ||
![]() |
5049fdc13a | ||
![]() |
d8bb7c8ae9 | ||
![]() |
61d5423b5d | ||
![]() |
d85012ecfd | ||
![]() |
fb9ad1eb13 | ||
![]() |
8764b89942 | ||
![]() |
48bc82e82f | ||
![]() |
e8d63890fc | ||
![]() |
6ed08019c2 | ||
![]() |
00d6f549f9 | ||
![]() |
02a491c1bc | ||
![]() |
ed25155fc1 | ||
![]() |
e65a70ded9 | ||
![]() |
3b49b81ff5 | ||
![]() |
bdcc6cb20d | ||
![]() |
e616f930d3 | ||
![]() |
536d51183c | ||
![]() |
6a3c1fbe57 | ||
![]() |
2cca0f0eac | ||
![]() |
cdb4e2541c | ||
![]() |
9b03b75aaf | ||
![]() |
f5072b7f3a | ||
![]() |
b60bb724aa | ||
![]() |
7d7f8aab93 | ||
![]() |
3b133195fd | ||
![]() |
18990530b0 | ||
![]() |
b424364710 | ||
![]() |
4fb05e54ab | ||
![]() |
3ee5ad8b12 | ||
![]() |
b73ea5eb0a | ||
![]() |
e710d9f1b8 | ||
![]() |
ae07c8677d | ||
![]() |
2a24562f45 | ||
![]() |
b7d27d9114 | ||
![]() |
5169a06dd0 | ||
![]() |
e868a001f9 | ||
![]() |
a8526454b0 | ||
![]() |
fabc5507f3 | ||
![]() |
82bd20911c | ||
![]() |
95d747269b | ||
![]() |
d02dbd62e9 | ||
![]() |
bcb9de9198 | ||
![]() |
3558657e53 | ||
![]() |
1187edeadb | ||
![]() |
0c684c6f35 | ||
![]() |
c1b863ee75 | ||
![]() |
8922b0ecc6 | ||
![]() |
6cd916ea39 | ||
![]() |
4b18f64914 | ||
![]() |
1e6a8a31d1 | ||
![]() |
9e7a26500c | ||
![]() |
5d862ac29b | ||
![]() |
25b9a9e37d | ||
![]() |
da7918554e | ||
![]() |
e45eda148b | ||
![]() |
b24308eab1 | ||
![]() |
366399eb0c | ||
![]() |
25615f929e |
37
HACKING
37
HACKING
@@ -1,3 +1,40 @@
|
||||
Making a release
|
||||
===
|
||||
|
||||
To make a release of metacity, do the following:
|
||||
|
||||
- check out a fresh copy from CVS
|
||||
|
||||
- increment the version number in configure.in,
|
||||
see the comment above the version for the next fibonacci number
|
||||
|
||||
- update the file NEWS based on the ChangeLog
|
||||
|
||||
- add a ChangeLog entry containing the version number
|
||||
you're releasing ("Released 2.5.4" or something)
|
||||
so people can see which changes were before and after
|
||||
a given release.
|
||||
|
||||
- "make distcheck" (DO NOT just "make dist" - pass the check!)
|
||||
|
||||
- if make distcheck fails, fix it.
|
||||
|
||||
- once distcheck succeeds, "cvs commit"
|
||||
|
||||
- if someone else made changes and the commit fails,
|
||||
you have to "cvs up" and run "make distcheck" again
|
||||
|
||||
- once the commit succeeds, WITHOUT cvs updating, "cvs tag
|
||||
METACITY_X_Y_Z" where
|
||||
X_Y_Z map to version X.Y.Z
|
||||
|
||||
- scp the tarball to master.gnome.org
|
||||
|
||||
- run install-module on master.gnome.org to install the tarball
|
||||
on the ftp site
|
||||
|
||||
Misc stuff
|
||||
===
|
||||
|
||||
Don't commit substantive code in here without asking me,
|
||||
hp@redhat.com. Adding translations, no-brainer typo fixes, etc. is
|
||||
|
@@ -1,5 +1,5 @@
|
||||
|
||||
SUBDIRS=src po doc
|
||||
|
||||
EXTRA_DIST=HACKING metacity.spec.in metacity.spec \
|
||||
EXTRA_DIST=HACKING rationales.txt \
|
||||
intltool-extract.in intltool-merge.in intltool-update.in
|
||||
|
134
NEWS
134
NEWS
@@ -1,3 +1,137 @@
|
||||
2.6.0
|
||||
===
|
||||
|
||||
- some additional translations
|
||||
|
||||
2.5.5
|
||||
===
|
||||
|
||||
Thanks to Rob Adams, Arvind Samptur, Andreas Volz, Ray Strode, John
|
||||
Paul Wallington, Soeren Sandmann for contributions to this release.
|
||||
And as always thanks to the translators.
|
||||
|
||||
- fix aspect ratio handling
|
||||
- fix "shake loose" functionality for maximized windows
|
||||
- handle Xrandr size changes properly again
|
||||
- fix fullscreen window detection
|
||||
- fix workspace name handling
|
||||
- don't steal button press events on root window
|
||||
- nuke metacity.spec due to nonmaintenance
|
||||
- allow too-large-for-screen windows to move their titlebar offscreen
|
||||
- keep an MRU list of windows per-workspace and use it to focus
|
||||
the next window when the focused window disappears
|
||||
- fix cursor when moving
|
||||
- improve appearance of opaque resize
|
||||
- make BELOW window state work
|
||||
- fix a crash when gdk_pixmap_foreign_new() returned NULL
|
||||
|
||||
2.5.3
|
||||
===
|
||||
|
||||
Thanks to Jordi Mallach, Padraig O'Briain, Rob Adams, Julio Merino,
|
||||
Ben Jansens, Jurg Billeter, Ray Strode, marcus@freebsd.org, James
|
||||
Laska, for contributions to this release. Thanks also to
|
||||
all the tireless translators.
|
||||
|
||||
- fixups to .desktop file
|
||||
- activate window prior to grab end, avoiding
|
||||
extra focus events
|
||||
- add support for partial-width panels (fixes corner panel
|
||||
and xinerama window position constraints)
|
||||
- added keybinding to toggle window as "always on top"
|
||||
- support --disable-schemas-install option to configure
|
||||
- destroy support for legacy GNOME 1.x hints; metacity
|
||||
no longer works with GNOME 1.x
|
||||
- disable raise-on-click for mouse focus modes
|
||||
- fix bug that broke many Javascript popup menus with mozilla
|
||||
- allow "shaking loose" maximized windows, to move them
|
||||
between Xinerama heads or whatever
|
||||
- honor desktop-wide double click timeout
|
||||
- handle window placement properly for windows that
|
||||
start out maximized
|
||||
- integrate Ximian patch to go ahead and log out after 4 minutes
|
||||
even if a dialog is open
|
||||
- fix a segfault
|
||||
- fix bug where window groups weren't always kept up to date
|
||||
- fix bug where focus got confused when switching workspaces
|
||||
with mouse focus mode
|
||||
- fix 64-bit crash on s390x
|
||||
- chdir to user's homedir on startup
|
||||
- keep window in fullscreen layer when its transients are focused
|
||||
- fix keybindings bug when you had ScrollLock enabled
|
||||
- many translation updates
|
||||
|
||||
2.5.2
|
||||
===
|
||||
|
||||
Thanks to David Santiago, Julien Olivier, Anders Carlsson, Rob Adams
|
||||
for fixes in this release.
|
||||
|
||||
- improved wording/UI for some dialogs
|
||||
- while clicking a window button, if you move the mouse outside
|
||||
the button such that releasing the mouse button won't activate
|
||||
the window button, visually indicate by "popping out" the button.
|
||||
- fix some valgrind errors
|
||||
- change "show desktop mode" to convert to "everything is minimized
|
||||
mode" if you open a new window while showing desktop, rather
|
||||
than previous behavior of simply leaving show desktop mode.
|
||||
- fix a trivial memory leak
|
||||
- change "move to workspace N" so it doesn't switch workspaces,
|
||||
just moves the window.
|
||||
- translation updates
|
||||
|
||||
2.5.1
|
||||
===
|
||||
|
||||
Thanks to Rob Adams, Peter O'Shea, Dafydd Harries, Masahiro Sakai,
|
||||
Soeren Sandmann for fixes in this release.
|
||||
|
||||
- fix bug where fullscreen windows were below top panels
|
||||
- build fix for Solaris
|
||||
- support diagonal window movement with numeric keypad
|
||||
- multihead fix
|
||||
- build fix for Cygwin
|
||||
- place on xinerama containing the pointer
|
||||
- fix totally hosed window placement/movement for frameless
|
||||
windows
|
||||
- improvement to smoothness of window move/resize
|
||||
|
||||
2.5.0
|
||||
===
|
||||
|
||||
Thanks to Rob Adams, Owen Taylor, Frederic Crozat, Arvind Samptur,
|
||||
Bill Haneman, Akira Tagoh for help with fixes in this release.
|
||||
|
||||
- many new translations
|
||||
- fix an infinite loop while holding a server grab triggered by
|
||||
some recent Qt versions doing weird stuff
|
||||
- fix bug where Alt+rightclick repeatedly on titlebar resulted
|
||||
in zillions of menus
|
||||
- fix Alt+Tab to *actually* put minimized windows at the end,
|
||||
though this was always intended
|
||||
- rewrite size/positions constraint code (currently known
|
||||
to be quite buggy, e.g. xmms is hosed)
|
||||
- enforce size of at least 1x1 on windows
|
||||
- reduce latency of managing new windows still further
|
||||
by using async properties code in more places
|
||||
- don't grab keybindings on docks, so gnome-panel
|
||||
can handle them
|
||||
- suck in the panel's screenshot and run dialog global
|
||||
bindings
|
||||
- lots of improvements to window placement
|
||||
- sync max number of workspaces with pager applet
|
||||
- fix to keep focus when inside window frame in
|
||||
strict mouse focus mode
|
||||
- make it possible to start a reverse tab with
|
||||
shift+alt+tab (vs. alt+tab then shift)
|
||||
- fix a multihead issue with constraints between two
|
||||
windows on different heads
|
||||
- require GTK+ 2.2.0 and fontconfig
|
||||
- default theme is now Simple
|
||||
- add visual bell feature
|
||||
- incorporate many fixes from 2.4.34
|
||||
- other stuff
|
||||
|
||||
2.4.13
|
||||
===
|
||||
|
||||
|
23
README
23
README
@@ -6,15 +6,18 @@ on UNIX keyboards.
|
||||
The first release of Metacity was version 2.3. Metacity has no need for
|
||||
your petty hangups about version numbers.
|
||||
|
||||
The stable releases so far are 2.4.x, 2.6.x
|
||||
|
||||
Unstable branches are 2.3.x, 2.5.x
|
||||
|
||||
COMPILING METACITY
|
||||
===
|
||||
|
||||
You need GTK+ 2.0, ideally the latest in the 2.0.x series. For
|
||||
multihead/Xinerama support to work, you need GTK+ 2.2. For
|
||||
startup notification to work you need libstartup-notification at
|
||||
You need GTK+ 2.2. For startup notification to work you need
|
||||
libstartup-notification at
|
||||
http://www.freedesktop.org/software/startup-notification/ or on the
|
||||
GNOME ftp site. You also need GConf 1.2 (unless building a funky
|
||||
extra-small embedded metacity with --disable-gconf).
|
||||
GNOME ftp site. You also need GConf 1.2 (unless building a funky
|
||||
extra-small embedded metacity with --disable-gconf, see below).
|
||||
|
||||
REPORTING BUGS AND SUBMITTING PATCHES
|
||||
===
|
||||
@@ -78,7 +81,7 @@ METACITY FEATURES
|
||||
- Does not expose the concept of "window manager" to the user. Some
|
||||
of the features in the GNOME control panel and other parts of the
|
||||
desktop happen to be implemented in metacity, such as changing your
|
||||
window border theme, or changing your window navigation shorcuts,
|
||||
window border theme, or changing your window navigation shortcuts,
|
||||
but the user doesn't need to know this.
|
||||
|
||||
- Includes only the window manager; does not try to be a desktop
|
||||
@@ -369,7 +372,10 @@ A: This one is also in rationales.txt. Because "ouija board" UI, where
|
||||
|
||||
Q: Why no wireframe move/resize?
|
||||
|
||||
A: Also in rationales.txt. Because it has low usability, and is a pain
|
||||
A: It's implemented in a patch that will be merged for GNOME 2.6
|
||||
and is already in some vendor packages.
|
||||
|
||||
But: Because it has low usability, and is a pain
|
||||
to implement, and there's no reason opaque move/resize should be a
|
||||
problem on any setup that can run a modern desktop worth a darn to
|
||||
begin with.
|
||||
@@ -378,6 +384,9 @@ A: Also in rationales.txt. Because it has low usability, and is a pain
|
||||
http://pobox.com/~hp/free-software-ui.html
|
||||
http://pobox.com/~hp/features.html
|
||||
|
||||
The reason we had to add wireframe anyway was broken
|
||||
proprietary apps that can't handle lots of resize events.
|
||||
|
||||
Q: Why no XYZ?
|
||||
|
||||
A: You are probably getting the idea by now - check rationales.txt,
|
||||
|
40
configure.in
40
configure.in
@@ -5,7 +5,7 @@ AM_CONFIG_HEADER(config.h)
|
||||
|
||||
# 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987
|
||||
# releases on a branch add a 4th version like 2.4.21.1
|
||||
AM_INIT_AUTOMAKE(metacity, 2.4.13)
|
||||
AM_INIT_AUTOMAKE(metacity, 2.6.0)
|
||||
|
||||
# Honor aclocal flags
|
||||
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
|
||||
@@ -20,6 +20,7 @@ AC_PROG_INTLTOOL([0.21])
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
AC_HEADER_STDC
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
|
||||
changequote(,)dnl
|
||||
@@ -83,7 +84,7 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.0.0'
|
||||
METACITY_PC_MODULES='gtk+-2.0 >= 2.2.0 pango >= 1.2.0'
|
||||
|
||||
AC_ARG_ENABLE(config-dialog, [ --enable-config-dialog enable the config dialog that you need with GNOME 2.0 (obsolete with GNOME 2.2)],,enable_config_dialog=no)
|
||||
|
||||
@@ -116,15 +117,21 @@ AC_ARG_ENABLE(shape, [ --disable-shape disable metacity's use
|
||||
## try definining HAVE_BACKTRACE
|
||||
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
|
||||
|
||||
ALL_LINGUAS="am az bg ca cs da de el es fi fr gl he hu it ja ko lv mk ms no pl pt pt_BR ro ru sk sv tr uk vi zh_CN zh_TW"
|
||||
ALL_LINGUAS="am az be bg ca cs cy da de el en_GB es fa fi fr ga gl he hi hu id is it ja ko lv mk ml mn ms nl no pl pt pt_BR ro ru sl sk sq sr sr@Latn sv tr uk vi wa zh_CN zh_TW"
|
||||
AM_GLIB_GNU_GETTEXT
|
||||
|
||||
## here we get the flags we'll actually use
|
||||
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.0.0)
|
||||
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.0.0)
|
||||
PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-2.0 >= 2.2.0)
|
||||
PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-2.0 >= 2.2.0)
|
||||
|
||||
if test x$enable_config_dialog = xyes; then
|
||||
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.0.0 gconf-2.0 >= 1.1.9 libglade-2.0)
|
||||
PKG_CHECK_MODULES(METACITY_PROPS, gtk+-2.0 >= 2.2.0 gconf-2.0 >= 1.1.9 libglade-2.0)
|
||||
fi
|
||||
|
||||
if $PKG_CONFIG --atleast-version 1.2.0 pangoxft; then
|
||||
echo "pangoxft found"
|
||||
else
|
||||
AC_MSG_ERROR("Pango 1.2.0 or greater based on Xft2 is required")
|
||||
fi
|
||||
|
||||
STARTUP_NOTIFICATION_VERSION=0.4
|
||||
@@ -155,13 +162,6 @@ fi
|
||||
|
||||
PKG_CHECK_MODULES(METACITY, $METACITY_PC_MODULES)
|
||||
|
||||
if $PKG_CONFIG --atleast-version 2.2.0 gtk+-2.0; then
|
||||
AC_DEFINE(HAVE_GTK_MULTIHEAD,,[gtk+ with multihead support found])
|
||||
with_multihead=yes
|
||||
else
|
||||
with_multihead=no
|
||||
fi
|
||||
|
||||
AC_PATH_XTRA
|
||||
|
||||
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
@@ -235,6 +235,17 @@ if test "x$found_shape" = "xyes"; then
|
||||
AC_DEFINE(HAVE_SHAPE, , [Have the shape extension library])
|
||||
fi
|
||||
|
||||
found_xkb=no
|
||||
AC_CHECK_LIB(X11, XkbQueryExtension,
|
||||
[AC_CHECK_HEADER(X11/XKBlib.h,
|
||||
found_xkb=yes)],
|
||||
, $ALL_X_LIBS)
|
||||
|
||||
if test "x$found_xkb" = "xyes"; then
|
||||
AC_DEFINE(HAVE_XKB, , [Have keyboard extension library])
|
||||
fi
|
||||
|
||||
|
||||
RANDR_LIBS=
|
||||
found_randr=no
|
||||
AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
|
||||
@@ -341,7 +352,6 @@ src/libmetacity-private.pc
|
||||
src/tools/Makefile
|
||||
src/themes/Makefile
|
||||
po/Makefile.in
|
||||
metacity.spec
|
||||
])
|
||||
|
||||
if test x$enable_gconf = xno; then
|
||||
@@ -373,7 +383,6 @@ metacity-$VERSION:
|
||||
GConf: ${enable_gconf}
|
||||
XFree86 Xinerama: ${use_xfree_xinerama}
|
||||
Solaris Xinerama: ${use_solaris_xinerama}
|
||||
Multihead: ${with_multihead}
|
||||
Startup notification: ${have_startup_notification}
|
||||
Session management: ${found_sm}
|
||||
Shape extension: ${found_shape}
|
||||
@@ -381,3 +390,4 @@ metacity-$VERSION:
|
||||
Xsync: ${found_xsync}
|
||||
Deprecated config dialog: ${enable_config_dialog}
|
||||
"
|
||||
echo "This is the UNSTABLE branch of metacity, use 2.4.x for stable (gnome-2-2 branch in CVS)"
|
||||
|
@@ -1,2 +1,2 @@
|
||||
|
||||
EXTRA_DIST=theme-format.txt metacity-theme.dtd
|
||||
EXTRA_DIST=theme-format.txt metacity-theme.dtd dialogs.txt
|
||||
|
32
doc/dialogs.txt
Normal file
32
doc/dialogs.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
Dialogs which have no transient parent or root window being
|
||||
their tranisent parent are the ones which will be visible in
|
||||
the tasklist.
|
||||
|
||||
All such dialogs will be *always* on top of the window
|
||||
group i.e they would transients for the whole group.
|
||||
|
||||
|
||||
1) Modal dialogs
|
||||
|
||||
|
||||
* If you wish to open another window from a modal dialog
|
||||
|
||||
open *only* a modal dialog and set it's transient parent.
|
||||
|
||||
|
||||
2) Normal dialog
|
||||
|
||||
|
||||
without transient parent
|
||||
|
||||
* If you wish to open another window from a normal dialog
|
||||
|
||||
open either a normal dialog or a modal dialog only.
|
||||
Set the transient parent for the child dialog if you do not
|
||||
want them to be transient for all the other windows in the group.
|
||||
|
||||
with transient parent
|
||||
|
||||
* If you wish to open another window from a normal dialog
|
||||
|
||||
you could open any type of window.
|
@@ -1,87 +0,0 @@
|
||||
%define ver @VERSION@
|
||||
%define RELEASE 1
|
||||
%define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}
|
||||
|
||||
Summary: Metacity window manager
|
||||
Name: metacity
|
||||
Version: %ver
|
||||
Release: %rel
|
||||
URL: http://people.redhat.com/~hp/metacity/
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
License: GPL
|
||||
Group: User Interface/Desktops
|
||||
BuildRoot: %{_tmppath}/%{name}-root
|
||||
BuildRequires: gtk2-devel >= 2.0.0
|
||||
BuildRequires: GConf2-devel >= 1.1.9
|
||||
|
||||
%description
|
||||
|
||||
Metacity is a simple window manager that integrates nicely with
|
||||
GNOME 2.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%configure
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
|
||||
%makeinstall
|
||||
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post
|
||||
|
||||
export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
|
||||
SCHEMAS="metacity.schemas"
|
||||
for S in $SCHEMAS; do
|
||||
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null
|
||||
done
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc README AUTHORS COPYING NEWS HACKING theme-format.txt
|
||||
%{_bindir}/*
|
||||
%{_libexecdir}/*
|
||||
%{_datadir}/gnome/wm-properties/*
|
||||
%{_sysconfdir}/gconf/schemas/*.schemas
|
||||
%{_datadir}/control-center-2.0/capplets/*
|
||||
%{_datadir}/metacity
|
||||
%{_datadir}/pixmaps/*
|
||||
%{_datadir}/themes/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 20 2002 Steve Fox <drfickle@k-lug.org>
|
||||
- Autoconf-ize the spec file to magic updates
|
||||
- Include missing dirs
|
||||
|
||||
* Thu May 2 2002 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.233
|
||||
|
||||
* Thu Apr 25 2002 Havoc Pennington <hp@redhat.com>
|
||||
- rebuild in different environment
|
||||
- add gconf schemas boilerplate
|
||||
|
||||
* Mon Apr 15 2002 Havoc Pennington <hp@pobox.com>
|
||||
- 2.3.89
|
||||
|
||||
* Tue Oct 30 2001 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.34
|
||||
|
||||
* Fri Oct 13 2001 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.21
|
||||
|
||||
* Mon Sep 17 2001 Havoc Pennington <hp@redhat.com>
|
||||
- 2.3.8
|
||||
- 2.3.13
|
||||
|
||||
* Wed Sep 5 2001 Havoc Pennington <hp@redhat.com>
|
||||
- Initial build.
|
||||
|
||||
|
471
po/ChangeLog
471
po/ChangeLog
@@ -1,3 +1,474 @@
|
||||
2003-09-08 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
* vi.po: Updated Vietnamese file
|
||||
* az.po,sq.po: Fixed syntax errors
|
||||
|
||||
2003-09-07 Nikos Charonitakis <frolix68@yahoo.gr>
|
||||
|
||||
* el.po: Review of Greek translation.
|
||||
|
||||
2003-09-06 Takeshi AIHANA <aihana@gnome.gr.jp>
|
||||
|
||||
* ja.po: Fixed mistranslations for Japanese.
|
||||
|
||||
2003-09-05 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian translation.
|
||||
|
||||
2003-09-04 Laurent Dhima <laurenti@alblinux.net>
|
||||
|
||||
* sq.po: Updated Albanian translation.
|
||||
|
||||
2003-09-03 Guntupalli Karunakar <karunakar@freedomink.org>
|
||||
|
||||
* hi.po: Updated Hindi translations.
|
||||
|
||||
2003-09-03 Mugurel Tudor <mugurelu@go.ro>
|
||||
|
||||
* ro.po: Updated Romanian translation
|
||||
|
||||
2003-09-01 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
|
||||
|
||||
* sk.po: Updated Slovak translation.
|
||||
|
||||
2003-08-29 Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
* cy.po: Updated Welsh translation.
|
||||
|
||||
2003-08-27 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Revision of Spanish translation by
|
||||
Francisco Javier F. Serrador <serrador@arrakis.es>.
|
||||
|
||||
2003-08-26 Guntupalli Karunakar <karunakar@freedomink.org>
|
||||
|
||||
* hi.po: Added Hindi translation.
|
||||
|
||||
2003-08-25 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Fixed missing accel in Portuguese translation.
|
||||
|
||||
2003-08-26 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
* ko.po: Updated Korean translation by
|
||||
Young-Ho Cha <ganadist at mizi.com>.
|
||||
|
||||
2003-08-24 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
* ko.po: Updated Korean translation.
|
||||
|
||||
2003-08-22 Stanislav Visnovsky <visnovsky@nenya.ms.mff.cuni.cz>
|
||||
|
||||
* sk.po: Update Slovak translation.
|
||||
|
||||
2003-08-20 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Update Norwegian translation.
|
||||
|
||||
2003-08-19 Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
* cy.po: Updated Welsh translation.
|
||||
|
||||
2003-08-18 Danilo Šegan <dsegan@gmx.net>
|
||||
|
||||
* be.po: Updated Belarusian translation by Ales Nyakhaychyk
|
||||
<nab@mail.by>.
|
||||
|
||||
2003-08-18 Metin Amiroff <metin@karegen.com>
|
||||
|
||||
* az.po: Updated Azerbaijani translation.
|
||||
|
||||
2003-08-16 Pauli Virtanen <pauli.virtanen@hut.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2003-08-13 Laurent Dhima <laurenti@alblinux.net>
|
||||
|
||||
* sq.po: Added Albanian file.
|
||||
|
||||
2003-08-12 Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
* cy.po: Updated Welsh translation.
|
||||
|
||||
2003-08-09 Wang Jian <lark@linux.net.cn>
|
||||
|
||||
* zh_CN.po: Updated Simplified Chinese translation by
|
||||
Funda Wang <fundawang@linux.net.cn>.
|
||||
|
||||
2003-08-09 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation.
|
||||
|
||||
2003-08-08 Danilo Šegan <dsegan@gmx.net>
|
||||
|
||||
* sr.po, sr@Latn.po: Updated Serbian translation.
|
||||
|
||||
2003-08-07 Hasbullah Bin Pit <sebol@ikhlas.com>
|
||||
|
||||
* ms.po: Updated Malay translation.
|
||||
|
||||
2003-08-06 Metin Amiroff <metin@karegen.com>
|
||||
|
||||
* az.po: Updated Azerbaijani translation.
|
||||
|
||||
2003-08-05 Ole Laursen <olau@hardworking.dk>
|
||||
|
||||
* da.po: Updated Danish translation.
|
||||
|
||||
2003-08-05 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2003-07-29 Andras Timar <timar@gnome.hu>
|
||||
|
||||
* hu.po: Updated Hungarian translation.
|
||||
|
||||
2003-07-25 Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
* cy.po: Updated Welsh translation.
|
||||
|
||||
2003-07-24 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
* vi.po: Updated Vietnamese file
|
||||
* is.po: fixed syntax error
|
||||
|
||||
2003-07-20 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation.
|
||||
|
||||
2003-07-20 Takeshi AIHANA <aihana@gnome.gr.jp>
|
||||
|
||||
* ja.po: Updated Japanese translation.
|
||||
|
||||
2003-07-18 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
|
||||
2002-07-17 Kostas Papadimas <pkst@gmx.net>
|
||||
|
||||
* el.po: Updated Greek translation.
|
||||
|
||||
2003-07-17 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
|
||||
|
||||
* nl.po: Dutch translation updated by Tino Meinen.
|
||||
|
||||
2003-07-12 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2003-07-12 Pablo Saratxaga <pablo@mandrakesoft.com>
|
||||
|
||||
* wa.po: Added Walloon file
|
||||
|
||||
2003-07-12 Alessio Frusciante <algol@firenze.linux.it>
|
||||
|
||||
* it.po: Updated Italian translation.
|
||||
|
||||
2003-07-07 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
|
||||
|
||||
* nl.po: Dutch translation updated by Kees van den Broek.
|
||||
|
||||
2003-07-07 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* zh_TW.po: Updated traditional Chinese translation.
|
||||
|
||||
2003-07-06 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation.
|
||||
|
||||
2003-07-02 Artur Flinta <aflinta@cvs.gnome.org>
|
||||
|
||||
* pl.po: Updated Polish translation.
|
||||
|
||||
2003-06-28 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-06-28 Miloslav Trmac <mitr@volny.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2003-06-28 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2003-06-27 Mohammad DAMT <mdamt@bisnisweb.com>
|
||||
|
||||
* id.po: Updated Indonesian translation
|
||||
|
||||
2003-06-26 Ole Laursen <olau@hardworking.dk>
|
||||
|
||||
* da.po: Updated Danish translation.
|
||||
|
||||
2003-06-26 Mohammad DAMT <mdamt@bisnisweb.com>
|
||||
|
||||
* id.po: Added Indonesian translation
|
||||
|
||||
2003-06-23 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
|
||||
|
||||
* nl.po: Dutch translation updated by Kees van den Broek.
|
||||
|
||||
2003-06-22 Samúel Jón Gunnarsson <sammi@techattack.nu>
|
||||
|
||||
* is.po: Added Icelandic translation
|
||||
|
||||
2003-06-21 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation.
|
||||
|
||||
2003-06-17 Pauli Virtanen <pauli.virtanen@hut.fi>
|
||||
|
||||
* fi.po: Updated Finnish translation.
|
||||
|
||||
2003-06-12 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2003-06-08 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation.
|
||||
|
||||
2003-06-07 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2003-06-06 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-06-04 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* be.po: Updated Belarusian translation
|
||||
from Belarusian team <i18n@mova.org>.
|
||||
|
||||
2003-06-04 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* ru.po: Updated Russian translation
|
||||
from Russian team <gnome-cyr@gnome.org>.
|
||||
|
||||
|
||||
2003-05-31 Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
* cy.po: Updated Welsh translation.
|
||||
|
||||
2003-05-30 Paul Duffy <dubhthach@frink.nuigalway.ie>
|
||||
|
||||
* ga.po: Updated Irish Translation.
|
||||
|
||||
2003-05-30 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* zh_TW.po: Updated traditional Chinese translation.
|
||||
|
||||
2003-05-26 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
|
||||
2003-05-21 Miloslav Trmac <mitr@volny.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2003-05-20 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2003-05-19 Telsa Gwymme <hobbit@aloss.ukuu.org.uk>
|
||||
|
||||
* cy.po: Updated Welsh translation from
|
||||
Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
2003-05-19 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation.
|
||||
|
||||
2003-05-16 Telsa Gwynne <hobbit@aloss.ukuu.org.uk>
|
||||
|
||||
* cy.po: Added Welsh translation from
|
||||
Dafydd Harries <daf@parnassus.ath.cx>
|
||||
|
||||
2003-05-16 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Updated Spanish translation.
|
||||
|
||||
2003-05-12 Duarte Loreto <happyguy_pt@hotmail.com>
|
||||
|
||||
* pt.po: Updated Portuguese translation.
|
||||
|
||||
2003-05-10 KAMAGASAKO Masatoshi <emerald@gnome.gr.jp>
|
||||
|
||||
* ja.po: Updated Japanese translation.
|
||||
|
||||
2003-05-10 Jordi Mallach <jordi@sindominio.net>
|
||||
|
||||
* ca.po: Updated Catalan translation.
|
||||
|
||||
2003-05-09 Evandro Fernandes Giovanini <evandrofg@ig.com.br>
|
||||
|
||||
* pt_BR.po: Updated Brazilian Portuguese translation.
|
||||
|
||||
2003-05-08 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Updated Swedish translation.
|
||||
|
||||
2003-05-08 Changwoo Ryu <cwryu@debian.org>
|
||||
|
||||
* ko.po: Updated Korean translation.
|
||||
|
||||
2003-05-06 Danilo Šegan <dsegan@gmx.net>
|
||||
|
||||
* sr.po, sr@Latn.po: Added Serbian translation by
|
||||
http://Prevod.org/.
|
||||
|
||||
2003-04-29 Miloslav Trmac <mitr@volny.cz>
|
||||
|
||||
* cs.po: Updated Czech translation.
|
||||
|
||||
2003-04-15 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* ru.po: updated Russian translation
|
||||
from Russian team <gnome-cyr@gnome.org>.
|
||||
|
||||
2003-04-03 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation.
|
||||
|
||||
2003-03-27 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation.
|
||||
|
||||
2003-03-13 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* ml.po: Added Malayalam translation by
|
||||
FSF-India <locale@gnu.org.in>.
|
||||
|
||||
2003-03-11 Paul Duffy <dubhthach@zion.nuigalway.ie>
|
||||
|
||||
* ga.po: Added Irish translation
|
||||
|
||||
2003-03-10 Roozbeh Pournader <roozbeh@sharif.edu>
|
||||
|
||||
* fa.po: Added Persian translation.
|
||||
|
||||
2003-02-26 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* be.po: Added Belarusian translation
|
||||
from Belarusian team <i18n@infonet.by>.
|
||||
|
||||
2003-02-25 Pablo Gonzalo del Campo <pablodc@bigfoot.com>
|
||||
|
||||
* es.po: Fixed a translation string to match with libwnck.
|
||||
|
||||
2003-02-22 Rob Adams <robadams@ucla.edu>
|
||||
|
||||
* *.po: change toggle_maximized to toggle_maximize and
|
||||
toggle_shaded to toggle_shade in action_double_click_titlebar long
|
||||
description to match the values used by metacity
|
||||
|
||||
2003-02-12 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Some fixes for problems catched in translation review.
|
||||
|
||||
2003-02-11 Fatih Demir <kabalak@gtranslator.org>
|
||||
|
||||
* tr.po: Branchy.
|
||||
|
||||
2003-02-09 Fatih Demir <kabalak@gtranslator.org>
|
||||
|
||||
* tr.po: Take over from branch...
|
||||
|
||||
2003-02-08 Fatih Demir <kabalak@gtranslator.org>
|
||||
|
||||
* tr.po: Committed updated Turkish translation by Sinan.
|
||||
|
||||
2003-02-05 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* en_GB.po: Fix header.
|
||||
* ko.po, pt_BR.po: Fix positional parameters.
|
||||
|
||||
2003-02-05 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* zh_TW.po: Updated traditional Chinese translation.
|
||||
|
||||
2003-02-03 Daniel Yacob <locales@geez.org>
|
||||
|
||||
* am.po: Updated Amharic translation.
|
||||
|
||||
2003-01-30 Marius Andreiana <marius galuna.ro>
|
||||
|
||||
* ro.po: updated ( thanks to Mugurel Tudor )
|
||||
|
||||
2003-01-25 Christophe Merlet <redfox@redfoxcenter.org>
|
||||
|
||||
* fr.po: Updated French translation from
|
||||
Guy Clotilde <guy.clotilde@wanadoo.fr>.
|
||||
|
||||
2003-01-25 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmal) translation.
|
||||
|
||||
2003-01-23 He Qiangqiang <carton@linux.net.cn>
|
||||
|
||||
* zh_CN.po: Updated Simplified Chinese translation by
|
||||
Xiong Jiang <jxiong@offtopic.org>.
|
||||
|
||||
2003-01-23 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* ru.po: updated Russian translation
|
||||
from Russian team <gnome-cyr@gnome.org>.
|
||||
|
||||
2003-01-23 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* zh_TW.po: Updated traditional Chinese translation.
|
||||
|
||||
2003-01-22 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* mn.po: Added Mongolian translation by
|
||||
Ochirbat Batzaya <buuvei@yahoo.com>.
|
||||
|
||||
2003-01-21 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* ru.po: updated Russian translation
|
||||
from Russian team <gnome-cyr@gnome.org>.
|
||||
|
||||
2003-01-21 Kjartan Maraas <kmaraas@gnome.org>
|
||||
|
||||
* no.po: Updated Norwegian (bokmal) translation.
|
||||
|
||||
2003-01-20 Christian Neumair <chris@gnome-de.org>
|
||||
|
||||
* de.po: Updated German translation.
|
||||
|
||||
2003-01-20 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* ru.po: updated Russian translation
|
||||
from Russian team <gnome-cyr@gnome.org>.
|
||||
|
||||
2003-01-20 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* ru.po: updated Russian translation
|
||||
from Russian team <gnome-cyr@gnome.org>.
|
||||
|
||||
2003-01-20 Dmitry G. Mastrukov <dmitry@taurussoft.org>
|
||||
|
||||
* ru.po: updated Russian translation
|
||||
from Russian team <gnome-cyr@gnome.org>.
|
||||
|
||||
2003-01-19 Abel Cheung <maddog@linux.org.hk>
|
||||
|
||||
* zh_TW.po: Updated traditional Chinese translation, and replaced
|
||||
copyright symbol with correct one.
|
||||
|
||||
2003-01-17 Gustavo Noronha Silva <kov@debian.org>
|
||||
|
||||
* pt_BR.po: translation update
|
||||
|
||||
2003-01-16 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
|
||||
|
||||
* nl.po: Dutch translation updated by Tino Meinen.
|
||||
|
||||
2003-01-16 Vincent van Adrighem <V.vanAdrighem@dirck.mine.nu>
|
||||
|
||||
* nl.po: Dutch translation updated by Tino Meinen.
|
||||
|
||||
2003-01-14 Yanko Kaneti <yaneti@declera.com>
|
||||
|
||||
* bg.po: Full Bulgarian translation by
|
||||
|
1014
po/en_GB.po
1014
po/en_GB.po
File diff suppressed because it is too large
Load Diff
788
po/pt_BR.po
788
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
2995
po/sr@Latn.po
Normal file
2995
po/sr@Latn.po
Normal file
File diff suppressed because it is too large
Load Diff
1593
po/zh_CN.po
1593
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1407
po/zh_TW.po
1407
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -6,3 +6,13 @@ Opaque resize: http://bugzilla.gnome.org/show_bug.cgi?id=92618
|
||||
Super+click to resize: http://bugzilla.gnome.org/show_bug.cgi?id=79315
|
||||
minimized windows in Alt+tab: http://bugzilla.gnome.org/show_bug.cgi?id=89416
|
||||
raise windows on click: http://bugzilla.gnome.org/show_bug.cgi?id=86108
|
||||
dialogs above entire app group: http://bugzilla.gnome.org/show_bug.cgi?id=88926
|
||||
display window size/position: http://bugzilla.gnome.org/show_bug.cgi?id=85213,
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=106645
|
||||
|
||||
configure click actions, alt+click:
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=83210
|
||||
|
||||
system modal dialogs: http://bugzilla.gnome.org/show_bug.cgi?id=83357
|
||||
|
||||
workspace wrapping: http://bugzilla.gnome.org/show_bug.cgi?id=89315
|
||||
|
@@ -11,7 +11,11 @@ EGGFILES= \
|
||||
metacity_SOURCES= \
|
||||
async-getprop.c \
|
||||
async-getprop.h \
|
||||
bell.h \
|
||||
bell.c \
|
||||
common.h \
|
||||
constraints.c \
|
||||
constraints.h \
|
||||
core.c \
|
||||
core.h \
|
||||
delete.c \
|
||||
@@ -97,6 +101,9 @@ libmetacity_private_la_SOURCES= \
|
||||
util.h \
|
||||
common.h
|
||||
|
||||
libmetacity_private_la_LDFLAGS = -no-undefined
|
||||
libmetacity_private_la_LIBADD = @METACITY_LIBS@
|
||||
|
||||
libmetacityincludedir = $(includedir)/metacity-1/metacity-private
|
||||
|
||||
libmetacityinclude_HEADERS = \
|
||||
@@ -141,8 +148,12 @@ schema_DATA = $(schema_in_files:.schemas.in=.schemas)
|
||||
|
||||
@INTLTOOL_SCHEMAS_RULE@
|
||||
|
||||
if GCONF_SCHEMAS_INSTALL
|
||||
install-data-local:
|
||||
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(srcdir)/$(schema_DATA)
|
||||
else
|
||||
install-data-local:
|
||||
endif
|
||||
|
||||
IMAGES=default_icon.png stock_maximize.png stock_minimize.png stock_delete.png
|
||||
VARIABLES=default_icon_data $(srcdir)/default_icon.png \
|
||||
|
@@ -347,7 +347,7 @@ async_get_property_handler (Display *dpy,
|
||||
break;
|
||||
|
||||
case 32:
|
||||
nbytes = reply->nItems * sizeof (long);
|
||||
nbytes = reply->nItems * sizeof (CARD32);
|
||||
netbytes = reply->nItems << 2;
|
||||
if (nbytes + 1 > 0 &&
|
||||
(task->data = (unsigned char *) Xmalloc ((unsigned)nbytes + 1)))
|
||||
|
@@ -136,7 +136,7 @@ meta_bell_flash_frame (MetaDisplay *display,
|
||||
|
||||
g_assert (xkb_ev->xkb_type == XkbBellNotify);
|
||||
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
|
||||
if (!window && (display->focus_window->frame))
|
||||
if (!window && (display->focus_window) && (display->focus_window->frame))
|
||||
{
|
||||
window = display->focus_window;
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#ifdef HAVE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
|
@@ -42,7 +42,8 @@ typedef enum
|
||||
META_FRAME_MAXIMIZED = 1 << 9,
|
||||
META_FRAME_ALLOWS_SHADE = 1 << 10,
|
||||
META_FRAME_ALLOWS_MOVE = 1 << 11,
|
||||
META_FRAME_FULLSCREEN = 1 << 12
|
||||
META_FRAME_FULLSCREEN = 1 << 12,
|
||||
META_FRAME_IS_FLASHING = 1 << 13
|
||||
} MetaFrameFlags;
|
||||
|
||||
typedef enum
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,7 @@
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
#include "errors.h"
|
||||
#include "workspace.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@@ -385,9 +386,10 @@ meta_window_delete (MetaWindow *window,
|
||||
* I don't know how to avoid that though.
|
||||
*/
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing top window because focus window %s was deleted/killed\n",
|
||||
"Focusing MRU window because focus window %s was deleted/killed\n",
|
||||
window->desc);
|
||||
meta_screen_focus_top_window (window->screen, window);
|
||||
meta_workspace_focus_mru_window (window->screen->active_workspace,
|
||||
window);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
413
src/display.c
413
src/display.c
@@ -34,6 +34,7 @@
|
||||
#include "prefs.h"
|
||||
#include "resizepopup.h"
|
||||
#include "workspace.h"
|
||||
#include "bell.h"
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#ifdef HAVE_SOLARIS_XINERAMA
|
||||
@@ -48,6 +49,9 @@
|
||||
#ifdef HAVE_SHAPE
|
||||
#include <X11/extensions/shape.h>
|
||||
#endif
|
||||
#ifdef HAVE_XKB
|
||||
#include <X11/XKBlib.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#define USE_GDK_DISPLAY
|
||||
@@ -73,8 +77,11 @@ static GSList *all_displays = NULL;
|
||||
|
||||
static void meta_spew_event (MetaDisplay *display,
|
||||
XEvent *event);
|
||||
#ifndef USE_GDK_DISPLAY
|
||||
static void event_queue_callback (XEvent *event,
|
||||
gpointer data);
|
||||
#endif
|
||||
|
||||
static gboolean event_callback (XEvent *event,
|
||||
gpointer data);
|
||||
static Window event_get_modified_window (MetaDisplay *display,
|
||||
@@ -214,10 +221,6 @@ meta_display_open (const char *name)
|
||||
"_NET_CLIENT_LIST_STACKING",
|
||||
"_NET_WM_STATE_SKIP_TASKBAR",
|
||||
"_NET_WM_STATE_SKIP_PAGER",
|
||||
"_WIN_WORKSPACE",
|
||||
"_WIN_LAYER",
|
||||
"_WIN_PROTOCOLS",
|
||||
"_WIN_SUPPORTING_WM_CHECK",
|
||||
"_NET_WM_ICON_NAME",
|
||||
"_NET_WM_ICON",
|
||||
"_NET_WM_ICON_GEOMETRY",
|
||||
@@ -228,7 +231,6 @@ meta_display_open (const char *name)
|
||||
"_NET_ACTIVE_WINDOW",
|
||||
"_METACITY_RESTART_MESSAGE",
|
||||
"_NET_WM_STRUT",
|
||||
"_WIN_HINTS",
|
||||
"_METACITY_RELOAD_THEME_MESSAGE",
|
||||
"_METACITY_SET_KEYBINDINGS_MESSAGE",
|
||||
"_NET_WM_STATE_HIDDEN",
|
||||
@@ -262,7 +264,12 @@ meta_display_open (const char *name)
|
||||
"_NET_STARTUP_ID",
|
||||
"_METACITY_TOGGLE_VERBOSE",
|
||||
"_METACITY_UPDATE_COUNTER",
|
||||
"SYNC_COUNTER"
|
||||
"SYNC_COUNTER",
|
||||
"_GNOME_PANEL_ACTION",
|
||||
"_GNOME_PANEL_ACTION_MAIN_MENU",
|
||||
"_GNOME_PANEL_ACTION_RUN_DIALOG",
|
||||
"_METACITY_SENTINEL",
|
||||
"_NET_WM_STRUT_PARTIAL"
|
||||
};
|
||||
Atom atoms[G_N_ELEMENTS(atom_names)];
|
||||
|
||||
@@ -303,14 +310,19 @@ meta_display_open (const char *name)
|
||||
display->autoraise_timeout_id = 0;
|
||||
display->focus_window = NULL;
|
||||
display->expected_focus_window = NULL;
|
||||
display->mru_list = NULL;
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
display->grab_update_alarm = None;
|
||||
#endif
|
||||
|
||||
/* FIXME copy the checks from GDK probably */
|
||||
display->static_gravity_works = g_getenv ("METACITY_USE_STATIC_GRAVITY") != NULL;
|
||||
|
||||
/* we have to go ahead and do this so error handlers work */
|
||||
all_displays = g_slist_prepend (all_displays, display);
|
||||
|
||||
meta_bell_init (display);
|
||||
|
||||
meta_display_init_keys (display);
|
||||
|
||||
update_window_grab_modifiers (display);
|
||||
@@ -351,55 +363,55 @@ meta_display_open (const char *name)
|
||||
display->atom_net_client_list_stacking = atoms[29];
|
||||
display->atom_net_wm_state_skip_taskbar = atoms[30];
|
||||
display->atom_net_wm_state_skip_pager = atoms[31];
|
||||
display->atom_win_workspace = atoms[32];
|
||||
display->atom_win_layer = atoms[33];
|
||||
display->atom_win_protocols = atoms[34];
|
||||
display->atom_win_supporting_wm_check = atoms[35];
|
||||
display->atom_net_wm_icon_name = atoms[36];
|
||||
display->atom_net_wm_icon = atoms[37];
|
||||
display->atom_net_wm_icon_geometry = atoms[38];
|
||||
display->atom_utf8_string = atoms[39];
|
||||
display->atom_wm_icon_size = atoms[40];
|
||||
display->atom_kwm_win_icon = atoms[41];
|
||||
display->atom_net_wm_moveresize = atoms[42];
|
||||
display->atom_net_active_window = atoms[43];
|
||||
display->atom_metacity_restart_message = atoms[44];
|
||||
display->atom_net_wm_strut = atoms[45];
|
||||
display->atom_win_hints = atoms[46];
|
||||
display->atom_metacity_reload_theme_message = atoms[47];
|
||||
display->atom_metacity_set_keybindings_message = atoms[48];
|
||||
display->atom_net_wm_state_hidden = atoms[49];
|
||||
display->atom_net_wm_window_type_utility = atoms[50];
|
||||
display->atom_net_wm_window_type_splash = atoms[51];
|
||||
display->atom_net_wm_state_fullscreen = atoms[52];
|
||||
display->atom_net_wm_ping = atoms[53];
|
||||
display->atom_net_wm_pid = atoms[54];
|
||||
display->atom_wm_client_machine = atoms[55];
|
||||
display->atom_net_workarea = atoms[56];
|
||||
display->atom_net_showing_desktop = atoms[57];
|
||||
display->atom_net_desktop_layout = atoms[58];
|
||||
display->atom_manager = atoms[59];
|
||||
display->atom_targets = atoms[60];
|
||||
display->atom_multiple = atoms[61];
|
||||
display->atom_timestamp = atoms[62];
|
||||
display->atom_version = atoms[63];
|
||||
display->atom_atom_pair = atoms[64];
|
||||
display->atom_net_desktop_names = atoms[65];
|
||||
display->atom_net_wm_allowed_actions = atoms[66];
|
||||
display->atom_net_wm_action_move = atoms[67];
|
||||
display->atom_net_wm_action_resize = atoms[68];
|
||||
display->atom_net_wm_action_shade = atoms[69];
|
||||
display->atom_net_wm_action_stick = atoms[70];
|
||||
display->atom_net_wm_action_maximize_horz = atoms[71];
|
||||
display->atom_net_wm_action_maximize_vert = atoms[72];
|
||||
display->atom_net_wm_action_change_desktop = atoms[73];
|
||||
display->atom_net_wm_action_close = atoms[74];
|
||||
display->atom_net_wm_state_above = atoms[75];
|
||||
display->atom_net_wm_state_below = atoms[76];
|
||||
display->atom_net_startup_id = atoms[77];
|
||||
display->atom_metacity_toggle_verbose = atoms[78];
|
||||
display->atom_metacity_update_counter = atoms[79];
|
||||
display->atom_sync_counter = atoms[80];
|
||||
display->atom_net_wm_icon_name = atoms[32];
|
||||
display->atom_net_wm_icon = atoms[33];
|
||||
display->atom_net_wm_icon_geometry = atoms[34];
|
||||
display->atom_utf8_string = atoms[35];
|
||||
display->atom_wm_icon_size = atoms[36];
|
||||
display->atom_kwm_win_icon = atoms[37];
|
||||
display->atom_net_wm_moveresize = atoms[38];
|
||||
display->atom_net_active_window = atoms[39];
|
||||
display->atom_metacity_restart_message = atoms[40];
|
||||
display->atom_net_wm_strut = atoms[41];
|
||||
display->atom_metacity_reload_theme_message = atoms[42];
|
||||
display->atom_metacity_set_keybindings_message = atoms[43];
|
||||
display->atom_net_wm_state_hidden = atoms[44];
|
||||
display->atom_net_wm_window_type_utility = atoms[45];
|
||||
display->atom_net_wm_window_type_splash = atoms[46];
|
||||
display->atom_net_wm_state_fullscreen = atoms[47];
|
||||
display->atom_net_wm_ping = atoms[48];
|
||||
display->atom_net_wm_pid = atoms[49];
|
||||
display->atom_wm_client_machine = atoms[50];
|
||||
display->atom_net_workarea = atoms[51];
|
||||
display->atom_net_showing_desktop = atoms[52];
|
||||
display->atom_net_desktop_layout = atoms[53];
|
||||
display->atom_manager = atoms[54];
|
||||
display->atom_targets = atoms[55];
|
||||
display->atom_multiple = atoms[56];
|
||||
display->atom_timestamp = atoms[57];
|
||||
display->atom_version = atoms[58];
|
||||
display->atom_atom_pair = atoms[59];
|
||||
display->atom_net_desktop_names = atoms[60];
|
||||
display->atom_net_wm_allowed_actions = atoms[61];
|
||||
display->atom_net_wm_action_move = atoms[62];
|
||||
display->atom_net_wm_action_resize = atoms[63];
|
||||
display->atom_net_wm_action_shade = atoms[64];
|
||||
display->atom_net_wm_action_stick = atoms[65];
|
||||
display->atom_net_wm_action_maximize_horz = atoms[66];
|
||||
display->atom_net_wm_action_maximize_vert = atoms[67];
|
||||
display->atom_net_wm_action_change_desktop = atoms[68];
|
||||
display->atom_net_wm_action_close = atoms[69];
|
||||
display->atom_net_wm_state_above = atoms[70];
|
||||
display->atom_net_wm_state_below = atoms[71];
|
||||
display->atom_net_startup_id = atoms[72];
|
||||
display->atom_metacity_toggle_verbose = atoms[73];
|
||||
display->atom_metacity_update_counter = atoms[74];
|
||||
display->atom_sync_counter = atoms[75];
|
||||
display->atom_gnome_panel_action = atoms[76];
|
||||
display->atom_gnome_panel_action_main_menu = atoms[77];
|
||||
display->atom_gnome_panel_action_run_dialog = atoms[78];
|
||||
display->atom_metacity_sentinel = atoms[79];
|
||||
display->atom_net_wm_strut_partial = atoms[80];
|
||||
|
||||
display->prop_hooks = NULL;
|
||||
meta_display_init_window_prop_hooks (display);
|
||||
@@ -443,7 +455,6 @@ meta_display_open (const char *name)
|
||||
display->window_ids = g_hash_table_new (meta_unsigned_long_hash,
|
||||
meta_unsigned_long_equal);
|
||||
|
||||
display->double_click_time = 250;
|
||||
display->last_button_time = 0;
|
||||
display->last_button_xwindow = None;
|
||||
display->last_button_num = 0;
|
||||
@@ -458,6 +469,7 @@ meta_display_open (const char *name)
|
||||
display->ungrab_should_not_cause_focus_window = None;
|
||||
|
||||
display->current_time = CurrentTime;
|
||||
display->sentinel_counter = 0;
|
||||
|
||||
display->grab_op = META_GRAB_OP_NONE;
|
||||
display->grab_window = NULL;
|
||||
@@ -516,7 +528,6 @@ meta_display_open (const char *name)
|
||||
|
||||
screens = NULL;
|
||||
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
i = 0;
|
||||
while (i < ScreenCount (xdisplay))
|
||||
{
|
||||
@@ -528,14 +539,6 @@ meta_display_open (const char *name)
|
||||
screens = g_slist_prepend (screens, screen);
|
||||
++i;
|
||||
}
|
||||
#else
|
||||
{
|
||||
MetaScreen *screen;
|
||||
screen = meta_screen_new (display, DefaultScreen (xdisplay));
|
||||
if (screen)
|
||||
screens = g_slist_prepend (screens, screen);
|
||||
}
|
||||
#endif
|
||||
|
||||
display->screens = screens;
|
||||
|
||||
@@ -556,20 +559,9 @@ meta_display_open (const char *name)
|
||||
display->leader_window,
|
||||
display->atom_net_wm_name,
|
||||
"Metacity");
|
||||
|
||||
{
|
||||
/* The legacy GNOME hint is to set a cardinal which is the window
|
||||
* id of the supporting_wm_check window on the supporting_wm_check
|
||||
* window itself
|
||||
*/
|
||||
gulong data[1];
|
||||
|
||||
data[0] = display->leader_window;
|
||||
XChangeProperty (display->xdisplay,
|
||||
display->leader_window,
|
||||
display->atom_win_supporting_wm_check,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
|
||||
XChangeProperty (display->xdisplay,
|
||||
display->leader_window,
|
||||
@@ -577,7 +569,7 @@ meta_display_open (const char *name)
|
||||
XA_WINDOW,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
}
|
||||
|
||||
|
||||
meta_display_grab (display);
|
||||
|
||||
/* Now manage all existing windows */
|
||||
@@ -889,13 +881,14 @@ meta_display_is_double_click (MetaDisplay *display)
|
||||
|
||||
static gboolean dump_events = TRUE;
|
||||
|
||||
|
||||
#ifndef USE_GDK_DISPLAY
|
||||
static void
|
||||
event_queue_callback (XEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
event_callback (event, data);
|
||||
}
|
||||
#endif
|
||||
|
||||
static gboolean
|
||||
grab_op_is_mouse (MetaGrabOp op)
|
||||
@@ -1110,6 +1103,28 @@ window_raise_with_delay_callback (void *data)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static int
|
||||
double_click_timeout_for_event (MetaDisplay *display,
|
||||
XEvent *event)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
|
||||
g_assert (event->type == ButtonPress ||
|
||||
event->type == ButtonRelease);
|
||||
|
||||
screen = meta_display_screen_for_root (display,
|
||||
event->xbutton.root);
|
||||
if (screen == NULL)
|
||||
{
|
||||
/* Odd, we aren't managing this screen */
|
||||
meta_warning ("Received button event on root 0x%lx we aren't managing\n",
|
||||
event->xbutton.root);
|
||||
return 250; /* make up number */
|
||||
}
|
||||
|
||||
return meta_ui_get_double_click_timeout (screen->ui);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
event_callback (XEvent *event,
|
||||
gpointer data)
|
||||
@@ -1145,7 +1160,9 @@ event_callback (XEvent *event,
|
||||
/* mark double click events, kind of a hack, oh well. */
|
||||
if (((int)event->xbutton.button) == display->last_button_num &&
|
||||
event->xbutton.window == display->last_button_xwindow &&
|
||||
event->xbutton.time < (display->last_button_time + display->double_click_time))
|
||||
event->xbutton.time < (display->last_button_time +
|
||||
double_click_timeout_for_event (display,
|
||||
event)))
|
||||
{
|
||||
display->is_double_click = TRUE;
|
||||
meta_topic (META_DEBUG_EVENTS,
|
||||
@@ -1250,6 +1267,7 @@ event_callback (XEvent *event,
|
||||
if (window->frame)
|
||||
{
|
||||
window->frame->need_reapply_frame_shape = TRUE;
|
||||
meta_warning("from event callback\n");
|
||||
meta_window_queue_move_resize (window);
|
||||
}
|
||||
}
|
||||
@@ -1277,11 +1295,12 @@ event_callback (XEvent *event,
|
||||
display->grab_window == window) ||
|
||||
grab_op_is_keyboard (display->grab_op))
|
||||
{
|
||||
meta_verbose ("Ending grab op %d on window %s due to button press\n",
|
||||
display->grab_op,
|
||||
(display->grab_window ?
|
||||
display->grab_window->desc :
|
||||
"none"));
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Ending grab op %d on window %s due to button press\n",
|
||||
display->grab_op,
|
||||
(display->grab_window ?
|
||||
display->grab_window->desc :
|
||||
"none"));
|
||||
meta_display_end_grab_op (display,
|
||||
event->xbutton.time);
|
||||
}
|
||||
@@ -1311,12 +1330,21 @@ event_callback (XEvent *event,
|
||||
* frames.c or special-cased if the click was on a
|
||||
* minimize/close button.
|
||||
*/
|
||||
meta_window_raise (window);
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing %s due to unmodified button %d press (display.c)\n",
|
||||
window->desc, event->xbutton.button);
|
||||
meta_window_focus (window, event->xbutton.time);
|
||||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
{
|
||||
meta_window_raise (window);
|
||||
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing %s due to unmodified button %d press (display.c)\n",
|
||||
window->desc, event->xbutton.button);
|
||||
meta_window_focus (window, event->xbutton.time);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Not raising window on click due to mouse/sloppy focus mode\n");
|
||||
meta_window_focus (window, event->xbutton.time);
|
||||
}
|
||||
}
|
||||
|
||||
/* you can move on alt-click but not on
|
||||
@@ -1427,7 +1455,8 @@ event_callback (XEvent *event,
|
||||
meta_window_handle_mouse_grab_op_event (window, event);
|
||||
/* do this even if window->has_focus to avoid races */
|
||||
else if (window && !serial_is_ignored (display, event->xany.serial) &&
|
||||
event->xcrossing.detail != NotifyInferior)
|
||||
event->xcrossing.detail != NotifyInferior &&
|
||||
meta_display_focus_sentinel_clear (display))
|
||||
{
|
||||
switch (meta_prefs_get_focus_mode ())
|
||||
{
|
||||
@@ -1492,13 +1521,8 @@ event_callback (XEvent *event,
|
||||
switch (meta_prefs_get_focus_mode ())
|
||||
{
|
||||
case META_FOCUS_MODE_MOUSE:
|
||||
/* This is kind of questionable; but we normally
|
||||
* set focus to RevertToPointerRoot, so I guess
|
||||
* leaving it on PointerRoot when nothing is focused
|
||||
* is probably right. Anyway, unfocus the
|
||||
* focused window.
|
||||
*/
|
||||
if (window->has_focus &&
|
||||
(window->frame == NULL || frame_was_receiver) &&
|
||||
event->xcrossing.mode != NotifyGrab &&
|
||||
event->xcrossing.mode != NotifyUngrab &&
|
||||
event->xcrossing.detail != NotifyInferior)
|
||||
@@ -1634,12 +1658,20 @@ event_callback (XEvent *event,
|
||||
/* if frame was receiver it's some malicious send event or something */
|
||||
else if (!frame_was_receiver && window)
|
||||
{
|
||||
meta_verbose ("MapRequest on %s mapped = %d minimized = %d\n",
|
||||
window->desc, window->mapped, window->minimized);
|
||||
if (window->minimized)
|
||||
meta_window_unminimize (window);
|
||||
if (!meta_workspace_contains_window (window->screen->active_workspace,
|
||||
window))
|
||||
meta_window_change_workspace (window,
|
||||
window->screen->active_workspace);
|
||||
{
|
||||
meta_window_unminimize (window);
|
||||
if (!meta_workspace_contains_window (window->screen->active_workspace,
|
||||
window))
|
||||
{
|
||||
meta_verbose ("Changing workspace due to MapRequest mapped = %d minimized = %d\n",
|
||||
window->mapped, window->minimized);
|
||||
meta_window_change_workspace (window,
|
||||
window->screen->active_workspace);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ReparentNotify:
|
||||
@@ -1739,6 +1771,16 @@ event_callback (XEvent *event,
|
||||
else if (event->xproperty.atom ==
|
||||
display->atom_net_desktop_names)
|
||||
meta_screen_update_workspace_names (screen);
|
||||
|
||||
/* we just use this property as a sentinel to avoid
|
||||
* certain race conditions. See the comment for the
|
||||
* sentinel_counter variable declaration in display.h
|
||||
*/
|
||||
if (event->xproperty.atom ==
|
||||
display->atom_metacity_sentinel)
|
||||
{
|
||||
meta_display_decrement_focus_sentinel (display);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1899,6 +1941,19 @@ event_callback (XEvent *event,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
#ifdef HAVE_XKB
|
||||
if (event->type == display->xkb_base_event_type)
|
||||
{
|
||||
XkbAnyEvent *xkb_ev = (XkbAnyEvent *) event;
|
||||
|
||||
switch (xkb_ev->xkb_type)
|
||||
{
|
||||
case XkbBellNotify:
|
||||
meta_bell_notify (display, xkb_ev);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2197,6 +2252,9 @@ meta_spew_event (MetaDisplay *display,
|
||||
char *winname;
|
||||
MetaScreen *screen;
|
||||
|
||||
if (!meta_is_verbose())
|
||||
return;
|
||||
|
||||
/* filter overnumerous events */
|
||||
if (event->type == Expose || event->type == MotionNotify ||
|
||||
event->type == NoExpose)
|
||||
@@ -2312,6 +2370,9 @@ meta_spew_event (MetaDisplay *display,
|
||||
break;
|
||||
case MapRequest:
|
||||
name = "MapRequest";
|
||||
extra = g_strdup_printf ("window: 0x%lx parent: 0x%lx\n",
|
||||
event->xmaprequest.window,
|
||||
event->xmaprequest.parent);
|
||||
break;
|
||||
case ReparentNotify:
|
||||
name = "ReparentNotify";
|
||||
@@ -2617,6 +2678,7 @@ xcursor_for_op (MetaDisplay *display,
|
||||
case META_GRAB_OP_KEYBOARD_RESIZING_E:
|
||||
cursor = META_CURSOR_EAST_RESIZE;
|
||||
break;
|
||||
case META_GRAB_OP_MOVING:
|
||||
case META_GRAB_OP_KEYBOARD_MOVING:
|
||||
cursor = META_CURSOR_MOVE_WINDOW;
|
||||
break;
|
||||
@@ -2684,7 +2746,14 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
{
|
||||
display->grab_have_pointer = TRUE;
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"XGrabPointer() returned GrabSuccess\n");
|
||||
"XGrabPointer() returned GrabSuccess time 0x%lu\n",
|
||||
timestamp);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"XGrabPointer() failed time 0x%lu\n",
|
||||
timestamp);
|
||||
}
|
||||
meta_error_trap_pop (display, TRUE);
|
||||
}
|
||||
@@ -2773,12 +2842,11 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
display->grab_mask = modmask;
|
||||
display->grab_initial_root_x = root_x;
|
||||
display->grab_initial_root_y = root_y;
|
||||
display->grab_current_root_x = root_x;
|
||||
display->grab_current_root_y = root_y;
|
||||
display->grab_latest_motion_x = root_x;
|
||||
display->grab_latest_motion_y = root_y;
|
||||
display->grab_last_moveresize_time.tv_sec = 0;
|
||||
display->grab_last_moveresize_time.tv_usec = 0;
|
||||
display->grab_motion_notify_time = 0;
|
||||
#ifdef HAVE_XSYNC
|
||||
display->grab_update_alarm = None;
|
||||
#endif
|
||||
@@ -2789,7 +2857,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
meta_window_get_position (display->grab_window,
|
||||
&display->grab_initial_window_pos.x,
|
||||
&display->grab_initial_window_pos.y);
|
||||
display->grab_current_window_pos = display->grab_initial_window_pos;
|
||||
|
||||
#ifdef HAVE_XSYNC
|
||||
if (meta_grab_op_is_resizing (display->grab_op) &&
|
||||
@@ -2872,11 +2939,16 @@ void
|
||||
meta_display_end_grab_op (MetaDisplay *display,
|
||||
Time timestamp)
|
||||
{
|
||||
meta_verbose ("Ending grab op %d at time %ld\n", display->grab_op, timestamp);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Ending grab op %d at time %lu\n", display->grab_op,
|
||||
(unsigned long) timestamp);
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
return;
|
||||
|
||||
if (display->grab_window != NULL)
|
||||
display->grab_window->shaken_loose = FALSE;
|
||||
|
||||
if (display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_NORMAL ||
|
||||
display->grab_op == META_GRAB_OP_KEYBOARD_TABBING_DOCK ||
|
||||
display->grab_op == META_GRAB_OP_KEYBOARD_ESCAPING_NORMAL ||
|
||||
@@ -2903,7 +2975,7 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
if (display->grab_have_keyboard)
|
||||
{
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Ungrabbing all keys\n");
|
||||
"Ungrabbing all keys timestamp %lu\n", timestamp);
|
||||
if (display->grab_window)
|
||||
meta_window_ungrab_all_keys (display->grab_window);
|
||||
else
|
||||
@@ -2938,12 +3010,12 @@ meta_change_button_grab (MetaDisplay *display,
|
||||
int button,
|
||||
int modmask)
|
||||
{
|
||||
int ignored_mask;
|
||||
unsigned int ignored_mask;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
|
||||
ignored_mask = 0;
|
||||
while (ignored_mask < (int) display->ignored_modifier_mask)
|
||||
while (ignored_mask <= display->ignored_modifier_mask)
|
||||
{
|
||||
if (ignored_mask & ~(display->ignored_modifier_mask))
|
||||
{
|
||||
@@ -3147,6 +3219,7 @@ meta_display_queue_retheme_all_windows (MetaDisplay *display)
|
||||
{
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
meta_warning("from retheme\n");
|
||||
meta_window_queue_move_resize (window);
|
||||
if (window->frame)
|
||||
{
|
||||
@@ -3269,8 +3342,8 @@ meta_display_ping_window (MetaDisplay *display,
|
||||
"Sending ping with timestamp %lu to window %s\n",
|
||||
timestamp, window->desc);
|
||||
meta_window_send_icccm_message (window,
|
||||
display->atom_net_wm_ping,
|
||||
timestamp);
|
||||
display->atom_net_wm_ping,
|
||||
timestamp);
|
||||
}
|
||||
|
||||
/* process the pong from our ping */
|
||||
@@ -3339,11 +3412,12 @@ find_tab_forward (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace,
|
||||
GList *start)
|
||||
GList *start)
|
||||
{
|
||||
GList *tmp;
|
||||
|
||||
g_return_val_if_fail (start != NULL, NULL);
|
||||
g_return_val_if_fail (workspace != NULL, NULL);
|
||||
|
||||
tmp = start->next;
|
||||
while (tmp != NULL)
|
||||
@@ -3351,22 +3425,18 @@ find_tab_forward (MetaDisplay *display,
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
if (window->screen == screen &&
|
||||
IN_TAB_CHAIN (window, type) &&
|
||||
(workspace == NULL ||
|
||||
meta_window_visible_on_workspace (window, workspace)))
|
||||
IN_TAB_CHAIN (window, type))
|
||||
return window;
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
tmp = display->mru_list;
|
||||
tmp = workspace->mru_list;
|
||||
while (tmp != start)
|
||||
{
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
if (IN_TAB_CHAIN (window, type) &&
|
||||
(workspace == NULL ||
|
||||
meta_window_visible_on_workspace (window, workspace)))
|
||||
if (IN_TAB_CHAIN (window, type))
|
||||
return window;
|
||||
|
||||
tmp = tmp->next;
|
||||
@@ -3385,6 +3455,7 @@ find_tab_backward (MetaDisplay *display,
|
||||
GList *tmp;
|
||||
|
||||
g_return_val_if_fail (start != NULL, NULL);
|
||||
g_return_val_if_fail (workspace != NULL, NULL);
|
||||
|
||||
tmp = start->prev;
|
||||
while (tmp != NULL)
|
||||
@@ -3392,22 +3463,18 @@ find_tab_backward (MetaDisplay *display,
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
if (window->screen == screen &&
|
||||
IN_TAB_CHAIN (window, type) &&
|
||||
(workspace == NULL ||
|
||||
meta_window_visible_on_workspace (window, workspace)))
|
||||
IN_TAB_CHAIN (window, type))
|
||||
return window;
|
||||
|
||||
tmp = tmp->prev;
|
||||
}
|
||||
|
||||
tmp = g_list_last (display->mru_list);
|
||||
tmp = g_list_last (workspace->mru_list);
|
||||
while (tmp != start)
|
||||
{
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
if (IN_TAB_CHAIN (window, type) &&
|
||||
(workspace == NULL ||
|
||||
meta_window_visible_on_workspace (window, workspace)))
|
||||
if (IN_TAB_CHAIN (window, type))
|
||||
return window;
|
||||
|
||||
tmp = tmp->prev;
|
||||
@@ -3416,15 +3483,15 @@ find_tab_backward (MetaDisplay *display,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GSList*
|
||||
GList*
|
||||
meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace)
|
||||
{
|
||||
GSList *tab_list;
|
||||
GList *tab_list;
|
||||
|
||||
/* workspace can be NULL for all workspaces */
|
||||
g_return_val_if_fail (workspace != NULL, NULL);
|
||||
|
||||
/* Windows sellout mode - MRU order. Collect unminimized windows
|
||||
* then minimized so minimized windows aren't in the way so much.
|
||||
@@ -3433,17 +3500,15 @@ meta_display_get_tab_list (MetaDisplay *display,
|
||||
GList *tmp;
|
||||
|
||||
tab_list = NULL;
|
||||
tmp = screen->display->mru_list;
|
||||
tmp = workspace->mru_list;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
if (!window->minimized &&
|
||||
window->screen == screen &&
|
||||
IN_TAB_CHAIN (window, type) &&
|
||||
(workspace == NULL ||
|
||||
meta_window_visible_on_workspace (window, workspace)))
|
||||
tab_list = g_slist_prepend (tab_list, window);
|
||||
IN_TAB_CHAIN (window, type))
|
||||
tab_list = g_list_prepend (tab_list, window);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
@@ -3452,23 +3517,21 @@ meta_display_get_tab_list (MetaDisplay *display,
|
||||
{
|
||||
GList *tmp;
|
||||
|
||||
tmp = screen->display->mru_list;
|
||||
tmp = workspace->mru_list;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
if (window->minimized &&
|
||||
window->screen == screen &&
|
||||
IN_TAB_CHAIN (window, type) &&
|
||||
(workspace == NULL ||
|
||||
meta_window_visible_on_workspace (window, workspace)))
|
||||
tab_list = g_slist_prepend (tab_list, window);
|
||||
IN_TAB_CHAIN (window, type))
|
||||
tab_list = g_list_prepend (tab_list, window);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
}
|
||||
|
||||
tab_list = g_slist_reverse (tab_list);
|
||||
tab_list = g_list_reverse (tab_list);
|
||||
|
||||
return tab_list;
|
||||
}
|
||||
@@ -3476,12 +3539,18 @@ meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaWindow*
|
||||
meta_display_get_tab_next (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *window,
|
||||
gboolean backward)
|
||||
{
|
||||
if (display->mru_list == NULL)
|
||||
GList *tab_list;
|
||||
tab_list = meta_display_get_tab_list(display,
|
||||
type,
|
||||
screen,
|
||||
workspace);
|
||||
|
||||
if (tab_list == NULL)
|
||||
return NULL;
|
||||
|
||||
if (window != NULL)
|
||||
@@ -3490,20 +3559,22 @@ meta_display_get_tab_next (MetaDisplay *display,
|
||||
|
||||
if (backward)
|
||||
return find_tab_backward (display, type, screen, workspace,
|
||||
g_list_find (display->mru_list,
|
||||
g_list_find (tab_list,
|
||||
window));
|
||||
else
|
||||
return find_tab_forward (display, type, screen, workspace,
|
||||
g_list_find (display->mru_list,
|
||||
g_list_find (tab_list,
|
||||
window));
|
||||
}
|
||||
|
||||
if (backward)
|
||||
return find_tab_backward (display, type, screen, workspace,
|
||||
g_list_last (display->mru_list));
|
||||
tab_list);
|
||||
else
|
||||
return find_tab_forward (display, type, screen, workspace,
|
||||
display->mru_list);
|
||||
tab_list);
|
||||
|
||||
g_list_free (tab_list);
|
||||
}
|
||||
|
||||
MetaWindow*
|
||||
@@ -3613,6 +3684,16 @@ meta_rectangle_intersect (MetaRectangle *src1,
|
||||
return return_val;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_rectangle_equal (const MetaRectangle *src1,
|
||||
const MetaRectangle *src2)
|
||||
{
|
||||
return ((src1->x == src2->x) &&
|
||||
(src1->y == src2->y) &&
|
||||
(src1->width == src2->width) &&
|
||||
(src1->height == src2->height));
|
||||
}
|
||||
|
||||
static MetaScreen*
|
||||
find_screen_for_selection (MetaDisplay *display,
|
||||
Window owner,
|
||||
@@ -3943,4 +4024,40 @@ prefs_changed_callback (MetaPreference pref,
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
else if (pref == META_PREF_AUDIBLE_BELL)
|
||||
{
|
||||
MetaDisplay *display = data;
|
||||
meta_bell_set_audible (display, meta_prefs_bell_is_audible ());
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_increment_focus_sentinel (MetaDisplay *display)
|
||||
{
|
||||
unsigned long data[1];
|
||||
|
||||
data[0] = meta_display_get_current_time (display);
|
||||
|
||||
XChangeProperty (display->xdisplay,
|
||||
((MetaScreen*) display->screens->data)->xroot,
|
||||
display->atom_metacity_sentinel,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
|
||||
display->sentinel_counter += 1;
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_decrement_focus_sentinel (MetaDisplay *display)
|
||||
{
|
||||
display->sentinel_counter -= 1;
|
||||
|
||||
if (display->sentinel_counter < 0)
|
||||
display->sentinel_counter = 0;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_display_focus_sentinel_clear (MetaDisplay *display)
|
||||
{
|
||||
return (display->sentinel_counter == 0);
|
||||
}
|
||||
|
@@ -120,10 +120,6 @@ struct _MetaDisplay
|
||||
Atom atom_net_client_list_stacking;
|
||||
Atom atom_net_wm_state_skip_taskbar;
|
||||
Atom atom_net_wm_state_skip_pager;
|
||||
Atom atom_win_workspace;
|
||||
Atom atom_win_layer;
|
||||
Atom atom_win_protocols;
|
||||
Atom atom_win_supporting_wm_check;
|
||||
Atom atom_net_wm_icon_name;
|
||||
Atom atom_net_wm_icon;
|
||||
Atom atom_net_wm_icon_geometry;
|
||||
@@ -134,7 +130,6 @@ struct _MetaDisplay
|
||||
Atom atom_net_active_window;
|
||||
Atom atom_metacity_restart_message;
|
||||
Atom atom_net_wm_strut;
|
||||
Atom atom_win_hints;
|
||||
Atom atom_metacity_reload_theme_message;
|
||||
Atom atom_metacity_set_keybindings_message;
|
||||
Atom atom_net_wm_state_hidden;
|
||||
@@ -169,6 +164,11 @@ struct _MetaDisplay
|
||||
Atom atom_metacity_toggle_verbose;
|
||||
Atom atom_metacity_update_counter;
|
||||
Atom atom_sync_counter;
|
||||
Atom atom_gnome_panel_action;
|
||||
Atom atom_gnome_panel_action_main_menu;
|
||||
Atom atom_gnome_panel_action_run_dialog;
|
||||
Atom atom_metacity_sentinel;
|
||||
Atom atom_net_wm_strut_partial;
|
||||
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
@@ -179,11 +179,6 @@ struct _MetaDisplay
|
||||
*/
|
||||
MetaWindow *expected_focus_window;
|
||||
|
||||
/* Most recently focused list. Always contains all
|
||||
* live windows.
|
||||
*/
|
||||
GList *mru_list;
|
||||
|
||||
guint static_gravity_works : 1;
|
||||
|
||||
/*< private-ish >*/
|
||||
@@ -202,7 +197,6 @@ struct _MetaDisplay
|
||||
Window no_focus_window;
|
||||
|
||||
/* for double click */
|
||||
int double_click_time;
|
||||
Time last_button_time;
|
||||
Window last_button_xwindow;
|
||||
int last_button_num;
|
||||
@@ -234,17 +228,24 @@ struct _MetaDisplay
|
||||
int grab_button;
|
||||
int grab_initial_root_x;
|
||||
int grab_initial_root_y;
|
||||
int grab_current_root_x;
|
||||
int grab_current_root_y;
|
||||
int grab_latest_motion_x;
|
||||
int grab_latest_motion_y;
|
||||
gulong grab_mask;
|
||||
guint grab_have_pointer : 1;
|
||||
guint grab_have_keyboard : 1;
|
||||
MetaRectangle grab_initial_window_pos;
|
||||
MetaRectangle grab_current_window_pos;
|
||||
MetaResizePopup *grab_resize_popup;
|
||||
GTimeVal grab_last_moveresize_time;
|
||||
Time grab_motion_notify_time;
|
||||
|
||||
/* we use property updates as sentinels for certain window focus events
|
||||
* to avoid some race conditions on EnterNotify events
|
||||
*/
|
||||
int sentinel_counter;
|
||||
|
||||
#ifdef HAVE_XKB
|
||||
int xkb_base_event_type;
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
/* alarm monitoring client's _METACITY_UPDATE_COUNTER */
|
||||
XSyncAlarm grab_update_alarm;
|
||||
@@ -255,8 +256,8 @@ struct _MetaDisplay
|
||||
int n_screen_bindings;
|
||||
MetaKeyBinding *window_bindings;
|
||||
int n_window_bindings;
|
||||
int min_keycode;
|
||||
int max_keycode;
|
||||
unsigned int min_keycode;
|
||||
unsigned int max_keycode;
|
||||
KeySym *keymap;
|
||||
int keysyms_per_keycode;
|
||||
XModifierKeymap *modmap;
|
||||
@@ -403,10 +404,10 @@ typedef enum
|
||||
|
||||
} MetaTabList;
|
||||
|
||||
GSList* meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace);
|
||||
GList* meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
MetaWorkspace *workspace);
|
||||
|
||||
MetaWindow* meta_display_get_tab_next (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
@@ -428,9 +429,15 @@ gboolean meta_grab_op_is_resizing (MetaGrabOp op);
|
||||
gboolean meta_rectangle_intersect (MetaRectangle *src1,
|
||||
MetaRectangle *src2,
|
||||
MetaRectangle *dest);
|
||||
gboolean meta_rectangle_equal (const MetaRectangle *src1,
|
||||
const MetaRectangle *src2);
|
||||
|
||||
void meta_display_devirtualize_modifiers (MetaDisplay *display,
|
||||
MetaVirtualModifier modifiers,
|
||||
unsigned int *mask);
|
||||
|
||||
void meta_display_increment_focus_sentinel (MetaDisplay *display);
|
||||
void meta_display_decrement_focus_sentinel (MetaDisplay *display);
|
||||
gboolean meta_display_focus_sentinel_clear (MetaDisplay *display);
|
||||
|
||||
#endif
|
||||
|
@@ -48,7 +48,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
if (tip == NULL)
|
||||
{
|
||||
tip = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
{
|
||||
GdkScreen *gdk_screen;
|
||||
|
||||
@@ -59,10 +58,6 @@ meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
screen_width = gdk_screen_get_width (gdk_screen);
|
||||
screen_height = gdk_screen_get_height (gdk_screen);
|
||||
}
|
||||
#else
|
||||
screen_width = gdk_screen_width ();
|
||||
screen_height = gdk_screen_height ();
|
||||
#endif
|
||||
|
||||
gtk_widget_set_app_paintable (tip, TRUE);
|
||||
gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE);
|
||||
|
71
src/frame.c
71
src/frame.c
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include "frame.h"
|
||||
#include "bell.h"
|
||||
#include "errors.h"
|
||||
#include "keybindings.h"
|
||||
|
||||
@@ -59,9 +60,8 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
|
||||
frame->mapped = FALSE;
|
||||
frame->need_reapply_frame_shape = TRUE;
|
||||
frame->is_flashing = FALSE;
|
||||
|
||||
attrs.event_mask = EVENT_MASK;
|
||||
|
||||
meta_verbose ("Framing window %s: visual %s default, depth %d default depth %d\n",
|
||||
window->desc,
|
||||
XVisualIDFromVisual (window->xvisual) ==
|
||||
@@ -77,24 +77,19 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
* e.g. DRI games can't be children of a parent that has the same
|
||||
* visual as the client.
|
||||
*/
|
||||
|
||||
frame->xwindow = XCreateWindow (window->display->xdisplay,
|
||||
window->screen->xroot,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height,
|
||||
0,
|
||||
window->screen->default_depth,
|
||||
CopyFromParent,
|
||||
window->screen->default_xvisual,
|
||||
CWEventMask,
|
||||
&attrs);
|
||||
|
||||
/* So our UI can find the window ID */
|
||||
XFlush (window->display->xdisplay);
|
||||
|
||||
frame->xwindow = meta_ui_create_frame_window (window->screen->ui,
|
||||
window->display->xdisplay,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height,
|
||||
frame->window->screen->number);
|
||||
|
||||
meta_verbose ("Frame for %s is 0x%lx\n", frame->window->desc, frame->xwindow);
|
||||
attrs.event_mask = EVENT_MASK;
|
||||
XChangeWindowAttributes (window->display->xdisplay,
|
||||
frame->xwindow, CWEventMask, &attrs);
|
||||
|
||||
meta_display_register_x_window (window->display, &frame->xwindow, window);
|
||||
|
||||
@@ -131,8 +126,6 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
/* stick frame to the window */
|
||||
window->frame = frame;
|
||||
|
||||
meta_ui_add_frame (window->screen->ui, frame->xwindow);
|
||||
|
||||
if (window->title)
|
||||
meta_ui_set_frame_title (window->screen->ui,
|
||||
window->frame->xwindow,
|
||||
@@ -162,7 +155,7 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
|
||||
frame = window->frame;
|
||||
|
||||
meta_ui_remove_frame (window->screen->ui, frame->xwindow);
|
||||
meta_bell_notify_frame_destroy (frame);
|
||||
|
||||
/* Unparent the client window; it may be destroyed,
|
||||
* thus the error trap.
|
||||
@@ -186,6 +179,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
window->frame->rect.y);
|
||||
meta_error_trap_pop (window->display, FALSE);
|
||||
|
||||
meta_ui_destroy_frame_window (window->screen->ui, frame->xwindow);
|
||||
|
||||
meta_display_unregister_x_window (window->display,
|
||||
frame->xwindow);
|
||||
|
||||
@@ -194,9 +189,6 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
/* Move keybindings to window instead of frame */
|
||||
meta_window_grab_keys (window);
|
||||
|
||||
/* should we push an error trap? */
|
||||
XDestroyWindow (window->display->xdisplay, frame->xwindow);
|
||||
|
||||
g_free (frame);
|
||||
|
||||
/* Put our state back where it should be */
|
||||
@@ -258,6 +250,9 @@ meta_frame_get_flags (MetaFrame *frame)
|
||||
if (frame->window->fullscreen)
|
||||
flags |= META_FRAME_FULLSCREEN;
|
||||
|
||||
if (frame->is_flashing)
|
||||
flags |= META_FRAME_IS_FLASHING;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -333,23 +328,12 @@ meta_frame_sync_to_window (MetaFrame *frame,
|
||||
*/
|
||||
update_shape (frame);
|
||||
|
||||
if (need_move && need_resize)
|
||||
XMoveResizeWindow (frame->window->display->xdisplay,
|
||||
frame->xwindow,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
else if (need_move)
|
||||
XMoveWindow (frame->window->display->xdisplay,
|
||||
frame->xwindow,
|
||||
frame->rect.x,
|
||||
frame->rect.y);
|
||||
else if (need_resize)
|
||||
XResizeWindow (frame->window->display->xdisplay,
|
||||
frame->xwindow,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
meta_ui_move_resize_frame (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
frame->rect.x,
|
||||
frame->rect.y,
|
||||
frame->rect.width,
|
||||
frame->rect.height);
|
||||
|
||||
if (need_resize)
|
||||
{
|
||||
@@ -373,8 +357,9 @@ meta_frame_queue_draw (MetaFrame *frame)
|
||||
frame->xwindow);
|
||||
}
|
||||
|
||||
void meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaCursor cursor)
|
||||
void
|
||||
meta_frame_set_screen_cursor (MetaFrame *frame,
|
||||
MetaCursor cursor)
|
||||
{
|
||||
Cursor xcursor;
|
||||
if (cursor == frame->current_cursor)
|
||||
|
@@ -58,6 +58,7 @@ struct _MetaFrame
|
||||
|
||||
guint mapped : 1;
|
||||
guint need_reapply_frame_shape : 1;
|
||||
guint is_flashing : 1; /* used by the visual bell flash */
|
||||
};
|
||||
|
||||
void meta_window_ensure_frame (MetaWindow *window);
|
||||
|
149
src/frames.c
149
src/frames.c
@@ -452,7 +452,6 @@ meta_frames_calc_geometry (MetaFrames *frames,
|
||||
MetaFrames*
|
||||
meta_frames_new (int screen_number)
|
||||
{
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
GdkScreen *screen;
|
||||
|
||||
screen = gdk_display_get_screen (gdk_display_get_default (),
|
||||
@@ -460,32 +459,25 @@ meta_frames_new (int screen_number)
|
||||
|
||||
return g_object_new (META_TYPE_FRAMES,
|
||||
"screen", screen,
|
||||
NULL);
|
||||
#else
|
||||
return g_object_new (META_TYPE_FRAMES,
|
||||
NULL);
|
||||
#endif
|
||||
|
||||
NULL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_manage_window (MetaFrames *frames,
|
||||
Window xwindow)
|
||||
Window xwindow,
|
||||
GdkWindow *window)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
g_assert (window);
|
||||
|
||||
frame = g_new (MetaUIFrame, 1);
|
||||
|
||||
frame->window = gdk_window_foreign_new (xwindow);
|
||||
frame->window = window;
|
||||
|
||||
if (frame->window == NULL)
|
||||
{
|
||||
g_free (frame);
|
||||
meta_bug ("Frame 0x%lx doesn't exist\n", xwindow);
|
||||
return;
|
||||
}
|
||||
|
||||
gdk_window_set_user_data (frame->window, frames);
|
||||
gtk_style_set_background (GTK_WIDGET (frames)->style,
|
||||
frame->window, GTK_STATE_NORMAL);
|
||||
|
||||
/* Don't set event mask here, it's in frame.c */
|
||||
|
||||
@@ -527,7 +519,7 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
||||
|
||||
g_hash_table_remove (frames->frames, &frame->xwindow);
|
||||
|
||||
g_object_unref (G_OBJECT (frame->window));
|
||||
gdk_window_destroy (frame->window);
|
||||
|
||||
if (frame->layout)
|
||||
g_object_unref (G_OBJECT (frame->layout));
|
||||
@@ -835,21 +827,15 @@ meta_frames_apply_shapes (MetaFrames *frames,
|
||||
Window shape_window;
|
||||
Window client_window;
|
||||
Region client_xregion;
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
GdkScreen *screen;
|
||||
#endif
|
||||
int screen_number;
|
||||
|
||||
meta_topic (META_DEBUG_SHAPES,
|
||||
"Frame 0x%lx needs to incorporate client shape\n",
|
||||
frame->xwindow);
|
||||
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
screen = gtk_widget_get_screen (GTK_WIDGET (frames));
|
||||
screen_number = gdk_x11_screen_get_screen_number (screen);
|
||||
#else
|
||||
screen_number = DefaultScreen (gdk_display);
|
||||
#endif
|
||||
|
||||
attrs.override_redirect = True;
|
||||
|
||||
@@ -922,6 +908,25 @@ meta_frames_apply_shapes (MetaFrames *frames,
|
||||
#endif /* HAVE_SHAPE */
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_move_resize_frame (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
MetaUIFrame *frame = meta_frames_lookup_window (frames, xwindow);
|
||||
int old_width, old_height;
|
||||
|
||||
gdk_drawable_get_size (frame->window, &old_width, &old_height);
|
||||
|
||||
gdk_window_move_resize (frame->window, x, y, width, height);
|
||||
|
||||
if (old_width != width || old_height != height)
|
||||
gdk_window_invalidate_rect (frame->window, NULL, FALSE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_frames_queue_draw (MetaFrames *frames,
|
||||
Window xwindow)
|
||||
@@ -1057,11 +1062,8 @@ show_tip_now (MetaFrames *frames)
|
||||
/* get conversion delta for root-to-frame coords */
|
||||
dx = root_x - x;
|
||||
dy = root_y - y;
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames)));
|
||||
#else
|
||||
screen_number = DefaultScreen (gdk_display);
|
||||
#endif
|
||||
|
||||
meta_fixed_tip_show (gdk_display,
|
||||
screen_number,
|
||||
rect->x + dx,
|
||||
@@ -1592,6 +1594,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
MetaGrabOp grab_op;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
@@ -1602,16 +1605,43 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
clear_tip (frames);
|
||||
|
||||
frames->last_motion_frame = frame;
|
||||
|
||||
grab_op = meta_core_get_grab_op (gdk_display);
|
||||
|
||||
switch (meta_core_get_grab_op (gdk_display))
|
||||
switch (grab_op)
|
||||
{
|
||||
case META_GRAB_OP_CLICKING_MENU:
|
||||
case META_GRAB_OP_CLICKING_DELETE:
|
||||
case META_GRAB_OP_CLICKING_MINIMIZE:
|
||||
case META_GRAB_OP_CLICKING_MAXIMIZE:
|
||||
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
|
||||
{
|
||||
MetaFrameControl control;
|
||||
int x, y;
|
||||
|
||||
gdk_window_get_pointer (frame->window, &x, &y, NULL);
|
||||
|
||||
/* Control is set to none unless it matches
|
||||
* the current grab
|
||||
*/
|
||||
control = get_control (frames, frame, x, y);
|
||||
if (! ((control == META_FRAME_CONTROL_MENU &&
|
||||
grab_op == META_GRAB_OP_CLICKING_MENU) ||
|
||||
(control == META_FRAME_CONTROL_DELETE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_DELETE) ||
|
||||
(control == META_FRAME_CONTROL_MINIMIZE &&
|
||||
grab_op == META_GRAB_OP_CLICKING_MINIMIZE) ||
|
||||
(control == META_FRAME_CONTROL_MAXIMIZE &&
|
||||
(grab_op == META_GRAB_OP_CLICKING_MAXIMIZE ||
|
||||
grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE))))
|
||||
control = META_FRAME_CONTROL_NONE;
|
||||
|
||||
/* Update prelit control and cursor */
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
|
||||
/* No tooltip while in the process of clicking */
|
||||
}
|
||||
break;
|
||||
|
||||
case META_GRAB_OP_NONE:
|
||||
{
|
||||
MetaFrameControl control;
|
||||
@@ -1659,7 +1689,7 @@ meta_frames_expose_event (GtkWidget *widget,
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
@@ -1699,6 +1729,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||
int n_areas;
|
||||
int screen_width, screen_height;
|
||||
MetaButtonLayout button_layout;
|
||||
MetaGrabOp grab_op;
|
||||
|
||||
widget = GTK_WIDGET (frames);
|
||||
|
||||
@@ -1710,53 +1741,47 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||
++i;
|
||||
}
|
||||
|
||||
grab_frame = meta_core_get_grab_frame (gdk_display);
|
||||
grab_op = meta_core_get_grab_op (gdk_display);
|
||||
if (grab_frame != frame->xwindow)
|
||||
grab_op = META_GRAB_OP_NONE;
|
||||
|
||||
/* Set prelight state */
|
||||
switch (frame->prelit_control)
|
||||
{
|
||||
case META_FRAME_CONTROL_MENU:
|
||||
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_MENU)
|
||||
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MENU] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_MINIMIZE)
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
if (grab_op == META_GRAB_OP_CLICKING_MAXIMIZE)
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_UNMAXIMIZE)
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRELIGHT;
|
||||
if (grab_op == META_GRAB_OP_CLICKING_DELETE)
|
||||
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRESSED;
|
||||
else
|
||||
button_states[META_BUTTON_TYPE_CLOSE] = META_BUTTON_STATE_PRELIGHT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
grab_frame = meta_core_get_grab_frame (gdk_display);
|
||||
|
||||
if (frame->xwindow == grab_frame)
|
||||
{
|
||||
switch (meta_core_get_grab_op (gdk_display))
|
||||
{
|
||||
case META_GRAB_OP_CLICKING_MENU:
|
||||
button_states[META_BUTTON_TYPE_MENU] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
case META_GRAB_OP_CLICKING_DELETE:
|
||||
button_states[META_BUTTON_TYPE_CLOSE] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
case META_GRAB_OP_CLICKING_MAXIMIZE:
|
||||
case META_GRAB_OP_CLICKING_UNMAXIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MAXIMIZE] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
case META_GRAB_OP_CLICKING_MINIMIZE:
|
||||
button_states[META_BUTTON_TYPE_MINIMIZE] =
|
||||
META_BUTTON_STATE_PRESSED;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Map button function states to button position states */
|
||||
button_states[META_BUTTON_TYPE_LEFT_LEFT_BACKGROUND] =
|
||||
|
10
src/frames.h
10
src/frames.h
@@ -103,7 +103,8 @@ GType meta_frames_get_type (void) G_GNUC_CONST;
|
||||
MetaFrames *meta_frames_new (int screen_number);
|
||||
|
||||
void meta_frames_manage_window (MetaFrames *frames,
|
||||
Window xwindow);
|
||||
Window xwindow,
|
||||
GdkWindow *window);
|
||||
void meta_frames_unmanage_window (MetaFrames *frames,
|
||||
Window xwindow);
|
||||
void meta_frames_set_title (MetaFrames *frames,
|
||||
@@ -130,7 +131,12 @@ void meta_frames_apply_shapes (MetaFrames *frames,
|
||||
int new_window_width,
|
||||
int new_window_height,
|
||||
gboolean window_has_shape);
|
||||
|
||||
void meta_frames_move_resize_frame (MetaFrames *frames,
|
||||
Window xwindow,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
void meta_frames_queue_draw (MetaFrames *frames,
|
||||
Window xwindow);
|
||||
|
||||
|
99
src/group.c
99
src/group.c
@@ -105,67 +105,71 @@ meta_window_get_group (MetaWindow *window)
|
||||
{
|
||||
if (window->unmanaging)
|
||||
return NULL;
|
||||
|
||||
if (window->cached_group == NULL)
|
||||
|
||||
g_assert (window->group != NULL);
|
||||
|
||||
return window->group;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_compute_group (MetaWindow* window)
|
||||
{
|
||||
MetaGroup *group;
|
||||
|
||||
/* use window->xwindow if no window->xgroup_leader */
|
||||
|
||||
group = NULL;
|
||||
|
||||
if (window->display->groups_by_leader)
|
||||
{
|
||||
MetaGroup *group;
|
||||
|
||||
/* use window->xwindow if no window->xgroup_leader */
|
||||
|
||||
group = NULL;
|
||||
|
||||
if (window->display->groups_by_leader)
|
||||
{
|
||||
if (window->xgroup_leader != None)
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xgroup_leader);
|
||||
else
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xwindow);
|
||||
}
|
||||
|
||||
if (group != NULL)
|
||||
{
|
||||
window->cached_group = group;
|
||||
group->refcount += 1;
|
||||
}
|
||||
if (window->xgroup_leader != None)
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xgroup_leader);
|
||||
else
|
||||
{
|
||||
if (window->xgroup_leader != None)
|
||||
group = meta_group_new (window->display,
|
||||
window->xgroup_leader);
|
||||
else
|
||||
group = meta_group_new (window->display,
|
||||
window->xwindow);
|
||||
group = g_hash_table_lookup (window->display->groups_by_leader,
|
||||
&window->xwindow);
|
||||
}
|
||||
|
||||
if (group != NULL)
|
||||
{
|
||||
window->group = group;
|
||||
group->refcount += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (window->xgroup_leader != None)
|
||||
group = meta_group_new (window->display,
|
||||
window->xgroup_leader);
|
||||
else
|
||||
group = meta_group_new (window->display,
|
||||
window->xwindow);
|
||||
|
||||
window->cached_group = group;
|
||||
}
|
||||
|
||||
window->cached_group->windows = g_slist_prepend (window->cached_group->windows,
|
||||
window);
|
||||
|
||||
meta_topic (META_DEBUG_GROUPS,
|
||||
"Adding %s to group with leader 0x%lx\n",
|
||||
window->desc, group->group_leader);
|
||||
window->group = group;
|
||||
}
|
||||
|
||||
return window->cached_group;
|
||||
window->group->windows = g_slist_prepend (window->group->windows,
|
||||
window);
|
||||
|
||||
meta_topic (META_DEBUG_GROUPS,
|
||||
"Adding %s to group with leader 0x%lx\n",
|
||||
window->desc, group->group_leader);
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
remove_window_from_group (MetaWindow *window)
|
||||
{
|
||||
if (window->cached_group != NULL)
|
||||
if (window->group != NULL)
|
||||
{
|
||||
meta_topic (META_DEBUG_GROUPS,
|
||||
"Removing %s from group with leader 0x%lx\n",
|
||||
window->desc, window->cached_group->group_leader);
|
||||
window->desc, window->group->group_leader);
|
||||
|
||||
window->cached_group->windows =
|
||||
g_slist_remove (window->cached_group->windows,
|
||||
window->group->windows =
|
||||
g_slist_remove (window->group->windows,
|
||||
window);
|
||||
meta_group_unref (window->cached_group);
|
||||
window->cached_group = NULL;
|
||||
meta_group_unref (window->group);
|
||||
window->group = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +177,7 @@ void
|
||||
meta_window_group_leader_changed (MetaWindow *window)
|
||||
{
|
||||
remove_window_from_group (window);
|
||||
meta_window_get_group (window);
|
||||
meta_window_compute_group (window);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -255,4 +259,5 @@ meta_group_property_notify (MetaGroup *group,
|
||||
event->xproperty.atom);
|
||||
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@
|
||||
|
||||
/* note, can return NULL */
|
||||
MetaGroup* meta_window_get_group (MetaWindow *window);
|
||||
void meta_window_compute_group (MetaWindow* window);
|
||||
void meta_window_shutdown_group (MetaWindow *window);
|
||||
|
||||
void meta_window_group_leader_changed (MetaWindow *window);
|
||||
|
@@ -79,6 +79,16 @@ static void handle_toggle_desktop (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_panel_keybinding (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_toggle_above (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_toggle_maximize (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
@@ -129,6 +139,11 @@ static void handle_move_to_workspace (MetaDisplay *display,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_move_to_workspace_flip (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding);
|
||||
static void handle_workspace_switch (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
@@ -209,7 +224,7 @@ struct _MetaKeyBinding
|
||||
const char *name;
|
||||
KeySym keysym;
|
||||
unsigned int mask;
|
||||
int keycode;
|
||||
unsigned int keycode;
|
||||
MetaVirtualModifier modifiers;
|
||||
const MetaKeyHandler *handler;
|
||||
};
|
||||
@@ -265,6 +280,10 @@ static const MetaKeyHandler screen_handlers[] = {
|
||||
GINT_TO_POINTER (META_TAB_LIST_DOCKS) },
|
||||
{ META_KEYBINDING_SHOW_DESKTOP, handle_toggle_desktop,
|
||||
NULL },
|
||||
{ META_KEYBINDING_PANEL_MAIN_MENU, handle_panel_keybinding,
|
||||
GINT_TO_POINTER (META_KEYBINDING_ACTION_PANEL_MAIN_MENU) },
|
||||
{ META_KEYBINDING_PANEL_RUN_DIALOG, handle_panel_keybinding,
|
||||
GINT_TO_POINTER (META_KEYBINDING_ACTION_PANEL_RUN_DIALOG) },
|
||||
{ META_KEYBINDING_COMMAND_1, handle_run_command,
|
||||
GINT_TO_POINTER (0) },
|
||||
{ META_KEYBINDING_COMMAND_2, handle_run_command,
|
||||
@@ -329,12 +348,17 @@ static const MetaKeyHandler screen_handlers[] = {
|
||||
GINT_TO_POINTER (30) },
|
||||
{ META_KEYBINDING_COMMAND_32, handle_run_command,
|
||||
GINT_TO_POINTER (31) },
|
||||
{ META_KEYBINDING_COMMAND_SCREENSHOT, handle_run_command,
|
||||
GINT_TO_POINTER (32) },
|
||||
{ META_KEYBINDING_COMMAND_WIN_SCREENSHOT, handle_run_command,
|
||||
GINT_TO_POINTER (33) },
|
||||
{ NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
static const MetaKeyHandler window_handlers[] = {
|
||||
{ META_KEYBINDING_WINDOW_MENU, handle_activate_menu, NULL },
|
||||
{ META_KEYBINDING_TOGGLE_FULLSCREEN, handle_toggle_fullscreen, NULL },
|
||||
{ META_KEYBINDING_TOGGLE_ABOVE, handle_toggle_above, NULL },
|
||||
{ META_KEYBINDING_TOGGLE_MAXIMIZE, handle_toggle_maximize, NULL },
|
||||
{ META_KEYBINDING_MAXIMIZE, handle_maximize, NULL },
|
||||
{ META_KEYBINDING_UNMAXIMIZE, handle_unmaximize, NULL },
|
||||
@@ -368,13 +392,13 @@ static const MetaKeyHandler window_handlers[] = {
|
||||
GINT_TO_POINTER (10) },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_12, handle_move_to_workspace,
|
||||
GINT_TO_POINTER (11) },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, handle_move_to_workspace,
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, handle_move_to_workspace_flip,
|
||||
GINT_TO_POINTER (META_MOTION_LEFT) },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, handle_move_to_workspace,
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, handle_move_to_workspace_flip,
|
||||
GINT_TO_POINTER (META_MOTION_RIGHT) },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_UP, handle_move_to_workspace,
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_UP, handle_move_to_workspace_flip,
|
||||
GINT_TO_POINTER (META_MOTION_UP) },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, handle_move_to_workspace,
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, handle_move_to_workspace_flip,
|
||||
GINT_TO_POINTER (META_MOTION_DOWN) },
|
||||
{ META_KEYBINDING_RAISE_OR_LOWER, handle_raise_or_lower, NULL},
|
||||
{ META_KEYBINDING_RAISE, handle_raise, NULL},
|
||||
@@ -429,7 +453,7 @@ reload_modmap (MetaDisplay *display)
|
||||
/* get the key code at this point in the map,
|
||||
* see if its keysym is one we're interested in
|
||||
*/
|
||||
int keycode = modmap->modifiermap[i];
|
||||
unsigned int keycode = modmap->modifiermap[i];
|
||||
|
||||
if (keycode >= display->min_keycode &&
|
||||
keycode <= display->max_keycode)
|
||||
@@ -512,7 +536,7 @@ reload_keycodes (MetaDisplay *display)
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (display->screen_bindings[i].keysym != None)
|
||||
while (i < display->n_screen_bindings)
|
||||
{
|
||||
display->screen_bindings[i].keycode = XKeysymToKeycode (display->xdisplay,
|
||||
display->screen_bindings[i].keysym);
|
||||
@@ -526,7 +550,7 @@ reload_keycodes (MetaDisplay *display)
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (display->window_bindings[i].keysym != None)
|
||||
while (i < display->n_window_bindings)
|
||||
{
|
||||
display->window_bindings[i].keycode = XKeysymToKeycode (display->xdisplay,
|
||||
display->window_bindings[i].keysym);
|
||||
@@ -547,11 +571,17 @@ reload_modifiers (MetaDisplay *display)
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (display->screen_bindings[i].keysym != None)
|
||||
while (i < display->n_screen_bindings)
|
||||
{
|
||||
meta_display_devirtualize_modifiers (display,
|
||||
display->screen_bindings[i].modifiers,
|
||||
&display->screen_bindings[i].mask);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
" Devirtualized mods 0x%x -> 0x%x (%s)\n",
|
||||
display->screen_bindings[i].modifiers,
|
||||
display->screen_bindings[i].mask,
|
||||
display->screen_bindings[i].name);
|
||||
|
||||
++i;
|
||||
}
|
||||
@@ -562,93 +592,137 @@ reload_modifiers (MetaDisplay *display)
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (display->window_bindings[i].keysym != None)
|
||||
while (i < display->n_window_bindings)
|
||||
{
|
||||
meta_display_devirtualize_modifiers (display,
|
||||
display->window_bindings[i].modifiers,
|
||||
&display->window_bindings[i].mask);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
" Devirtualized mods 0x%x -> 0x%x (%s)\n",
|
||||
display->window_bindings[i].modifiers,
|
||||
display->window_bindings[i].mask,
|
||||
display->window_bindings[i].name);
|
||||
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
rebuild_screen_binding_table (MetaDisplay *display)
|
||||
static int
|
||||
count_bindings (const MetaKeyPref *prefs,
|
||||
int n_prefs)
|
||||
{
|
||||
int i;
|
||||
int count;
|
||||
|
||||
count = 0;
|
||||
i = 0;
|
||||
while (i < n_prefs)
|
||||
{
|
||||
if (prefs[i].keysym != None)
|
||||
{
|
||||
count += 1;
|
||||
|
||||
if (prefs[i].add_shift &&
|
||||
(prefs[i].modifiers & META_VIRTUAL_SHIFT_MASK) == 0)
|
||||
count += 1;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static void
|
||||
rebuild_binding_table (MetaDisplay *display,
|
||||
MetaKeyBinding **bindings_p,
|
||||
int *n_bindings_p,
|
||||
const MetaKeyPref *prefs,
|
||||
int n_prefs)
|
||||
{
|
||||
const MetaKeyPref *prefs;
|
||||
int n_bindings;
|
||||
int src, dest;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Rebuilding screen binding table from preferences\n");
|
||||
|
||||
meta_prefs_get_screen_bindings (&prefs, &n_bindings);
|
||||
g_free (display->screen_bindings);
|
||||
display->screen_bindings = g_new0 (MetaKeyBinding, n_bindings);
|
||||
n_bindings = count_bindings (prefs, n_prefs);
|
||||
g_free (*bindings_p);
|
||||
*bindings_p = g_new0 (MetaKeyBinding, n_bindings);
|
||||
|
||||
src = 0;
|
||||
dest = 0;
|
||||
while (src < n_bindings)
|
||||
while (src < n_prefs)
|
||||
{
|
||||
if (prefs[src].keysym != None)
|
||||
{
|
||||
display->screen_bindings[dest].name = prefs[src].name;
|
||||
display->screen_bindings[dest].keysym = prefs[src].keysym;
|
||||
display->screen_bindings[dest].modifiers = prefs[src].modifiers;
|
||||
display->screen_bindings[dest].mask = 0;
|
||||
display->screen_bindings[dest].keycode = 0;
|
||||
(*bindings_p)[dest].name = prefs[src].name;
|
||||
(*bindings_p)[dest].keysym = prefs[src].keysym;
|
||||
(*bindings_p)[dest].modifiers = prefs[src].modifiers;
|
||||
(*bindings_p)[dest].mask = 0;
|
||||
(*bindings_p)[dest].keycode = 0;
|
||||
|
||||
++dest;
|
||||
|
||||
if (prefs[src].add_shift &&
|
||||
(prefs[src].modifiers & META_VIRTUAL_SHIFT_MASK) == 0)
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Binding %s also needs Shift grabbed\n",
|
||||
prefs[src].name);
|
||||
|
||||
(*bindings_p)[dest].name = prefs[src].name;
|
||||
(*bindings_p)[dest].keysym = prefs[src].keysym;
|
||||
(*bindings_p)[dest].modifiers = prefs[src].modifiers |
|
||||
META_VIRTUAL_SHIFT_MASK;
|
||||
(*bindings_p)[dest].mask = 0;
|
||||
(*bindings_p)[dest].keycode = 0;
|
||||
|
||||
++dest;
|
||||
}
|
||||
}
|
||||
|
||||
++src;
|
||||
}
|
||||
|
||||
display->n_screen_bindings = dest;
|
||||
g_assert (dest == n_bindings);
|
||||
|
||||
*n_bindings_p = dest;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"%d screen bindings in table\n",
|
||||
display->n_screen_bindings);
|
||||
" %d bindings in table\n",
|
||||
*n_bindings_p);
|
||||
}
|
||||
|
||||
static void
|
||||
rebuild_screen_binding_table (MetaDisplay *display)
|
||||
{
|
||||
const MetaKeyPref *prefs;
|
||||
int n_prefs;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Rebuilding screen binding table from preferences\n");
|
||||
|
||||
meta_prefs_get_screen_bindings (&prefs, &n_prefs);
|
||||
rebuild_binding_table (display,
|
||||
&display->screen_bindings,
|
||||
&display->n_screen_bindings,
|
||||
prefs, n_prefs);
|
||||
}
|
||||
|
||||
static void
|
||||
rebuild_window_binding_table (MetaDisplay *display)
|
||||
{
|
||||
const MetaKeyPref *prefs;
|
||||
int n_bindings;
|
||||
int src, dest;
|
||||
int n_prefs;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Rebuilding window binding table from preferences\n");
|
||||
|
||||
meta_prefs_get_window_bindings (&prefs, &n_bindings);
|
||||
g_free (display->window_bindings);
|
||||
display->window_bindings = g_new0 (MetaKeyBinding, n_bindings);
|
||||
|
||||
src = 0;
|
||||
dest = 0;
|
||||
while (src < n_bindings)
|
||||
{
|
||||
if (prefs[src].keysym != None)
|
||||
{
|
||||
display->window_bindings[dest].name = prefs[src].name;
|
||||
display->window_bindings[dest].keysym = prefs[src].keysym;
|
||||
display->window_bindings[dest].modifiers = prefs[src].modifiers;
|
||||
display->window_bindings[dest].mask = 0;
|
||||
display->window_bindings[dest].keycode = 0;
|
||||
|
||||
++dest;
|
||||
}
|
||||
|
||||
++src;
|
||||
}
|
||||
|
||||
display->n_window_bindings = dest;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"%d window bindings in table\n",
|
||||
display->n_window_bindings);
|
||||
meta_prefs_get_window_bindings (&prefs, &n_prefs);
|
||||
rebuild_binding_table (display,
|
||||
&display->window_bindings,
|
||||
&display->n_window_bindings,
|
||||
prefs, n_prefs);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -854,10 +928,10 @@ meta_change_keygrab (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
gboolean grab,
|
||||
int keysym,
|
||||
int keycode,
|
||||
unsigned int keycode,
|
||||
int modmask)
|
||||
{
|
||||
int ignored_mask;
|
||||
unsigned int ignored_mask;
|
||||
|
||||
/* Grab keycode/modmask, together with
|
||||
* all combinations of ignored modifiers.
|
||||
@@ -874,7 +948,7 @@ meta_change_keygrab (MetaDisplay *display,
|
||||
meta_error_trap_push (display);
|
||||
|
||||
ignored_mask = 0;
|
||||
while (ignored_mask < (int) display->ignored_modifier_mask)
|
||||
while (ignored_mask <= display->ignored_modifier_mask)
|
||||
{
|
||||
if (ignored_mask & ~(display->ignored_modifier_mask))
|
||||
{
|
||||
@@ -925,7 +999,7 @@ static void
|
||||
meta_grab_key (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
int keysym,
|
||||
int keycode,
|
||||
unsigned int keycode,
|
||||
int modmask)
|
||||
{
|
||||
meta_change_keygrab (display, xwindow, TRUE, keysym, keycode, modmask);
|
||||
@@ -1017,6 +1091,14 @@ meta_window_grab_keys (MetaWindow *window)
|
||||
{
|
||||
if (window->all_keys_grabbed)
|
||||
return;
|
||||
|
||||
if (window->type == META_WINDOW_DOCK)
|
||||
{
|
||||
if (window->keys_grabbed)
|
||||
ungrab_all_keys (window->display, window->xwindow);
|
||||
window->keys_grabbed = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
if (window->keys_grabbed)
|
||||
{
|
||||
@@ -1055,25 +1137,55 @@ meta_window_ungrab_keys (MetaWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WITH_VERBOSE_MODE
|
||||
static const char*
|
||||
grab_status_to_string (int status)
|
||||
{
|
||||
switch (status)
|
||||
{
|
||||
case AlreadyGrabbed:
|
||||
return "AlreadyGrabbed";
|
||||
case GrabSuccess:
|
||||
return "GrabSuccess";
|
||||
case GrabNotViewable:
|
||||
return "GrabNotViewable";
|
||||
case GrabFrozen:
|
||||
return "GrabFrozen";
|
||||
case GrabInvalidTime:
|
||||
return "GrabInvalidTime";
|
||||
default:
|
||||
return "(unknown)";
|
||||
}
|
||||
}
|
||||
#endif /* WITH_VERBOSE_MODE */
|
||||
|
||||
static gboolean
|
||||
grab_keyboard (MetaDisplay *display,
|
||||
Window xwindow)
|
||||
{
|
||||
int result;
|
||||
|
||||
int grab_status;
|
||||
Time timestamp;
|
||||
|
||||
/* Grab the keyboard, so we get key releases and all key
|
||||
* presses
|
||||
*/
|
||||
meta_error_trap_push_with_return (display);
|
||||
|
||||
if (XGrabKeyboard (display->xdisplay,
|
||||
xwindow, True,
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
meta_display_get_current_time (display)) != GrabSuccess)
|
||||
timestamp = meta_display_get_current_time (display);
|
||||
grab_status = XGrabKeyboard (display->xdisplay,
|
||||
xwindow, True,
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
timestamp);
|
||||
|
||||
if (grab_status != GrabSuccess)
|
||||
{
|
||||
meta_error_trap_pop_with_return (display, TRUE);
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"XGrabKeyboard() returned failure\n");
|
||||
"XGrabKeyboard() returned failure status %s time %lu\n",
|
||||
grab_status_to_string (grab_status),
|
||||
(unsigned long) timestamp);
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1274,10 +1386,9 @@ is_specific_modifier (MetaDisplay *display,
|
||||
return retval;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
keycode_is_primary_modifier (MetaDisplay *display,
|
||||
unsigned int keycode,
|
||||
unsigned int entire_binding_mask)
|
||||
static unsigned int
|
||||
get_primary_modifier (MetaDisplay *display,
|
||||
unsigned int entire_binding_mask)
|
||||
{
|
||||
/* The idea here is to see if the "main" modifier
|
||||
* for Alt+Tab has been pressed/released. So if the binding
|
||||
@@ -1290,20 +1401,62 @@ keycode_is_primary_modifier (MetaDisplay *display,
|
||||
ShiftMask, LockMask };
|
||||
|
||||
int i;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Checking whether code 0x%x is the primary modifier of mask 0x%x\n",
|
||||
keycode, entire_binding_mask);
|
||||
|
||||
i = 0;
|
||||
while (i < (int) G_N_ELEMENTS (masks))
|
||||
{
|
||||
if (entire_binding_mask & masks[i])
|
||||
return is_specific_modifier (display, keycode, masks[i]);
|
||||
return masks[i];
|
||||
++i;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
keycode_is_primary_modifier (MetaDisplay *display,
|
||||
unsigned int keycode,
|
||||
unsigned int entire_binding_mask)
|
||||
{
|
||||
unsigned int primary_modifier;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Checking whether code 0x%x is the primary modifier of mask 0x%x\n",
|
||||
keycode, entire_binding_mask);
|
||||
|
||||
primary_modifier = get_primary_modifier (display, entire_binding_mask);
|
||||
if (primary_modifier != 0)
|
||||
return is_specific_modifier (display, keycode, primary_modifier);
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
primary_modifier_still_pressed (MetaDisplay *display,
|
||||
unsigned int entire_binding_mask)
|
||||
{
|
||||
unsigned int primary_modifier;
|
||||
int x, y, root_x, root_y;
|
||||
Window root, child;
|
||||
guint mask;
|
||||
|
||||
primary_modifier = get_primary_modifier (display, entire_binding_mask);
|
||||
|
||||
XQueryPointer (display->xdisplay,
|
||||
display->no_focus_window, /* some random window */
|
||||
&root, &child,
|
||||
&root_x, &root_y,
|
||||
&x, &y,
|
||||
&mask);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Primary modifier 0x%x full grab mask 0x%x current state 0x%x\n",
|
||||
primary_modifier, entire_binding_mask, mask);
|
||||
|
||||
if ((mask & primary_modifier) == 0)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static const MetaKeyHandler*
|
||||
@@ -1344,13 +1497,18 @@ process_event (MetaKeyBinding *bindings,
|
||||
i = 0;
|
||||
while (i < n_bindings)
|
||||
{
|
||||
if (bindings[i].keysym == keysym &&
|
||||
if (bindings[i].keycode == event->xkey.keycode &&
|
||||
((event->xkey.state & ~(display->ignored_modifier_mask)) ==
|
||||
bindings[i].mask) &&
|
||||
event->type == KeyPress)
|
||||
{
|
||||
const MetaKeyHandler *handler;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Binding keycode 0x%x mask 0x%x matches event 0x%x state 0x%x\n",
|
||||
bindings[i].keycode, bindings[i].mask,
|
||||
event->xkey.keycode, event->xkey.state);
|
||||
|
||||
if (bindings[i].handler)
|
||||
handler = bindings[i].handler;
|
||||
else
|
||||
@@ -1547,14 +1705,26 @@ process_keyboard_move_grab (MetaDisplay *display,
|
||||
else
|
||||
incr = NORMAL_INCREMENT;
|
||||
|
||||
if (keysym == XK_Escape)
|
||||
{
|
||||
/* End move and restore to original position */
|
||||
meta_window_move_resize (display->grab_window,
|
||||
TRUE,
|
||||
display->grab_initial_window_pos.x,
|
||||
display->grab_initial_window_pos.y,
|
||||
display->grab_initial_window_pos.width,
|
||||
display->grab_initial_window_pos.height);
|
||||
}
|
||||
|
||||
/* When moving by increments, we still snap to edges if the move
|
||||
* to the edge is smaller than the increment. This is because
|
||||
* Shift + arrow to snap is sort of a hidden feature. This way
|
||||
* people using just arrows shouldn't get too frustrated.
|
||||
*/
|
||||
|
||||
switch (keysym)
|
||||
{
|
||||
case XK_KP_Home:
|
||||
case XK_KP_Prior:
|
||||
case XK_Up:
|
||||
case XK_KP_Up:
|
||||
edge = meta_window_find_next_horizontal_edge (window, FALSE);
|
||||
@@ -1565,6 +1735,8 @@ process_keyboard_move_grab (MetaDisplay *display,
|
||||
|
||||
handled = TRUE;
|
||||
break;
|
||||
case XK_KP_End:
|
||||
case XK_KP_Next:
|
||||
case XK_Down:
|
||||
case XK_KP_Down:
|
||||
edge = meta_window_find_next_horizontal_edge (window, TRUE);
|
||||
@@ -1575,6 +1747,12 @@ process_keyboard_move_grab (MetaDisplay *display,
|
||||
|
||||
handled = TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (keysym)
|
||||
{
|
||||
case XK_KP_Home:
|
||||
case XK_KP_End:
|
||||
case XK_Left:
|
||||
case XK_KP_Left:
|
||||
edge = meta_window_find_next_vertical_edge (window, FALSE);
|
||||
@@ -1585,6 +1763,8 @@ process_keyboard_move_grab (MetaDisplay *display,
|
||||
|
||||
handled = TRUE;
|
||||
break;
|
||||
case XK_KP_Prior:
|
||||
case XK_KP_Next:
|
||||
case XK_Right:
|
||||
case XK_KP_Right:
|
||||
edge = meta_window_find_next_vertical_edge (window, TRUE);
|
||||
@@ -1593,19 +1773,6 @@ process_keyboard_move_grab (MetaDisplay *display,
|
||||
x = edge;
|
||||
handled = TRUE;
|
||||
break;
|
||||
|
||||
case XK_Escape:
|
||||
/* End move and restore to original position */
|
||||
meta_window_move_resize (display->grab_window,
|
||||
TRUE,
|
||||
display->grab_initial_window_pos.x,
|
||||
display->grab_initial_window_pos.y,
|
||||
display->grab_initial_window_pos.width,
|
||||
display->grab_initial_window_pos.height);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (handled)
|
||||
@@ -2034,10 +2201,6 @@ process_tab_grab (MetaDisplay *display,
|
||||
|
||||
if (target_window)
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Ending grab early so we can focus the target window\n");
|
||||
meta_display_end_grab_op (display, event->xkey.time);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Activating target window\n");
|
||||
|
||||
@@ -2045,6 +2208,10 @@ process_tab_grab (MetaDisplay *display,
|
||||
target_window->desc);
|
||||
meta_window_activate (target_window, event->xkey.time);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Ending grab early so we can focus the target window\n");
|
||||
meta_display_end_grab_op (display, event->xkey.time);
|
||||
|
||||
return TRUE; /* we already ended the grab */
|
||||
}
|
||||
|
||||
@@ -2440,11 +2607,64 @@ handle_toggle_desktop (MetaDisplay *display,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (screen->showing_desktop)
|
||||
meta_screen_unshow_desktop (screen);
|
||||
{
|
||||
meta_screen_unshow_desktop (screen);
|
||||
meta_workspace_focus_top_window (screen->active_workspace, NULL);
|
||||
}
|
||||
else
|
||||
meta_screen_show_desktop (screen);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_panel_keybinding (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
MetaKeyBindingAction action;
|
||||
Atom action_atom;
|
||||
XClientMessageEvent ev;
|
||||
|
||||
action = GPOINTER_TO_INT (binding->handler->data);
|
||||
|
||||
action_atom = None;
|
||||
switch (action)
|
||||
{
|
||||
case META_KEYBINDING_ACTION_PANEL_MAIN_MENU:
|
||||
action_atom = display->atom_gnome_panel_action_main_menu;
|
||||
break;
|
||||
case META_KEYBINDING_ACTION_PANEL_RUN_DIALOG:
|
||||
action_atom = display->atom_gnome_panel_action_run_dialog;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
ev.type = ClientMessage;
|
||||
ev.window = screen->xroot;
|
||||
ev.message_type = display->atom_gnome_panel_action;
|
||||
ev.format = 32;
|
||||
ev.data.l[0] = action_atom;
|
||||
ev.data.l[1] = event->xkey.time;
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Sending panel message with timestamp %lu\n", event->xkey.time);
|
||||
|
||||
meta_error_trap_push (display);
|
||||
|
||||
/* Release the grab for the panel before sending the event */
|
||||
XUngrabKeyboard (display->xdisplay, event->xkey.time);
|
||||
|
||||
XSendEvent (display->xdisplay,
|
||||
screen->xroot,
|
||||
False,
|
||||
StructureNotifyMask,
|
||||
(XEvent*) &ev);
|
||||
|
||||
meta_error_trap_pop (display, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_activate_menu (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -2558,15 +2778,30 @@ do_choose_window (MetaDisplay *display,
|
||||
binding->mask,
|
||||
event->xkey.time,
|
||||
0, 0))
|
||||
{
|
||||
meta_ui_tab_popup_select (screen->tab_popup,
|
||||
(MetaTabEntryKey) initial_selection->xwindow);
|
||||
|
||||
if (show_popup)
|
||||
meta_ui_tab_popup_set_showing (screen->tab_popup,
|
||||
TRUE);
|
||||
{
|
||||
if (!primary_modifier_still_pressed (display,
|
||||
binding->mask))
|
||||
{
|
||||
/* This handles a race where modifier might be released
|
||||
* before we establish the grab. must end grab
|
||||
* prior to trying to focus a window.
|
||||
*/
|
||||
meta_topic (META_DEBUG_FOCUS, "Ending grab and activating %s due to switch/cycle windows where modifier was released prior to grab\n",
|
||||
initial_selection->desc);
|
||||
meta_display_end_grab_op (display, event->xkey.time);
|
||||
meta_window_activate (initial_selection, event->xkey.time);
|
||||
}
|
||||
else
|
||||
meta_window_raise (initial_selection);
|
||||
{
|
||||
meta_ui_tab_popup_select (screen->tab_popup,
|
||||
(MetaTabEntryKey) initial_selection->xwindow);
|
||||
|
||||
if (show_popup)
|
||||
meta_ui_tab_popup_set_showing (screen->tab_popup,
|
||||
TRUE);
|
||||
else
|
||||
meta_window_raise (initial_selection);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2631,6 +2866,22 @@ handle_toggle_fullscreen (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_above (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
if (window)
|
||||
{
|
||||
if (window->wm_state_above)
|
||||
meta_window_unmake_above (window);
|
||||
else
|
||||
meta_window_make_above (window);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_maximize (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -2762,11 +3013,12 @@ handle_toggle_sticky (MetaDisplay *display,
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_workspace (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
do_handle_move_to_workspace (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gboolean flip)
|
||||
{
|
||||
int which;
|
||||
MetaWorkspace *workspace;
|
||||
@@ -2791,7 +3043,8 @@ handle_move_to_workspace (MetaDisplay *display,
|
||||
{
|
||||
/* Activate second, so the window is never unmapped */
|
||||
meta_window_change_workspace (window, workspace);
|
||||
meta_workspace_activate (workspace);
|
||||
if (flip)
|
||||
meta_workspace_activate_with_focus (workspace, window);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2799,6 +3052,35 @@ handle_move_to_workspace (MetaDisplay *display,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_move_to_workspace (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
do_handle_move_to_workspace (display,
|
||||
screen,
|
||||
window,
|
||||
event,
|
||||
binding,
|
||||
FALSE);
|
||||
}
|
||||
static void
|
||||
handle_move_to_workspace_flip (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
do_handle_move_to_workspace (display,
|
||||
screen,
|
||||
window,
|
||||
event,
|
||||
binding,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_raise_or_lower (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@@ -2882,6 +3164,7 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
MetaKeyBinding *binding)
|
||||
{
|
||||
int motion;
|
||||
unsigned int grab_mask;
|
||||
|
||||
motion = GPOINTER_TO_INT (binding->handler->data);
|
||||
|
||||
@@ -2890,31 +3173,49 @@ handle_workspace_switch (MetaDisplay *display,
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Starting tab between workspaces, showing popup\n");
|
||||
|
||||
/* FIXME should we use binding->mask ? */
|
||||
grab_mask = event->xkey.state & ~(display->ignored_modifier_mask);
|
||||
|
||||
if (meta_display_begin_grab_op (display,
|
||||
screen,
|
||||
NULL,
|
||||
META_GRAB_OP_KEYBOARD_WORKSPACE_SWITCHING,
|
||||
FALSE,
|
||||
0,
|
||||
event->xkey.state & ~(display->ignored_modifier_mask),
|
||||
grab_mask,
|
||||
event->xkey.time,
|
||||
0, 0))
|
||||
{
|
||||
MetaWorkspace *next;
|
||||
|
||||
gboolean grabbed_before_release;
|
||||
|
||||
next = meta_workspace_get_neighbor (screen->active_workspace, motion);
|
||||
g_assert (next);
|
||||
|
||||
grabbed_before_release = primary_modifier_still_pressed (display, grab_mask);
|
||||
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Activating target workspace\n");
|
||||
|
||||
if (!grabbed_before_release)
|
||||
{
|
||||
/* end the grab right away, modifier possibly released
|
||||
* before we could establish the grab and receive the
|
||||
* release event. Must end grab before we can switch
|
||||
* spaces.
|
||||
*/
|
||||
meta_display_end_grab_op (display, event->xkey.time);
|
||||
}
|
||||
|
||||
switch_to_workspace (display, next);
|
||||
|
||||
meta_ui_tab_popup_select (screen->tab_popup, (MetaTabEntryKey) next);
|
||||
|
||||
/* only after selecting proper space */
|
||||
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
|
||||
|
||||
if (grabbed_before_release)
|
||||
{
|
||||
meta_ui_tab_popup_select (screen->tab_popup, (MetaTabEntryKey) next);
|
||||
|
||||
/* only after selecting proper space */
|
||||
meta_ui_tab_popup_set_showing (screen->tab_popup, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
26
src/main.c
26
src/main.c
@@ -61,7 +61,7 @@ log_handler (const gchar *log_domain,
|
||||
static void
|
||||
usage (void)
|
||||
{
|
||||
g_print (_("metacity [--disable-sm] [--sm-save-file=FILENAME] [--display=DISPLAY] [--replace] [--version]\n"));
|
||||
g_print (_("metacity [--sm-disable] [--sm-client-id=ID] [--sm-save-file=FILENAME] [--display=DISPLAY] [--replace] [--version]\n"));
|
||||
exit (1);
|
||||
}
|
||||
|
||||
@@ -112,6 +112,9 @@ main (int argc, char **argv)
|
||||
meta_set_debugging (TRUE);
|
||||
meta_set_syncing (g_getenv ("METACITY_SYNC") != NULL);
|
||||
|
||||
if (g_get_home_dir ())
|
||||
chdir (g_get_home_dir ());
|
||||
|
||||
{
|
||||
char buf[256];
|
||||
GDate d;
|
||||
@@ -271,6 +274,22 @@ main (int argc, char **argv)
|
||||
#else
|
||||
meta_topic (META_DEBUG_XINERAMA, " (not using Solaris Xinerama)\n");
|
||||
#endif
|
||||
#ifdef HAVE_XSYNC
|
||||
meta_verbose ("Compiled with sync extension\n");
|
||||
#else
|
||||
meta_verbose ("Compiled without sync extension\n");
|
||||
#endif
|
||||
#ifdef HAVE_RANDR
|
||||
meta_verbose ("Compiled with randr extension\n");
|
||||
#else
|
||||
meta_verbose ("Compiled without randr extension\n");
|
||||
#endif
|
||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||
meta_verbose ("Compiled with startup notification\n");
|
||||
#else
|
||||
meta_verbose ("Compiled without startup notification\n");
|
||||
#endif
|
||||
|
||||
|
||||
/* Load prefs */
|
||||
meta_prefs_init ();
|
||||
@@ -316,6 +335,9 @@ main (int argc, char **argv)
|
||||
/* Try some panic stuff, this is lame but we really
|
||||
* don't want users to lose their WM :-/
|
||||
*/
|
||||
if (!meta_ui_have_a_theme ())
|
||||
meta_ui_set_current_theme ("Simple", FALSE);
|
||||
|
||||
if (!meta_ui_have_a_theme ())
|
||||
meta_ui_set_current_theme ("Atlanta", FALSE);
|
||||
|
||||
@@ -324,7 +346,7 @@ main (int argc, char **argv)
|
||||
|
||||
if (!meta_ui_have_a_theme ())
|
||||
meta_fatal (_("Could not find a theme! Be sure %s exists and contains the usual themes."),
|
||||
METACITY_PKGDATADIR"/themes");
|
||||
METACITY_DATADIR"/themes");
|
||||
|
||||
/* Connect to SM as late as possible - but before managing display,
|
||||
* or we might try to manage a window before we have the session
|
||||
|
24
src/menu.c
24
src/menu.c
@@ -241,10 +241,10 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
menu->insensitive = insensitive;
|
||||
|
||||
menu->menu = gtk_menu_new ();
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
|
||||
gtk_menu_set_screen (GTK_MENU (menu->menu),
|
||||
gtk_widget_get_screen (GTK_WIDGET (frames)));
|
||||
#endif
|
||||
|
||||
i = 0;
|
||||
while (i < (int) G_N_ELEMENTS (menuitems))
|
||||
{
|
||||
@@ -316,25 +316,17 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
meta_verbose ("Creating %d-workspace menu current space %d\n",
|
||||
n_workspaces, active_workspace);
|
||||
|
||||
if (n_workspaces > 0)
|
||||
if (n_workspaces > 1)
|
||||
{
|
||||
GtkWidget *mi;
|
||||
Display *display;
|
||||
Window xroot;
|
||||
|
||||
GdkScreen *screen;
|
||||
|
||||
display = gdk_x11_drawable_get_xdisplay (GTK_WIDGET (frames)->window);
|
||||
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
{
|
||||
GdkScreen *screen;
|
||||
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
|
||||
xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
|
||||
}
|
||||
#else
|
||||
{
|
||||
xroot = gdk_x11_get_default_root_xwindow ();
|
||||
}
|
||||
#endif
|
||||
|
||||
screen = gdk_drawable_get_screen (GTK_WIDGET (frames)->window);
|
||||
xroot = GDK_DRAWABLE_XID (gdk_screen_get_root_window (screen));
|
||||
|
||||
i = 0;
|
||||
while (i < n_workspaces)
|
||||
|
@@ -79,19 +79,28 @@ kill_window_question (const char *window_name,
|
||||
const char *parent_str)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
||||
char *str, *tmp;
|
||||
|
||||
tmp = g_markup_escape_text (window_name, -1);
|
||||
str = g_strdup_printf (_("The window \"%s\" is not responding."), tmp);
|
||||
g_free (tmp);
|
||||
|
||||
dialog = gtk_message_dialog_new (NULL, 0,
|
||||
GTK_MESSAGE_QUESTION,
|
||||
GTK_MESSAGE_WARNING,
|
||||
GTK_BUTTONS_NONE,
|
||||
_("The window \"%s\" is not responding.\n"
|
||||
"Force this application to exit?\n"
|
||||
"(Any open documents will be lost.)"),
|
||||
window_name);
|
||||
"<b>%s</b>\n\n%s",
|
||||
str,
|
||||
_("Forcing this application to quit will "
|
||||
"cause you to lose any unsaved changes."));
|
||||
g_free (str);
|
||||
|
||||
gtk_label_set_use_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (GTK_MESSAGE_DIALOG (dialog)->label), TRUE);
|
||||
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
|
||||
GTK_STOCK_CANCEL,
|
||||
GTK_RESPONSE_REJECT,
|
||||
_("Kill application"),
|
||||
_("_Force Quit"),
|
||||
GTK_RESPONSE_ACCEPT,
|
||||
NULL);
|
||||
|
||||
@@ -228,7 +237,10 @@ warn_about_no_sm_support (char **lame_apps)
|
||||
G_CALLBACK (gtk_main_quit),
|
||||
NULL);
|
||||
|
||||
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
|
||||
/* Wait 4 minutes then force quit, so we don't wait around all night */
|
||||
g_timeout_add (4 * 60 * 1000, (GSourceFunc) gtk_main_quit, NULL);
|
||||
|
||||
gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CLOSE);
|
||||
list = create_lame_apps_list (lame_apps);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
|
@@ -7,6 +7,9 @@ X-GNOME-WMSettingsModule=metacity
|
||||
X-GNOME-WMName=Metacity
|
||||
# back compat only
|
||||
X-GnomeWMSettingsLibrary=metacity
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
X-GNOME-Bugzilla-Product=metacity
|
||||
X-GNOME-Bugzilla-Component=general
|
||||
|
||||
[Window Manager]
|
||||
SessionManaged=true
|
||||
|
@@ -71,8 +71,8 @@
|
||||
<short>Action on title bar double-click</short>
|
||||
<long>
|
||||
This option determines the effects of double-clicking on the
|
||||
title bar. Current valid options are 'toggle_shaded', which will
|
||||
shade/unshade the window, and 'toggle_maximized' which will
|
||||
title bar. Current valid options are 'toggle_shade', which will
|
||||
shade/unshade the window, and 'toggle_maximize' which will
|
||||
maximize/unmaximize the window.
|
||||
</long>
|
||||
</locale>
|
||||
@@ -114,7 +114,7 @@
|
||||
<applyto>/apps/metacity/general/theme</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default>Atlanta</default>
|
||||
<default>Simple</default>
|
||||
<locale name="C">
|
||||
<short>Current theme</short>
|
||||
<long>
|
||||
@@ -177,6 +177,57 @@
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/general/visual_bell</key>
|
||||
<applyto>/apps/metacity/general/visual_bell</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>bool</type>
|
||||
<default>false</default>
|
||||
<locale name="C">
|
||||
<short>Enable Visual Bell</short>
|
||||
<long>Turns on a visual indication when an application or the system
|
||||
issues a 'bell' or 'beep'; useful for the hard-of-hearing and for use
|
||||
in noisy environments, or when 'audible bell' is off.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/general/audible_bell</key>
|
||||
<applyto>/apps/metacity/general/audible_bell</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>bool</type>
|
||||
<default>true</default>
|
||||
<locale name="C">
|
||||
<short>System Bell is Audible</short>
|
||||
<long>Determines whether applications or the system can generate audible
|
||||
'beeps'; may be used in conjunction with 'visual bell' to
|
||||
allow silent 'beeps'.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/general/visual_bell_type</key>
|
||||
<applyto>/apps/metacity/general/visual_bell_type</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default>fullscreen</default>
|
||||
<locale name="C">
|
||||
<short>Visual Bell Type</short>
|
||||
<long>
|
||||
Tells Metacity how to implement the visual indication that
|
||||
the system bell or another application 'bell' indicator has
|
||||
been rung. Currently there are two valid values, "fullscreen",
|
||||
which causes a fullscreen white-black flash, and "frame_flash" which
|
||||
causes the titlebar of the application which sent the bell signal to
|
||||
flash. If the application which sent the bell is unknown (as is
|
||||
usually the case for the default "system beep"), the currently
|
||||
focused window's titlebar is flashed.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/workspace_names/name</key>
|
||||
<applyto>/apps/metacity/workspace_names/name_1</applyto>
|
||||
@@ -251,6 +302,29 @@ you set
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/toggle_above</key>
|
||||
<applyto>/apps/metacity/window_keybindings/toggle_above</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default>disabled</default>
|
||||
<locale name="C">
|
||||
<short>Toggle always on top state</short>
|
||||
<long>
|
||||
|
||||
The keybinding used to toggle always on top. A window that
|
||||
is always on top will always be visible over other overlapping windows.
|
||||
The format looks like "<Control>a" or "<Shift><Alt>F1.
|
||||
The parser is
|
||||
fairly liberal and allows lower or upper case, and also
|
||||
abbreviations such as "<Ctl>" and "<Ctrl>". If
|
||||
you set
|
||||
the option to the special string "disabled", then there
|
||||
will be no keybinding for this action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/window_keybindings/toggle_maximized</key>
|
||||
<applyto>/apps/metacity/window_keybindings/toggle_maximized</applyto>
|
||||
@@ -1548,6 +1622,100 @@ you set
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/global_keybindings/panel_main_menu</key>
|
||||
<applyto>/apps/metacity/global_keybindings/panel_main_menu</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default><Alt>F1</default>
|
||||
<locale name="C">
|
||||
<short>Show the panel menu</short>
|
||||
<long>
|
||||
The keybinding which shows the panel's main menu.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1.
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/global_keybindings/panel_run_dialog</key>
|
||||
<applyto>/apps/metacity/global_keybindings/panel_run_dialog</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default><Alt>F2</default>
|
||||
<locale name="C">
|
||||
<short>Show the panel run dialog</short>
|
||||
<long>
|
||||
The keybinding which display's the panel's "Run Program" dialog
|
||||
box.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1.
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/global_keybindings/run_command_screenshot</key>
|
||||
<applyto>/apps/metacity/global_keybindings/run_command_screenshot</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default>Print</default>
|
||||
<locale name="C">
|
||||
<short>Take a screenshot</short>
|
||||
<long>
|
||||
The keybinding which invokes the panel's screenshot utility.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1.
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/global_keybindings/run_command_window_screenshot</key>
|
||||
<applyto>/apps/metacity/global_keybindings/run_command_window_screenshot</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default><Alt>Print</default>
|
||||
<locale name="C">
|
||||
<short>Take a screenshot of a window</short>
|
||||
<long>
|
||||
The keybinding which invokes the panel's screenshot utility
|
||||
to take a screenshot of a window.
|
||||
|
||||
The format looks like "<Control>a" or
|
||||
"<Shift><Alt>F1.
|
||||
|
||||
The parser is fairly liberal and allows lower or upper case,
|
||||
and also abbreviations such as "<Ctl>" and
|
||||
"<Ctrl>". If you set the option to the special string
|
||||
"disabled", then there will be no keybinding for this
|
||||
action.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/global_keybindings/run_command</key>
|
||||
<applyto>/apps/metacity/global_keybindings/run_command_1</applyto>
|
||||
@@ -1585,6 +1753,38 @@ you set
|
||||
|
||||
<!-- commands to run with the run_command keybindings -->
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/keybinding_commands/command_screenshot</key>
|
||||
<applyto>/apps/metacity/keybinding_commands/command_screenshot</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default>gnome-panel-screenshot</default>
|
||||
<locale name="C">
|
||||
<short>The screenshot command</short>
|
||||
<long>
|
||||
The /apps/metacity/global_keybindings/run_command_screenshot
|
||||
key defines a keybinding which causes the command specified
|
||||
by this setting to be invoked.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/keybinding_commands/command_window_screenshot</key>
|
||||
<applyto>/apps/metacity/keybinding_commands/command_window_screenshot</applyto>
|
||||
<owner>metacity</owner>
|
||||
<type>string</type>
|
||||
<default>gnome-panel-screenshot --window</default>
|
||||
<locale name="C">
|
||||
<short>The window screenshot command</short>
|
||||
<long>
|
||||
The /apps/metacity/global_keybindings/run_command_window_screenshot
|
||||
key defines a keybinding which causes the command specified
|
||||
by this setting to be invoked.
|
||||
</long>
|
||||
</locale>
|
||||
</schema>
|
||||
|
||||
<schema>
|
||||
<key>/schemas/apps/metacity/keybinding_commands/command</key>
|
||||
<applyto>/apps/metacity/keybinding_commands/command_1</applyto>
|
||||
|
442
src/place.c
442
src/place.c
@@ -2,6 +2,8 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2002, 2003 Red Hat, Inc.
|
||||
* Copyright (C) 2003 Rob Adams
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -90,7 +92,8 @@ find_next_cascade (MetaWindow *window,
|
||||
int x_threshold, y_threshold;
|
||||
int window_width, window_height;
|
||||
int cascade_stage;
|
||||
MetaRectangle work_area;
|
||||
MetaRectangle work_area;
|
||||
const MetaXineramaScreenInfo* current;
|
||||
|
||||
sorted = g_list_copy (windows);
|
||||
sorted = g_list_sort (sorted, northwestcmp);
|
||||
@@ -120,13 +123,10 @@ find_next_cascade (MetaWindow *window,
|
||||
* cascade_x, cascade_y are the target position
|
||||
* of NW corner of window frame.
|
||||
*/
|
||||
|
||||
/* FIXME this is bogus because we get the current xinerama
|
||||
* for the window based on its position, but we haven't
|
||||
* placed it yet.
|
||||
*/
|
||||
meta_window_get_work_area (window, TRUE, &work_area);
|
||||
|
||||
|
||||
current = meta_screen_get_current_xinerama (window->screen);
|
||||
meta_window_get_work_area_for_xinerama (window, current->number, &work_area);
|
||||
|
||||
cascade_x = MAX (0, work_area.x);
|
||||
cascade_y = MAX (0, work_area.y);
|
||||
|
||||
@@ -363,63 +363,32 @@ topmost_cmp (gconstpointer a, gconstpointer b)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fit_rect_in_xinerama (MetaScreen *screen,
|
||||
MetaRectangle *rect)
|
||||
static void
|
||||
center_tile_rect_in_area (MetaRectangle *rect,
|
||||
MetaRectangle *work_area)
|
||||
{
|
||||
int i;
|
||||
int best_index;
|
||||
int best_overlap;
|
||||
const MetaXineramaScreenInfo *xsi;
|
||||
|
||||
/* Find xinerama with best fit, then
|
||||
* shift rect to be entirely within it.
|
||||
int fluff;
|
||||
|
||||
/* The point here is to tile a window such that "extra"
|
||||
* space is equal on either side (i.e. so a full screen
|
||||
* of windows tiled this way would center the windows
|
||||
* as a group)
|
||||
*/
|
||||
best_overlap = -1;
|
||||
best_index = -1;
|
||||
|
||||
i = 0;
|
||||
while (i < screen->n_xinerama_infos)
|
||||
{
|
||||
MetaRectangle xinerama_rect;
|
||||
MetaRectangle intersect;
|
||||
int overlap;
|
||||
|
||||
xsi = &screen->xinerama_infos[i];
|
||||
|
||||
xinerama_rect.x = xsi->x_origin;
|
||||
xinerama_rect.y = xsi->y_origin;
|
||||
xinerama_rect.width = xsi->width;
|
||||
xinerama_rect.height = xsi->height;
|
||||
fluff = (work_area->width % (rect->width+1)) / 2;
|
||||
rect->x = work_area->x + fluff;
|
||||
fluff = (work_area->height % (rect->height+1)) / 3;
|
||||
rect->y = work_area->y + fluff;
|
||||
}
|
||||
|
||||
if (meta_rectangle_intersect (rect, &xinerama_rect, &intersect))
|
||||
overlap = intersect.width * intersect.height;
|
||||
else
|
||||
overlap = 0;
|
||||
|
||||
if (overlap > best_overlap)
|
||||
{
|
||||
best_index = i;
|
||||
best_overlap = overlap;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
/* some overlap had to be better than -1 */
|
||||
g_assert (best_index >= 0);
|
||||
|
||||
xsi = &screen->xinerama_infos[best_index];
|
||||
|
||||
if (rect->x < xsi->x_origin)
|
||||
rect->x = xsi->x_origin;
|
||||
if (rect->y < xsi->y_origin)
|
||||
rect->y = xsi->y_origin;
|
||||
|
||||
/* Now return whether we are entirely within the xinerama screen */
|
||||
return
|
||||
((rect->x + rect->width) < (xsi->x_origin + xsi->width)) &&
|
||||
((rect->y + rect->height) < (xsi->y_origin + xsi->height));
|
||||
static gboolean
|
||||
rect_fits_in_work_area (MetaRectangle *work_area,
|
||||
MetaRectangle *rect)
|
||||
{
|
||||
return ((rect->x >= work_area->x) &&
|
||||
(rect->y >= work_area->y) &&
|
||||
(rect->x + rect->width <= work_area->x + work_area->width) &&
|
||||
(rect->y + rect->height <= work_area->y + work_area->height));
|
||||
}
|
||||
|
||||
/* Find the leftmost, then topmost, empty area on the workspace
|
||||
@@ -435,6 +404,8 @@ find_first_fit (MetaWindow *window,
|
||||
MetaFrameGeometry *fgeom,
|
||||
/* visible windows on relevant workspaces */
|
||||
GList *windows,
|
||||
int* xineramas_list,
|
||||
int n_xineramas,
|
||||
int x,
|
||||
int y,
|
||||
int *new_x,
|
||||
@@ -446,16 +417,26 @@ find_first_fit (MetaWindow *window,
|
||||
* the bottom of each existing window, and then to the right
|
||||
* of each existing window, aligned with the left/top of the
|
||||
* existing window in each of those cases.
|
||||
*/
|
||||
|
||||
*/
|
||||
int retval;
|
||||
GList *sorted;
|
||||
GList *below_sorted;
|
||||
GList *right_sorted;
|
||||
GList *tmp;
|
||||
MetaRectangle rect;
|
||||
MetaRectangle work_area;
|
||||
int i;
|
||||
|
||||
retval = FALSE;
|
||||
sorted = NULL;
|
||||
|
||||
/* Below each window */
|
||||
below_sorted = g_list_copy (windows);
|
||||
below_sorted = g_list_sort (below_sorted, leftmost_cmp);
|
||||
below_sorted = g_list_sort (below_sorted, topmost_cmp);
|
||||
|
||||
/* To the right of each window */
|
||||
right_sorted = g_list_copy (windows);
|
||||
right_sorted = g_list_sort (right_sorted, topmost_cmp);
|
||||
right_sorted = g_list_sort (right_sorted, leftmost_cmp);
|
||||
|
||||
rect.width = window->rect.width;
|
||||
rect.height = window->rect.height;
|
||||
@@ -466,104 +447,26 @@ find_first_fit (MetaWindow *window,
|
||||
rect.height += fgeom->top_height + fgeom->bottom_height;
|
||||
}
|
||||
|
||||
/* Try origin of first Xinerama */
|
||||
rect.x = window->screen->xinerama_infos[0].x_origin;
|
||||
rect.y = window->screen->xinerama_infos[0].y_origin;
|
||||
|
||||
if (fit_rect_in_xinerama (window->screen, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, windows))
|
||||
for (i = 0; i < n_xineramas; i++)
|
||||
{
|
||||
*new_x = rect.x;
|
||||
*new_y = rect.y;
|
||||
if (fgeom)
|
||||
{
|
||||
*new_x += fgeom->left_width;
|
||||
*new_y += fgeom->top_height;
|
||||
}
|
||||
|
||||
retval = TRUE;
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
sorted = g_list_copy (windows);
|
||||
|
||||
/* Below each window */
|
||||
sorted = g_list_sort (sorted, leftmost_cmp);
|
||||
sorted = g_list_sort (sorted, topmost_cmp);
|
||||
|
||||
tmp = sorted;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle outer_rect;
|
||||
|
||||
meta_window_get_outer_rect (w, &outer_rect);
|
||||
|
||||
rect.x = outer_rect.x;
|
||||
rect.y = outer_rect.y + outer_rect.height;
|
||||
|
||||
if (fit_rect_in_xinerama (window->screen, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, sorted))
|
||||
{
|
||||
*new_x = rect.x;
|
||||
*new_y = rect.y;
|
||||
if (fgeom)
|
||||
{
|
||||
*new_x += fgeom->left_width;
|
||||
*new_y += fgeom->top_height;
|
||||
}
|
||||
|
||||
retval = TRUE;
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
meta_topic (META_DEBUG_XINERAMA,
|
||||
"Natural xinerama %d is %d,%d %dx%d\n",
|
||||
i,
|
||||
window->screen->xinerama_infos[xineramas_list[i]].x_origin,
|
||||
window->screen->xinerama_infos[xineramas_list[i]].y_origin,
|
||||
window->screen->xinerama_infos[xineramas_list[i]].width,
|
||||
window->screen->xinerama_infos[xineramas_list[i]].height);
|
||||
}
|
||||
|
||||
/* To the right of each window */
|
||||
sorted = g_list_sort (sorted, topmost_cmp);
|
||||
sorted = g_list_sort (sorted, leftmost_cmp);
|
||||
|
||||
tmp = sorted;
|
||||
while (tmp != NULL)
|
||||
/* try each xinerama in the natural ordering in turn */
|
||||
i = 0;
|
||||
while (i < n_xineramas)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle outer_rect;
|
||||
|
||||
meta_window_get_outer_rect (w, &outer_rect);
|
||||
meta_window_get_work_area_for_xinerama (window, xineramas_list[i], &work_area);
|
||||
|
||||
rect.x = outer_rect.x + outer_rect.width;
|
||||
rect.y = outer_rect.y;
|
||||
|
||||
if (fit_rect_in_xinerama (window->screen, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, sorted))
|
||||
{
|
||||
*new_x = rect.x;
|
||||
*new_y = rect.y;
|
||||
if (fgeom)
|
||||
{
|
||||
*new_x += fgeom->left_width;
|
||||
*new_y += fgeom->top_height;
|
||||
}
|
||||
center_tile_rect_in_area (&rect, &work_area);
|
||||
|
||||
retval = TRUE;
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
/* Origin of each Xinerama screen which isn't the first */
|
||||
i = 1;
|
||||
while (i < window->screen->n_xinerama_infos)
|
||||
{
|
||||
rect.x = window->screen->xinerama_infos[i].x_origin;
|
||||
rect.y = window->screen->xinerama_infos[i].y_origin;
|
||||
|
||||
if (fit_rect_in_xinerama (window->screen, &rect) &&
|
||||
if (rect_fits_in_work_area (&work_area, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, windows))
|
||||
{
|
||||
*new_x = rect.x;
|
||||
@@ -578,69 +481,79 @@ find_first_fit (MetaWindow *window,
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* try below each window */
|
||||
tmp = below_sorted;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle outer_rect;
|
||||
|
||||
meta_window_get_outer_rect (w, &outer_rect);
|
||||
|
||||
rect.x = outer_rect.x;
|
||||
rect.y = outer_rect.y + outer_rect.height;
|
||||
|
||||
if (rect_fits_in_work_area (&work_area, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, below_sorted))
|
||||
{
|
||||
*new_x = rect.x;
|
||||
*new_y = rect.y;
|
||||
if (fgeom)
|
||||
{
|
||||
*new_x += fgeom->left_width;
|
||||
*new_y += fgeom->top_height;
|
||||
}
|
||||
|
||||
retval = TRUE;
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
/* try to the right of each window */
|
||||
tmp = right_sorted;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
MetaRectangle outer_rect;
|
||||
|
||||
meta_window_get_outer_rect (w, &outer_rect);
|
||||
|
||||
rect.x = outer_rect.x + outer_rect.width;
|
||||
rect.y = outer_rect.y;
|
||||
|
||||
if (rect_fits_in_work_area (&work_area, &rect) &&
|
||||
!rectangle_overlaps_some_window (&rect, right_sorted))
|
||||
{
|
||||
*new_x = rect.x;
|
||||
*new_y = rect.y;
|
||||
if (fgeom)
|
||||
{
|
||||
*new_x += fgeom->left_width;
|
||||
*new_y += fgeom->top_height;
|
||||
}
|
||||
|
||||
retval = TRUE;
|
||||
|
||||
goto out;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
out:
|
||||
g_list_free (sorted);
|
||||
|
||||
g_list_free (below_sorted);
|
||||
g_list_free (right_sorted);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void
|
||||
constrain_placement (MetaWindow *window,
|
||||
MetaFrameGeometry *fgeom,
|
||||
int x,
|
||||
int y,
|
||||
int *new_x,
|
||||
int *new_y)
|
||||
{
|
||||
/* The purpose of this function is to apply constraints that are not
|
||||
* covered by window.c:constrain_position(), but should apply
|
||||
* whenever we are _placing_ a window regardless of placement algorithm.
|
||||
*/
|
||||
MetaRectangle work_area;
|
||||
int nw_x, nw_y;
|
||||
int offscreen_w, offscreen_h;
|
||||
MetaRectangle outer_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &outer_rect);
|
||||
|
||||
/* FIXME this is bogus because we get the current xinerama
|
||||
* for the window based on its position, but we haven't
|
||||
* placed it yet.
|
||||
*/
|
||||
meta_window_get_work_area (window, TRUE, &work_area);
|
||||
|
||||
nw_x = work_area.x;
|
||||
nw_y = work_area.y;
|
||||
if (window->frame)
|
||||
{
|
||||
nw_x += fgeom->left_width;
|
||||
nw_y += fgeom->top_height;
|
||||
}
|
||||
|
||||
/* Keep window from going off the bottom right, though we don't have
|
||||
* this constraint once the window has been placed
|
||||
*/
|
||||
offscreen_w = (outer_rect.x + outer_rect.width) - (work_area.x + work_area.width);
|
||||
if (offscreen_w > 0)
|
||||
nw_x -= offscreen_w;
|
||||
offscreen_h = (outer_rect.y + outer_rect.height) - (work_area.y + work_area.height);
|
||||
if (offscreen_h > 0)
|
||||
nw_y -= offscreen_h;
|
||||
|
||||
/* Keep window from going off left edge, though again we don't have
|
||||
* this constraint once the window has been placed.
|
||||
*/
|
||||
if (x < nw_x)
|
||||
x = nw_x;
|
||||
if (y < nw_y)
|
||||
y = nw_y;
|
||||
|
||||
*new_x = x;
|
||||
*new_y = y;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_place (MetaWindow *window,
|
||||
MetaFrameGeometry *fgeom,
|
||||
@@ -651,6 +564,10 @@ meta_window_place (MetaWindow *window,
|
||||
{
|
||||
GList *windows;
|
||||
const MetaXineramaScreenInfo *xi;
|
||||
int* xineramas_list = NULL;
|
||||
int n_xineramas;
|
||||
int i;
|
||||
int placed_on = -1;
|
||||
|
||||
/* frame member variables should NEVER be used in here, only
|
||||
* MetaFrameGeometry. But remember fgeom == NULL
|
||||
@@ -838,17 +755,89 @@ meta_window_place (MetaWindow *window,
|
||||
x = xi->x_origin;
|
||||
y = xi->y_origin;
|
||||
|
||||
if (find_first_fit (window, fgeom, windows, x, y, &x, &y))
|
||||
meta_screen_get_natural_xinerama_list (window->screen,
|
||||
&xineramas_list,
|
||||
&n_xineramas);
|
||||
|
||||
if (find_first_fit (window, fgeom, windows,
|
||||
xineramas_list, n_xineramas,
|
||||
x, y, &x, &y))
|
||||
goto done;
|
||||
|
||||
find_next_cascade (window, fgeom, windows, x, y, &x, &y);
|
||||
|
||||
/* This is a special-case origin-cascade so that windows that are
|
||||
* too large to fit onto a workspace (and which will be
|
||||
* automaximized later) will go onto an empty xinerama if one is
|
||||
* available.
|
||||
*/
|
||||
if (window->has_maximize_func && window->decorated &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
if (window->frame)
|
||||
{
|
||||
x = fgeom->left_width;
|
||||
y = fgeom->top_height;
|
||||
}
|
||||
else
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < n_xineramas; i++)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
|
||||
meta_window_get_work_area_for_xinerama (window, xineramas_list[i], &work_area);
|
||||
|
||||
if (!rectangle_overlaps_some_window (&work_area, windows))
|
||||
{
|
||||
x += work_area.x;
|
||||
y += work_area.y;
|
||||
placed_on = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* if the window wasn't placed at the origin of an empty xinerama,
|
||||
* cascade it onto the current xinerama
|
||||
*/
|
||||
if (placed_on == -1)
|
||||
{
|
||||
find_next_cascade (window, fgeom, windows, x, y, &x, &y);
|
||||
placed_on = 0;
|
||||
}
|
||||
|
||||
/* Maximize windows if they are too big for their work area (bit of
|
||||
* a hack here). Assume undecorated windows probably don't intend to
|
||||
* be maximized.
|
||||
*/
|
||||
if (window->has_maximize_func && window->decorated &&
|
||||
!window->fullscreen)
|
||||
{
|
||||
MetaRectangle workarea;
|
||||
MetaRectangle outer;
|
||||
|
||||
meta_window_get_work_area_for_xinerama (window,
|
||||
xineramas_list[placed_on],
|
||||
&workarea);
|
||||
meta_window_get_outer_rect (window, &outer);
|
||||
|
||||
if (outer.width >= workarea.width &&
|
||||
outer.height >= workarea.height)
|
||||
{
|
||||
outer.x = x;
|
||||
outer.y = y;
|
||||
meta_window_maximize_internal (window, &outer);
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
g_free (xineramas_list);
|
||||
g_list_free (windows);
|
||||
|
||||
constrain_placement (window, fgeom, x, y, &x, &y);
|
||||
|
||||
done_no_constraints:
|
||||
|
||||
*new_x = x;
|
||||
*new_y = y;
|
||||
}
|
||||
@@ -942,17 +931,17 @@ get_vertical_edges (MetaWindow *window,
|
||||
windows = get_windows_on_same_workspace (window, &n_windows);
|
||||
|
||||
i = 0;
|
||||
n_edges = n_windows * 2 + 4 + window->screen->n_xinerama_infos - 1; /* 4 = workspace/screen edges */
|
||||
/* 4 = workspace/screen edges */
|
||||
n_edges = n_windows * 2 + 4 + window->screen->n_xinerama_infos - 1;
|
||||
|
||||
edges = g_new (int, n_edges);
|
||||
|
||||
/* workspace/screen edges */
|
||||
meta_window_get_work_area (window, FALSE, &work_area);
|
||||
meta_window_get_work_area_current_xinerama (window, &work_area);
|
||||
|
||||
edges[i] = work_area.x;
|
||||
++i;
|
||||
edges[i] =
|
||||
work_area.x +
|
||||
work_area.width;
|
||||
edges[i] = work_area.x + work_area.width;
|
||||
++i;
|
||||
edges[i] = 0;
|
||||
++i;
|
||||
@@ -1019,13 +1008,11 @@ get_horizontal_edges (MetaWindow *window,
|
||||
edges = g_new (int, n_edges);
|
||||
|
||||
/* workspace/screen edges */
|
||||
meta_window_get_work_area (window, FALSE, &work_area);
|
||||
meta_window_get_work_area_current_xinerama (window, &work_area);
|
||||
|
||||
edges[i] = work_area.y;
|
||||
++i;
|
||||
edges[i] =
|
||||
work_area.y +
|
||||
work_area.height;
|
||||
edges[i] = work_area.y + work_area.height;
|
||||
++i;
|
||||
edges[i] = 0;
|
||||
++i;
|
||||
@@ -1207,7 +1194,6 @@ meta_window_find_next_horizontal_edge (MetaWindow *window,
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
meta_window_find_nearest_vertical_edge (MetaWindow *window,
|
||||
int x_pos)
|
||||
|
372
src/prefs.c
372
src/prefs.c
@@ -29,8 +29,12 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define MAX_REASONABLE_WORKSPACES 32
|
||||
#define MAX_COMMANDS 32
|
||||
#define MAX_REASONABLE_WORKSPACES 36
|
||||
|
||||
#define MAX_COMMANDS (32 + NUM_EXTRA_COMMANDS)
|
||||
#define NUM_EXTRA_COMMANDS 2
|
||||
#define SCREENSHOT_COMMAND_IDX (MAX_COMMANDS - 2)
|
||||
#define WIN_SCREENSHOT_COMMAND_IDX (MAX_COMMANDS - 1)
|
||||
|
||||
/* If you add a key, it needs updating in init() and in the gconf
|
||||
* notify listener and of course in the .schemas file
|
||||
@@ -54,6 +58,10 @@
|
||||
|
||||
#define KEY_WORKSPACE_NAME_PREFIX "/apps/metacity/workspace_names/name_"
|
||||
|
||||
#define KEY_VISUAL_BELL "/apps/metacity/general/visual_bell"
|
||||
#define KEY_AUDIBLE_BELL "/apps/metacity/general/audible_bell"
|
||||
#define KEY_VISUAL_BELL_TYPE "/apps/metacity/general/visual_bell_type"
|
||||
|
||||
#ifdef HAVE_GCONF
|
||||
static GConfClient *default_client = NULL;
|
||||
static GList *changes = NULL;
|
||||
@@ -73,6 +81,9 @@ static gboolean application_based = FALSE;
|
||||
static gboolean disable_workarounds = FALSE;
|
||||
static gboolean auto_raise = FALSE;
|
||||
static gboolean auto_raise_delay = 500;
|
||||
static gboolean provide_visual_bell = TRUE;
|
||||
static gboolean bell_is_audible = TRUE;
|
||||
static MetaVisualBellType visual_bell_type = META_VISUAL_BELL_INVALID;
|
||||
static MetaButtonLayout button_layout = {
|
||||
{
|
||||
META_BUTTON_FUNCTION_MENU,
|
||||
@@ -88,6 +99,7 @@ static MetaButtonLayout button_layout = {
|
||||
}
|
||||
};
|
||||
|
||||
/* The screenshot commands are at the end */
|
||||
static char *commands[MAX_COMMANDS] = { NULL, };
|
||||
|
||||
static char *workspace_names[MAX_REASONABLE_WORKSPACES] = { NULL, };
|
||||
@@ -98,6 +110,8 @@ static gboolean update_titlebar_font (const char *value);
|
||||
static gboolean update_mouse_button_mods (const char *value);
|
||||
static gboolean update_focus_mode (const char *value);
|
||||
static gboolean update_theme (const char *value);
|
||||
static gboolean update_visual_bell (gboolean v1, gboolean v2);
|
||||
static gboolean update_visual_bell_type (const char *value);
|
||||
static gboolean update_num_workspaces (int value);
|
||||
static gboolean update_application_based (gboolean value);
|
||||
static gboolean update_disable_workarounds (gboolean value);
|
||||
@@ -273,7 +287,7 @@ meta_prefs_init (void)
|
||||
GError *err = NULL;
|
||||
char *str_val;
|
||||
int int_val;
|
||||
gboolean bool_val;
|
||||
gboolean bool_val, bool_val_2;
|
||||
|
||||
if (default_client != NULL)
|
||||
return;
|
||||
@@ -360,6 +374,20 @@ meta_prefs_init (void)
|
||||
g_free (str_val);
|
||||
#endif /* HAVE_GCONF */
|
||||
|
||||
bool_val = gconf_client_get_bool (default_client, KEY_VISUAL_BELL,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
bool_val_2 = gconf_client_get_bool (default_client, KEY_AUDIBLE_BELL,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_visual_bell (bool_val, bool_val_2);
|
||||
|
||||
str_val = gconf_client_get_string (default_client, KEY_VISUAL_BELL_TYPE,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_visual_bell_type (str_val);
|
||||
g_free (str_val);
|
||||
|
||||
/* Load keybindings prefs */
|
||||
init_bindings ();
|
||||
|
||||
@@ -375,7 +403,7 @@ meta_prefs_init (void)
|
||||
NULL,
|
||||
NULL,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
cleanup_error (&err);
|
||||
#endif /* HAVE_GCONF */
|
||||
}
|
||||
|
||||
@@ -674,6 +702,37 @@ change_notify (GConfClient *client,
|
||||
if (update_button_layout (str))
|
||||
queue_changed (META_PREF_BUTTON_LAYOUT);
|
||||
}
|
||||
else if (strcmp (key, KEY_VISUAL_BELL) == 0)
|
||||
{
|
||||
gboolean b;
|
||||
|
||||
b = value ? gconf_value_get_bool (value) : provide_visual_bell;
|
||||
if (update_visual_bell (b, bell_is_audible))
|
||||
queue_changed (META_PREF_VISUAL_BELL);
|
||||
}
|
||||
else if (strcmp (key, KEY_AUDIBLE_BELL) == 0)
|
||||
{
|
||||
gboolean b;
|
||||
|
||||
b = value ? gconf_value_get_bool (value) : bell_is_audible;
|
||||
if (update_visual_bell (provide_visual_bell, b))
|
||||
queue_changed (META_PREF_AUDIBLE_BELL);
|
||||
}
|
||||
else if (strcmp (key, KEY_VISUAL_BELL_TYPE) == 0)
|
||||
{
|
||||
const char * str;
|
||||
|
||||
if (value && value->type != GCONF_VALUE_STRING)
|
||||
{
|
||||
meta_warning (_("GConf key \"%s\" is set to an invalid type\n"),
|
||||
KEY_VISUAL_BELL_TYPE);
|
||||
goto out;
|
||||
}
|
||||
|
||||
str = value ? gconf_value_get_string (value) : NULL;
|
||||
if (update_visual_bell_type (str))
|
||||
queue_changed (META_PREF_VISUAL_BELL_TYPE);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_PREFS, "Key %s doesn't mean anything to Metacity\n",
|
||||
@@ -803,8 +862,51 @@ update_use_system_font (gboolean value)
|
||||
|
||||
return old != value;
|
||||
}
|
||||
|
||||
static MetaVisualBellType
|
||||
visual_bell_type_from_string (const char *value)
|
||||
{
|
||||
if (value)
|
||||
{
|
||||
if (!strcmp (value, "fullscreen"))
|
||||
{
|
||||
return META_VISUAL_BELL_FULLSCREEN_FLASH;
|
||||
}
|
||||
else if (!strcmp (value, "frame_flash"))
|
||||
{
|
||||
return META_VISUAL_BELL_FRAME_FLASH;
|
||||
}
|
||||
}
|
||||
return META_VISUAL_BELL_FULLSCREEN_FLASH;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
update_visual_bell_type (const char *value)
|
||||
{
|
||||
MetaVisualBellType old_bell_type;
|
||||
|
||||
old_bell_type = visual_bell_type;
|
||||
visual_bell_type = visual_bell_type_from_string (value);
|
||||
|
||||
return (visual_bell_type != old_bell_type);
|
||||
}
|
||||
#endif /* HAVE_GCONF */
|
||||
|
||||
static gboolean
|
||||
update_visual_bell (gboolean visual_bell, gboolean audible_bell)
|
||||
{
|
||||
gboolean old_visual = provide_visual_bell;
|
||||
gboolean old_audible = bell_is_audible;
|
||||
gboolean has_changed;
|
||||
|
||||
provide_visual_bell = visual_bell;
|
||||
bell_is_audible = audible_bell;
|
||||
has_changed = (old_visual != provide_visual_bell) ||
|
||||
(old_audible != bell_is_audible);
|
||||
|
||||
return has_changed;
|
||||
}
|
||||
|
||||
#ifdef HAVE_GCONF
|
||||
static gboolean
|
||||
update_titlebar_font (const char *value)
|
||||
@@ -1191,6 +1293,18 @@ meta_preference_to_string (MetaPreference pref)
|
||||
case META_PREF_WORKSPACE_NAMES:
|
||||
return "WORKSPACE_NAMES";
|
||||
break;
|
||||
|
||||
case META_PREF_VISUAL_BELL:
|
||||
return "VISUAL_BELL";
|
||||
break;
|
||||
|
||||
case META_PREF_AUDIBLE_BELL:
|
||||
return "AUDIBLE_BELL";
|
||||
break;
|
||||
|
||||
case META_PREF_VISUAL_BELL_TYPE:
|
||||
return "VISUAL_BELL_TYPE";
|
||||
break;
|
||||
}
|
||||
|
||||
return "(unknown)";
|
||||
@@ -1229,100 +1343,105 @@ meta_prefs_set_num_workspaces (int n_workspaces)
|
||||
|
||||
/* Indexes must correspond to MetaKeybindingAction */
|
||||
static MetaKeyPref screen_bindings[] = {
|
||||
{ META_KEYBINDING_WORKSPACE_1, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_2, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_3, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_4, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_5, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_6, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_7, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_8, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_9, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_10, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_11, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_12, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_LEFT, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_RIGHT, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_UP, 0, 0 },
|
||||
{ META_KEYBINDING_WORKSPACE_DOWN, 0, 0 },
|
||||
{ META_KEYBINDING_SWITCH_WINDOWS, 0, 0 },
|
||||
{ META_KEYBINDING_SWITCH_WINDOWS_BACKWARD, 0, 0 },
|
||||
{ META_KEYBINDING_SWITCH_PANELS, 0, 0 },
|
||||
{ META_KEYBINDING_SWITCH_PANELS_BACKWARD, 0, 0 },
|
||||
{ META_KEYBINDING_CYCLE_WINDOWS, 0, 0 },
|
||||
{ META_KEYBINDING_CYCLE_WINDOWS_BACKWARD, 0, 0 },
|
||||
{ META_KEYBINDING_CYCLE_PANELS, 0, 0 },
|
||||
{ META_KEYBINDING_CYCLE_PANELS_BACKWARD, 0, 0 },
|
||||
{ META_KEYBINDING_SHOW_DESKTOP, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_1, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_2, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_3, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_4, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_5, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_6, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_7, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_8, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_9, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_10, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_11, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_12, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_13, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_14, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_15, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_16, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_17, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_18, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_19, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_20, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_21, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_22, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_23, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_24, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_25, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_26, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_27, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_28, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_29, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_30, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_31, 0, 0 },
|
||||
{ META_KEYBINDING_COMMAND_32, 0, 0 },
|
||||
{ NULL, 0, 0 }
|
||||
{ META_KEYBINDING_WORKSPACE_1, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_2, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_3, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_4, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_5, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_6, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_7, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_8, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_9, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_10, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_11, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_12, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_LEFT, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_RIGHT, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_UP, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_WORKSPACE_DOWN, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_SWITCH_WINDOWS, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_SWITCH_WINDOWS_BACKWARD, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_SWITCH_PANELS, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_SWITCH_PANELS_BACKWARD, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_CYCLE_WINDOWS, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_CYCLE_WINDOWS_BACKWARD, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_CYCLE_PANELS, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_CYCLE_PANELS_BACKWARD, 0, 0, TRUE },
|
||||
{ META_KEYBINDING_SHOW_DESKTOP, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_PANEL_MAIN_MENU, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_PANEL_RUN_DIALOG, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_1, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_2, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_3, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_4, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_5, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_6, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_7, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_8, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_9, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_10, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_11, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_12, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_13, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_14, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_15, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_16, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_17, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_18, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_19, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_20, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_21, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_22, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_23, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_24, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_25, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_26, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_27, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_28, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_29, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_30, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_31, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_32, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_SCREENSHOT, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_COMMAND_WIN_SCREENSHOT, 0, 0, FALSE },
|
||||
{ NULL, 0, 0, FALSE}
|
||||
};
|
||||
|
||||
static MetaKeyPref window_bindings[] = {
|
||||
{ META_KEYBINDING_WINDOW_MENU, 0, 0 },
|
||||
{ META_KEYBINDING_TOGGLE_FULLSCREEN, 0, 0 },
|
||||
{ META_KEYBINDING_TOGGLE_MAXIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_MAXIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_UNMAXIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_TOGGLE_SHADE, 0, 0 },
|
||||
{ META_KEYBINDING_MINIMIZE, 0, 0 },
|
||||
{ META_KEYBINDING_CLOSE, 0, 0 },
|
||||
{ META_KEYBINDING_BEGIN_MOVE, 0, 0 },
|
||||
{ META_KEYBINDING_BEGIN_RESIZE, 0, 0 },
|
||||
{ META_KEYBINDING_TOGGLE_STICKY, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_1, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_2, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_3, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_4, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_5, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_6, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_7, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_8, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_9, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_10, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_11, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_12, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_UP, 0, 0 },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, 0, 0 },
|
||||
{ META_KEYBINDING_RAISE_OR_LOWER, 0, 0 },
|
||||
{ META_KEYBINDING_RAISE, 0, 0 },
|
||||
{ META_KEYBINDING_LOWER, 0, 0 },
|
||||
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, 0, 0 },
|
||||
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, 0, 0 },
|
||||
{ NULL, 0, 0 }
|
||||
{ META_KEYBINDING_WINDOW_MENU, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_TOGGLE_FULLSCREEN, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_TOGGLE_MAXIMIZE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_TOGGLE_ABOVE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MAXIMIZE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_UNMAXIMIZE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_TOGGLE_SHADE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MINIMIZE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_CLOSE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_BEGIN_MOVE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_BEGIN_RESIZE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_TOGGLE_STICKY, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_1, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_2, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_3, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_4, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_5, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_6, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_7, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_8, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_9, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_10, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_11, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_12, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_LEFT, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_RIGHT, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_UP, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MOVE_WORKSPACE_DOWN, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_RAISE_OR_LOWER, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_RAISE, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_LOWER, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MAXIMIZE_VERTICALLY, 0, 0, FALSE },
|
||||
{ META_KEYBINDING_MAXIMIZE_HORIZONTALLY, 0, 0, FALSE },
|
||||
{ NULL, 0, 0, FALSE }
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -1554,15 +1673,31 @@ update_command (const char *name,
|
||||
|
||||
++p;
|
||||
|
||||
if (!g_ascii_isdigit (*p))
|
||||
if (g_ascii_isdigit (*p))
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Command %s doesn't end in number?\n", name);
|
||||
return FALSE;
|
||||
i = atoi (p);
|
||||
i -= 1; /* count from 0 not 1 */
|
||||
}
|
||||
else
|
||||
{
|
||||
p = strrchr (name, '/');
|
||||
++p;
|
||||
|
||||
if (strcmp (p, "command_screenshot") == 0)
|
||||
{
|
||||
i = SCREENSHOT_COMMAND_IDX;
|
||||
}
|
||||
else if (strcmp (p, "command_window_screenshot") == 0)
|
||||
{
|
||||
i = WIN_SCREENSHOT_COMMAND_IDX;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_KEYBINDINGS,
|
||||
"Command %s doesn't end in number?\n", name);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
i = atoi (p);
|
||||
i -= 1; /* count from 0 not 1 */
|
||||
|
||||
if (i >= MAX_COMMANDS)
|
||||
{
|
||||
@@ -1602,8 +1737,19 @@ char*
|
||||
meta_prefs_get_gconf_key_for_command (int i)
|
||||
{
|
||||
char *key;
|
||||
|
||||
key = g_strdup_printf (KEY_COMMAND_PREFIX"%d", i + 1);
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case SCREENSHOT_COMMAND_IDX:
|
||||
key = g_strdup (KEY_COMMAND_PREFIX "screenshot");
|
||||
break;
|
||||
case WIN_SCREENSHOT_COMMAND_IDX:
|
||||
key = g_strdup (KEY_COMMAND_PREFIX "window_screenshot");
|
||||
break;
|
||||
default:
|
||||
key = g_strdup_printf (KEY_COMMAND_PREFIX"%d", i + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
@@ -1775,6 +1921,24 @@ meta_prefs_get_button_layout (MetaButtonLayout *button_layout_p)
|
||||
*button_layout_p = button_layout;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_prefs_get_visual_bell ()
|
||||
{
|
||||
return provide_visual_bell;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_prefs_bell_is_audible ()
|
||||
{
|
||||
return bell_is_audible;
|
||||
}
|
||||
|
||||
MetaVisualBellType
|
||||
meta_prefs_get_visual_bell_type ()
|
||||
{
|
||||
return visual_bell_type;
|
||||
}
|
||||
|
||||
void
|
||||
meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
|
||||
int *n_bindings)
|
||||
|
26
src/prefs.h
26
src/prefs.h
@@ -42,7 +42,10 @@ typedef enum
|
||||
META_PREF_DISABLE_WORKAROUNDS,
|
||||
META_PREF_COMMANDS,
|
||||
META_PREF_BUTTON_LAYOUT,
|
||||
META_PREF_WORKSPACE_NAMES
|
||||
META_PREF_WORKSPACE_NAMES,
|
||||
META_PREF_VISUAL_BELL,
|
||||
META_PREF_AUDIBLE_BELL,
|
||||
META_PREF_VISUAL_BELL_TYPE
|
||||
} MetaPreference;
|
||||
|
||||
typedef void (* MetaPrefsChangedFunc) (MetaPreference pref,
|
||||
@@ -106,6 +109,8 @@ void meta_prefs_change_workspace_name (int i,
|
||||
#define META_KEYBINDING_CYCLE_PANELS "cycle_panels"
|
||||
#define META_KEYBINDING_CYCLE_PANELS_BACKWARD "cycle_panels_backward"
|
||||
#define META_KEYBINDING_SHOW_DESKTOP "show_desktop"
|
||||
#define META_KEYBINDING_PANEL_MAIN_MENU "panel_main_menu"
|
||||
#define META_KEYBINDING_PANEL_RUN_DIALOG "panel_run_dialog"
|
||||
#define META_KEYBINDING_COMMAND_1 "run_command_1"
|
||||
#define META_KEYBINDING_COMMAND_2 "run_command_2"
|
||||
#define META_KEYBINDING_COMMAND_3 "run_command_3"
|
||||
@@ -138,11 +143,14 @@ void meta_prefs_change_workspace_name (int i,
|
||||
#define META_KEYBINDING_COMMAND_30 "run_command_30"
|
||||
#define META_KEYBINDING_COMMAND_31 "run_command_31"
|
||||
#define META_KEYBINDING_COMMAND_32 "run_command_32"
|
||||
#define META_KEYBINDING_COMMAND_SCREENSHOT "run_command_screenshot"
|
||||
#define META_KEYBINDING_COMMAND_WIN_SCREENSHOT "run_command_window_screenshot"
|
||||
|
||||
/* Window bindings */
|
||||
#define META_KEYBINDING_WINDOW_MENU "activate_window_menu"
|
||||
#define META_KEYBINDING_TOGGLE_FULLSCREEN "toggle_fullscreen"
|
||||
#define META_KEYBINDING_TOGGLE_MAXIMIZE "toggle_maximized"
|
||||
#define META_KEYBINDING_TOGGLE_ABOVE "toggle_above"
|
||||
#define META_KEYBINDING_MAXIMIZE "maximize"
|
||||
#define META_KEYBINDING_UNMAXIMIZE "unmaximize"
|
||||
#define META_KEYBINDING_TOGGLE_SHADE "toggle_shaded"
|
||||
@@ -201,6 +209,8 @@ typedef enum _MetaKeyBindingAction
|
||||
META_KEYBINDING_ACTION_CYCLE_PANELS,
|
||||
META_KEYBINDING_ACTION_CYCLE_PANELS_BACKWARD,
|
||||
META_KEYBINDING_ACTION_SHOW_DESKTOP,
|
||||
META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
|
||||
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
|
||||
META_KEYBINDING_ACTION_COMMAND_1,
|
||||
META_KEYBINDING_ACTION_COMMAND_2,
|
||||
META_KEYBINDING_ACTION_COMMAND_3,
|
||||
@@ -220,6 +230,8 @@ typedef struct
|
||||
const char *name;
|
||||
unsigned int keysym;
|
||||
MetaVirtualModifier modifiers;
|
||||
/* for keybindings that can have shift or not like Alt+Tab */
|
||||
gboolean add_shift;
|
||||
} MetaKeyPref;
|
||||
|
||||
void meta_prefs_get_screen_bindings (const MetaKeyPref **bindings,
|
||||
@@ -233,6 +245,18 @@ void meta_prefs_get_window_binding (const char *name,
|
||||
unsigned int *keysym,
|
||||
MetaVirtualModifier *modifiers);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_VISUAL_BELL_INVALID = 0,
|
||||
META_VISUAL_BELL_FULLSCREEN_FLASH,
|
||||
META_VISUAL_BELL_FRAME_FLASH
|
||||
|
||||
} MetaVisualBellType;
|
||||
|
||||
gboolean meta_prefs_get_visual_bell (void);
|
||||
gboolean meta_prefs_bell_is_audible (void);
|
||||
MetaVisualBellType meta_prefs_get_visual_bell_type (void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -92,11 +92,10 @@ ensure_size_window (MetaResizePopup *popup)
|
||||
return;
|
||||
|
||||
popup->size_window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (popup->size_window),
|
||||
gdk_display_get_screen (gdk_x11_lookup_xdisplay (popup->display),
|
||||
popup->screen_number));
|
||||
#endif
|
||||
|
||||
/* never shrink the size window */
|
||||
gtk_window_set_resizable (GTK_WINDOW (popup->size_window),
|
||||
|
443
src/screen.c
443
src/screen.c
@@ -2,9 +2,10 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001, 2002 Havoc Pennington
|
||||
* Copyright (C) 2002 Red Hat Inc.
|
||||
* Copyright (C) 2002, 2003 Red Hat Inc.
|
||||
* Some ICCCM manager selection code derived from fvwm2,
|
||||
* Copyright (C) 2001 Dominik Vogt, Matthias Clasen, and fvwm2 team
|
||||
* Copyright (C) 2003 Rob Adams
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -51,7 +52,7 @@ static char* get_screen_name (MetaDisplay *display,
|
||||
|
||||
static void update_num_workspaces (MetaScreen *screen);
|
||||
static void update_focus_mode (MetaScreen *screen);
|
||||
static void update_workspace_names (MetaScreen *screen);
|
||||
static void set_workspace_names (MetaScreen *screen);
|
||||
static void prefs_changed_callback (MetaPreference pref,
|
||||
gpointer data);
|
||||
|
||||
@@ -74,24 +75,13 @@ set_wm_check_hint (MetaScreen *screen)
|
||||
XA_WINDOW,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
|
||||
/* Legacy GNOME hint (uses cardinal, dunno why) */
|
||||
|
||||
/* do this after setting up window fully, to avoid races
|
||||
* with clients listening to property notify on root.
|
||||
*/
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_win_supporting_wm_check,
|
||||
XA_CARDINAL,
|
||||
32, PropModeReplace, (guchar*) data, 1);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
static int
|
||||
set_supported_hint (MetaScreen *screen)
|
||||
{
|
||||
#define N_SUPPORTED 45
|
||||
#define N_WIN_SUPPORTED 1
|
||||
#define N_SUPPORTED 49
|
||||
Atom atoms[N_SUPPORTED];
|
||||
|
||||
atoms[0] = screen->display->atom_net_wm_name;
|
||||
@@ -115,43 +105,39 @@ set_supported_hint (MetaScreen *screen)
|
||||
atoms[18] = screen->display->atom_net_client_list_stacking;
|
||||
atoms[19] = screen->display->atom_net_wm_state_skip_taskbar;
|
||||
atoms[20] = screen->display->atom_net_wm_state_skip_pager;
|
||||
atoms[21] = screen->display->atom_net_wm_icon;
|
||||
atoms[22] = screen->display->atom_net_wm_moveresize;
|
||||
atoms[23] = screen->display->atom_net_wm_state_hidden;
|
||||
atoms[24] = screen->display->atom_net_wm_window_type_utility;
|
||||
atoms[25] = screen->display->atom_net_wm_window_type_splash;
|
||||
atoms[26] = screen->display->atom_net_wm_state_fullscreen;
|
||||
atoms[27] = screen->display->atom_net_wm_ping;
|
||||
atoms[28] = screen->display->atom_net_active_window;
|
||||
atoms[29] = screen->display->atom_net_workarea;
|
||||
atoms[30] = screen->display->atom_net_showing_desktop;
|
||||
atoms[31] = screen->display->atom_net_desktop_layout;
|
||||
atoms[32] = screen->display->atom_net_desktop_names;
|
||||
atoms[33] = screen->display->atom_net_wm_allowed_actions;
|
||||
atoms[34] = screen->display->atom_net_wm_action_move;
|
||||
atoms[35] = screen->display->atom_net_wm_action_resize;
|
||||
atoms[36] = screen->display->atom_net_wm_action_shade;
|
||||
atoms[37] = screen->display->atom_net_wm_action_stick;
|
||||
atoms[38] = screen->display->atom_net_wm_action_maximize_horz;
|
||||
atoms[39] = screen->display->atom_net_wm_action_maximize_vert;
|
||||
atoms[40] = screen->display->atom_net_wm_action_change_desktop;
|
||||
atoms[41] = screen->display->atom_net_wm_action_close;
|
||||
atoms[42] = screen->display->atom_net_wm_state_above;
|
||||
atoms[43] = screen->display->atom_net_wm_state_below;
|
||||
atoms[44] = screen->display->atom_net_startup_id;
|
||||
atoms[21] = screen->display->atom_net_wm_icon_name;
|
||||
atoms[22] = screen->display->atom_net_wm_icon;
|
||||
atoms[23] = screen->display->atom_net_wm_icon_geometry;
|
||||
atoms[24] = screen->display->atom_net_wm_moveresize;
|
||||
atoms[25] = screen->display->atom_net_active_window;
|
||||
atoms[26] = screen->display->atom_net_wm_strut;
|
||||
atoms[27] = screen->display->atom_net_wm_state_hidden;
|
||||
atoms[28] = screen->display->atom_net_wm_window_type_utility;
|
||||
atoms[29] = screen->display->atom_net_wm_window_type_splash;
|
||||
atoms[30] = screen->display->atom_net_wm_state_fullscreen;
|
||||
atoms[31] = screen->display->atom_net_wm_ping;
|
||||
atoms[32] = screen->display->atom_net_wm_pid;
|
||||
atoms[33] = screen->display->atom_net_workarea;
|
||||
atoms[34] = screen->display->atom_net_showing_desktop;
|
||||
atoms[35] = screen->display->atom_net_desktop_layout;
|
||||
atoms[36] = screen->display->atom_net_desktop_names;
|
||||
atoms[37] = screen->display->atom_net_wm_allowed_actions;
|
||||
atoms[38] = screen->display->atom_net_wm_action_move;
|
||||
atoms[39] = screen->display->atom_net_wm_action_resize;
|
||||
atoms[40] = screen->display->atom_net_wm_action_shade;
|
||||
atoms[41] = screen->display->atom_net_wm_action_stick;
|
||||
atoms[42] = screen->display->atom_net_wm_action_maximize_horz;
|
||||
atoms[43] = screen->display->atom_net_wm_action_maximize_vert;
|
||||
atoms[44] = screen->display->atom_net_wm_action_change_desktop;
|
||||
atoms[45] = screen->display->atom_net_wm_action_close;
|
||||
atoms[46] = screen->display->atom_net_wm_state_above;
|
||||
atoms[47] = screen->display->atom_net_wm_state_below;
|
||||
atoms[48] = screen->display->atom_net_startup_id;
|
||||
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_net_supported,
|
||||
XA_ATOM,
|
||||
32, PropModeReplace, (guchar*) atoms, N_SUPPORTED);
|
||||
|
||||
/* Set legacy GNOME hints */
|
||||
atoms[0] = screen->display->atom_win_layer;
|
||||
|
||||
XChangeProperty (screen->display->xdisplay, screen->xroot,
|
||||
screen->display->atom_win_protocols,
|
||||
XA_ATOM,
|
||||
32, PropModeReplace, (guchar*) atoms, N_WIN_SUPPORTED);
|
||||
|
||||
return Success;
|
||||
#undef N_SUPPORTED
|
||||
@@ -352,6 +338,20 @@ reload_xinerama_infos (MetaScreen *screen)
|
||||
|
||||
g_assert (screen->n_xinerama_infos > 0);
|
||||
g_assert (screen->xinerama_infos != NULL);
|
||||
|
||||
{
|
||||
GList *tmp;
|
||||
|
||||
tmp = screen->workspaces;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWorkspace *space = tmp->data;
|
||||
|
||||
meta_workspace_invalidate_work_area (space);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MetaScreen*
|
||||
@@ -496,7 +496,6 @@ meta_screen_new (MetaDisplay *display,
|
||||
SubstructureRedirectMask | SubstructureNotifyMask |
|
||||
ColormapChangeMask | PropertyChangeMask |
|
||||
LeaveWindowMask | EnterWindowMask |
|
||||
ButtonPressMask | ButtonReleaseMask |
|
||||
KeyPressMask | KeyReleaseMask |
|
||||
FocusChangeMask | StructureNotifyMask |
|
||||
attr.your_event_mask);
|
||||
@@ -523,6 +522,7 @@ meta_screen_new (MetaDisplay *display,
|
||||
screen->current_cursor = -1; /* invalid/unset */
|
||||
screen->default_xvisual = DefaultVisualOfScreen (screen->xscreen);
|
||||
screen->default_depth = DefaultDepthOfScreen (screen->xscreen);
|
||||
screen->flash_window = None;
|
||||
|
||||
screen->wm_sn_selection_window = new_wm_sn_owner;
|
||||
screen->wm_sn_atom = wm_sn_atom;
|
||||
@@ -568,7 +568,6 @@ meta_screen_new (MetaDisplay *display,
|
||||
set_wm_check_hint (screen);
|
||||
|
||||
meta_screen_update_workspace_layout (screen);
|
||||
meta_screen_update_workspace_names (screen);
|
||||
|
||||
/* Get current workspace */
|
||||
current_workspace = 0;
|
||||
@@ -587,6 +586,8 @@ meta_screen_new (MetaDisplay *display,
|
||||
meta_workspace_activate (meta_workspace_new (screen));
|
||||
update_num_workspaces (screen);
|
||||
|
||||
set_workspace_names (screen);
|
||||
|
||||
screen->all_keys_grabbed = FALSE;
|
||||
screen->keys_grabbed = FALSE;
|
||||
meta_screen_grab_keys (screen);
|
||||
@@ -754,7 +755,7 @@ prefs_changed_callback (MetaPreference pref,
|
||||
}
|
||||
else if (pref == META_PREF_WORKSPACE_NAMES)
|
||||
{
|
||||
update_workspace_names (screen);
|
||||
set_workspace_names (screen);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1036,8 +1037,8 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
|
||||
MetaTabList type)
|
||||
{
|
||||
MetaTabEntry *entries;
|
||||
GSList *tab_list;
|
||||
GSList *tmp;
|
||||
GList *tab_list;
|
||||
GList *tmp;
|
||||
int len;
|
||||
int i;
|
||||
|
||||
@@ -1049,7 +1050,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
|
||||
screen,
|
||||
screen->active_workspace);
|
||||
|
||||
len = g_slist_length (tab_list);
|
||||
len = g_list_length (tab_list);
|
||||
|
||||
entries = g_new (MetaTabEntry, len + 1);
|
||||
entries[len].key = NULL;
|
||||
@@ -1116,7 +1117,7 @@ meta_screen_ensure_tab_popup (MetaScreen *screen,
|
||||
TRUE);
|
||||
g_free (entries);
|
||||
|
||||
g_slist_free (tab_list);
|
||||
g_list_free (tab_list);
|
||||
|
||||
/* don't show tab popup, since proper window isn't selected yet */
|
||||
}
|
||||
@@ -1187,26 +1188,43 @@ meta_screen_ensure_workspace_popup (MetaScreen *screen)
|
||||
/* don't show tab popup, since proper space isn't selected yet */
|
||||
}
|
||||
|
||||
/* Focus top window on active workspace */
|
||||
void
|
||||
meta_screen_focus_top_window (MetaScreen *screen,
|
||||
MetaWindow *not_this_one)
|
||||
meta_screen_focus_mouse_window (MetaScreen *screen,
|
||||
MetaWindow *not_this_one)
|
||||
{
|
||||
MetaWindow *window;
|
||||
|
||||
Window root_return, child_return;
|
||||
int root_x_return, root_y_return;
|
||||
int win_x_return, win_y_return;
|
||||
unsigned int mask_return;
|
||||
|
||||
if (not_this_one)
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing top window excluding %s\n", not_this_one->desc);
|
||||
|
||||
window = meta_stack_get_default_focus_window (screen->stack,
|
||||
screen->active_workspace,
|
||||
not_this_one);
|
||||
"Focusing mouse window excluding %s\n", not_this_one->desc);
|
||||
|
||||
meta_error_trap_push (screen->display);
|
||||
XQueryPointer (screen->display->xdisplay,
|
||||
screen->xroot,
|
||||
&root_return,
|
||||
&child_return,
|
||||
&root_x_return,
|
||||
&root_y_return,
|
||||
&win_x_return,
|
||||
&win_y_return,
|
||||
&mask_return);
|
||||
meta_error_trap_pop (screen->display, TRUE);
|
||||
|
||||
window = meta_stack_get_default_focus_window_at_point (screen->stack,
|
||||
screen->active_workspace,
|
||||
not_this_one,
|
||||
root_x_return,
|
||||
root_y_return);
|
||||
|
||||
/* FIXME I'm a loser on the CurrentTime front */
|
||||
if (window)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Focusing top window %s\n", window->desc);
|
||||
"Focusing mouse window %s\n", window->desc);
|
||||
|
||||
meta_window_focus (window, meta_display_get_current_time (screen->display));
|
||||
|
||||
@@ -1216,23 +1234,20 @@ meta_screen_focus_top_window (MetaScreen *screen,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS, "No top window to focus found\n");
|
||||
meta_topic (META_DEBUG_FOCUS, "No mouse window to focus found\n");
|
||||
}
|
||||
}
|
||||
|
||||
const MetaXineramaScreenInfo*
|
||||
meta_screen_get_xinerama_for_window (MetaScreen *screen,
|
||||
MetaWindow *window)
|
||||
meta_screen_get_xinerama_for_rect (MetaScreen *screen,
|
||||
MetaRectangle *rect)
|
||||
{
|
||||
int i;
|
||||
int best_xinerama, xinerama_score;
|
||||
MetaRectangle window_rect;
|
||||
|
||||
if (screen->n_xinerama_infos == 1)
|
||||
return &screen->xinerama_infos[0];
|
||||
|
||||
meta_window_get_outer_rect (window, &window_rect);
|
||||
|
||||
|
||||
best_xinerama = 0;
|
||||
xinerama_score = 0;
|
||||
|
||||
@@ -1246,7 +1261,7 @@ meta_screen_get_xinerama_for_window (MetaScreen *screen,
|
||||
screen_info.width = screen->xinerama_infos[i].width;
|
||||
screen_info.height = screen->xinerama_infos[i].height;
|
||||
|
||||
if (meta_rectangle_intersect (&screen_info, &window_rect, &dest))
|
||||
if (meta_rectangle_intersect (&screen_info, rect, &dest))
|
||||
{
|
||||
if (dest.width * dest.height > xinerama_score)
|
||||
{
|
||||
@@ -1254,19 +1269,180 @@ meta_screen_get_xinerama_for_window (MetaScreen *screen,
|
||||
best_xinerama = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
++i;
|
||||
}
|
||||
|
||||
return &screen->xinerama_infos[best_xinerama];
|
||||
}
|
||||
|
||||
const MetaXineramaScreenInfo*
|
||||
meta_screen_get_xinerama_for_window (MetaScreen *screen,
|
||||
MetaWindow *window)
|
||||
{
|
||||
MetaRectangle window_rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &window_rect);
|
||||
|
||||
return meta_screen_get_xinerama_for_rect (screen, &window_rect);
|
||||
}
|
||||
|
||||
const MetaXineramaScreenInfo*
|
||||
meta_screen_get_xinerama_neighbor (MetaScreen *screen,
|
||||
int which_xinerama,
|
||||
MetaScreenDirection direction)
|
||||
{
|
||||
MetaXineramaScreenInfo* input = screen->xinerama_infos + which_xinerama;
|
||||
MetaXineramaScreenInfo* current;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < screen->n_xinerama_infos; i++)
|
||||
{
|
||||
current = screen->xinerama_infos + i;
|
||||
|
||||
if (((direction == META_SCREEN_RIGHT) &&
|
||||
(current->x_origin == input->x_origin + input->width) &&
|
||||
(current->y_origin >= input->y_origin) &&
|
||||
(current->y_origin <= input->y_origin+input->height)) ||
|
||||
((direction == META_SCREEN_LEFT) &&
|
||||
(input->x_origin == current->x_origin + current->width) &&
|
||||
(current->y_origin >= input->y_origin) &&
|
||||
(current->y_origin <= input->y_origin + input->height)) ||
|
||||
((direction == META_SCREEN_UP) &&
|
||||
(input->y_origin == current->y_origin + current->height) &&
|
||||
(current->x_origin >= input->x_origin) &&
|
||||
(current->x_origin <= input->x_origin + input->width)) ||
|
||||
((direction == META_SCREEN_DOWN) &&
|
||||
(current->y_origin == input->y_origin + input->height) &&
|
||||
(current->x_origin >= input->x_origin) &&
|
||||
(current->x_origin <= input->x_origin + input->width)))
|
||||
{
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_get_natural_xinerama_list (MetaScreen *screen,
|
||||
int** xineramas_list,
|
||||
int* n_xineramas)
|
||||
{
|
||||
const MetaXineramaScreenInfo* current;
|
||||
const MetaXineramaScreenInfo* tmp;
|
||||
GQueue* xinerama_queue;
|
||||
int* visited;
|
||||
int cur = 0;
|
||||
int i;
|
||||
|
||||
*n_xineramas = screen->n_xinerama_infos;
|
||||
*xineramas_list = g_new (int, screen->n_xinerama_infos);
|
||||
|
||||
/* we calculate a natural ordering by which to choose xineramas for
|
||||
* window placement. We start at the current xinerama, and perform
|
||||
* a breadth-first search of the xineramas starting from that
|
||||
* xinerama. We choose preferentially left, then right, then down,
|
||||
* then up. The visitation order produced by this traversal is the
|
||||
* natural xinerama ordering.
|
||||
*/
|
||||
|
||||
visited = g_new (int, screen->n_xinerama_infos);
|
||||
for (i = 0; i < screen->n_xinerama_infos; i++)
|
||||
{
|
||||
visited[i] = FALSE;
|
||||
}
|
||||
|
||||
current = meta_screen_get_current_xinerama (screen);
|
||||
xinerama_queue = g_queue_new ();
|
||||
g_queue_push_tail (xinerama_queue, (gpointer) current);
|
||||
visited[current->number] = TRUE;
|
||||
|
||||
while (!g_queue_is_empty (xinerama_queue))
|
||||
{
|
||||
current = (const MetaXineramaScreenInfo*)
|
||||
g_queue_pop_head (xinerama_queue);
|
||||
|
||||
(*xineramas_list)[cur++] = current->number;
|
||||
|
||||
/* enqueue each of the directions */
|
||||
tmp = meta_screen_get_xinerama_neighbor (screen,
|
||||
current->number,
|
||||
META_SCREEN_LEFT);
|
||||
if (tmp && !visited[tmp->number])
|
||||
{
|
||||
g_queue_push_tail (xinerama_queue,
|
||||
(MetaXineramaScreenInfo*) tmp);
|
||||
visited[tmp->number] = TRUE;
|
||||
}
|
||||
tmp = meta_screen_get_xinerama_neighbor (screen,
|
||||
current->number,
|
||||
META_SCREEN_RIGHT);
|
||||
if (tmp && !visited[tmp->number])
|
||||
{
|
||||
g_queue_push_tail (xinerama_queue,
|
||||
(MetaXineramaScreenInfo*) tmp);
|
||||
visited[tmp->number] = TRUE;
|
||||
}
|
||||
tmp = meta_screen_get_xinerama_neighbor (screen,
|
||||
current->number,
|
||||
META_SCREEN_UP);
|
||||
if (tmp && !visited[tmp->number])
|
||||
{
|
||||
g_queue_push_tail (xinerama_queue,
|
||||
(MetaXineramaScreenInfo*) tmp);
|
||||
visited[tmp->number] = TRUE;
|
||||
}
|
||||
tmp = meta_screen_get_xinerama_neighbor (screen,
|
||||
current->number,
|
||||
META_SCREEN_DOWN);
|
||||
if (tmp && !visited[tmp->number])
|
||||
{
|
||||
g_queue_push_tail (xinerama_queue,
|
||||
(MetaXineramaScreenInfo*) tmp);
|
||||
visited[tmp->number] = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* in case we somehow missed some set of xineramas, go through the
|
||||
* visited list and add in any xineramas that were missed
|
||||
*/
|
||||
for (i = 0; i < screen->n_xinerama_infos; i++)
|
||||
{
|
||||
if (visited[i] == FALSE)
|
||||
{
|
||||
(*xineramas_list)[cur++] = i;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (visited);
|
||||
g_queue_free (xinerama_queue);
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_screen_rect_intersects_xinerama (MetaScreen *screen,
|
||||
MetaRectangle *rect,
|
||||
int which_xinerama)
|
||||
{
|
||||
MetaRectangle dest, screen_rect;
|
||||
|
||||
screen_rect.x = screen->xinerama_infos[which_xinerama].x_origin;
|
||||
screen_rect.y = screen->xinerama_infos[which_xinerama].y_origin;
|
||||
screen_rect.width = screen->xinerama_infos[which_xinerama].width;
|
||||
screen_rect.height = screen->xinerama_infos[which_xinerama].height;
|
||||
|
||||
if (meta_rectangle_intersect (&screen_rect, rect, &dest))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
const MetaXineramaScreenInfo*
|
||||
meta_screen_get_current_xinerama (MetaScreen *screen)
|
||||
{
|
||||
if (screen->n_xinerama_infos == 1)
|
||||
return &screen->xinerama_infos[0];
|
||||
|
||||
|
||||
/* Sadly, we have to do it this way. Yuck.
|
||||
*/
|
||||
|
||||
@@ -1295,9 +1471,11 @@ meta_screen_get_current_xinerama (MetaScreen *screen)
|
||||
while (i < screen->n_xinerama_infos)
|
||||
{
|
||||
if ((root_x_return >= screen->xinerama_infos[i].x_origin &&
|
||||
root_x_return < (screen->xinerama_infos[i].x_origin + screen->xinerama_infos[i].width) &&
|
||||
root_x_return < (screen->xinerama_infos[i].x_origin +
|
||||
screen->xinerama_infos[i].width) &&
|
||||
root_y_return >= screen->xinerama_infos[i].y_origin &&
|
||||
root_y_return < (screen->xinerama_infos[i].y_origin + screen->xinerama_infos[i].height)))
|
||||
root_y_return < (screen->xinerama_infos[i].y_origin +
|
||||
screen->xinerama_infos[i].height)))
|
||||
{
|
||||
screen->last_xinerama_index = i;
|
||||
break;
|
||||
@@ -1412,7 +1590,7 @@ meta_screen_update_workspace_layout (MetaScreen *screen)
|
||||
}
|
||||
|
||||
static void
|
||||
update_workspace_names (MetaScreen *screen)
|
||||
set_workspace_names (MetaScreen *screen)
|
||||
{
|
||||
/* This updates names on root window when the pref changes,
|
||||
* note we only get prefs change notify if things have
|
||||
@@ -1532,7 +1710,7 @@ set_work_area_hint (MetaScreen *screen)
|
||||
|
||||
if (workspace->screen == screen)
|
||||
{
|
||||
meta_workspace_get_work_area (workspace, &area);
|
||||
meta_workspace_get_work_area_all_xineramas (workspace, &area);
|
||||
tmp[0] = area.x;
|
||||
tmp[1] = area.y;
|
||||
tmp[2] = area.width;
|
||||
@@ -1883,6 +2061,10 @@ meta_screen_resize_func (MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
void *user_data)
|
||||
{
|
||||
if (window->struts)
|
||||
{
|
||||
meta_window_update_struts (window);
|
||||
}
|
||||
meta_window_queue_move_resize (window);
|
||||
}
|
||||
|
||||
@@ -1937,6 +2119,31 @@ queue_windows_showing (MetaScreen *screen)
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_minimize_all_except (MetaScreen *screen,
|
||||
MetaWindow *keep)
|
||||
{
|
||||
GSList *windows;
|
||||
GSList *tmp;
|
||||
|
||||
windows = meta_display_list_windows (screen->display);
|
||||
|
||||
tmp = windows;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaWindow *w = tmp->data;
|
||||
|
||||
if (w->screen == screen &&
|
||||
w->has_minimize_func &&
|
||||
w != keep)
|
||||
meta_window_minimize (w);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
||||
void
|
||||
meta_screen_show_desktop (MetaScreen *screen)
|
||||
{
|
||||
@@ -1948,6 +2155,8 @@ meta_screen_show_desktop (MetaScreen *screen)
|
||||
queue_windows_showing (screen);
|
||||
|
||||
update_showing_desktop_hint (screen);
|
||||
|
||||
meta_workspace_focus_top_window (screen->active_workspace, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1961,8 +2170,6 @@ meta_screen_unshow_desktop (MetaScreen *screen)
|
||||
queue_windows_showing (screen);
|
||||
|
||||
update_showing_desktop_hint (screen);
|
||||
|
||||
meta_screen_focus_top_window (screen, NULL);
|
||||
}
|
||||
|
||||
#ifdef HAVE_STARTUP_NOTIFICATION
|
||||
@@ -2122,9 +2329,14 @@ meta_screen_sn_event (SnMonitorEvent *event,
|
||||
{
|
||||
case SN_MONITOR_EVENT_INITIATED:
|
||||
{
|
||||
const char *wmclass;
|
||||
|
||||
wmclass = sn_startup_sequence_get_wmclass (sequence);
|
||||
|
||||
meta_topic (META_DEBUG_STARTUP,
|
||||
"Received startup initiated for %s\n",
|
||||
sn_startup_sequence_get_id (sequence));
|
||||
"Received startup initiated for %s wmclass %s\n",
|
||||
sn_startup_sequence_get_id (sequence),
|
||||
wmclass ? wmclass : "(unset)");
|
||||
add_sequence (screen, sequence);
|
||||
}
|
||||
break;
|
||||
@@ -2164,24 +2376,67 @@ meta_screen_apply_startup_properties (MetaScreen *screen,
|
||||
SnStartupSequence *sequence;
|
||||
|
||||
startup_id = meta_window_get_startup_id (window);
|
||||
|
||||
meta_topic (META_DEBUG_STARTUP,
|
||||
"Applying startup props to %s id \"%s\"\n",
|
||||
window->desc,
|
||||
startup_id ? startup_id : "(none)");
|
||||
|
||||
sequence = NULL;
|
||||
if (startup_id == NULL)
|
||||
{
|
||||
tmp = screen->startup_sequences;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
const char *wmclass;
|
||||
|
||||
wmclass = sn_startup_sequence_get_wmclass (tmp->data);
|
||||
|
||||
if (wmclass != NULL &&
|
||||
((window->res_class &&
|
||||
strcmp (wmclass, window->res_class) == 0) ||
|
||||
(window->res_name &&
|
||||
strcmp (wmclass, window->res_name) == 0)))
|
||||
{
|
||||
sequence = tmp->data;
|
||||
|
||||
g_assert (window->startup_id == NULL);
|
||||
window->startup_id = g_strdup (sn_startup_sequence_get_id (sequence));
|
||||
startup_id = window->startup_id;
|
||||
|
||||
meta_topic (META_DEBUG_STARTUP,
|
||||
"Ending legacy sequence %s due to window %s\n",
|
||||
sn_startup_sequence_get_id (sequence),
|
||||
window->desc);
|
||||
|
||||
sn_startup_sequence_complete (sequence);
|
||||
break;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
}
|
||||
|
||||
if (startup_id == NULL)
|
||||
return;
|
||||
|
||||
sequence = NULL;
|
||||
tmp = screen->startup_sequences;
|
||||
while (tmp != NULL)
|
||||
|
||||
if (sequence == NULL)
|
||||
{
|
||||
const char *id;
|
||||
|
||||
id = sn_startup_sequence_get_id (tmp->data);
|
||||
|
||||
if (strcmp (id, startup_id) == 0)
|
||||
tmp = screen->startup_sequences;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
sequence = tmp->data;
|
||||
break;
|
||||
const char *id;
|
||||
|
||||
id = sn_startup_sequence_get_id (tmp->data);
|
||||
|
||||
if (strcmp (id, startup_id) == 0)
|
||||
{
|
||||
sequence = tmp->data;
|
||||
break;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
if (sequence != NULL)
|
||||
|
39
src/screen.h
39
src/screen.h
@@ -48,6 +48,14 @@ typedef enum
|
||||
META_SCREEN_BOTTOMRIGHT
|
||||
} MetaScreenCorner;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_SCREEN_UP,
|
||||
META_SCREEN_DOWN,
|
||||
META_SCREEN_LEFT,
|
||||
META_SCREEN_RIGHT
|
||||
} MetaScreenDirection;
|
||||
|
||||
struct _MetaScreen
|
||||
{
|
||||
MetaDisplay *display;
|
||||
@@ -70,6 +78,8 @@ struct _MetaScreen
|
||||
|
||||
MetaCursor current_cursor;
|
||||
|
||||
Window flash_window;
|
||||
|
||||
Window wm_sn_selection_window;
|
||||
Atom wm_sn_atom;
|
||||
Time wm_sn_timestamp;
|
||||
@@ -124,12 +134,25 @@ void meta_screen_ensure_tab_popup (MetaScreen *scree
|
||||
|
||||
void meta_screen_ensure_workspace_popup (MetaScreen *screen);
|
||||
|
||||
void meta_screen_focus_top_window (MetaScreen *screen,
|
||||
MetaWindow *not_this_one);
|
||||
void meta_screen_focus_mouse_window (MetaScreen *screen,
|
||||
MetaWindow *not_this_one);
|
||||
|
||||
const MetaXineramaScreenInfo* meta_screen_get_current_xinerama (MetaScreen *screen);
|
||||
const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_window (MetaScreen *screen,
|
||||
MetaWindow *window);
|
||||
const MetaXineramaScreenInfo* meta_screen_get_current_xinerama (MetaScreen *screen);
|
||||
const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_rect (MetaScreen *screen,
|
||||
MetaRectangle *rect);
|
||||
const MetaXineramaScreenInfo* meta_screen_get_xinerama_for_window (MetaScreen *screen,
|
||||
MetaWindow *window);
|
||||
|
||||
gboolean meta_screen_rect_intersects_xinerama (MetaScreen *screen,
|
||||
MetaRectangle *window,
|
||||
int which_xinerama);
|
||||
|
||||
const MetaXineramaScreenInfo* meta_screen_get_xinerama_neighbor (MetaScreen *screen,
|
||||
int which_xinerama,
|
||||
MetaScreenDirection dir);
|
||||
void meta_screen_get_natural_xinerama_list (MetaScreen *screen,
|
||||
int** xineramas_list,
|
||||
int* n_xineramas);
|
||||
|
||||
void meta_screen_update_workspace_layout (MetaScreen *screen);
|
||||
void meta_screen_update_workspace_names (MetaScreen *screen);
|
||||
@@ -160,10 +183,12 @@ void meta_screen_resize (MetaScreen *screen,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
void meta_screen_minimize_all_except (MetaScreen *screen,
|
||||
MetaWindow *keep);
|
||||
|
||||
/* Show/hide the desktop (temporarily hide all windows) */
|
||||
void meta_screen_show_desktop (MetaScreen *screen);
|
||||
void meta_screen_unshow_desktop (MetaScreen *screen);
|
||||
void meta_screen_show_desktop (MetaScreen *screen);
|
||||
void meta_screen_unshow_desktop (MetaScreen *screen);
|
||||
|
||||
void meta_screen_apply_startup_properties (MetaScreen *screen,
|
||||
MetaWindow *window);
|
||||
|
181
src/stack.c
181
src/stack.c
@@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
* Copyright (C) 2002 Red Hat, Inc.
|
||||
* Copyright (C) 2002, 2003 Red Hat, Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
@@ -183,20 +183,37 @@ window_is_fullscreen_size (MetaWindow *window)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (window->rect.x <= 0 &&
|
||||
window->rect.y <= 0 &&
|
||||
window->rect.width >= window->screen->width &&
|
||||
if (window->rect.width >= window->screen->width &&
|
||||
window->rect.height >= window->screen->height)
|
||||
return TRUE;
|
||||
{
|
||||
/* we use the work area since windows that try to
|
||||
* position at 0,0 will get pushed down by menu panel
|
||||
*/
|
||||
MetaRectangle workarea;
|
||||
|
||||
meta_window_get_work_area_current_xinerama (window, &workarea);
|
||||
if (window->rect.x <= workarea.x &&
|
||||
window->rect.y <= workarea.y &&
|
||||
window->rect.x + window->rect.width >= workarea.x + workarea.width &&
|
||||
window->rect.y + window->rect.height >= workarea.y + workarea.height)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while (i < window->screen->n_xinerama_infos)
|
||||
{
|
||||
if (window->rect.x == window->screen->xinerama_infos[i].x_origin &&
|
||||
window->rect.y == window->screen->xinerama_infos[i].y_origin &&
|
||||
window->rect.width >= window->screen->xinerama_infos[i].width &&
|
||||
if (window->rect.width >= window->screen->xinerama_infos[i].width &&
|
||||
window->rect.height >= window->screen->xinerama_infos[i].height)
|
||||
return TRUE;
|
||||
{
|
||||
MetaRectangle workarea;
|
||||
|
||||
meta_window_get_work_area_current_xinerama (window, &workarea);
|
||||
if (window->rect.x <= workarea.x &&
|
||||
window->rect.y <= workarea.y &&
|
||||
window->rect.x + window->rect.width >= workarea.x + workarea.width &&
|
||||
window->rect.y + window->rect.height >= workarea.y + workarea.height)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
++i;
|
||||
}
|
||||
@@ -204,11 +221,25 @@ window_is_fullscreen_size (MetaWindow *window)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
is_focused_foreach (MetaWindow *window,
|
||||
void *data)
|
||||
{
|
||||
if (window->has_focus ||
|
||||
(window == window->display->expected_focus_window))
|
||||
{
|
||||
*((gboolean*) data) = TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Get layer ignoring any transient or group relationships */
|
||||
static MetaStackLayer
|
||||
get_standalone_layer (MetaWindow *window)
|
||||
{
|
||||
MetaStackLayer layer;
|
||||
gboolean focused_transient = FALSE;
|
||||
|
||||
switch (window->type)
|
||||
{
|
||||
@@ -229,15 +260,15 @@ get_standalone_layer (MetaWindow *window)
|
||||
break;
|
||||
|
||||
default:
|
||||
meta_window_foreach_transient (window,
|
||||
is_focused_foreach,
|
||||
&focused_transient);
|
||||
|
||||
#if 0
|
||||
if (window->has_focus &&
|
||||
meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
|
||||
layer = META_LAYER_FOCUSED_WINDOW;
|
||||
#endif
|
||||
|
||||
if (window->has_focus &&
|
||||
(window->fullscreen || window_is_fullscreen_size (window)))
|
||||
if (window->wm_state_below)
|
||||
layer = META_LAYER_BOTTOM;
|
||||
else if ((window->has_focus || focused_transient ||
|
||||
(window == window->display->expected_focus_window)) &&
|
||||
(window->fullscreen || window_is_fullscreen_size (window)))
|
||||
layer = META_LAYER_FULLSCREEN;
|
||||
else if (window->wm_state_above)
|
||||
layer = META_LAYER_DOCK;
|
||||
@@ -249,37 +280,34 @@ get_standalone_layer (MetaWindow *window)
|
||||
return layer;
|
||||
}
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaStackLayer max;
|
||||
} MaxLayerData;
|
||||
|
||||
static gboolean
|
||||
max_layer_func (MetaWindow *window,
|
||||
void *data)
|
||||
{
|
||||
MaxLayerData *d = data;
|
||||
MetaStackLayer layer;
|
||||
|
||||
layer = get_standalone_layer (window);
|
||||
if (layer > d->max)
|
||||
d->max = layer;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static MetaStackLayer
|
||||
get_maximum_layer_of_ancestor (MetaWindow *window)
|
||||
{
|
||||
MetaWindow *w;
|
||||
MetaStackLayer max;
|
||||
MetaStackLayer layer;
|
||||
|
||||
max = get_standalone_layer (window);
|
||||
|
||||
w = window;
|
||||
while (w != NULL)
|
||||
{
|
||||
if (w->xtransient_for == None ||
|
||||
w->transient_parent_is_root_window)
|
||||
break;
|
||||
|
||||
w = meta_display_lookup_x_window (w->display, w->xtransient_for);
|
||||
|
||||
if (w == window)
|
||||
break; /* Cute, someone thought they'd make a transient_for cycle */
|
||||
|
||||
/* w may be null... */
|
||||
if (w != NULL)
|
||||
{
|
||||
layer = get_standalone_layer (w);
|
||||
if (layer > max)
|
||||
max = layer;
|
||||
}
|
||||
}
|
||||
MaxLayerData d;
|
||||
|
||||
return max;
|
||||
d.max = get_standalone_layer (window);
|
||||
meta_window_foreach_ancestor (window, max_layer_func, &d);
|
||||
|
||||
return d.max;
|
||||
}
|
||||
|
||||
/* Note that this function can never use window->layer only
|
||||
@@ -488,6 +516,8 @@ add_constraint (Constraint **constraints,
|
||||
MetaWindow *below)
|
||||
{
|
||||
Constraint *c;
|
||||
|
||||
g_assert (above->screen == below->screen);
|
||||
|
||||
/* check if constraint is a duplicate */
|
||||
c = constraints[below->stack_position];
|
||||
@@ -562,7 +592,8 @@ create_constraints (Constraint **constraints,
|
||||
{
|
||||
MetaWindow *group_window = tmp2->data;
|
||||
|
||||
if (!WINDOW_IN_STACK (group_window))
|
||||
if (!WINDOW_IN_STACK (group_window) ||
|
||||
w->screen != group_window->screen)
|
||||
{
|
||||
tmp2 = tmp2->next;
|
||||
continue;
|
||||
@@ -597,7 +628,8 @@ create_constraints (Constraint **constraints,
|
||||
parent =
|
||||
meta_display_lookup_x_window (w->display, w->xtransient_for);
|
||||
|
||||
if (parent && WINDOW_IN_STACK (parent))
|
||||
if (parent && WINDOW_IN_STACK (parent) &&
|
||||
parent->screen == w->screen)
|
||||
{
|
||||
meta_topic (META_DEBUG_STACK, "Constraining %s above %s due to transiency\n",
|
||||
w->desc, parent->desc);
|
||||
@@ -1299,12 +1331,27 @@ meta_stack_get_below (MetaStack *stack,
|
||||
return NULL;
|
||||
else
|
||||
return below;
|
||||
}
|
||||
}
|
||||
|
||||
MetaWindow*
|
||||
meta_stack_get_default_focus_window (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one)
|
||||
static gboolean
|
||||
window_contains_point (MetaWindow *window,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
MetaRectangle rect;
|
||||
|
||||
meta_window_get_outer_rect (window, &rect);
|
||||
|
||||
return POINT_IN_RECT (root_x, root_y, rect);
|
||||
}
|
||||
|
||||
static MetaWindow*
|
||||
get_default_focus_window (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one,
|
||||
gboolean must_be_at_point,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
/* Find the topmost, focusable, mapped, window.
|
||||
* not_this_one is being unfocused or going away, so exclude it.
|
||||
@@ -1353,12 +1400,16 @@ meta_stack_get_default_focus_window (MetaStack *stack,
|
||||
{
|
||||
if (transient_parent == NULL &&
|
||||
not_this_one->xtransient_for != None &&
|
||||
not_this_one->xtransient_for == window->xwindow)
|
||||
not_this_one->xtransient_for == window->xwindow &&
|
||||
(!must_be_at_point ||
|
||||
window_contains_point (window, root_x, root_y)))
|
||||
transient_parent = window;
|
||||
|
||||
if (topmost_in_group == NULL &&
|
||||
not_this_one_group != NULL &&
|
||||
not_this_one_group == meta_window_get_group (window))
|
||||
not_this_one_group == meta_window_get_group (window) &&
|
||||
(!must_be_at_point ||
|
||||
window_contains_point (window, root_x, root_y)))
|
||||
topmost_in_group = window;
|
||||
}
|
||||
|
||||
@@ -1367,7 +1418,9 @@ meta_stack_get_default_focus_window (MetaStack *stack,
|
||||
* focusing dock, even though docks are stacked higher.
|
||||
*/
|
||||
if (topmost_overall == NULL &&
|
||||
window->type != META_WINDOW_DOCK)
|
||||
window->type != META_WINDOW_DOCK &&
|
||||
(!must_be_at_point ||
|
||||
window_contains_point (window, root_x, root_y)))
|
||||
topmost_overall = window;
|
||||
|
||||
/* We could try to bail out early here for efficiency in
|
||||
@@ -1388,6 +1441,26 @@ meta_stack_get_default_focus_window (MetaStack *stack,
|
||||
return topmost_dock;
|
||||
}
|
||||
|
||||
MetaWindow*
|
||||
meta_stack_get_default_focus_window_at_point (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one,
|
||||
int root_x,
|
||||
int root_y)
|
||||
{
|
||||
return get_default_focus_window (stack, workspace, not_this_one,
|
||||
TRUE, root_x, root_y);
|
||||
}
|
||||
|
||||
MetaWindow*
|
||||
meta_stack_get_default_focus_window (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one)
|
||||
{
|
||||
return get_default_focus_window (stack, workspace, not_this_one,
|
||||
FALSE, 0, 0);
|
||||
}
|
||||
|
||||
GList*
|
||||
meta_stack_list_windows (MetaStack *stack,
|
||||
MetaWorkspace *workspace)
|
||||
|
13
src/stack.h
13
src/stack.h
@@ -118,9 +118,16 @@ MetaWindow* meta_stack_get_above (MetaStack *stack,
|
||||
MetaWindow* meta_stack_get_below (MetaStack *stack,
|
||||
MetaWindow *window,
|
||||
gboolean only_within_layer);
|
||||
MetaWindow* meta_stack_get_default_focus_window (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one);
|
||||
|
||||
MetaWindow* meta_stack_get_default_focus_window (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one);
|
||||
MetaWindow* meta_stack_get_default_focus_window_at_point (MetaStack *stack,
|
||||
MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one,
|
||||
int root_x,
|
||||
int root_y);
|
||||
|
||||
GList* meta_stack_list_windows (MetaStack *stack,
|
||||
MetaWorkspace *workspace);
|
||||
|
||||
|
@@ -122,11 +122,10 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
|
||||
popup = g_new (MetaTabPopup, 1);
|
||||
|
||||
popup->outline_window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (popup->outline_window),
|
||||
gdk_display_get_screen (gdk_display_get_default (),
|
||||
screen_number));
|
||||
#endif
|
||||
|
||||
gtk_widget_set_app_paintable (popup->outline_window, TRUE);
|
||||
gtk_widget_realize (popup->outline_window);
|
||||
@@ -135,11 +134,10 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
|
||||
G_CALLBACK (outline_window_expose), popup);
|
||||
|
||||
popup->window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
#ifdef HAVE_GTK_MULTIHEAD
|
||||
|
||||
gtk_window_set_screen (GTK_WINDOW (popup->window),
|
||||
gdk_display_get_screen (gdk_display_get_default (),
|
||||
screen_number));
|
||||
#endif
|
||||
|
||||
gtk_window_set_position (GTK_WINDOW (popup->window),
|
||||
GTK_WIN_POS_CENTER_ALWAYS);
|
||||
|
@@ -4261,7 +4261,7 @@ meta_theme_load (const char *theme_name,
|
||||
GError *error;
|
||||
ParseInfo info;
|
||||
char *text;
|
||||
int length;
|
||||
gsize length;
|
||||
char *theme_file;
|
||||
char *theme_dir;
|
||||
MetaTheme *retval;
|
||||
@@ -4269,7 +4269,8 @@ meta_theme_load (const char *theme_name,
|
||||
text = NULL;
|
||||
length = 0;
|
||||
retval = NULL;
|
||||
|
||||
context = NULL;
|
||||
|
||||
theme_dir = NULL;
|
||||
theme_file = NULL;
|
||||
|
||||
@@ -4378,12 +4379,12 @@ meta_theme_load (const char *theme_name,
|
||||
if (!g_markup_parse_context_end_parse (context, &error))
|
||||
goto out;
|
||||
|
||||
g_markup_parse_context_free (context);
|
||||
|
||||
goto out;
|
||||
|
||||
out:
|
||||
|
||||
if (context)
|
||||
g_markup_parse_context_free (context);
|
||||
g_free (text);
|
||||
|
||||
if (error)
|
||||
|
@@ -44,9 +44,6 @@
|
||||
#define BUTTON_LAYOUT_COMBINATIONS ((MAX_BUTTONS_PER_CORNER+1)*(MAX_BUTTONS_PER_CORNER+1))
|
||||
#endif
|
||||
|
||||
#define CLIENT_WIDTH 200
|
||||
#define CLIENT_HEIGHT 200
|
||||
|
||||
enum
|
||||
{
|
||||
FONT_SIZE_SMALL,
|
||||
@@ -57,11 +54,11 @@ enum
|
||||
|
||||
static MetaTheme *global_theme = NULL;
|
||||
static GtkWidget *previews[META_FRAME_TYPE_LAST*FONT_SIZE_LAST + BUTTON_LAYOUT_COMBINATIONS] = { NULL, };
|
||||
static double milliseconds_to_draw_frame = 0.0;
|
||||
|
||||
static void run_position_expression_tests (void);
|
||||
static void run_position_expression_timings (void);
|
||||
static void run_theme_benchmark (int client_width,
|
||||
int client_height);
|
||||
static void run_theme_benchmark (void);
|
||||
|
||||
|
||||
static GtkItemFactoryEntry menu_items[] =
|
||||
@@ -747,6 +744,20 @@ previews_of_button_layouts (void)
|
||||
return sw;
|
||||
}
|
||||
|
||||
static GtkWidget*
|
||||
benchmark_summary (void)
|
||||
{
|
||||
char *msg;
|
||||
GtkWidget *label;
|
||||
|
||||
msg = g_strdup_printf ("%g milliseconds to draw one window frame",
|
||||
milliseconds_to_draw_frame);
|
||||
label = gtk_label_new (msg);
|
||||
g_free (msg);
|
||||
|
||||
return label;
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
@@ -797,7 +808,7 @@ main (int argc, char **argv)
|
||||
global_theme->name,
|
||||
(end - start) / (double) CLOCKS_PER_SEC);
|
||||
|
||||
run_theme_benchmark (CLIENT_WIDTH, CLIENT_HEIGHT);
|
||||
run_theme_benchmark ();
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 350, 350);
|
||||
@@ -834,6 +845,11 @@ main (int argc, char **argv)
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
collection,
|
||||
gtk_label_new ("Button Layouts"));
|
||||
|
||||
collection = benchmark_summary ();
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
collection,
|
||||
gtk_label_new ("Benchmark"));
|
||||
|
||||
i = 0;
|
||||
while (i < (int) G_N_ELEMENTS (previews))
|
||||
@@ -886,8 +902,7 @@ create_title_layout (GtkWidget *widget)
|
||||
}
|
||||
|
||||
static void
|
||||
run_theme_benchmark (int client_width,
|
||||
int client_height)
|
||||
run_theme_benchmark (void)
|
||||
{
|
||||
GtkWidget* widget;
|
||||
GdkPixmap *pixmap;
|
||||
@@ -902,9 +917,13 @@ run_theme_benchmark (int client_width,
|
||||
PangoLayout *layout;
|
||||
clock_t start;
|
||||
clock_t end;
|
||||
GTimer *timer;
|
||||
int i;
|
||||
MetaButtonLayout button_layout;
|
||||
#define ITERATIONS 100
|
||||
int client_width;
|
||||
int client_height;
|
||||
int inc;
|
||||
|
||||
widget = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||
gtk_widget_realize (widget);
|
||||
@@ -918,11 +937,6 @@ run_theme_benchmark (int client_width,
|
||||
&left_width,
|
||||
&right_width);
|
||||
|
||||
pixmap = gdk_pixmap_new (widget->window,
|
||||
client_width + left_width + right_width,
|
||||
client_height + top_height + bottom_height,
|
||||
-1);
|
||||
|
||||
layout = create_title_layout (widget);
|
||||
|
||||
i = 0;
|
||||
@@ -938,12 +952,27 @@ run_theme_benchmark (int client_width,
|
||||
button_layout.right_buttons[0] = META_BUTTON_FUNCTION_MINIMIZE;
|
||||
button_layout.right_buttons[1] = META_BUTTON_FUNCTION_MAXIMIZE;
|
||||
button_layout.right_buttons[2] = META_BUTTON_FUNCTION_CLOSE;
|
||||
|
||||
|
||||
timer = g_timer_new ();
|
||||
start = clock ();
|
||||
|
||||
client_width = 50;
|
||||
client_height = 50;
|
||||
inc = 1000 / ITERATIONS; /* Increment to grow width/height,
|
||||
* eliminates caching effects.
|
||||
*/
|
||||
|
||||
i = 0;
|
||||
while (i < ITERATIONS)
|
||||
{
|
||||
/* Creating the pixmap in the loop is right, since
|
||||
* GDK does the same with its double buffering.
|
||||
*/
|
||||
pixmap = gdk_pixmap_new (widget->window,
|
||||
client_width + left_width + right_width,
|
||||
client_height + top_height + bottom_height,
|
||||
-1);
|
||||
|
||||
meta_theme_draw_frame (global_theme,
|
||||
widget,
|
||||
pixmap,
|
||||
@@ -958,18 +987,28 @@ run_theme_benchmark (int client_width,
|
||||
button_states,
|
||||
meta_preview_get_mini_icon (),
|
||||
meta_preview_get_icon ());
|
||||
|
||||
g_object_unref (G_OBJECT (pixmap));
|
||||
|
||||
++i;
|
||||
client_width += inc;
|
||||
client_height += inc;
|
||||
}
|
||||
|
||||
end = clock ();
|
||||
g_timer_stop (timer);
|
||||
|
||||
g_print ("Drew %d frames for %dx%d clients in %g seconds (%g seconds per frame)\n",
|
||||
ITERATIONS, client_width, client_height,
|
||||
((double)end - (double)start) / CLOCKS_PER_SEC,
|
||||
((double)end - (double)start) / CLOCKS_PER_SEC / (double) ITERATIONS);
|
||||
milliseconds_to_draw_frame = (g_timer_elapsed (timer, NULL) / (double) ITERATIONS) * 1000;
|
||||
|
||||
g_print ("Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g seconds wall clock time including X server resources (%g milliseconds per frame)\n",
|
||||
ITERATIONS,
|
||||
((double)end - (double)start) / CLOCKS_PER_SEC,
|
||||
(((double)end - (double)start) / CLOCKS_PER_SEC / (double) ITERATIONS) * 1000,
|
||||
g_timer_elapsed (timer, NULL),
|
||||
milliseconds_to_draw_frame);
|
||||
|
||||
g_timer_destroy (timer);
|
||||
g_object_unref (G_OBJECT (layout));
|
||||
g_object_unref (G_OBJECT (pixmap));
|
||||
gtk_widget_destroy (widget);
|
||||
|
||||
#undef ITERATIONS
|
||||
|
@@ -4760,8 +4760,10 @@ theme_get_style (MetaTheme *theme,
|
||||
resize = META_FRAME_RESIZE_LAST; /* compiler */
|
||||
break;
|
||||
}
|
||||
|
||||
if (flags & META_FRAME_HAS_FOCUS)
|
||||
|
||||
/* re invert the styles used for focus/unfocussed while flashing a frame */
|
||||
if (((flags & META_FRAME_HAS_FOCUS) && !(flags & META_FRAME_IS_FLASHING))
|
||||
|| (!(flags & META_FRAME_HAS_FOCUS) && (flags & META_FRAME_IS_FLASHING)))
|
||||
focus = META_FRAME_FOCUS_YES;
|
||||
else
|
||||
focus = META_FRAME_FOCUS_NO;
|
||||
|
@@ -4,7 +4,8 @@ THEMES= \
|
||||
Crux \
|
||||
Esco \
|
||||
AgingGorilla \
|
||||
Metabox
|
||||
Metabox \
|
||||
Simple
|
||||
|
||||
THEME_DIR=$(datadir)/themes
|
||||
THEME_SUBDIR=metacity-1
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<metacity_theme>
|
||||
<info>
|
||||
<name>Metabox</name>
|
||||
<author>Garrett LeSage <garrett@redhat.com< based on Havoc Pennington <hp@redhat.com>'s Atlanta theme</author>
|
||||
<author>Garrett LeSage <garrett@redhat.com> based on Havoc Pennington <hp@redhat.com>'s Atlanta theme</author>
|
||||
<copyright>Â Garrett LeSage, Havoc Pennington, 2002</copyright>
|
||||
<date>Jun 12, 2002</date>
|
||||
<description>Looks a little like BlackBox.</description>
|
||||
@@ -246,15 +246,20 @@
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="close_button">
|
||||
<include name="bg_button_active"/>
|
||||
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
|
||||
width="2"
|
||||
<include name="bg_button_active"/>
|
||||
<!-- draw longer lines and clip for 'x' with symmetrical endpoints <joefefifo@yahoo.com> -->
|
||||
<clip x="ButtonIPad" y="ButtonIPad"
|
||||
width="width - ButtonIPad - 4"
|
||||
height="height - ButtonIPad - 4"/>
|
||||
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
|
||||
width="2"
|
||||
x1="ButtonIPad" y1="ButtonIPad"
|
||||
x2="width - ButtonIPad - 1" y2="height - ButtonIPad - 1"/>
|
||||
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
|
||||
x2="width - ButtonIPad" y2="height - ButtonIPad"/>
|
||||
|
||||
<line color="blend/gtk:bg[SELECTED]/gtk:fg[SELECTED]/0.75"
|
||||
width="2"
|
||||
x1="ButtonIPad" y1="height - ButtonIPad - 1"
|
||||
x2="width - ButtonIPad - 1" y2="ButtonIPad"/>
|
||||
x1="ButtonIPad" y1="height - ButtonIPad - 1"
|
||||
x2="width - ButtonIPad" y2="ButtonIPad - 1"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="close_button_pressed">
|
||||
@@ -268,15 +273,19 @@
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="close_button_unfocused">
|
||||
<include name="bg_button_inactive"/>
|
||||
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
|
||||
<include name="bg_button_inactive"/>
|
||||
<!-- draw longer lines and clip for 'x' with symmetrical endpoints <joefefifo@yahoo.com> -->
|
||||
<clip x="ButtonIPad" y="ButtonIPad"
|
||||
width="width - ButtonIPad - 4"
|
||||
height="height - ButtonIPad - 4"/>
|
||||
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
|
||||
width="2"
|
||||
x1="ButtonIPad" y1="ButtonIPad"
|
||||
x2="width - ButtonIPad - 1" y2="height - ButtonIPad - 1"/>
|
||||
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
|
||||
x2="width - ButtonIPad" y2="height - ButtonIPad"/>
|
||||
<line color="blend/gtk:fg[INSENSITIVE]/gtk:bg[INSENSITIVE]/0.35"
|
||||
width="2"
|
||||
x1="ButtonIPad" y1="height - ButtonIPad - 1"
|
||||
x2="width - ButtonIPad - 1" y2="ButtonIPad"/>
|
||||
x2="width - ButtonIPad" y2="ButtonIPad - 1"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="outer_bevel">
|
||||
|
BIN
src/themes/Simple/close.png
Normal file
BIN
src/themes/Simple/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 333 B |
BIN
src/themes/Simple/maximize.png
Normal file
BIN
src/themes/Simple/maximize.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 291 B |
BIN
src/themes/Simple/maximized.png
Normal file
BIN
src/themes/Simple/maximized.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 340 B |
316
src/themes/Simple/metacity-theme-1.xml
Normal file
316
src/themes/Simple/metacity-theme-1.xml
Normal file
@@ -0,0 +1,316 @@
|
||||
<?xml version="1.0"?>
|
||||
<metacity_theme>
|
||||
<info>
|
||||
<name>Simple</name>
|
||||
<author>Tuomas Kuosmanen <tigert@ximian.com></author>
|
||||
<copyright>Â Tuomas Kuosmanen, 2002, based on Atlanta theme by Havoc.</copyright>
|
||||
<date>April, 2002</date>
|
||||
<description>Default GNOME window theme</description>
|
||||
</info>
|
||||
|
||||
<frame_geometry name="normal">
|
||||
<distance name="left_width" value="4"/>
|
||||
<distance name="right_width" value="4"/>
|
||||
<distance name="bottom_height" value="4"/>
|
||||
<distance name="left_titlebar_edge" value="2"/>
|
||||
<distance name="right_titlebar_edge" value="2"/>
|
||||
<distance name="button_width" value="16"/>
|
||||
<distance name="button_height" value="16"/>
|
||||
<distance name="title_vertical_pad" value="0"/>
|
||||
<border name="title_border" left="1" right="1" top="2" bottom="2"/>
|
||||
<border name="button_border" left="1" right="1" top="0" bottom="0"/>
|
||||
</frame_geometry>
|
||||
|
||||
<!-- strip borders off the normal geometry -->
|
||||
<frame_geometry name="normal_small_borders" parent="normal">
|
||||
<distance name="left_width" value="0"/>
|
||||
<distance name="right_width" value="0"/>
|
||||
<distance name="bottom_height" value="0"/>
|
||||
<distance name="left_titlebar_edge" value="0"/>
|
||||
<distance name="right_titlebar_edge" value="0"/>
|
||||
</frame_geometry>
|
||||
|
||||
<frame_geometry name="utility" title_scale="xx-small">
|
||||
<distance name="left_width" value="3"/>
|
||||
<distance name="right_width" value="3"/>
|
||||
<distance name="bottom_height" value="4"/>
|
||||
<distance name="left_titlebar_edge" value="3"/>
|
||||
<distance name="right_titlebar_edge" value="3"/>
|
||||
<distance name="button_width" value="16"/>
|
||||
<distance name="button_height" value="16"/>
|
||||
<distance name="title_vertical_pad" value="1"/>
|
||||
<border name="title_border" left="3" right="4" top="3" bottom="3"/>
|
||||
<border name="button_border" left="0" right="0" top="0" bottom="0"/>
|
||||
</frame_geometry>
|
||||
|
||||
<frame_geometry name="border" has_title="false">
|
||||
<distance name="left_width" value="4"/>
|
||||
<distance name="right_width" value="4"/>
|
||||
<distance name="bottom_height" value="4"/>
|
||||
<distance name="left_titlebar_edge" value="0"/>
|
||||
<distance name="right_titlebar_edge" value="0"/>
|
||||
<distance name="button_width" value="0"/>
|
||||
<distance name="button_height" value="0"/>
|
||||
<distance name="title_vertical_pad" value="4"/>
|
||||
<border name="title_border" left="0" right="0" top="0" bottom="0"/>
|
||||
<border name="button_border" left="0" right="0" top="0" bottom="0"/>
|
||||
</frame_geometry>
|
||||
|
||||
<!-- define constants -->
|
||||
<constant name="ArrowWidth" value="8"/>
|
||||
<constant name="ArrowHeight" value="4"/>
|
||||
<constant name="ButtonIPad" value="4"/>
|
||||
<constant name="ThickLineWidth" value="3"/>
|
||||
<constant name="IconTitleSpacing" value="6"/>
|
||||
<constant name="SpacerWidth" value="2"/>
|
||||
<constant name="SpacerHeight" value="10"/>
|
||||
|
||||
<!-- Buttons -->
|
||||
|
||||
<draw_ops name="button_pressed_bg">
|
||||
<rectangle color="gtk:light[NORMAL]" filled="true"
|
||||
x="1" y="1" width="width" height="height"/>
|
||||
<rectangle color="gtk:dark[NORMAL]" filled="true"
|
||||
x="0" y="0" width="width - 1" height="height - 1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.9" filled="true"
|
||||
x="1" y="1" width="width - 2" height="height - 2"/>
|
||||
<!-- gtk_box state="active" shadow="out" x="0" y="0" width="width" height="height"/ -->
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="menu_button">
|
||||
<icon x="1"
|
||||
y="1"
|
||||
width="width-2" height="height-2"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="menu_button_pressed">
|
||||
<include name="menu_button"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="minimize_button">
|
||||
<image filename="minimize.png" x="0" y="0" width="object_width" height="object_height"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="minimize_button_pressed">
|
||||
<include name="button_pressed_bg"/>
|
||||
<include name="minimize_button"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="maximize_button">
|
||||
<image filename="maximize.png" x="0" y="0" width="object_width" height="object_height"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="maximize_button_pressed">
|
||||
<include name="button_pressed_bg"/>
|
||||
<include name="maximize_button"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="restore_button">
|
||||
<image filename="maximized.png" x="0" y="0" width="object_width" height="object_height"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="restore_button_pressed">
|
||||
<include name="button_pressed_bg"/>
|
||||
<include name="restore_button"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="close_button">
|
||||
<image filename="close.png" x="0" y="0" width="object_width" height="object_height"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="close_button_pressed">
|
||||
<include name="button_pressed_bg"/>
|
||||
<include name="close_button"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="outer_bevel">
|
||||
<rectangle color="#000000"
|
||||
x="0" y="0" width="width" height="height" filled="true"/>
|
||||
<rectangle color="gtk:bg[NORMAL]"
|
||||
x="1" y="1" width="width-2" height="height-2" filled="true"/>
|
||||
<line color="gtk:light[NORMAL]"
|
||||
x1="1" y1="1" x2="1" y2="height-3"/>
|
||||
<line color="gtk:light[NORMAL]"
|
||||
x1="1" y1="1" x2="width-3" y2="1"/>
|
||||
<line color="gtk:dark[NORMAL]"
|
||||
x1="width-2" y1="2" x2="width-2" y2="height-2"/>
|
||||
<line color="gtk:dark[NORMAL]"
|
||||
x1="2" y1="height-2" x2="width-3" y2="height-2"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="blank">
|
||||
<!-- nothing -->
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="focus_outline">
|
||||
<rectangle color="gtk:dark[NORMAL]"
|
||||
x="left_width-1" y="top_height-1"
|
||||
width="width-left_width-right_width+1"
|
||||
height="height-top_height-bottom_height+1"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="focus_background">
|
||||
<include name="outer_bevel"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_tile">
|
||||
<line color="gtk:bg[SELECTED]" x1="0" y1="0" x2="width" y2="0"/>
|
||||
<line color="blend/gtk:bg[SELECTED]/#000000/0.1" x1="0" y1="1" x2="width" y2="1"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_tile_unfocused">
|
||||
<line color="blend/gtk:bg[NORMAL]/#000000/0.1" x1="0" y1="0" x2="width" y2="0"/>
|
||||
<line color="blend/gtk:bg[NORMAL]/#000000/0.2" x1="0" y1="1" x2="width" y2="1"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_bg">
|
||||
<tile name="title_tile" tile_width="width" tile_height="2" x="0" y="0" width="width" height="height"/>
|
||||
<rectangle color="blend/gtk:bg[SELECTED]/#000000/0.6" filled="false" x="0" y="0" width="width-1" height="height-1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="0" y="0" width="1" height="1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="width-1" y="0" width="1" height="1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="0" y="height-1" width="1" height="1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.5" filled="true" x="width-1" y="height-1" width="1" height="1"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_bg_unfocused">
|
||||
<tile name="title_tile_unfocused" tile_width="width" tile_height="2" x="0" y="0" width="width-1" height="height-1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.7" filled="false" x="0" y="0" width="width-1" height="height-1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="0" y="0" width="1" height="1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="width-1" y="0" width="1" height="1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="0" y="height-1" width="1" height="1"/>
|
||||
<rectangle color="blend/#000000/gtk:bg[NORMAL]/0.8" filled="true" x="width-1" y="height-1" width="1" height="1"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_text_focused">
|
||||
<clip x="0" y="0" width="width-SpacerWidth" height="height"/>
|
||||
<title color="blend/gtk:fg[SELECTED]/#000000/0.7"
|
||||
x="(0 `max` (width-title_width-mini_icon_width-IconTitleSpacing)) / 2 + mini_icon_width + IconTitleSpacing + 1"
|
||||
y="((height - title_height) / 2) `max` 0 + 1"/>
|
||||
<title color="gtk:fg[SELECTED]"
|
||||
x="(0 `max` (width-title_width-mini_icon_width-IconTitleSpacing)) / 2 + mini_icon_width + IconTitleSpacing"
|
||||
y="((height - title_height) / 2) `max` 0"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_text">
|
||||
<clip x="0" y="0" width="width-SpacerWidth" height="height"/>
|
||||
<title color="blend/gtk:dark[NORMAL]/#000000/0.5"
|
||||
x="(0 `max` (width-title_width-mini_icon_width-IconTitleSpacing)) / 2 + mini_icon_width + IconTitleSpacing"
|
||||
y="((height - title_height) / 2) `max` 0"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_normal">
|
||||
<include name="title_bg_unfocused"/>
|
||||
<include name="title_text"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_focused">
|
||||
<include name="title_bg"/>
|
||||
<include name="title_text_focused"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_utility">
|
||||
<include name="title_text"/>
|
||||
</draw_ops>
|
||||
|
||||
<draw_ops name="title_utility_focused">
|
||||
<include name="title_bg"/>
|
||||
<include name="title_text_focused"/>
|
||||
</draw_ops>
|
||||
|
||||
<frame_style name="normal_unfocused" geometry="normal">
|
||||
<piece position="entire_background" draw_ops="outer_bevel"/>
|
||||
<piece position="title" draw_ops="title_normal"/>
|
||||
|
||||
<!-- we don't specify for prelight, so normal is used -->
|
||||
<button function="close" state="normal" draw_ops="close_button"/>
|
||||
<button function="close" state="pressed" draw_ops="close_button_pressed"/>
|
||||
<button function="minimize" state="normal" draw_ops="minimize_button"/>
|
||||
<button function="minimize" state="pressed" draw_ops="minimize_button_pressed"/>
|
||||
<button function="maximize" state="normal" draw_ops="maximize_button"/>
|
||||
<button function="maximize" state="pressed" draw_ops="maximize_button_pressed"/>
|
||||
<button function="menu" state="normal" draw_ops="menu_button"/>
|
||||
<button function="menu" state="pressed" draw_ops="menu_button_pressed"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style name="normal_focused" geometry="normal" parent="normal_unfocused">
|
||||
<piece position="entire_background" draw_ops="focus_background"/>
|
||||
<piece position="title" draw_ops="title_focused"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style name="shaded_focused" geometry="normal" parent="normal_unfocused">
|
||||
<piece position="title" draw_ops="title_focused"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style name="maximized_unfocused" geometry="normal_small_borders" parent="normal_unfocused">
|
||||
<piece position="entire_background" draw_ops="blank"/>
|
||||
<button function="maximize" state="normal" draw_ops="restore_button"/>
|
||||
<button function="maximize" state="pressed" draw_ops="restore_button_pressed"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style name="maximized_focused" geometry="normal_small_borders" parent="normal_focused">
|
||||
<piece position="entire_background" draw_ops="focus_outline"/>
|
||||
<button function="maximize" state="normal" draw_ops="restore_button"/>
|
||||
<button function="maximize" state="pressed" draw_ops="restore_button_pressed"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style name="utility_unfocused" geometry="utility" parent="normal_unfocused">
|
||||
<piece position="title" draw_ops="title_utility"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style name="utility_focused" geometry="utility" parent="normal_focused">
|
||||
<piece position="title" draw_ops="title_utility_focused"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style name="border" geometry="border" parent="normal_unfocused">
|
||||
<piece position="entire_background" draw_ops="outer_bevel"/>
|
||||
<piece position="title" draw_ops="blank"/>
|
||||
</frame_style>
|
||||
|
||||
<frame_style_set name="normal">
|
||||
<frame focus="yes" state="normal" resize="both" style="normal_focused"/>
|
||||
<frame focus="no" state="normal" resize="both" style="normal_unfocused"/>
|
||||
<frame focus="yes" state="maximized" style="maximized_focused"/>
|
||||
<frame focus="no" state="maximized" style="maximized_unfocused"/>
|
||||
<frame focus="yes" state="shaded" style="shaded_focused"/>
|
||||
<frame focus="no" state="shaded" style="normal_unfocused"/>
|
||||
<frame focus="yes" state="maximized_and_shaded" style="maximized_focused"/>
|
||||
<frame focus="no" state="maximized_and_shaded" style="maximized_unfocused"/>
|
||||
</frame_style_set>
|
||||
|
||||
<frame_style_set name="utility" parent="normal">
|
||||
<frame focus="yes" state="normal" resize="both" style="utility_focused"/>
|
||||
<frame focus="no" state="normal" resize="both" style="utility_unfocused"/>
|
||||
<!-- this is a bunch of crack since utility windows shouldn't be maximized -->
|
||||
<frame focus="yes" state="maximized" style="utility_focused"/>
|
||||
<frame focus="no" state="maximized" style="utility_unfocused"/>
|
||||
<frame focus="yes" state="shaded" style="utility_focused"/>
|
||||
<frame focus="no" state="shaded" style="utility_unfocused"/>
|
||||
<frame focus="yes" state="maximized_and_shaded" style="utility_focused"/>
|
||||
<frame focus="no" state="maximized_and_shaded" style="utility_unfocused"/>
|
||||
</frame_style_set>
|
||||
|
||||
<frame_style_set name="border" parent="normal">
|
||||
<frame focus="yes" state="normal" resize="both" style="border"/>
|
||||
<frame focus="no" state="normal" resize="both" style="border"/>
|
||||
<!-- this is a bunch of crack since utility windows shouldn't be maximized -->
|
||||
<frame focus="yes" state="maximized" style="utility_focused"/>
|
||||
<frame focus="no" state="maximized" style="utility_unfocused"/>
|
||||
<frame focus="yes" state="shaded" style="utility_focused"/>
|
||||
<frame focus="no" state="shaded" style="utility_unfocused"/>
|
||||
<frame focus="yes" state="maximized_and_shaded" style="utility_focused"/>
|
||||
<frame focus="no" state="maximized_and_shaded" style="utility_unfocused"/>
|
||||
</frame_style_set>
|
||||
|
||||
<window type="normal" style_set="normal"/>
|
||||
<window type="dialog" style_set="normal"/>
|
||||
<window type="modal_dialog" style_set="normal"/>
|
||||
<window type="menu" style_set="normal"/>
|
||||
<window type="utility" style_set="utility"/>
|
||||
<window type="border" style_set="border"/>
|
||||
|
||||
<menu_icon function="close" state="normal" draw_ops="close_button"/>
|
||||
<menu_icon function="maximize" state="normal" draw_ops="maximize_button"/>
|
||||
<menu_icon function="unmaximize" state="normal" draw_ops="restore_button"/>
|
||||
<menu_icon function="minimize" state="normal" draw_ops="minimize_button"/>
|
||||
|
||||
</metacity_theme>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user