Compare commits
14 Commits
METACITY_2
...
METACITY_2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
e8bc8e95e2 | ||
![]() |
cfd3cdd64e | ||
![]() |
ec4edcb78c | ||
![]() |
94c3b02eef | ||
![]() |
f83ac8476c | ||
![]() |
4edccc4eb5 | ||
![]() |
0398a78b4a | ||
![]() |
ec6a455fb0 | ||
![]() |
e55ead0419 | ||
![]() |
f22b9dfd94 | ||
![]() |
ec4dfd0cbc | ||
![]() |
350ecb1dcf | ||
![]() |
38a878171a | ||
![]() |
dad1b107f5 |
78
ChangeLog
78
ChangeLog
@@ -1,3 +1,81 @@
|
||||
2001-10-13 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* configure.in: add bad hack to work with GTK 1.3.9.90 RPMs from
|
||||
gnomehide for now
|
||||
|
||||
* src/ui.c: another piece of bad hack in here
|
||||
|
||||
2001-10-13 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* configure.in: bump version
|
||||
|
||||
2001-10-13 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/session.c (meta_session_init): hmm, fix build
|
||||
|
||||
2001-10-12 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/session.c (meta_session_init): set the session manager
|
||||
priority so we start up before other apps.
|
||||
|
||||
2001-10-12 Mikael Hallendal <micke@codefactory.se>
|
||||
|
||||
* src/ui.c (meta_ui_get_default_window_icon): use
|
||||
gdk_pixbuf_new_from_inline
|
||||
(meta_ui_get_default_mini_icon): use
|
||||
gdk_pixbuf_new_from_inline
|
||||
|
||||
2001-10-11 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* configure.in: Added "sv" to ALL_LINGUAS.
|
||||
|
||||
2001-10-10 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/stack.c (meta_stack_free): fix mem leak of the MetaStack
|
||||
object
|
||||
(meta_stack_sync_to_server): try to avoid the restack-flicker
|
||||
thing
|
||||
|
||||
2001-10-07 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/display.c (meta_display_update_active_window_hint):
|
||||
set _NET_ACTIVE_WINDOW hint
|
||||
|
||||
* src/window.c (meta_window_client_message): support
|
||||
_NET_ACTIVE_WINDOW client message
|
||||
|
||||
2001-10-07 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/window.c (meta_window_client_message): don't allow
|
||||
shade/maximize/minimize for windows that don't support those
|
||||
operations. (minimizing the panel = bad)
|
||||
|
||||
2001-10-04 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/keybindings.c (meta_change_keygrab): add code to grab all
|
||||
modifier combinations, so keybindings work with NumLock etc.
|
||||
|
||||
* src/menu.c (meta_window_menu_new): remove newlines from menu
|
||||
items
|
||||
|
||||
2001-09-27 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/session.c (save_state): when encoding text for session file,
|
||||
escape XML entities
|
||||
|
||||
2001-09-21 Alex Graveley <alex@ximian.com>
|
||||
|
||||
* src/Makefile.am (metacity_SOURCES): Add inlinepixbufs.h so
|
||||
that it gets generated.
|
||||
|
||||
* src/frames.c (meta_frames_style_set): Update for new opaque
|
||||
PangoFontMetrics.
|
||||
|
||||
2001-09-17 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/ui.c (meta_ui_init): add hackaround for the warning about
|
||||
gtk-menu-bar-accel
|
||||
|
||||
2001-09-17 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/ui.c (meta_ui_get_default_mini_icon):
|
||||
|
25
README
25
README
@@ -9,24 +9,24 @@ your petty hangups about version numbers.
|
||||
COMPILING METACITY
|
||||
===
|
||||
|
||||
You need GTK+ 1.3.x (to become 2.0), at least version 1.3.7. At the
|
||||
You need GTK+ 1.3.x (to become 2.0), at least version 1.3.9. At the
|
||||
moment CVS HEAD works, but that can change. Metacity is a fairly
|
||||
trivial 6000-line C program, so once you get GTK+ built it should be
|
||||
no problem to build Metacity.
|
||||
|
||||
There are SRPMs on the ftp site (there were also binaries for a bit,
|
||||
but I am taking them down because they only worked with Rawhide, so it
|
||||
was sort of pointless). Just "rpm --rebuild metacity-whatever.src.rpm"
|
||||
after installing the GTK packages from ftp.gtk.org.
|
||||
There are SRPMs and sometimes RPMs on the ftp site, but you'd be
|
||||
pretty lucky to get them to work for now, since they are often out of
|
||||
sync with GTK. You might try with the GTK from ftp.gtk.org, and also
|
||||
the GTK from http://people.redhat.com/hp/gnomehide/.
|
||||
|
||||
REPORTING BUGS AND SUBMITTING PATCHES
|
||||
===
|
||||
|
||||
Report new bugs to hp@redhat.com for now. Will switch to Bugzilla
|
||||
sometime probably.
|
||||
Report new bugs on http://bugzilla.gnome.org.
|
||||
|
||||
Feel free to send patches too; Metacity is really small and simple, so
|
||||
if you find a bug or want to add a feature it should be pretty easy.
|
||||
Send me mail, or put the patch in bugzilla.
|
||||
|
||||
See the HACKING file for some notes on hacking Metacity.
|
||||
|
||||
@@ -151,6 +151,8 @@ METACITY BUGS, NON-FEATURES, AND CAVEATS
|
||||
clicking the minimize button is sort of a bad idea.
|
||||
(If you had a WM-spec-compliant tasklist, it would work
|
||||
for unminimization.)
|
||||
(Update: you can use "test-wnck" from the libwnck CVS module to
|
||||
unminimize, but it's not much of a UI ;-)
|
||||
|
||||
- Metacity uses the new window manager spec, but only random bits of
|
||||
the old GNOME spec. It correctly advertises exactly which parts of
|
||||
@@ -170,14 +172,7 @@ METACITY BUGS, NON-FEATURES, AND CAVEATS
|
||||
instead of Alt as the main keybinding shortcut, if super/hyper
|
||||
exist, and then keyboards with a windows key can use that for
|
||||
WM functions and Alt for application shortcuts.
|
||||
We'd fall back to Alt if no other suitable modifier existed.
|
||||
|
||||
- Cycling windows with Alt-Tab is flickery, AFAIK because
|
||||
Metacity passes the entire window stack to XRestackWindows()
|
||||
every time you restack. Instead it should probably only restack
|
||||
windows that have changed their stacking with respect to one
|
||||
another. (But sometimes I don't see the flicker, so
|
||||
I'm not sure.)
|
||||
We'd fall back to Alt if no other suitable modifier existed.
|
||||
|
||||
- I haven't even read the ICCCM section about colormaps. So if you
|
||||
have an 8-bit display you are basically screwed.
|
||||
|
12
configure.in
12
configure.in
@@ -2,7 +2,7 @@ AC_INIT(src/display.c)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AM_INIT_AUTOMAKE(metacity, 2.3.13)
|
||||
AM_INIT_AUTOMAKE(metacity, 2.3.21)
|
||||
|
||||
GETTEXT_PACKAGE=metacity
|
||||
AC_SUBST(GETTEXT_PACKAGE)
|
||||
@@ -37,11 +37,11 @@ if test "x$GCC" = "xyes"; then
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
ALL_LINGUAS=""
|
||||
ALL_LINGUAS="sv"
|
||||
dnl AM_GNU_GETTEXT
|
||||
|
||||
## here we get the flags we'll actually use
|
||||
PKG_CHECK_MODULES(METACITY, gtk+-2.0 >= 1.3.7)
|
||||
PKG_CHECK_MODULES(METACITY, gtk+-2.0 >= 1.3.9)
|
||||
|
||||
CFLAGS="$METACITY_CFLAGS $CFLAGS"
|
||||
|
||||
@@ -75,6 +75,12 @@ fi
|
||||
|
||||
AC_SUBST(GDK_PIXBUF_CSOURCE)
|
||||
|
||||
## hack to work with old GTK versions for now
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$METACITY_LIBS $LDFLAGS"
|
||||
AC_CHECK_FUNCS(gdk_pixbuf_new_from_stream)
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
|
@@ -4,3 +4,5 @@ Makefile.in
|
||||
Makefile
|
||||
stamp-cat-id
|
||||
cat-id-tbl.c
|
||||
messages
|
||||
*.pot
|
||||
|
11
po/ChangeLog
Normal file
11
po/ChangeLog
Normal file
@@ -0,0 +1,11 @@
|
||||
2001-10-11 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Fixed some typos. Thanks to Tomas <20>gren <stric@ing.umu.se>
|
||||
for spotting many of them.
|
||||
|
||||
2001-10-11 Christian Rose <menthos@menthos.com>
|
||||
|
||||
* sv.po: Added Swedish translation.
|
||||
* POTFILES.in: Added files.
|
||||
* .cvsignore: Added messages and *.pot.
|
||||
|
@@ -0,0 +1,8 @@
|
||||
src/display.c
|
||||
src/errors.c
|
||||
src/frames.c
|
||||
src/keybindings.c
|
||||
src/menu.c
|
||||
src/screen.c
|
||||
src/session.c
|
||||
src/window.c
|
||||
|
306
po/sv.po
Normal file
306
po/sv.po
Normal file
@@ -0,0 +1,306 @@
|
||||
# Swedish messages for metacity.
|
||||
# Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
# Christian Rose <menthos@menthos.com>, 2001.
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: metacity\n"
|
||||
"POT-Creation-Date: 2001-10-11 12:59+0200\n"
|
||||
"PO-Revision-Date: 2001-10-11 13:04+0200\n"
|
||||
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
|
||||
"Language-Team: Swedish <sv@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=iso-8859-1\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: src/display.c:153
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "Misslyckades med att <20>ppna X Window System-displayen \"%s\"\n"
|
||||
|
||||
#: src/errors.c:92
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Lost connection to the display '%s';\n"
|
||||
"most likely the X server was shut down or you killed/destroyed\n"
|
||||
"the window manager.\n"
|
||||
msgstr ""
|
||||
"Tappade anslutningen till displayen \"%s\";\n"
|
||||
"troligtvis st<73>ngdes X-servern ner, eller s<> d<>dade/f<>rst<73>rde du\n"
|
||||
"f<>nsterhanteraren.\n"
|
||||
|
||||
#: src/errors.c:99
|
||||
#, c-format
|
||||
msgid "Fatal IO error %d (%s) on display '%s'.\n"
|
||||
msgstr "<22>desdigert IO-fel %d (%s) p<> display \"%s\".\n"
|
||||
|
||||
#: src/frames.c:229
|
||||
msgid "Left edge"
|
||||
msgstr "V<>nsterkant"
|
||||
|
||||
#: src/frames.c:229
|
||||
msgid "Left window edge width"
|
||||
msgstr "Bredd p<> v<>nster f<>nsterkant"
|
||||
|
||||
#: src/frames.c:230
|
||||
msgid "Right edge"
|
||||
msgstr "H<>gerkant"
|
||||
|
||||
#: src/frames.c:230
|
||||
msgid "Right window edge width"
|
||||
msgstr "Bredd p<> h<>ger f<>nsterkant"
|
||||
|
||||
#: src/frames.c:231
|
||||
msgid "Bottom edge"
|
||||
msgstr "Nederkant"
|
||||
|
||||
#: src/frames.c:231
|
||||
msgid "Bottom window edge height"
|
||||
msgstr "H<>jd p<> nedre f<>nsterkant"
|
||||
|
||||
#: src/frames.c:233
|
||||
msgid "Title border"
|
||||
msgstr "Titelkant"
|
||||
|
||||
#: src/frames.c:233
|
||||
msgid "Border around title area"
|
||||
msgstr "Ram runt titelomr<6D>det"
|
||||
|
||||
#: src/frames.c:234
|
||||
msgid "Text border"
|
||||
msgstr "Textram"
|
||||
|
||||
#: src/frames.c:234
|
||||
msgid "Border around window title text"
|
||||
msgstr "Ram runt f<>nstertiteln"
|
||||
|
||||
#: src/frames.c:236
|
||||
msgid "Spacer padding"
|
||||
msgstr "Utfyllnadsmellanrum"
|
||||
|
||||
#: src/frames.c:236
|
||||
msgid "Padding on either side of spacer"
|
||||
msgstr "Utfyllnad p<> varje sida om utfyllare"
|
||||
|
||||
#: src/frames.c:237
|
||||
msgid "Spacer width"
|
||||
msgstr "Utfyllnadsbredd"
|
||||
|
||||
#: src/frames.c:237
|
||||
msgid "Width of spacer"
|
||||
msgstr "Bredd p<> utfyllnad"
|
||||
|
||||
#: src/frames.c:238
|
||||
msgid "Spacer height"
|
||||
msgstr "Utfyllnadsh<73>jd"
|
||||
|
||||
#: src/frames.c:238
|
||||
msgid "Height of spacer"
|
||||
msgstr "H<>jd p<> utfyllnad"
|
||||
|
||||
#. same as right_width left_width by default
|
||||
#: src/frames.c:241
|
||||
msgid "Right inset"
|
||||
msgstr "H<>ger inf<6E>llning"
|
||||
|
||||
#: src/frames.c:241
|
||||
msgid "Distance of buttons from right edge of frame"
|
||||
msgstr "Avst<73>nd p<> knappar fr<66>n h<>gerkanten p<> ramen"
|
||||
|
||||
#: src/frames.c:242
|
||||
msgid "Left inset"
|
||||
msgstr "V<>nster inf<6E>llning"
|
||||
|
||||
#: src/frames.c:242
|
||||
msgid "Distance of menu button from left edge of frame"
|
||||
msgstr "Avst<73>nd p<> menyknapp fr<66>n v<>nsterkanten p<> ramen"
|
||||
|
||||
#: src/frames.c:244
|
||||
msgid "Button width"
|
||||
msgstr "Knappbredd"
|
||||
|
||||
#: src/frames.c:244
|
||||
msgid "Width of buttons"
|
||||
msgstr "Bredd p<> knappar"
|
||||
|
||||
#: src/frames.c:245
|
||||
msgid "Button height"
|
||||
msgstr "Knapph<70>jd"
|
||||
|
||||
#: src/frames.c:245
|
||||
msgid "Height of buttons"
|
||||
msgstr "H<>jd p<> knappar"
|
||||
|
||||
#: src/frames.c:247
|
||||
msgid "Button border"
|
||||
msgstr "Knappram"
|
||||
|
||||
#: src/frames.c:247
|
||||
msgid "Border around buttons"
|
||||
msgstr "Ram runt knappar"
|
||||
|
||||
#: src/frames.c:248
|
||||
msgid "Inner button border"
|
||||
msgstr "Inre knappram"
|
||||
|
||||
#: src/frames.c:248
|
||||
msgid "Border around the icon inside buttons"
|
||||
msgstr "Ram runt ikonen inuti knappar"
|
||||
|
||||
#: src/frames.c:883
|
||||
msgid "Close Window"
|
||||
msgstr "St<53>ng f<>nster"
|
||||
|
||||
#: src/frames.c:886
|
||||
msgid "Window Menu"
|
||||
msgstr "F<>nstermeny"
|
||||
|
||||
#: src/frames.c:889
|
||||
msgid "Minimize Window"
|
||||
msgstr "Minimera f<>nster"
|
||||
|
||||
#: src/frames.c:892
|
||||
msgid "Maximize Window"
|
||||
msgstr "Maximera f<>nster"
|
||||
|
||||
#: src/frames.c:895
|
||||
msgid "Unmaximize Window"
|
||||
msgstr "Avmaximera f<>nster"
|
||||
|
||||
#: src/keybindings.c:203
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Some other program is already using the key %s with modifiers %x as a "
|
||||
"binding\n"
|
||||
msgstr ""
|
||||
"Ett annat program anv<6E>nder redan tangenten %s med modifierarna %x som en "
|
||||
"bindning\n"
|
||||
|
||||
#: src/menu.c:47
|
||||
msgid "_Close"
|
||||
msgstr "_St<53>ng"
|
||||
|
||||
#: src/menu.c:48
|
||||
msgid "_Minimize"
|
||||
msgstr "_Minimera"
|
||||
|
||||
#: src/menu.c:49
|
||||
msgid "Ma_ximize"
|
||||
msgstr "Ma_ximera"
|
||||
|
||||
#: src/menu.c:50
|
||||
msgid "_Unmaximize"
|
||||
msgstr "_Avmaximera"
|
||||
|
||||
#: src/menu.c:51
|
||||
msgid "_Shade"
|
||||
msgstr "_Skugga"
|
||||
|
||||
#: src/menu.c:52
|
||||
msgid "U_nshade"
|
||||
msgstr "A_vskugga"
|
||||
|
||||
#: src/menu.c:53
|
||||
msgid "Mo_ve"
|
||||
msgstr "Fl_ytta"
|
||||
|
||||
#: src/menu.c:54
|
||||
msgid "_Resize"
|
||||
msgstr "_<>ndra storlek"
|
||||
|
||||
#. separator
|
||||
#: src/menu.c:56
|
||||
msgid "Put on _All Workspaces"
|
||||
msgstr "Placera p<> _alla arbetsytor"
|
||||
|
||||
#: src/menu.c:57
|
||||
msgid "Only on _This Workspace"
|
||||
msgstr "Endast p<> _denna arbetsyta"
|
||||
|
||||
#: src/menu.c:260
|
||||
#, c-format
|
||||
msgid "Only on workspace _%d"
|
||||
msgstr "Endast p<> arbetsyta _%d"
|
||||
|
||||
#: src/menu.c:263
|
||||
#, c-format
|
||||
msgid "Move to workspace _%d"
|
||||
msgstr "Flytta till arbetsyta _%d"
|
||||
|
||||
#: src/screen.c:168
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Sk<53>rm %d p<> display \"%s\" <20>r ogiltig\n"
|
||||
|
||||
#: src/screen.c:183
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' already has a window manager\n"
|
||||
msgstr "Sk<53>rm %d p<> display \"%s\" har redan en f<>nsterhanterare\n"
|
||||
|
||||
#: src/session.c:742 src/session.c:749
|
||||
#, c-format
|
||||
msgid "Could not create directory '%s': %s\n"
|
||||
msgstr "Kunde inte skapa katalogen \"%s\": %s\n"
|
||||
|
||||
#: src/session.c:759
|
||||
#, c-format
|
||||
msgid "Could not open session file '%s' for writing: %s\n"
|
||||
msgstr "Kunde inte <20>ppna sessionsfilen \"%s\" f<>r skrivning: %s\n"
|
||||
|
||||
#: src/session.c:891
|
||||
#, c-format
|
||||
msgid "Error writing session file '%s': %s\n"
|
||||
msgstr "Fel vid skrivning av sessionsfilen \"%s\": %s\n"
|
||||
|
||||
#: src/session.c:896
|
||||
#, c-format
|
||||
msgid "Error closing session file '%s': %s\n"
|
||||
msgstr "Fel vid st<73>ngning av sessionsfilen \"%s\": %s\n"
|
||||
|
||||
#: src/session.c:970
|
||||
#, c-format
|
||||
msgid "Failed to read saved session file %s: %s\n"
|
||||
msgstr "Misslyckades med att l<>sa sparad sessionsfil %s: %s\n"
|
||||
|
||||
#: src/session.c:1004
|
||||
#, c-format
|
||||
msgid "Failed to parse saved session file: %s\n"
|
||||
msgstr "Misslyckades med att tolka sparad sessionsfil: %s\n"
|
||||
|
||||
#: src/session.c:1042
|
||||
msgid "nested <window> tag"
|
||||
msgstr "n<>stlad <window>-tagg"
|
||||
|
||||
#: src/session.c:1092 src/session.c:1124
|
||||
#, c-format
|
||||
msgid "Unknown attribute %s on <window> element"
|
||||
msgstr "Ok<4F>nt attribut %s p<> <window>-element"
|
||||
|
||||
#: src/session.c:1184
|
||||
#, c-format
|
||||
msgid "Unknown attribute %s on <geometry> element"
|
||||
msgstr "Ok<4F>nt attribut %s p<> <geometry>-element"
|
||||
|
||||
#: src/session.c:1204
|
||||
#, c-format
|
||||
msgid "Unknown element %s"
|
||||
msgstr "Ok<4F>nt element %s"
|
||||
|
||||
#. someone is on crack
|
||||
#: src/window.c:2852
|
||||
#, c-format
|
||||
msgid "Window %s sets max width %d less than min width %d, disabling resize\n"
|
||||
msgstr ""
|
||||
"F<>nstret %s st<73>ller in st<73>rsta bredden %d mindre <20>n minsta bredden %d, "
|
||||
"st<73>nger av storleks<6B>ndring\n"
|
||||
|
||||
#. another cracksmoker
|
||||
#: src/window.c:2862
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets max height %d less than min height %d, disabling resize\n"
|
||||
msgstr ""
|
||||
"F<>nstret %s st<73>ller in st<73>rsta h<>jden %d mindre <20>n minsta h<>jden %d, st<73>nger "
|
||||
"av storleks<6B>ndring\n"
|
@@ -21,6 +21,7 @@ metacity_SOURCES= \
|
||||
frame.h \
|
||||
frames.c \
|
||||
frames.h \
|
||||
inlinepixbufs.h \
|
||||
keybindings.c \
|
||||
keybindings.h \
|
||||
main.c \
|
||||
@@ -56,8 +57,8 @@ desktopfiles_DATA=metacity.desktop
|
||||
IMAGES=default_icon.png
|
||||
VARIABLES=default_icon_data $(srcdir)/default_icon.png
|
||||
|
||||
noinst_DATA = inlinepixbufs.h
|
||||
CLEANFILES += $(noinst_DATA)
|
||||
BUILT_SOURCES = inlinepixbufs.h
|
||||
CLEANFILES += inlinepixbufs.h
|
||||
|
||||
inlinepixbufs.h: $(IMAGES)
|
||||
$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/inlinepixbufs.h
|
||||
|
@@ -135,7 +135,8 @@ meta_display_open (const char *name)
|
||||
"UTF8_STRING",
|
||||
"WM_ICON_SIZE",
|
||||
"_KWM_WIN_ICON",
|
||||
"_NET_WM_MOVERESIZE"
|
||||
"_NET_WM_MOVERESIZE",
|
||||
"_NET_ACTIVE_WINDOW"
|
||||
};
|
||||
Atom atoms[G_N_ELEMENTS(atom_names)];
|
||||
|
||||
@@ -222,6 +223,7 @@ meta_display_open (const char *name)
|
||||
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];
|
||||
|
||||
/* Offscreen unmapped window used for _NET_SUPPORTING_WM_CHECK,
|
||||
* created in screen_new
|
||||
@@ -905,27 +907,29 @@ event_callback (XEvent *event,
|
||||
screen = meta_display_screen_for_root (display,
|
||||
event->xclient.window);
|
||||
|
||||
if (screen &&
|
||||
event->xclient.message_type ==
|
||||
display->atom_net_current_desktop)
|
||||
if (screen)
|
||||
{
|
||||
int space;
|
||||
MetaWorkspace *workspace;
|
||||
if (event->xclient.message_type ==
|
||||
display->atom_net_current_desktop)
|
||||
{
|
||||
int space;
|
||||
MetaWorkspace *workspace;
|
||||
|
||||
space = event->xclient.data.l[0];
|
||||
space = event->xclient.data.l[0];
|
||||
|
||||
meta_verbose ("Request to change current workspace to %d\n",
|
||||
space);
|
||||
meta_verbose ("Request to change current workspace to %d\n",
|
||||
space);
|
||||
|
||||
workspace =
|
||||
meta_display_get_workspace_by_screen_index (display,
|
||||
screen,
|
||||
space);
|
||||
workspace =
|
||||
meta_display_get_workspace_by_screen_index (display,
|
||||
screen,
|
||||
space);
|
||||
|
||||
if (workspace)
|
||||
meta_workspace_activate (workspace);
|
||||
else
|
||||
meta_verbose ("Don't know about workspace %d\n", space);
|
||||
if (workspace)
|
||||
meta_workspace_activate (workspace);
|
||||
else
|
||||
meta_verbose ("Don't know about workspace %d\n", space);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1674,3 +1678,32 @@ meta_display_increment_event_serial (MetaDisplay *display)
|
||||
XDeleteProperty (display->xdisplay, display->leader_window,
|
||||
display->atom_motif_wm_hints);
|
||||
}
|
||||
|
||||
void
|
||||
meta_display_update_active_window_hint (MetaDisplay *display)
|
||||
{
|
||||
GSList *tmp;
|
||||
|
||||
unsigned long data[2];
|
||||
|
||||
if (display->focus_window)
|
||||
data[0] = display->focus_window->xwindow;
|
||||
else
|
||||
data[0] = None;
|
||||
data[1] = None;
|
||||
|
||||
tmp = display->screens;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
MetaScreen *screen = tmp->data;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
XChangeProperty (display->xdisplay, screen->xroot,
|
||||
display->atom_net_active_window,
|
||||
XA_WINDOW,
|
||||
32, PropModeReplace, (guchar*) data, 2);
|
||||
meta_error_trap_pop (display);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
}
|
||||
|
@@ -100,6 +100,7 @@ struct _MetaDisplay
|
||||
Atom atom_wm_icon_size;
|
||||
Atom atom_kwm_win_icon;
|
||||
Atom atom_net_wm_moveresize;
|
||||
Atom atom_net_active_window;
|
||||
|
||||
/* This is the actual window from focus events,
|
||||
* not the one we last set
|
||||
@@ -194,4 +195,6 @@ void meta_display_ungrab_window_buttons (MetaDisplay *display,
|
||||
/* make a request to ensure the event serial has changed */
|
||||
void meta_display_increment_event_serial (MetaDisplay *display);
|
||||
|
||||
void meta_display_update_active_window_hint (MetaDisplay *display);
|
||||
|
||||
#endif
|
||||
|
@@ -112,6 +112,7 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
frame->xwindow,
|
||||
window->rect.x,
|
||||
window->rect.y);
|
||||
/* FIXME handle this error */
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
/* stick frame to the window */
|
||||
|
10
src/frames.c
10
src/frames.c
@@ -458,18 +458,22 @@ meta_frames_style_set (GtkWidget *widget,
|
||||
*(frames->props) = props;
|
||||
|
||||
{
|
||||
PangoFontMetrics metrics;
|
||||
PangoFontMetrics *metrics;
|
||||
PangoFont *font;
|
||||
PangoLanguage *lang;
|
||||
|
||||
font = pango_context_load_font (gtk_widget_get_pango_context (widget),
|
||||
widget->style->font_desc);
|
||||
lang = pango_context_get_language (gtk_widget_get_pango_context (widget));
|
||||
pango_font_get_metrics (font, lang, &metrics);
|
||||
metrics = pango_font_get_metrics (font, lang);
|
||||
|
||||
g_object_unref (G_OBJECT (font));
|
||||
|
||||
frames->text_height = PANGO_PIXELS (metrics.ascent + metrics.descent);
|
||||
frames->text_height =
|
||||
PANGO_PIXELS (pango_font_metrics_get_ascent (metrics) +
|
||||
pango_font_metrics_get_descent (metrics));
|
||||
|
||||
pango_font_metrics_unref (metrics);
|
||||
}
|
||||
|
||||
/* Queue a draw/resize on all frames */
|
||||
|
@@ -88,7 +88,8 @@ struct _MetaKeyBinding
|
||||
int keycode;
|
||||
};
|
||||
|
||||
#define INTERESTING_MODIFIERS (ShiftMask | ControlMask | Mod1Mask)
|
||||
#define IGNORED_MODIFIERS (LockMask | Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask)
|
||||
#define INTERESTING_MODIFIERS (~IGNORED_MODIFIERS)
|
||||
|
||||
static MetaKeyBinding screen_bindings[] = {
|
||||
{ XK_F1, Mod1Mask, KeyPress, handle_activate_workspace, GINT_TO_POINTER (0), 0 },
|
||||
@@ -144,6 +145,88 @@ meta_display_init_keys (MetaDisplay *display)
|
||||
init_bindings (display, window_bindings);
|
||||
}
|
||||
|
||||
/* Grab/ungrab, ignoring all annoying modifiers like NumLock etc. */
|
||||
static void
|
||||
meta_change_keygrab (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
gboolean grab,
|
||||
int keysym,
|
||||
int keycode,
|
||||
int modmask)
|
||||
{
|
||||
int result;
|
||||
int ignored_mask;
|
||||
|
||||
/* Grab keycode/modmask, together with
|
||||
* all combinations of IGNORED_MODIFIERS.
|
||||
* X provides no better way to do this.
|
||||
*/
|
||||
|
||||
/* modmask can't contain any non-interesting modifiers */
|
||||
g_return_if_fail ((modmask & INTERESTING_MODIFIERS) == modmask);
|
||||
|
||||
ignored_mask = 0;
|
||||
while (ignored_mask < IGNORED_MODIFIERS)
|
||||
{
|
||||
if (ignored_mask & INTERESTING_MODIFIERS)
|
||||
{
|
||||
/* Not a combination of IGNORED_MODIFIERS
|
||||
* (it contains some non-ignored modifiers)
|
||||
*/
|
||||
++ignored_mask;
|
||||
continue;
|
||||
}
|
||||
|
||||
meta_error_trap_push (display);
|
||||
if (grab)
|
||||
XGrabKey (display->xdisplay, keycode,
|
||||
modmask | ignored_mask,
|
||||
xwindow,
|
||||
True,
|
||||
GrabModeAsync, GrabModeAsync);
|
||||
else
|
||||
XUngrabKey (display->xdisplay, keycode,
|
||||
modmask | ignored_mask,
|
||||
xwindow);
|
||||
|
||||
result = meta_error_trap_pop (display);
|
||||
|
||||
if (grab && result != Success)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
name = XKeysymToString (keysym);
|
||||
if (name == NULL)
|
||||
name = "(unknown)";
|
||||
|
||||
if (result == BadAccess)
|
||||
meta_warning (_("Some other program is already using the key %s with modifiers %x as a binding\n"), name, modmask | ignored_mask);
|
||||
}
|
||||
|
||||
++ignored_mask;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_grab_key (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
int keysym,
|
||||
int keycode,
|
||||
int modmask)
|
||||
{
|
||||
meta_change_keygrab (display, xwindow, TRUE, keysym, keycode, modmask);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_ungrab_key (MetaDisplay *display,
|
||||
Window xwindow,
|
||||
int keysym,
|
||||
int keycode,
|
||||
int modmask)
|
||||
{
|
||||
meta_change_keygrab (display, xwindow, FALSE, keysym, keycode, modmask);
|
||||
}
|
||||
|
||||
static void
|
||||
grab_keys (MetaKeyBinding *bindings,
|
||||
MetaDisplay *display,
|
||||
@@ -156,24 +239,10 @@ grab_keys (MetaKeyBinding *bindings,
|
||||
{
|
||||
if (bindings[i].keycode != 0)
|
||||
{
|
||||
int result;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
XGrabKey (display->xdisplay, bindings[i].keycode,
|
||||
bindings[i].mask, xwindow, True,
|
||||
GrabModeAsync, GrabModeAsync);
|
||||
result = meta_error_trap_pop (display);
|
||||
if (result != Success)
|
||||
{
|
||||
const char *name;
|
||||
|
||||
name = XKeysymToString (bindings[i].keysym);
|
||||
if (name == NULL)
|
||||
name = "(unknown)";
|
||||
|
||||
if (result == BadAccess)
|
||||
meta_warning (_("Some other program is already using the key %s as a binding\n"), name);
|
||||
}
|
||||
meta_grab_key (display, xwindow,
|
||||
bindings[i].keysym,
|
||||
bindings[i].keycode,
|
||||
bindings[i].mask);
|
||||
}
|
||||
|
||||
++i;
|
||||
@@ -192,10 +261,10 @@ ungrab_keys (MetaKeyBinding *bindings,
|
||||
{
|
||||
if (bindings[i].keycode != 0)
|
||||
{
|
||||
meta_error_trap_push (display);
|
||||
XUngrabKey (display->xdisplay, bindings[i].keycode,
|
||||
bindings[i].mask, xwindow);
|
||||
meta_error_trap_pop (display);
|
||||
meta_ungrab_key (display, xwindow,
|
||||
bindings[i].keysym,
|
||||
bindings[i].keycode,
|
||||
bindings[i].mask);
|
||||
}
|
||||
|
||||
++i;
|
||||
|
@@ -257,10 +257,10 @@ meta_window_menu_new (MetaFrames *frames,
|
||||
MenuData *md;
|
||||
|
||||
if (ops & META_MENU_OP_UNSTICK)
|
||||
label = g_strdup_printf (_("Only on workspace _%d\n"),
|
||||
label = g_strdup_printf (_("Only on workspace _%d"),
|
||||
i + 1);
|
||||
else
|
||||
label = g_strdup_printf (_("Move to workspace _%d\n"),
|
||||
label = g_strdup_printf (_("Move to workspace _%d"),
|
||||
i + 1);
|
||||
|
||||
mi = gtk_menu_item_new_with_mnemonic (label);
|
||||
|
@@ -246,10 +246,11 @@ meta_session_init (const char *previous_id)
|
||||
current_state = STATE_REGISTERING;
|
||||
|
||||
{
|
||||
SmProp prop1, prop2, prop3, prop4, prop5, *props[5];
|
||||
SmPropValue prop1val, prop2val, prop3val, prop4val, prop5val;
|
||||
SmProp prop1, prop2, prop3, prop4, prop5, prop6, *props[6];
|
||||
SmPropValue prop1val, prop2val, prop3val, prop4val, prop5val, prop6val;
|
||||
char pid[32];
|
||||
char hint = SmRestartIfRunning;
|
||||
char priority = 20; /* low to run before other apps */
|
||||
|
||||
prop1.name = SmProgram;
|
||||
prop1.type = SmARRAY8;
|
||||
@@ -290,14 +291,22 @@ meta_session_init (const char *previous_id)
|
||||
prop5.vals = &prop5val;
|
||||
prop5val.value = g_get_home_dir ();
|
||||
prop5val.length = strlen (prop5val.value);
|
||||
|
||||
prop6.name = "_GSM_Priority";
|
||||
prop6.type = SmCARD8;
|
||||
prop6.num_vals = 1;
|
||||
prop6.vals = &prop6val;
|
||||
prop6val.value = &priority;
|
||||
prop6val.length = 1;
|
||||
|
||||
props[0] = &prop1;
|
||||
props[1] = &prop2;
|
||||
props[2] = &prop3;
|
||||
props[3] = &prop4;
|
||||
props[4] = &prop5;
|
||||
props[5] = &prop6;
|
||||
|
||||
SmcSetProperties (session_connection, 5, props);
|
||||
SmcSetProperties (session_connection, 6, props);
|
||||
}
|
||||
|
||||
set_clone_restart_commands ();
|
||||
@@ -665,13 +674,14 @@ window_gravity_from_string (const char *str)
|
||||
}
|
||||
|
||||
static char*
|
||||
encode_text_as_utf8 (const char *text)
|
||||
encode_text_as_utf8_markup (const char *text)
|
||||
{
|
||||
/* text can be any encoding, and is nul-terminated.
|
||||
* we pretend it's Latin-1 and encode as UTF-8
|
||||
*/
|
||||
GString *str;
|
||||
const char *p;
|
||||
char *escaped;
|
||||
|
||||
str = g_string_new ("");
|
||||
|
||||
@@ -682,13 +692,16 @@ encode_text_as_utf8 (const char *text)
|
||||
++p;
|
||||
}
|
||||
|
||||
return g_string_free (str, FALSE);
|
||||
escaped = g_markup_escape_text (str->str, str->len);
|
||||
g_string_free (str, TRUE);
|
||||
|
||||
return escaped;
|
||||
}
|
||||
|
||||
static char*
|
||||
decode_text_from_utf8 (const char *text)
|
||||
{
|
||||
/* Convert back from the encoded UTF-8 */
|
||||
/* Convert back from the encoded (but not escaped) UTF-8 */
|
||||
GString *str;
|
||||
const char *p;
|
||||
|
||||
@@ -803,13 +816,13 @@ save_state (void)
|
||||
* in practice they are always ascii though.)
|
||||
*/
|
||||
|
||||
sm_client_id = encode_text_as_utf8 (window->sm_client_id);
|
||||
sm_client_id = encode_text_as_utf8_markup (window->sm_client_id);
|
||||
res_class = window->res_class ?
|
||||
encode_text_as_utf8 (window->res_class) : NULL;
|
||||
encode_text_as_utf8_markup (window->res_class) : NULL;
|
||||
res_name = window->res_name ?
|
||||
encode_text_as_utf8 (window->res_name) : NULL;
|
||||
encode_text_as_utf8_markup (window->res_name) : NULL;
|
||||
role = window->role ?
|
||||
encode_text_as_utf8 (window->role) : NULL;
|
||||
encode_text_as_utf8_markup (window->role) : NULL;
|
||||
|
||||
meta_verbose ("Saving session managed window %s, client ID '%s'\n",
|
||||
window->desc, window->sm_client_id);
|
||||
|
109
src/stack.c
109
src/stack.c
@@ -62,6 +62,8 @@ meta_stack_new (MetaScreen *screen)
|
||||
stack->pending = NULL;
|
||||
stack->freeze_count = 0;
|
||||
stack->n_added = 0;
|
||||
|
||||
stack->last_root_children_stacked = NULL;
|
||||
|
||||
return stack;
|
||||
}
|
||||
@@ -95,6 +97,10 @@ meta_stack_free (MetaStack *stack)
|
||||
}
|
||||
|
||||
g_list_free (stack->pending);
|
||||
|
||||
g_array_free (stack->last_root_children_stacked, TRUE);
|
||||
|
||||
g_free (stack);
|
||||
}
|
||||
|
||||
static MetaStackOp*
|
||||
@@ -635,9 +641,101 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
root_children_stacked->len);
|
||||
|
||||
meta_error_trap_push (stack->screen->display);
|
||||
XRestackWindows (stack->screen->display->xdisplay,
|
||||
(Window *) root_children_stacked->data,
|
||||
root_children_stacked->len);
|
||||
|
||||
if (stack->last_root_children_stacked == NULL)
|
||||
{
|
||||
/* Just impose our stack, we don't know the previous state.
|
||||
* This involves a ton of circulate requests and may flicker.
|
||||
*/
|
||||
meta_verbose ("Don't know last stack state, restacking everything\n");
|
||||
|
||||
if (root_children_stacked->len > 0)
|
||||
XRestackWindows (stack->screen->display->xdisplay,
|
||||
(Window *) root_children_stacked->data,
|
||||
root_children_stacked->len);
|
||||
}
|
||||
else if (root_children_stacked->len > 0)
|
||||
{
|
||||
/* Try to do minimal window moves to get the stack in order */
|
||||
/* A point of note: these arrays include frames not client windows,
|
||||
* so if a client window has changed frame since last_root_children_stacked
|
||||
* as saved, then we may have inefficiency, but I don't think things
|
||||
* break...
|
||||
*/
|
||||
const Window *old_stack = (Window *) stack->last_root_children_stacked->data;
|
||||
const Window *new_stack = (Window *) root_children_stacked->data;
|
||||
const int old_len = stack->last_root_children_stacked->len;
|
||||
const int new_len = root_children_stacked->len;
|
||||
const Window *oldp = old_stack;
|
||||
const Window *newp = new_stack;
|
||||
const Window *old_end = old_stack + old_len;
|
||||
const Window *new_end = new_stack + new_len;
|
||||
Window last_window = None;
|
||||
|
||||
while (oldp != old_end &&
|
||||
newp != new_end)
|
||||
{
|
||||
if (*oldp == *newp)
|
||||
{
|
||||
/* Stacks are the same here, move on */
|
||||
++oldp;
|
||||
++newp;
|
||||
}
|
||||
else if (meta_display_lookup_x_window (stack->screen->display,
|
||||
*oldp) == NULL)
|
||||
{
|
||||
/* *oldp is no longer known to us (probably destroyed),
|
||||
* so we can just skip it
|
||||
*/
|
||||
++oldp;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Move *newp below last_window */
|
||||
if (last_window == None)
|
||||
{
|
||||
meta_verbose ("Raising window 0x%lx to the top\n", *newp);
|
||||
|
||||
XRaiseWindow (stack->screen->display->xdisplay,
|
||||
*newp);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This means that if last_window is dead, but not
|
||||
* *newp, then we fail to restack *newp; but on
|
||||
* unmanaging last_window, we'll fix it up.
|
||||
*/
|
||||
|
||||
XWindowChanges changes;
|
||||
|
||||
changes.sibling = last_window;
|
||||
changes.stack_mode = Below;
|
||||
|
||||
meta_verbose ("Placing window 0x%lx below 0x%lx\n",
|
||||
*newp, last_window);
|
||||
|
||||
XConfigureWindow (stack->screen->display->xdisplay,
|
||||
*newp,
|
||||
CWSibling | CWStackMode,
|
||||
&changes);
|
||||
}
|
||||
|
||||
++newp;
|
||||
}
|
||||
|
||||
last_window = *newp;
|
||||
}
|
||||
|
||||
if (newp != new_end)
|
||||
{
|
||||
/* Restack remaining windows */
|
||||
meta_verbose ("Restacking remaining %d windows\n",
|
||||
(int) (new_end - newp));
|
||||
XRestackWindows (stack->screen->display->xdisplay,
|
||||
(Window *) newp, new_end - newp);
|
||||
}
|
||||
}
|
||||
|
||||
meta_error_trap_pop (stack->screen->display);
|
||||
/* on error, a window was destroyed; it should eventually
|
||||
* get removed from the stacking list when we unmanage it
|
||||
@@ -662,8 +760,11 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
stacked->len);
|
||||
|
||||
g_array_free (stacked, TRUE);
|
||||
g_array_free (root_children_stacked, TRUE);
|
||||
|
||||
if (stack->last_root_children_stacked)
|
||||
g_array_free (stack->last_root_children_stacked, TRUE);
|
||||
stack->last_root_children_stacked = root_children_stacked;
|
||||
|
||||
/* That was scary... */
|
||||
}
|
||||
|
||||
|
@@ -61,6 +61,9 @@ struct _MetaStack
|
||||
int freeze_count;
|
||||
|
||||
int n_added;
|
||||
|
||||
/* The last-known stack */
|
||||
GArray *last_root_children_stacked;
|
||||
};
|
||||
|
||||
MetaStack *meta_stack_new (MetaScreen *screen);
|
||||
|
18
src/ui.c
18
src/ui.c
@@ -19,6 +19,7 @@
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "ui.h"
|
||||
#include "frames.h"
|
||||
#include "util.h"
|
||||
@@ -39,6 +40,15 @@ meta_ui_init (int *argc, char ***argv)
|
||||
{
|
||||
if (!gtk_init_check (argc, argv))
|
||||
meta_fatal ("Unable to open X display %s\n", XDisplayName (NULL));
|
||||
|
||||
{
|
||||
/* FIXME this is a hackaround for a GTK bug with using menus without
|
||||
* menubars. we have to use the get_type value since it's G_GNUC_CONST
|
||||
*/
|
||||
volatile GType t;
|
||||
t = gtk_menu_bar_get_type ();
|
||||
t += 5;
|
||||
}
|
||||
}
|
||||
|
||||
Display*
|
||||
@@ -421,6 +431,10 @@ meta_ui_pop_delay_exposes (MetaUI *ui)
|
||||
meta_frames_pop_delay_exposes (ui->frames);
|
||||
}
|
||||
|
||||
#ifdef HAVE_GDK_PIXBUF_NEW_FROM_STREAM
|
||||
#define gdk_pixbuf_new_from_inline gdk_pixbuf_new_from_stream
|
||||
#endif
|
||||
|
||||
GdkPixbuf*
|
||||
meta_ui_get_default_window_icon (MetaUI *ui)
|
||||
{
|
||||
@@ -430,7 +444,7 @@ meta_ui_get_default_window_icon (MetaUI *ui)
|
||||
{
|
||||
GdkPixbuf *base;
|
||||
|
||||
base = gdk_pixbuf_new_from_stream (-1, default_icon_data,
|
||||
base = gdk_pixbuf_new_from_inline (-1, default_icon_data,
|
||||
FALSE,
|
||||
NULL);
|
||||
|
||||
@@ -458,7 +472,7 @@ meta_ui_get_default_mini_icon (MetaUI *ui)
|
||||
{
|
||||
GdkPixbuf *base;
|
||||
|
||||
base = gdk_pixbuf_new_from_stream (-1, default_icon_data,
|
||||
base = gdk_pixbuf_new_from_inline (-1, default_icon_data,
|
||||
FALSE,
|
||||
NULL);
|
||||
|
||||
|
35
src/window.c
35
src/window.c
@@ -2287,7 +2287,7 @@ meta_window_client_message (MetaWindow *window,
|
||||
|
||||
shade = (action == _NET_WM_STATE_ADD ||
|
||||
(action == _NET_WM_STATE_TOGGLE && !window->shaded));
|
||||
if (shade)
|
||||
if (shade && window->has_shade_func)
|
||||
meta_window_shade (window);
|
||||
else
|
||||
meta_window_unshade (window);
|
||||
@@ -2302,7 +2302,7 @@ meta_window_client_message (MetaWindow *window,
|
||||
|
||||
max = (action == _NET_WM_STATE_ADD ||
|
||||
(action == _NET_WM_STATE_TOGGLE && !window->maximized));
|
||||
if (max)
|
||||
if (max && window->has_maximize_func)
|
||||
meta_window_maximize (window);
|
||||
else
|
||||
meta_window_unmaximize (window);
|
||||
@@ -2346,7 +2346,8 @@ meta_window_client_message (MetaWindow *window,
|
||||
{
|
||||
meta_verbose ("WM_CHANGE_STATE client message, state: %ld\n",
|
||||
event->xclient.data.l[0]);
|
||||
if (event->xclient.data.l[0] == IconicState)
|
||||
if (event->xclient.data.l[0] == IconicState &&
|
||||
window->has_minimize_func)
|
||||
meta_window_minimize (window);
|
||||
|
||||
return TRUE;
|
||||
@@ -2448,6 +2449,25 @@ meta_window_client_message (MetaWindow *window,
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else if (event->xclient.message_type ==
|
||||
display->atom_net_active_window)
|
||||
{
|
||||
meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s'", window->desc);
|
||||
|
||||
/* Switch to window's workspace - alternatively we could move
|
||||
* window back to this workspace. I don't know which is right.
|
||||
*/
|
||||
if (!meta_workspace_contains_window (window->screen->active_workspace,
|
||||
window) &&
|
||||
/* this check shouldn't actually be required, I don't think it is */
|
||||
window->workspaces)
|
||||
meta_workspace_activate (window->workspaces->data);
|
||||
|
||||
meta_window_raise (window);
|
||||
meta_window_focus (window, CurrentTime); /* FIXME CurrentTime */
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -2522,6 +2542,9 @@ meta_window_notify_focus (MetaWindow *window,
|
||||
meta_frame_queue_draw (window->frame);
|
||||
}
|
||||
|
||||
/* Now set _NET_ACTIVE_WINDOW hint */
|
||||
meta_display_update_active_window_hint (window->display);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -3549,7 +3572,7 @@ get_cardinal (MetaDisplay *display,
|
||||
return FALSE;
|
||||
|
||||
if (type != XA_CARDINAL)
|
||||
return FALSE;
|
||||
return FALSE; /* FIXME free num ? */
|
||||
|
||||
*val = *num;
|
||||
|
||||
@@ -4355,10 +4378,10 @@ update_kwm_icon (MetaWindow *window)
|
||||
|
||||
result = meta_error_trap_pop (window->display);
|
||||
if (result != Success)
|
||||
return None;
|
||||
return result;
|
||||
|
||||
if (type != window->display->atom_kwm_win_icon)
|
||||
return None;
|
||||
return -1; /* FIXME mem leak? */
|
||||
|
||||
window->kwm_pixmap = icons[0];
|
||||
window->kwm_mask = icons[1];
|
||||
|
Reference in New Issue
Block a user