Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ca3dc2e876 | ||
![]() |
70d85049b1 | ||
![]() |
29f6f5e0ad | ||
![]() |
d249cfd040 | ||
![]() |
3cb912aee2 | ||
![]() |
7df823132c | ||
![]() |
41353d642b | ||
![]() |
c47039db82 | ||
![]() |
0dab6df25a | ||
![]() |
c844bab232 | ||
![]() |
848f9d1399 | ||
![]() |
2e63de5c0a | ||
![]() |
7319b10d72 | ||
![]() |
1265efcf78 | ||
![]() |
3e0ef03fd9 | ||
![]() |
37076941ad | ||
![]() |
25e43618a4 | ||
![]() |
fd404bafc8 | ||
![]() |
3b3b26b000 |
25
NEWS
25
NEWS
@@ -1,3 +1,28 @@
|
|||||||
|
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
|
3.3.4
|
||||||
=====
|
=====
|
||||||
* Adapt to changes in GtkStateFlags [Owen]
|
* Adapt to changes in GtkStateFlags [Owen]
|
||||||
|
56
configure.in
56
configure.in
@@ -2,7 +2,7 @@ AC_PREREQ(2.50)
|
|||||||
|
|
||||||
m4_define([mutter_major_version], [3])
|
m4_define([mutter_major_version], [3])
|
||||||
m4_define([mutter_minor_version], [3])
|
m4_define([mutter_minor_version], [3])
|
||||||
m4_define([mutter_micro_version], [4])
|
m4_define([mutter_micro_version], [90])
|
||||||
|
|
||||||
m4_define([mutter_version],
|
m4_define([mutter_version],
|
||||||
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
[mutter_major_version.mutter_minor_version.mutter_micro_version])
|
||||||
@@ -61,12 +61,21 @@ AC_CHECK_SIZEOF(__int64)
|
|||||||
## byte order
|
## byte order
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
GTK_MIN_VERSION=3.3.3
|
|
||||||
GIO_MIN_VERSION=2.25.10
|
|
||||||
CANBERRA_GTK=libcanberra-gtk3
|
CANBERRA_GTK=libcanberra-gtk3
|
||||||
CANBERRA_GTK_VERSION=0.26
|
CANBERRA_GTK_VERSION=0.26
|
||||||
|
|
||||||
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"
|
CLUTTER_PACKAGE=clutter-1.0
|
||||||
|
|
||||||
|
MUTTER_PC_MODULES="
|
||||||
|
gtk+-3.0 >= 3.3.7
|
||||||
|
gio-2.0 >= 2.5.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
|
||||||
|
"
|
||||||
|
|
||||||
GLIB_GSETTINGS
|
GLIB_GSETTINGS
|
||||||
|
|
||||||
@@ -113,8 +122,8 @@ AM_GLIB_GNU_GETTEXT
|
|||||||
# GRegex requires Glib-2.14.0
|
# GRegex requires Glib-2.14.0
|
||||||
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.14.0)
|
||||||
# gtk_window_set_icon_name requires gtk2+-2.6.0
|
# gtk_window_set_icon_name requires gtk2+-2.6.0
|
||||||
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0 >= $GTK_MIN_VERSION)
|
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-3.0)
|
||||||
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0 >= $GTK_MIN_VERSION)
|
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-3.0)
|
||||||
|
|
||||||
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
# Unconditionally use this dir to avoid a circular dep with gnomecc
|
||||||
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
|
||||||
@@ -164,31 +173,6 @@ else
|
|||||||
fi
|
fi
|
||||||
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
|
INTROSPECTION_VERSION=0.9.5
|
||||||
GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
|
GOBJECT_INTROSPECTION_CHECK([$INTROSPECTION_VERSION])
|
||||||
|
|
||||||
@@ -220,6 +204,10 @@ fi
|
|||||||
|
|
||||||
PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES)
|
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
|
AC_PATH_XTRA
|
||||||
|
|
||||||
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
ALL_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
|
||||||
@@ -470,7 +458,7 @@ if test "$enable_compile_warnings" != no ; then
|
|||||||
if test "$enable_compile_warnings" = error; then
|
if test "$enable_compile_warnings" = error; then
|
||||||
case " $CFLAGS " in
|
case " $CFLAGS " in
|
||||||
*[\ \ ]-Werror[\ \ ]*) ;;
|
*[\ \ ]-Werror[\ \ ]*) ;;
|
||||||
*) CFLAGS="$CFLAGS -Werror" ;;
|
*) CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -524,8 +512,8 @@ MUTTER_MINOR_VERSION=mutter_minor_version
|
|||||||
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
|
if expr $MUTTER_MINOR_VERSION % 2 > /dev/null ; then
|
||||||
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
|
stable_version=`expr $MUTTER_MINOR_VERSION - 1`
|
||||||
echo "This is the UNSTABLE branch of mutter"
|
echo "This is the UNSTABLE branch of mutter"
|
||||||
echo -n "Use 2.$stable_version.x for stable "
|
echo -n "Use 3.$stable_version.x for stable "
|
||||||
echo "(gnome-2-$stable_version branch in git)"
|
echo "(gnome-3-$stable_version branch in git)"
|
||||||
else
|
else
|
||||||
echo "This is the stable branch of mutter"
|
echo "This is the stable branch of mutter"
|
||||||
fi
|
fi
|
||||||
|
142
po/nb.po
142
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.
|
# Copyright © 2002-2004 Free Software Foundation, Inc.
|
||||||
# Kjartan Maraas <kmaraas@gnome.org>, 2002-2011.
|
# Kjartan Maraas <kmaraas@gnome.org>, 2002-2012.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: mutter 3.3.x\n"
|
"Project-Id-Version: mutter 3.3.x\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2011-12-14 22:59+0100\n"
|
"POT-Creation-Date: 2012-01-28 17:38+0100\n"
|
||||||
"PO-Revision-Date: 2011-12-14 22:59+0100\n"
|
"PO-Revision-Date: 2012-01-28 17:38+0100\n"
|
||||||
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
|
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
|
||||||
"Language-Team: Norwegian bokmål <i18n-no@lister.ping.uio.no>\n"
|
"Language-Team: Norwegian bokmål <i18n-no@lister.ping.uio.no>\n"
|
||||||
"Language: \n"
|
"Language: \n"
|
||||||
@@ -16,17 +16,17 @@ msgstr ""
|
|||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
#: ../src/50-mutter-windows.xml.in.h:1
|
#: ../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"
|
msgid "View split on left"
|
||||||
msgstr "Visning delt til venstre"
|
msgstr "Visning delt til venstre"
|
||||||
|
|
||||||
#: ../src/50-mutter-windows.xml.in.h:2
|
#: ../src/50-mutter-windows.xml.in.h:3
|
||||||
msgid "View split on right"
|
msgid "View split on right"
|
||||||
msgstr "Visning delt til høyre"
|
msgstr "Visning delt til høyre"
|
||||||
|
|
||||||
#: ../src/50-mutter-windows.xml.in.h:3
|
|
||||||
msgid "Windows"
|
|
||||||
msgstr "Vinduer"
|
|
||||||
|
|
||||||
#. This probably means that a non-WM compositor like xcompmgr is running;
|
#. This probably means that a non-WM compositor like xcompmgr is running;
|
||||||
#. * we have no way to get it to exit
|
#. * we have no way to get it to exit
|
||||||
#: ../src/compositor/compositor.c:492
|
#: ../src/compositor/compositor.c:492
|
||||||
@@ -126,7 +126,7 @@ msgstr ""
|
|||||||
"Kunne ikke finne et tema! Sjekk at %s eksisterer og inneholder de vanlige "
|
"Kunne ikke finne et tema! Sjekk at %s eksisterer og inneholder de vanlige "
|
||||||
"temaene.\n"
|
"temaene.\n"
|
||||||
|
|
||||||
#: ../src/core/mutter.c:42
|
#: ../src/core/mutter.c:40
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"mutter %s\n"
|
"mutter %s\n"
|
||||||
@@ -140,15 +140,15 @@ msgstr ""
|
|||||||
"Dette er fri programvare; se i kildekoden for kopibetingelser.\n"
|
"Dette er fri programvare; se i kildekoden for kopibetingelser.\n"
|
||||||
"Det gis INGEN garanti.\n"
|
"Det gis INGEN garanti.\n"
|
||||||
|
|
||||||
#: ../src/core/mutter.c:56
|
#: ../src/core/mutter.c:54
|
||||||
msgid "Print version"
|
msgid "Print version"
|
||||||
msgstr "Skriv versjonsnummer"
|
msgstr "Skriv versjonsnummer"
|
||||||
|
|
||||||
#: ../src/core/mutter.c:62
|
#: ../src/core/mutter.c:60
|
||||||
msgid "Comma-separated list of compositor plugins"
|
msgid "Comma-separated list of compositor plugins"
|
||||||
msgstr "Kommaseparert liste av tillegg for compositor"
|
msgstr "Kommaseparert liste av tillegg for compositor"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1067
|
#: ../src/core/prefs.c:1069
|
||||||
msgid ""
|
msgid ""
|
||||||
"Workarounds for broken applications disabled. Some applications may not "
|
"Workarounds for broken applications disabled. Some applications may not "
|
||||||
"behave properly.\n"
|
"behave properly.\n"
|
||||||
@@ -156,12 +156,12 @@ msgstr ""
|
|||||||
"Funksjonalitet for å gå rundt ødelagte programmer er deaktivert. Noen "
|
"Funksjonalitet for å gå rundt ødelagte programmer er deaktivert. Noen "
|
||||||
"programmer vil kanskje ikke oppføre seg korrekt.\n"
|
"programmer vil kanskje ikke oppføre seg korrekt.\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1142
|
#: ../src/core/prefs.c:1144
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
|
msgid "Could not parse font description \"%s\" from GSettings key %s\n"
|
||||||
msgstr "Kunne ikke tolke skriftbeskrivelsen «%s» fra GSettings-nøkkel %s\n"
|
msgstr "Kunne ikke tolke skriftbeskrivelsen «%s» fra GSettings-nøkkel %s\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1208
|
#: ../src/core/prefs.c:1210
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"%s\" found in configuration database is not a valid value for mouse button "
|
"\"%s\" found in configuration database is not a valid value for mouse button "
|
||||||
@@ -170,7 +170,7 @@ msgstr ""
|
|||||||
"«%s» funnet i konfigurasjonsdatabasen er ikke en gyldig verdi for endring av "
|
"«%s» funnet i konfigurasjonsdatabasen er ikke en gyldig verdi for endring av "
|
||||||
"musknapp\n"
|
"musknapp\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1720
|
#: ../src/core/prefs.c:1722
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\"%s\" found in configuration database is not a valid value for keybinding "
|
"\"%s\" found in configuration database is not a valid value for keybinding "
|
||||||
@@ -179,7 +179,7 @@ msgstr ""
|
|||||||
"«%s» funnet i konfigurasjonsdatabasen er ikke en gyldig verdi for "
|
"«%s» funnet i konfigurasjonsdatabasen er ikke en gyldig verdi for "
|
||||||
"tastaturbinding «%s»\n"
|
"tastaturbinding «%s»\n"
|
||||||
|
|
||||||
#: ../src/core/prefs.c:1817
|
#: ../src/core/prefs.c:1819
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Workspace %d"
|
msgid "Workspace %d"
|
||||||
msgstr "Arbeidsområde %d"
|
msgstr "Arbeidsområde %d"
|
||||||
@@ -307,7 +307,7 @@ msgid "Window manager error: "
|
|||||||
msgstr "Feil i vindushåndterer: "
|
msgstr "Feil i vindushåndterer: "
|
||||||
|
|
||||||
#. first time through
|
#. first time through
|
||||||
#: ../src/core/window.c:7141
|
#: ../src/core/window.c:7219
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
"Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER "
|
||||||
@@ -323,7 +323,7 @@ msgstr ""
|
|||||||
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
#. * MWM but not WM_NORMAL_HINTS are basically broken. We complain
|
||||||
#. * about these apps but make them work.
|
#. * about these apps but make them work.
|
||||||
#.
|
#.
|
||||||
#: ../src/core/window.c:7804
|
#: ../src/core/window.c:7882
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
"Window %s sets an MWM hint indicating it isn't resizable, but sets min size "
|
||||||
@@ -386,14 +386,40 @@ msgid "Mutter"
|
|||||||
msgstr "Mutter"
|
msgstr "Mutter"
|
||||||
|
|
||||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:1
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:1
|
||||||
|
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
|
||||||
|
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 ""
|
||||||
|
"Denne tasten vil initiere «overlay», som er en kombinasjon av vindusoversikt "
|
||||||
|
"og et system for å starte programmer. Forvalget er ment å være «Windows-"
|
||||||
|
"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"
|
msgid "Attach modal dialogs"
|
||||||
msgstr "Fest modale dialoger"
|
msgstr "Fest modale dialoger"
|
||||||
|
|
||||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:2
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:4
|
||||||
msgid "Cancel tab popup"
|
msgid ""
|
||||||
msgstr "Avbryt tabulatordialog"
|
"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 ""
|
||||||
|
"Hvis denne er satt til sann vil modale dialoger vises festet til "
|
||||||
|
"tittellinjen på opphavsvinduet og flyttes sammen med dette i stedet for å ha "
|
||||||
|
"individuelle tittellinjer."
|
||||||
|
|
||||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:3
|
#: ../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 ""
|
msgid ""
|
||||||
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
"Determines whether hidden windows (i.e., minimized windows and windows on "
|
||||||
"other workspaces than the current one) should be kept alive."
|
"other workspaces than the current one) should be kept alive."
|
||||||
@@ -401,26 +427,6 @@ msgstr ""
|
|||||||
"Bestemmer om skjulte vinduer, f.eks minimerte vinduer og vinduer på andre "
|
"Bestemmer om skjulte vinduer, f.eks minimerte vinduer og vinduer på andre "
|
||||||
"arbeidsområder enn aktivt arbeidsområde, skal holdes i live."
|
"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
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:7
|
||||||
msgid "Enable edge tiling when dropping windows on screen edges"
|
msgid "Enable edge tiling when dropping windows on screen edges"
|
||||||
msgstr "Slå på kantflising ved slipp av vinduer på skjermkantene"
|
msgstr "Slå på kantflising ved slipp av vinduer på skjermkantene"
|
||||||
@@ -437,22 +443,34 @@ msgstr ""
|
|||||||
"fullstendig."
|
"fullstendig."
|
||||||
|
|
||||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:9
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:9
|
||||||
msgid "Live Hidden Windows"
|
msgid "Workspaces only on primary"
|
||||||
msgstr "Levende skjulte vinduer"
|
msgstr "Arbeidsområder kun på primær skjerm"
|
||||||
|
|
||||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:10
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:10
|
||||||
msgid "Modifier to use for extended window management operations"
|
msgid ""
|
||||||
msgstr "Endringstast som skal brukes for utvidede vindushåndteringsoperasjoner"
|
"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:11
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:11
|
||||||
msgid "No tab popup"
|
msgid "No tab popup"
|
||||||
msgstr "Ingen tabulatordialog"
|
msgstr "Ingen tabulatordialog"
|
||||||
|
|
||||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:12
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:12
|
||||||
msgid "Select window from tab popup"
|
msgid ""
|
||||||
msgstr "Fjern vindu fra tabulatordialog"
|
"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:13
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:13
|
||||||
|
msgid "Draggable border width"
|
||||||
|
msgstr "Bredde på drakant"
|
||||||
|
|
||||||
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:14
|
||||||
msgid ""
|
msgid ""
|
||||||
"The amount of total draggable borders. If the theme's visible borders are "
|
"The amount of total draggable borders. If the theme's visible borders are "
|
||||||
"not enough, invisible borders will be added to meet this value."
|
"not enough, invisible borders will be added to meet this value."
|
||||||
@@ -460,31 +478,13 @@ msgstr ""
|
|||||||
"Total mengde med drakant. Hvis temas synlige kanter ikke er nok vil usynlige "
|
"Total mengde med drakant. Hvis temas synlige kanter ikke er nok vil usynlige "
|
||||||
"kanter legges til for å imøtekomme denne verdien."
|
"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 "
|
|
||||||
"\"Windows key\" on PC hardware. It's expected that this binding either the "
|
|
||||||
"default or set to the empty string."
|
|
||||||
msgstr ""
|
|
||||||
"Denne tasten vil initiere «overlay», som er en kombinasjon av vindusoversikt "
|
|
||||||
"og et system for å starte programmer. Forvalget er ment å være «Windows-"
|
|
||||||
"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:15
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:15
|
||||||
msgid ""
|
msgid "Select window from tab popup"
|
||||||
"When true, instead of having independent titlebars, modal dialogs appear "
|
msgstr "Fjern vindu fra tabulatordialog"
|
||||||
"attached to the titlebar of the parent window and are moved together with "
|
|
||||||
"the parent window."
|
|
||||||
msgstr ""
|
|
||||||
"Hvis denne er satt til sann vil modale dialoger vises festet til "
|
|
||||||
"tittellinjen på opphavsvinduet og flyttes sammen med dette i stedet for å ha "
|
|
||||||
"individuelle tittellinjer."
|
|
||||||
|
|
||||||
#: ../src/org.gnome.mutter.gschema.xml.in.h:16
|
#: ../src/org.gnome.mutter.gschema.xml.in.h:16
|
||||||
msgid "Workspaces only on primary"
|
msgid "Cancel tab popup"
|
||||||
msgstr "Arbeidsområder kun på primær skjerm"
|
msgstr "Avbryt tabulatordialog"
|
||||||
|
|
||||||
#: ../src/tools/mutter-message.c:123
|
#: ../src/tools/mutter-message.c:123
|
||||||
#, c-format
|
#, c-format
|
||||||
|
929
po/sr@latin.po
929
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1113
po/zh_HK.po
1113
po/zh_HK.po
File diff suppressed because it is too large
Load Diff
1113
po/zh_TW.po
1113
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@@ -52,7 +52,6 @@ libmutter_la_SOURCES = \
|
|||||||
compositor/meta-shadow-factory.c \
|
compositor/meta-shadow-factory.c \
|
||||||
compositor/meta-shadow-factory-private.h \
|
compositor/meta-shadow-factory-private.h \
|
||||||
compositor/meta-shaped-texture.c \
|
compositor/meta-shaped-texture.c \
|
||||||
compositor/meta-shaped-texture.h \
|
|
||||||
compositor/meta-texture-rectangle.c \
|
compositor/meta-texture-rectangle.c \
|
||||||
compositor/meta-texture-rectangle.h \
|
compositor/meta-texture-rectangle.h \
|
||||||
compositor/meta-texture-tower.c \
|
compositor/meta-texture-tower.c \
|
||||||
@@ -172,6 +171,7 @@ libmutterinclude_base_headers = \
|
|||||||
meta/main.h \
|
meta/main.h \
|
||||||
meta/meta-background-actor.h \
|
meta/meta-background-actor.h \
|
||||||
meta/meta-plugin.h \
|
meta/meta-plugin.h \
|
||||||
|
meta/meta-shaped-texture.h \
|
||||||
meta/meta-shadow-factory.h \
|
meta/meta-shadow-factory.h \
|
||||||
meta/meta-window-actor.h \
|
meta/meta-window-actor.h \
|
||||||
meta/prefs.h \
|
meta/prefs.h \
|
||||||
|
@@ -28,6 +28,9 @@
|
|||||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||||
#include <cogl/cogl-texture-pixmap-x11.h>
|
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||||
|
|
||||||
|
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||||
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
#include "cogl-utils.h"
|
#include "cogl-utils.h"
|
||||||
@@ -252,6 +255,8 @@ meta_background_actor_dispose (GObject *object)
|
|||||||
cogl_handle_unref (priv->material);
|
cogl_handle_unref (priv->material);
|
||||||
priv->material = COGL_INVALID_HANDLE;
|
priv->material = COGL_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (meta_background_actor_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -537,9 +542,11 @@ meta_background_actor_update (MetaScreen *screen)
|
|||||||
if (root_pixmap_id != None)
|
if (root_pixmap_id != None)
|
||||||
{
|
{
|
||||||
CoglHandle texture;
|
CoglHandle texture;
|
||||||
|
CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
texture = cogl_texture_pixmap_x11_new (root_pixmap_id, FALSE);
|
texture = cogl_texture_pixmap_x11_new (ctx, root_pixmap_id, FALSE, &error);
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
if (texture != COGL_INVALID_HANDLE)
|
if (texture != COGL_INVALID_HANDLE)
|
||||||
@@ -550,6 +557,12 @@ meta_background_actor_update (MetaScreen *screen)
|
|||||||
background->have_pixmap = True;
|
background->have_pixmap = True;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g_warning ("Failed to create background texture from pixmap: %s",
|
||||||
|
error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
background->have_pixmap = False;
|
background->have_pixmap = False;
|
||||||
|
@@ -25,32 +25,41 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include "meta-shaped-texture.h"
|
#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||||
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||||
|
|
||||||
|
#include <meta/meta-shaped-texture.h>
|
||||||
#include "meta-texture-tower.h"
|
#include "meta-texture-tower.h"
|
||||||
#include "meta-texture-rectangle.h"
|
#include "meta-texture-rectangle.h"
|
||||||
|
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
#include <cogl/cogl.h>
|
#include <cogl/cogl.h>
|
||||||
|
#include <cogl/cogl-texture-pixmap-x11.h>
|
||||||
|
#include <gdk/gdk.h> /* for gdk_rectangle_intersect() */
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static void meta_shaped_texture_dispose (GObject *object);
|
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_paint (ClutterActor *actor);
|
||||||
static void meta_shaped_texture_pick (ClutterActor *actor,
|
static void meta_shaped_texture_pick (ClutterActor *actor,
|
||||||
const ClutterColor *color);
|
const ClutterColor *color);
|
||||||
|
|
||||||
static void meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
static void meta_shaped_texture_get_preferred_width (ClutterActor *self,
|
||||||
int x,
|
gfloat for_height,
|
||||||
int y,
|
gfloat *min_width_p,
|
||||||
int width,
|
gfloat *natural_width_p);
|
||||||
int height);
|
|
||||||
|
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_dirty_mask (MetaShapedTexture *stex);
|
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,
|
G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
||||||
CLUTTER_X11_TYPE_TEXTURE_PIXMAP);
|
CLUTTER_TYPE_ACTOR);
|
||||||
|
|
||||||
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
|
#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
|
(G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
|
||||||
@@ -59,6 +68,8 @@ G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture,
|
|||||||
struct _MetaShapedTexturePrivate
|
struct _MetaShapedTexturePrivate
|
||||||
{
|
{
|
||||||
MetaTextureTower *paint_tower;
|
MetaTextureTower *paint_tower;
|
||||||
|
Pixmap pixmap;
|
||||||
|
CoglHandle texture;
|
||||||
CoglHandle mask_texture;
|
CoglHandle mask_texture;
|
||||||
CoglHandle material;
|
CoglHandle material;
|
||||||
CoglHandle material_unshaped;
|
CoglHandle material_unshaped;
|
||||||
@@ -69,8 +80,7 @@ struct _MetaShapedTexturePrivate
|
|||||||
cairo_region_t *overlay_region;
|
cairo_region_t *overlay_region;
|
||||||
cairo_path_t *overlay_path;
|
cairo_path_t *overlay_path;
|
||||||
|
|
||||||
cairo_region_t *visible_pixels_region;
|
guint tex_width, tex_height;
|
||||||
|
|
||||||
guint mask_width, mask_height;
|
guint mask_width, mask_height;
|
||||||
|
|
||||||
guint create_mipmaps : 1;
|
guint create_mipmaps : 1;
|
||||||
@@ -81,15 +91,14 @@ meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
|
|||||||
{
|
{
|
||||||
GObjectClass *gobject_class = (GObjectClass *) klass;
|
GObjectClass *gobject_class = (GObjectClass *) klass;
|
||||||
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
|
ClutterActorClass *actor_class = (ClutterActorClass *) klass;
|
||||||
ClutterX11TexturePixmapClass *x11_texture_class = (ClutterX11TexturePixmapClass *) klass;
|
|
||||||
|
|
||||||
gobject_class->dispose = meta_shaped_texture_dispose;
|
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->paint = meta_shaped_texture_paint;
|
||||||
actor_class->pick = meta_shaped_texture_pick;
|
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));
|
g_type_class_add_private (klass, sizeof (MetaShapedTexturePrivate));
|
||||||
}
|
}
|
||||||
@@ -104,8 +113,8 @@ meta_shaped_texture_init (MetaShapedTexture *self)
|
|||||||
priv->shape_region = NULL;
|
priv->shape_region = NULL;
|
||||||
priv->overlay_path = NULL;
|
priv->overlay_path = NULL;
|
||||||
priv->overlay_region = NULL;
|
priv->overlay_region = NULL;
|
||||||
priv->visible_pixels_region = NULL;
|
|
||||||
priv->paint_tower = meta_texture_tower_new ();
|
priv->paint_tower = meta_texture_tower_new ();
|
||||||
|
priv->texture = COGL_INVALID_HANDLE;
|
||||||
priv->mask_texture = COGL_INVALID_HANDLE;
|
priv->mask_texture = COGL_INVALID_HANDLE;
|
||||||
priv->create_mipmaps = TRUE;
|
priv->create_mipmaps = TRUE;
|
||||||
}
|
}
|
||||||
@@ -132,6 +141,11 @@ meta_shaped_texture_dispose (GObject *object)
|
|||||||
cogl_handle_unref (priv->material_unshaped);
|
cogl_handle_unref (priv->material_unshaped);
|
||||||
priv->material_unshaped = COGL_INVALID_HANDLE;
|
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_shape_region (self, NULL);
|
||||||
meta_shaped_texture_set_clip_region (self, NULL);
|
meta_shaped_texture_set_clip_region (self, NULL);
|
||||||
@@ -140,114 +154,19 @@ meta_shaped_texture_dispose (GObject *object)
|
|||||||
G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (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
|
static void
|
||||||
meta_shaped_texture_dirty_mask (MetaShapedTexture *stex)
|
meta_shaped_texture_dirty_mask (MetaShapedTexture *stex)
|
||||||
{
|
{
|
||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
MetaShapedTexturePrivate *priv = stex->priv;
|
||||||
|
|
||||||
if (priv->visible_pixels_region != NULL)
|
if (priv->mask_texture != COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
cairo_region_destroy (priv->visible_pixels_region);
|
cogl_handle_unref (priv->mask_texture);
|
||||||
priv->visible_pixels_region = NULL;
|
priv->mask_texture = 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
|
if (priv->material != COGL_INVALID_HANDLE)
|
||||||
scan_visible_region (MetaShapedTexture *stex,
|
cogl_material_set_layer (priv->material, 1, COGL_INVALID_HANDLE);
|
||||||
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
|
static void
|
||||||
@@ -310,7 +229,7 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
|||||||
CoglHandle paint_tex;
|
CoglHandle paint_tex;
|
||||||
guint tex_width, tex_height;
|
guint tex_width, tex_height;
|
||||||
|
|
||||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
paint_tex = priv->texture;
|
||||||
|
|
||||||
if (paint_tex == COGL_INVALID_HANDLE)
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
@@ -325,7 +244,7 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
|||||||
meta_shaped_texture_dirty_mask (stex);
|
meta_shaped_texture_dirty_mask (stex);
|
||||||
|
|
||||||
/* If we don't have a mask texture yet then create one */
|
/* If we don't have a mask texture yet then create one */
|
||||||
if (priv->visible_pixels_region == NULL)
|
if (priv->mask_texture == COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
guchar *mask_data;
|
guchar *mask_data;
|
||||||
int i;
|
int i;
|
||||||
@@ -339,10 +258,6 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
|||||||
(priv->overlay_region == NULL ||
|
(priv->overlay_region == NULL ||
|
||||||
cairo_region_num_rectangles (priv->overlay_region) == 0))
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,7 +292,6 @@ meta_shaped_texture_ensure_mask (MetaShapedTexture *stex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_overlay_path (stex, mask_data, tex_width, tex_height, stride);
|
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);
|
cogl_texture_get_gl_texture (paint_tex, NULL, &paint_gl_target);
|
||||||
|
|
||||||
@@ -451,13 +365,13 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
if (priv->create_mipmaps)
|
if (priv->create_mipmaps)
|
||||||
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
|
paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
|
||||||
else
|
else
|
||||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
paint_tex = priv->texture;
|
||||||
|
|
||||||
if (paint_tex == COGL_INVALID_HANDLE)
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tex_width = cogl_texture_get_width (paint_tex);
|
tex_width = priv->tex_width;
|
||||||
tex_height = cogl_texture_get_height (paint_tex);
|
tex_height = priv->tex_height;
|
||||||
|
|
||||||
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
if (tex_width == 0 || tex_height == 0) /* no contents yet */
|
||||||
return;
|
return;
|
||||||
@@ -512,6 +426,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
{
|
{
|
||||||
int n_rects;
|
int n_rects;
|
||||||
int i;
|
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
|
/* Limit to how many separate rectangles we'll draw; beyond this just
|
||||||
* fall back and draw the whole thing */
|
* fall back and draw the whole thing */
|
||||||
@@ -529,6 +444,9 @@ meta_shaped_texture_paint (ClutterActor *actor)
|
|||||||
|
|
||||||
cairo_region_get_rectangle (priv->clip_region, i, &rect);
|
cairo_region_get_rectangle (priv->clip_region, i, &rect);
|
||||||
|
|
||||||
|
if (!gdk_rectangle_intersect (&tex_rect, &rect, &rect))
|
||||||
|
continue;
|
||||||
|
|
||||||
x1 = rect.x;
|
x1 = rect.x;
|
||||||
y1 = rect.y;
|
y1 = rect.y;
|
||||||
x2 = rect.x + rect.width;
|
x2 = rect.x + rect.width;
|
||||||
@@ -574,7 +492,7 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
|||||||
ClutterActorBox alloc;
|
ClutterActorBox alloc;
|
||||||
guint tex_width, tex_height;
|
guint tex_width, tex_height;
|
||||||
|
|
||||||
paint_tex = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex));
|
paint_tex = priv->texture;
|
||||||
|
|
||||||
if (paint_tex == COGL_INVALID_HANDLE)
|
if (paint_tex == COGL_INVALID_HANDLE)
|
||||||
return;
|
return;
|
||||||
@@ -602,19 +520,48 @@ meta_shaped_texture_pick (ClutterActor *actor,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_shaped_texture_update_area (ClutterX11TexturePixmap *texture,
|
meta_shaped_texture_get_preferred_width (ClutterActor *self,
|
||||||
int x,
|
gfloat for_height,
|
||||||
int y,
|
gfloat *min_width_p,
|
||||||
int width,
|
gfloat *natural_width_p)
|
||||||
int height)
|
|
||||||
{
|
{
|
||||||
MetaShapedTexture *stex = (MetaShapedTexture *) texture;
|
MetaShapedTexturePrivate *priv;
|
||||||
MetaShapedTexturePrivate *priv = stex->priv;
|
|
||||||
|
|
||||||
CLUTTER_X11_TEXTURE_PIXMAP_CLASS (meta_shaped_texture_parent_class)->update_area (texture,
|
g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
|
||||||
x, y, width, height);
|
|
||||||
|
|
||||||
meta_texture_tower_update_area (priv->paint_tower, 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClutterActor *
|
ClutterActor *
|
||||||
@@ -640,50 +587,13 @@ meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
|||||||
if (create_mipmaps != priv->create_mipmaps)
|
if (create_mipmaps != priv->create_mipmaps)
|
||||||
{
|
{
|
||||||
CoglHandle base_texture;
|
CoglHandle base_texture;
|
||||||
|
|
||||||
priv->create_mipmaps = create_mipmaps;
|
priv->create_mipmaps = create_mipmaps;
|
||||||
|
|
||||||
base_texture = create_mipmaps ?
|
base_texture = create_mipmaps ?
|
||||||
clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (stex)) : COGL_INVALID_HANDLE;
|
priv->texture : COGL_INVALID_HANDLE;
|
||||||
|
|
||||||
meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
|
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
|
void
|
||||||
meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
||||||
cairo_region_t *region)
|
cairo_region_t *region)
|
||||||
@@ -710,22 +620,119 @@ meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
|||||||
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
void
|
||||||
* meta_shaped_texture_get_visible_pixels_region:
|
meta_shaped_texture_update_area (MetaShapedTexture *stex,
|
||||||
* @stex: a #MetaShapedTexture
|
int x,
|
||||||
*
|
int y,
|
||||||
* Return a region enclosing only visible pixels: those with
|
int width,
|
||||||
* alpha values above 0.
|
int height)
|
||||||
*
|
|
||||||
* Returns: a #cairo_region_t
|
|
||||||
*/
|
|
||||||
cairo_region_t *
|
|
||||||
meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex)
|
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
|
MetaShapedTexturePrivate *priv;
|
||||||
|
const cairo_rectangle_int_t clip = { x, y, width, height };
|
||||||
|
|
||||||
meta_shaped_texture_ensure_mask (stex);
|
priv = stex->priv;
|
||||||
return stex->priv->visible_pixels_region;
|
|
||||||
|
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
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): the unshaped texture
|
||||||
|
*/
|
||||||
|
CoglHandle
|
||||||
|
meta_shaped_texture_get_texture (MetaShapedTexture *stex)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), COGL_INVALID_HANDLE);
|
||||||
|
return stex->priv->texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -734,7 +741,7 @@ meta_shaped_texture_get_visible_pixels_region (MetaShapedTexture *stex)
|
|||||||
* @overlay_region: A region containing the parts of the mask to overlay.
|
* @overlay_region: A region containing the parts of the mask to overlay.
|
||||||
* All rectangles in this region are wiped clear to full transparency,
|
* All rectangles in this region are wiped clear to full transparency,
|
||||||
* and the overlay path is clipped to this region.
|
* 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
|
* texture with a fully opaque source. Due to the lack of refcounting
|
||||||
* in #cairo_path_t, ownership of the path is assumed.
|
* in #cairo_path_t, ownership of the path is assumed.
|
||||||
*/
|
*/
|
||||||
@@ -772,10 +779,9 @@ meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* meta_shaped_texture_set_clip_region:
|
* meta_shaped_texture_set_clip_region:
|
||||||
* @frame: a #MetaShapedTexture
|
* @stex: a #MetaShapedTexture
|
||||||
* @clip_region: (transfer full): the region of the texture that
|
* @clip_region: (transfer full): the region of the texture that
|
||||||
* is visible and should be painted. OWNERSHIP IS ASSUMED BY
|
* is visible and should be painted.
|
||||||
* THE FUNCTION (for efficiency to avoid a copy.)
|
|
||||||
*
|
*
|
||||||
* Provides a hint to the texture about what areas of the texture
|
* Provides a hint to the texture about what areas of the texture
|
||||||
* are not completely obscured and thus need to be painted. This
|
* are not completely obscured and thus need to be painted. This
|
||||||
@@ -801,5 +807,106 @@ meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
|||||||
priv->clip_region = NULL;
|
priv->clip_region = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->clip_region = clip_region;
|
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;
|
||||||
}
|
}
|
||||||
|
@@ -18,11 +18,11 @@
|
|||||||
#include <meta/errors.h>
|
#include <meta/errors.h>
|
||||||
#include "frame.h"
|
#include "frame.h"
|
||||||
#include <meta/window.h>
|
#include <meta/window.h>
|
||||||
|
#include <meta/meta-shaped-texture.h>
|
||||||
#include "xprops.h"
|
#include "xprops.h"
|
||||||
|
|
||||||
#include "compositor-private.h"
|
#include "compositor-private.h"
|
||||||
#include "meta-shadow-factory-private.h"
|
#include "meta-shadow-factory-private.h"
|
||||||
#include "meta-shaped-texture.h"
|
|
||||||
#include "meta-window-actor-private.h"
|
#include "meta-window-actor-private.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -944,26 +944,20 @@ static void
|
|||||||
meta_window_actor_damage_all (MetaWindowActor *self)
|
meta_window_actor_damage_all (MetaWindowActor *self)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
CoglHandle texture;
|
||||||
guint pixmap_width = 0;
|
|
||||||
guint pixmap_height = 0;
|
|
||||||
|
|
||||||
if (!priv->needs_damage_all)
|
if (!priv->needs_damage_all)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_object_get (texture_x11,
|
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
|
||||||
"pixmap-width", &pixmap_width,
|
|
||||||
"pixmap-height", &pixmap_height,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (!priv->mapped || priv->needs_pixmap)
|
if (!priv->mapped || priv->needs_pixmap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
|
||||||
0,
|
0, 0,
|
||||||
0,
|
cogl_texture_get_width (texture),
|
||||||
pixmap_width,
|
cogl_texture_get_height (texture));
|
||||||
pixmap_height);
|
|
||||||
|
|
||||||
priv->needs_damage_all = FALSE;
|
priv->needs_damage_all = FALSE;
|
||||||
}
|
}
|
||||||
@@ -1202,9 +1196,8 @@ meta_window_actor_detach (MetaWindowActor *self)
|
|||||||
* you are supposed to be able to free a GLXPixmap after freeing the underlying
|
* 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
|
* pixmap, but it certainly doesn't work with current DRI/Mesa
|
||||||
*/
|
*/
|
||||||
clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
|
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
|
||||||
None);
|
None);
|
||||||
meta_shaped_texture_clear (META_SHAPED_TEXTURE (priv->actor));
|
|
||||||
cogl_flush();
|
cogl_flush();
|
||||||
|
|
||||||
XFreePixmap (xdisplay, priv->back_pixmap);
|
XFreePixmap (xdisplay, priv->back_pixmap);
|
||||||
@@ -1756,22 +1749,9 @@ meta_window_actor_set_visible_region (MetaWindowActor *self,
|
|||||||
cairo_region_t *visible_region)
|
cairo_region_t *visible_region)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
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),
|
meta_shaped_texture_set_clip_region (META_SHAPED_TEXTURE (priv->actor),
|
||||||
texture_clip_region);
|
visible_region);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1823,19 +1803,6 @@ meta_window_actor_reset_visible_regions (MetaWindowActor *self)
|
|||||||
meta_window_actor_clear_shadow_clip (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
|
static void
|
||||||
check_needs_pixmap (MetaWindowActor *self)
|
check_needs_pixmap (MetaWindowActor *self)
|
||||||
{
|
{
|
||||||
@@ -1869,7 +1836,7 @@ check_needs_pixmap (MetaWindowActor *self)
|
|||||||
|
|
||||||
if (priv->back_pixmap == None)
|
if (priv->back_pixmap == None)
|
||||||
{
|
{
|
||||||
gint pxm_width, pxm_height;
|
CoglHandle texture;
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
|
|
||||||
@@ -1898,23 +1865,22 @@ check_needs_pixmap (MetaWindowActor *self)
|
|||||||
meta_shaped_texture_set_create_mipmaps (META_SHAPED_TEXTURE (priv->actor),
|
meta_shaped_texture_set_create_mipmaps (META_SHAPED_TEXTURE (priv->actor),
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
clutter_x11_texture_pixmap_set_pixmap
|
meta_shaped_texture_set_pixmap (META_SHAPED_TEXTURE (priv->actor),
|
||||||
(CLUTTER_X11_TEXTURE_PIXMAP (priv->actor),
|
priv->back_pixmap);
|
||||||
priv->back_pixmap);
|
|
||||||
|
texture = meta_shaped_texture_get_texture (META_SHAPED_TEXTURE (priv->actor));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This only works *after* actually setting the pixmap, so we have to
|
* This only works *after* actually setting the pixmap, so we have to
|
||||||
* do it here.
|
* do it here.
|
||||||
* See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
|
* See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236
|
||||||
*/
|
*/
|
||||||
if (G_UNLIKELY (!texture_pixmap_using_extension (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor))))
|
if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (texture)))
|
||||||
g_warning ("NOTE: Not using GLX TFP!\n");
|
g_warning ("NOTE: Not using GLX TFP!\n");
|
||||||
|
|
||||||
g_object_get (priv->actor,
|
meta_window_actor_update_bounding_region_and_borders (self,
|
||||||
"pixmap-width", &pxm_width,
|
cogl_texture_get_width (texture),
|
||||||
"pixmap-height", &pxm_height,
|
cogl_texture_get_height (texture));
|
||||||
NULL);
|
|
||||||
|
|
||||||
meta_window_actor_update_bounding_region_and_borders (self, pxm_width, pxm_height);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->needs_pixmap = FALSE;
|
priv->needs_pixmap = FALSE;
|
||||||
@@ -2007,7 +1973,6 @@ meta_window_actor_process_damage (MetaWindowActor *self,
|
|||||||
XDamageNotifyEvent *event)
|
XDamageNotifyEvent *event)
|
||||||
{
|
{
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
|
|
||||||
|
|
||||||
priv->received_damage = TRUE;
|
priv->received_damage = TRUE;
|
||||||
|
|
||||||
@@ -2038,11 +2003,11 @@ meta_window_actor_process_damage (MetaWindowActor *self,
|
|||||||
if (!priv->mapped || priv->needs_pixmap)
|
if (!priv->mapped || priv->needs_pixmap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
clutter_x11_texture_pixmap_update_area (texture_x11,
|
meta_shaped_texture_update_area (META_SHAPED_TEXTURE (priv->actor),
|
||||||
event->area.x,
|
event->area.x,
|
||||||
event->area.y,
|
event->area.y,
|
||||||
event->area.width,
|
event->area.width,
|
||||||
event->area.height);
|
event->area.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -101,25 +101,6 @@ actor_is_untransformed (ClutterActor *actor,
|
|||||||
return TRUE;
|
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
|
static void
|
||||||
meta_window_group_paint (ClutterActor *actor)
|
meta_window_group_paint (ClutterActor *actor)
|
||||||
{
|
{
|
||||||
@@ -180,7 +161,7 @@ meta_window_group_paint (ClutterActor *actor)
|
|||||||
* as well for the same reason, but omitted for simplicity in the
|
* as well for the same reason, but omitted for simplicity in the
|
||||||
* hopes that no-one will do that.
|
* hopes that no-one will do that.
|
||||||
*/
|
*/
|
||||||
if (has_effects (l->data))
|
if (clutter_actor_has_effects (l->data))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (META_IS_WINDOW_ACTOR (l->data))
|
if (META_IS_WINDOW_ACTOR (l->data))
|
||||||
|
@@ -2980,7 +2980,7 @@ meta_screen_resize (MetaScreen *screen,
|
|||||||
g_free (old_monitor_infos);
|
g_free (old_monitor_infos);
|
||||||
g_slist_free (windows);
|
g_slist_free (windows);
|
||||||
|
|
||||||
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0, index);
|
g_signal_emit (screen, screen_signals[MONITORS_CHANGED], 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -5062,11 +5062,16 @@ meta_window_move_frame (MetaWindow *window,
|
|||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
{
|
{
|
||||||
/* offset by the distance between the origin of the window
|
MetaFrameBorders borders;
|
||||||
* and the origin of the enclosing window decorations
|
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;
|
x += window->frame->child_x - borders.invisible.left;
|
||||||
y += window->frame->child_y;
|
y += window->frame->child_y - borders.invisible.top;
|
||||||
}
|
}
|
||||||
meta_window_move (window, user_op, x, y);
|
meta_window_move (window, user_op, x, y);
|
||||||
}
|
}
|
||||||
|
@@ -26,10 +26,8 @@
|
|||||||
#ifndef __META_SHAPED_TEXTURE_H__
|
#ifndef __META_SHAPED_TEXTURE_H__
|
||||||
#define __META_SHAPED_TEXTURE_H__
|
#define __META_SHAPED_TEXTURE_H__
|
||||||
|
|
||||||
#include <config.h>
|
|
||||||
|
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
#include <clutter/x11/clutter-x11.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@@ -46,12 +44,12 @@ typedef struct _MetaShapedTexturePrivate MetaShapedTexturePrivate;
|
|||||||
|
|
||||||
struct _MetaShapedTextureClass
|
struct _MetaShapedTextureClass
|
||||||
{
|
{
|
||||||
ClutterX11TexturePixmapClass parent_class;
|
ClutterActorClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _MetaShapedTexture
|
struct _MetaShapedTexture
|
||||||
{
|
{
|
||||||
ClutterX11TexturePixmap parent;
|
ClutterActor parent;
|
||||||
|
|
||||||
MetaShapedTexturePrivate *priv;
|
MetaShapedTexturePrivate *priv;
|
||||||
};
|
};
|
||||||
@@ -63,13 +61,20 @@ ClutterActor *meta_shaped_texture_new (void);
|
|||||||
void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
|
||||||
gboolean create_mipmaps);
|
gboolean create_mipmaps);
|
||||||
|
|
||||||
void meta_shaped_texture_clear (MetaShapedTexture *stex);
|
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_set_shape_region (MetaShapedTexture *stex,
|
void meta_shaped_texture_set_shape_region (MetaShapedTexture *stex,
|
||||||
cairo_region_t *region);
|
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,
|
void meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
||||||
cairo_region_t *overlay_region,
|
cairo_region_t *overlay_region,
|
||||||
cairo_path_t *overlay_path);
|
cairo_path_t *overlay_path);
|
||||||
@@ -78,6 +83,9 @@ void meta_shaped_texture_set_overlay_path (MetaShapedTexture *stex,
|
|||||||
void meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
void meta_shaped_texture_set_clip_region (MetaShapedTexture *stex,
|
||||||
cairo_region_t *clip_region);
|
cairo_region_t *clip_region);
|
||||||
|
|
||||||
|
cairo_surface_t * meta_shaped_texture_get_image (MetaShapedTexture *stex,
|
||||||
|
cairo_rectangle_int_t *clip);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __META_SHAPED_TEXTURE_H__ */
|
#endif /* __META_SHAPED_TEXTURE_H__ */
|
Reference in New Issue
Block a user