Compare commits
30 Commits
Author | SHA1 | Date | |
---|---|---|---|
33498f6b84 | |||
c0a440b852 | |||
1772a2a59c | |||
44f362ad87 | |||
478f1020a4 | |||
e8209e7b22 | |||
2d20c9ecad | |||
f35160c30f | |||
7fad591d6e | |||
a364cea779 | |||
2eb3ff4bfb | |||
796ca6746d | |||
0a79fb8d62 | |||
ac7ec585c8 | |||
264c555af0 | |||
bbbb0e6002 | |||
41ae760454 | |||
9729a99ec5 | |||
d64c5bfc11 | |||
e4ed433e18 | |||
8ab5cc8f19 | |||
35261808a9 | |||
3a4512cd91 | |||
eb0185c1b1 | |||
34f6ffd1ad | |||
baeb9fbc4b | |||
c3d76aead6 | |||
bed9cb1648 | |||
4ca552785f | |||
b26b11c74d |
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@ libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
.deps
|
||||
src/50-mutter-windows.xml
|
||||
src/mutter-wm.desktop
|
||||
src/mutter.desktop
|
||||
*.o
|
||||
|
34
NEWS
34
NEWS
@ -1,3 +1,37 @@
|
||||
3.3.4
|
||||
=====
|
||||
* Adapt to changes in GtkStateFlags [Owen]
|
||||
* Redo properties for applications menu corresponding to GTK+ changes -
|
||||
they are now _GTK_* not DBUS_*. [Ryan]
|
||||
* Fix crash on gnome-shell restart when a modal dialog is open [Owen; #668299]
|
||||
* Code cleanup [Florian; #666039]
|
||||
|
||||
Contributors:
|
||||
Ryan Lortie, Florian Müllner, Owen Taylor
|
||||
|
||||
Translations:
|
||||
Alexander Shopov [bg], Fran Diéguez [gl]
|
||||
|
||||
3.3.3
|
||||
=====
|
||||
* Add keybindings for tiling to left or right [Florian; #648700]
|
||||
* Support GTK+'s hide-titlebar-when-maximized hint [Florian; #665617]
|
||||
* Load _DBUS_APPLICATION_ID, _DBUS_UNIQUE_NAME, _DBUS_OBJECT_PATH
|
||||
property [Colin, Ryan; #664851]
|
||||
* Handle changes to workspaces-only-on-primary GSetting [Florian; #664853]
|
||||
* Don't use the Clutter default stage [Jasper; #664028]
|
||||
* Fix compilation with --disable-introspection [Lionel; #661871]
|
||||
* Fix problem where stage could end up mis-sized on startup with
|
||||
multiple monitors [Lionel]
|
||||
* Misc bug fixes [Adel, Lionel, Jasper; #666015]
|
||||
|
||||
Contributors:
|
||||
Adel Gadllah, Lionel Landwerlin, Florian Müllner, Jasper St. Pierre
|
||||
|
||||
Translations:
|
||||
Daniel Mustieles [es], Yaron Shahrabani [he], Kjartan Maraas [nb],
|
||||
Matej Urbančič [sk], Muhammet Kara [tr]
|
||||
|
||||
3.3.2
|
||||
=====
|
||||
|
||||
|
@ -2,7 +2,7 @@ AC_PREREQ(2.50)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [3])
|
||||
m4_define([mutter_micro_version], [2])
|
||||
m4_define([mutter_micro_version], [4])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
|
@ -1,5 +1,6 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Please keep this file sorted alphabetically.
|
||||
src/50-mutter-windows.xml.in
|
||||
src/compositor/compositor.c
|
||||
src/core/bell.c
|
||||
src/core/core.c
|
||||
|
36
po/nb.po
36
po/nb.po
@ -6,8 +6,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter 3.3.x\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2011-12-01 20:27+0100\n"
|
||||
"PO-Revision-Date: 2011-12-01 20:29+0100\n"
|
||||
"POT-Creation-Date: 2011-12-14 22:59+0100\n"
|
||||
"PO-Revision-Date: 2011-12-14 22:59+0100\n"
|
||||
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
|
||||
"Language-Team: Norwegian bokmål <i18n-no@lister.ping.uio.no>\n"
|
||||
"Language: \n"
|
||||
@ -15,6 +15,18 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:1
|
||||
msgid "View split on left"
|
||||
msgstr "Visning delt til venstre"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:2
|
||||
msgid "View split on right"
|
||||
msgstr "Visning delt til høyre"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:3
|
||||
msgid "Windows"
|
||||
msgstr "Vinduer"
|
||||
|
||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||
#. * we have no way to get it to exit
|
||||
#: ../src/compositor/compositor.c:492
|
||||
@ -58,12 +70,12 @@ msgstr "_Vent"
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Tvungen nedstenging"
|
||||
|
||||
#: ../src/core/display.c:365
|
||||
#: ../src/core/display.c:361
|
||||
#, c-format
|
||||
msgid "Missing %s extension required for compositing"
|
||||
msgstr "Mangler utvidelsen %s som kreves for komposittfunksjon"
|
||||
|
||||
#: ../src/core/display.c:431
|
||||
#: ../src/core/display.c:427
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "Feil under åpning av X Window System skjerm «%s»\n"
|
||||
@ -172,12 +184,12 @@ msgstr ""
|
||||
msgid "Workspace %d"
|
||||
msgstr "Arbeidsområde %d"
|
||||
|
||||
#: ../src/core/screen.c:741
|
||||
#: ../src/core/screen.c:730
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Skjerm %d på display «%s» er ugyldig\n"
|
||||
|
||||
#: ../src/core/screen.c:757
|
||||
#: ../src/core/screen.c:746
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||
@ -186,19 +198,19 @@ msgstr ""
|
||||
"Skjerm %d på display «%s» har allerede en vindushåndterer; prøv å bruke "
|
||||
"flagget --replace for å erstatte aktiv vindushåndterer.\n"
|
||||
|
||||
#: ../src/core/screen.c:784
|
||||
#: ../src/core/screen.c:773
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
msgstr ""
|
||||
"Kunne ikke hente utvalg fra vinduhåndterer på skjerm %d, display «%s»\n"
|
||||
|
||||
#: ../src/core/screen.c:839
|
||||
#: ../src/core/screen.c:828
|
||||
#, c-format
|
||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
||||
msgstr "Skjerm %d på display «%s» har allerede en vinduhåndterer\n"
|
||||
|
||||
#: ../src/core/screen.c:1024
|
||||
#: ../src/core/screen.c:1013
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "Kunne ikke slippe skjerm %d på display «%s»\n"
|
||||
@ -418,7 +430,11 @@ msgid ""
|
||||
"If enabled, dropping windows on vertical screen edges maximizes them "
|
||||
"vertically and resizes them horizontally to cover half of the available "
|
||||
"area. Dropping windows on the top screen edge maximizes them completely."
|
||||
msgstr "Maksimerer vinduer vertikalt og endrer størrelse horisontalt slik at de dekker halve det tilgjengeligeområdet hvis de slippes på vertikale skjermkanter. Hvis vindu slippes på øverste kant av skjermen maksimeres de fullstendig."
|
||||
msgstr ""
|
||||
"Maksimerer vinduer vertikalt og endrer størrelse horisontalt slik at de "
|
||||
"dekker halve det tilgjengeligeområdet hvis de slippes på vertikale "
|
||||
"skjermkanter. Hvis vindu slippes på øverste kant av skjermen maksimeres de "
|
||||
"fullstendig."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:9
|
||||
msgid "Live Hidden Windows"
|
||||
|
40
po/sl.po
40
po/sl.po
@ -10,8 +10,8 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter master\n"
|
||||
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&keywords=I18N+L10N&component=general\n"
|
||||
"POT-Creation-Date: 2011-11-22 00:22+0000\n"
|
||||
"PO-Revision-Date: 2011-11-25 20:53+0100\n"
|
||||
"POT-Creation-Date: 2011-12-16 13:21+0000\n"
|
||||
"PO-Revision-Date: 2011-12-16 21:47+0100\n"
|
||||
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
|
||||
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
|
||||
"Language: \n"
|
||||
@ -23,6 +23,18 @@ msgstr ""
|
||||
"X-Poedit-Country: SLOVENIA\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:1
|
||||
msgid "View split on left"
|
||||
msgstr "Poglej razdelek na levi"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:2
|
||||
msgid "View split on right"
|
||||
msgstr "Poglej razdelek na desni"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:3
|
||||
msgid "Windows"
|
||||
msgstr "Okna"
|
||||
|
||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||
#. * we have no way to get it to exit
|
||||
#: ../src/compositor/compositor.c:492
|
||||
@ -60,12 +72,12 @@ msgstr "_Počakaj"
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Vsili konec"
|
||||
|
||||
#: ../src/core/display.c:365
|
||||
#: ../src/core/display.c:361
|
||||
#, c-format
|
||||
msgid "Missing %s extension required for compositing"
|
||||
msgstr "Manjka razširitev %s, ki je ključna za sestavljanje"
|
||||
|
||||
#: ../src/core/display.c:431
|
||||
#: ../src/core/display.c:427
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "Ni mogoče odpreti zaslona '%s' okenskega sistema X\n"
|
||||
@ -110,7 +122,7 @@ msgstr "Ni mogoče preiskati mape tem: %s\n"
|
||||
msgid "Could not find a theme! Be sure %s exists and contains the usual themes.\n"
|
||||
msgstr "Ni mogoče najti teme! Prepričajte se, da %s obstaja in vsebuje običajni zapis teme.\n"
|
||||
|
||||
#: ../src/core/mutter.c:42
|
||||
#: ../src/core/mutter.c:40
|
||||
#, c-format
|
||||
msgid ""
|
||||
"mutter %s\n"
|
||||
@ -123,11 +135,11 @@ msgstr ""
|
||||
"To je prosta programska oprema; za pogoje kopiranja si poglejte izvorno kodo.\n"
|
||||
"Program je na voljo BREZ KAKRŠNIHKOLI ZAGOTOVIL.\n"
|
||||
|
||||
#: ../src/core/mutter.c:56
|
||||
#: ../src/core/mutter.c:54
|
||||
msgid "Print version"
|
||||
msgstr "Izpiši različico"
|
||||
|
||||
#: ../src/core/mutter.c:62
|
||||
#: ../src/core/mutter.c:60
|
||||
msgid "Comma-separated list of compositor plugins"
|
||||
msgstr "Z vejico ločen seznam vstavkov sestavljanja"
|
||||
|
||||
@ -156,27 +168,27 @@ msgstr "\"%s\", najden v podatkovni zbirki nastavitev, ni veljaven ključ za tip
|
||||
msgid "Workspace %d"
|
||||
msgstr "Delovna površina %d"
|
||||
|
||||
#: ../src/core/screen.c:741
|
||||
#: ../src/core/screen.c:730
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Zaslon %d na prikazu '%s' ni veljaven\n"
|
||||
|
||||
#: ../src/core/screen.c:757
|
||||
#: ../src/core/screen.c:746
|
||||
#, c-format
|
||||
msgid "Screen %d on display \"%s\" already has a window manager; try using the --replace option to replace the current window manager.\n"
|
||||
msgstr "Zaslon %d na prikazu \"%s\" je že upravljan z upravljalnikom oken; poskušajte uporabiti možnost --replace za zamenjavo trenutnega.\n"
|
||||
|
||||
#: ../src/core/screen.c:784
|
||||
#: ../src/core/screen.c:773
|
||||
#, c-format
|
||||
msgid "Could not acquire window manager selection on screen %d display \"%s\"\n"
|
||||
msgstr "Ni mogoče dobiti izbire upravljalnika oken na zaslonu %d prikaza \"%s\"\n"
|
||||
|
||||
#: ../src/core/screen.c:839
|
||||
#: ../src/core/screen.c:828
|
||||
#, c-format
|
||||
msgid "Screen %d on display \"%s\" already has a window manager\n"
|
||||
msgstr "Zaslon %d na prikazu \"%s\" je že upravljan z upravljalnikom oken\n"
|
||||
|
||||
#: ../src/core/screen.c:1024
|
||||
#: ../src/core/screen.c:1013
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "Ni mogoče opustiti zaslona %d na prikazu \"%s\"\n"
|
||||
@ -276,7 +288,7 @@ msgid "Window manager error: "
|
||||
msgstr "Napaka upravljalnika oken: "
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:7124
|
||||
#: ../src/core/window.c:7180
|
||||
#, c-format
|
||||
msgid "Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.\n"
|
||||
msgstr "Okno %s nastavi svoj SM_CLIENT_ID, namesto, da bi nastavilo WM_CLIENT_LEADER kot je zavedeno v ICCCM.\n"
|
||||
@ -288,7 +300,7 @@ msgstr "Okno %s nastavi svoj SM_CLIENT_ID, namesto, da bi nastavilo WM_CLIENT_LE
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:7787
|
||||
#: ../src/core/window.c:7843
|
||||
#, c-format
|
||||
msgid "Window %s sets an MWM hint indicating it isn't resizable, but sets min size %d x %d and max size %d x %d; this doesn't make much sense.\n"
|
||||
msgstr "Okno %s določi namig MWM, ki pove, da ni mogoče spremeniti velikosti, hkrati pa določi najmanjšo velikost na %d x %d in največjo na %d x %d; vrednost ni smiselna.\n"
|
||||
|
15
src/50-mutter-windows.xml.in
Normal file
15
src/50-mutter-windows.xml.in
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<KeyListEntries schema="org.gnome.mutter.keybindings"
|
||||
group="system"
|
||||
_name="Windows"
|
||||
wm_name="Mutter"
|
||||
package="mutter">
|
||||
|
||||
<KeyListEntry name="toggle-tiled-left"
|
||||
_description="View split on left"/>
|
||||
|
||||
<KeyListEntry name="toggle-tiled-right"
|
||||
_description="View split on right"/>
|
||||
|
||||
</KeyListEntries>
|
||||
|
@ -27,8 +27,6 @@ INCLUDES= \
|
||||
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
|
||||
|
||||
mutter_built_sources = \
|
||||
mutter-marshal.h \
|
||||
mutter-marshal.c \
|
||||
mutter-enum-types.h \
|
||||
mutter-enum-types.c
|
||||
|
||||
@ -261,6 +259,11 @@ wmproperties_in_files=mutter-wm.desktop.in
|
||||
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
|
||||
wmproperties_DATA = $(wmproperties_files)
|
||||
|
||||
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
|
||||
xml_in_files = \
|
||||
50-mutter-windows.xml.in
|
||||
xml_DATA = $(xml_in_files:.xml.in=.xml)
|
||||
|
||||
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml
|
||||
@INTLTOOL_XML_NOMERGE_RULE@
|
||||
@GSETTINGS_RULES@
|
||||
@ -279,6 +282,7 @@ CLEANFILES = \
|
||||
mutter.desktop \
|
||||
mutter-wm.desktop \
|
||||
org.gnome.mutter.gschema.xml \
|
||||
$(xml_DATA) \
|
||||
$(mutter_built_sources) \
|
||||
$(typelib_DATA) \
|
||||
$(gir_DATA)
|
||||
@ -295,38 +299,18 @@ EXTRA_DIST=$(desktopfiles_files) \
|
||||
$(IMAGES) \
|
||||
$(desktopfiles_in_files) \
|
||||
$(wmproperties_in_files) \
|
||||
$(xml_in_files) \
|
||||
org.gnome.mutter.gschema.xml.in \
|
||||
mutter-schemas.convert \
|
||||
libmutter.pc.in \
|
||||
mutter-plugins.pc.in \
|
||||
mutter-enum-types.h.in \
|
||||
mutter-enum-types.c.in \
|
||||
mutter-marshal.list
|
||||
mutter-enum-types.c.in
|
||||
|
||||
BUILT_SOURCES += $(mutter_built_sources)
|
||||
MUTTER_STAMP_FILES = stamp-mutter-marshal.h stamp-mutter-enum-types.h
|
||||
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
|
||||
CLEANFILES += $(MUTTER_STAMP_FILES)
|
||||
|
||||
mutter-marshal.h: stamp-mutter-marshal.h
|
||||
@true
|
||||
stamp-mutter-marshal.h: Makefile mutter-marshal.list
|
||||
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
|
||||
--prefix=_mutter_marshal \
|
||||
--header \
|
||||
$(srcdir)/mutter-marshal.list > xgen-tmh && \
|
||||
(cmp -s xgen-tmh mutter-marshal.h || cp -f xgen-tmh mutter-marshal.h) && \
|
||||
rm -f xgen-tmh && \
|
||||
echo timestamp > $(@F)
|
||||
|
||||
mutter-marshal.c: Makefile mutter-marshal.list
|
||||
$(AM_V_GEN) (echo "#include \"mutter-marshal.h\"" ; \
|
||||
$(GLIB_GENMARSHAL) \
|
||||
--prefix=_mutter_marshal \
|
||||
--body \
|
||||
$(srcdir)/mutter-marshal.list ) > xgen-tmc && \
|
||||
cp -f xgen-tmc mutter-marshal.c && \
|
||||
rm -f xgen-tmc
|
||||
|
||||
mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
|
||||
@true
|
||||
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in
|
||||
|
@ -515,13 +515,15 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
|
||||
meta_screen_set_cm_selection (screen);
|
||||
|
||||
info->stage = clutter_stage_get_default ();
|
||||
info->stage = clutter_stage_new ();
|
||||
|
||||
meta_screen_get_size (screen, &width, &height);
|
||||
clutter_actor_set_size (info->stage, width, height);
|
||||
clutter_actor_realize (info->stage);
|
||||
|
||||
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||
|
||||
XResizeWindow (xdisplay, xwin, width, height);
|
||||
|
||||
event_mask = FocusChangeMask |
|
||||
ExposureMask |
|
||||
EnterWindowMask | LeaveWindowMask |
|
||||
@ -1139,12 +1141,18 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
||||
guint width,
|
||||
guint height)
|
||||
{
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
Display *xdisplay;
|
||||
Window xwin;
|
||||
|
||||
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
|
||||
g_return_if_fail (info);
|
||||
|
||||
clutter_actor_set_size (info->stage, width, height);
|
||||
xdisplay = meta_display_get_xdisplay (display);
|
||||
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||
|
||||
XResizeWindow (xdisplay, xwin, width, height);
|
||||
|
||||
meta_background_actor_screen_size_changed (screen);
|
||||
|
||||
|
@ -442,8 +442,7 @@ meta_shadow_factory_class_init (MetaShadowFactoryClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
|
@ -232,15 +232,13 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
||||
g_signal_new ("position-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
signals[SIZE_CHANGED] =
|
||||
g_signal_new ("size-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
0, NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
@ -1255,19 +1253,24 @@ void
|
||||
meta_window_actor_set_redirected (MetaWindowActor *self, gboolean state)
|
||||
{
|
||||
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
||||
MetaDisplay *display = meta_window_get_display (metaWindow);
|
||||
|
||||
Display *xdisplay = meta_display_get_xdisplay (meta_window_get_display (metaWindow));
|
||||
Display *xdisplay = meta_display_get_xdisplay (display);
|
||||
Window xwin = meta_window_actor_get_x_window (self);
|
||||
|
||||
if (state)
|
||||
{
|
||||
meta_error_trap_push (display);
|
||||
XCompositeRedirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||
meta_error_trap_pop (display);
|
||||
meta_window_actor_queue_create_pixmap (self);
|
||||
self->priv->unredirected = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_error_trap_push (display);
|
||||
XCompositeUnredirectWindow (xdisplay, xwin, CompositeRedirectManual);
|
||||
meta_error_trap_pop (display);
|
||||
self->priv->unredirected = TRUE;
|
||||
}
|
||||
}
|
||||
|
@ -439,9 +439,13 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
monitor_info->number);
|
||||
|
||||
/* Workaround braindead legacy apps that don't know how to
|
||||
* fullscreen themselves properly.
|
||||
* fullscreen themselves properly - don't get fooled by
|
||||
* windows which hide their titlebar when maximized; that's
|
||||
* not the same as fullscreen, even if there are no struts
|
||||
* making the workarea smaller than the monitor.
|
||||
*/
|
||||
if (meta_prefs_get_force_fullscreen() &&
|
||||
!window->hide_titlebar_when_maximized &&
|
||||
meta_rectangle_equal (new, &monitor_info->rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen)
|
||||
|
@ -230,8 +230,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
display_signals[WINDOW_CREATED] =
|
||||
@ -239,8 +238,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||
|
||||
display_signals[WINDOW_DEMANDS_ATTENTION] =
|
||||
@ -248,8 +246,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||
|
||||
display_signals[WINDOW_MARKED_URGENT] =
|
||||
@ -257,8 +254,7 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
|
||||
@ -5029,12 +5025,21 @@ meta_display_unmanage_windows_for_screen (MetaDisplay *display,
|
||||
winlist = meta_display_list_windows (display,
|
||||
META_LIST_INCLUDE_OVERRIDE_REDIRECT);
|
||||
winlist = g_slist_sort (winlist, meta_display_stack_cmp);
|
||||
g_slist_foreach (winlist, (GFunc)g_object_ref, NULL);
|
||||
|
||||
/* Unmanage all windows */
|
||||
tmp = winlist;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
meta_window_unmanage (tmp->data, timestamp);
|
||||
MetaWindow *window = tmp->data;
|
||||
|
||||
/* Check if already unmanaged for safety - in particular, catch
|
||||
* the case where unmanaging a parent window can cause attached
|
||||
* dialogs to be (temporarily) unmanaged.
|
||||
*/
|
||||
if (!window->unmanaging)
|
||||
meta_window_unmanage (window, timestamp);
|
||||
g_object_unref (window);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
@ -3232,6 +3232,46 @@ handle_toggle_above (MetaDisplay *display,
|
||||
meta_window_make_above (window);
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_tiled (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
MetaWindow *window,
|
||||
XEvent *event,
|
||||
MetaKeyBinding *binding,
|
||||
gpointer dummy)
|
||||
{
|
||||
MetaTileMode mode = binding->handler->data;
|
||||
|
||||
if ((META_WINDOW_TILED_LEFT (window) && mode == META_TILE_LEFT) ||
|
||||
(META_WINDOW_TILED_RIGHT (window) && mode == META_TILE_RIGHT))
|
||||
{
|
||||
window->tile_monitor_number = window->saved_maximize ? window->monitor->number
|
||||
: -1;
|
||||
window->tile_mode = window->saved_maximize ? META_TILE_MAXIMIZED
|
||||
: META_TILE_NONE;
|
||||
|
||||
if (window->saved_maximize)
|
||||
meta_window_maximize (window, META_MAXIMIZE_VERTICAL |
|
||||
META_MAXIMIZE_HORIZONTAL);
|
||||
else
|
||||
meta_window_unmaximize (window, META_MAXIMIZE_VERTICAL |
|
||||
META_MAXIMIZE_HORIZONTAL);
|
||||
}
|
||||
else if (meta_window_can_tile_side_by_side (window))
|
||||
{
|
||||
window->tile_monitor_number = window->monitor->number;
|
||||
window->tile_mode = mode;
|
||||
/* Maximization constraints beat tiling constraints, so if the window
|
||||
* is maximized, tiling won't have any effect unless we unmaximize it
|
||||
* horizontally first; rather than calling meta_window_unmaximize(),
|
||||
* we just set the flag and rely on meta_window_tile() syncing it to
|
||||
* save an additional roundtrip.
|
||||
*/
|
||||
window->maximized_horizontally = FALSE;
|
||||
meta_window_tile (window);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
handle_toggle_maximized (MetaDisplay *display,
|
||||
MetaScreen *screen,
|
||||
@ -3889,6 +3929,20 @@ init_builtin_key_bindings (MetaDisplay *display)
|
||||
META_KEYBINDING_ACTION_TOGGLE_MAXIMIZED,
|
||||
handle_toggle_maximized, 0);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-tiled-left",
|
||||
SCHEMA_MUTTER_KEYBINDINGS,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_LEFT,
|
||||
handle_toggle_tiled, META_TILE_LEFT);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-tiled-right",
|
||||
SCHEMA_MUTTER_KEYBINDINGS,
|
||||
META_KEY_BINDING_PER_WINDOW,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_RIGHT,
|
||||
handle_toggle_tiled, META_TILE_RIGHT);
|
||||
|
||||
add_builtin_keybinding (display,
|
||||
"toggle-above",
|
||||
SCHEMA_COMMON_KEYBINDINGS,
|
||||
|
@ -25,9 +25,7 @@
|
||||
|
||||
#include <meta/main.h>
|
||||
#include <meta/util.h>
|
||||
#ifdef HAVE_INTROSPECTION
|
||||
#include "meta-plugin-manager.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
@ -914,6 +914,8 @@ do_override (char *key,
|
||||
detailed_signal = g_strdup_printf ("changed::%s", key);
|
||||
handler_id = g_signal_connect (settings, detailed_signal,
|
||||
G_CALLBACK (settings_changed), NULL);
|
||||
g_free (detailed_signal);
|
||||
|
||||
g_object_set_data (G_OBJECT (settings), key, GUINT_TO_POINTER (handler_id));
|
||||
|
||||
settings_changed (settings, key, NULL);
|
||||
|
@ -39,7 +39,6 @@
|
||||
#include "stack.h"
|
||||
#include "xprops.h"
|
||||
#include <meta/compositor.h>
|
||||
#include "mutter-marshal.h"
|
||||
#include "mutter-enum-types.h"
|
||||
|
||||
#ifdef HAVE_SOLARIS_XINERAMA
|
||||
@ -162,8 +161,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, restacked),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
pspec = g_param_spec_int ("n-workspaces",
|
||||
@ -177,8 +175,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
G_TYPE_INT);
|
||||
@ -188,8 +185,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
G_TYPE_INT);
|
||||
@ -199,8 +195,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_INT_ENUM,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
3,
|
||||
G_TYPE_INT,
|
||||
@ -212,8 +207,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
META_TYPE_WINDOW);
|
||||
@ -223,8 +217,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
META_TYPE_WINDOW);
|
||||
@ -234,8 +227,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||
|
||||
screen_signals[TOGGLE_RECORDING] =
|
||||
@ -243,8 +235,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
screen_signals[WORKAREAS_CHANGED] =
|
||||
@ -252,8 +243,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
screen_signals[MONITORS_CHANGED] =
|
||||
@ -261,8 +251,7 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
@ -1565,7 +1554,7 @@ static void
|
||||
update_num_workspaces (MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
int new_num;
|
||||
int new_num, old_num;
|
||||
GList *tmp;
|
||||
int i;
|
||||
GList *extras;
|
||||
@ -1595,6 +1584,7 @@ update_num_workspaces (MetaScreen *screen,
|
||||
++i;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
old_num = i;
|
||||
|
||||
g_assert (last_remaining);
|
||||
|
||||
@ -1629,22 +1619,22 @@ update_num_workspaces (MetaScreen *screen,
|
||||
|
||||
g_assert (w->windows == NULL);
|
||||
meta_workspace_remove (w);
|
||||
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
|
||||
g_list_free (extras);
|
||||
|
||||
while (i < new_num)
|
||||
{
|
||||
meta_workspace_new (screen);
|
||||
++i;
|
||||
}
|
||||
|
||||
for (i = old_num; i < new_num; i++)
|
||||
meta_workspace_new (screen);
|
||||
|
||||
set_number_of_spaces_hint (screen, new_num);
|
||||
|
||||
meta_screen_queue_workarea_recalc (screen);
|
||||
|
||||
for (i = old_num; i < new_num; i++)
|
||||
g_signal_emit (screen, screen_signals[WORKSPACE_ADDED], 0, i);
|
||||
|
||||
g_object_notify (G_OBJECT (screen), "n-workspaces");
|
||||
}
|
||||
|
||||
@ -1935,7 +1925,6 @@ meta_screen_tile_preview_update_timeout (gpointer data)
|
||||
{
|
||||
MetaScreen *screen = data;
|
||||
MetaWindow *window = screen->display->grab_window;
|
||||
gboolean composited = screen->display->compositor != NULL;
|
||||
gboolean needs_preview = FALSE;
|
||||
|
||||
screen->tile_preview_timeout_id = 0;
|
||||
@ -1945,8 +1934,7 @@ meta_screen_tile_preview_update_timeout (gpointer data)
|
||||
Window xwindow;
|
||||
gulong create_serial;
|
||||
|
||||
screen->tile_preview = meta_tile_preview_new (screen->number,
|
||||
composited);
|
||||
screen->tile_preview = meta_tile_preview_new (screen->number);
|
||||
xwindow = meta_tile_preview_get_xwindow (screen->tile_preview,
|
||||
&create_serial);
|
||||
meta_stack_tracker_record_add (screen->stack_tracker,
|
||||
|
@ -97,10 +97,18 @@ struct _MetaWindow
|
||||
char *role;
|
||||
char *sm_client_id;
|
||||
char *wm_client_machine;
|
||||
|
||||
char *startup_id;
|
||||
char *mutter_hints;
|
||||
char *gtk_theme_variant;
|
||||
char *gtk_application_id;
|
||||
char *gtk_unique_bus_name;
|
||||
char *gtk_application_object_path;
|
||||
char *gtk_window_object_path;
|
||||
char *gtk_app_menu_object_path;
|
||||
char *gtk_menubar_object_path;
|
||||
|
||||
int hide_titlebar_when_maximized;
|
||||
int net_wm_pid;
|
||||
|
||||
Window xtransient_for;
|
||||
@ -129,6 +137,9 @@ struct _MetaWindow
|
||||
* this is the current mode. If not, it is the mode which will be
|
||||
* requested after the window grab is released */
|
||||
guint tile_mode : 2;
|
||||
/* The last "full" maximized/unmaximized state. We need to keep track of
|
||||
* that to toggle between normal/tiled or maximized/tiled states. */
|
||||
guint saved_maximize : 1;
|
||||
int tile_monitor_number;
|
||||
|
||||
/* Whether we're shaded */
|
||||
@ -650,5 +661,6 @@ void meta_window_propagate_focus_appearance (MetaWindow *window,
|
||||
gboolean focused);
|
||||
|
||||
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
|
||||
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
@ -1578,20 +1578,70 @@ reload_gtk_theme_variant (MetaWindow *window,
|
||||
requested_variant, window->desc);
|
||||
}
|
||||
|
||||
if (g_strcmp0 (requested_variant, current_variant))
|
||||
if (g_strcmp0 (requested_variant, current_variant) != 0)
|
||||
{
|
||||
g_free (current_variant);
|
||||
|
||||
if (requested_variant)
|
||||
window->gtk_theme_variant = g_strdup (requested_variant);
|
||||
else
|
||||
window->gtk_theme_variant = NULL;
|
||||
window->gtk_theme_variant = g_strdup (requested_variant);
|
||||
|
||||
if (window->frame)
|
||||
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
gboolean requested_value = FALSE;
|
||||
gboolean current_value = window->hide_titlebar_when_maximized;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
{
|
||||
requested_value = ((int) value->v.cardinal == 1);
|
||||
meta_verbose ("Request to hide titlebar for window %s.\n", window->desc);
|
||||
}
|
||||
|
||||
if (requested_value == current_value)
|
||||
return;
|
||||
|
||||
window->hide_titlebar_when_maximized = requested_value;
|
||||
|
||||
if (META_WINDOW_MAXIMIZED (window))
|
||||
{
|
||||
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
|
||||
|
||||
if (window->frame)
|
||||
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
|
||||
}
|
||||
}
|
||||
|
||||
#define RELOAD_STRING(var_name, propname) \
|
||||
static void \
|
||||
reload_ ## var_name (MetaWindow *window, \
|
||||
MetaPropValue *value, \
|
||||
gboolean initial) \
|
||||
{ \
|
||||
g_free (window->var_name); \
|
||||
\
|
||||
if (value->type != META_PROP_VALUE_INVALID) \
|
||||
window->var_name = g_strdup (value->v.str); \
|
||||
else \
|
||||
window->var_name = NULL; \
|
||||
\
|
||||
g_object_notify (G_OBJECT (window), propname); \
|
||||
}
|
||||
|
||||
RELOAD_STRING (gtk_unique_bus_name, "gtk-unique-bus-name")
|
||||
RELOAD_STRING (gtk_application_id, "gtk-application-id")
|
||||
RELOAD_STRING (gtk_application_object_path, "gtk-application-object-path")
|
||||
RELOAD_STRING (gtk_window_object_path, "gtk-window-object-path")
|
||||
RELOAD_STRING (gtk_app_menu_object_path, "gtk-app-menu-object-path")
|
||||
RELOAD_STRING (gtk_menubar_object_path, "gtk-menubar-object-path")
|
||||
|
||||
#undef RELOAD_STRING
|
||||
|
||||
/**
|
||||
* Initialises the property hooks system. Each row in the table named "hooks"
|
||||
* represents an action to take when a property is found on a newly-created
|
||||
@ -1645,6 +1695,13 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
|
||||
{ display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, TRUE, FALSE },
|
||||
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, TRUE, FALSE },
|
||||
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, TRUE, FALSE },
|
||||
{ display->atom__GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, META_PROP_VALUE_CARDINAL, reload_gtk_hide_titlebar_when_maximized, TRUE, FALSE },
|
||||
{ display->atom__GTK_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_gtk_application_id, TRUE, FALSE },
|
||||
{ display->atom__GTK_UNIQUE_BUS_NAME, META_PROP_VALUE_UTF8, reload_gtk_unique_bus_name, TRUE, FALSE },
|
||||
{ display->atom__GTK_APPLICATION_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_application_object_path, TRUE, FALSE },
|
||||
{ display->atom__GTK_WINDOW_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_window_object_path, TRUE, FALSE },
|
||||
{ display->atom__GTK_APP_MENU_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_app_menu_object_path, TRUE, FALSE },
|
||||
{ display->atom__GTK_MENUBAR_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_gtk_menubar_object_path, TRUE, FALSE },
|
||||
{ display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window, TRUE, FALSE },
|
||||
{ display->atom_WM_STATE, META_PROP_VALUE_INVALID, NULL, FALSE, FALSE },
|
||||
{ display->atom__NET_WM_ICON, META_PROP_VALUE_INVALID, reload_net_wm_icon, FALSE, FALSE },
|
||||
|
@ -164,7 +164,13 @@ enum {
|
||||
PROP_APPEARS_FOCUSED,
|
||||
PROP_RESIZEABLE,
|
||||
PROP_ABOVE,
|
||||
PROP_WM_CLASS
|
||||
PROP_WM_CLASS,
|
||||
PROP_GTK_APPLICATION_ID,
|
||||
PROP_GTK_UNIQUE_BUS_NAME,
|
||||
PROP_GTK_APPLICATION_OBJECT_PATH,
|
||||
PROP_GTK_WINDOW_OBJECT_PATH,
|
||||
PROP_GTK_APP_MENU_OBJECT_PATH,
|
||||
PROP_GTK_MENUBAR_OBJECT_PATH
|
||||
};
|
||||
|
||||
enum
|
||||
@ -221,6 +227,12 @@ meta_window_finalize (GObject *object)
|
||||
g_free (window->icon_name);
|
||||
g_free (window->desc);
|
||||
g_free (window->gtk_theme_variant);
|
||||
g_free (window->gtk_application_id);
|
||||
g_free (window->gtk_unique_bus_name);
|
||||
g_free (window->gtk_application_object_path);
|
||||
g_free (window->gtk_window_object_path);
|
||||
g_free (window->gtk_app_menu_object_path);
|
||||
g_free (window->gtk_menubar_object_path);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -284,6 +296,24 @@ meta_window_get_property(GObject *object,
|
||||
case PROP_ABOVE:
|
||||
g_value_set_boolean (value, win->wm_state_above);
|
||||
break;
|
||||
case PROP_GTK_APPLICATION_ID:
|
||||
g_value_set_string (value, win->gtk_application_id);
|
||||
break;
|
||||
case PROP_GTK_UNIQUE_BUS_NAME:
|
||||
g_value_set_string (value, win->gtk_unique_bus_name);
|
||||
break;
|
||||
case PROP_GTK_APPLICATION_OBJECT_PATH:
|
||||
g_value_set_string (value, win->gtk_application_object_path);
|
||||
break;
|
||||
case PROP_GTK_WINDOW_OBJECT_PATH:
|
||||
g_value_set_string (value, win->gtk_window_object_path);
|
||||
break;
|
||||
case PROP_GTK_APP_MENU_OBJECT_PATH:
|
||||
g_value_set_string (value, win->gtk_app_menu_object_path);
|
||||
break;
|
||||
case PROP_GTK_MENUBAR_OBJECT_PATH:
|
||||
g_value_set_string (value, win->gtk_menubar_object_path);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
@ -450,13 +480,60 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GTK_APPLICATION_ID,
|
||||
g_param_spec_string ("gtk-application-id",
|
||||
"_GTK_APPLICATION_ID",
|
||||
"Contents of the _GTK_APPLICATION_ID property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GTK_UNIQUE_BUS_NAME,
|
||||
g_param_spec_string ("gtk-unique-bus-name",
|
||||
"_GTK_UNIQUE_BUS_NAME",
|
||||
"Contents of the _GTK_UNIQUE_BUS_NAME property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GTK_APPLICATION_OBJECT_PATH,
|
||||
g_param_spec_string ("gtk-application-object-path",
|
||||
"_GTK_APPLICATION_OBJECT_PATH",
|
||||
"Contents of the _GTK_APPLICATION_OBJECT_PATH property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GTK_WINDOW_OBJECT_PATH,
|
||||
g_param_spec_string ("gtk-window-object-path",
|
||||
"_GTK_WINDOW_OBJECT_PATH",
|
||||
"Contents of the _GTK_WINDOW_OBJECT_PATH property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GTK_APP_MENU_OBJECT_PATH,
|
||||
g_param_spec_string ("gtk-app-menu-object-path",
|
||||
"_GTK_APP_MENU_OBJECT_PATH",
|
||||
"Contents of the _GTK_APP_MENU_OBJECT_PATH property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_GTK_MENUBAR_OBJECT_PATH,
|
||||
g_param_spec_string ("gtk-menubar-object-path",
|
||||
"_GTK_MENUBAR_OBJECT_PATH",
|
||||
"Contents of the _GTK_MENUBAR_OBJECT_PATH property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
window_signals[WORKSPACE_CHANGED] =
|
||||
g_signal_new ("workspace-changed",
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, workspace_changed),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_INT);
|
||||
|
||||
@ -465,8 +542,7 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, focus),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[RAISED] =
|
||||
@ -474,8 +550,7 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, raised),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[UNMANAGED] =
|
||||
@ -483,8 +558,7 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, unmanaged),
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
@ -3419,6 +3493,9 @@ meta_window_maximize_internal (MetaWindow *window,
|
||||
else
|
||||
meta_window_save_rect (window);
|
||||
|
||||
if (maximize_horizontally && maximize_vertically)
|
||||
window->saved_maximize = TRUE;
|
||||
|
||||
window->maximized_horizontally =
|
||||
window->maximized_horizontally || maximize_horizontally;
|
||||
window->maximized_vertically =
|
||||
@ -3581,6 +3658,10 @@ meta_window_tile (MetaWindow *window)
|
||||
window,
|
||||
&old_rect,
|
||||
&new_rect);
|
||||
|
||||
if (window->frame)
|
||||
meta_ui_queue_frame_draw (window->screen->ui,
|
||||
window->frame->xwindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3593,16 +3674,10 @@ meta_window_tile (MetaWindow *window)
|
||||
static gboolean
|
||||
meta_window_can_tile_maximized (MetaWindow *window)
|
||||
{
|
||||
if (!META_WINDOW_ALLOWS_RESIZE (window))
|
||||
return FALSE;
|
||||
|
||||
if (!window->has_maximize_func)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return window->has_maximize_func;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gboolean
|
||||
meta_window_can_tile_side_by_side (MetaWindow *window)
|
||||
{
|
||||
const MetaMonitorInfo *monitor;
|
||||
@ -3681,6 +3756,9 @@ meta_window_unmaximize_internal (MetaWindow *window,
|
||||
unmaximize_vertically = directions & META_MAXIMIZE_VERTICAL;
|
||||
g_assert (unmaximize_horizontally || unmaximize_vertically);
|
||||
|
||||
if (unmaximize_horizontally && unmaximize_vertically)
|
||||
window->saved_maximize = FALSE;
|
||||
|
||||
/* Only do something if the window isn't already maximized in the
|
||||
* given direction(s).
|
||||
*/
|
||||
@ -10211,6 +10289,78 @@ meta_window_get_wm_class_instance (MetaWindow *window)
|
||||
return window->res_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_application_id:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the application ID
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_application_id (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_application_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_unique_bus_name:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the unique name
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_unique_bus_name (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_unique_bus_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_application_object_path:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the object path
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_application_object_path (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_application_object_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_window_object_path:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the object path
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_window_object_path (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_window_object_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_app_menu_object_path:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the object path
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_app_menu_object_path (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_app_menu_object_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_menubar_object_path:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the object path
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_menubar_object_path (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_menubar_object_path;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_compositor_private:
|
||||
* @window: a #MetaWindow
|
||||
@ -10464,7 +10614,8 @@ meta_window_get_frame_type (MetaWindow *window)
|
||||
/* can't add border if undecorated */
|
||||
return META_FRAME_TYPE_LAST;
|
||||
}
|
||||
else if (window->border_only && base_type != META_FRAME_TYPE_ATTACHED)
|
||||
else if ((window->border_only && base_type != META_FRAME_TYPE_ATTACHED) ||
|
||||
(window->hide_titlebar_when_maximized && META_WINDOW_MAXIMIZED (window)))
|
||||
{
|
||||
/* override base frame type */
|
||||
return META_FRAME_TYPE_BORDER;
|
||||
|
@ -121,16 +121,14 @@ meta_workspace_class_init (MetaWorkspaceClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
signals[WINDOW_REMOVED] = g_signal_new ("window-removed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
|
||||
|
@ -59,6 +59,13 @@ item(_MUTTER_SET_KEYBINDINGS_MESSAGE)
|
||||
item(_MUTTER_TOGGLE_VERBOSE)
|
||||
item(_MUTTER_HINTS)
|
||||
item(_GTK_THEME_VARIANT)
|
||||
item(_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED)
|
||||
item(_GTK_APPLICATION_ID)
|
||||
item(_GTK_UNIQUE_BUS_NAME)
|
||||
item(_GTK_APPLICATION_OBJECT_PATH)
|
||||
item(_GTK_WINDOW_OBJECT_PATH)
|
||||
item(_GTK_APP_MENU_OBJECT_PATH)
|
||||
item(_GTK_MENUBAR_OBJECT_PATH)
|
||||
item(_GNOME_WM_KEYBINDINGS)
|
||||
item(_GNOME_PANEL_ACTION)
|
||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||
|
@ -191,6 +191,8 @@ typedef enum _MetaKeyBindingAction
|
||||
META_KEYBINDING_ACTION_ACTIVATE_WINDOW_MENU,
|
||||
META_KEYBINDING_ACTION_TOGGLE_FULLSCREEN,
|
||||
META_KEYBINDING_ACTION_TOGGLE_MAXIMIZED,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_LEFT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_TILED_RIGHT,
|
||||
META_KEYBINDING_ACTION_TOGGLE_ABOVE,
|
||||
META_KEYBINDING_ACTION_MAXIMIZE,
|
||||
META_KEYBINDING_ACTION_UNMAXIMIZE,
|
||||
|
@ -95,6 +95,13 @@ const char * meta_window_get_wm_class (MetaWindow *window);
|
||||
const char * meta_window_get_wm_class_instance (MetaWindow *window);
|
||||
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
|
||||
|
||||
const char * meta_window_get_gtk_application_id (MetaWindow *window);
|
||||
const char * meta_window_get_gtk_unique_bus_name (MetaWindow *window);
|
||||
const char * meta_window_get_gtk_application_object_path (MetaWindow *window);
|
||||
const char * meta_window_get_gtk_window_object_path (MetaWindow *window);
|
||||
const char * meta_window_get_gtk_app_menu_object_path (MetaWindow *window);
|
||||
const char * meta_window_get_gtk_menubar_object_path (MetaWindow *window);
|
||||
|
||||
void meta_window_move(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
|
||||
void meta_window_move_frame(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
|
||||
void meta_window_move_resize_frame (MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw, int w, int h);
|
||||
|
@ -1,2 +0,0 @@
|
||||
VOID:INT,INT,ENUM
|
||||
VOID:INT,OBJECT
|
@ -83,6 +83,14 @@
|
||||
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
|
||||
</key>
|
||||
|
||||
<key name="toggle-tiled-left" type="as">
|
||||
<default><![CDATA[['<Super>Left']]]></default>
|
||||
</key>
|
||||
|
||||
<key name="toggle-tiled-right" type="as">
|
||||
<default><![CDATA[['<Super>Right']]]></default>
|
||||
</key>
|
||||
|
||||
<key name="tab-popup-select" type="as">
|
||||
<default>[]</default>
|
||||
<_summary>Select window from tab popup</_summary>
|
||||
|
@ -6403,8 +6403,8 @@ meta_gtk_state_from_string (const char *str)
|
||||
return GTK_STATE_FLAG_INCONSISTENT;
|
||||
else if (g_ascii_strcasecmp ("focused", str) == 0)
|
||||
return GTK_STATE_FLAG_FOCUSED;
|
||||
else if (g_ascii_strcasecmp ("window-unfocused", str) == 0)
|
||||
return GTK_STATE_FLAG_WINDOW_UNFOCUSED;
|
||||
else if (g_ascii_strcasecmp ("backdrop", str) == 0)
|
||||
return GTK_STATE_FLAG_BACKDROP;
|
||||
else
|
||||
return -1; /* hack */
|
||||
}
|
||||
@ -6428,8 +6428,8 @@ meta_gtk_state_to_string (GtkStateFlags state)
|
||||
return "INCONSISTENT";
|
||||
case GTK_STATE_FLAG_FOCUSED:
|
||||
return "FOCUSED";
|
||||
case GTK_STATE_FLAG_WINDOW_UNFOCUSED:
|
||||
return "WINDOW_UNFOCUSED";
|
||||
case GTK_STATE_FLAG_BACKDROP:
|
||||
return "BACKDROP";
|
||||
}
|
||||
|
||||
return "<unknown>";
|
||||
|
@ -39,8 +39,6 @@ struct _MetaTilePreview {
|
||||
GdkRGBA *preview_color;
|
||||
|
||||
MetaRectangle tile_rect;
|
||||
|
||||
gboolean has_alpha: 1;
|
||||
};
|
||||
|
||||
static gboolean
|
||||
@ -52,30 +50,17 @@ meta_tile_preview_draw (GtkWidget *widget,
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
||||
if (preview->has_alpha)
|
||||
{
|
||||
/* Fill the preview area with a transparent color */
|
||||
gdk_cairo_set_source_rgba (cr, preview->preview_color);
|
||||
/* Fill the preview area with a transparent color */
|
||||
gdk_cairo_set_source_rgba (cr, preview->preview_color);
|
||||
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_paint (cr);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
|
||||
cairo_paint (cr);
|
||||
|
||||
/* Use the opaque color for the border */
|
||||
cairo_set_source_rgb (cr,
|
||||
preview->preview_color->red,
|
||||
preview->preview_color->green,
|
||||
preview->preview_color->blue);
|
||||
}
|
||||
else
|
||||
{
|
||||
cairo_set_source_rgb (cr, 1.0, 1.0, 1.0);
|
||||
|
||||
cairo_rectangle (cr,
|
||||
OUTLINE_WIDTH - 0.5, OUTLINE_WIDTH - 0.5,
|
||||
preview->tile_rect.width - 2 * (OUTLINE_WIDTH - 1) - 1,
|
||||
preview->tile_rect.height - 2 * (OUTLINE_WIDTH - 1) - 1);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
/* Use the opaque color for the border */
|
||||
cairo_set_source_rgb (cr,
|
||||
preview->preview_color->red,
|
||||
preview->preview_color->green,
|
||||
preview->preview_color->blue);
|
||||
|
||||
cairo_rectangle (cr,
|
||||
0.5, 0.5,
|
||||
@ -87,11 +72,13 @@ meta_tile_preview_draw (GtkWidget *widget,
|
||||
}
|
||||
|
||||
MetaTilePreview *
|
||||
meta_tile_preview_new (int screen_number,
|
||||
gboolean composited)
|
||||
meta_tile_preview_new (int screen_number)
|
||||
{
|
||||
MetaTilePreview *preview;
|
||||
GdkScreen *screen;
|
||||
GtkStyleContext *context;
|
||||
GtkWidgetPath *path;
|
||||
guchar selection_alpha = 0xFF;
|
||||
|
||||
screen = gdk_display_get_screen (gdk_display_get_default (), screen_number);
|
||||
|
||||
@ -107,44 +94,34 @@ meta_tile_preview_new (int screen_number,
|
||||
preview->tile_rect.x = preview->tile_rect.y = 0;
|
||||
preview->tile_rect.width = preview->tile_rect.height = 0;
|
||||
|
||||
preview->has_alpha = composited &&
|
||||
(gdk_screen_get_rgba_visual (screen) != NULL);
|
||||
gtk_widget_set_visual (preview->preview_window,
|
||||
gdk_screen_get_rgba_visual (screen));
|
||||
|
||||
if (preview->has_alpha)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkWidgetPath *path;
|
||||
guchar selection_alpha = 0xFF;
|
||||
path = gtk_widget_path_new ();
|
||||
gtk_widget_path_append_type (path, GTK_TYPE_ICON_VIEW);
|
||||
|
||||
gtk_widget_set_visual (preview->preview_window,
|
||||
gdk_screen_get_rgba_visual (screen));
|
||||
context = gtk_style_context_new ();
|
||||
gtk_style_context_set_path (context, path);
|
||||
gtk_style_context_add_class (context,
|
||||
GTK_STYLE_CLASS_RUBBERBAND);
|
||||
|
||||
path = gtk_widget_path_new ();
|
||||
gtk_widget_path_append_type (path, GTK_TYPE_ICON_VIEW);
|
||||
gtk_widget_path_free (path);
|
||||
|
||||
context = gtk_style_context_new ();
|
||||
gtk_style_context_set_path (context, path);
|
||||
gtk_style_context_add_class (context,
|
||||
GTK_STYLE_CLASS_RUBBERBAND);
|
||||
gtk_style_context_get (context, GTK_STATE_FLAG_SELECTED,
|
||||
"background-color", &preview->preview_color,
|
||||
NULL);
|
||||
|
||||
gtk_widget_path_free (path);
|
||||
/* The background-color for the .rubberband class should probably
|
||||
* contain the correct alpha value - unfortunately, at least for now
|
||||
* it doesn't. Hopefully the following workaround can be removed
|
||||
* when GtkIconView gets ported to GtkStyleContext.
|
||||
*/
|
||||
gtk_style_context_get_style (context,
|
||||
"selection-box-alpha", &selection_alpha,
|
||||
NULL);
|
||||
preview->preview_color->alpha = (double)selection_alpha / 0xFF;
|
||||
|
||||
gtk_style_context_get (context, GTK_STATE_FLAG_SELECTED,
|
||||
"background-color", &preview->preview_color,
|
||||
NULL);
|
||||
|
||||
/* The background-color for the .rubberband class should probably
|
||||
* contain the correct alpha value - unfortunately, at least for now
|
||||
* it doesn't. Hopefully the following workaround can be removed
|
||||
* when GtkIconView gets ported to GtkStyleContext.
|
||||
*/
|
||||
gtk_style_context_get_style (context,
|
||||
"selection-box-alpha", &selection_alpha,
|
||||
NULL);
|
||||
preview->preview_color->alpha = (double)selection_alpha / 0xFF;
|
||||
|
||||
g_object_unref (context);
|
||||
}
|
||||
g_object_unref (context);
|
||||
|
||||
/* We make an assumption that XCreateWindow will be the first operation
|
||||
* when calling gtk_widget_realize() (via gdk_window_new()), or that it
|
||||
@ -200,33 +177,6 @@ meta_tile_preview_show (MetaTilePreview *preview,
|
||||
gdk_window_move_resize (window,
|
||||
preview->tile_rect.x, preview->tile_rect.y,
|
||||
preview->tile_rect.width, preview->tile_rect.height);
|
||||
|
||||
if (!preview->has_alpha)
|
||||
{
|
||||
cairo_region_t *outer_region, *inner_region;
|
||||
GdkRectangle outer_rect, inner_rect;
|
||||
GdkRGBA black = { 0.0, 0.0, 0.0, 1.0 };
|
||||
|
||||
gdk_window_set_background_rgba (window, &black);
|
||||
|
||||
outer_rect.x = outer_rect.y = 0;
|
||||
outer_rect.width = preview->tile_rect.width;
|
||||
outer_rect.height = preview->tile_rect.height;
|
||||
|
||||
inner_rect.x = OUTLINE_WIDTH;
|
||||
inner_rect.y = OUTLINE_WIDTH;
|
||||
inner_rect.width = outer_rect.width - 2 * OUTLINE_WIDTH;
|
||||
inner_rect.height = outer_rect.height - 2 * OUTLINE_WIDTH;
|
||||
|
||||
outer_region = cairo_region_create_rectangle (&outer_rect);
|
||||
inner_region = cairo_region_create_rectangle (&inner_rect);
|
||||
|
||||
cairo_region_subtract (outer_region, inner_region);
|
||||
cairo_region_destroy (inner_region);
|
||||
|
||||
gdk_window_shape_combine_region (window, outer_region, 0, 0);
|
||||
cairo_region_destroy (outer_region);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -27,8 +27,7 @@
|
||||
|
||||
typedef struct _MetaTilePreview MetaTilePreview;
|
||||
|
||||
MetaTilePreview *meta_tile_preview_new (int screen_number,
|
||||
gboolean composited);
|
||||
MetaTilePreview *meta_tile_preview_new (int screen_number);
|
||||
void meta_tile_preview_free (MetaTilePreview *preview);
|
||||
void meta_tile_preview_show (MetaTilePreview *preview,
|
||||
MetaRectangle *rect);
|
||||
|
Reference in New Issue
Block a user