Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
393a80d434 | ||
![]() |
a2f95e115c |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,7 +19,6 @@ libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
.deps
|
||||
src/50-mutter-windows.xml
|
||||
src/mutter-wm.desktop
|
||||
src/mutter.desktop
|
||||
*.o
|
||||
|
111
NEWS
111
NEWS
@@ -1,114 +1,3 @@
|
||||
3.4.0
|
||||
=====
|
||||
* Fix crash when a full-screen window is opened [Jasper; #672797]
|
||||
* Fix memory leaks [Pavel; #672640]
|
||||
|
||||
Contributors:
|
||||
Jasper St. Pierre, Pavel Vasin
|
||||
|
||||
Translations:
|
||||
Marek Černocký, Petr Kovar [cz], Bruno Brouard [fr], Sweta Kothari [gu],
|
||||
Yaron Shahrabani [he], Changwoo Ryu [kr], Enrico Nicoletto [pt_BR],
|
||||
Yuri Myasoedov [ru], Muhammet Kara [tr], Nguyễn Thái Ngọc Duy [vi]
|
||||
|
||||
3.3.92
|
||||
======
|
||||
* Automaximize large windows on map [Adel; #671677]
|
||||
* When unmaximizing windows, make sure the unminimized size
|
||||
is signficantly less than the maximized size [Adel; #671677]
|
||||
* Don't offer maximize option for windows larger than the screen
|
||||
[Jasper; #643606]
|
||||
* Always focus the window immediately underneath without restacking
|
||||
when closing a window [Jasper; #620744]
|
||||
* Avoid drawing shadows when two windows are tiled together [Rui; #643075]
|
||||
* Remove tooltips for window decorations [Florian; #645101]
|
||||
* Add org.gnome.mutter.dynamic-workspaces GSetting - when this is set
|
||||
to true, workspace counts are never saved to GSettings, avoiding
|
||||
pointless disk traffic for GNOME dynamic workspaces [Florian; #671568]
|
||||
* Add ::grab-op-begin, ::grab-op-end signals to MetaDisplay [Jasper; #670658]
|
||||
* Add meta_display_get_ignored_modifier_mask() [Florian; #665215]
|
||||
* Remove pointless wrapper methods on MetaPlugin [Jasper; #671103]
|
||||
* Fix frame drawing with 3.3.x GTK+ releases [Florian; #671796]
|
||||
* Build fixes [Jasper, Rico, Rui]
|
||||
* Misc bug fixes [Damien, Jasper, Lionel, Marius, Owen, Rui;
|
||||
#661256, #667437, #671601, #671087, #672374]
|
||||
|
||||
Contributors:
|
||||
Stefano Facchini, Adel Gadllah, Lionel Landwerlin, Mariusz Libera,
|
||||
Rui Matos, Florian Müllner, Jasper St. Pierre, Damien Radtke, Owen Taylor,
|
||||
Rico Tzschichholz
|
||||
|
||||
Translations:
|
||||
Nilamdyuti Goswami [as], Ihar Hrachyshka [be], Alexander Shopov [bg],
|
||||
David Planella [ca], Carles Ferrando [ca@valencia], Kenneth Nielsen [dk],
|
||||
Bruce Cowan [en_GB], Daniel Mustieles [es], Mattias Põldaru [et],
|
||||
Inaki Larranaga Murgoitio [eu], Timo Jyrinki [fi], Fran Diéguez [gl],
|
||||
Gabor Kelemen [hu], Changwoo Ryu [ko], Anita Reitere [lv],
|
||||
Kjartan Maraas [nb], Wouter Bolsterlee [nl], A S Alam [pa], Piotr Drąg [pl],
|
||||
Duarte Loreto [pt], Yuri Myasoedov [ru], Daniel Nylander [se],
|
||||
Matej Urbančič [sl], Miroslav Nikolić [sr], Tirumurti Vasudevan [ta],
|
||||
Sasi Bhushan [te], Daniel Korostil [uk], Nguyễn Thái Ngọc Duy [vi],
|
||||
YunQiang Su [zh_CN], Chao-Hsiung Liao [zh_HK, zh_TW]
|
||||
|
||||
3.3.90
|
||||
======
|
||||
* Update for Cogl API changes [Robert]
|
||||
* Bug fixes [Adel, Jasper; #659643]
|
||||
* Build fixes [Jasper, Owen]
|
||||
|
||||
Contributors:
|
||||
Robert Bragg, Adel Gadllah, Jasper St. Pierre, Owen Taylor
|
||||
|
||||
Translations:
|
||||
Ask H. Larsen [dk], Miroslav Nikolić [sr]
|
||||
|
||||
3.3.5
|
||||
=====
|
||||
* MetaShapedTexture no longer is a ClutterTexture subclass [Jasper; #660941]
|
||||
* Add meta_shaped_texture_get_image() [Jasper; #660941]
|
||||
* Cleanups [Rui, Jasper; #657639]
|
||||
* Depend on GTK+ 3.3.7 [Rico]
|
||||
|
||||
Contributors:
|
||||
Rui Matos, Jasper St. Pierre, Rico Tzschichholz
|
||||
|
||||
Translations:
|
||||
Kjartan Maraas [nb], Chao-Hsiung Liao [zh_HK, zh_TW]
|
||||
|
||||
3.3.4
|
||||
=====
|
||||
* Adapt to changes in GtkStateFlags [Owen]
|
||||
* Redo properties for applications menu corresponding to GTK+ changes -
|
||||
they are now _GTK_* not DBUS_*. [Ryan]
|
||||
* Fix crash on gnome-shell restart when a modal dialog is open [Owen; #668299]
|
||||
* Code cleanup [Florian; #666039]
|
||||
|
||||
Contributors:
|
||||
Ryan Lortie, Florian Müllner, Owen Taylor
|
||||
|
||||
Translations:
|
||||
Alexander Shopov [bg], Fran Diéguez [gl]
|
||||
|
||||
3.3.3
|
||||
=====
|
||||
* Add keybindings for tiling to left or right [Florian; #648700]
|
||||
* Support GTK+'s hide-titlebar-when-maximized hint [Florian; #665617]
|
||||
* Load _DBUS_APPLICATION_ID, _DBUS_UNIQUE_NAME, _DBUS_OBJECT_PATH
|
||||
property [Colin, Ryan; #664851]
|
||||
* Handle changes to workspaces-only-on-primary GSetting [Florian; #664853]
|
||||
* Don't use the Clutter default stage [Jasper; #664028]
|
||||
* Fix compilation with --disable-introspection [Lionel; #661871]
|
||||
* Fix problem where stage could end up mis-sized on startup with
|
||||
multiple monitors [Lionel]
|
||||
* Misc bug fixes [Adel, Lionel, Jasper; #666015]
|
||||
|
||||
Contributors:
|
||||
Adel Gadllah, Lionel Landwerlin, Florian Müllner, Jasper St. Pierre
|
||||
|
||||
Translations:
|
||||
Daniel Mustieles [es], Yaron Shahrabani [he], Kjartan Maraas [nb],
|
||||
Matej Urbančič [sk], Muhammet Kara [tr]
|
||||
|
||||
3.3.2
|
||||
=====
|
||||
|
||||
|
58
configure.in
58
configure.in
@@ -1,8 +1,8 @@
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
m4_define([mutter_major_version], [3])
|
||||
m4_define([mutter_minor_version], [4])
|
||||
m4_define([mutter_micro_version], [0])
|
||||
m4_define([mutter_minor_version], [3])
|
||||
m4_define([mutter_micro_version], [2])
|
||||
|
||||
m4_define([mutter_version],
|
||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||
@@ -61,21 +61,12 @@ AC_CHECK_SIZEOF(__int64)
|
||||
## byte order
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
GTK_MIN_VERSION=3.3.3
|
||||
GIO_MIN_VERSION=2.25.10
|
||||
CANBERRA_GTK=libcanberra-gtk3
|
||||
CANBERRA_GTK_VERSION=0.26
|
||||
|
||||
CLUTTER_PACKAGE=clutter-1.0
|
||||
|
||||
MUTTER_PC_MODULES="
|
||||
gtk+-3.0 >= 3.3.7
|
||||
gio-2.0 >= 2.25.10
|
||||
pango >= 1.2.0
|
||||
cairo >= 1.10.0
|
||||
gsettings-desktop-schemas >= 3.3.0
|
||||
xcomposite >= 0.2 xfixes xrender xdamage
|
||||
$CLUTTER_PACKAGE >= 1.9.10
|
||||
cogl-1.0 >= 1.9.6
|
||||
"
|
||||
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION gio-2.0 >= $GIO_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0 gsettings-desktop-schemas >= 3.3.0"
|
||||
|
||||
GLIB_GSETTINGS
|
||||
|
||||
@@ -122,8 +113,8 @@ AM_GLIB_GNU_GETTEXT
|
||||
# GRegex requires Glib-2.14.0
|
||||
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
||||
# gtk_window_set_icon_name requires gtk2+-2.6.0
|
||||
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0)
|
||||
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0)
|
||||
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0 >= $GTK_MIN_VERSION)
|
||||
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0 >= $GTK_MIN_VERSION)
|
||||
|
||||
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
||||
@@ -173,6 +164,31 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
XCOMPOSITE_VERSION=0.2
|
||||
|
||||
AC_MSG_CHECKING([Xcomposite >= $XCOMPOSITE_VERSION])
|
||||
if $PKG_CONFIG --atleast-version $XCOMPOSITE_VERSION xcomposite; then
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES xcomposite >= $XCOMPOSITE_VERSION xfixes xrender xdamage"
|
||||
AC_DEFINE(HAVE_COMPOSITE_EXTENSIONS, 1, [Building with compositing manager support])
|
||||
echo "Building with compositing manager"
|
||||
|
||||
## force on render also
|
||||
have_xrender=yes
|
||||
else
|
||||
AC_MSG_ERROR([no. Mutter requires the Xcomposite extension to build.])
|
||||
fi
|
||||
|
||||
CLUTTER_VERSION=1.7.5
|
||||
CLUTTER_PACKAGE=clutter-1.0
|
||||
AC_SUBST(CLUTTER_PACKAGE)
|
||||
if $PKG_CONFIG --atleast-version $CLUTTER_VERSION $CLUTTER_PACKAGE ; then
|
||||
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CLUTTER_PACKAGE "
|
||||
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_PACKAGE)
|
||||
AC_DEFINE(WITH_CLUTTER, , [Building with Clutter compositor])
|
||||
else
|
||||
AC_MSG_ERROR([no. Mutter requires Clutter version $CLUTTER_VERSION.])
|
||||
fi
|
||||
|
||||
INTROSPECTION_VERSION=0.9.5
|
||||
GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
|
||||
|
||||
@@ -204,10 +220,6 @@ fi
|
||||
|
||||
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
|
||||
|
||||
# This is used for plugins
|
||||
AC_SUBST(CLUTTER_PACKAGE)
|
||||
PKG_CHECK_MODULES(CLUTTER, $CLUTTER_PACKAGE)
|
||||
|
||||
AC_PATH_XTRA
|
||||
|
||||
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||
@@ -458,7 +470,7 @@ if test "$enable_compile_warnings" != no ; then
|
||||
if test "$enable_compile_warnings" = error; then
|
||||
case " $CFLAGS " in
|
||||
*[\ \ ]-Werror[\ \ ]*) ;;
|
||||
*) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
|
||||
*) CFLAGS="$CFLAGS -Werror" ;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
@@ -512,8 +524,8 @@ MUTTER_MINOR_VERSION=mutter_minor_version
|
||||
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
|
||||
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
|
||||
echo "This is the UNSTABLE branch of mutter"
|
||||
echo -n "Use 3.$stable_version.x for stable "
|
||||
echo "(gnome-3-$stable_version branch in git)"
|
||||
echo -n "Use 2.$stable_version.x for stable "
|
||||
echo "(gnome-2-$stable_version branch in git)"
|
||||
else
|
||||
echo "This is the stable branch of mutter"
|
||||
fi
|
||||
|
@@ -31,7 +31,8 @@ workspaces. In these cases, there needs to be a rule consistent with
|
||||
the above about the new window to choose.
|
||||
|
||||
Focus method Behavior
|
||||
click Focus the window on top
|
||||
click Focus the most recently used window (same as the window
|
||||
on top)
|
||||
sloppy Focus the window containing the pointer if there is such
|
||||
a window, otherwise focus the most recently used window.
|
||||
mouse Focus the non-DESKTOP window containing the pointer if
|
||||
|
@@ -1,6 +1,5 @@
|
||||
# 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
|
||||
|
1115
po/ca@valencia.po
1115
po/ca@valencia.po
File diff suppressed because it is too large
Load Diff
1050
po/en_GB.po
1050
po/en_GB.po
File diff suppressed because it is too large
Load Diff
480
po/et.po
480
po/et.po
@@ -7,39 +7,253 @@
|
||||
#
|
||||
# Tõivo Leedjärv <toivo linux ee>, 2004.
|
||||
# Ivar Smolin <okul linux ee>, 2005, 2006, 2009–2011.
|
||||
# Mattias Põldaru <mahfiaz@gmail.com>, 2008–2011, 2012.
|
||||
# Mattias Põldaru <mahfiaz gmail com>, 2008–2011.
|
||||
#
|
||||
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: 2012-03-11 22:19+0000\n"
|
||||
"PO-Revision-Date: 2012-03-12 00:47+0200\n"
|
||||
"Last-Translator: Mattias Põldaru <mahfiaz@gmail.com>\n"
|
||||
"Language-Team: Estonian <>\n"
|
||||
"Language: et\n"
|
||||
"product=mutter&component=general\n"
|
||||
"POT-Creation-Date: 2011-03-07 23:35+0000\n"
|
||||
"PO-Revision-Date: 2011-03-09 06:41+0200\n"
|
||||
"Last-Translator: Ivar Smolin <okul@linux.ee>\n"
|
||||
"Language-Team: Estonian <gnome-et@linux.ee>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n!=1);\n"
|
||||
"Language: et\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
msgid "Windows"
|
||||
msgstr "Aknad"
|
||||
msgid "Switch to workspace 1"
|
||||
msgstr "Lülitumine 1. tööalale"
|
||||
|
||||
msgid "View split on left"
|
||||
msgstr "Vaade poolitatakse vasakult"
|
||||
msgid "Switch to workspace 2"
|
||||
msgstr "Lülitumine 2. tööalale"
|
||||
|
||||
msgid "View split on right"
|
||||
msgstr "Vaade poolitatakse paremalt"
|
||||
msgid "Switch to workspace 3"
|
||||
msgstr "Lülitumine 3. tööalale"
|
||||
|
||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||
#. * we have no way to get it to exit
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Another compositing manager is already running on screen %i on display \"%s"
|
||||
"\"."
|
||||
msgstr "Teine komposiithaldur juba töötab ekraani %i kuval \"%s\"."
|
||||
msgid "Switch to workspace 4"
|
||||
msgstr "Lülitumine 4. tööalale"
|
||||
|
||||
msgid "Switch to workspace 5"
|
||||
msgstr "Lülitumine 5. tööalale"
|
||||
|
||||
msgid "Switch to workspace 6"
|
||||
msgstr "Lülitumine 6. tööalale"
|
||||
|
||||
msgid "Switch to workspace 7"
|
||||
msgstr "Lülitumine 7. tööalale"
|
||||
|
||||
msgid "Switch to workspace 8"
|
||||
msgstr "Lülitumine 8. tööalale"
|
||||
|
||||
msgid "Switch to workspace 9"
|
||||
msgstr "Lülitumine 9. tööalale"
|
||||
|
||||
msgid "Switch to workspace 10"
|
||||
msgstr "Lülitumine 10. tööalale"
|
||||
|
||||
msgid "Switch to workspace 11"
|
||||
msgstr "Lülitumine 11. tööalale"
|
||||
|
||||
msgid "Switch to workspace 12"
|
||||
msgstr "Lülitumine 12. tööalale"
|
||||
|
||||
msgid "Switch to workspace on the left of the current workspace"
|
||||
msgstr "Lülitumine sellest tööalast vasakul olevale tööalale"
|
||||
|
||||
msgid "Switch to workspace on the right of the current workspace"
|
||||
msgstr "Lülitumine sellest tööalast paremal olevale tööalale"
|
||||
|
||||
msgid "Switch to workspace above the current workspace"
|
||||
msgstr "Lülitumine selle tööala kohal olevale tööalale"
|
||||
|
||||
msgid "Switch to workspace below the current workspace"
|
||||
msgstr "Lülitumine selle tööala all olevale tööalale"
|
||||
|
||||
msgid "Move between windows of an application, using a popup window"
|
||||
msgstr "Liigu rakenduse akende vahel, hüpikaknaga"
|
||||
|
||||
msgid "Move backward between windows of an application, using a popup window"
|
||||
msgstr "Liigu rakenduse akende vahel tagasisuunas, hüpikaknaga"
|
||||
|
||||
msgid "Move between windows, using a popup window"
|
||||
msgstr "Liigu akende vahel, hüpikaknaga"
|
||||
|
||||
msgid "Move backward between windows, using a popup window"
|
||||
msgstr "Liigu akende vahel tagasisuunas, hüpikaknaga"
|
||||
|
||||
msgid "Move between panels and the desktop, using a popup window"
|
||||
msgstr "Liigu paneelide ja töölaua vahel, hüpikaknaga"
|
||||
|
||||
msgid "Move backward between panels and the desktop, using a popup window"
|
||||
msgstr "Liigu tagasisuunas paneelide ja töölaua vahel, hüpikaknaga"
|
||||
|
||||
msgid "Move between windows of an application immediately"
|
||||
msgstr "Liigu koheselt rakenduse akende vahel"
|
||||
|
||||
msgid "Move backward between windows of an application immediately"
|
||||
msgstr "Liigu koheselt rakenduse akende vahel tagasisuunas"
|
||||
|
||||
msgid "Move between windows immediately"
|
||||
msgstr "Liigu koheselt akende vahel"
|
||||
|
||||
msgid "Move backward between windows immediately"
|
||||
msgstr "Liigu koheselt akende vahel tagasisuunas"
|
||||
|
||||
msgid "Move between panels and the desktop immediately"
|
||||
msgstr "Liigu koheselt paneeli ja töölaua vahel"
|
||||
|
||||
msgid "Move backward between panels and the desktop immediately"
|
||||
msgstr "Liigu koheselt tagasisuunas paneelide ja töölaua vahel"
|
||||
|
||||
msgid "Hide all normal windows and set focus to the desktop"
|
||||
msgstr "Peida kõik tavalised aknad ja fokuseeri töölaud"
|
||||
|
||||
msgid "Show the panel's main menu"
|
||||
msgstr "Paneeli peamenüü näitamine"
|
||||
|
||||
msgid "Show the panel's \"Run Application\" dialog box"
|
||||
msgstr "Paneeli dialoogi \"Käivita rakendus\" näitamine"
|
||||
|
||||
msgid "Start or stop recording the session"
|
||||
msgstr "Seansi salvestamise käivitamine või seiskamine"
|
||||
|
||||
msgid "Take a screenshot"
|
||||
msgstr "Kuvatõmmise võtmine"
|
||||
|
||||
msgid "Take a screenshot of a window"
|
||||
msgstr "Kuvatõmmise võtmine aknast"
|
||||
|
||||
msgid "Run a terminal"
|
||||
msgstr "Terminali käivitamine"
|
||||
|
||||
msgid "Activate the window menu"
|
||||
msgstr "Aknamenüü aktiveerimine"
|
||||
|
||||
msgid "Toggle fullscreen mode"
|
||||
msgstr "Täisekraanivaate sisse- ja väljalülitamine"
|
||||
|
||||
msgid "Toggle maximization state"
|
||||
msgstr "Maksimeeritud oleku sisse- ja väljalülitamine"
|
||||
|
||||
msgid "Toggle whether a window will always be visible over other windows"
|
||||
msgstr "Lüliti määrab, kas aken on alati teiste akende kohal nähtav"
|
||||
|
||||
msgid "Maximize window"
|
||||
msgstr "Akna maksimeerimine"
|
||||
|
||||
msgid "Restore window"
|
||||
msgstr "Taasta akna suurus"
|
||||
|
||||
msgid "Toggle shaded state"
|
||||
msgstr "Varjatud oleku lüliti"
|
||||
|
||||
msgid "Minimize window"
|
||||
msgstr "Akna minimeerimine"
|
||||
|
||||
msgid "Close window"
|
||||
msgstr "Akna sulgemine"
|
||||
|
||||
msgid "Move window"
|
||||
msgstr "Teisalda aken"
|
||||
|
||||
msgid "Resize window"
|
||||
msgstr "Muuda akna suurust"
|
||||
|
||||
msgid "Toggle whether window is on all workspaces or just one"
|
||||
msgstr "Lüliti määrab, kas aken on kõigil tööaladel või ainult ühel"
|
||||
|
||||
msgid "Move window to workspace 1"
|
||||
msgstr "Akna tõstmine 1. tööalale"
|
||||
|
||||
msgid "Move window to workspace 2"
|
||||
msgstr "Akna tõstmine 2. tööalale"
|
||||
|
||||
msgid "Move window to workspace 3"
|
||||
msgstr "Akna tõstmine 3. tööalale"
|
||||
|
||||
msgid "Move window to workspace 4"
|
||||
msgstr "Akna tõstmine 4. tööalale"
|
||||
|
||||
msgid "Move window to workspace 5"
|
||||
msgstr "Akna tõstmine 5. tööalale"
|
||||
|
||||
msgid "Move window to workspace 6"
|
||||
msgstr "Akna tõstmine 6. tööalale"
|
||||
|
||||
msgid "Move window to workspace 7"
|
||||
msgstr "Akna tõstmine 7. tööalale"
|
||||
|
||||
msgid "Move window to workspace 8"
|
||||
msgstr "Akna tõstmine 8. tööalale"
|
||||
|
||||
msgid "Move window to workspace 9"
|
||||
msgstr "Akna tõstmine 9. tööalale"
|
||||
|
||||
msgid "Move window to workspace 10"
|
||||
msgstr "Akna tõstmine 10. tööalale"
|
||||
|
||||
msgid "Move window to workspace 11"
|
||||
msgstr "Akna tõstmine 11. tööalale"
|
||||
|
||||
msgid "Move window to workspace 12"
|
||||
msgstr "Akna tõstmine 12. tööalale"
|
||||
|
||||
msgid "Move window one workspace to the left"
|
||||
msgstr "Akna tõstmine ühe tööala võrra vasakule"
|
||||
|
||||
msgid "Move window one workspace to the right"
|
||||
msgstr "Akna tõstmine ühe tööala võrra paremale"
|
||||
|
||||
msgid "Move window one workspace up"
|
||||
msgstr "Akna tõstmine ühe tööala võrra ülespoole"
|
||||
|
||||
msgid "Move window one workspace down"
|
||||
msgstr "Akna tõstmine ühe tööala võrra allapoole"
|
||||
|
||||
msgid "Raise window if it's covered by another window, otherwise lower it"
|
||||
msgstr "Tõsta aken, kui seda katab teine aken, muul juhul vii tahapoole"
|
||||
|
||||
msgid "Raise window above other windows"
|
||||
msgstr "Akna tõstmine teiste akende kohale"
|
||||
|
||||
msgid "Lower window below other windows"
|
||||
msgstr "Saada aken teiste taha"
|
||||
|
||||
msgid "Maximize window vertically"
|
||||
msgstr "Maksimeeri aken vertikaalselt"
|
||||
|
||||
msgid "Maximize window horizontally"
|
||||
msgstr "Maksimeeri aken horisontaalselt"
|
||||
|
||||
msgid "Move window to north-west (top left) corner"
|
||||
msgstr "Akna tõstmine ekraani loodepoolsesse (ülemisse vasakusse) nurka"
|
||||
|
||||
msgid "Move window to north-east (top right) corner"
|
||||
msgstr "Akna tõstmine ekraani kirdepoolsesse (ülemisse paremasse) nurka"
|
||||
|
||||
msgid "Move window to south-west (bottom left) corner"
|
||||
msgstr "Akna tõstmine ekraani edelapoolsesse (alumisse vasakusse) nurka"
|
||||
|
||||
msgid "Move window to south-east (bottom right) corner"
|
||||
msgstr "Akna tõstmine ekraani kagupoolsesse (alumisse paremasse) nurka"
|
||||
|
||||
msgid "Move window to north (top) side of screen"
|
||||
msgstr "Akna tõstmine ekraani põhjapoolsesse (ülemisse) serva"
|
||||
|
||||
msgid "Move window to south (bottom) side of screen"
|
||||
msgstr "Akna tõstmine ekraani lõunapoolsesse (alumisse) serva"
|
||||
|
||||
msgid "Move window to east (right) side of screen"
|
||||
msgstr "Akna tõstmine ekraani idapoolsesse (paremasse) serva"
|
||||
|
||||
msgid "Move window to west (left) side of screen"
|
||||
msgstr "Akna tõstmine ekraani läänepoolsesse (vasakusse) serva"
|
||||
|
||||
msgid "Move window to center of screen"
|
||||
msgstr "Akna tõstmine ekraani keskele"
|
||||
|
||||
msgid "Bell event"
|
||||
msgstr "Helina sündmus"
|
||||
@@ -48,13 +262,11 @@ msgstr "Helina sündmus"
|
||||
msgid "Unknown window information request: %d"
|
||||
msgstr "Tundmatu aknateabe päring: %d"
|
||||
|
||||
#. Translators: %s is a window title
|
||||
#, c-format
|
||||
msgid "<tt>%s</tt> is not responding."
|
||||
msgstr "<tt>%s</tt> ei vasta."
|
||||
|
||||
msgid "Application is not responding."
|
||||
msgstr "Rakendus ei vasta."
|
||||
|
||||
msgid ""
|
||||
"You may choose to wait a short while for it to continue or force the "
|
||||
"application to quit entirely."
|
||||
@@ -82,6 +294,27 @@ msgstr ""
|
||||
"Mõni teine programm juba kasutab klahvi %s koos muuteklahvidega %x "
|
||||
"kiirklahvina\n"
|
||||
|
||||
#. Displayed when a keybinding which is
|
||||
#. * supposed to launch a program fails.
|
||||
#.
|
||||
#, c-format
|
||||
msgid ""
|
||||
"There was an error running <tt>%s</tt>:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
msgstr ""
|
||||
"<tt>%s</tt> käivitamisel esines viga:\n"
|
||||
"\n"
|
||||
"%s"
|
||||
|
||||
#, c-format
|
||||
msgid "No command %d has been defined.\n"
|
||||
msgstr "Käsku %d pole defineeritud.\n"
|
||||
|
||||
#, c-format
|
||||
msgid "No terminal command has been defined.\n"
|
||||
msgstr "Terminalikäsku pole defineeritud.\n"
|
||||
|
||||
msgid "Disable connection to session manager"
|
||||
msgstr "Seansihalduriga ühendumise keelamine"
|
||||
|
||||
@@ -131,6 +364,39 @@ msgstr "Versiooni printimine"
|
||||
msgid "Comma-separated list of compositor plugins"
|
||||
msgstr "Komaga eraldatud nimekiri komposiitmontaaži pluginatest"
|
||||
|
||||
#.
|
||||
#. * We found it, but it was invalid. Complain.
|
||||
#. *
|
||||
#. * FIXME: This replicates the original behaviour, but in the future
|
||||
#. * we might consider reverting invalid keys to their original values.
|
||||
#. * (We know the old value, so we can look up a suitable string in
|
||||
#. * the symtab.)
|
||||
#. *
|
||||
#. * (Empty comment follows so the translators don't see this.)
|
||||
#.
|
||||
#.
|
||||
#, c-format
|
||||
msgid "GConf key '%s' is set to an invalid value\n"
|
||||
msgstr "GConf võtme '%s' väärtus on vigane\n"
|
||||
|
||||
#, c-format
|
||||
msgid "%d stored in GConf key %s is out of range %d to %d\n"
|
||||
msgstr ""
|
||||
"%d, mis on salvestatud GConf võtmes %s, on väljaspool piirkonda %d - %d\n"
|
||||
|
||||
#, c-format
|
||||
msgid "GConf key \"%s\" is set to an invalid type\n"
|
||||
msgstr "GConf-i võti \"%s\" on määratud vigase tüübiga\n"
|
||||
|
||||
#, c-format
|
||||
msgid "GConf key %s is already in use and can't be used to override %s\n"
|
||||
msgstr ""
|
||||
"GConfi võti %s on juba kasutusel ja sellega ei saa tühistada võtit %s\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Can't override GConf key, %s not found\n"
|
||||
msgstr "GConfi võtit pole võimalik tühistada, võtit %s ei leitud\n"
|
||||
|
||||
msgid ""
|
||||
"Workarounds for broken applications disabled. Some applications may not "
|
||||
"behave properly.\n"
|
||||
@@ -139,8 +405,8 @@ msgstr ""
|
||||
"ei pruugi õigesti käituda.\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
|
||||
msgstr "Fondi kirjeldust \"%s\" GSettings võtmest %s pole võimalik töödelda\n"
|
||||
msgid "Could not parse font description \"%s\" from GConf key %s\n"
|
||||
msgstr "Fondi kirjeldust \"%s\" GConf võtmest %s ei saa töödelda\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -150,6 +416,14 @@ msgstr ""
|
||||
"Seadistuste andmebaasist leitud \"%s\" ei ole sobiv väärtus hiireklahvi "
|
||||
"modifikaatoriks\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Error setting number of workspaces to %d: %s\n"
|
||||
msgstr "Viga tööalade arvuks %d määramisel: %s\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Tööala %d"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||
@@ -159,8 +433,16 @@ msgstr ""
|
||||
"\"\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Tööala %d"
|
||||
msgid "Error setting name for workspace %d to \"%s\": %s\n"
|
||||
msgstr "Viga tööalale %d nime \"%s\" määramisel: %s\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Error setting live hidden windows status status: %s\n"
|
||||
msgstr "Viga varjus elushoitavate akende oleku määramisel: %s\n"
|
||||
|
||||
#, c-format
|
||||
msgid "Error setting no tab popup status: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
@@ -258,6 +540,10 @@ msgstr "Aknahalduri hoiatus: "
|
||||
msgid "Window manager error: "
|
||||
msgstr "Aknahalduri viga: "
|
||||
|
||||
#. Translators: This is the title used on dialog boxes
|
||||
msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#. first time through
|
||||
#, c-format
|
||||
msgid ""
|
||||
@@ -295,12 +581,6 @@ msgstr "%s (masinas %s)"
|
||||
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
|
||||
msgstr "Vigane WM_TRANSIENT_FOR aknale 0x%lx määratud %s jaoks.\n"
|
||||
|
||||
#, c-format
|
||||
msgid "WM_TRANSIENT_FOR window 0x%lx for %s would create loop.\n"
|
||||
msgstr ""
|
||||
"WM_TRANSIENT_FOR aknale 0x%lx määratud %s jaoks tekitaks tsüklilise "
|
||||
"korduse.\n"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window 0x%lx has property %s\n"
|
||||
@@ -324,8 +604,18 @@ msgid ""
|
||||
"Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n"
|
||||
msgstr "Omadus %s aknal 0x%lx sisaldab vigast UTF-8 %d kirjele nimekirjas\n"
|
||||
|
||||
msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
msgid "Attach modal dialogs"
|
||||
msgstr "Modaaldialoogide kinnistamine"
|
||||
|
||||
msgid ""
|
||||
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
||||
"other workspaces than the current one) should be kept alive."
|
||||
msgstr ""
|
||||
"Määrab, kas varjatud aknaid (nt minimeeritud ja teistel tööaladel aknad) "
|
||||
"hoitakse elus."
|
||||
|
||||
msgid "Live Hidden Windows"
|
||||
msgstr "Varjatud akende aktiivsus"
|
||||
|
||||
msgid "Modifier to use for extended window management operations"
|
||||
msgstr "Laiendatud aknaoperatsioonide korral kasutatav muuteklahv"
|
||||
@@ -342,9 +632,6 @@ msgstr ""
|
||||
"klahv\". Eeldatavasti määratakse selle seose väärtuseks vaikimisi või tühi "
|
||||
"sõne."
|
||||
|
||||
msgid "Attach modal dialogs"
|
||||
msgstr "Modaaldialoogide kinnistamine"
|
||||
|
||||
msgid ""
|
||||
"When true, instead of having independent titlebars, modal dialogs appear "
|
||||
"attached to the titlebar of the parent window and are moved together with "
|
||||
@@ -353,75 +640,6 @@ msgstr ""
|
||||
"Kui märgitud, siis eraldi tiitliribade asemel on moodaalsed dialoogid "
|
||||
"emaakna tiitliribade küljes ning liiguvad koos emaaknaga."
|
||||
|
||||
msgid "Live Hidden Windows"
|
||||
msgstr "Varjatud akende aktiivsus"
|
||||
|
||||
msgid ""
|
||||
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
||||
"other workspaces than the current one) should be kept alive."
|
||||
msgstr ""
|
||||
"Määrab, kas varjatud aknaid (nt minimeeritud ja teistel tööaladel aknad) "
|
||||
"hoitakse elus."
|
||||
|
||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||
msgstr "Akna ümberpaigutamine selle lohistamisel ekraani serva"
|
||||
|
||||
msgid ""
|
||||
"If enabled, dropping windows on vertical screen edges maximizes them "
|
||||
"vertically and resizes them horizontally to cover half of the available "
|
||||
"area. Dropping windows on the top screen edge maximizes them completely."
|
||||
msgstr ""
|
||||
"Kui märgitud, siis akna lohistamine ekraani külgservale maksimeerib selle "
|
||||
"vertikaalselt ja laius katab pool saadaolevast laiusest. Akna lohistamine "
|
||||
"ekraani ülaserva maksimeerib akna täielikult."
|
||||
|
||||
msgid "Workspaces are managed dynamically"
|
||||
msgstr "Tööalade dünaamiline haldus"
|
||||
|
||||
msgid ""
|
||||
"Determines whether workspaces are managed dynamically or whether there's a "
|
||||
"static number of workspaces (determined by the num-workspaces key in org."
|
||||
"gnome.desktop.wm.preferences)."
|
||||
msgstr ""
|
||||
"Määrab, kas tööalasid hallatakse dünaamiliselt või on nende arv staatiline "
|
||||
"(arvu määrab org.gnome.desktop.wm.preferences all võti num-workspaces)."
|
||||
|
||||
msgid "Workspaces only on primary"
|
||||
msgstr "Tööalad ainult peamisel"
|
||||
|
||||
msgid ""
|
||||
"Determines whether workspace switching should happen for windows on all "
|
||||
"monitors or only for windows on the primary monitor."
|
||||
msgstr ""
|
||||
"Määrab, kas tööalade vahetamine mõjutab kõiki aknaid kõigil monitoridel või "
|
||||
"ainult aknaid peamisel monitoril."
|
||||
|
||||
msgid "No tab popup"
|
||||
msgstr "Tabulaatoril pole hüpikakent"
|
||||
|
||||
msgid ""
|
||||
"Determines whether the use of popup and highlight frame should be disabled "
|
||||
"for window cycling."
|
||||
msgstr ""
|
||||
"Kui märgitud, siis on hüpikaken ja esiletõstmise raam keelatud akende "
|
||||
"vahetamisel."
|
||||
|
||||
msgid "Draggable border width"
|
||||
msgstr "Lohistatava äärise laius."
|
||||
|
||||
msgid ""
|
||||
"The amount of total draggable borders. If the theme's visible borders are "
|
||||
"not enough, invisible borders will be added to meet this value."
|
||||
msgstr ""
|
||||
"Lohistatava äärise laius. Kui kujunduse nähtavatest ääristest ei piisa, "
|
||||
"lisatakse puuduoleva osa jaoks nähtamatu ääris."
|
||||
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "Akna valimine tabulaatori hüpikaknalt"
|
||||
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Tabulaatori hüpikakna katkestamine"
|
||||
|
||||
#, c-format
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "Kasutamine: %s\n"
|
||||
@@ -659,30 +877,6 @@ msgstr "Raami geomeetria ei määra nuppude suurust"
|
||||
msgid "Gradients should have at least two colors"
|
||||
msgstr "Värviüleminekus peaks olema vähemalt kaks värvi"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK custom color specification must have color name and fallback in "
|
||||
"parentheses, e.g. gtk:custom(foo,bar); could not parse \"%s\""
|
||||
msgstr ""
|
||||
"GTK kohandatud värvi määrang peab sisaldama sulgudes värvi nimetust ning "
|
||||
"varuvärvi, nt gtk:custom(foo,bar); väärtust \"%s\" pole võimalik töödelda"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Invalid character '%c' in color_name parameter of gtk:custom, only A-Za-z0-9-"
|
||||
"_ are valid"
|
||||
msgstr ""
|
||||
"gtk:custom color_name parameetris sobimatu märk '%c', lubatud on ainult A-Za-"
|
||||
"z0-9-_"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Gtk:custom format is \"gtk:custom(color_name,fallback)\", \"%s\" does not "
|
||||
"fit the format"
|
||||
msgstr ""
|
||||
"Gtk:custom vorming on \"gtk:custom(värvi_nimi,varuvärv)\", \"%s\" ei sobi "
|
||||
"selle vorminguga"
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] "
|
||||
@@ -1317,3 +1511,25 @@ msgstr "y väärtus oli %d, oodati väärtust %d"
|
||||
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
|
||||
msgstr ""
|
||||
"%d koordinaatide avaldis töödeldi %g sekundiga (keskmine %g sekundit)\n"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Don't make fullscreen windows that are maximized and have no decorations"
|
||||
#~ msgstr "Ei tehta maksimeeritud ilma raamita täisekraanaknaid."
|
||||
|
||||
#~ msgid "Whether window popup/frame should be shown when cycling windows."
|
||||
#~ msgstr "Kas hüpikakent/raami näidatakse akende vahetamisel."
|
||||
|
||||
#~ msgid "Internal argument for GObject introspection"
|
||||
#~ msgstr "GObject enesevaatluse siseargument"
|
||||
|
||||
#~ msgid "Failed to restart: %s\n"
|
||||
#~ msgstr "Tõrge taaskäivitamisel: %s\n"
|
||||
|
||||
#~ msgid "Error setting clutter plugin list: %s\n"
|
||||
#~ msgstr "Viga clutteri pluginate nimekirja määramisel: %s\n"
|
||||
|
||||
#~ msgid "Clutter Plugins"
|
||||
#~ msgstr "Clutteri pluginad"
|
||||
|
||||
#~ msgid "Plugins to load for the Clutter-based compositing manager."
|
||||
#~ msgstr "Clutteril põhineva komposiitmontaažihalduri laadimise pluginad."
|
||||
|
231
po/nb.po
231
po/nb.po
@@ -1,13 +1,13 @@
|
||||
# Norwegian bokmål translation of mutter.
|
||||
# Norwegian (bokmål) translation of mutter.
|
||||
# Copyright © 2002-2004 Free Software Foundation, Inc.
|
||||
# Kjartan Maraas <kmaraas@gnome.org>, 2002-2012.
|
||||
# Kjartan Maraas <kmaraas@gnome.org>, 2002-2011.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: mutter 3.3.x\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2012-03-12 18:54+0100\n"
|
||||
"PO-Revision-Date: 2012-03-12 18:54+0100\n"
|
||||
"POT-Creation-Date: 2011-12-01 20:27+0100\n"
|
||||
"PO-Revision-Date: 2011-12-01 20:29+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,18 +15,6 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:1
|
||||
msgid "Windows"
|
||||
msgstr "Vinduer"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:2
|
||||
msgid "View split on left"
|
||||
msgstr "Visning delt til venstre"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:3
|
||||
msgid "View split on right"
|
||||
msgstr "Visning delt til høyre"
|
||||
|
||||
#. 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
|
||||
@@ -70,12 +58,12 @@ msgstr "_Vent"
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Tvungen nedstenging"
|
||||
|
||||
#: ../src/core/display.c:361
|
||||
#: ../src/core/display.c:365
|
||||
#, c-format
|
||||
msgid "Missing %s extension required for compositing"
|
||||
msgstr "Mangler utvidelsen %s som kreves for komposittfunksjon"
|
||||
|
||||
#: ../src/core/display.c:427
|
||||
#: ../src/core/display.c:431
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "Feil under åpning av X Window System skjerm «%s»\n"
|
||||
@@ -126,7 +114,7 @@ msgstr ""
|
||||
"Kunne ikke finne et tema! Sjekk at %s eksisterer og inneholder de vanlige "
|
||||
"temaene.\n"
|
||||
|
||||
#: ../src/core/mutter.c:40
|
||||
#: ../src/core/mutter.c:42
|
||||
#, c-format
|
||||
msgid ""
|
||||
"mutter %s\n"
|
||||
@@ -140,15 +128,15 @@ msgstr ""
|
||||
"Dette er fri programvare; se i kildekoden for kopibetingelser.\n"
|
||||
"Det gis INGEN garanti.\n"
|
||||
|
||||
#: ../src/core/mutter.c:54
|
||||
#: ../src/core/mutter.c:56
|
||||
msgid "Print version"
|
||||
msgstr "Skriv versjonsnummer"
|
||||
|
||||
#: ../src/core/mutter.c:60
|
||||
#: ../src/core/mutter.c:62
|
||||
msgid "Comma-separated list of compositor plugins"
|
||||
msgstr "Kommaseparert liste av tillegg for compositor"
|
||||
|
||||
#: ../src/core/prefs.c:1077
|
||||
#: ../src/core/prefs.c:1067
|
||||
msgid ""
|
||||
"Workarounds for broken applications disabled. Some applications may not "
|
||||
"behave properly.\n"
|
||||
@@ -156,12 +144,12 @@ msgstr ""
|
||||
"Funksjonalitet for å gå rundt ødelagte programmer er deaktivert. Noen "
|
||||
"programmer vil kanskje ikke oppføre seg korrekt.\n"
|
||||
|
||||
#: ../src/core/prefs.c:1152
|
||||
#: ../src/core/prefs.c:1142
|
||||
#, c-format
|
||||
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
|
||||
msgstr "Kunne ikke tolke skriftbeskrivelsen «%s» fra GSettings-nøkkel %s\n"
|
||||
|
||||
#: ../src/core/prefs.c:1218
|
||||
#: ../src/core/prefs.c:1208
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\"%s\" found in configuration database is not a valid value for mouse button "
|
||||
@@ -170,7 +158,7 @@ msgstr ""
|
||||
"«%s» funnet i konfigurasjonsdatabasen er ikke en gyldig verdi for endring av "
|
||||
"musknapp\n"
|
||||
|
||||
#: ../src/core/prefs.c:1739
|
||||
#: ../src/core/prefs.c:1720
|
||||
#, c-format
|
||||
msgid ""
|
||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||
@@ -179,17 +167,17 @@ msgstr ""
|
||||
"«%s» funnet i konfigurasjonsdatabasen er ikke en gyldig verdi for "
|
||||
"tastaturbinding «%s»\n"
|
||||
|
||||
#: ../src/core/prefs.c:1836
|
||||
#: ../src/core/prefs.c:1817
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Arbeidsområde %d"
|
||||
|
||||
#: ../src/core/screen.c:730
|
||||
#: ../src/core/screen.c:741
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Skjerm %d på display «%s» er ugyldig\n"
|
||||
|
||||
#: ../src/core/screen.c:746
|
||||
#: ../src/core/screen.c:757
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Screen %d on display \"%s\" already has a window manager; try using the --"
|
||||
@@ -198,19 +186,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:773
|
||||
#: ../src/core/screen.c:784
|
||||
#, 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:828
|
||||
#: ../src/core/screen.c:839
|
||||
#, 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:1013
|
||||
#: ../src/core/screen.c:1024
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "Kunne ikke slippe skjerm %d på display «%s»\n"
|
||||
@@ -307,7 +295,7 @@ msgid "Window manager error: "
|
||||
msgstr "Feil i vindushåndterer: "
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:7224
|
||||
#: ../src/core/window.c:7141
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||
@@ -323,7 +311,7 @@ msgstr ""
|
||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||
#. * about these apps but make them work.
|
||||
#.
|
||||
#: ../src/core/window.c:7887
|
||||
#: ../src/core/window.c:7804
|
||||
#, c-format
|
||||
msgid ""
|
||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
||||
@@ -386,10 +374,77 @@ msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:1
|
||||
msgid "Attach modal dialogs"
|
||||
msgstr "Fest modale dialoger"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:2
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Avbryt tabulatordialog"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:3
|
||||
msgid ""
|
||||
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
||||
"other workspaces than the current one) should be kept alive."
|
||||
msgstr ""
|
||||
"Bestemmer om skjulte vinduer, f.eks minimerte vinduer og vinduer på andre "
|
||||
"arbeidsområder enn aktivt arbeidsområde, skal holdes i live."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:4
|
||||
msgid ""
|
||||
"Determines whether the use of popup and highlight frame should be disabled "
|
||||
"for window cycling."
|
||||
msgstr ""
|
||||
"Bestemmer om bruk av dialog og uthevingsramme skal slås av for bytting "
|
||||
"mellom vinduer."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:5
|
||||
msgid ""
|
||||
"Determines whether workspace switching should happen for windows on all "
|
||||
"monitors or only for windows on the primary monitor."
|
||||
msgstr ""
|
||||
"Bestemmer om bytting mellom arbeidsområder skal skje for vinduer på alle "
|
||||
"skjermer eller kun på primær skjerm."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:6
|
||||
msgid "Draggable border width"
|
||||
msgstr "Bredde på drakant"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:7
|
||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||
msgstr "Slå på kantflising ved slipp av vinduer på skjermkantene"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:8
|
||||
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."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:9
|
||||
msgid "Live Hidden Windows"
|
||||
msgstr "Levende skjulte vinduer"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:10
|
||||
msgid "Modifier to use for extended window management operations"
|
||||
msgstr "Endringstast som skal brukes for utvidede vindushåndteringsoperasjoner"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:2
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:11
|
||||
msgid "No tab popup"
|
||||
msgstr "Ingen tabulatordialog"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:12
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "Fjern vindu fra tabulatordialog"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:13
|
||||
msgid ""
|
||||
"The amount of total draggable borders. If the theme's visible borders are "
|
||||
"not enough, invisible borders will be added to meet this value."
|
||||
msgstr ""
|
||||
"Total mengde med drakant. Hvis temas synlige kanter ikke er nok vil usynlige "
|
||||
"kanter legges til for å imøtekomme denne verdien."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:14
|
||||
msgid ""
|
||||
"This key will initiate the \"overlay\", which is a combination window "
|
||||
"overview and application launching system. The default is intended to be the "
|
||||
@@ -401,11 +456,7 @@ msgstr ""
|
||||
"tasten» på PC-maskinvare. Det forventes at denne bindingen er satt til "
|
||||
"forvalg eller en tom streng."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:3
|
||||
msgid "Attach modal dialogs"
|
||||
msgstr "Fest modale dialoger"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:4
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:15
|
||||
msgid ""
|
||||
"When true, instead of having independent titlebars, modal dialogs appear "
|
||||
"attached to the titlebar of the parent window and are moved together with "
|
||||
@@ -415,134 +466,56 @@ msgstr ""
|
||||
"tittellinjen på opphavsvinduet og flyttes sammen med dette i stedet for å ha "
|
||||
"individuelle tittellinjer."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:5
|
||||
msgid "Live Hidden Windows"
|
||||
msgstr "Levende skjulte vinduer"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:6
|
||||
msgid ""
|
||||
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
||||
"other workspaces than the current one) should be kept alive."
|
||||
msgstr ""
|
||||
"Bestemmer om skjulte vinduer, f.eks minimerte vinduer og vinduer på andre "
|
||||
"arbeidsområder enn aktivt arbeidsområde, skal holdes i live."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:7
|
||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||
msgstr "Slå på kantflising ved slipp av vinduer på skjermkantene"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:8
|
||||
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."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:9
|
||||
msgid "Workspaces are managed dynamically"
|
||||
msgstr "Arbeidsområder håndteres dynamisk"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:10
|
||||
msgid ""
|
||||
"Determines whether workspaces are managed dynamically or whether there's a "
|
||||
"static number of workspaces (determined by the num-workspaces key in org."
|
||||
"gnome.desktop.wm.preferences)."
|
||||
msgstr "Bestemmer om arbeidsområder skal håndteres dynamisk eller om det er et fast antall arbeidsområder (bestemt av num-workspaces nøkkelen i org.gnome.desktop.wm.preferences)."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:11
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:16
|
||||
msgid "Workspaces only on primary"
|
||||
msgstr "Arbeidsområder kun på primær skjerm"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:12
|
||||
msgid ""
|
||||
"Determines whether workspace switching should happen for windows on all "
|
||||
"monitors or only for windows on the primary monitor."
|
||||
msgstr ""
|
||||
"Bestemmer om bytting mellom arbeidsområder skal skje for vinduer på alle "
|
||||
"skjermer eller kun på primær skjerm."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:13
|
||||
msgid "No tab popup"
|
||||
msgstr "Ingen tabulatordialog"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:14
|
||||
msgid ""
|
||||
"Determines whether the use of popup and highlight frame should be disabled "
|
||||
"for window cycling."
|
||||
msgstr ""
|
||||
"Bestemmer om bruk av dialog og uthevingsramme skal slås av for bytting "
|
||||
"mellom vinduer."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:15
|
||||
msgid "Draggable border width"
|
||||
msgstr "Bredde på drakant"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:16
|
||||
msgid ""
|
||||
"The amount of total draggable borders. If the theme's visible borders are "
|
||||
"not enough, invisible borders will be added to meet this value."
|
||||
msgstr ""
|
||||
"Total mengde med drakant. Hvis temas synlige kanter ikke er nok vil usynlige "
|
||||
"kanter legges til for å imøtekomme denne verdien."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:17
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "Fjern vindu fra tabulatordialog"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:18
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Avbryt tabulatordialog"
|
||||
|
||||
#: ../src/tools/mutter-message.c:123
|
||||
#, c-format
|
||||
msgid "Usage: %s\n"
|
||||
msgstr " Bruk: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1158
|
||||
#: ../src/ui/frames.c:1157
|
||||
msgid "Close Window"
|
||||
msgstr "Lukk vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1161
|
||||
#: ../src/ui/frames.c:1160
|
||||
msgid "Window Menu"
|
||||
msgstr "Vindumeny"
|
||||
|
||||
#: ../src/ui/frames.c:1164
|
||||
#: ../src/ui/frames.c:1163
|
||||
msgid "Minimize Window"
|
||||
msgstr "Minimer vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1167
|
||||
#: ../src/ui/frames.c:1166
|
||||
msgid "Maximize Window"
|
||||
msgstr "Maksimer vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1170
|
||||
#: ../src/ui/frames.c:1169
|
||||
msgid "Restore Window"
|
||||
msgstr "Gjenopprett vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1173
|
||||
#: ../src/ui/frames.c:1172
|
||||
msgid "Roll Up Window"
|
||||
msgstr "Rull opp vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1176
|
||||
#: ../src/ui/frames.c:1175
|
||||
msgid "Unroll Window"
|
||||
msgstr "Rull ned vindu"
|
||||
|
||||
#: ../src/ui/frames.c:1179
|
||||
#: ../src/ui/frames.c:1178
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "Plasser vindu i forgrunnen"
|
||||
|
||||
#: ../src/ui/frames.c:1182
|
||||
#: ../src/ui/frames.c:1181
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "Fjern vindu fra forgrunnen"
|
||||
|
||||
#: ../src/ui/frames.c:1185
|
||||
#: ../src/ui/frames.c:1184
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "Alltid på synlig arbeidsområde"
|
||||
|
||||
#: ../src/ui/frames.c:1188
|
||||
#: ../src/ui/frames.c:1187
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "Plasser vindu kun på ett arbeidsområde"
|
||||
|
||||
|
1108
po/pt_BR.po
1108
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
156
po/sl.po
156
po/sl.po
@@ -4,37 +4,25 @@
|
||||
#
|
||||
# Andraž Tori <andraz.tori1@guest.arnes.si>, 2000.
|
||||
# Matjaž Horvat <m@owca.info>, 2006.
|
||||
# Matej Urbančič <mateju@svn.gnome.org>, 2007 - 2012.
|
||||
# Matej Urbančič <mateju@svn.gnome.org>, 2007 - 2011.
|
||||
#
|
||||
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: 2012-03-12 09:11+0000\n"
|
||||
"PO-Revision-Date: 2012-03-12 12:10+0100\n"
|
||||
"POT-Creation-Date: 2011-11-22 00:22+0000\n"
|
||||
"PO-Revision-Date: 2011-11-25 20:53+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"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Language: \n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n%100==4 ? 3 : 0);\n"
|
||||
"X-Poedit-Language: Slovenian\n"
|
||||
"X-Poedit-Country: SLOVENIA\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:1
|
||||
msgid "Windows"
|
||||
msgstr "Okna"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:2
|
||||
msgid "View split on left"
|
||||
msgstr "Poglej razdelek na levi"
|
||||
|
||||
#: ../src/50-mutter-windows.xml.in.h:3
|
||||
msgid "View split on right"
|
||||
msgstr "Poglej razdelek na desni"
|
||||
|
||||
#. 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
|
||||
@@ -72,12 +60,12 @@ msgstr "_Počakaj"
|
||||
msgid "_Force Quit"
|
||||
msgstr "_Vsili konec"
|
||||
|
||||
#: ../src/core/display.c:361
|
||||
#: ../src/core/display.c:365
|
||||
#, c-format
|
||||
msgid "Missing %s extension required for compositing"
|
||||
msgstr "Manjka razširitev %s, ki je ključna za sestavljanje"
|
||||
|
||||
#: ../src/core/display.c:427
|
||||
#: ../src/core/display.c:431
|
||||
#, c-format
|
||||
msgid "Failed to open X Window System display '%s'\n"
|
||||
msgstr "Ni mogoče odpreti zaslona '%s' okenskega sistema X\n"
|
||||
@@ -122,7 +110,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:40
|
||||
#: ../src/core/mutter.c:42
|
||||
#, c-format
|
||||
msgid ""
|
||||
"mutter %s\n"
|
||||
@@ -135,60 +123,60 @@ 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:54
|
||||
#: ../src/core/mutter.c:56
|
||||
msgid "Print version"
|
||||
msgstr "Izpiši različico"
|
||||
|
||||
#: ../src/core/mutter.c:60
|
||||
#: ../src/core/mutter.c:62
|
||||
msgid "Comma-separated list of compositor plugins"
|
||||
msgstr "Z vejico ločen seznam vstavkov sestavljanja"
|
||||
|
||||
#: ../src/core/prefs.c:1077
|
||||
#: ../src/core/prefs.c:1067
|
||||
msgid "Workarounds for broken applications disabled. Some applications may not behave properly.\n"
|
||||
msgstr "Obhodi za pokvarjene programe so onemogočeni. Nekateri programi se morda ne bodo odzivali na pričakovan način.\n"
|
||||
|
||||
#: ../src/core/prefs.c:1152
|
||||
#: ../src/core/prefs.c:1142
|
||||
#, c-format
|
||||
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
|
||||
msgstr "Ni mogoče razčleniti opisa pisave \"%s\" iz ključa GSettings %s\n"
|
||||
|
||||
#: ../src/core/prefs.c:1218
|
||||
#: ../src/core/prefs.c:1208
|
||||
#, c-format
|
||||
msgid "\"%s\" found in configuration database is not a valid value for mouse button modifier\n"
|
||||
msgstr "\"%s\", najden v podatkovni zbirki nastavitev, ni veljaven spremenilnik za miškine gumbe.\n"
|
||||
|
||||
#: ../src/core/prefs.c:1739
|
||||
#: ../src/core/prefs.c:1720
|
||||
#, c-format
|
||||
msgid "\"%s\" found in configuration database is not a valid value for keybinding \"%s\"\n"
|
||||
msgstr "\"%s\", najden v podatkovni zbirki nastavitev, ni veljaven ključ za tipkovno bližnjico \"%s\"\n"
|
||||
|
||||
# G:1 K:0 O:0
|
||||
#: ../src/core/prefs.c:1836
|
||||
#: ../src/core/prefs.c:1817
|
||||
#, c-format
|
||||
msgid "Workspace %d"
|
||||
msgstr "Delovna površina %d"
|
||||
|
||||
#: ../src/core/screen.c:730
|
||||
#: ../src/core/screen.c:741
|
||||
#, c-format
|
||||
msgid "Screen %d on display '%s' is invalid\n"
|
||||
msgstr "Zaslon %d na prikazu '%s' ni veljaven\n"
|
||||
|
||||
#: ../src/core/screen.c:746
|
||||
#: ../src/core/screen.c:757
|
||||
#, 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:773
|
||||
#: ../src/core/screen.c:784
|
||||
#, 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:828
|
||||
#: ../src/core/screen.c:839
|
||||
#, 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:1013
|
||||
#: ../src/core/screen.c:1024
|
||||
#, c-format
|
||||
msgid "Could not release screen %d on display \"%s\"\n"
|
||||
msgstr "Ni mogoče opustiti zaslona %d na prikazu \"%s\"\n"
|
||||
@@ -288,7 +276,7 @@ msgid "Window manager error: "
|
||||
msgstr "Napaka upravljalnika oken: "
|
||||
|
||||
#. first time through
|
||||
#: ../src/core/window.c:7224
|
||||
#: ../src/core/window.c:7124
|
||||
#, 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"
|
||||
@@ -300,7 +288,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:7887
|
||||
#: ../src/core/window.c:7787
|
||||
#, 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"
|
||||
@@ -356,29 +344,29 @@ msgid "Mutter"
|
||||
msgstr "Mutter"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:1
|
||||
msgid "Modifier to use for extended window management operations"
|
||||
msgstr "Spremenilnik, ki naj se uporabi za upravljanje oken"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:2
|
||||
msgid "This key will initiate the \"overlay\", which is a combination window overview and application launching system. The default is intended to be the \"Windows key\" on PC hardware. It's expected that this binding either the default or set to the empty string."
|
||||
msgstr "Ta vrednost določa \"prevleko\", ki združuje predogled okna in zaganjalnik programa. Vrednost je zamišljena kot \"ključ oken\" na strojni opremi računalnika. Pričakovano je, da je vrednost določena privzeto ali pa ni določena."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:3
|
||||
msgid "Attach modal dialogs"
|
||||
msgstr "Pripni modalna pogovorna okna"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:4
|
||||
msgid "When true, instead of having independent titlebars, modal dialogs appear attached to the titlebar of the parent window and are moved together with the parent window."
|
||||
msgstr "Izbrana možnost omogoči, da je namesto samostojnih nazivnih vrstic, na to mesto pripeto modalno pogovorno okno, ki se premika z nadrejenim oknom."
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:2
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Prekliči pojavni zavihek"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:5
|
||||
msgid "Live Hidden Windows"
|
||||
msgstr "Ohranjena skrita okna"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:6
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:3
|
||||
msgid "Determines whether hidden windows (i.e., minimized windows and windows on other workspaces than the current one) should be kept alive."
|
||||
msgstr "Določa ali naj se skrita okna (skrčena okna in okna na drugih delovnih površinah) ohranjajo odprta."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:4
|
||||
msgid "Determines whether the use of popup and highlight frame should be disabled for window cycling."
|
||||
msgstr "Določa ali naj bo uporaba pojavnih zavihkov in poudarjanja onemogočena med kroženjem oken."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:5
|
||||
msgid "Determines whether workspace switching should happen for windows on all monitors or only for windows on the primary monitor."
|
||||
msgstr "Določa ali naj se delovne površine preklapljajo na vseh zaslonih ali le na prvem, glavnem zaslonu."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:6
|
||||
msgid "Draggable border width"
|
||||
msgstr "Prilagodljiva obroba pravokotnika"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:7
|
||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||
msgstr "Omogoči prilagajanje velikosti okna ob dotiku robov zaslona"
|
||||
@@ -388,95 +376,87 @@ msgid "If enabled, dropping windows on vertical screen edges maximizes them vert
|
||||
msgstr "Izbrana možnost omogoča, da se okna, ki se dotaknejo navpičnih robov zaslona razpeta po navpični osi in razširjena na polovično širino. Dotik vrhnjega roba razpne okno čez cel zaslon."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:9
|
||||
msgid "Workspaces are managed dynamically"
|
||||
msgstr "Število delovnih površin je spremenljivo"
|
||||
msgid "Live Hidden Windows"
|
||||
msgstr "Ohranjena skrita okna"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:10
|
||||
msgid "Determines whether workspaces are managed dynamically or whether there's a static number of workspaces (determined by the num-workspaces key in org.gnome.desktop.wm.preferences)."
|
||||
msgstr "Možnost določa ali je število delovnih površin spremenljivo ali pa je to število stalno (določenih s ključem števila delovnih površin med možnostmi v org.gnome.desktop.wm.preferences)."
|
||||
msgid "Modifier to use for extended window management operations"
|
||||
msgstr "Spremenilnik, ki naj se uporabi za upravljanje oken"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:11
|
||||
msgid "Workspaces only on primary"
|
||||
msgstr "Delovne površine le na prvem zaslonu"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:12
|
||||
msgid "Determines whether workspace switching should happen for windows on all monitors or only for windows on the primary monitor."
|
||||
msgstr "Določa ali naj se delovne površine preklapljajo na vseh zaslonih ali le na prvem, glavnem zaslonu."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:13
|
||||
msgid "No tab popup"
|
||||
msgstr "Brez pojavnih zavihkov"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:14
|
||||
msgid "Determines whether the use of popup and highlight frame should be disabled for window cycling."
|
||||
msgstr "Določa ali naj bo uporaba pojavnih zavihkov in poudarjanja onemogočena med kroženjem oken."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:15
|
||||
msgid "Draggable border width"
|
||||
msgstr "Prilagodljiva obroba pravokotnika"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:16
|
||||
msgid "The amount of total draggable borders. If the theme's visible borders are not enough, invisible borders will be added to meet this value."
|
||||
msgstr "Delež skupne prilagodljive obrobe. V kolikor vidni robovi teme niso dovolj, so dodane nevidne obrobe, za dodatno prilagajanje."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:17
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:12
|
||||
msgid "Select window from tab popup"
|
||||
msgstr "Izbor okna iz pojavnega zavihka"
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:18
|
||||
msgid "Cancel tab popup"
|
||||
msgstr "Prekliči pojavni zavihek"
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:13
|
||||
msgid "The amount of total draggable borders. If the theme's visible borders are not enough, invisible borders will be added to meet this value."
|
||||
msgstr "Delež skupne prilagodljive obrobe. V kolikor vidni robovi teme niso dovolj, so dodane nevidne obrobe, za dodatno prilagajanje."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:14
|
||||
msgid "This key will initiate the \"overlay\", which is a combination window overview and application launching system. The default is intended to be the \"Windows key\" on PC hardware. It's expected that this binding either the default or set to the empty string."
|
||||
msgstr "Ta vrednost določa \"prevleko\", ki združuje predogled okna in zaganjalnik programa. Vrednost je zamišljena kot \"ključ oken\" na strojni opremi računalnika. Pričakovano je, da je vrednost določena privzeto ali pa ni določena."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:15
|
||||
msgid "When true, instead of having independent titlebars, modal dialogs appear attached to the titlebar of the parent window and are moved together with the parent window."
|
||||
msgstr "Izbrana možnost omogoči, da je namesto samostojnih nazivnih vrstic, na to mesto pripeto modalno pogovorno okno, ki se premika z nadrejenim oknom."
|
||||
|
||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:16
|
||||
msgid "Workspaces only on primary"
|
||||
msgstr "Delovne površine le na prvem zaslonu"
|
||||
|
||||
#: ../src/tools/mutter-message.c:123
|
||||
#, c-format
|
||||
msgid "Usage: %s\n"
|
||||
msgstr "Uporaba: %s\n"
|
||||
|
||||
#: ../src/ui/frames.c:1158
|
||||
#: ../src/ui/frames.c:1157
|
||||
msgid "Close Window"
|
||||
msgstr "Zapri okno"
|
||||
|
||||
# G:1 K:1 O:0
|
||||
#: ../src/ui/frames.c:1161
|
||||
#: ../src/ui/frames.c:1160
|
||||
msgid "Window Menu"
|
||||
msgstr "Meni okna"
|
||||
|
||||
# G:0 K:1 O:0
|
||||
#: ../src/ui/frames.c:1164
|
||||
#: ../src/ui/frames.c:1163
|
||||
msgid "Minimize Window"
|
||||
msgstr "Skrči okno"
|
||||
|
||||
#: ../src/ui/frames.c:1167
|
||||
#: ../src/ui/frames.c:1166
|
||||
msgid "Maximize Window"
|
||||
msgstr "Razpni okno"
|
||||
|
||||
#: ../src/ui/frames.c:1170
|
||||
#: ../src/ui/frames.c:1169
|
||||
msgid "Restore Window"
|
||||
msgstr "Obnovi okno"
|
||||
|
||||
# G:2 K:0 O:0
|
||||
#: ../src/ui/frames.c:1173
|
||||
#: ../src/ui/frames.c:1172
|
||||
msgid "Roll Up Window"
|
||||
msgstr "Zavij okno"
|
||||
|
||||
#: ../src/ui/frames.c:1176
|
||||
#: ../src/ui/frames.c:1175
|
||||
msgid "Unroll Window"
|
||||
msgstr "Odvij okno"
|
||||
|
||||
#: ../src/ui/frames.c:1179
|
||||
#: ../src/ui/frames.c:1178
|
||||
msgid "Keep Window On Top"
|
||||
msgstr "Ohrani okno na vrhu"
|
||||
|
||||
#: ../src/ui/frames.c:1182
|
||||
#: ../src/ui/frames.c:1181
|
||||
msgid "Remove Window From Top"
|
||||
msgstr "Odstrani okno z vrha"
|
||||
|
||||
# G:1 K:0 O:0
|
||||
#: ../src/ui/frames.c:1185
|
||||
#: ../src/ui/frames.c:1184
|
||||
msgid "Always On Visible Workspace"
|
||||
msgstr "Vedno na vidni delovni površini"
|
||||
|
||||
#: ../src/ui/frames.c:1188
|
||||
#: ../src/ui/frames.c:1187
|
||||
msgid "Put Window On Only One Workspace"
|
||||
msgstr "Postavi okno na samo eno delovno površino"
|
||||
|
||||
|
1045
po/sr@latin.po
1045
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1091
po/zh_CN.po
1091
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1178
po/zh_HK.po
1178
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
1182
po/zh_TW.po
1182
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -1,15 +0,0 @@
|
||||
<?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,6 +27,8 @@ INCLUDES= \
|
||||
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
|
||||
|
||||
mutter_built_sources = \
|
||||
mutter-marshal.h \
|
||||
mutter-marshal.c \
|
||||
mutter-enum-types.h \
|
||||
mutter-enum-types.c
|
||||
|
||||
@@ -52,6 +54,7 @@ libmutter_la_SOURCES = \
|
||||
compositor/meta-shadow-factory.c \
|
||||
compositor/meta-shadow-factory-private.h \
|
||||
compositor/meta-shaped-texture.c \
|
||||
compositor/meta-shaped-texture.h \
|
||||
compositor/meta-texture-rectangle.c \
|
||||
compositor/meta-texture-rectangle.h \
|
||||
compositor/meta-texture-tower.c \
|
||||
@@ -130,6 +133,8 @@ libmutter_la_SOURCES = \
|
||||
core/core.h \
|
||||
ui/ui.h \
|
||||
inlinepixbufs.h \
|
||||
ui/fixedtip.c \
|
||||
ui/fixedtip.h \
|
||||
ui/frames.c \
|
||||
ui/frames.h \
|
||||
ui/menu.c \
|
||||
@@ -169,7 +174,6 @@ libmutterinclude_base_headers = \
|
||||
meta/main.h \
|
||||
meta/meta-background-actor.h \
|
||||
meta/meta-plugin.h \
|
||||
meta/meta-shaped-texture.h \
|
||||
meta/meta-shadow-factory.h \
|
||||
meta/meta-window-actor.h \
|
||||
meta/prefs.h \
|
||||
@@ -257,11 +261,6 @@ 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@
|
||||
@@ -280,7 +279,6 @@ CLEANFILES = \
|
||||
mutter.desktop \
|
||||
mutter-wm.desktop \
|
||||
org.gnome.mutter.gschema.xml \
|
||||
$(xml_DATA) \
|
||||
$(mutter_built_sources) \
|
||||
$(typelib_DATA) \
|
||||
$(gir_DATA)
|
||||
@@ -297,18 +295,38 @@ 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-enum-types.c.in \
|
||||
mutter-marshal.list
|
||||
|
||||
BUILT_SOURCES += $(mutter_built_sources)
|
||||
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
|
||||
MUTTER_STAMP_FILES = stamp-mutter-marshal.h 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
|
||||
|
@@ -55,6 +55,9 @@ struct _MetaCompScreen
|
||||
};
|
||||
|
||||
void meta_switch_workspace_completed (MetaScreen *screen);
|
||||
void meta_set_stage_input_region (MetaScreen *screen,
|
||||
XserverRegion region);
|
||||
void meta_empty_stage_input_region (MetaScreen *screen);
|
||||
|
||||
gboolean meta_begin_modal_for_plugin (MetaScreen *screen,
|
||||
MetaPlugin *plugin,
|
||||
|
@@ -515,15 +515,13 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
|
||||
|
||||
meta_screen_set_cm_selection (screen);
|
||||
|
||||
info->stage = clutter_stage_new ();
|
||||
info->stage = clutter_stage_get_default ();
|
||||
|
||||
meta_screen_get_size (screen, &width, &height);
|
||||
clutter_actor_realize (info->stage);
|
||||
clutter_actor_set_size (info->stage, width, height);
|
||||
|
||||
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||
|
||||
XResizeWindow (xdisplay, xwin, width, height);
|
||||
|
||||
event_mask = FocusChangeMask |
|
||||
ExposureMask |
|
||||
EnterWindowMask | LeaveWindowMask |
|
||||
@@ -1141,18 +1139,12 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
|
||||
guint width,
|
||||
guint height)
|
||||
{
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
Display *xdisplay;
|
||||
Window xwin;
|
||||
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
|
||||
|
||||
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
|
||||
g_return_if_fail (info);
|
||||
|
||||
xdisplay = meta_display_get_xdisplay (display);
|
||||
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
|
||||
|
||||
XResizeWindow (xdisplay, xwin, width, height);
|
||||
clutter_actor_set_size (info->stage, width, height);
|
||||
|
||||
meta_background_actor_screen_size_changed (screen);
|
||||
|
||||
|
@@ -28,9 +28,6 @@
|
||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||
|
||||
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#include "cogl-utils.h"
|
||||
@@ -255,8 +252,6 @@ meta_background_actor_dispose (GObject *object)
|
||||
cogl_handle_unref (priv->material);
|
||||
priv->material = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (meta_background_actor_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -542,11 +537,9 @@ meta_background_actor_update (MetaScreen *screen)
|
||||
if (root_pixmap_id != None)
|
||||
{
|
||||
CoglHandle texture;
|
||||
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||
GError *error = NULL;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
texture = cogl_texture_pixmap_x11_new (ctx, root_pixmap_id, FALSE, &error);
|
||||
texture = cogl_texture_pixmap_x11_new (root_pixmap_id, FALSE);
|
||||
meta_error_trap_pop (display);
|
||||
|
||||
if (texture != COGL_INVALID_HANDLE)
|
||||
@@ -557,12 +550,6 @@ meta_background_actor_update (MetaScreen *screen)
|
||||
background->have_pixmap = True;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Failed to create background texture from pixmap: %s",
|
||||
error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
|
||||
background->have_pixmap = False;
|
||||
|
@@ -263,6 +263,38 @@ meta_plugin_get_info (MetaPlugin *plugin)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_overlay_group (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_overlay_group_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_stage (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_stage_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_window_group (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_window_group_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_background_actor (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_background_actor_for_screen (priv->screen);
|
||||
}
|
||||
|
||||
/**
|
||||
* _meta_plugin_effect_started:
|
||||
* @plugin: the plugin
|
||||
@@ -283,7 +315,7 @@ meta_plugin_switch_workspace_completed (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
MetaScreen *screen = priv->screen;
|
||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||
|
||||
if (priv->running-- < 0)
|
||||
{
|
||||
@@ -357,6 +389,80 @@ meta_plugin_destroy_completed (MetaPlugin *plugin,
|
||||
meta_plugin_window_effect_completed (plugin, actor, META_PLUGIN_DESTROY);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_query_screen_size (MetaPlugin *plugin,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
meta_screen_get_size (priv->screen, width, height);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_reactive (MetaPlugin *plugin,
|
||||
gboolean reactive)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = priv->screen;
|
||||
|
||||
if (reactive)
|
||||
meta_set_stage_input_region (screen, None);
|
||||
else
|
||||
meta_empty_stage_input_region (screen);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_input_area (MetaPlugin *plugin,
|
||||
gint x, gint y, gint width, gint height)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = priv->screen;
|
||||
MetaDisplay *display = meta_screen_get_display (screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
XRectangle rect;
|
||||
XserverRegion region;
|
||||
|
||||
rect.x = x;
|
||||
rect.y = y;
|
||||
rect.width = width;
|
||||
rect.height = height;
|
||||
|
||||
region = XFixesCreateRegion (xdpy, &rect, 1);
|
||||
meta_set_stage_input_region (screen, region);
|
||||
XFixesDestroyRegion (xdpy, region);
|
||||
}
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_input_region (MetaPlugin *plugin,
|
||||
XserverRegion region)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = priv->screen;
|
||||
|
||||
meta_set_stage_input_region (screen, region);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_get_window_actors:
|
||||
* @plugin: A #MetaPlugin
|
||||
*
|
||||
* This function returns all of the #MetaWindowActor objects referenced by Mutter, including
|
||||
* override-redirect windows. The returned list is a snapshot of Mutter's current
|
||||
* stacking order, with the topmost window last.
|
||||
*
|
||||
* The 'restacked' signal of #MetaScreen signals when this value has changed.
|
||||
*
|
||||
* Returns: (transfer none) (element-type MetaWindowActor): Windows in stacking order, topmost last
|
||||
*/
|
||||
GList *
|
||||
meta_plugin_get_window_actors (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
|
||||
return meta_get_window_actors (priv->screen);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_begin_modal:
|
||||
* @plugin: a #MetaPlugin
|
||||
@@ -415,6 +521,16 @@ meta_plugin_end_modal (MetaPlugin *plugin,
|
||||
meta_end_modal_for_plugin (priv->screen, plugin, timestamp);
|
||||
}
|
||||
|
||||
Display *
|
||||
meta_plugin_get_xdisplay (MetaPlugin *plugin)
|
||||
{
|
||||
MetaPluginPrivate *priv = META_PLUGIN (plugin)->priv;
|
||||
MetaDisplay *display = meta_screen_get_display (priv->screen);
|
||||
Display *xdpy = meta_display_get_xdisplay (display);
|
||||
|
||||
return xdpy;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_plugin_get_screen:
|
||||
* @plugin: a #MetaPlugin
|
||||
|
@@ -442,7 +442,8 @@ meta_shadow_factory_class_init (MetaShadowFactoryClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
|
@@ -25,41 +25,32 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
|
||||
#include <meta/meta-shaped-texture.h>
|
||||
#include "meta-shaped-texture.h"
|
||||
#include "meta-texture-tower.h"
|
||||
#include "meta-texture-rectangle.h"
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <cogl/cogl.h>
|
||||
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||
#include <gdk/gdk.h> /* for gdk_rectangle_intersect() */
|
||||
#include <string.h>
|
||||
|
||||
static void meta_shaped_texture_dispose (GObject *object);
|
||||
static void meta_shaped_texture_notify (GObject *object,
|
||||
GParamSpec *pspec);
|
||||
|
||||
static void meta_shaped_texture_paint (ClutterActor *actor);
|
||||
static void meta_shaped_texture_pick (ClutterActor *actor,
|
||||
const ClutterColor *color);
|
||||
|
||||
static void meta_shaped_texture_get_preferred_width (ClutterActor *self,
|
||||
gfloat for_height,
|
||||
gfloat *min_width_p,
|
||||
gfloat *natural_width_p);
|
||||
|
||||
static void meta_shaped_texture_get_preferred_height (ClutterActor *self,
|
||||
gfloat for_width,
|
||||
gfloat *min_height_p,
|
||||
gfloat *natural_height_p);
|
||||
static void meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex);
|
||||
|
||||
static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, ClutterPaintVolume *volume);
|
||||
|
||||
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||
CLUTTER_TYPE_ACTOR);
|
||||
CLUTTER_X11_TYPE_TEXTURE_PIXMAP);
|
||||
|
||||
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
|
||||
@@ -68,8 +59,6 @@ G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||
struct _MetaShapedTexturePrivate
|
||||
{
|
||||
MetaTextureTower *paint_tower;
|
||||
Pixmap pixmap;
|
||||
CoglHandle texture;
|
||||
CoglHandle mask_texture;
|
||||
CoglHandle material;
|
||||
CoglHandle material_unshaped;
|
||||
@@ -80,7 +69,8 @@ struct _MetaShapedTexturePrivate
|
||||
cairo_region_t *overlay_region;
|
||||
cairo_path_t *overlay_path;
|
||||
|
||||
guint tex_width, tex_height;
|
||||
cairo_region_t *visible_pixels_region;
|
||||
|
||||
guint mask_width, mask_height;
|
||||
|
||||
guint create_mipmaps : 1;
|
||||
@@ -91,14 +81,15 @@ meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class = (GObjectClass *) klass;
|
||||
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
|
||||
ClutterX11TexturePixmapClass *x11_texture_class = (ClutterX11TexturePixmapClass *) klass;
|
||||
|
||||
gobject_class->dispose = meta_shaped_texture_dispose;
|
||||
gobject_class->notify = meta_shaped_texture_notify;
|
||||
|
||||
actor_class->get_preferred_width = meta_shaped_texture_get_preferred_width;
|
||||
actor_class->get_preferred_height = meta_shaped_texture_get_preferred_height;
|
||||
actor_class->paint = meta_shaped_texture_paint;
|
||||
actor_class->pick = meta_shaped_texture_pick;
|
||||
actor_class->get_paint_volume = meta_shaped_texture_get_paint_volume;
|
||||
|
||||
x11_texture_class->update_area = meta_shaped_texture_update_area;
|
||||
|
||||
g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate));
|
||||
}
|
||||
@@ -113,8 +104,8 @@ meta_shaped_texture_init (MetaShapedTexture *self)
|
||||
priv->shape_region = NULL;
|
||||
priv->overlay_path = NULL;
|
||||
priv->overlay_region = NULL;
|
||||
priv->visible_pixels_region = NULL;
|
||||
priv->paint_tower = meta_texture_tower_new ();
|
||||
priv->texture = COGL_INVALID_HANDLE;
|
||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||
priv->create_mipmaps = TRUE;
|
||||
}
|
||||
@@ -141,11 +132,6 @@ meta_shaped_texture_dispose (GObject *object)
|
||||
cogl_handle_unref (priv->material_unshaped);
|
||||
priv->material_unshaped = COGL_INVALID_HANDLE;
|
||||
}
|
||||
if (priv->texture != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (priv->texture);
|
||||
priv->texture = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
meta_shaped_texture_set_shape_region (self, NULL);
|
||||
meta_shaped_texture_set_clip_region (self, NULL);
|
||||
@@ -154,19 +140,114 @@ meta_shaped_texture_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_notify (GObject *object,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
if (G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify)
|
||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->notify (object, pspec);
|
||||
|
||||
/* It seems like we could just do this out of update_area(), but unfortunately,
|
||||
* clutter_glx_texture_pixmap() doesn't call through the vtable on the
|
||||
* initial update_area, so we need to look for changes to the texture
|
||||
* explicitly.
|
||||
*/
|
||||
if (strcmp (pspec->name, "cogl-texture") == 0)
|
||||
{
|
||||
MetaShapedTexture *stex = (MetaShapedTexture *) object;
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
|
||||
meta_shaped_texture_clear (stex);
|
||||
|
||||
if (priv->create_mipmaps)
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower,
|
||||
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_dirty_mask (MetaShapedTexture *stex)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
|
||||
if (priv->mask_texture != COGL_INVALID_HANDLE)
|
||||
if (priv->visible_pixels_region != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->mask_texture);
|
||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||
}
|
||||
cairo_region_destroy (priv->visible_pixels_region);
|
||||
priv->visible_pixels_region = NULL;
|
||||
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material, 1, COGL_INVALID_HANDLE);
|
||||
if (priv->mask_texture != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (priv->mask_texture);
|
||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material, 1, COGL_INVALID_HANDLE);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
scan_visible_region (MetaShapedTexture *stex,
|
||||
guchar *mask_data,
|
||||
int stride)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
cairo_region_t *visible_pixels_region;
|
||||
cairo_region_t *overlay_region;
|
||||
int i, n_rects;
|
||||
|
||||
/* The visible pixels region contains all pixel values above 0.
|
||||
* This is somewhat complicated when there's an overlay: we
|
||||
* need to scan all regions potentially modified by it.
|
||||
*/
|
||||
|
||||
if (priv->visible_pixels_region)
|
||||
cairo_region_destroy (priv->visible_pixels_region);
|
||||
|
||||
priv->visible_pixels_region = cairo_region_copy (priv->shape_region);
|
||||
|
||||
visible_pixels_region = priv->visible_pixels_region;
|
||||
overlay_region = priv->overlay_region;
|
||||
|
||||
/* With no overlay region, the visible region is defined
|
||||
* by the mask region, so we don't need to scan anything. */
|
||||
if (overlay_region == NULL)
|
||||
return;
|
||||
|
||||
/* Subtract all the rectangles in the overlay region so that we can
|
||||
* scan all the pixels potentially added by the overlay path. */
|
||||
cairo_region_subtract (visible_pixels_region, overlay_region);
|
||||
|
||||
n_rects = cairo_region_num_rectangles (overlay_region);
|
||||
|
||||
for (i = 0; i < n_rects; i++)
|
||||
{
|
||||
int x, y;
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
cairo_region_get_rectangle (overlay_region, i, &rect);
|
||||
|
||||
for (y = rect.y; y < (rect.y + rect.height); y++)
|
||||
{
|
||||
for (x = rect.x; x < (rect.x + rect.width); x++)
|
||||
{
|
||||
int w = x;
|
||||
while (mask_data[y * stride + w] > 0 && w < (rect.x + rect.width))
|
||||
w++;
|
||||
|
||||
if (w > 0)
|
||||
{
|
||||
cairo_rectangle_int_t tmp;
|
||||
tmp.x = x;
|
||||
tmp.y = y;
|
||||
tmp.width = w - x;
|
||||
tmp.height = 1;
|
||||
cairo_region_union_rectangle (visible_pixels_region, &tmp);
|
||||
x = w;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -229,7 +310,7 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
||||
CoglHandle paint_tex;
|
||||
guint tex_width, tex_height;
|
||||
|
||||
paint_tex = priv->texture;
|
||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||
|
||||
if (paint_tex == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
@@ -244,7 +325,7 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
||||
meta_shaped_texture_dirty_mask (stex);
|
||||
|
||||
/* If we don't have a mask texture yet then create one */
|
||||
if (priv->mask_texture == COGL_INVALID_HANDLE)
|
||||
if (priv->visible_pixels_region == NULL)
|
||||
{
|
||||
guchar *mask_data;
|
||||
int i;
|
||||
@@ -258,6 +339,10 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
||||
(priv->overlay_region == NULL ||
|
||||
cairo_region_num_rectangles (priv->overlay_region) == 0))
|
||||
{
|
||||
/* With no mask, the visible region is just
|
||||
* {0, 0, tex_width, tex_height}. */
|
||||
cairo_rectangle_int_t rect = { 0, 0, tex_width, tex_height };
|
||||
priv->visible_pixels_region = cairo_region_create_rectangle (&rect);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -292,6 +377,7 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
||||
}
|
||||
|
||||
install_overlay_path (stex, mask_data, tex_width, tex_height, stride);
|
||||
scan_visible_region (stex, mask_data, stride);
|
||||
|
||||
cogl_texture_get_gl_texture (paint_tex, NULL, &paint_gl_target);
|
||||
|
||||
@@ -365,13 +451,13 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
||||
if (priv->create_mipmaps)
|
||||
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
|
||||
else
|
||||
paint_tex = priv->texture;
|
||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||
|
||||
if (paint_tex == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
|
||||
tex_width = priv->tex_width;
|
||||
tex_height = priv->tex_height;
|
||||
tex_width = cogl_texture_get_width (paint_tex);
|
||||
tex_height = cogl_texture_get_height (paint_tex);
|
||||
|
||||
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
||||
return;
|
||||
@@ -426,7 +512,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
||||
{
|
||||
int n_rects;
|
||||
int i;
|
||||
cairo_rectangle_int_t tex_rect = { 0, 0, tex_width, tex_height };
|
||||
|
||||
/* Limit to how many separate rectangles we'll draw; beyond this just
|
||||
* fall back and draw the whole thing */
|
||||
@@ -444,9 +529,6 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
||||
|
||||
cairo_region_get_rectangle (priv->clip_region, i, &rect);
|
||||
|
||||
if (!gdk_rectangle_intersect (&tex_rect, &rect, &rect))
|
||||
continue;
|
||||
|
||||
x1 = rect.x;
|
||||
y1 = rect.y;
|
||||
x2 = rect.x + rect.width;
|
||||
@@ -492,7 +574,7 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
||||
ClutterActorBox alloc;
|
||||
guint tex_width, tex_height;
|
||||
|
||||
paint_tex = priv->texture;
|
||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
||||
|
||||
if (paint_tex == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
@@ -520,48 +602,19 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_get_preferred_width (ClutterActor *self,
|
||||
gfloat for_height,
|
||||
gfloat *min_width_p,
|
||||
gfloat *natural_width_p)
|
||||
meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
MetaShapedTexture *stex = (MetaShapedTexture *) texture;
|
||||
MetaShapedTexturePrivate *priv = stex->priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
|
||||
CLUTTER_X11_TEXTURE_PIXMAP_CLASS (meta_shaped_texture_parent_class)->update_area (texture,
|
||||
x, y, width, height);
|
||||
|
||||
priv = META_SHAPED_TEXTURE (self)->priv;
|
||||
|
||||
if (min_width_p)
|
||||
*min_width_p = 0;
|
||||
|
||||
if (natural_width_p)
|
||||
*natural_width_p = priv->tex_width;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_shaped_texture_get_preferred_height (ClutterActor *self,
|
||||
gfloat for_width,
|
||||
gfloat *min_height_p,
|
||||
gfloat *natural_height_p)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
|
||||
|
||||
priv = META_SHAPED_TEXTURE (self)->priv;
|
||||
|
||||
if (min_height_p)
|
||||
*min_height_p = 0;
|
||||
|
||||
if (natural_height_p)
|
||||
*natural_height_p = priv->tex_height;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_shaped_texture_get_paint_volume (ClutterActor *self,
|
||||
ClutterPaintVolume *volume)
|
||||
{
|
||||
return clutter_paint_volume_set_from_allocation (volume, self);
|
||||
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
|
||||
}
|
||||
|
||||
ClutterActor *
|
||||
@@ -587,13 +640,50 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
||||
if (create_mipmaps != priv->create_mipmaps)
|
||||
{
|
||||
CoglHandle base_texture;
|
||||
|
||||
priv->create_mipmaps = create_mipmaps;
|
||||
|
||||
base_texture = create_mipmaps ?
|
||||
priv->texture : COGL_INVALID_HANDLE;
|
||||
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)) : COGL_INVALID_HANDLE;
|
||||
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is a workaround for deficiencies in the hack tower:
|
||||
*
|
||||
* When we call clutter_x11_texture_pixmap_set_pixmap(tp, None),
|
||||
* ClutterX11TexturePixmap knows that it has to get rid of the old texture, but
|
||||
* clutter_texture_set_cogl_texture(texture, COGL_INVALID_HANDLE) isn't allowed, so
|
||||
* it grabs the material for the texture and manually sets the texture in it. This means
|
||||
* that the "cogl-texture" property isn't notified, so we don't find out about it.
|
||||
*
|
||||
* And if we keep the CoglX11TexturePixmap around after the X pixmap is freed, then
|
||||
* we'll trigger X errors when we actually try to free it.
|
||||
*
|
||||
* The only correct thing to do here is to change our code to derive
|
||||
* from ClutterActor and get rid of the inheritance hack tower. Once
|
||||
* we want to depend on Clutter-1.4 (which has CoglTexturePixmapX11),
|
||||
* that will be very easy to do.
|
||||
*/
|
||||
void
|
||||
meta_shaped_texture_clear (MetaShapedTexture *stex)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower, COGL_INVALID_HANDLE);
|
||||
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material, 0, COGL_INVALID_HANDLE);
|
||||
|
||||
if (priv->material_unshaped != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material_unshaped, 0, COGL_INVALID_HANDLE);
|
||||
}
|
||||
|
||||
void
|
||||
meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
||||
cairo_region_t *region)
|
||||
@@ -620,119 +710,22 @@ meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||
}
|
||||
|
||||
void
|
||||
meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
const cairo_rectangle_int_t clip = { x, y, width, height };
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
if (priv->texture == COGL_INVALID_HANDLE)
|
||||
return;
|
||||
|
||||
cogl_texture_pixmap_x11_update_area (priv->texture, x, y, width, height);
|
||||
|
||||
meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
|
||||
|
||||
clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
|
||||
}
|
||||
|
||||
static void
|
||||
set_cogl_texture (MetaShapedTexture *stex,
|
||||
CoglHandle cogl_tex)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
guint width, height;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
if (priv->texture != COGL_INVALID_HANDLE)
|
||||
cogl_handle_unref (priv->texture);
|
||||
|
||||
priv->texture = cogl_tex;
|
||||
|
||||
if (priv->material != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material, 0, cogl_tex);
|
||||
|
||||
if (priv->material_unshaped != COGL_INVALID_HANDLE)
|
||||
cogl_material_set_layer (priv->material_unshaped, 0, cogl_tex);
|
||||
|
||||
if (cogl_tex != COGL_INVALID_HANDLE)
|
||||
{
|
||||
width = cogl_texture_get_width (cogl_tex);
|
||||
height = cogl_texture_get_height (cogl_tex);
|
||||
|
||||
if (width != priv->tex_width ||
|
||||
height != priv->tex_height)
|
||||
{
|
||||
priv->tex_width = width;
|
||||
priv->tex_height = height;
|
||||
|
||||
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* size changed to 0 going to an invalid handle */
|
||||
priv->tex_width = 0;
|
||||
priv->tex_height = 0;
|
||||
clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
|
||||
}
|
||||
|
||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shaped_texture_set_pixmap:
|
||||
* @stex: The #MetaShapedTexture
|
||||
* @pixmap: The pixmap you want the stex to assume
|
||||
*/
|
||||
void
|
||||
meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
|
||||
Pixmap pixmap)
|
||||
{
|
||||
MetaShapedTexturePrivate *priv;
|
||||
|
||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||
|
||||
priv = stex->priv;
|
||||
|
||||
if (priv->pixmap == pixmap)
|
||||
return;
|
||||
|
||||
priv->pixmap = pixmap;
|
||||
|
||||
if (pixmap != None)
|
||||
{
|
||||
CoglContext *ctx =
|
||||
clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||
set_cogl_texture (stex, cogl_texture_pixmap_x11_new (ctx, pixmap, FALSE, NULL));
|
||||
}
|
||||
else
|
||||
set_cogl_texture (stex, COGL_INVALID_HANDLE);
|
||||
|
||||
if (priv->create_mipmaps)
|
||||
meta_texture_tower_set_base_texture (priv->paint_tower, priv->texture);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shaped_texture_get_texture:
|
||||
* @stex: The #MetaShapedTexture
|
||||
* meta_shaped_texture_get_visible_pixels_region:
|
||||
* @stex: a #MetaShapedTexture
|
||||
*
|
||||
* Returns: (transfer none): the unshaped texture
|
||||
* Return a region enclosing only visible pixels: those with
|
||||
* alpha values above 0.
|
||||
*
|
||||
* Returns: a #cairo_region_t
|
||||
*/
|
||||
CoglHandle
|
||||
meta_shaped_texture_get_texture (MetaShapedTexture *stex)
|
||||
cairo_region_t *
|
||||
meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex)
|
||||
{
|
||||
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), COGL_INVALID_HANDLE);
|
||||
return stex->priv->texture;
|
||||
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
|
||||
|
||||
meta_shaped_texture_ensure_mask (stex);
|
||||
return stex->priv->visible_pixels_region;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -741,7 +734,7 @@ meta_shaped_texture_get_texture (MetaShapedTexture *stex)
|
||||
* @overlay_region: A region containing the parts of the mask to overlay.
|
||||
* All rectangles in this region are wiped clear to full transparency,
|
||||
* and the overlay path is clipped to this region.
|
||||
* @overlay_path: (transfer full): This path will be painted onto the mask
|
||||
* @overlay_path (transfer full): This path will be painted onto the mask
|
||||
* texture with a fully opaque source. Due to the lack of refcounting
|
||||
* in #cairo_path_t, ownership of the path is assumed.
|
||||
*/
|
||||
@@ -779,9 +772,10 @@ meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
||||
|
||||
/**
|
||||
* meta_shaped_texture_set_clip_region:
|
||||
* @stex: a #MetaShapedTexture
|
||||
* @frame: a #MetaShapedTexture
|
||||
* @clip_region: (transfer full): the region of the texture that
|
||||
* is visible and should be painted.
|
||||
* is visible and should be painted. OWNERSHIP IS ASSUMED BY
|
||||
* THE FUNCTION (for efficiency to avoid a copy.)
|
||||
*
|
||||
* Provides a hint to the texture about what areas of the texture
|
||||
* are not completely obscured and thus need to be painted. This
|
||||
@@ -807,106 +801,5 @@ meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
||||
priv->clip_region = NULL;
|
||||
}
|
||||
|
||||
if (clip_region)
|
||||
priv->clip_region = cairo_region_copy (clip_region);
|
||||
else
|
||||
priv->clip_region = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_shaped_texture_get_image:
|
||||
* @stex: A #MetaShapedTexture
|
||||
* @clip: A clipping rectangle, to help prevent extra processing.
|
||||
* In the case that the clipping rectangle is partially or fully
|
||||
* outside the bounds of the texture, the rectangle will be clipped.
|
||||
*
|
||||
* Flattens the two layers of the shaped texture into one ARGB32
|
||||
* image by alpha blending the two images, and returns the flattened
|
||||
* image.
|
||||
*
|
||||
* Returns: (transfer full): a new cairo surface to be freed with
|
||||
* cairo_surface_destroy().
|
||||
*/
|
||||
cairo_surface_t *
|
||||
meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
cairo_rectangle_int_t *clip)
|
||||
{
|
||||
CoglHandle texture, mask_texture;
|
||||
cairo_rectangle_int_t texture_rect = { 0, 0, 0, 0 };
|
||||
cairo_surface_t *surface;
|
||||
|
||||
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
|
||||
|
||||
texture = stex->priv->texture;
|
||||
|
||||
if (texture == NULL)
|
||||
return NULL;
|
||||
|
||||
texture_rect.width = cogl_texture_get_width (texture);
|
||||
texture_rect.height = cogl_texture_get_height (texture);
|
||||
|
||||
if (clip != NULL)
|
||||
{
|
||||
/* GdkRectangle is just a typedef of cairo_rectangle_int_t,
|
||||
* so we can use the gdk_rectangle_* APIs on these. */
|
||||
if (!gdk_rectangle_intersect (&texture_rect, clip, clip))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (clip != NULL)
|
||||
texture = cogl_texture_new_from_sub_texture (texture,
|
||||
clip->x,
|
||||
clip->y,
|
||||
clip->width,
|
||||
clip->height);
|
||||
|
||||
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
cogl_texture_get_width (texture),
|
||||
cogl_texture_get_height (texture));
|
||||
|
||||
cogl_texture_get_data (texture, CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
cairo_image_surface_get_stride (surface),
|
||||
cairo_image_surface_get_data (surface));
|
||||
|
||||
cairo_surface_mark_dirty (surface);
|
||||
|
||||
if (clip != NULL)
|
||||
cogl_object_unref (texture);
|
||||
|
||||
mask_texture = stex->priv->mask_texture;
|
||||
if (mask_texture != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cairo_t *cr;
|
||||
cairo_surface_t *mask_surface;
|
||||
|
||||
if (clip != NULL)
|
||||
mask_texture = cogl_texture_new_from_sub_texture (mask_texture,
|
||||
clip->x,
|
||||
clip->y,
|
||||
clip->width,
|
||||
clip->height);
|
||||
|
||||
mask_surface = cairo_image_surface_create (CAIRO_FORMAT_A8,
|
||||
cogl_texture_get_width (mask_texture),
|
||||
cogl_texture_get_height (mask_texture));
|
||||
|
||||
cogl_texture_get_data (mask_texture, COGL_PIXEL_FORMAT_A_8,
|
||||
cairo_image_surface_get_stride (mask_surface),
|
||||
cairo_image_surface_get_data (mask_surface));
|
||||
|
||||
cairo_surface_mark_dirty (mask_surface);
|
||||
|
||||
cr = cairo_create (surface);
|
||||
cairo_set_source_surface (cr, mask_surface, 0, 0);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_DEST_IN);
|
||||
cairo_paint (cr);
|
||||
cairo_destroy (cr);
|
||||
|
||||
cairo_surface_destroy (mask_surface);
|
||||
|
||||
if (clip != NULL)
|
||||
cogl_object_unref (mask_texture);
|
||||
}
|
||||
|
||||
return surface;
|
||||
priv->clip_region = clip_region;
|
||||
}
|
||||
|
@@ -26,8 +26,10 @@
|
||||
#ifndef __META_SHAPED_TEXTURE_H__
|
||||
#define __META_SHAPED_TEXTURE_H__
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
@@ -44,12 +46,12 @@ typedef struct _MetaShapedTexturePrivate MetaShapedTexturePrivate;
|
||||
|
||||
struct _MetaShapedTextureClass
|
||||
{
|
||||
ClutterActorClass parent_class;
|
||||
ClutterX11TexturePixmapClass parent_class;
|
||||
};
|
||||
|
||||
struct _MetaShapedTexture
|
||||
{
|
||||
ClutterActor parent;
|
||||
ClutterX11TexturePixmap parent;
|
||||
|
||||
MetaShapedTexturePrivate *priv;
|
||||
};
|
||||
@@ -61,20 +63,13 @@ ClutterActor *meta_shaped_texture_new (void);
|
||||
void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
||||
gboolean create_mipmaps);
|
||||
|
||||
void meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
void meta_shaped_texture_set_pixmap (MetaShapedTexture *stex,
|
||||
Pixmap pixmap);
|
||||
|
||||
CoglHandle meta_shaped_texture_get_texture (MetaShapedTexture *stex);
|
||||
void meta_shaped_texture_clear (MetaShapedTexture *stex);
|
||||
|
||||
void meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
||||
cairo_region_t *region);
|
||||
|
||||
cairo_region_t *meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex);
|
||||
|
||||
void meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
||||
cairo_region_t *overlay_region,
|
||||
cairo_path_t *overlay_path);
|
||||
@@ -83,9 +78,6 @@ void meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
||||
void meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
||||
cairo_region_t *clip_region);
|
||||
|
||||
cairo_surface_t * meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||
cairo_rectangle_int_t *clip);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __META_SHAPED_TEXTURE_H__ */
|
@@ -18,11 +18,11 @@
|
||||
#include <meta/errors.h>
|
||||
#include "frame.h"
|
||||
#include <meta/window.h>
|
||||
#include <meta/meta-shaped-texture.h>
|
||||
#include "xprops.h"
|
||||
|
||||
#include "compositor-private.h"
|
||||
#include "meta-shadow-factory-private.h"
|
||||
#include "meta-shaped-texture.h"
|
||||
#include "meta-window-actor-private.h"
|
||||
|
||||
enum {
|
||||
@@ -232,13 +232,15 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
|
||||
g_signal_new ("position-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL, NULL,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
signals[SIZE_CHANGED] =
|
||||
g_signal_new ("size-changed",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0, NULL, NULL, NULL,
|
||||
0, NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
@@ -739,13 +741,6 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
|
||||
meta_window_is_fullscreen (priv->window))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* If we have two snap-tiled windows, we don't want the shadow to obstruct
|
||||
* the other window.
|
||||
*/
|
||||
if (meta_window_get_tile_match (priv->window))
|
||||
return FALSE;
|
||||
|
||||
/*
|
||||
* Always put a shadow around windows with a frame - This should override
|
||||
* the restriction about not putting a shadow around ARGB windows.
|
||||
@@ -951,20 +946,26 @@ static void
|
||||
meta_window_actor_damage_all (MetaWindowActor *self)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
CoglHandle texture;
|
||||
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
||||
guint pixmap_width = 0;
|
||||
guint pixmap_height = 0;
|
||||
|
||||
if (!priv->needs_damage_all)
|
||||
return;
|
||||
|
||||
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
|
||||
g_object_get (texture_x11,
|
||||
"pixmap-width", &pixmap_width,
|
||||
"pixmap-height", &pixmap_height,
|
||||
NULL);
|
||||
|
||||
if (!priv->mapped || priv->needs_pixmap)
|
||||
return;
|
||||
|
||||
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
|
||||
0, 0,
|
||||
cogl_texture_get_width (texture),
|
||||
cogl_texture_get_height (texture));
|
||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
||||
0,
|
||||
0,
|
||||
pixmap_width,
|
||||
pixmap_height);
|
||||
|
||||
priv->needs_damage_all = FALSE;
|
||||
}
|
||||
@@ -1203,8 +1204,9 @@ meta_window_actor_detach (MetaWindowActor *self)
|
||||
* you are supposed to be able to free a GLXPixmap after freeing the underlying
|
||||
* pixmap, but it certainly doesn't work with current DRI/Mesa
|
||||
*/
|
||||
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
|
||||
None);
|
||||
clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
|
||||
None);
|
||||
meta_shaped_texture_clear (META_SHAPED_TEXTURE (priv->actor));
|
||||
cogl_flush();
|
||||
|
||||
XFreePixmap (xdisplay, priv->back_pixmap);
|
||||
@@ -1253,24 +1255,19 @@ 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 (display);
|
||||
Display *xdisplay = meta_display_get_xdisplay (meta_window_get_display (metaWindow));
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -1616,16 +1613,24 @@ meta_window_actor_update_bounding_region_and_borders (MetaWindowActor *self,
|
||||
int height)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
MetaFrame *frame;
|
||||
MetaFrameBorders borders;
|
||||
cairo_rectangle_int_t bounding_rectangle;
|
||||
|
||||
meta_frame_calc_borders (priv->window->frame, &borders);
|
||||
bounding_rectangle.x = 0;
|
||||
bounding_rectangle.y = 0;
|
||||
|
||||
bounding_rectangle.x = borders.invisible.left;
|
||||
bounding_rectangle.y = borders.invisible.top;
|
||||
frame = priv->window->frame;
|
||||
if (frame != NULL)
|
||||
{
|
||||
meta_frame_calc_borders (frame, &borders);
|
||||
|
||||
width -= borders.invisible.left + borders.invisible.right;
|
||||
height -= borders.invisible.top + borders.invisible.bottom;
|
||||
bounding_rectangle.x = borders.invisible.left;
|
||||
bounding_rectangle.y = borders.invisible.top;
|
||||
|
||||
width -= borders.invisible.left + borders.invisible.right;
|
||||
height -= borders.invisible.top + borders.invisible.bottom;
|
||||
}
|
||||
|
||||
bounding_rectangle.width = width;
|
||||
bounding_rectangle.height = height;
|
||||
@@ -1748,9 +1753,22 @@ meta_window_actor_set_visible_region (MetaWindowActor *self,
|
||||
cairo_region_t *visible_region)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
cairo_region_t *texture_clip_region = NULL;
|
||||
|
||||
/* Get the area of the window texture that would be drawn if
|
||||
* we weren't obscured at all
|
||||
*/
|
||||
texture_clip_region = meta_shaped_texture_get_visible_pixels_region (META_SHAPED_TEXTURE (priv->actor));
|
||||
texture_clip_region = cairo_region_copy (texture_clip_region);
|
||||
|
||||
/* Then intersect that with the visible region to get the region
|
||||
* that we actually need to redraw.
|
||||
*/
|
||||
cairo_region_intersect (texture_clip_region, visible_region);
|
||||
|
||||
/* Assumes ownership */
|
||||
meta_shaped_texture_set_clip_region (META_SHAPED_TEXTURE (priv->actor),
|
||||
visible_region);
|
||||
texture_clip_region);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1802,6 +1820,19 @@ meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
||||
meta_window_actor_clear_shadow_clip (self);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
texture_pixmap_using_extension (ClutterX11TexturePixmap *texture)
|
||||
{
|
||||
ClutterTexture *self = CLUTTER_TEXTURE (texture);
|
||||
CoglHandle handle;
|
||||
|
||||
handle = clutter_texture_get_cogl_texture (self);
|
||||
|
||||
return handle != NULL &&
|
||||
cogl_is_texture_pixmap_x11 (handle) &&
|
||||
cogl_texture_pixmap_x11_is_using_tfp_extension (handle);
|
||||
}
|
||||
|
||||
static void
|
||||
check_needs_pixmap (MetaWindowActor *self)
|
||||
{
|
||||
@@ -1835,7 +1866,7 @@ check_needs_pixmap (MetaWindowActor *self)
|
||||
|
||||
if (priv->back_pixmap == None)
|
||||
{
|
||||
CoglHandle texture;
|
||||
gint pxm_width, pxm_height;
|
||||
|
||||
meta_error_trap_push (display);
|
||||
|
||||
@@ -1864,22 +1895,23 @@ check_needs_pixmap (MetaWindowActor *self)
|
||||
meta_shaped_texture_set_create_mipmaps (META_SHAPED_TEXTURE (priv->actor),
|
||||
FALSE);
|
||||
|
||||
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
|
||||
priv->back_pixmap);
|
||||
|
||||
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
|
||||
|
||||
clutter_x11_texture_pixmap_set_pixmap
|
||||
(CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
|
||||
priv->back_pixmap);
|
||||
/*
|
||||
* This only works *after* actually setting the pixmap, so we have to
|
||||
* do it here.
|
||||
* See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
|
||||
*/
|
||||
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (texture)))
|
||||
if (G_UNLIKELY (!texture_pixmap_using_extension (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor))))
|
||||
g_warning ("NOTE: Not using GLX TFP!\n");
|
||||
|
||||
meta_window_actor_update_bounding_region_and_borders (self,
|
||||
cogl_texture_get_width (texture),
|
||||
cogl_texture_get_height (texture));
|
||||
g_object_get (priv->actor,
|
||||
"pixmap-width", &pxm_width,
|
||||
"pixmap-height", &pxm_height,
|
||||
NULL);
|
||||
|
||||
meta_window_actor_update_bounding_region_and_borders (self, pxm_width, pxm_height);
|
||||
}
|
||||
|
||||
priv->needs_pixmap = FALSE;
|
||||
@@ -1972,6 +2004,7 @@ meta_window_actor_process_damage (MetaWindowActor *self,
|
||||
XDamageNotifyEvent *event)
|
||||
{
|
||||
MetaWindowActorPrivate *priv = self->priv;
|
||||
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
||||
|
||||
priv->received_damage = TRUE;
|
||||
|
||||
@@ -2002,11 +2035,11 @@ meta_window_actor_process_damage (MetaWindowActor *self,
|
||||
if (!priv->mapped || priv->needs_pixmap)
|
||||
return;
|
||||
|
||||
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
|
||||
event->area.x,
|
||||
event->area.y,
|
||||
event->area.width,
|
||||
event->area.height);
|
||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
||||
event->area.x,
|
||||
event->area.y,
|
||||
event->area.width,
|
||||
event->area.height);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -2155,7 +2188,10 @@ check_needs_reshape (MetaWindowActor *self)
|
||||
meta_shaped_texture_set_shape_region (META_SHAPED_TEXTURE (priv->actor), NULL);
|
||||
meta_window_actor_clear_shape_region (self);
|
||||
|
||||
meta_frame_calc_borders (priv->window->frame, &borders);
|
||||
if (priv->window->frame)
|
||||
meta_frame_calc_borders (priv->window->frame, &borders);
|
||||
else
|
||||
meta_frame_borders_clear (&borders);
|
||||
|
||||
region = meta_window_get_frame_bounds (priv->window);
|
||||
if (region != NULL)
|
||||
|
@@ -101,6 +101,25 @@ actor_is_untransformed (ClutterActor *actor,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#if CLUTTER_CHECK_VERSION(1, 9, 0)
|
||||
#define has_effects clutter_actor_has_effects
|
||||
#else
|
||||
|
||||
static gboolean
|
||||
has_effects(ClutterActor *actor)
|
||||
{
|
||||
GList *list;
|
||||
gboolean ret;
|
||||
|
||||
list = clutter_actor_get_effects (actor);
|
||||
ret = list != NULL;
|
||||
g_list_free (list);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static void
|
||||
meta_window_group_paint (ClutterActor *actor)
|
||||
{
|
||||
@@ -161,7 +180,7 @@ meta_window_group_paint (ClutterActor *actor)
|
||||
* as well for the same reason, but omitted for simplicity in the
|
||||
* hopes that no-one will do that.
|
||||
*/
|
||||
if (clutter_actor_has_effects (l->data))
|
||||
if (has_effects (l->data))
|
||||
continue;
|
||||
|
||||
if (META_IS_WINDOW_ACTOR (l->data))
|
||||
|
@@ -16,9 +16,3 @@ pkglib_LTLIBRARIES = default.la
|
||||
install-exec-hook:
|
||||
-rm $(DESTDIR)$(pkglibdir)/*.a
|
||||
-rm $(DESTDIR)$(pkglibdir)/*.la
|
||||
|
||||
# Since we removed the .la file, 'make uninstall' doesn't work properly,
|
||||
# since it counts on libtool to remove the .la files, so just kill the
|
||||
# .so file manually.
|
||||
uninstall-local:
|
||||
-rm -f $(DESTDIR)$(pkglibdir)/default.so
|
||||
|
@@ -284,8 +284,7 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
|
||||
{
|
||||
MetaPlugin *plugin = META_PLUGIN (data);
|
||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||
MetaScreen *screen = meta_plugin_get_screen (plugin);
|
||||
GList *l = meta_get_window_actors (screen);
|
||||
GList *l = meta_plugin_get_window_actors (plugin);
|
||||
|
||||
while (l)
|
||||
{
|
||||
@@ -318,7 +317,6 @@ switch_workspace (MetaPlugin *plugin,
|
||||
gint from, gint to,
|
||||
MetaMotionDirection direction)
|
||||
{
|
||||
MetaScreen *screen;
|
||||
MetaDefaultPluginPrivate *priv = META_DEFAULT_PLUGIN (plugin)->priv;
|
||||
GList *l;
|
||||
ClutterActor *workspace0 = clutter_group_new ();
|
||||
@@ -327,13 +325,11 @@ switch_workspace (MetaPlugin *plugin,
|
||||
int screen_width, screen_height;
|
||||
ClutterAnimation *animation;
|
||||
|
||||
screen = meta_plugin_get_screen (plugin);
|
||||
stage = meta_get_stage_for_screen (screen);
|
||||
|
||||
meta_screen_get_size (screen,
|
||||
&screen_width,
|
||||
&screen_height);
|
||||
stage = meta_plugin_get_stage (plugin);
|
||||
|
||||
meta_plugin_query_screen_size (plugin,
|
||||
&screen_width,
|
||||
&screen_height);
|
||||
clutter_actor_set_anchor_point (workspace1,
|
||||
screen_width,
|
||||
screen_height);
|
||||
@@ -352,7 +348,7 @@ switch_workspace (MetaPlugin *plugin,
|
||||
return;
|
||||
}
|
||||
|
||||
l = g_list_last (meta_get_window_actors (screen));
|
||||
l = g_list_last (meta_plugin_get_window_actors (plugin));
|
||||
|
||||
while (l)
|
||||
{
|
||||
@@ -450,19 +446,12 @@ static void
|
||||
minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
||||
{
|
||||
MetaWindowType type;
|
||||
MetaRectangle icon_geometry;
|
||||
MetaWindow *meta_window = meta_window_actor_get_meta_window (window_actor);
|
||||
ClutterActor *actor = CLUTTER_ACTOR (window_actor);
|
||||
|
||||
|
||||
type = meta_window_get_window_type (meta_window);
|
||||
|
||||
if (!meta_window_get_icon_geometry(meta_window, &icon_geometry))
|
||||
{
|
||||
icon_geometry.x = 0;
|
||||
icon_geometry.y = 0;
|
||||
}
|
||||
|
||||
if (type == META_WINDOW_NORMAL)
|
||||
{
|
||||
ClutterAnimation *animation;
|
||||
@@ -479,8 +468,6 @@ minimize (MetaPlugin *plugin, MetaWindowActor *window_actor)
|
||||
MINIMIZE_TIMEOUT,
|
||||
"scale-x", 0.0,
|
||||
"scale-y", 0.0,
|
||||
"x", icon_geometry.x,
|
||||
"y", icon_geometry.y,
|
||||
NULL);
|
||||
apriv->tml_minimize = clutter_animation_get_timeline (animation);
|
||||
data->plugin = plugin;
|
||||
|
@@ -439,13 +439,9 @@ setup_constraint_info (ConstraintInfo *info,
|
||||
monitor_info->number);
|
||||
|
||||
/* Workaround braindead legacy apps that don't know how to
|
||||
* 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.
|
||||
* fullscreen themselves properly.
|
||||
*/
|
||||
if (meta_prefs_get_force_fullscreen() &&
|
||||
!window->hide_titlebar_when_maximized &&
|
||||
meta_rectangle_equal (new, &monitor_info->rect) &&
|
||||
window->has_fullscreen_func &&
|
||||
!window->fullscreen)
|
||||
@@ -573,7 +569,7 @@ place_window_if_needed(MetaWindow *window,
|
||||
META_MAXIMIZE_VERTICAL : 0), &info->current);
|
||||
|
||||
/* maximization may have changed frame geometry */
|
||||
if (!window->fullscreen)
|
||||
if (window->frame && !window->fullscreen)
|
||||
meta_frame_calc_borders (window->frame, info->borders);
|
||||
|
||||
if (window->fullscreen_after_placement)
|
||||
|
@@ -51,8 +51,6 @@
|
||||
#include <meta/compositor.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/cursorfont.h>
|
||||
#include "mutter-enum-types.h"
|
||||
|
||||
#ifdef HAVE_SOLARIS_XINERAMA
|
||||
#include <X11/extensions/xinerama.h>
|
||||
#endif
|
||||
@@ -137,8 +135,6 @@ enum
|
||||
WINDOW_CREATED,
|
||||
WINDOW_DEMANDS_ATTENTION,
|
||||
WINDOW_MARKED_URGENT,
|
||||
GRAB_OP_BEGIN,
|
||||
GRAB_OP_END,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
@@ -234,7 +230,8 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
display_signals[WINDOW_CREATED] =
|
||||
@@ -242,7 +239,8 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||
|
||||
display_signals[WINDOW_DEMANDS_ATTENTION] =
|
||||
@@ -250,7 +248,8 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1, META_TYPE_WINDOW);
|
||||
|
||||
display_signals[WINDOW_MARKED_URGENT] =
|
||||
@@ -258,32 +257,11 @@ meta_display_class_init (MetaDisplayClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
|
||||
display_signals[GRAB_OP_BEGIN] =
|
||||
g_signal_new ("grab-op-begin",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_SCREEN,
|
||||
META_TYPE_WINDOW,
|
||||
META_TYPE_GRAB_OP);
|
||||
|
||||
display_signals[GRAB_OP_END] =
|
||||
g_signal_new ("grab-op-end",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
G_TYPE_NONE, 3,
|
||||
META_TYPE_SCREEN,
|
||||
META_TYPE_WINDOW,
|
||||
META_TYPE_GRAB_OP);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FOCUS_WINDOW,
|
||||
g_param_spec_object ("focus-window",
|
||||
@@ -1406,19 +1384,6 @@ meta_display_get_current_time_roundtrip (MetaDisplay *display)
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_display_get_ignored_modifier_mask:
|
||||
* @display: a #MetaDisplay
|
||||
*
|
||||
* Returns: a mask of modifiers that should be ignored
|
||||
* when matching keybindings to events
|
||||
*/
|
||||
unsigned int
|
||||
meta_display_get_ignored_modifier_mask (MetaDisplay *display)
|
||||
{
|
||||
return display->ignored_modifier_mask;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_display_add_ignored_crossing_serial:
|
||||
* @display: a #MetaDisplay
|
||||
@@ -3741,9 +3706,6 @@ meta_display_begin_grab_op (MetaDisplay *display,
|
||||
{
|
||||
meta_window_refresh_resize_popup (display->grab_window);
|
||||
}
|
||||
|
||||
g_signal_emit (display, display_signals[GRAB_OP_BEGIN], 0,
|
||||
screen, display->grab_window, display->grab_op);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -3758,9 +3720,6 @@ meta_display_end_grab_op (MetaDisplay *display,
|
||||
if (display->grab_op == META_GRAB_OP_NONE)
|
||||
return;
|
||||
|
||||
g_signal_emit (display, display_signals[GRAB_OP_END], 0,
|
||||
display->grab_screen, display->grab_window, display->grab_op);
|
||||
|
||||
if (display->grab_window != NULL)
|
||||
display->grab_window->shaken_loose = FALSE;
|
||||
|
||||
@@ -4505,8 +4464,7 @@ get_focussed_group (MetaDisplay *display)
|
||||
|
||||
#define IN_TAB_CHAIN(w,t) (((t) == META_TAB_LIST_NORMAL && META_WINDOW_IN_NORMAL_TAB_CHAIN (w)) \
|
||||
|| ((t) == META_TAB_LIST_DOCKS && META_WINDOW_IN_DOCK_TAB_CHAIN (w)) \
|
||||
|| ((t) == META_TAB_LIST_GROUP && META_WINDOW_IN_GROUP_TAB_CHAIN (w, get_focussed_group(w->display))) \
|
||||
|| ((t) == META_TAB_LIST_NORMAL_ALL && META_WINDOW_IN_NORMAL_TAB_CHAIN_TYPE (w)))
|
||||
|| ((t) == META_TAB_LIST_GROUP && META_WINDOW_IN_GROUP_TAB_CHAIN (w, get_focussed_group(w->display))))
|
||||
|
||||
static MetaWindow*
|
||||
find_tab_forward (MetaDisplay *display,
|
||||
@@ -4654,13 +4612,12 @@ meta_display_get_tab_list (MetaDisplay *display,
|
||||
tab_list = g_list_reverse (tab_list);
|
||||
|
||||
{
|
||||
GSList *windows, *tmp;
|
||||
GSList *tmp;
|
||||
MetaWindow *l_window;
|
||||
|
||||
windows = meta_display_list_windows (display, META_LIST_DEFAULT);
|
||||
tmp = meta_display_list_windows (display, META_LIST_DEFAULT);
|
||||
|
||||
/* Go through all windows */
|
||||
tmp = windows;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
l_window=tmp->data;
|
||||
@@ -4676,8 +4633,6 @@ meta_display_get_tab_list (MetaDisplay *display,
|
||||
|
||||
tmp = tmp->next;
|
||||
} /* End while tmp!=NULL */
|
||||
|
||||
g_slist_free (windows);
|
||||
}
|
||||
|
||||
return tab_list;
|
||||
@@ -5074,21 +5029,12 @@ 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)
|
||||
{
|
||||
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);
|
||||
meta_window_unmanage (tmp->data, timestamp);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
@@ -322,14 +322,9 @@ void
|
||||
meta_frame_calc_borders (MetaFrame *frame,
|
||||
MetaFrameBorders *borders)
|
||||
{
|
||||
/* Save on if statements and potential uninitialized values
|
||||
* in callers -- if there's no frame, then zero the borders. */
|
||||
if (frame == NULL)
|
||||
meta_frame_borders_clear (borders);
|
||||
else
|
||||
meta_ui_get_frame_borders (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
borders);
|
||||
meta_ui_get_frame_borders (frame->window->screen->ui,
|
||||
frame->xwindow,
|
||||
borders);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -2644,14 +2644,18 @@ handle_move_to_corner_backend (MetaDisplay *display,
|
||||
MetaRectangle outer;
|
||||
int orig_x, orig_y;
|
||||
int new_x, new_y;
|
||||
int frame_width, frame_height;
|
||||
|
||||
meta_window_get_work_area_all_monitors (window, &work_area);
|
||||
meta_window_get_outer_rect (window, &outer);
|
||||
meta_window_get_position (window, &orig_x, &orig_y);
|
||||
|
||||
frame_width = (window->frame ? window->frame->child_x : 0);
|
||||
frame_height = (window->frame ? window->frame->child_y : 0);
|
||||
|
||||
if (xchange) {
|
||||
new_x = work_area.x + (to_right ?
|
||||
work_area.width - outer.width :
|
||||
(work_area.width + frame_width) - outer.width :
|
||||
0);
|
||||
} else {
|
||||
new_x = orig_x;
|
||||
@@ -2659,16 +2663,18 @@ handle_move_to_corner_backend (MetaDisplay *display,
|
||||
|
||||
if (ychange) {
|
||||
new_y = work_area.y + (to_bottom ?
|
||||
work_area.height - outer.height :
|
||||
(work_area.height + frame_height) - outer.height :
|
||||
0);
|
||||
} else {
|
||||
new_y = orig_y;
|
||||
}
|
||||
|
||||
meta_window_move_frame (window,
|
||||
TRUE,
|
||||
new_x,
|
||||
new_y);
|
||||
meta_window_move_resize (window,
|
||||
FALSE,
|
||||
new_x,
|
||||
new_y,
|
||||
window->rect.width,
|
||||
window->rect.height);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3019,8 +3025,6 @@ tab_op_from_tab_type (MetaTabList type)
|
||||
return META_GRAB_OP_KEYBOARD_TABBING_DOCK;
|
||||
case META_TAB_LIST_GROUP:
|
||||
return META_GRAB_OP_KEYBOARD_TABBING_GROUP;
|
||||
case META_TAB_LIST_NORMAL_ALL:
|
||||
break;
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
@@ -3039,8 +3043,6 @@ cycle_op_from_tab_type (MetaTabList type)
|
||||
return META_GRAB_OP_KEYBOARD_ESCAPING_DOCK;
|
||||
case META_TAB_LIST_GROUP:
|
||||
return META_GRAB_OP_KEYBOARD_ESCAPING_GROUP;
|
||||
case META_TAB_LIST_NORMAL_ALL:
|
||||
break;
|
||||
}
|
||||
|
||||
g_assert_not_reached ();
|
||||
@@ -3230,46 +3232,6 @@ 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,
|
||||
@@ -3927,20 +3889,6 @@ 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,7 +25,9 @@
|
||||
|
||||
#include <meta/main.h>
|
||||
#include <meta/util.h>
|
||||
#ifdef HAVE_INTROSPECTION
|
||||
#include "meta-plugin-manager.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
|
@@ -82,7 +82,6 @@ static int num_workspaces = 4;
|
||||
static GDesktopTitlebarAction action_double_click_titlebar = G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE;
|
||||
static GDesktopTitlebarAction action_middle_click_titlebar = G_DESKTOP_TITLEBAR_ACTION_LOWER;
|
||||
static GDesktopTitlebarAction action_right_click_titlebar = G_DESKTOP_TITLEBAR_ACTION_MENU;
|
||||
static gboolean dynamic_workspaces = FALSE;
|
||||
static gboolean application_based = FALSE;
|
||||
static gboolean disable_workarounds = FALSE;
|
||||
static gboolean auto_raise = FALSE;
|
||||
@@ -281,13 +280,6 @@ static MetaBoolPreference preferences_bool[] =
|
||||
},
|
||||
&use_system_font,
|
||||
},
|
||||
{
|
||||
{ "dynamic-workspaces",
|
||||
SCHEMA_MUTTER,
|
||||
META_PREF_DYNAMIC_WORKSPACES,
|
||||
},
|
||||
&dynamic_workspaces,
|
||||
},
|
||||
{
|
||||
{ "application-based",
|
||||
SCHEMA_GENERAL,
|
||||
@@ -922,8 +914,6 @@ 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);
|
||||
@@ -1506,12 +1496,6 @@ meta_prefs_get_num_workspaces (void)
|
||||
return num_workspaces;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_prefs_get_dynamic_workspaces (void)
|
||||
{
|
||||
return dynamic_workspaces;
|
||||
}
|
||||
|
||||
gboolean
|
||||
meta_prefs_get_application_based (void)
|
||||
{
|
||||
@@ -1628,9 +1612,6 @@ meta_preference_to_string (MetaPreference pref)
|
||||
|
||||
case META_PREF_DRAGGABLE_BORDER_WIDTH:
|
||||
return "DRAGGABLE_BORDER_WIDTH";
|
||||
|
||||
case META_PREF_DYNAMIC_WORKSPACES:
|
||||
return "DYNAMIC_WORKSPACES";
|
||||
}
|
||||
|
||||
return "(unknown)";
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include "stack.h"
|
||||
#include "xprops.h"
|
||||
#include <meta/compositor.h>
|
||||
#include "mutter-marshal.h"
|
||||
#include "mutter-enum-types.h"
|
||||
|
||||
#ifdef HAVE_SOLARIS_XINERAMA
|
||||
@@ -161,7 +162,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, restacked),
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
pspec = g_param_spec_int ("n-workspaces",
|
||||
@@ -175,7 +177,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
G_TYPE_INT);
|
||||
@@ -185,7 +188,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
G_TYPE_NONE,
|
||||
1,
|
||||
G_TYPE_INT);
|
||||
@@ -195,19 +199,21 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_INT_ENUM,
|
||||
G_TYPE_NONE,
|
||||
3,
|
||||
G_TYPE_INT,
|
||||
G_TYPE_INT,
|
||||
META_TYPE_MOTION_DIRECTION);
|
||||
MUTTER_TYPE_MOTION_DIRECTION);
|
||||
|
||||
screen_signals[WINDOW_ENTERED_MONITOR] =
|
||||
g_signal_new ("window-entered-monitor",
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_OBJECT,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
META_TYPE_WINDOW);
|
||||
@@ -217,7 +223,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
_mutter_marshal_VOID__INT_OBJECT,
|
||||
G_TYPE_NONE, 2,
|
||||
G_TYPE_INT,
|
||||
META_TYPE_WINDOW);
|
||||
@@ -227,7 +234,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__POINTER,
|
||||
G_TYPE_NONE, 1, G_TYPE_POINTER);
|
||||
|
||||
screen_signals[TOGGLE_RECORDING] =
|
||||
@@ -235,7 +243,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
screen_signals[WORKAREAS_CHANGED] =
|
||||
@@ -243,7 +252,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
screen_signals[MONITORS_CHANGED] =
|
||||
@@ -251,7 +261,8 @@ meta_screen_class_init (MetaScreenClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
g_object_class_install_property (object_class,
|
||||
@@ -1173,9 +1184,7 @@ prefs_changed_callback (MetaPreference pref,
|
||||
{
|
||||
MetaScreen *screen = data;
|
||||
|
||||
if ((pref == META_PREF_NUM_WORKSPACES ||
|
||||
pref == META_PREF_DYNAMIC_WORKSPACES) &&
|
||||
!meta_prefs_get_dynamic_workspaces ())
|
||||
if (pref == META_PREF_NUM_WORKSPACES)
|
||||
{
|
||||
/* GSettings doesn't provide timestamps, but luckily update_num_workspaces
|
||||
* often doesn't need it...
|
||||
@@ -1485,14 +1494,12 @@ meta_screen_remove_workspace (MetaScreen *screen, MetaWorkspace *workspace,
|
||||
new_num = g_list_length (screen->workspaces);
|
||||
|
||||
set_number_of_spaces_hint (screen, new_num);
|
||||
|
||||
if (!meta_prefs_get_dynamic_workspaces ())
|
||||
meta_prefs_set_num_workspaces (new_num);
|
||||
meta_prefs_set_num_workspaces (new_num);
|
||||
|
||||
/* If deleting a workspace before the current workspace, the active
|
||||
* workspace index changes, so we need to update that hint */
|
||||
if (active_index_changed)
|
||||
meta_screen_set_active_workspace_hint (screen);
|
||||
meta_screen_set_active_workspace_hint (workspace->screen);
|
||||
|
||||
l = next;
|
||||
while (l)
|
||||
@@ -1542,9 +1549,7 @@ meta_screen_append_new_workspace (MetaScreen *screen, gboolean activate,
|
||||
new_num = g_list_length (screen->workspaces);
|
||||
|
||||
set_number_of_spaces_hint (screen, new_num);
|
||||
|
||||
if (!meta_prefs_get_dynamic_workspaces ())
|
||||
meta_prefs_set_num_workspaces (new_num);
|
||||
meta_prefs_set_num_workspaces (new_num);
|
||||
|
||||
meta_screen_queue_workarea_recalc (screen);
|
||||
|
||||
@@ -1560,7 +1565,7 @@ static void
|
||||
update_num_workspaces (MetaScreen *screen,
|
||||
guint32 timestamp)
|
||||
{
|
||||
int new_num, old_num;
|
||||
int new_num;
|
||||
GList *tmp;
|
||||
int i;
|
||||
GList *extras;
|
||||
@@ -1590,7 +1595,6 @@ update_num_workspaces (MetaScreen *screen,
|
||||
++i;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
old_num = i;
|
||||
|
||||
g_assert (last_remaining);
|
||||
|
||||
@@ -1625,22 +1629,22 @@ update_num_workspaces (MetaScreen *screen,
|
||||
|
||||
g_assert (w->windows == NULL);
|
||||
meta_workspace_remove (w);
|
||||
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
|
||||
g_list_free (extras);
|
||||
|
||||
for (i = old_num; i < new_num; i++)
|
||||
meta_workspace_new (screen);
|
||||
|
||||
while (i < new_num)
|
||||
{
|
||||
meta_workspace_new (screen);
|
||||
++i;
|
||||
}
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
@@ -1931,6 +1935,7 @@ 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;
|
||||
@@ -1940,7 +1945,8 @@ meta_screen_tile_preview_update_timeout (gpointer data)
|
||||
Window xwindow;
|
||||
gulong create_serial;
|
||||
|
||||
screen->tile_preview = meta_tile_preview_new (screen->number);
|
||||
screen->tile_preview = meta_tile_preview_new (screen->number,
|
||||
composited);
|
||||
xwindow = meta_tile_preview_get_xwindow (screen->tile_preview,
|
||||
&create_serial);
|
||||
meta_stack_tracker_record_add (screen->stack_tracker,
|
||||
@@ -2986,7 +2992,7 @@ meta_screen_resize (MetaScreen *screen,
|
||||
g_free (old_monitor_infos);
|
||||
g_slist_free (windows);
|
||||
|
||||
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0);
|
||||
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0, index);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -121,7 +121,6 @@ meta_stack_add (MetaStack *stack,
|
||||
window->desc, window->stack_position);
|
||||
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -157,7 +156,6 @@ meta_stack_remove (MetaStack *stack,
|
||||
GUINT_TO_POINTER (window->frame->xwindow));
|
||||
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -167,7 +165,6 @@ meta_stack_update_layer (MetaStack *stack,
|
||||
stack->need_relayer = TRUE;
|
||||
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -177,64 +174,26 @@ meta_stack_update_transient (MetaStack *stack,
|
||||
stack->need_constrain = TRUE;
|
||||
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
/* raise/lower within a layer */
|
||||
void
|
||||
meta_stack_raise (MetaStack *stack,
|
||||
MetaWindow *window)
|
||||
{
|
||||
GList *l;
|
||||
int max_stack_position = window->stack_position;
|
||||
MetaWorkspace *workspace;
|
||||
|
||||
stack_ensure_sorted (stack);
|
||||
|
||||
workspace = meta_window_get_workspace (window);
|
||||
for (l = stack->sorted; l; l = l->next)
|
||||
{
|
||||
MetaWindow *w = (MetaWindow *) l->data;
|
||||
if (meta_window_located_on_workspace (w, workspace) &&
|
||||
w->stack_position > max_stack_position)
|
||||
max_stack_position = w->stack_position;
|
||||
}
|
||||
|
||||
if (max_stack_position == window->stack_position)
|
||||
return;
|
||||
|
||||
meta_window_set_stack_position_no_sync (window, max_stack_position);
|
||||
|
||||
{
|
||||
meta_window_set_stack_position_no_sync (window,
|
||||
stack->n_positions - 1);
|
||||
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
meta_stack_lower (MetaStack *stack,
|
||||
MetaWindow *window)
|
||||
{
|
||||
GList *l;
|
||||
int min_stack_position = window->stack_position;
|
||||
MetaWorkspace *workspace;
|
||||
|
||||
stack_ensure_sorted (stack);
|
||||
|
||||
workspace = meta_window_get_workspace (window);
|
||||
for (l = stack->sorted; l; l = l->next)
|
||||
{
|
||||
MetaWindow *w = (MetaWindow *) l->data;
|
||||
if (meta_window_located_on_workspace (w, workspace) &&
|
||||
w->stack_position < min_stack_position)
|
||||
min_stack_position = w->stack_position;
|
||||
}
|
||||
|
||||
if (min_stack_position == window->stack_position)
|
||||
return;
|
||||
|
||||
meta_window_set_stack_position_no_sync (window, min_stack_position);
|
||||
meta_window_set_stack_position_no_sync (window, 0);
|
||||
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, window->screen->active_workspace);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -250,27 +209,6 @@ meta_stack_thaw (MetaStack *stack)
|
||||
|
||||
stack->freeze_count -= 1;
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
meta_stack_update_window_tile_matches (MetaStack *stack,
|
||||
MetaWorkspace *workspace)
|
||||
{
|
||||
GList *windows, *tmp;
|
||||
|
||||
if (stack->freeze_count > 0)
|
||||
return;
|
||||
|
||||
windows = meta_stack_list_windows (stack, workspace);
|
||||
tmp = windows;
|
||||
while (tmp)
|
||||
{
|
||||
meta_window_compute_tile_match ((MetaWindow *) tmp->data);
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@@ -1718,7 +1656,6 @@ meta_stack_set_positions (MetaStack *stack,
|
||||
"Reset the stack positions of (nearly) all windows\n");
|
||||
|
||||
stack_sync_to_server (stack);
|
||||
meta_stack_update_window_tile_matches (stack, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1781,6 +1718,4 @@ meta_window_set_stack_position (MetaWindow *window,
|
||||
{
|
||||
meta_window_set_stack_position_no_sync (window, position);
|
||||
stack_sync_to_server (window->screen->stack);
|
||||
meta_stack_update_window_tile_matches (window->screen->stack,
|
||||
window->screen->active_workspace);
|
||||
}
|
||||
|
@@ -383,6 +383,4 @@ GList* meta_stack_get_positions (MetaStack *stack);
|
||||
void meta_stack_set_positions (MetaStack *stack,
|
||||
GList *windows);
|
||||
|
||||
void meta_stack_update_window_tile_matches (MetaStack *stack,
|
||||
MetaWorkspace *workspace);
|
||||
#endif
|
||||
|
@@ -921,7 +921,6 @@ meta_later_remove (guint later_id)
|
||||
* repaint func run and get removed
|
||||
*/
|
||||
destroy_later (later);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -101,14 +101,10 @@ struct _MetaWindow
|
||||
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;
|
||||
char *dbus_application_id;
|
||||
char *dbus_unique_name;
|
||||
char *dbus_object_path;
|
||||
|
||||
int hide_titlebar_when_maximized;
|
||||
int net_wm_pid;
|
||||
|
||||
Window xtransient_for;
|
||||
@@ -137,9 +133,6 @@ 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 */
|
||||
@@ -410,9 +403,6 @@ struct _MetaWindow
|
||||
|
||||
/* Focused window that is (directly or indirectly) attached to this one */
|
||||
MetaWindow *attached_focus_window;
|
||||
|
||||
/* The currently complementary tiled window, if any */
|
||||
MetaWindow *tile_match;
|
||||
};
|
||||
|
||||
struct _MetaWindowClass
|
||||
@@ -664,8 +654,5 @@ 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);
|
||||
|
||||
void meta_window_compute_tile_match (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
@@ -1578,11 +1578,14 @@ reload_gtk_theme_variant (MetaWindow *window,
|
||||
requested_variant, window->desc);
|
||||
}
|
||||
|
||||
if (g_strcmp0 (requested_variant, current_variant) != 0)
|
||||
if (g_strcmp0 (requested_variant, current_variant))
|
||||
{
|
||||
g_free (current_variant);
|
||||
|
||||
window->gtk_theme_variant = g_strdup (requested_variant);
|
||||
if (requested_variant)
|
||||
window->gtk_theme_variant = g_strdup (requested_variant);
|
||||
else
|
||||
window->gtk_theme_variant = NULL;
|
||||
|
||||
if (window->frame)
|
||||
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
|
||||
@@ -1590,57 +1593,76 @@ reload_gtk_theme_variant (MetaWindow *window,
|
||||
}
|
||||
|
||||
static void
|
||||
reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
reload_dbus_application_id (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
gboolean requested_value = FALSE;
|
||||
gboolean current_value = window->hide_titlebar_when_maximized;
|
||||
char *new_id = NULL;
|
||||
char *current_id = window->dbus_application_id;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
new_id = value->v.str;
|
||||
|
||||
if (g_strcmp0 (new_id, current_id))
|
||||
{
|
||||
requested_value = ((int) value->v.cardinal == 1);
|
||||
meta_verbose ("Request to hide titlebar for window %s.\n", window->desc);
|
||||
}
|
||||
g_free (current_id);
|
||||
|
||||
if (requested_value == current_value)
|
||||
return;
|
||||
if (new_id)
|
||||
window->dbus_application_id = g_strdup (new_id);
|
||||
else
|
||||
window->dbus_application_id = NULL;
|
||||
|
||||
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);
|
||||
g_object_notify ((GObject*)window, "dbus-application-id");
|
||||
}
|
||||
}
|
||||
|
||||
#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); \
|
||||
}
|
||||
static void
|
||||
reload_dbus_unique_name (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
char *new_id = NULL;
|
||||
char *current_id = window->dbus_unique_name;
|
||||
|
||||
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")
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
new_id = value->v.str;
|
||||
|
||||
#undef RELOAD_STRING
|
||||
if (g_strcmp0 (new_id, current_id))
|
||||
{
|
||||
g_free (current_id);
|
||||
|
||||
if (new_id)
|
||||
window->dbus_unique_name = g_strdup (new_id);
|
||||
else
|
||||
window->dbus_unique_name = NULL;
|
||||
|
||||
g_object_notify ((GObject*)window, "dbus-unique-name");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
reload_dbus_object_path (MetaWindow *window,
|
||||
MetaPropValue *value,
|
||||
gboolean initial)
|
||||
{
|
||||
char *new_path = NULL;
|
||||
char *current_path = window->dbus_object_path;
|
||||
|
||||
if (value->type != META_PROP_VALUE_INVALID)
|
||||
new_path = value->v.str;
|
||||
|
||||
if (g_strcmp0 (new_path, current_path))
|
||||
{
|
||||
g_free (current_path);
|
||||
|
||||
if (new_path)
|
||||
window->dbus_object_path = g_strdup (new_path);
|
||||
else
|
||||
window->dbus_object_path = NULL;
|
||||
|
||||
g_object_notify ((GObject*)window, "dbus-object-path");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialises the property hooks system. Each row in the table named "hooks"
|
||||
@@ -1695,13 +1717,9 @@ 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__DBUS_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_dbus_application_id, TRUE, FALSE },
|
||||
{ display->atom__DBUS_UNIQUE_NAME, META_PROP_VALUE_UTF8, reload_dbus_unique_name, TRUE, FALSE },
|
||||
{ display->atom__DBUS_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_dbus_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 },
|
||||
|
@@ -48,7 +48,6 @@
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/Xlibint.h> /* For display->resource_mask */
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef HAVE_SHAPE
|
||||
#include <X11/extensions/shape.h>
|
||||
@@ -56,12 +55,6 @@
|
||||
|
||||
#include <X11/extensions/Xcomposite.h>
|
||||
|
||||
/* Windows that unmaximize to a size bigger than that fraction of the workarea
|
||||
* will be scaled down to that size (while maintaining aspect ratio).
|
||||
* Windows that cover an area greater then this size are automaximized on map.
|
||||
*/
|
||||
#define MAX_UNMAXIMIZED_WINDOW_AREA .8
|
||||
|
||||
static int destroying_windows_disallowed = 0;
|
||||
|
||||
|
||||
@@ -172,12 +165,9 @@ enum {
|
||||
PROP_RESIZEABLE,
|
||||
PROP_ABOVE,
|
||||
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
|
||||
PROP_DBUS_APPLICATION_ID,
|
||||
PROP_DBUS_UNIQUE_NAME,
|
||||
PROP_DBUS_OBJECT_PATH
|
||||
};
|
||||
|
||||
enum
|
||||
@@ -222,6 +212,8 @@ meta_window_finalize (GObject *object)
|
||||
|
||||
meta_icon_cache_free (&window->icon_cache);
|
||||
|
||||
meta_prefs_remove_listener (prefs_changed_callback, window);
|
||||
|
||||
g_free (window->sm_client_id);
|
||||
g_free (window->wm_client_machine);
|
||||
g_free (window->startup_id);
|
||||
@@ -232,12 +224,9 @@ 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);
|
||||
g_free (window->dbus_application_id);
|
||||
g_free (window->dbus_unique_name);
|
||||
g_free (window->dbus_object_path);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -301,23 +290,14 @@ 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);
|
||||
case PROP_DBUS_APPLICATION_ID:
|
||||
g_value_set_string (value, win->dbus_application_id);
|
||||
break;
|
||||
case PROP_GTK_UNIQUE_BUS_NAME:
|
||||
g_value_set_string (value, win->gtk_unique_bus_name);
|
||||
case PROP_DBUS_UNIQUE_NAME:
|
||||
g_value_set_string (value, win->dbus_unique_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);
|
||||
case PROP_DBUS_OBJECT_PATH:
|
||||
g_value_set_string (value, win->dbus_object_path);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
@@ -416,7 +396,7 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
g_param_spec_enum ("window-type",
|
||||
"Window Type",
|
||||
"The type of the window",
|
||||
META_TYPE_WINDOW_TYPE,
|
||||
MUTTER_TYPE_WINDOW_TYPE,
|
||||
META_WINDOW_NORMAL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
@@ -486,50 +466,26 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
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",
|
||||
PROP_DBUS_APPLICATION_ID,
|
||||
g_param_spec_string ("dbus-application-id",
|
||||
"_DBUS_APPLICATION_ID",
|
||||
"Contents of the _DBUS_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",
|
||||
PROP_DBUS_UNIQUE_NAME,
|
||||
g_param_spec_string ("dbus-unique-name",
|
||||
"_DBUS_UNIQUE_NAME",
|
||||
"Contents of the _DBUS_UNIQUE_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",
|
||||
PROP_DBUS_OBJECT_PATH,
|
||||
g_param_spec_string ("dbus-object-path",
|
||||
"_DBUS_OBJECT_PATH",
|
||||
"Contents of the _DBUS_OBJECT_PATH property of this window",
|
||||
NULL,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
@@ -538,7 +494,8 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, workspace_changed),
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__INT,
|
||||
G_TYPE_NONE, 1,
|
||||
G_TYPE_INT);
|
||||
|
||||
@@ -547,7 +504,8 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, focus),
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[RAISED] =
|
||||
@@ -555,7 +513,8 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, raised),
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
window_signals[UNMANAGED] =
|
||||
@@ -563,7 +522,8 @@ meta_window_class_init (MetaWindowClass *klass)
|
||||
G_TYPE_FROM_CLASS (object_class),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (MetaWindowClass, unmanaged),
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__VOID,
|
||||
G_TYPE_NONE, 0);
|
||||
}
|
||||
|
||||
@@ -1167,8 +1127,6 @@ meta_window_new_with_attrs (MetaDisplay *display,
|
||||
|
||||
window->monitor = meta_screen_get_monitor_for_window (window->screen, window);
|
||||
|
||||
window->tile_match = NULL;
|
||||
|
||||
if (window->override_redirect)
|
||||
{
|
||||
window->decorated = FALSE;
|
||||
@@ -1902,8 +1860,6 @@ meta_window_unmanage (MetaWindow *window,
|
||||
|
||||
meta_error_trap_pop (window->display);
|
||||
|
||||
meta_prefs_remove_listener (prefs_changed_callback, window);
|
||||
|
||||
g_signal_emit (window, window_signals[UNMANAGED], 0);
|
||||
|
||||
g_object_unref (window);
|
||||
@@ -3017,20 +2973,7 @@ meta_window_show (MetaWindow *window)
|
||||
}
|
||||
|
||||
if (!window->placed)
|
||||
{
|
||||
if (window->showing_for_first_time)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);
|
||||
/* Automaximize windows that map with a size > MAX_UNMAXIMIZED_WINDOW_AREA of the work area */
|
||||
if (window->rect.width * window->rect.height > work_area.width * work_area.height * MAX_UNMAXIMIZED_WINDOW_AREA)
|
||||
{
|
||||
window->maximize_horizontally_after_placement = TRUE;
|
||||
window->maximize_vertically_after_placement = TRUE;
|
||||
}
|
||||
}
|
||||
meta_window_force_placement (window);
|
||||
}
|
||||
meta_window_force_placement (window);
|
||||
|
||||
if (needs_stacking_adjustment)
|
||||
{
|
||||
@@ -3515,9 +3458,6 @@ 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 =
|
||||
@@ -3680,10 +3620,6 @@ 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
|
||||
{
|
||||
@@ -3696,15 +3632,20 @@ meta_window_tile (MetaWindow *window)
|
||||
static gboolean
|
||||
meta_window_can_tile_maximized (MetaWindow *window)
|
||||
{
|
||||
return window->has_maximize_func;
|
||||
if (!META_WINDOW_ALLOWS_RESIZE (window))
|
||||
return FALSE;
|
||||
|
||||
if (!window->has_maximize_func)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
meta_window_can_tile_side_by_side (MetaWindow *window)
|
||||
{
|
||||
const MetaMonitorInfo *monitor;
|
||||
MetaRectangle tile_area;
|
||||
MetaFrameBorders borders;
|
||||
|
||||
if (!meta_window_can_tile_maximized (window))
|
||||
return FALSE;
|
||||
@@ -3718,10 +3659,15 @@ meta_window_can_tile_side_by_side (MetaWindow *window)
|
||||
|
||||
tile_area.width /= 2;
|
||||
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
if (window->frame)
|
||||
{
|
||||
MetaFrameBorders borders;
|
||||
|
||||
tile_area.width -= (borders.visible.left + borders.visible.right);
|
||||
tile_area.height -= (borders.visible.top + borders.visible.bottom);
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
tile_area.width -= (borders.visible.left + borders.visible.right);
|
||||
tile_area.height -= (borders.visible.top + borders.visible.bottom);
|
||||
}
|
||||
|
||||
return tile_area.width >= window->size_hints.min_width &&
|
||||
tile_area.height >= window->size_hints.min_height;
|
||||
@@ -3774,9 +3720,6 @@ 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).
|
||||
*/
|
||||
@@ -3784,9 +3727,6 @@ meta_window_unmaximize_internal (MetaWindow *window,
|
||||
(unmaximize_vertically && window->maximized_vertically))
|
||||
{
|
||||
MetaRectangle target_rect;
|
||||
MetaRectangle work_area;
|
||||
|
||||
meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Unmaximizing %s%s\n",
|
||||
@@ -3811,28 +3751,6 @@ meta_window_unmaximize_internal (MetaWindow *window,
|
||||
* being unmaximized.
|
||||
*/
|
||||
meta_window_get_client_root_coords (window, &target_rect);
|
||||
|
||||
/* Avoid unmaximizing to "almost maximized" size when the previous size
|
||||
* is greater then 80% of the work area use MAX_UNMAXIMIZED_WINDOW_AREA of the work area as upper limit
|
||||
* while maintaining the aspect ratio.
|
||||
*/
|
||||
if (unmaximize_horizontally && unmaximize_vertically &&
|
||||
desired_rect->width * desired_rect->height > work_area.width * work_area.height * MAX_UNMAXIMIZED_WINDOW_AREA)
|
||||
{
|
||||
if (desired_rect->width > desired_rect->height)
|
||||
{
|
||||
float aspect = (float)desired_rect->height / (float)desired_rect->width;
|
||||
desired_rect->width = MAX (work_area.width * sqrt (MAX_UNMAXIMIZED_WINDOW_AREA), window->size_hints.min_width);
|
||||
desired_rect->height = MAX (desired_rect->width * aspect, window->size_hints.min_height);
|
||||
}
|
||||
else
|
||||
{
|
||||
float aspect = (float)desired_rect->width / (float)desired_rect->height;
|
||||
desired_rect->height = MAX (work_area.height * sqrt (MAX_UNMAXIMIZED_WINDOW_AREA), window->size_hints.min_height);
|
||||
desired_rect->width = MAX (desired_rect->height * aspect, window->size_hints.min_width);
|
||||
}
|
||||
}
|
||||
|
||||
if (unmaximize_horizontally)
|
||||
{
|
||||
target_rect.x = desired_rect->x;
|
||||
@@ -4550,10 +4468,6 @@ meta_window_update_monitor (MetaWindow *window)
|
||||
if (old)
|
||||
g_signal_emit_by_name (window->screen, "window-left-monitor", old->number, window);
|
||||
g_signal_emit_by_name (window->screen, "window-entered-monitor", window->monitor->number, window);
|
||||
|
||||
/* If we're changing monitors, we need to update the has_maximize_func flag,
|
||||
* as the working area has changed. */
|
||||
recalc_window_features (window);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4646,8 +4560,9 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
is_user_action ? " (user move/resize)" : "",
|
||||
old_rect.x, old_rect.y, old_rect.width, old_rect.height);
|
||||
|
||||
meta_frame_calc_borders (window->frame,
|
||||
&borders);
|
||||
if (window->frame)
|
||||
meta_frame_calc_borders (window->frame,
|
||||
&borders);
|
||||
|
||||
new_rect.x = root_x_nw;
|
||||
new_rect.y = root_y_nw;
|
||||
@@ -5023,9 +4938,6 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
}
|
||||
|
||||
meta_window_foreach_transient (window, maybe_move_attached_dialog, NULL);
|
||||
|
||||
meta_stack_update_window_tile_matches (window->screen->stack,
|
||||
window->screen->active_workspace);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5108,18 +5020,15 @@ meta_window_move_frame (MetaWindow *window,
|
||||
{
|
||||
int x = root_x_nw;
|
||||
int y = root_y_nw;
|
||||
MetaFrameBorders borders;
|
||||
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
/* root_x_nw and root_y_nw correspond to where the top of
|
||||
* the visible frame should be. Offset by the distance between
|
||||
* the origin of the window and the origin of the enclosing
|
||||
* window decorations.
|
||||
*/
|
||||
x += window->frame->child_x - borders.invisible.left;
|
||||
y += window->frame->child_y - borders.invisible.top;
|
||||
|
||||
if (window->frame)
|
||||
{
|
||||
/* offset by the distance between the origin of the window
|
||||
* and the origin of the enclosing window decorations
|
||||
*/
|
||||
x += window->frame->child_x;
|
||||
y += window->frame->child_y;
|
||||
}
|
||||
meta_window_move (window, user_op, x, y);
|
||||
}
|
||||
|
||||
@@ -5168,17 +5077,18 @@ meta_window_move_resize_frame (MetaWindow *window,
|
||||
int w,
|
||||
int h)
|
||||
{
|
||||
MetaFrameBorders borders;
|
||||
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
/* offset by the distance between the origin of the window
|
||||
* and the origin of the enclosing window decorations ( + border)
|
||||
*/
|
||||
root_x_nw += borders.visible.left;
|
||||
root_y_nw += borders.visible.top;
|
||||
w -= borders.visible.left + borders.visible.right;
|
||||
h -= borders.visible.top + borders.visible.bottom;
|
||||
|
||||
if (window->frame)
|
||||
{
|
||||
MetaFrameBorders borders;
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
/* offset by the distance between the origin of the window
|
||||
* and the origin of the enclosing window decorations ( + border)
|
||||
*/
|
||||
root_x_nw += borders.visible.left;
|
||||
root_y_nw += borders.visible.top;
|
||||
w -= borders.visible.left + borders.visible.right;
|
||||
h -= borders.visible.top + borders.visible.bottom;
|
||||
}
|
||||
meta_window_move_resize (window, user_op, root_x_nw, root_y_nw, w, h);
|
||||
}
|
||||
|
||||
@@ -5810,18 +5720,22 @@ meta_window_get_net_wm_desktop (MetaWindow *window)
|
||||
static void
|
||||
update_net_frame_extents (MetaWindow *window)
|
||||
{
|
||||
unsigned long data[4];
|
||||
MetaFrameBorders borders;
|
||||
unsigned long data[4] = { 0, 0, 0, 0 };
|
||||
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
/* Left */
|
||||
data[0] = borders.visible.left;
|
||||
/* Right */
|
||||
data[1] = borders.visible.right;
|
||||
/* Top */
|
||||
data[2] = borders.visible.top;
|
||||
/* Bottom */
|
||||
data[3] = borders.visible.bottom;
|
||||
if (window->frame)
|
||||
{
|
||||
MetaFrameBorders borders;
|
||||
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
/* Left */
|
||||
data[0] = borders.visible.left;
|
||||
/* Right */
|
||||
data[1] = borders.visible.right;
|
||||
/* Top */
|
||||
data[2] = borders.visible.top;
|
||||
/* Bottom */
|
||||
data[3] = borders.visible.bottom;
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Setting _NET_FRAME_EXTENTS on managed window 0x%lx "
|
||||
@@ -7467,10 +7381,8 @@ meta_window_get_workspaces (MetaWindow *window)
|
||||
{
|
||||
if (window->on_all_workspaces)
|
||||
return window->screen->workspaces;
|
||||
else if (window->workspace != NULL)
|
||||
return window->workspace->list_containing_self;
|
||||
else
|
||||
return NULL;
|
||||
return window->workspace->list_containing_self;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -8010,23 +7922,6 @@ recalc_window_features (MetaWindow *window)
|
||||
window->has_maximize_func = FALSE;
|
||||
}
|
||||
|
||||
if (window->has_maximize_func)
|
||||
{
|
||||
MetaRectangle work_area;
|
||||
MetaFrameBorders borders;
|
||||
int min_frame_width, min_frame_height;
|
||||
|
||||
meta_window_get_work_area_current_monitor (window, &work_area);
|
||||
meta_frame_calc_borders (window->frame, &borders);
|
||||
|
||||
min_frame_width = window->size_hints.min_width + borders.visible.left + borders.visible.right;
|
||||
min_frame_height = window->size_hints.min_height + borders.visible.top + borders.visible.bottom;
|
||||
|
||||
if (min_frame_width >= work_area.width ||
|
||||
min_frame_height >= work_area.height)
|
||||
window->has_maximize_func = FALSE;
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Window %s fullscreen = %d not resizable, maximizable = %d fullscreenable = %d min size %dx%d max size %dx%d\n",
|
||||
window->desc,
|
||||
@@ -10356,75 +10251,39 @@ meta_window_get_wm_class_instance (MetaWindow *window)
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_application_id:
|
||||
* meta_window_get_dbus_application_id:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the application ID
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_application_id (MetaWindow *window)
|
||||
meta_window_get_dbus_application_id (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_application_id;
|
||||
return window->dbus_application_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_unique_bus_name:
|
||||
* meta_window_get_dbus_unique_name:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the unique name
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_unique_bus_name (MetaWindow *window)
|
||||
meta_window_get_dbus_unique_name (MetaWindow *window)
|
||||
{
|
||||
return window->gtk_unique_bus_name;
|
||||
return window->dbus_unique_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_gtk_application_object_path:
|
||||
* meta_window_get_dbus_object_path:
|
||||
* @window: a #MetaWindow
|
||||
*
|
||||
* Return value: (transfer none): the object path
|
||||
**/
|
||||
const char *
|
||||
meta_window_get_gtk_application_object_path (MetaWindow *window)
|
||||
meta_window_get_dbus_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;
|
||||
return window->dbus_object_path;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10680,8 +10539,7 @@ 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) ||
|
||||
(window->hide_titlebar_when_maximized && META_WINDOW_MAXIMIZED (window)))
|
||||
else if (window->border_only && base_type != META_FRAME_TYPE_ATTACHED)
|
||||
{
|
||||
/* override base frame type */
|
||||
return META_FRAME_TYPE_BORDER;
|
||||
@@ -10728,99 +10586,3 @@ meta_window_is_attached_dialog (MetaWindow *window)
|
||||
{
|
||||
return window->attached;
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_window_get_tile_match:
|
||||
*
|
||||
* Returns the matching tiled window on the same monitor as @window. This is
|
||||
* the topmost tiled window in a complementary tile mode that is:
|
||||
*
|
||||
* - on the same monitor;
|
||||
* - on the same workspace;
|
||||
* - spanning the remaining monitor width;
|
||||
* - there is no 3rd window stacked between both tiled windows that's
|
||||
* partially visible in the common edge.
|
||||
*
|
||||
* Return value: (transfer none) (allow-none): the matching tiled window or
|
||||
* %NULL if it doesn't exist.
|
||||
*/
|
||||
MetaWindow *
|
||||
meta_window_get_tile_match (MetaWindow *window)
|
||||
{
|
||||
return window->tile_match;
|
||||
}
|
||||
|
||||
void
|
||||
meta_window_compute_tile_match (MetaWindow *window)
|
||||
{
|
||||
MetaWindow *match;
|
||||
MetaStack *stack;
|
||||
MetaTileMode match_tile_mode = META_TILE_NONE;
|
||||
|
||||
window->tile_match = NULL;
|
||||
|
||||
if (window->shaded || window->minimized)
|
||||
return;
|
||||
|
||||
if (META_WINDOW_TILED_LEFT (window))
|
||||
match_tile_mode = META_TILE_RIGHT;
|
||||
else if (META_WINDOW_TILED_RIGHT (window))
|
||||
match_tile_mode = META_TILE_LEFT;
|
||||
else
|
||||
return;
|
||||
|
||||
stack = window->screen->stack;
|
||||
|
||||
for (match = meta_stack_get_top (stack);
|
||||
match;
|
||||
match = meta_stack_get_below (stack, match, FALSE))
|
||||
{
|
||||
if (!match->shaded &&
|
||||
!match->minimized &&
|
||||
match->tile_mode == match_tile_mode &&
|
||||
match->monitor == window->monitor &&
|
||||
meta_window_get_workspace (match) == meta_window_get_workspace (window))
|
||||
break;
|
||||
}
|
||||
|
||||
if (match)
|
||||
{
|
||||
MetaWindow *above, *bottommost, *topmost;
|
||||
MetaRectangle above_rect, bottommost_rect, topmost_rect;
|
||||
|
||||
if (meta_stack_windows_cmp (window->screen->stack, match, window) > 0)
|
||||
{
|
||||
topmost = match;
|
||||
bottommost = window;
|
||||
}
|
||||
else
|
||||
{
|
||||
topmost = window;
|
||||
bottommost = match;
|
||||
}
|
||||
|
||||
meta_window_get_outer_rect (bottommost, &bottommost_rect);
|
||||
meta_window_get_outer_rect (topmost, &topmost_rect);
|
||||
/*
|
||||
* If there's a window stacked in between which is partially visible
|
||||
* behind the topmost tile we don't consider the tiles to match.
|
||||
*/
|
||||
for (above = meta_stack_get_above (stack, bottommost, FALSE);
|
||||
above && above != topmost;
|
||||
above = meta_stack_get_above (stack, above, FALSE))
|
||||
{
|
||||
if (above->minimized ||
|
||||
above->monitor != window->monitor ||
|
||||
meta_window_get_workspace (above) != meta_window_get_workspace (window))
|
||||
continue;
|
||||
|
||||
meta_window_get_outer_rect (above, &above_rect);
|
||||
|
||||
if (meta_rectangle_overlap (&above_rect, &bottommost_rect) &&
|
||||
meta_rectangle_overlap (&above_rect, &topmost_rect))
|
||||
return;
|
||||
}
|
||||
|
||||
window->tile_match = match;
|
||||
}
|
||||
}
|
||||
|
@@ -42,16 +42,6 @@ struct _MetaWorkspace
|
||||
MetaScreen *screen;
|
||||
|
||||
GList *windows;
|
||||
|
||||
/* The "MRU list", or "most recently used" list, is a list of
|
||||
* MetaWindows ordered based on the time the the user interacted
|
||||
* with the window most recently.
|
||||
*
|
||||
* For historical reasons, we keep an MRU list per workspace.
|
||||
* It used to be used to calculate the default focused window,
|
||||
* but isn't anymore, as the window next in the stacking order
|
||||
* can sometimes be not the window the user interacted with last,
|
||||
*/
|
||||
GList *mru_list;
|
||||
|
||||
GList *list_containing_self;
|
||||
|
@@ -46,7 +46,7 @@ enum {
|
||||
};
|
||||
|
||||
void meta_workspace_queue_calc_showing (MetaWorkspace *workspace);
|
||||
static void focus_ancestor_or_top_window (MetaWorkspace *workspace,
|
||||
static void focus_ancestor_or_mru_window (MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one,
|
||||
guint32 timestamp);
|
||||
static void free_this (gpointer candidate,
|
||||
@@ -121,14 +121,16 @@ meta_workspace_class_init (MetaWorkspaceClass *klass)
|
||||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
0,
|
||||
NULL, NULL, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
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, NULL,
|
||||
NULL, NULL,
|
||||
g_cclosure_marshal_VOID__OBJECT,
|
||||
G_TYPE_NONE, 1,
|
||||
META_TYPE_WINDOW);
|
||||
|
||||
@@ -1201,7 +1203,7 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
|
||||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
|
||||
!workspace->screen->display->mouse_mode)
|
||||
focus_ancestor_or_top_window (workspace, not_this_one, timestamp);
|
||||
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
|
||||
else
|
||||
{
|
||||
MetaWindow * window;
|
||||
@@ -1238,7 +1240,7 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
|
||||
}
|
||||
}
|
||||
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_SLOPPY)
|
||||
focus_ancestor_or_top_window (workspace, not_this_one, timestamp);
|
||||
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
|
||||
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE)
|
||||
{
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
@@ -1261,13 +1263,17 @@ record_ancestor (MetaWindow *window,
|
||||
return FALSE; /* quit with the first ancestor we find */
|
||||
}
|
||||
|
||||
/* Focus ancestor of not_this_one if there is one */
|
||||
/* Focus ancestor of not_this_one if there is one, otherwise focus the MRU
|
||||
* window on active workspace
|
||||
*/
|
||||
static void
|
||||
focus_ancestor_or_top_window (MetaWorkspace *workspace,
|
||||
focus_ancestor_or_mru_window (MetaWorkspace *workspace,
|
||||
MetaWindow *not_this_one,
|
||||
guint32 timestamp)
|
||||
{
|
||||
MetaWindow *window = NULL;
|
||||
MetaWindow *desktop_window = NULL;
|
||||
GList *tmp;
|
||||
|
||||
if (not_this_one)
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
@@ -1301,9 +1307,36 @@ focus_ancestor_or_top_window (MetaWorkspace *workspace,
|
||||
}
|
||||
}
|
||||
|
||||
window = meta_stack_get_default_focus_window (workspace->screen->stack,
|
||||
workspace,
|
||||
NULL);
|
||||
/* No ancestor, look for the MRU window */
|
||||
tmp = workspace->mru_list;
|
||||
|
||||
while (tmp)
|
||||
{
|
||||
MetaWindow* tmp_window;
|
||||
tmp_window = ((MetaWindow*) tmp->data);
|
||||
if (tmp_window != not_this_one &&
|
||||
meta_window_showing_on_its_workspace (tmp_window) &&
|
||||
tmp_window->type != META_WINDOW_DOCK &&
|
||||
tmp_window->type != META_WINDOW_DESKTOP)
|
||||
{
|
||||
window = tmp->data;
|
||||
break;
|
||||
}
|
||||
else if (tmp_window != not_this_one &&
|
||||
desktop_window == NULL &&
|
||||
meta_window_showing_on_its_workspace (tmp_window) &&
|
||||
tmp_window->type == META_WINDOW_DESKTOP)
|
||||
{
|
||||
/* Found the most recently used desktop window */
|
||||
desktop_window = tmp_window;
|
||||
}
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
/* If no window was found, default to the MRU desktop-window */
|
||||
if (window == NULL)
|
||||
window = desktop_window;
|
||||
|
||||
if (window)
|
||||
{
|
||||
|
@@ -59,13 +59,9 @@ 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(_DBUS_APPLICATION_ID)
|
||||
item(_DBUS_UNIQUE_NAME)
|
||||
item(_DBUS_OBJECT_PATH)
|
||||
item(_GNOME_WM_KEYBINDINGS)
|
||||
item(_GNOME_PANEL_ACTION)
|
||||
item(_GNOME_PANEL_ACTION_MAIN_MENU)
|
||||
|
@@ -27,7 +27,6 @@
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
|
||||
#include <meta/types.h>
|
||||
#include <meta/compositor.h>
|
||||
@@ -44,8 +43,5 @@ void meta_disable_unredirect_for_screen (MetaScreen *screen);
|
||||
void meta_enable_unredirect_for_screen (MetaScreen *screen);
|
||||
|
||||
ClutterActor *meta_get_background_actor_for_screen (MetaScreen *screen);
|
||||
void meta_set_stage_input_region (MetaScreen *screen,
|
||||
XserverRegion region);
|
||||
void meta_empty_stage_input_region (MetaScreen *screen);
|
||||
|
||||
#endif
|
||||
|
@@ -33,8 +33,7 @@ typedef enum
|
||||
{
|
||||
META_TAB_LIST_NORMAL,
|
||||
META_TAB_LIST_DOCKS,
|
||||
META_TAB_LIST_GROUP,
|
||||
META_TAB_LIST_NORMAL_ALL
|
||||
META_TAB_LIST_GROUP
|
||||
} MetaTabList;
|
||||
|
||||
typedef enum
|
||||
@@ -92,8 +91,6 @@ guint32 meta_display_get_last_user_time (MetaDisplay *display);
|
||||
guint32 meta_display_get_current_time (MetaDisplay *display);
|
||||
guint32 meta_display_get_current_time_roundtrip (MetaDisplay *display);
|
||||
|
||||
unsigned int meta_display_get_ignored_modifier_mask (MetaDisplay *display);
|
||||
|
||||
GList* meta_display_get_tab_list (MetaDisplay *display,
|
||||
MetaTabList type,
|
||||
MetaScreen *screen,
|
||||
|
@@ -246,6 +246,35 @@ void
|
||||
meta_plugin_destroy_completed (MetaPlugin *plugin,
|
||||
MetaWindowActor *actor);
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_overlay_group (MetaPlugin *plugin);
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_window_group (MetaPlugin *plugin);
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_background_actor (MetaPlugin *plugin);
|
||||
|
||||
ClutterActor *
|
||||
meta_plugin_get_stage (MetaPlugin *plugin);
|
||||
|
||||
void
|
||||
meta_plugin_query_screen_size (MetaPlugin *plugin,
|
||||
int *width,
|
||||
int *height);
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_reactive (MetaPlugin *plugin,
|
||||
gboolean reactive);
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_input_area (MetaPlugin *plugin,
|
||||
gint x, gint y, gint width, gint height);
|
||||
|
||||
void
|
||||
meta_plugin_set_stage_input_region (MetaPlugin *plugin,
|
||||
XserverRegion region);
|
||||
|
||||
/**
|
||||
* MetaModalOptions:
|
||||
* @META_MODAL_POINTER_ALREADY_GRABBED: if set the pointer is already
|
||||
@@ -271,6 +300,8 @@ void
|
||||
meta_plugin_end_modal (MetaPlugin *plugin,
|
||||
guint32 timestamp);
|
||||
|
||||
GList * meta_plugin_get_window_actors (MetaPlugin *plugin);
|
||||
Display * meta_plugin_get_xdisplay (MetaPlugin *plugin);
|
||||
MetaScreen *meta_plugin_get_screen (MetaPlugin *plugin);
|
||||
|
||||
void
|
||||
|
@@ -47,7 +47,6 @@ typedef enum
|
||||
META_PREF_THEME,
|
||||
META_PREF_TITLEBAR_FONT,
|
||||
META_PREF_NUM_WORKSPACES,
|
||||
META_PREF_DYNAMIC_WORKSPACES,
|
||||
META_PREF_APPLICATION_BASED,
|
||||
META_PREF_KEYBINDINGS,
|
||||
META_PREF_DISABLE_WORKAROUNDS,
|
||||
@@ -95,7 +94,6 @@ const char* meta_prefs_get_theme (void);
|
||||
/* returns NULL if GTK default should be used */
|
||||
const PangoFontDescription* meta_prefs_get_titlebar_font (void);
|
||||
int meta_prefs_get_num_workspaces (void);
|
||||
gboolean meta_prefs_get_dynamic_workspaces (void);
|
||||
gboolean meta_prefs_get_application_based (void);
|
||||
gboolean meta_prefs_get_disable_workarounds (void);
|
||||
gboolean meta_prefs_get_auto_raise (void);
|
||||
@@ -193,8 +191,6 @@ 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,12 +95,9 @@ 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);
|
||||
const char * meta_window_get_dbus_application_id (MetaWindow *window);
|
||||
const char * meta_window_get_dbus_unique_name (MetaWindow *window);
|
||||
const char * meta_window_get_dbus_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);
|
||||
@@ -169,6 +166,4 @@ MetaFrameType meta_window_get_frame_type (MetaWindow *window);
|
||||
|
||||
cairo_region_t *meta_window_get_frame_bounds (MetaWindow *window);
|
||||
|
||||
MetaWindow *meta_window_get_tile_match (MetaWindow *window);
|
||||
|
||||
#endif
|
||||
|
@@ -20,7 +20,7 @@ G_END_DECLS
|
||||
|
||||
/*** BEGIN value-header ***/
|
||||
GType @enum_name@_get_type (void) G_GNUC_CONST;
|
||||
#define META_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
|
||||
#define MUTTER_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
|
||||
|
||||
/*** END value-header ***/
|
||||
|
||||
|
2
src/mutter-marshal.list
Normal file
2
src/mutter-marshal.list
Normal file
@@ -0,0 +1,2 @@
|
||||
VOID:INT,INT,ENUM
|
||||
VOID:INT,OBJECT
|
@@ -45,16 +45,6 @@
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="dynamic-workspaces" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Workspaces are managed dynamically</_summary>
|
||||
<_description>
|
||||
Determines whether workspaces are managed dynamically or
|
||||
whether there's a static number of workspaces (determined
|
||||
by the num-workspaces key in org.gnome.desktop.wm.preferences).
|
||||
</_description>
|
||||
</key>
|
||||
|
||||
<key name="workspaces-only-on-primary" type="b">
|
||||
<default>false</default>
|
||||
<_summary>Workspaces only on primary</_summary>
|
||||
@@ -93,14 +83,6 @@
|
||||
<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>
|
||||
|
136
src/ui/fixedtip.c
Normal file
136
src/ui/fixedtip.c
Normal file
@@ -0,0 +1,136 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/* Mutter fixed tooltip routine */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include "fixedtip.h"
|
||||
#include "ui.h"
|
||||
|
||||
/**
|
||||
* The floating rectangle. This is a GtkWindow, and it contains
|
||||
* the "label" widget, below.
|
||||
*/
|
||||
static GtkWidget *tip = NULL;
|
||||
|
||||
/**
|
||||
* The actual text that gets displayed.
|
||||
*/
|
||||
static GtkWidget *label = NULL;
|
||||
/*
|
||||
* X coordinate of the right-hand edge of the screen.
|
||||
*
|
||||
* \bug This appears to be a bug; screen_right_edge is calculated only when
|
||||
* the window is redrawn. Actually we should never cache it because
|
||||
* different windows are different sizes.
|
||||
*/
|
||||
static int screen_right_edge = 0;
|
||||
/*
|
||||
* Y coordinate of the bottom edge of the screen.
|
||||
*
|
||||
* \bug As with screen_right_edge.
|
||||
*/
|
||||
static int screen_bottom_edge = 0;
|
||||
|
||||
static gboolean
|
||||
draw_handler (GtkWidget *tooltips,
|
||||
cairo_t *cr,
|
||||
gpointer user_data)
|
||||
{
|
||||
gtk_render_background (gtk_widget_get_style_context (tooltips),
|
||||
cr,
|
||||
0, 0,
|
||||
gtk_widget_get_allocated_width (tooltips),
|
||||
gtk_widget_get_allocated_height (tooltips));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
int root_x, int root_y,
|
||||
const char *markup_text)
|
||||
{
|
||||
int w, h;
|
||||
|
||||
if (tip == NULL)
|
||||
{
|
||||
tip = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
gtk_window_set_type_hint (GTK_WINDOW(tip), GDK_WINDOW_TYPE_HINT_TOOLTIP);
|
||||
|
||||
{
|
||||
GdkScreen *gdk_screen;
|
||||
GdkRectangle monitor;
|
||||
gint mon_num;
|
||||
|
||||
gdk_screen = gdk_display_get_screen (gdk_display_get_default (),
|
||||
screen_number);
|
||||
gtk_window_set_screen (GTK_WINDOW (tip),
|
||||
gdk_screen);
|
||||
mon_num = gdk_screen_get_monitor_at_point (gdk_screen, root_x, root_y);
|
||||
gdk_screen_get_monitor_geometry (gdk_screen, mon_num, &monitor);
|
||||
screen_right_edge = monitor.x + monitor.width;
|
||||
screen_bottom_edge = monitor.y + monitor.height;
|
||||
}
|
||||
|
||||
gtk_widget_set_app_paintable (tip, TRUE);
|
||||
gtk_window_set_resizable (GTK_WINDOW (tip), FALSE);
|
||||
gtk_widget_set_name (tip, "gtk-tooltips");
|
||||
gtk_container_set_border_width (GTK_CONTAINER (tip), 4);
|
||||
|
||||
g_signal_connect (tip, "draw",
|
||||
G_CALLBACK (draw_handler), NULL);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
|
||||
gtk_widget_show (label);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (tip), label);
|
||||
|
||||
g_signal_connect (tip, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &tip);
|
||||
}
|
||||
|
||||
gtk_label_set_markup (GTK_LABEL (label), markup_text);
|
||||
|
||||
gtk_window_get_size (GTK_WINDOW (tip), &w, &h);
|
||||
|
||||
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
|
||||
root_x = MAX(0, root_x - w);
|
||||
|
||||
if ((root_x + w) > screen_right_edge)
|
||||
root_x -= (root_x + w) - screen_right_edge;
|
||||
|
||||
gtk_window_move (GTK_WINDOW (tip), root_x, root_y);
|
||||
|
||||
gtk_widget_show (tip);
|
||||
}
|
||||
|
||||
void
|
||||
meta_fixed_tip_hide (void)
|
||||
{
|
||||
if (tip)
|
||||
{
|
||||
gtk_widget_destroy (tip);
|
||||
tip = NULL;
|
||||
}
|
||||
}
|
69
src/ui/fixedtip.h
Normal file
69
src/ui/fixedtip.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2001 Havoc Pennington
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
* 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file fixedtip.h Mutter fixed tooltip routine
|
||||
*
|
||||
* Sometimes we want to display a small floating rectangle with helpful
|
||||
* text near the pointer. For example, if the user holds the mouse over
|
||||
* the maximise button, we can display a tooltip saying "Maximize".
|
||||
* The text is localised, of course.
|
||||
*
|
||||
* This file contains the functions to create and delete these tooltips.
|
||||
*
|
||||
* \todo Since we now consider MetaDisplay a singleton, there can be
|
||||
* only one tooltip per display; this might quite simply live in
|
||||
* display.c. Alternatively, it could move to frames.c, which
|
||||
* is the only place this business is called anyway.
|
||||
*
|
||||
* \todo Apparently some UI needs changing (check bugzilla)
|
||||
*/
|
||||
|
||||
#ifndef META_FIXED_TIP_H
|
||||
#define META_FIXED_TIP_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
|
||||
/**
|
||||
* Displays a tooltip. There can be only one across the entire system.
|
||||
* This function behaves identically whether or not a tooltip is already
|
||||
* displayed, but if it is the window will be reused rather than destroyed
|
||||
* and recreated.
|
||||
*
|
||||
* \param xdisplay An X display.
|
||||
* \param screen_number The number of the screen.
|
||||
* \param root_x The X coordinate where the tooltip should appear
|
||||
* \param root_y The Y coordinate where the tooltip should appear
|
||||
* \param markup_text Text to display in the tooltip; can contain markup
|
||||
*/
|
||||
void meta_fixed_tip_show (Display *xdisplay, int screen_number,
|
||||
int root_x, int root_y,
|
||||
const char *markup_text);
|
||||
|
||||
/**
|
||||
* Removes the tooltip that was created by meta_fixed_tip_show(). If there
|
||||
* is no tooltip currently visible, this is a no-op.
|
||||
*/
|
||||
void meta_fixed_tip_hide (void);
|
||||
|
||||
|
||||
#endif
|
166
src/ui/frames.c
166
src/ui/frames.c
@@ -31,6 +31,7 @@
|
||||
#include <meta/util.h>
|
||||
#include "core.h"
|
||||
#include "menu.h"
|
||||
#include "fixedtip.h"
|
||||
#include <meta/theme.h>
|
||||
#include <meta/prefs.h>
|
||||
#include "ui.h"
|
||||
@@ -97,6 +98,7 @@ static MetaFrameControl get_control (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
int x,
|
||||
int y);
|
||||
static void clear_tip (MetaFrames *frames);
|
||||
static void invalidate_all_caches (MetaFrames *frames);
|
||||
static void invalidate_whole_window (MetaFrames *frames,
|
||||
MetaUIFrame *frame);
|
||||
@@ -271,7 +273,6 @@ meta_frames_init (MetaFrames *frames)
|
||||
|
||||
frames->style_variants = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
g_free, g_object_unref);
|
||||
update_style_contexts (frames);
|
||||
|
||||
gtk_widget_set_double_buffered (GTK_WIDGET (frames), FALSE);
|
||||
|
||||
@@ -296,6 +297,8 @@ meta_frames_destroy (GtkWidget *object)
|
||||
|
||||
frames = META_FRAMES (object);
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
winlist = NULL;
|
||||
g_hash_table_foreach (frames->frames, listify_func, &winlist);
|
||||
|
||||
@@ -720,6 +723,8 @@ meta_frames_unmanage_window (MetaFrames *frames,
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
frame = g_hash_table_lookup (frames->frames, &xwindow);
|
||||
|
||||
if (frame)
|
||||
@@ -1117,6 +1122,155 @@ meta_frames_repaint_frame (MetaFrames *frames,
|
||||
gdk_window_process_all_updates ();
|
||||
}
|
||||
|
||||
static void
|
||||
show_tip_now (MetaFrames *frames)
|
||||
{
|
||||
const char *tiptext;
|
||||
MetaUIFrame *frame;
|
||||
int x, y, root_x, root_y;
|
||||
Window root, child;
|
||||
guint mask;
|
||||
MetaFrameControl control;
|
||||
Display *display;
|
||||
|
||||
frame = frames->last_motion_frame;
|
||||
if (frame == NULL)
|
||||
return;
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
|
||||
XQueryPointer (display,
|
||||
frame->xwindow,
|
||||
&root, &child,
|
||||
&root_x, &root_y,
|
||||
&x, &y,
|
||||
&mask);
|
||||
|
||||
control = get_control (frames, frame, x, y);
|
||||
|
||||
tiptext = NULL;
|
||||
switch (control)
|
||||
{
|
||||
case META_FRAME_CONTROL_TITLE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_DELETE:
|
||||
tiptext = _("Close Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_MENU:
|
||||
tiptext = _("Window Menu");
|
||||
break;
|
||||
case META_FRAME_CONTROL_MINIMIZE:
|
||||
tiptext = _("Minimize Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_MAXIMIZE:
|
||||
tiptext = _("Maximize Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNMAXIMIZE:
|
||||
tiptext = _("Restore Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_SHADE:
|
||||
tiptext = _("Roll Up Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSHADE:
|
||||
tiptext = _("Unroll Window");
|
||||
break;
|
||||
case META_FRAME_CONTROL_ABOVE:
|
||||
tiptext = _("Keep Window On Top");
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNABOVE:
|
||||
tiptext = _("Remove Window From Top");
|
||||
break;
|
||||
case META_FRAME_CONTROL_STICK:
|
||||
tiptext = _("Always On Visible Workspace");
|
||||
break;
|
||||
case META_FRAME_CONTROL_UNSTICK:
|
||||
tiptext = _("Put Window On Only One Workspace");
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_S:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_SW:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_N:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_NE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_NW:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_W:
|
||||
break;
|
||||
case META_FRAME_CONTROL_RESIZE_E:
|
||||
break;
|
||||
case META_FRAME_CONTROL_NONE:
|
||||
break;
|
||||
case META_FRAME_CONTROL_CLIENT_AREA:
|
||||
break;
|
||||
}
|
||||
|
||||
if (tiptext)
|
||||
{
|
||||
MetaFrameGeometry fgeom;
|
||||
GdkRectangle *rect;
|
||||
int dx, dy;
|
||||
int screen_number;
|
||||
|
||||
meta_frames_calc_geometry (frames, frame, &fgeom);
|
||||
|
||||
rect = control_rect (control, &fgeom);
|
||||
|
||||
/* get conversion delta for root-to-frame coords */
|
||||
dx = root_x - x;
|
||||
dy = root_y - y;
|
||||
|
||||
/* Align the tooltip to the button right end if RTL */
|
||||
if (meta_ui_get_direction() == META_UI_DIRECTION_RTL)
|
||||
dx += rect->width;
|
||||
|
||||
screen_number = gdk_screen_get_number (gtk_widget_get_screen (GTK_WIDGET (frames)));
|
||||
|
||||
meta_fixed_tip_show (display,
|
||||
screen_number,
|
||||
rect->x + dx,
|
||||
rect->y + rect->height + 2 + dy,
|
||||
tiptext);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
tip_timeout_func (gpointer data)
|
||||
{
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = data;
|
||||
|
||||
show_tip_now (frames);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#define TIP_DELAY 450
|
||||
static void
|
||||
queue_tip (MetaFrames *frames)
|
||||
{
|
||||
clear_tip (frames);
|
||||
|
||||
frames->tooltip_timeout = g_timeout_add (TIP_DELAY,
|
||||
tip_timeout_func,
|
||||
frames);
|
||||
}
|
||||
|
||||
static void
|
||||
clear_tip (MetaFrames *frames)
|
||||
{
|
||||
if (frames->tooltip_timeout)
|
||||
{
|
||||
g_source_remove (frames->tooltip_timeout);
|
||||
frames->tooltip_timeout = 0;
|
||||
}
|
||||
meta_fixed_tip_hide ();
|
||||
}
|
||||
|
||||
static void
|
||||
redraw_control (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
@@ -1287,6 +1441,8 @@ meta_frames_button_press_event (GtkWidget *widget,
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
control = get_control (frames, frame, event->x, event->y);
|
||||
|
||||
/* focus on click, even if click was on client area */
|
||||
@@ -1551,6 +1707,8 @@ meta_frames_button_release_event (GtkWidget *widget,
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
op = meta_core_get_grab_op (display);
|
||||
|
||||
if (op == META_GRAB_OP_NONE)
|
||||
@@ -1787,6 +1945,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
frames->last_motion_frame = frame;
|
||||
|
||||
grab_op = meta_core_get_grab_op (display);
|
||||
@@ -1857,6 +2017,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
|
||||
|
||||
/* Update prelit control and cursor */
|
||||
meta_frames_update_prelit_control (frames, frame, control);
|
||||
|
||||
queue_tip (frames);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2401,6 +2563,8 @@ meta_frames_leave_notify_event (GtkWidget *widget,
|
||||
|
||||
meta_frames_update_prelit_control (frames, frame, META_FRAME_CONTROL_NONE);
|
||||
|
||||
clear_tip (frames);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@@ -203,8 +203,8 @@ meta_preview_draw (GtkWidget *widget,
|
||||
ensure_info (preview);
|
||||
cairo_save (cr);
|
||||
|
||||
client_width = allocation.width - preview->borders.total.left - preview->borders.total.right;
|
||||
client_height = allocation.height - preview->borders.total.top - preview->borders.total.bottom;
|
||||
client_width = allocation.width - preview->borders.visible.left - preview->borders.visible.right;
|
||||
client_height = allocation.height - preview->borders.visible.top - preview->borders.visible.bottom;
|
||||
|
||||
if (client_width < 0)
|
||||
client_width = 1;
|
||||
@@ -246,7 +246,7 @@ meta_preview_get_preferred_width (GtkWidget *widget,
|
||||
|
||||
ensure_info (preview);
|
||||
|
||||
*minimum = *natural = preview->borders.total.left + preview->borders.total.right;
|
||||
*minimum = *natural = preview->borders.visible.left + preview->borders.visible.right;
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (preview));
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
@@ -277,7 +277,7 @@ meta_preview_get_preferred_height (GtkWidget *widget,
|
||||
|
||||
ensure_info (preview);
|
||||
|
||||
*minimum = *natural = preview->borders.total.top + preview->borders.total.bottom;
|
||||
*minimum = *natural = preview->borders.visible.top + preview->borders.visible.bottom;
|
||||
|
||||
child = gtk_bin_get_child (GTK_BIN (preview));
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
@@ -314,11 +314,11 @@ meta_preview_size_allocate (GtkWidget *widget,
|
||||
if (child && gtk_widget_get_visible (child))
|
||||
{
|
||||
gtk_widget_get_allocation (widget, &widget_allocation);
|
||||
child_allocation.x = widget_allocation.x + preview->borders.total.left;
|
||||
child_allocation.y = widget_allocation.y + preview->borders.total.top;
|
||||
child_allocation.x = widget_allocation.x + preview->borders.visible.left;
|
||||
child_allocation.y = widget_allocation.y + preview->borders.visible.top;
|
||||
|
||||
child_allocation.width = MAX (1, widget_allocation.width - preview->borders.total.left - preview->borders.total.right);
|
||||
child_allocation.height = MAX (1, widget_allocation.height - preview->borders.total.top - preview->borders.total.bottom);
|
||||
child_allocation.width = MAX (1, widget_allocation.width - preview->borders.visible.left - preview->borders.visible.right);
|
||||
child_allocation.height = MAX (1, widget_allocation.height - preview->borders.visible.top - preview->borders.visible.bottom);
|
||||
|
||||
gtk_widget_size_allocate (child, &child_allocation);
|
||||
}
|
||||
|
@@ -1013,8 +1013,8 @@ run_theme_benchmark (void)
|
||||
*/
|
||||
pixmap = gdk_window_create_similar_surface (gtk_widget_get_window (widget),
|
||||
CAIRO_CONTENT_COLOR,
|
||||
client_width + borders.total.left + borders.total.right,
|
||||
client_height + borders.total.top + borders.total.bottom);
|
||||
client_width + borders.visible.left + borders.visible.right,
|
||||
client_height + borders.visible.top + borders.visible.bottom);
|
||||
|
||||
cr = cairo_create (pixmap);
|
||||
|
||||
|
@@ -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 ("backdrop", str) == 0)
|
||||
return GTK_STATE_FLAG_BACKDROP;
|
||||
else if (g_ascii_strcasecmp ("window-unfocused", str) == 0)
|
||||
return GTK_STATE_FLAG_WINDOW_UNFOCUSED;
|
||||
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_BACKDROP:
|
||||
return "BACKDROP";
|
||||
case GTK_STATE_FLAG_WINDOW_UNFOCUSED:
|
||||
return "WINDOW_UNFOCUSED";
|
||||
}
|
||||
|
||||
return "<unknown>";
|
||||
|
@@ -39,6 +39,8 @@ struct _MetaTilePreview {
|
||||
GdkRGBA *preview_color;
|
||||
|
||||
MetaRectangle tile_rect;
|
||||
|
||||
gboolean has_alpha: 1;
|
||||
};
|
||||
|
||||
static gboolean
|
||||
@@ -50,17 +52,30 @@ meta_tile_preview_draw (GtkWidget *widget,
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
||||
/* Fill the preview area with a transparent color */
|
||||
gdk_cairo_set_source_rgba (cr, preview->preview_color);
|
||||
if (preview->has_alpha)
|
||||
{
|
||||
/* 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);
|
||||
/* 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);
|
||||
}
|
||||
|
||||
cairo_rectangle (cr,
|
||||
0.5, 0.5,
|
||||
@@ -72,13 +87,11 @@ meta_tile_preview_draw (GtkWidget *widget,
|
||||
}
|
||||
|
||||
MetaTilePreview *
|
||||
meta_tile_preview_new (int screen_number)
|
||||
meta_tile_preview_new (int screen_number,
|
||||
gboolean composited)
|
||||
{
|
||||
MetaTilePreview *preview;
|
||||
GdkScreen *screen;
|
||||
GtkStyleContext *context;
|
||||
GtkWidgetPath *path;
|
||||
guchar selection_alpha = 0xFF;
|
||||
|
||||
screen = gdk_display_get_screen (gdk_display_get_default (), screen_number);
|
||||
|
||||
@@ -94,34 +107,44 @@ 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;
|
||||
|
||||
gtk_widget_set_visual (preview->preview_window,
|
||||
gdk_screen_get_rgba_visual (screen));
|
||||
preview->has_alpha = composited &&
|
||||
(gdk_screen_get_rgba_visual (screen) != NULL);
|
||||
|
||||
path = gtk_widget_path_new ();
|
||||
gtk_widget_path_append_type (path, GTK_TYPE_ICON_VIEW);
|
||||
if (preview->has_alpha)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
GtkWidgetPath *path;
|
||||
guchar selection_alpha = 0xFF;
|
||||
|
||||
context = gtk_style_context_new ();
|
||||
gtk_style_context_set_path (context, path);
|
||||
gtk_style_context_add_class (context,
|
||||
GTK_STYLE_CLASS_RUBBERBAND);
|
||||
gtk_widget_set_visual (preview->preview_window,
|
||||
gdk_screen_get_rgba_visual (screen));
|
||||
|
||||
gtk_widget_path_free (path);
|
||||
path = gtk_widget_path_new ();
|
||||
gtk_widget_path_append_type (path, GTK_TYPE_ICON_VIEW);
|
||||
|
||||
gtk_style_context_get (context, GTK_STATE_FLAG_SELECTED,
|
||||
"background-color", &preview->preview_color,
|
||||
NULL);
|
||||
context = gtk_style_context_new ();
|
||||
gtk_style_context_set_path (context, path);
|
||||
gtk_style_context_add_class (context,
|
||||
GTK_STYLE_CLASS_RUBBERBAND);
|
||||
|
||||
/* 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_widget_path_free (path);
|
||||
|
||||
g_object_unref (context);
|
||||
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);
|
||||
}
|
||||
|
||||
/* We make an assumption that XCreateWindow will be the first operation
|
||||
* when calling gtk_widget_realize() (via gdk_window_new()), or that it
|
||||
@@ -177,6 +200,33 @@ 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,7 +27,8 @@
|
||||
|
||||
typedef struct _MetaTilePreview MetaTilePreview;
|
||||
|
||||
MetaTilePreview *meta_tile_preview_new (int screen_number);
|
||||
MetaTilePreview *meta_tile_preview_new (int screen_number,
|
||||
gboolean composited);
|
||||
void meta_tile_preview_free (MetaTilePreview *preview);
|
||||
void meta_tile_preview_show (MetaTilePreview *preview,
|
||||
MetaRectangle *rect);
|
||||
|
Reference in New Issue
Block a user