Compare commits

...

32 Commits

Author SHA1 Message Date
Owen W. Taylor
1a2a374380 Bump version to 2.31.5 2010-07-12 11:44:09 -04:00
Andreas Mueller
2b84afc1e3 src/core/util.c: Fix warning in case WITH_VERBOSE_MODE is not set
Signed-off-by: Andreas Mueller <schnitzeltony@gmx.de>

https://bugzilla.gnome.org/show_bug.cgi?id=624166
2010-07-12 11:07:26 -04:00
Nickolas Lloyd
bb3d23f7f6 Add --enable-compile-warnings option to configure script.
This patch adds the option to disable or enable compiler warnings
to maintain compatibility with gnome standard configure options, and
allow users to work around warnings from compiler incompatibility.

--enable-compile-warnings=no disables compile warnings completely,
while --enable-compile-warnings=yes turns on non-fatal warnings.
The default --enable-compile-warnings=error gives the previous behavior.

Dead code for enabling '-ansi -pendantic' is removed, and the
default enabling of -ansi is removed as well. Blanket disabling
GCC extensions and C99 features causes various problems; we're
better off enforcing the dialect we want to use at code review
time.

https://bugzilla.gnome.org/show_bug.cgi?id=616275
2010-07-12 11:07:26 -04:00
Petr Kovar
7511ea27e2 Update Czech translation 2010-07-11 22:05:46 +02:00
Florian Müllner
adbe3a2312 Fix gtk+ dependency in libmutter-private pkg-config file 2010-07-09 18:05:02 +02:00
Fran Diéguez
eda50a91df Updated Galician translations 2010-07-07 18:05:50 +02:00
Owen W. Taylor
7853bb8042 Work around g-ir-scanner problem with Gdk.Rectangle
g-ir-scanner is currently buggy and confuses the Gdk.Rectangle alias
with MetaRectangle. Since this is moderately hard to fix in
gobject-introspection and the fix would conflict with in-progress
changes, work around by doing a 'sed job' on the generated Meta.gir.

https://bugzilla.gnome.org/show_bug.cgi?id=623639
2010-07-06 15:11:13 -04:00
Matej Urbančič
37de1b2d25 Updated Slovenian translation 2010-07-06 15:14:58 +02:00
Jorge González
0c4ac0b48a Updated Spanish translation 2010-07-03 12:35:52 +02:00
Yaron Shahrabani
c24cf44c6a Updated Hebrew translation. 2010-07-03 02:05:52 +03:00
Owen W. Taylor
11a8ab47fa Make MetaRectangle a boxed type
Export a boxed type for MetaRectangle; this is mostly of interest
because GdkRectangle has been turned into a typedef for
cairo_rectangle_int_t which causes massive problems for using it from
gobject-introspection based language bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=623335
2010-07-02 13:14:39 -04:00
Florian Müllner
7feeb72721 Use cairo_region_t when building with gtk+-3.0
GdkRegion has been removed from Gtk+. The replacement is a
yet-unreleased cairo API, so use it only when building with
Gtk+-3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=587991
2010-07-02 04:36:28 +02:00
Florian Müllner
01447d94d1 Allow building with Gtk+-3.0
Add a configure switch to select the Gtk+ version to build with. The
default is to build against Gtk+-2.0 >= 2.18.

https://bugzilla.gnome.org/show_bug.cgi?id=622303
2010-07-02 04:36:27 +02:00
Florian Müllner
e267a63330 Add compatibility with GTK+ 2.18
In order to replace calls to deprecated GDK code, the current
development version of GTK+ is required. Add some basic compatibility
code to allow building mutter with GTK+ 2.18.

https://bugzilla.gnome.org/show_bug.cgi?id=587991
2010-07-01 20:55:12 +02:00
Florian Müllner
c65a24486d Replace deprecated GDK symbols
The fix depends on new API added in this cycle, so the required
GTK+ version is bumped to 2.21.1.

https://bugzilla.gnome.org/show_bug.cgi?id=587991
2010-07-01 20:55:11 +02:00
Nickolas Lloyd
42e786b15b Remove deprecated Gtk+ symbols
This patch removes all uses of deprecated Gtk+ symbols from mutter.

https://bugzilla.gnome.org/show_bug.cgi?id=587991
2010-07-01 20:55:11 +02:00
Claudio Saavedra
7a04673dd7 Don't use deprecated GtkTooltips type unnecessarily
Bug 622800.
2010-06-30 01:35:42 +03:00
Claudio Saavedra
c47d2da0cb Don't incĺude internal gdk headers directly
Bug 622800.
2010-06-30 01:35:35 +03:00
Claudio Saavedra
fd12eddb5d Use g_signal_connect_data() instead of deprecated gtk_signal_connect_full()
Bug 622800.
2010-06-30 01:35:26 +03:00
Claudio Saavedra
0b56599d28 Don't use gtk_type_unique()
Replace usage of deprecated gtk_type_unique() by switching to defining
types with G_DEFINE_TYPE.

Bug 622800.
2010-06-30 01:34:54 +03:00
Owen W. Taylor
27de94b915 Bump version to 2.31.4 2010-06-25 16:18:39 -04:00
Kjartan Maraas
9e31f2b1de Added Norwegian bokmål translation 2010-06-20 11:41:52 +02:00
Maxim Ermilov
13ad103823 Clean up MutterPlugin effect interface
The current effect API passes an unnecessary list of windows to
switch_workspace() and forces a window to be passed in when killing
the switch_workspace() effect.

We can simplify the interface to correspond more closely to how
it is actually used and fix these problems:

Remove the actors parameter to plugin->switch_workspace
Remove the events parameter to plugin->kill_effect and rename it to kill_window_effects
Add plugin->kill_switch_workspace

Remove mutter_plugin_manager_kill_effect
Add mutter_plugin_manager_kill_window_effects
Add mutter_plugin_manager_kill_switch_workspace

Remove mutter_plugin_effect_completed
Add mutter_plugin_[minimize/map/destroy/maximize/unmaximize]_completed
https://bugzilla.gnome.org/show_bug.cgi?id=621082
2010-06-17 01:40:43 +04:00
Owen W. Taylor
ff5a73de49 Fix problem with window unmaximization
A mismerge of the Metacity commit "4943d79 Prevent window self-maximisation"
caused the window's user set size and position to be saved *before*
actually resizing the window to the unmaximized position rather than after.

This meant that after unmaximization the window was in an inconsistent
state and anything that caused a resize to be queued (like a change in
window properties by the application) would cause it to pop back to
the maximized size and position.

https://bugzilla.gnome.org/show_bug.cgi?id=621413
2010-06-14 16:44:28 -04:00
A S Alam
275a6ec63f update Punjabi Translation 2010-06-14 08:09:49 +05:30
Colin Walters
604da0f6ea Add _XOPEN_SOURCE display.c for gethostname()
We shouldn't need _GNU_SOURCE in delete.c anymore either.

https://bugzilla.gnome.org/show_bug.cgi?id=620860
2010-06-07 14:26:45 -04:00
Colin Walters
72a19dd448 [display] Include unistd.h for gethostname
https://bugzilla.gnome.org/show_bug.cgi?id=620860
2010-06-07 12:32:56 -04:00
Colin Walters
3a73f6b8ec Add meta_window_is_remote
It's useful for plugins to be able to easily detect whether
or not a window is from a remote host.  Also, make use of this
in the window delete codepath, instead of looking up the hostname
each time.

https://bugzilla.gnome.org/show_bug.cgi?id=620585
2010-06-07 09:44:14 -04:00
Colin Walters
343474a570 Allow logging only specific debug topics
While debugging a focus problem, I noticed that Mutter had exactly
the debug statements I wanted under the META_DEBUG_FOCUS topic.
However, calling meta_set_verbose (true) results in enormous amounts
of other messages, and it's inconvenient to filter after having
started mutter.

This patch allows one to call Meta.add_debug_topic(Meta.DebugTopic.FOCUS)
from a console, and get just what one wants.

https://bugzilla.gnome.org/show_bug.cgi?id=620359
2010-06-04 11:27:48 -04:00
Robert Bragg
91d82bf8c7 mutter-window: request DamageReportBoundingBox report level
In commit d34ae764769 I switched mutter-window to ask for Raw rectangles
from the X server. This avoided 2 non synchronous and 2 synchronous X
requests per window with damage, per frame; 2 (non-sync) to
create/destroy a temporary region to copy the damage region into, 1 to
request the server to copy the damage region into a our given region and
another to fetch that region back into the client. The problem with raw
events though is that it's possible to DOS the compositor with them.

Instead of receiving an event for every bit of damage this patch instead
asks the server to only report BoundingBox changes to the damage region.

https://bugzilla.gnome.org/show_bug.cgi?id=611838
2010-06-04 00:36:08 +01:00
Fran Diéguez
ed19060074 Updated Galician translations 2010-06-03 23:46:58 +02:00
Yaron Shahrabani
f230a67b94 Updated Hebrew translation. 2010-06-03 14:33:17 +03:00
44 changed files with 4142 additions and 5463 deletions

View File

@@ -2,7 +2,7 @@ AC_PREREQ(2.50)
m4_define([mutter_major_version], [2])
m4_define([mutter_minor_version], [31])
m4_define([mutter_micro_version], [2])
m4_define([mutter_micro_version], [5])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
@@ -63,68 +63,95 @@ AC_C_BIGENDIAN
#### Warnings
# Stay command-line compatible with the gnome-common configure option. Here
# minimum/yes/maximum are the same, however.
AC_ARG_ENABLE(compile_warnings,
AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],[Turn on compiler warnings]),,
enable_compile_warnings=error)
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
# case " $CFLAGS " in
# *[\ \ ]-Wshadow[\ \ ]*) ;;
# *) CFLAGS="$CFLAGS -Wshadow" ;;
# esac
case " $CFLAGS " in
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wcast-align[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wcast-align" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
esac
if test "x$enable_ansi" = "xyes"; then
if test "$enable_compile_warnings" != no ; then
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-ansi[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -ansi" ;;
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
# case " $CFLAGS " in
# *[\ \ ]-Wshadow[\ \ ]*) ;;
# *) CFLAGS="$CFLAGS -Wshadow" ;;
# esac
case " $CFLAGS " in
*[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
esac
case " $CFLAGS " in
*[\ \ ]-pedantic[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -pedantic" ;;
*[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wnested-externs[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wnested-externs" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wpointer-arith[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wpointer-arith" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wcast-align[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wcast-align" ;;
esac
case " $CFLAGS " in
*[\ \ ]-Wsign-compare[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wsign-compare" ;;
esac
if test "$enable_compile_warnings" = error; then
case " $CFLAGS " in
*[\ \ ]-Werror[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Werror" ;;
esac
fi
fi
fi
changequote([,])dnl
MUTTER_PC_MODULES='gtk+-2.0 >= 2.18 pango >= 1.2.0'
AC_MSG_CHECKING([which gtk+ version to compile against])
AC_ARG_WITH([gtk],
AC_HELP_STRING([--with-gtk=2.0|3.0],
[which gtk+ version to compile against (default: 2)]),
[case "$with_gtk" in
2.0|3.0) ;;
*) AC_MSG_ERROR([invalid gtk+ version specified]);;
esac],
[with_gtk=2.0])
AC_MSG_RESULT([$with_gtk])
case "$with_gtk" in
2.0) GTK_API_VERSION=2.0
GTK_MIN_VERSION=2.18
CANBERRA_GTK=libcanberra-gtk
;;
3.0) GTK_API_VERSION=3.0
GTK_MIN_VERSION=2.90
CANBERRA_GTK=libcanberra-gtk3
AC_DEFINE(USE_CAIRO_REGION, 1, [Use cairo_region_t instead of GdkRegion])
;;
esac
MUTTER_PC_MODULES="gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION pango >= 1.2.0"
AC_SUBST(GTK_API_VERSION)
AC_ARG_ENABLE(gconf,
AC_HELP_STRING([--disable-gconf],
@@ -184,8 +211,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+-2.0 >= 2.18)
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-2.0 >= 2.18)
PKG_CHECK_MODULES(MUTTER_MESSAGE, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
PKG_CHECK_MODULES(MUTTER_WINDOW_DEMO, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
# Unconditionally use this dir to avoid a circular dep with gnomecc
GNOME_KEYBINDINGS_KEYSDIR="${datadir}/gnome-control-center/keybindings"
@@ -222,10 +249,10 @@ AC_MSG_CHECKING([libcanberra-gtk])
if test x$with_libcanberra = xno ; then
AC_MSG_RESULT([disabled])
else
if $PKG_CONFIG --exists libcanberra-gtk; then
if $PKG_CONFIG --exists $CANBERRA_GTK; then
have_libcanberra=yes
AC_MSG_RESULT(yes)
MUTTER_PC_MODULES="$MUTTER_PC_MODULES libcanberra-gtk"
MUTTER_PC_MODULES="$MUTTER_PC_MODULES $CANBERRA_GTK"
AC_DEFINE([HAVE_LIBCANBERRA], 1, [Building with libcanberra for playing sounds])
else
AC_MSG_RESULT(no)
@@ -505,10 +532,8 @@ if test "x$enable_debug" = "xyes"; then
CFLAGS="$CFLAGS -g -O"
fi
# Warnings are there for a reason
if test "x$GCC" = "xyes"; then
CFLAGS="$CFLAGS -Wall -Werror -ansi"
fi
# For fix-meta-rectangle.py
AM_PATH_PYTHON([2.5])
# Use gnome-doc-utils:
GNOME_DOC_INIT([0.8.0])
@@ -545,7 +570,7 @@ fi
dnl ==========================================================================
echo "
mutter-$VERSION:
mutter-$VERSION (using gtk+-${GTK_API_VERSION}):
prefix: ${prefix}
source code location: ${srcdir}

1039
po/cs.po

File diff suppressed because it is too large Load Diff

465
po/es.po

File diff suppressed because it is too large Load Diff

830
po/gl.po

File diff suppressed because it is too large Load Diff

2795
po/he.po

File diff suppressed because it is too large Load Diff

491
po/nb.po

File diff suppressed because it is too large Load Diff

1966
po/pa.po

File diff suppressed because it is too large Load Diff

387
po/sl.po
View File

@@ -10,8 +10,8 @@ msgid ""
msgstr ""
"Project-Id-Version: mutter\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?product=mutter&component=general\n"
"POT-Creation-Date: 2010-04-15 02:19+0000\n"
"PO-Revision-Date: 2010-04-17 19:38+0100\n"
"POT-Creation-Date: 2010-07-03 10:36+0000\n"
"PO-Revision-Date: 2010-07-06 08:06+0100\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"MIME-Version: 1.0\n"
@@ -32,34 +32,29 @@ msgid "Unknown window information request: %d"
msgstr "Zahteva izpisa podrobnosti neznanega okna: %d"
#. Translators: %s is a window title
#: ../src/core/delete.c:95
#: ../src/core/delete.c:94
#, c-format
msgid "<tt>%s</tt> is not responding."
msgstr "<tt>%s</tt> se ne odziva."
#: ../src/core/delete.c:100
#: ../src/core/delete.c:99
msgid "You may choose to wait a short while for it to continue or force the application to quit entirely."
msgstr "Lahko še malo počakate, če se program morda zbudi, ali pa vsilite končanje delovanja."
#: ../src/core/delete.c:109
#: ../src/core/delete.c:108
msgid "_Wait"
msgstr "_Počakaj"
#: ../src/core/delete.c:109
#: ../src/core/delete.c:108
msgid "_Force Quit"
msgstr "_Vsili konec"
#: ../src/core/delete.c:207
#, c-format
msgid "Failed to get hostname: %s\n"
msgstr "Ni mogoče dobiti gostitelja z imenom: %s\n"
#: ../src/core/display.c:362
#: ../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:447
#: ../src/core/display.c:451
#, c-format
msgid "Failed to open X Window System display '%s'\n"
msgstr "Ni mogoče odpreti zaslona '%s' okenskega sistema X\n"
@@ -374,54 +369,54 @@ msgstr "Neznan element %s"
msgid "These windows do not support &quot;save current setup&quot; and will have to be restarted manually next time you log in."
msgstr "Ta okna ne podpirajo možnosti &quot;shranjevanja trenutnih nastavitev&quot;, zato jih bo treba ob naslednji prijavi zagnati ročno."
#: ../src/core/util.c:104
#: ../src/core/util.c:110
#, c-format
msgid "Failed to open debug log: %s\n"
msgstr "Odpiranje razhroščevalnega dnevnika ni uspelo: %s\n"
#: ../src/core/util.c:114
#: ../src/core/util.c:120
#, c-format
msgid "Failed to fdopen() log file %s: %s\n"
msgstr "Odpiranje dnevniške datoteke %s s fdopen() ni uspelo: %s\n"
#: ../src/core/util.c:120
#: ../src/core/util.c:126
#, c-format
msgid "Opened log file %s\n"
msgstr "Odpri dnevniško datoteko %s\n"
#: ../src/core/util.c:139
#: ../src/core/util.c:145
#: ../src/tools/mutter-message.c:176
#, c-format
msgid "Mutter was compiled without support for verbose mode\n"
msgstr "Program Mutter je kodno preveden brez podpore za podrobni način izpisovanja\n"
#: ../src/core/util.c:239
#: ../src/core/util.c:285
msgid "Window manager: "
msgstr "Upravljavec oken: "
# G:4 K:0 O:0
#: ../src/core/util.c:391
#: ../src/core/util.c:433
msgid "Bug in window manager: "
msgstr "Hrošč v upravljavcu oken: "
#: ../src/core/util.c:424
#: ../src/core/util.c:466
msgid "Window manager warning: "
msgstr "Opozorilo upravljalnika oken: "
#: ../src/core/util.c:452
#: ../src/core/util.c:494
msgid "Window manager error: "
msgstr "Napaka upravljalnika oken: "
#. Translators: This is the title used on dialog boxes
#. eof all-keybindings.h
#: ../src/core/util.c:573
#: ../src/core/util.c:615
#: ../src/mutter.desktop.in.h:1
#: ../src/mutter-wm.desktop.in.h:1
msgid "Mutter"
msgstr "Mutter"
#. first time through
#: ../src/core/window.c:6217
#: ../src/core/window.c:6228
#, 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"
@@ -433,7 +428,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:6880
#: ../src/core/window.c:6891
#, 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"
@@ -448,7 +443,7 @@ msgstr "Program je nastavil pokvarjen _NET_WM_PID %lu\n"
msgid "%s (on %s)"
msgstr "%s (na %s)"
#: ../src/core/window-props.c:1435
#: ../src/core/window-props.c:1478
#, c-format
msgid "Invalid WM_TRANSIENT_FOR window 0x%lx specified for %s.\n"
msgstr "Neveljaven WM_TRANSIENT_FOR za okno 0x%lx naveden za %s.\n"
@@ -820,51 +815,51 @@ msgstr "Ta vrednost začne \"prevleko\", ki združuje predogled okna in zaganjal
msgid "Usage: %s\n"
msgstr "Uporaba: %s\n"
#: ../src/ui/frames.c:1119
#: ../src/ui/frames.c:1112
msgid "Close Window"
msgstr "Zapri okno"
# G:1 K:1 O:0
#: ../src/ui/frames.c:1122
#: ../src/ui/frames.c:1115
msgid "Window Menu"
msgstr "Meni okna"
# G:0 K:1 O:0
#: ../src/ui/frames.c:1125
#: ../src/ui/frames.c:1118
msgid "Minimize Window"
msgstr "Skrči okno"
#: ../src/ui/frames.c:1128
#: ../src/ui/frames.c:1121
msgid "Maximize Window"
msgstr "Razpri okno"
#: ../src/ui/frames.c:1131
#: ../src/ui/frames.c:1124
msgid "Restore Window"
msgstr "Obnovi okno"
# G:2 K:0 O:0
#: ../src/ui/frames.c:1134
#: ../src/ui/frames.c:1127
msgid "Roll Up Window"
msgstr "Zavij okno"
#: ../src/ui/frames.c:1137
#: ../src/ui/frames.c:1130
msgid "Unroll Window"
msgstr "Odvij okno"
#: ../src/ui/frames.c:1140
#: ../src/ui/frames.c:1133
msgid "Keep Window On Top"
msgstr "Ohrani okno na vrhu"
#: ../src/ui/frames.c:1143
#: ../src/ui/frames.c:1136
msgid "Remove Window From Top"
msgstr "Odstrani okno z vrha"
# G:1 K:0 O:0
#: ../src/ui/frames.c:1146
#: ../src/ui/frames.c:1139
msgid "Always On Visible Workspace"
msgstr "Vedno na vidni delovni površini"
#: ../src/ui/frames.c:1149
#: ../src/ui/frames.c:1142
msgid "Put Window On Only One Workspace"
msgstr "Postavi okno na samo eno delovno površino"
@@ -978,7 +973,7 @@ msgstr "Delovna površina 1_0"
msgid "Workspace %s%d"
msgstr "Delovna površina %s%d"
#: ../src/ui/menu.c:395
#: ../src/ui/menu.c:396
msgid "Move to Another _Workspace"
msgstr "Premakni na dru_go delovno površino"
@@ -987,7 +982,7 @@ msgstr "Premakni na dru_go delovno površino"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:104
#: ../src/ui/metaaccellabel.c:75
msgid "Shift"
msgstr "Shift"
@@ -997,7 +992,7 @@ msgstr "Shift"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:110
#: ../src/ui/metaaccellabel.c:81
msgid "Ctrl"
msgstr "Ctrl"
@@ -1007,7 +1002,7 @@ msgstr "Ctrl"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:116
#: ../src/ui/metaaccellabel.c:87
msgid "Alt"
msgstr "Alt"
@@ -1017,7 +1012,7 @@ msgstr "Alt"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:122
#: ../src/ui/metaaccellabel.c:93
msgid "Meta"
msgstr "Meta"
@@ -1027,7 +1022,7 @@ msgstr "Meta"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:128
#: ../src/ui/metaaccellabel.c:99
msgid "Super"
msgstr "Super"
@@ -1036,7 +1031,7 @@ msgstr "Super"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:134
#: ../src/ui/metaaccellabel.c:105
msgid "Hyper"
msgstr "Hiper"
@@ -1046,7 +1041,7 @@ msgstr "Hiper"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:140
#: ../src/ui/metaaccellabel.c:111
msgid "Mod2"
msgstr "Mod2"
@@ -1055,7 +1050,7 @@ msgstr "Mod2"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:146
#: ../src/ui/metaaccellabel.c:117
msgid "Mod3"
msgstr "Mod3"
@@ -1065,7 +1060,7 @@ msgstr "Mod3"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:152
#: ../src/ui/metaaccellabel.c:123
msgid "Mod4"
msgstr "Mod4"
@@ -1074,248 +1069,248 @@ msgstr "Mod4"
#. * translated on keyboards used for your language, don't translate
#. * this.
#.
#: ../src/ui/metaaccellabel.c:158
#: ../src/ui/metaaccellabel.c:129
msgid "Mod5"
msgstr "Mod5"
#. Translators: This represents the size of a window. The first number is
#. * the width of the window and the second is the height.
#.
#: ../src/ui/resizepopup.c:113
#: ../src/ui/resizepopup.c:114
#, c-format
msgid "%d x %d"
msgstr "%d x %d"
#: ../src/ui/theme.c:254
#: ../src/ui/theme.c:256
msgid "top"
msgstr "zgoraj"
# G:12 K:5 O:0
#: ../src/ui/theme.c:256
#: ../src/ui/theme.c:258
msgid "bottom"
msgstr "spodaj"
# G:10 K:4 O:0
#: ../src/ui/theme.c:258
#: ../src/ui/theme.c:260
msgid "left"
msgstr "levo"
# G:1 K:0 O:0
#: ../src/ui/theme.c:260
#: ../src/ui/theme.c:262
msgid "right"
msgstr "desno"
# G:1 K:0 O:0
#: ../src/ui/theme.c:287
#: ../src/ui/theme.c:289
#, c-format
msgid "frame geometry does not specify \"%s\" dimension"
msgstr "geometrija okvirja ne navaja dimenzije \"%s\""
#: ../src/ui/theme.c:306
#: ../src/ui/theme.c:308
#, c-format
msgid "frame geometry does not specify dimension \"%s\" for border \"%s\""
msgstr "geometrija okvirja ne navaja dimenzije \"%s\" za rob \"%s\""
#: ../src/ui/theme.c:343
#: ../src/ui/theme.c:345
#, c-format
msgid "Button aspect ratio %g is not reasonable"
msgstr "Razmerje gumba %g ni smiselno"
#: ../src/ui/theme.c:355
#: ../src/ui/theme.c:357
#, c-format
msgid "Frame geometry does not specify size of buttons"
msgstr "Geometrija okvirja ne navaja velikosti gumbov"
#: ../src/ui/theme.c:1020
#: ../src/ui/theme.c:1022
#, c-format
msgid "Gradients should have at least two colors"
msgstr "Prelivi bi morali imeti vsaj dve barvi"
#: ../src/ui/theme.c:1146
#: ../src/ui/theme.c:1148
#, c-format
msgid "GTK color specification must have the state in brackets, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
msgstr "Navedba barve GTK mora vsebovati stanje v oglatih oklepajih, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
#: ../src/ui/theme.c:1160
#: ../src/ui/theme.c:1162
#, c-format
msgid "GTK color specification must have a close bracket after the state, e.g. gtk:fg[NORMAL] where NORMAL is the state; could not parse \"%s\""
msgstr "Navedbi barve GTK manjka oglati zaklepaj za stanjem, npr. gtk:fg[NORMAL], kjer je NORMAL stanje; ni mogoče razčleniti \"%s\""
#: ../src/ui/theme.c:1171
#: ../src/ui/theme.c:1173
#, c-format
msgid "Did not understand state \"%s\" in color specification"
msgstr "Ni mogoče razumeti stanja \"%s\" v navedbi barve "
#: ../src/ui/theme.c:1184
#: ../src/ui/theme.c:1186
#, c-format
msgid "Did not understand color component \"%s\" in color specification"
msgstr "Ni mogoče razumeti barvne komponente \"%s\" v navedbi barve"
#: ../src/ui/theme.c:1214
#: ../src/ui/theme.c:1216
#, c-format
msgid "Blend format is \"blend/bg_color/fg_color/alpha\", \"%s\" does not fit the format"
msgstr "Oblika zapisa preliva je \"blend/bg_color/fg_color/alpha\", \"%s\" ne ustreza pravilni obliki"
#: ../src/ui/theme.c:1225
#: ../src/ui/theme.c:1227
#, c-format
msgid "Could not parse alpha value \"%s\" in blended color"
msgstr "V prelivni barvi ni mogoče razčleniti vrednosti alfa \"%s\""
#: ../src/ui/theme.c:1235
#: ../src/ui/theme.c:1237
#, c-format
msgid "Alpha value \"%s\" in blended color is not between 0.0 and 1.0"
msgstr "V prelivni barvi alfa vrednost \"%s\" ni med 0.0 in 1.0"
#: ../src/ui/theme.c:1282
#: ../src/ui/theme.c:1284
#, c-format
msgid "Shade format is \"shade/base_color/factor\", \"%s\" does not fit the format"
msgstr "Oblika zapisa barve senčenja je \"shade/base_color/factor\", \"%s\" ne ustreza pravilni obliki."
#: ../src/ui/theme.c:1293
#: ../src/ui/theme.c:1295
#, c-format
msgid "Could not parse shade factor \"%s\" in shaded color"
msgstr "Ni mogoče razčleniti faktorja senčenja \"%s\" v senčeni barvi"
#: ../src/ui/theme.c:1303
#: ../src/ui/theme.c:1305
#, c-format
msgid "Shade factor \"%s\" in shaded color is negative"
msgstr "V senčeni barvi je faktor senčenja \"%s\" negativen"
#: ../src/ui/theme.c:1332
#: ../src/ui/theme.c:1334
#, c-format
msgid "Could not parse color \"%s\""
msgstr "Ni mogoče razčleniti barve \"%s\""
#: ../src/ui/theme.c:1582
#: ../src/ui/theme.c:1588
#, c-format
msgid "Coordinate expression contains character '%s' which is not allowed"
msgstr "Izraz koordinat vsebuje znak '%s', ki ni dovoljen"
#: ../src/ui/theme.c:1609
#: ../src/ui/theme.c:1615
#, c-format
msgid "Coordinate expression contains floating point number '%s' which could not be parsed"
msgstr "Izraz koordinat vsebuje številko s plavajočo vejico '%s', ki ne more biti razčlenjena"
#: ../src/ui/theme.c:1623
#: ../src/ui/theme.c:1629
#, c-format
msgid "Coordinate expression contains integer '%s' which could not be parsed"
msgstr "Izraz koordinat vsebuje celo število '%s', ki ga ni mogoče razčleniti"
#: ../src/ui/theme.c:1745
#: ../src/ui/theme.c:1751
#, c-format
msgid "Coordinate expression contained unknown operator at the start of this text: \"%s\""
msgstr "Izraz koordinat vsebuje neznan operator na pričetku besedila: \"%s\""
#: ../src/ui/theme.c:1802
#: ../src/ui/theme.c:1808
#, c-format
msgid "Coordinate expression was empty or not understood"
msgstr "Izraz koordinat je prazen ali ni razumljen"
#: ../src/ui/theme.c:1913
#: ../src/ui/theme.c:1923
#: ../src/ui/theme.c:1957
#: ../src/ui/theme.c:1919
#: ../src/ui/theme.c:1929
#: ../src/ui/theme.c:1963
#, c-format
msgid "Coordinate expression results in division by zero"
msgstr "Izraz koordinat se povzroči deljenje z ničlo"
#: ../src/ui/theme.c:1965
#: ../src/ui/theme.c:1971
#, c-format
msgid "Coordinate expression tries to use mod operator on a floating-point number"
msgstr "Izraz koordinat poskuša uporabiti operator mod ali številko s plavajočo vejico"
#: ../src/ui/theme.c:2021
#: ../src/ui/theme.c:2027
#, c-format
msgid "Coordinate expression has an operator \"%s\" where an operand was expected"
msgstr "Izraz koordinat vsebuje operator \"%s\", kjer je pričakovan operand"
#: ../src/ui/theme.c:2030
#: ../src/ui/theme.c:2036
#, c-format
msgid "Coordinate expression had an operand where an operator was expected"
msgstr "Izraz koordinat vsebuje operand kjer je pričakovan operator"
#: ../src/ui/theme.c:2038
#: ../src/ui/theme.c:2044
#, c-format
msgid "Coordinate expression ended with an operator instead of an operand"
msgstr "Izraz koordinat se konča z operatorjem namesto z operandom"
#: ../src/ui/theme.c:2048
#: ../src/ui/theme.c:2054
#, c-format
msgid "Coordinate expression has operator \"%c\" following operator \"%c\" with no operand in between"
msgstr "Izraz koordinat vsebuje operator \"%c\", ki sledi operatorju \"%c\", brez vmesnega operanda"
#: ../src/ui/theme.c:2199
#: ../src/ui/theme.c:2244
#: ../src/ui/theme.c:2205
#: ../src/ui/theme.c:2250
#, c-format
msgid "Coordinate expression had unknown variable or constant \"%s\""
msgstr "Izraz koordinat vsebuje neznano spremenljivko ali konstanto \"%s\""
#: ../src/ui/theme.c:2298
#: ../src/ui/theme.c:2304
#, c-format
msgid "Coordinate expression parser overflowed its buffer."
msgstr "Razčlenjevalnik izrazov koordinat je preplavil medpomnilnik."
#: ../src/ui/theme.c:2327
#: ../src/ui/theme.c:2333
#, c-format
msgid "Coordinate expression had a close parenthesis with no open parenthesis"
msgstr "Izraz koordinat vsebuje zaklepaj, a ne oklepaja"
#: ../src/ui/theme.c:2391
#: ../src/ui/theme.c:2397
#, c-format
msgid "Coordinate expression had an open parenthesis with no close parenthesis"
msgstr "Izraz koordinat vsebuje uklepaj, vendar je brez zaklepaja"
#: ../src/ui/theme.c:2402
#: ../src/ui/theme.c:2408
#, c-format
msgid "Coordinate expression doesn't seem to have any operators or operands"
msgstr "Videti je, da izraz koordinat ne vsebuje operatorjev ali operandov"
#: ../src/ui/theme.c:2604
#: ../src/ui/theme.c:2624
#: ../src/ui/theme.c:2644
#: ../src/ui/theme.c:2610
#: ../src/ui/theme.c:2630
#: ../src/ui/theme.c:2650
#, c-format
msgid "Theme contained an expression that resulted in an error: %s\n"
msgstr "Tema vsebuje izraz, ki je povzročil napako: %s\n"
#: ../src/ui/theme.c:4255
#: ../src/ui/theme.c:4261
#, c-format
msgid "<button function=\"%s\" state=\"%s\" draw_ops=\"whatever\"/> must be specified for this frame style"
msgstr "za ta slog okvirja mora biti naveden <button function=\"%s\" state=\"%s\" draw_ops=\"karkoli\"/>"
#: ../src/ui/theme.c:4763
#: ../src/ui/theme.c:4788
#: ../src/ui/theme.c:4769
#: ../src/ui/theme.c:4794
#, c-format
msgid "Missing <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"whatever\"/>"
msgstr "Manjka <frame state=\"%s\" resize=\"%s\" focus=\"%s\" style=\"karkoli\"/>"
#: ../src/ui/theme.c:4832
#: ../src/ui/theme.c:4838
#, c-format
msgid "Failed to load theme \"%s\": %s\n"
msgstr "Nalaganje teme \"%s\" ni uspelo: %s\n"
#: ../src/ui/theme.c:4964
#: ../src/ui/theme.c:4971
#: ../src/ui/theme.c:4978
#: ../src/ui/theme.c:4985
#: ../src/ui/theme.c:4992
#: ../src/ui/theme.c:4970
#: ../src/ui/theme.c:4977
#: ../src/ui/theme.c:4984
#: ../src/ui/theme.c:4991
#: ../src/ui/theme.c:4998
#, c-format
msgid "No <%s> set for theme \"%s\""
msgstr "Ni nastavljen <%s> za temo \"%s\""
#: ../src/ui/theme.c:5000
#: ../src/ui/theme.c:5006
#, c-format
msgid "No frame style set for window type \"%s\" in theme \"%s\", add a <window type=\"%s\" style_set=\"whatever\"/> element"
msgstr "Slog okvirja za okno vrste \"%s\" v temi \"%s\" ni nastavljen, dodajte element <window type=\"%s\" style_set=\"whatever\"/>"
#: ../src/ui/theme.c:5443
#: ../src/ui/theme.c:5505
#: ../src/ui/theme.c:5568
#: ../src/ui/theme.c:5449
#: ../src/ui/theme.c:5511
#: ../src/ui/theme.c:5574
#, c-format
msgid "User-defined constants must begin with a capital letter; \"%s\" does not"
msgstr "Uporabniško določene konstante se morajo začeti z veliko črko; \"%s\" se ne"
#: ../src/ui/theme.c:5451
#: ../src/ui/theme.c:5513
#: ../src/ui/theme.c:5576
#: ../src/ui/theme.c:5457
#: ../src/ui/theme.c:5519
#: ../src/ui/theme.c:5582
#, c-format
msgid "Constant \"%s\" has already been defined"
msgstr "Konstanta \"%s\" je bila že določena"
@@ -1688,223 +1683,242 @@ msgstr "<%s> je za to temo naveden dvakrat"
msgid "Failed to find a valid file for theme %s\n"
msgstr "Ni mogoče najti veljavne datoteke za temo %s\n"
#: ../src/ui/theme-viewer.c:75
msgid "/_Windows"
msgstr "/_Okna"
#: ../src/ui/theme-viewer.c:99
msgid "_Windows"
msgstr "_Okna"
#: ../src/ui/theme-viewer.c:76
msgid "/Windows/tearoff"
msgstr "/Okna/odtrgaj"
#: ../src/ui/theme-viewer.c:100
msgid "_Dialog"
msgstr "_Pogovorno okno"
#: ../src/ui/theme-viewer.c:77
msgid "/Windows/_Dialog"
msgstr "/Okna/_Pogovorno okno"
#: ../src/ui/theme-viewer.c:101
msgid "_Modal dialog"
msgstr "_Modalno okno"
#: ../src/ui/theme-viewer.c:78
msgid "/Windows/_Modal dialog"
msgstr "/Okna/_Modalno okno"
#: ../src/ui/theme-viewer.c:102
msgid "_Utility"
msgstr "_Pripomoček"
#: ../src/ui/theme-viewer.c:79
msgid "/Windows/_Utility"
msgstr "/Okna/P_ripomoček"
#: ../src/ui/theme-viewer.c:103
msgid "_Splashscreen"
msgstr "Pre_dstavitveno okno"
#: ../src/ui/theme-viewer.c:80
msgid "/Windows/_Splashscreen"
msgstr "/Okna/Pre_dstavitveno okno"
#: ../src/ui/theme-viewer.c:104
msgid "_Top dock"
msgstr "_Zgornje sidro"
#: ../src/ui/theme-viewer.c:81
msgid "/Windows/_Top dock"
msgstr "/Okna/_Zgornje sidro"
#: ../src/ui/theme-viewer.c:105
msgid "_Bottom dock"
msgstr "_Spodnje sidro"
#: ../src/ui/theme-viewer.c:82
msgid "/Windows/_Bottom dock"
msgstr "/Okna/_Spodnje sidro"
#: ../src/ui/theme-viewer.c:106
msgid "_Left dock"
msgstr "_Levo sidro"
#: ../src/ui/theme-viewer.c:83
msgid "/Windows/_Left dock"
msgstr "/Okna/_Levo sidro"
#: ../src/ui/theme-viewer.c:107
msgid "_Right dock"
msgstr "_Desno sidro"
#: ../src/ui/theme-viewer.c:84
msgid "/Windows/_Right dock"
msgstr "/Okna/_Desno sidro"
#: ../src/ui/theme-viewer.c:108
msgid "_All docks"
msgstr "_Vsa sidra"
#: ../src/ui/theme-viewer.c:85
msgid "/Windows/_All docks"
msgstr "/Okna/_Vsa sidra"
#: ../src/ui/theme-viewer.c:109
msgid "Des_ktop"
msgstr "_Namizje"
#: ../src/ui/theme-viewer.c:86
msgid "/Windows/Des_ktop"
msgstr "/Okna/_Namizje"
#: ../src/ui/theme-viewer.c:151
#: ../src/ui/theme-viewer.c:115
msgid "Open another one of these windows"
msgstr "Odpri drugo izmed teh oken"
#: ../src/ui/theme-viewer.c:153
#: ../src/ui/theme-viewer.c:117
msgid "This is a demo button with an 'open' icon"
msgstr "To je preizkusni gumb z ikono 'odpri'"
#: ../src/ui/theme-viewer.c:155
#: ../src/ui/theme-viewer.c:119
msgid "This is a demo button with a 'quit' icon"
msgstr "To je preizkusni gumb z ikono 'izhod'"
#: ../src/ui/theme-viewer.c:245
#: ../src/ui/theme-viewer.c:253
msgid "This is a sample message in a sample dialog"
msgstr "To je preizkusno sporočilo v pogovornem oknu"
#: ../src/ui/theme-viewer.c:328
#: ../src/ui/theme-viewer.c:336
#, c-format
msgid "Fake menu item %d\n"
msgstr "Ponarejen predmet menija %d\n"
#: ../src/ui/theme-viewer.c:362
#: ../src/ui/theme-viewer.c:370
msgid "Border-only window"
msgstr "Okno samo z okvirjem"
#: ../src/ui/theme-viewer.c:364
#: ../src/ui/theme-viewer.c:372
msgid "Bar"
msgstr "Vrstica"
#: ../src/ui/theme-viewer.c:381
#: ../src/ui/theme-viewer.c:389
msgid "Normal Application Window"
msgstr "Običajno okno programa"
#: ../src/ui/theme-viewer.c:385
#: ../src/ui/theme-viewer.c:393
msgid "Dialog Box"
msgstr "Pogovorno okno"
#: ../src/ui/theme-viewer.c:389
#: ../src/ui/theme-viewer.c:397
msgid "Modal Dialog Box"
msgstr "Modalno pogovorno okno"
#: ../src/ui/theme-viewer.c:393
#: ../src/ui/theme-viewer.c:401
msgid "Utility Palette"
msgstr "Paleta pripomočkov"
#: ../src/ui/theme-viewer.c:397
#: ../src/ui/theme-viewer.c:405
msgid "Torn-off Menu"
msgstr "Odtrgan meni"
#: ../src/ui/theme-viewer.c:401
#: ../src/ui/theme-viewer.c:409
msgid "Border"
msgstr "Okvir"
#: ../src/ui/theme-viewer.c:729
#: ../src/ui/theme-viewer.c:737
#, c-format
msgid "Button layout test %d"
msgstr "Preizkus razporeditve gumbov %d"
#: ../src/ui/theme-viewer.c:758
#: ../src/ui/theme-viewer.c:766
#, c-format
msgid "%g milliseconds to draw one window frame"
msgstr "%g milisekund za risanje ene sličice okna"
#: ../src/ui/theme-viewer.c:801
#: ../src/ui/theme-viewer.c:810
#, c-format
msgid "Usage: metacity-theme-viewer [THEMENAME]\n"
msgstr "Uporaba: metacity-theme-viewer [IMETEME]\n"
#: ../src/ui/theme-viewer.c:808
#: ../src/ui/theme-viewer.c:817
#, c-format
msgid "Error loading theme: %s\n"
msgstr "Napaka pri nalaganju teme: %s\n"
#: ../src/ui/theme-viewer.c:814
#: ../src/ui/theme-viewer.c:823
#, c-format
msgid "Loaded theme \"%s\" in %g seconds\n"
msgstr "Tema \"%s\" naložena v %g sekundah\n"
#: ../src/ui/theme-viewer.c:855
#: ../src/ui/theme-viewer.c:866
msgid "Normal Title Font"
msgstr "Običajna pisava naslova"
#: ../src/ui/theme-viewer.c:861
#: ../src/ui/theme-viewer.c:872
msgid "Small Title Font"
msgstr "Majhna pisava naslova"
#: ../src/ui/theme-viewer.c:867
#: ../src/ui/theme-viewer.c:878
msgid "Large Title Font"
msgstr "Velika pisava naslova"
#: ../src/ui/theme-viewer.c:872
#: ../src/ui/theme-viewer.c:883
msgid "Button Layouts"
msgstr "Razpored gumbov"
#: ../src/ui/theme-viewer.c:877
#: ../src/ui/theme-viewer.c:888
msgid "Benchmark"
msgstr "Meritev"
#: ../src/ui/theme-viewer.c:924
#: ../src/ui/theme-viewer.c:935
msgid "Window Title Goes Here"
msgstr "Tukaj je naslov okna"
#: ../src/ui/theme-viewer.c:1028
#: ../src/ui/theme-viewer.c:1039
#, c-format
msgid "Drew %d frames in %g client-side seconds (%g milliseconds per frame) and %g seconds wall clock time including X server resources (%g milliseconds per frame)\n"
msgstr "Izrisanih %d sličic v %g sekundah odjemalca (%g milisekund na sličico) in %g sekund v času stenske ure, upoštevajoč sredstva strežnika X (%g milisekund na sličico)\n"
#: ../src/ui/theme-viewer.c:1247
#: ../src/ui/theme-viewer.c:1258
msgid "position expression test returned TRUE but set error"
msgstr "preizkus izjave položaja je vrnil logični PRAV, vendar je nastavil napako"
#: ../src/ui/theme-viewer.c:1249
#: ../src/ui/theme-viewer.c:1260
msgid "position expression test returned FALSE but didn't set error"
msgstr "preizkus izjave položaja je vrnil logični NAPAK, vendar ni nastavil napake"
#: ../src/ui/theme-viewer.c:1253
#: ../src/ui/theme-viewer.c:1264
msgid "Error was expected but none given"
msgstr "Pričakovana je napaka, vendar odziva ni bilo"
#: ../src/ui/theme-viewer.c:1255
#: ../src/ui/theme-viewer.c:1266
#, c-format
msgid "Error %d was expected but %d given"
msgstr "Pričakovana je napaka %d, vrnjena pa je bila %d"
#: ../src/ui/theme-viewer.c:1261
#: ../src/ui/theme-viewer.c:1272
#, c-format
msgid "Error not expected but one was returned: %s"
msgstr "Napaka ni pričakovana, vendar je vrnjen odziv: %s"
#: ../src/ui/theme-viewer.c:1265
#: ../src/ui/theme-viewer.c:1276
#, c-format
msgid "x value was %d, %d was expected"
msgstr "vrednost x je %d, pričakovana pa je %d"
#: ../src/ui/theme-viewer.c:1268
#: ../src/ui/theme-viewer.c:1279
#, c-format
msgid "y value was %d, %d was expected"
msgstr "vrednost y je %d, pričakovana pa je %d"
#: ../src/ui/theme-viewer.c:1333
#: ../src/ui/theme-viewer.c:1344
#, c-format
msgid "%d coordinate expressions parsed in %g seconds (%g seconds average)\n"
msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\n"
#~ msgid "Failed to get hostname: %s\n"
#~ msgstr "Ni mogoče dobiti gostitelja z imenom: %s\n"
#~ msgid "/Windows/tearoff"
#~ msgstr "/Okna/odtrgaj"
#~ msgid "/Windows/_Dialog"
#~ msgstr "/Okna/_Pogovorno okno"
#~ msgid "/Windows/_Modal dialog"
#~ msgstr "/Okna/_Modalno okno"
#~ msgid "/Windows/Des_ktop"
#~ msgstr "/Okna/_Namizje"
#~ msgid "Theme file %s did not contain a root <metacity_theme> element"
#~ msgstr "Datoteka teme %s ne vsebuje korenskega elementa <metacity_theme>"
#~ msgid "Failed to read saved session file %s: %s\n"
#~ msgstr "Ni mogoče prebrati datoteke shranjene seje %s: %s\n"
#~ msgid "<author> specified twice for this theme"
#~ msgstr "Za to temo je element <author> naveden dvakrat"
#~ msgid "<copyright> specified twice for this theme"
#~ msgstr "Za to temo je element <copyright> naveden dvakrat"
#~ msgid "<date> specified twice for this theme"
#~ msgstr "Za to temo je element <date> naveden dvakrat"
#~ msgid "<description> specified twice for this theme"
#~ msgstr "Za to temo je element <description> naveden dvakrat"
#~ msgid "Desktop"
#~ msgstr "Namizje"
#~ msgid "Window Management"
#~ msgstr "Upravljanje oken"
#~ msgid "Failed to parse message \"%s\" from dialog process\n"
#~ msgstr "Ni mogoče razčleniti sporočila \"%s\" iz procesa dialogov\n"
#~ msgid "Error reading from dialog display process: %s\n"
#~ msgstr "Napaka ob branju iz procesa prikaza dialogov: %s\n"
#~ msgid ""
#~ "Error launching metacity-dialog to ask about killing an application: %s\n"
#~ msgstr ""
#~ "Napaka ob zaganjanju metacity-dialog, da bi vprašal o ubijanju programa: %"
#~ "s\n"
#~ msgid ""
#~ "The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
#~ "\n"
@@ -1918,6 +1932,7 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
#~ "Razčlenilnik je precej popustljiv in dopušča različno velikost črk ter "
#~ "okrajšave kot npr. \"<Ctl>\" in \"<Ctrl>\". V primeru, da možnost "
#~ "\"onemogočite\", potem za to dejanje ne bo bližnjice tipk."
#~ msgid ""
#~ "The format looks like \"<Control>a\" or <Shift><Alt>F1\".\n"
#~ "\n"
@@ -1937,17 +1952,21 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
#~ "\n"
#~ "Tipkovno bližnjico je lahko povrnete s pritiskom tipke \"shift\" zato "
#~ "tipka \"shift\" ne more biti del tipkovne bližnjice."
#~ msgid ""
#~ "Error launching metacity-dialog to warn about apps that don't support "
#~ "session management: %s\n"
#~ msgstr ""
#~ "Napaka ob zaganjanju metacity-dialog za opozorilo o programih, ki ne "
#~ "podpirajo upravljanja seje: %s\n"
#~ msgid "Metacity"
#~ msgstr "Metacity"
#~ msgid ""
#~ "(Not implemented) Navigation works in terms of applications not windows"
#~ msgstr "(Ni vstavljeno) Navigacija deluje v smislu programov, ne oken"
#~ msgid ""
#~ "A font description string describing a font for window titlebars. The "
#~ "size from the description will only be used if the titlebar_font_size "
@@ -1958,14 +1977,19 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
#~ "uporabljena le, če je možnost titlebar_font_size nastavljena na 0. Poleg "
#~ "tega je ta možnost onemogočena, če je titlebar_uses_desktop_font "
#~ "nastavljena na true (resnično)."
#~ msgid "Action on title bar double-click"
#~ msgstr "Dejanje ob dvojnem kliku na naziv okna"
#~ msgid "Action on title bar middle-click"
#~ msgstr "Dejanje ob dvojnem kliku na naslov okna"
#~ msgid "Action on title bar right-click"
#~ msgstr "Dejanje ob desnem kliku na naslov okna"
#~ msgid "Arrangement of buttons on the titlebar"
#~ msgstr "Postavitev gumbov v nazivu okna"
#~ msgid ""
#~ "Arrangement of buttons on the titlebar. The value should be a string, "
#~ "such as \"menu:minimize,maximize,spacer,close\"; the colon separates the "
@@ -1982,8 +2006,10 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
#~ "novih različicah Metacity doda nove gumbe brez, da bi se porušila "
#~ "kompatibilnost s starimi različicami. Posebna oznaka ločilnika se lahko "
#~ "uporabi pri večanju razdalje med gumbi."
#~ msgid "Automatically raises the focused window"
#~ msgstr "Samodejno dvigne dejavno okno"
#~ msgid ""
#~ "Clicking a window while holding down this modifier key will move the "
#~ "window (left click), resize the window (middle click), or show the window "
@@ -1996,12 +2022,15 @@ msgstr "%d izjav koordinat razčlenjenih v %g sekundah (%g sekund v povprečju)\
#~ "klik). Leve in desne naloge je mogoče zamenjati s tipko prilagajanja "
#~ "velikosti okna z miško. Spremenilnik je npr. izražen kot \"&lt;Alt&gt;\" "
#~ "ali \"&lt;Super&gt;\"."
#~ msgid "Commands to run in response to keybindings"
#~ msgstr "Ukazi zagnani preko tipkovnih bližnjic"
#~ msgid "Compositing Manager"
#~ msgstr "Upravitelj sestavljanja"
#~ msgid "Control how new windows get focus"
#~ msgstr "Nadzor dejavnosti okna"
#~ msgid "Current theme"
#~ msgstr "Trenutna tema"

View File

@@ -39,10 +39,12 @@ mutter_SOURCES= \
compositor/mutter-shaped-texture.h \
compositor/tidy/tidy-texture-frame.c \
compositor/tidy/tidy-texture-frame.h \
gdk-compat.h \
gtk-compat.h \
include/compositor.h \
include/mutter-plugin.h \
include/mutter-window.h \
include/region.h \
include/compositor-mutter.h \
core/constraints.c \
core/constraints.h \
@@ -210,18 +212,21 @@ Meta-$(api_version).gir: $(G_IR_SCANNER) mutter $(libmutterinclude_HEADERS) $(mu
--namespace=Meta \
--nsversion=$(api_version) \
--include=GObject-2.0 \
--include=Gdk-2.0 \
--include=Gtk-2.0 \
--include=Gdk-@GTK_API_VERSION@ \
--include=Gtk-@GTK_API_VERSION@ \
--include=Clutter-1.0 \
--pkg=clutter-1.0 \
--pkg=gtk+-2.0 \
--pkg=gtk+-@GTK_API_VERSION@ \
--include=xlib-2.0 \
--include=xfixes-4.0 \
--program=$$pwd/mutter \
$(filter %.c,$(mutter_SOURCES)) \
$(libmutterinclude_base_headers) \
$(INCLUDES) \
-o $$pwd/$@
-o $$pwd/$@.tmp && \
$(PYTHON) $(srcdir)/fix-meta-rectangle.py $$pwd/$@.tmp $$pwd/$@.tmp2 && \
rm $$pwd/$@.tmp && \
mv $$pwd/$@.tmp2 $$pwd/$@
Meta-$(api_version).typelib: $(G_IR_COMPILER) Meta-$(api_version).gir
$(AM_V_GEN) LD_LIBRARY_PATH=$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}. $(G_IR_COMPILER) Meta-$(api_version).gir -o $@
@@ -298,6 +303,7 @@ EXTRA_DIST=$(desktopfiles_files) \
$(desktopfiles_in_files) \
$(wmproperties_in_files) \
$(schema_in_files) \
fix-meta-rectangle.py \
libmutter-private.pc.in \
mutter-plugins.pc.in \
mutter-enum-types.h.in \

View File

@@ -790,7 +790,6 @@ meta_compositor_switch_workspace (MetaCompositor *compositor,
if (!info->plugin_mgr ||
!mutter_plugin_manager_switch_workspace (info->plugin_mgr,
(const GList **)&info->windows,
from_indx,
to_indx,
direction))

View File

@@ -402,9 +402,8 @@ mutter_plugin_manager_get (MetaScreen *screen)
}
static void
mutter_plugin_manager_kill_effect (MutterPluginManager *plugin_mgr,
MutterWindow *actor,
unsigned long events)
mutter_plugin_manager_kill_window_effects (MutterPluginManager *plugin_mgr,
MutterWindow *actor)
{
GList *l = plugin_mgr->plugins;
@@ -414,17 +413,32 @@ mutter_plugin_manager_kill_effect (MutterPluginManager *plugin_mgr,
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
if (!mutter_plugin_disabled (plugin)
&& (mutter_plugin_features (plugin) & events)
&& klass->kill_effect)
klass->kill_effect (plugin, actor, events);
&& klass->kill_window_effects)
klass->kill_window_effects (plugin, actor);
l = l->next;
}
}
static void
mutter_plugin_manager_kill_switch_workspace (MutterPluginManager *plugin_mgr)
{
GList *l = plugin_mgr->plugins;
while (l)
{
MutterPlugin *plugin = l->data;
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
if (!mutter_plugin_disabled (plugin)
&& (mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE)
&& klass->kill_switch_workspace)
klass->kill_switch_workspace (plugin);
l = l->next;
}
}
#define ALL_BUT_SWITCH \
MUTTER_PLUGIN_ALL_EFFECTS & \
~MUTTER_PLUGIN_SWITCH_WORKSPACE
/*
* Public method that the compositor hooks into for events that require
* no additional parameters.
@@ -461,10 +475,9 @@ mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
case MUTTER_PLUGIN_MINIMIZE:
if (klass->minimize)
{
mutter_plugin_manager_kill_effect (
mutter_plugin_manager_kill_window_effects (
plugin_mgr,
actor,
ALL_BUT_SWITCH);
actor);
_mutter_plugin_effect_started (plugin);
klass->minimize (plugin, actor);
@@ -473,10 +486,9 @@ mutter_plugin_manager_event_simple (MutterPluginManager *plugin_mgr,
case MUTTER_PLUGIN_MAP:
if (klass->map)
{
mutter_plugin_manager_kill_effect (
mutter_plugin_manager_kill_window_effects (
plugin_mgr,
actor,
ALL_BUT_SWITCH);
actor);
_mutter_plugin_effect_started (plugin);
klass->map (plugin, actor);
@@ -540,10 +552,9 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
case MUTTER_PLUGIN_MAXIMIZE:
if (klass->maximize)
{
mutter_plugin_manager_kill_effect (
mutter_plugin_manager_kill_window_effects (
plugin_mgr,
actor,
ALL_BUT_SWITCH);
actor);
_mutter_plugin_effect_started (plugin);
klass->maximize (plugin, actor,
@@ -554,10 +565,9 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
case MUTTER_PLUGIN_UNMAXIMIZE:
if (klass->unmaximize)
{
mutter_plugin_manager_kill_effect (
mutter_plugin_manager_kill_window_effects (
plugin_mgr,
actor,
ALL_BUT_SWITCH);
actor);
_mutter_plugin_effect_started (plugin);
klass->unmaximize (plugin, actor,
@@ -586,7 +596,6 @@ mutter_plugin_manager_event_maximize (MutterPluginManager *plugin_mgr,
*/
gboolean
mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
const GList **actors,
gint from,
gint to,
MetaMotionDirection direction)
@@ -604,19 +613,15 @@ mutter_plugin_manager_switch_workspace (MutterPluginManager *plugin_mgr,
MutterPluginClass *klass = MUTTER_PLUGIN_GET_CLASS (plugin);
if (!mutter_plugin_disabled (plugin) &&
(mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE) &&
(actors && *actors))
(mutter_plugin_features (plugin) & MUTTER_PLUGIN_SWITCH_WORKSPACE))
{
if (klass->switch_workspace)
{
retval = TRUE;
mutter_plugin_manager_kill_effect (
plugin_mgr,
MUTTER_WINDOW ((*actors)->data),
MUTTER_PLUGIN_SWITCH_WORKSPACE);
mutter_plugin_manager_kill_switch_workspace (plugin_mgr);
_mutter_plugin_effect_started (plugin);
klass->switch_workspace (plugin, actors, from, to, direction);
klass->switch_workspace (plugin, from, to, direction);
}
}

View File

@@ -31,6 +31,15 @@
#include "mutter-plugin.h"
#undef MUTTER_PLUGIN_FROM_MANAGER_
#define MUTTER_PLUGIN_MINIMIZE (1<<0)
#define MUTTER_PLUGIN_MAXIMIZE (1<<1)
#define MUTTER_PLUGIN_UNMAXIMIZE (1<<2)
#define MUTTER_PLUGIN_MAP (1<<3)
#define MUTTER_PLUGIN_DESTROY (1<<4)
#define MUTTER_PLUGIN_SWITCH_WORKSPACE (1<<5)
#define MUTTER_PLUGIN_ALL_EFFECTS (~0)
typedef struct MutterPluginManager MutterPluginManager;
MutterPluginManager * mutter_plugin_manager_get (MetaScreen *screen);
@@ -54,7 +63,6 @@ void mutter_plugin_manager_update_workspaces (MutterPluginManager *mgr);
void mutter_plugin_manager_update_workspace (MutterPluginManager *mgr, MetaWorkspace *w);
gboolean mutter_plugin_manager_switch_workspace (MutterPluginManager *mgr,
const GList **actors,
gint from,
gint to,
MetaMotionDirection direction);

View File

@@ -367,9 +367,25 @@ _mutter_plugin_effect_started (MutterPlugin *plugin)
}
void
mutter_plugin_effect_completed (MutterPlugin *plugin,
MutterWindow *actor,
unsigned long event)
mutter_plugin_switch_workspace_completed (MutterPlugin *plugin)
{
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
MetaScreen *screen = mutter_plugin_get_screen (plugin);
if (priv->running-- < 0)
{
g_warning ("Error in running effect accounting, adjusting.");
priv->running = 0;
}
mutter_switch_workspace_completed (screen);
}
static void
mutter_plugin_window_effect_completed (MutterPlugin *plugin,
MutterWindow *actor,
unsigned long event)
{
MutterPluginPrivate *priv = MUTTER_PLUGIN (plugin)->priv;
@@ -391,17 +407,42 @@ mutter_plugin_effect_completed (MutterPlugin *plugin,
name ? name : "unknown");
}
if (event == MUTTER_PLUGIN_SWITCH_WORKSPACE)
{
/* The window is just used to identify the screen */
MetaWindow *window = mutter_window_get_meta_window (actor);
MetaScreen *screen = meta_window_get_screen (window);
mutter_switch_workspace_completed (screen);
}
else
{
mutter_window_effect_completed (actor, event);
}
mutter_window_effect_completed (actor, event);
}
void
mutter_plugin_minimize_completed (MutterPlugin *plugin,
MutterWindow *actor)
{
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_MINIMIZE);
}
void
mutter_plugin_maximize_completed (MutterPlugin *plugin,
MutterWindow *actor)
{
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_MAXIMIZE);
}
void
mutter_plugin_unmaximize_completed (MutterPlugin *plugin,
MutterWindow *actor)
{
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_UNMAXIMIZE);
}
void
mutter_plugin_map_completed (MutterPlugin *plugin,
MutterWindow *actor)
{
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_MAP);
}
void
mutter_plugin_destroy_completed (MutterPlugin *plugin,
MutterWindow *actor)
{
mutter_plugin_window_effect_completed (plugin, actor, MUTTER_PLUGIN_DESTROY);
}
void

View File

@@ -71,7 +71,7 @@ struct _MutterShapedTexturePrivate
CoglHandle material_workaround;
#endif
GdkRegion *clip_region;
MetaRegion *clip_region;
guint mask_width, mask_height;
@@ -300,7 +300,7 @@ mutter_shaped_texture_paint (ClutterActor *actor)
ClutterActorBox alloc;
CoglHandle material;
if (priv->clip_region && gdk_region_empty (priv->clip_region))
if (priv->clip_region && meta_region_is_empty (priv->clip_region))
return;
if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
@@ -387,7 +387,7 @@ mutter_shaped_texture_paint (ClutterActor *actor)
# define MAX_RECTS 16
/* Would be nice to be able to check the number of rects first */
gdk_region_get_rectangles (priv->clip_region, &rects, &n_rects);
meta_region_get_rectangles (priv->clip_region, &rects, &n_rects);
if (n_rects > MAX_RECTS)
{
g_free (rects);
@@ -557,7 +557,7 @@ mutter_shaped_texture_add_rectangles (MutterShapedTexture *stex,
*/
void
mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
GdkRegion *clip_region)
MetaRegion *clip_region)
{
MutterShapedTexturePrivate *priv;
@@ -567,7 +567,7 @@ mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
if (priv->clip_region)
{
gdk_region_destroy (priv->clip_region);
meta_region_destroy (priv->clip_region);
priv->clip_region = NULL;
}

View File

@@ -26,12 +26,14 @@
#ifndef __MUTTER_SHAPED_TEXTURE_H__
#define __MUTTER_SHAPED_TEXTURE_H__
#include <config.h>
#include <clutter/clutter.h>
#ifdef HAVE_GLX_TEXTURE_PIXMAP
#include <clutter/glx/clutter-glx.h>
#endif /* HAVE_GLX_TEXTURE_PIXMAP */
#include <gdk/gdkregion.h>
#include "region.h"
G_BEGIN_DECLS
@@ -94,7 +96,7 @@ void mutter_shaped_texture_add_rectangles (MutterShapedTexture *stex,
/* Assumes ownership of clip_region */
void mutter_shaped_texture_set_clip_region (MutterShapedTexture *stex,
GdkRegion *clip_region);
MetaRegion *clip_region);
G_END_DECLS

View File

@@ -1,10 +1,13 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
#include <config.h>
#define _ISOC99_SOURCE /* for roundf */
#include <math.h>
#include "mutter-window-private.h"
#include "mutter-window-group.h"
#include "region.h"
struct _MutterWindowGroupClass
{
@@ -99,7 +102,7 @@ static void
mutter_window_group_paint (ClutterActor *actor)
{
MutterWindowGroup *window_group = MUTTER_WINDOW_GROUP (actor);
GdkRegion *visible_region;
MetaRegion *visible_region;
GdkRectangle screen_rect = { 0 };
GList *children, *l;
@@ -116,7 +119,7 @@ mutter_window_group_paint (ClutterActor *actor)
* optimization, however.)
*/
meta_screen_get_size (window_group->screen, &screen_rect.width, &screen_rect.height);
visible_region = gdk_region_rectangle (&screen_rect);
visible_region = meta_region_new_from_rectangle (&screen_rect);
for (l = children; l; l = l->next)
{
@@ -132,22 +135,22 @@ mutter_window_group_paint (ClutterActor *actor)
continue;
/* Temporarily move to the coordinate system of the actor */
gdk_region_offset (visible_region, - x, - y);
meta_region_translate (visible_region, - x, - y);
mutter_window_set_visible_region (cw, visible_region);
if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (cw)) == 0xff)
{
GdkRegion *obscured_region = mutter_window_get_obscured_region (cw);
MetaRegion *obscured_region = mutter_window_get_obscured_region (cw);
if (obscured_region)
gdk_region_subtract (visible_region, obscured_region);
meta_region_subtract (visible_region, obscured_region);
}
mutter_window_set_visible_region_beneath (cw, visible_region);
gdk_region_offset (visible_region, x, y);
meta_region_translate (visible_region, x, y);
}
gdk_region_destroy (visible_region);
meta_region_destroy (visible_region);
CLUTTER_ACTOR_CLASS (mutter_window_group_parent_class)->paint (actor);

View File

@@ -3,9 +3,11 @@
#ifndef MUTTER_WINDOW_PRIVATE_H
#define MUTTER_WINDOW_PRIVATE_H
#include <config.h>
#include <X11/extensions/Xdamage.h>
#include <gdk/gdk.h>
#include "compositor-mutter.h"
#include "region.h"
MutterWindow *mutter_window_new (MetaWindow *window);
@@ -37,12 +39,12 @@ void mutter_window_update_opacity (MutterWindow *cw);
void mutter_window_mapped (MutterWindow *cw);
void mutter_window_unmapped (MutterWindow *cw);
GdkRegion *mutter_window_get_obscured_region (MutterWindow *cw);
MetaRegion *mutter_window_get_obscured_region (MutterWindow *cw);
void mutter_window_set_visible_region (MutterWindow *cw,
GdkRegion *visible_region);
MetaRegion *visible_region);
void mutter_window_set_visible_region_beneath (MutterWindow *cw,
GdkRegion *beneath_region);
MetaRegion *beneath_region);
void mutter_window_reset_visible_regions (MutterWindow *cw);
void mutter_window_effect_completed (MutterWindow *actor,

View File

@@ -42,10 +42,10 @@ struct _MutterWindowPrivate
gchar * desc;
/* If the window is shaped, a region that matches the shape */
GdkRegion *shape_region;
MetaRegion *shape_region;
/* A rectangular region with the unshaped extends of the window
* texture */
GdkRegion *bounding_region;
MetaRegion *bounding_region;
gint freeze_count;
@@ -68,6 +68,7 @@ struct _MutterWindowPrivate
guint redecorating : 1;
guint needs_damage_all : 1;
guint received_damage : 1;
guint needs_pixmap : 1;
guint needs_reshape : 1;
@@ -337,7 +338,7 @@ mutter_window_constructed (GObject *object)
priv->damage = None;
else
priv->damage = XDamageCreate (xdisplay, xwindow,
XDamageReportRawRectangles);
XDamageReportBoundingBox);
format = XRenderFindVisualFormat (xdisplay, priv->attrs.visual);
@@ -1349,7 +1350,7 @@ mutter_window_clear_shape_region (MutterWindow *self)
if (priv->shape_region)
{
gdk_region_destroy (priv->shape_region);
meta_region_destroy (priv->shape_region);
priv->shape_region = NULL;
}
}
@@ -1361,7 +1362,7 @@ mutter_window_clear_bounding_region (MutterWindow *self)
if (priv->bounding_region)
{
gdk_region_destroy (priv->bounding_region);
meta_region_destroy (priv->bounding_region);
priv->bounding_region = NULL;
}
}
@@ -1376,7 +1377,7 @@ mutter_window_update_bounding_region (MutterWindow *self,
mutter_window_clear_bounding_region (self);
priv->bounding_region = gdk_region_rectangle (&bounding_rectangle);
priv->bounding_region = meta_region_new_from_rectangle (&bounding_rectangle);
}
static void
@@ -1389,11 +1390,11 @@ mutter_window_update_shape_region (MutterWindow *self,
mutter_window_clear_shape_region (self);
priv->shape_region = gdk_region_new ();
priv->shape_region = meta_region_new ();
for (i = 0; i < n_rects; i++)
{
GdkRectangle rect = { rects[i].x, rects[i].y, rects[i].width, rects[i].height };
gdk_region_union_with_rect (priv->shape_region, &rect);
meta_region_union_rectangle (priv->shape_region, &rect);
}
}
@@ -1407,7 +1408,7 @@ mutter_window_update_shape_region (MutterWindow *self,
* Return value: (transfer none): the area obscured by the window,
* %NULL is the same as an empty region.
*/
GdkRegion *
MetaRegion *
mutter_window_get_obscured_region (MutterWindow *self)
{
MutterWindowPrivate *priv = self->priv;
@@ -1426,13 +1427,13 @@ mutter_window_get_obscured_region (MutterWindow *self)
#if 0
/* Print out a region; useful for debugging */
static void
dump_region (GdkRegion *region)
dump_region (MetaRegion *region)
{
GdkRectangle *rects;
int n_rects;
int i;
gdk_region_get_rectangles (region, &rects, &n_rects);
meta_region_get_rectangles (region, &rects, &n_rects);
g_print ("[");
for (i = 0; i < n_rects; i++)
{
@@ -1456,10 +1457,10 @@ dump_region (GdkRegion *region)
*/
void
mutter_window_set_visible_region (MutterWindow *self,
GdkRegion *visible_region)
MetaRegion *visible_region)
{
MutterWindowPrivate *priv = self->priv;
GdkRegion *texture_clip_region = NULL;
MetaRegion *texture_clip_region = NULL;
/* Get the area of the window texture that would be drawn if
* we weren't obscured at all
@@ -1467,21 +1468,21 @@ mutter_window_set_visible_region (MutterWindow *self,
if (priv->shaped)
{
if (priv->shape_region)
texture_clip_region = gdk_region_copy (priv->shape_region);
texture_clip_region = meta_region_copy (priv->shape_region);
}
else
{
if (priv->bounding_region)
texture_clip_region = gdk_region_copy (priv->bounding_region);
texture_clip_region = meta_region_copy (priv->bounding_region);
}
if (!texture_clip_region)
texture_clip_region = gdk_region_new ();
texture_clip_region = meta_region_new ();
/* Then intersect that with the visible region to get the region
* that we actually need to redraw.
*/
gdk_region_intersect (texture_clip_region, visible_region);
meta_region_intersect (texture_clip_region, visible_region);
/* Assumes ownership */
mutter_shaped_texture_set_clip_region (MUTTER_SHAPED_TEXTURE (priv->actor),
@@ -1502,7 +1503,7 @@ mutter_window_set_visible_region (MutterWindow *self,
*/
void
mutter_window_set_visible_region_beneath (MutterWindow *self,
GdkRegion *beneath_region)
MetaRegion *beneath_region)
{
MutterWindowPrivate *priv = self->priv;
@@ -1510,7 +1511,7 @@ mutter_window_set_visible_region_beneath (MutterWindow *self,
{
GdkRectangle shadow_rect;
ClutterActorBox box;
GdkOverlapType overlap;
MetaOverlapType overlap;
/* We could compute an full clip region as we do for the window
* texture, but the shadow is relatively cheap to draw, and
@@ -1525,10 +1526,10 @@ mutter_window_set_visible_region_beneath (MutterWindow *self,
shadow_rect.width = roundf (box.x2 - box.x1);
shadow_rect.height = roundf (box.y2 - box.y1);
overlap = gdk_region_rect_in (beneath_region, &shadow_rect);
overlap = meta_region_contains_rectangle (beneath_region, &shadow_rect);
tidy_texture_frame_set_needs_paint (TIDY_TEXTURE_FRAME (priv->shadow),
overlap != GDK_OVERLAP_RECTANGLE_OUT);
overlap != META_REGION_OVERLAP_OUT);
}
}
@@ -1652,6 +1653,8 @@ mutter_window_process_damage (MutterWindow *self,
MutterWindowPrivate *priv = self->priv;
ClutterX11TexturePixmap *texture_x11 = CLUTTER_X11_TEXTURE_PIXMAP (priv->actor);
priv->received_damage = TRUE;
if (is_frozen (self))
{
/* The window is frozen due to an effect in progress: we ignore damage
@@ -1748,6 +1751,11 @@ mutter_window_update_shape (MutterWindow *self,
void
mutter_window_pre_paint (MutterWindow *self)
{
MutterWindowPrivate *priv = self->priv;
MetaScreen *screen = priv->screen;
MetaDisplay *display = meta_screen_get_display (screen);
Display *xdisplay = meta_display_get_xdisplay (display);
if (is_frozen (self))
{
/* The window is frozen due to a pending animation: we'll wait until
@@ -1755,6 +1763,12 @@ mutter_window_pre_paint (MutterWindow *self)
return;
}
if (priv->received_damage)
{
XDamageSubtract (xdisplay, priv->damage, None, None);
priv->received_damage = FALSE;
}
check_needs_reshape (self);
check_needs_pixmap (self);
}

View File

@@ -81,11 +81,12 @@ static void unmaximize (MutterPlugin *plugin,
gint x, gint y, gint width, gint height);
static void switch_workspace (MutterPlugin *plugin,
const GList **actors, gint from, gint to,
gint from, gint to,
MetaMotionDirection direction);
static void kill_effect (MutterPlugin *plugin,
MutterWindow *actor, gulong event);
static void kill_window_effects (MutterPlugin *plugin,
MutterWindow *actor);
static void kill_switch_workspace (MutterPlugin *plugin);
static const MutterPluginInfo * plugin_info (MutterPlugin *plugin);
@@ -99,7 +100,6 @@ struct _MutterDefaultPluginPrivate
/* Valid only when switch_workspace effect is in progress */
ClutterTimeline *tml_switch_workspace1;
ClutterTimeline *tml_switch_workspace2;
GList **actors;
ClutterActor *desktop1;
ClutterActor *desktop2;
@@ -220,8 +220,9 @@ mutter_default_plugin_class_init (MutterDefaultPluginClass *klass)
plugin_class->unmaximize = unmaximize;
plugin_class->destroy = destroy;
plugin_class->switch_workspace = switch_workspace;
plugin_class->kill_effect = kill_effect;
plugin_class->plugin_info = plugin_info;
plugin_class->kill_window_effects = kill_window_effects;
plugin_class->kill_switch_workspace = kill_switch_workspace;
g_type_class_add_private (gobject_class, sizeof (MutterDefaultPluginPrivate));
}
@@ -270,20 +271,12 @@ get_actor_private (MutterWindow *actor)
return priv;
}
typedef struct SwitchWorkspaceData
{
MutterPlugin *plugin;
const GList **actors;
} SwitchWorkspaceData;
static void
on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
{
SwitchWorkspaceData *sw_data = data;
MutterPlugin *plugin = sw_data->plugin;
MutterPlugin *plugin = MUTTER_PLUGIN (data);
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
GList *l = *((GList**)sw_data->actors);
MutterWindow *actor_for_cb = l->data;
GList *l = mutter_plugin_get_windows (plugin);
while (l)
{
@@ -303,21 +296,17 @@ on_switch_workspace_effect_complete (ClutterTimeline *timeline, gpointer data)
clutter_actor_destroy (priv->desktop1);
clutter_actor_destroy (priv->desktop2);
priv->actors = NULL;
priv->tml_switch_workspace1 = NULL;
priv->tml_switch_workspace2 = NULL;
priv->desktop1 = NULL;
priv->desktop2 = NULL;
g_free (data);
mutter_plugin_effect_completed (plugin, actor_for_cb,
MUTTER_PLUGIN_SWITCH_WORKSPACE);
mutter_plugin_switch_workspace_completed (plugin);
}
static void
switch_workspace (MutterPlugin *plugin,
const GList **actors, gint from, gint to,
gint from, gint to,
MetaMotionDirection direction)
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
@@ -328,12 +317,8 @@ switch_workspace (MutterPlugin *plugin,
ClutterActor *stage;
int screen_width, screen_height;
MetaScreen *screen = mutter_plugin_get_screen (plugin);
SwitchWorkspaceData *sw_data = g_new (SwitchWorkspaceData, 1);
ClutterAnimation *animation;
sw_data->plugin = plugin;
sw_data->actors = actors;
stage = mutter_plugin_get_stage (plugin);
mutter_plugin_query_screen_size (plugin,
@@ -353,14 +338,13 @@ switch_workspace (MutterPlugin *plugin,
if (from == to)
{
mutter_plugin_effect_completed (plugin, NULL,
MUTTER_PLUGIN_SWITCH_WORKSPACE);
mutter_plugin_switch_workspace_completed (plugin);
return;
}
n_workspaces = meta_screen_get_n_workspaces (screen);
l = g_list_last (*((GList**) actors));
l = g_list_last (mutter_plugin_get_windows (plugin));
while (l)
{
@@ -395,7 +379,6 @@ switch_workspace (MutterPlugin *plugin,
l = l->prev;
}
priv->actors = (GList **)actors;
priv->desktop1 = workspace0;
priv->desktop2 = workspace1;
@@ -408,7 +391,7 @@ switch_workspace (MutterPlugin *plugin,
g_signal_connect (priv->tml_switch_workspace1,
"completed",
G_CALLBACK (on_switch_workspace_effect_complete),
sw_data);
plugin);
animation = clutter_actor_animate (workspace1, CLUTTER_EASE_IN_SINE,
SWITCH_TIMEOUT,
@@ -446,8 +429,7 @@ on_minimize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data
CLUTTER_GRAVITY_NORTH_WEST);
/* Now notify the manager that we are done with this effect */
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_MINIMIZE);
mutter_plugin_minimize_completed (plugin, mc_window);
g_free (data);
}
@@ -490,8 +472,7 @@ minimize (MutterPlugin *plugin, MutterWindow *mc_window)
}
else
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_MINIMIZE);
mutter_plugin_minimize_completed (plugin, mc_window);
}
/*
@@ -516,8 +497,7 @@ on_maximize_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data
CLUTTER_GRAVITY_NORTH_WEST);
/* Now notify the manager that we are done with this effect */
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_MAXIMIZE);
mutter_plugin_maximize_completed (plugin, mc_window);
g_free (data);
}
@@ -587,8 +567,7 @@ maximize (MutterPlugin *plugin,
return;
}
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_MAXIMIZE);
mutter_plugin_maximize_completed (plugin, mc_window);
}
/*
@@ -611,8 +590,7 @@ unmaximize (MutterPlugin *plugin,
}
/* Do this conditionally, if the effect requires completion callback. */
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_UNMAXIMIZE);
mutter_plugin_unmaximize_completed (plugin, mc_window);
}
static void
@@ -631,7 +609,7 @@ on_map_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
CLUTTER_GRAVITY_NORTH_WEST);
/* Now notify the manager that we are done with this effect */
mutter_plugin_effect_completed (plugin, mc_window, MUTTER_PLUGIN_MAP);
mutter_plugin_map_completed (plugin, mc_window);
g_free (data);
}
@@ -677,8 +655,7 @@ map (MutterPlugin *plugin, MutterWindow *mc_window)
}
else
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_MAP);
mutter_plugin_map_completed (plugin, mc_window);
}
/*
@@ -694,8 +671,7 @@ on_destroy_effect_complete (ClutterTimeline *timeline, EffectCompleteData *data)
apriv->tml_destroy = NULL;
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_DESTROY);
mutter_plugin_destroy_completed (plugin, mc_window);
}
/*
@@ -732,54 +708,48 @@ destroy (MutterPlugin *plugin, MutterWindow *mc_window)
data);
}
else
mutter_plugin_effect_completed (plugin, mc_window,
MUTTER_PLUGIN_DESTROY);
mutter_plugin_destroy_completed (plugin, mc_window);
}
static void
kill_effect (MutterPlugin *plugin, MutterWindow *mc_window, gulong event)
kill_switch_workspace (MutterPlugin *plugin)
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
if (priv->tml_switch_workspace1)
{
clutter_timeline_stop (priv->tml_switch_workspace1);
clutter_timeline_stop (priv->tml_switch_workspace2);
g_signal_emit_by_name (priv->tml_switch_workspace1, "completed", NULL);
}
}
static void
kill_window_effects (MutterPlugin *plugin, MutterWindow *mc_window)
{
ActorPrivate *apriv;
if (event & MUTTER_PLUGIN_SWITCH_WORKSPACE)
{
MutterDefaultPluginPrivate *priv = MUTTER_DEFAULT_PLUGIN (plugin)->priv;
if (priv->tml_switch_workspace1)
{
clutter_timeline_stop (priv->tml_switch_workspace1);
clutter_timeline_stop (priv->tml_switch_workspace2);
g_signal_emit_by_name (priv->tml_switch_workspace1, "completed", NULL);
}
if (!(event & ~MUTTER_PLUGIN_SWITCH_WORKSPACE))
{
/* Workspace switch only, nothing more to do */
return;
}
}
apriv = get_actor_private (mc_window);
if ((event & MUTTER_PLUGIN_MINIMIZE) && apriv->tml_minimize)
if (apriv->tml_minimize)
{
clutter_timeline_stop (apriv->tml_minimize);
g_signal_emit_by_name (apriv->tml_minimize, "completed", NULL);
}
if ((event & MUTTER_PLUGIN_MAXIMIZE) && apriv->tml_maximize)
if (apriv->tml_maximize)
{
clutter_timeline_stop (apriv->tml_maximize);
g_signal_emit_by_name (apriv->tml_maximize, "completed", NULL);
}
if ((event & MUTTER_PLUGIN_MAP) && apriv->tml_map)
if (apriv->tml_map)
{
clutter_timeline_stop (apriv->tml_map);
g_signal_emit_by_name (apriv->tml_map, "completed", NULL);
}
if ((event & MUTTER_PLUGIN_DESTROY) && apriv->tml_destroy)
if (apriv->tml_destroy)
{
clutter_timeline_stop (apriv->tml_destroy);
g_signal_emit_by_name (apriv->tml_destroy, "completed", NULL);

View File

@@ -30,6 +30,35 @@
#include "util.h"
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
/* It would make sense to use GSlice here, but until we clean up the
* rest of this file and the internal API to use these functions, we
* leave it using g_malloc()/g_free() for consistency.
*/
MetaRectangle *
meta_rectangle_copy (const MetaRectangle *rect)
{
return g_memdup (rect, sizeof (MetaRectangle));
}
void
meta_rectangle_free (MetaRectangle *rect)
{
g_free (rect);
}
GType
meta_rectangle_get_type (void)
{
static GType type_id = 0;
if (!type_id)
type_id = g_boxed_type_register_static (g_intern_static_string ("MetaRectangle"),
(GBoxedCopyFunc) meta_rectangle_copy,
(GBoxedFreeFunc) meta_rectangle_free);
return type_id;
}
char*
meta_rectangle_to_string (const MetaRectangle *rect,
char *output)

View File

@@ -22,8 +22,7 @@
* 02111-1307, USA.
*/
#define _GNU_SOURCE
#define _SVID_SOURCE /* for gethostname() */
#define _XOPEN_SOURCE /* for kill() */
#include <config.h>
#include "util.h"
@@ -179,36 +178,23 @@ meta_window_delete (MetaWindow *window,
void
meta_window_kill (MetaWindow *window)
{
char buf[257];
meta_topic (META_DEBUG_WINDOW_OPS,
"Killing %s brutally\n",
window->desc);
if (window->wm_client_machine != NULL &&
if (!meta_window_is_remote (window) &&
window->net_wm_pid > 0)
{
if (gethostname (buf, sizeof(buf)-1) == 0)
{
if (strcmp (buf, window->wm_client_machine) == 0)
{
meta_topic (META_DEBUG_WINDOW_OPS,
"Killing %s with kill()\n",
window->desc);
meta_topic (META_DEBUG_WINDOW_OPS,
"Killing %s with kill()\n",
window->desc);
if (kill (window->net_wm_pid, 9) < 0)
meta_topic (META_DEBUG_WINDOW_OPS,
"Failed to signal %s: %s\n",
window->desc, strerror (errno));
}
}
else
{
meta_warning (_("Failed to get hostname: %s\n"),
strerror (errno));
}
if (kill (window->net_wm_pid, 9) < 0)
meta_topic (META_DEBUG_WINDOW_OPS,
"Failed to signal %s: %s\n",
window->desc, strerror (errno));
}
meta_topic (META_DEBUG_WINDOW_OPS,
"Disconnecting %s with XKillClient()\n",
window->desc);

View File

@@ -83,10 +83,11 @@ struct _MetaDisplay
char *name;
Display *xdisplay;
char *hostname;
Window leader_window;
Window timestamp_pinging_window;
/* Pull in all the names of atoms as fields; we will intern them when the
* class is constructed.
*/

View File

@@ -30,6 +30,8 @@
* The display is represented as a MetaDisplay struct.
*/
#define _XOPEN_SOURCE 600 /* for gethostname() */
#include <config.h>
#include "display-private.h"
#include "util.h"
@@ -72,6 +74,7 @@
#include <X11/extensions/Xdamage.h>
#include <X11/extensions/Xfixes.h>
#include <string.h>
#include <unistd.h>
#define GRAB_OP_IS_WINDOW_SWITCH(g) \
(g == META_GRAB_OP_KEYBOARD_TABBING_NORMAL || \
@@ -429,6 +432,7 @@ meta_display_open (void)
GSList *tmp;
int i;
guint32 timestamp;
char buf[257];
/* A list of all atom names, so that we can intern them in one go. */
char *atom_names[] = {
@@ -463,6 +467,11 @@ meta_display_open (void)
*/
the_display->name = g_strdup (XDisplayName (NULL));
the_display->xdisplay = xdisplay;
if (gethostname (buf, sizeof(buf)-1) == 0)
{
buf[sizeof(buf)-1] = '\0';
the_display->hostname = g_strdup (buf);
}
the_display->error_trap_synced_at_last_pop = TRUE;
the_display->error_traps = 0;
the_display->error_trap_handler = NULL;

View File

@@ -40,6 +40,13 @@
#include <X11/Xlib.h> /* must explicitly be included for Solaris; #326746 */
#include <X11/Xutil.h> /* Just for the definition of the various gravities */
#ifdef WITH_VERBOSE_MODE
static void
meta_topic_real_valist (MetaDebugTopic topic,
const char *format,
va_list args);
#endif
#ifdef HAVE_BACKTRACE
#include <execinfo.h>
void
@@ -71,7 +78,7 @@ meta_print_backtrace (void)
}
#endif
static gboolean is_verbose = FALSE;
static gint verbose_topics = 0;
static gboolean is_debugging = FALSE;
static gboolean replace_current = FALSE;
static int no_prefix = 0;
@@ -128,7 +135,7 @@ ensure_logfile (void)
gboolean
meta_is_verbose (void)
{
return is_verbose;
return verbose_topics != 0;
}
void
@@ -141,8 +148,48 @@ meta_set_verbose (gboolean setting)
if (setting)
ensure_logfile ();
#endif
is_verbose = setting;
if (setting)
meta_add_verbose_topic (META_DEBUG_VERBOSE);
else
meta_remove_verbose_topic (META_DEBUG_VERBOSE);
}
/**
* meta_add_verbose_topic:
* @topic: Topic for which logging will be started
*
* Ensure log messages for the given topic @topic
* will be printed.
*/
void
meta_add_verbose_topic (MetaDebugTopic topic)
{
if (verbose_topics == META_DEBUG_VERBOSE)
return;
if (topic == META_DEBUG_VERBOSE)
verbose_topics = META_DEBUG_VERBOSE;
else
verbose_topics |= topic;
}
/**
* meta_remove_verbose_topic:
* @topic: Topic for which logging will be stopped
*
* Stop printing log messages for the given topic @topic. Note
* that this method does not stack with meta_add_verbose_topic();
* i.e. if two calls to meta_add_verbose_topic() for the same
* topic are made, one call to meta_remove_verbose_topic() will
* remove it.
*/
void
meta_remove_verbose_topic (MetaDebugTopic topic)
{
if (topic == META_DEBUG_VERBOSE)
verbose_topics = 0;
else
verbose_topics &= ~topic;
}
gboolean
@@ -250,27 +297,10 @@ void
meta_verbose_real (const char *format, ...)
{
va_list args;
gchar *str;
FILE *out;
g_return_if_fail (format != NULL);
if (!is_verbose)
return;
va_start (args, format);
str = g_strdup_vprintf (format, args);
meta_topic_real_valist (META_DEBUG_VERBOSE, format, args);
va_end (args);
out = logfile ? logfile : stderr;
if (no_prefix == 0)
utf8_fputs ("Window manager: ", out);
utf8_fputs (str, out);
fflush (out);
g_free (str);
}
#endif /* WITH_VERBOSE_MODE */
@@ -324,6 +354,8 @@ topic_name (MetaDebugTopic topic)
return "COMPOSITOR";
case META_DEBUG_EDGE_RESISTANCE:
return "EDGE_RESISTANCE";
case META_DEBUG_VERBOSE:
return "VERBOSE";
}
return "WM";
@@ -331,23 +363,22 @@ topic_name (MetaDebugTopic topic)
static int sync_count = 0;
void
meta_topic_real (MetaDebugTopic topic,
const char *format,
...)
static void
meta_topic_real_valist (MetaDebugTopic topic,
const char *format,
va_list args)
{
va_list args;
gchar *str;
FILE *out;
g_return_if_fail (format != NULL);
if (!is_verbose)
if (verbose_topics == 0
|| (topic == META_DEBUG_VERBOSE && verbose_topics != META_DEBUG_VERBOSE)
|| (!(verbose_topics & topic)))
return;
va_start (args, format);
str = g_strdup_vprintf (format, args);
va_end (args);
out = logfile ? logfile : stderr;
@@ -366,6 +397,18 @@ meta_topic_real (MetaDebugTopic topic,
g_free (str);
}
void
meta_topic_real (MetaDebugTopic topic,
const char *format,
...)
{
va_list args;
va_start (args, format);
meta_topic_real_valist (topic, format, args);
va_end (args);
}
#endif /* WITH_VERBOSE_MODE */
void
@@ -837,5 +880,29 @@ meta_later_remove (guint later_id)
}
}
#ifdef USE_CAIRO_REGION
#include "region.h"
void
meta_region_get_rectangles (MetaRegion *region,
GdkRectangle **rectangles,
int *n_rectangles)
{
int n = cairo_region_num_rectangles (region);
if (n_rectangles != NULL)
*n_rectangles = n;
if (rectangles != NULL)
{
int i;
*rectangles = g_new (cairo_rectangle_int_t, n);
for (i = 0; i < n; i++)
cairo_region_get_rectangle (region, i, *rectangles + i);
}
}
#endif
/* eof util.c */

View File

@@ -3235,10 +3235,6 @@ meta_window_unmaximize (MetaWindow *window,
window->display->grab_anchor_window_pos = target_rect;
}
/* Make sure user_rect is current.
*/
force_save_user_window_placement (window);
if (window->display->compositor)
{
MetaRectangle old_rect, new_rect;
@@ -3268,6 +3264,10 @@ meta_window_unmaximize (MetaWindow *window,
target_rect.height);
}
/* Make sure user_rect is current.
*/
force_save_user_window_placement (window);
recalc_window_features (window);
set_net_wm_state (window);
}
@@ -9115,6 +9115,21 @@ meta_window_get_client_machine (MetaWindow *window)
return window->wm_client_machine;
}
/**
* meta_window_is_remote:
* @window: a #MetaWindow
*
* Returns: %TRUE if this window originates from a host
* different from the one running mutter.
*/
gboolean
meta_window_is_remote (MetaWindow *window)
{
g_return_val_if_fail (META_IS_WINDOW (window), FALSE);
return g_strcmp0 (window->wm_client_machine, window->display->hostname) != 0;
}
/**
* meta_window_is_modal:
* @window: a #MetaWindow

21
src/fix-meta-rectangle.py Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/python
import re
import sys
# gobject-introspection currently has a bug where an alias like
# 'typedef GdkRectangle cairo_rect_int_t' is stored un-namespaced,
# so it is taken to apply to all *Rectangle types. Fixing this
# requires a significant rework of g-ir-scanner, so for the moment
# we fix up the output using this script.
#
# https://bugzilla.gnome.org/show_bug.cgi?id=622609
GDK_RECTANGLE = re.compile(r'Gdk\.Rectangle')
META_RECTANGLE = re.compile(r'MetaRectangle')
i = open(sys.argv[1], 'r')
o = open(sys.argv[2], 'w')
for line in i:
if GDK_RECTANGLE.search(line) and META_RECTANGLE.search(line):
line = re.sub('Gdk.Rectangle', 'Rectangle', line)
o.write(line)

35
src/gdk-compat.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef __GDK_COMPAT_H__
#define __GDK_COMPAT_H__
#include <gdk/gdk.h>
/* Provide a compatibility layer for accessor function introduced
* in GTK+ 2.22 which we need to build without deprecated GDK symbols.
* That way it is still possible to build with GTK+ 2.18 when not
* using GDK_DISABLE_DEPRECATED.
*/
#if !GTK_CHECK_VERSION (2, 21, 1)
#define gdk_window_get_background(w,c) *c = GDK_WINDOW_OBJECT (w)->bg_color
#define gdk_visual_get_depth(v) GDK_VISUAL(v)->depth
#define gdk_window_get_back_pixmap(w,p,r) \
G_STMT_START { \
GdkWindowObject *priv = GDK_WINDOW_OBJECT (w); \
\
if (p != NULL) \
{ \
if (priv->bg_pixmap == GDK_PARENT_RELATIVE_BG || \
priv->bg_pixmap == GDK_NO_BG) \
*p = NULL; \
else \
*p = priv->bg_pixmap; \
} \
\
if (r != NULL) \
*r = (priv->bg_pixmap == GDK_PARENT_RELATIVE_BG); \
} G_STMT_END
#endif /*GTK_CHECK_VERSION */
#endif /* __GDK_COMPAT_H__ */

View File

@@ -24,9 +24,11 @@
#ifndef META_BOXES_H
#define META_BOXES_H
#include <glib.h>
#include <glib-object.h>
#include "common.h"
#define META_TYPE_RECTANGLE (meta_rectangle_get_type ())
typedef struct _MetaRectangle MetaRectangle;
struct _MetaRectangle
{
@@ -70,6 +72,11 @@ struct _MetaEdge
MetaEdgeType edge_type;
};
GType meta_rectangle_get_type (void);
MetaRectangle *meta_rectangle_copy (const MetaRectangle *rect);
void meta_rectangle_free (MetaRectangle *rect);
/* Output functions -- note that the output buffer had better be big enough:
* rect_to_string: RECT_LENGTH
* region_to_string: (RECT_LENGTH+strlen(separator_string)) *

View File

@@ -32,19 +32,6 @@
#include <X11/extensions/Xfixes.h>
#include <gmodule.h>
/*
* FIXME -- move these to a private include
* Required by plugin manager.
*/
#define MUTTER_PLUGIN_MINIMIZE (1<<0)
#define MUTTER_PLUGIN_MAXIMIZE (1<<1)
#define MUTTER_PLUGIN_UNMAXIMIZE (1<<2)
#define MUTTER_PLUGIN_MAP (1<<3)
#define MUTTER_PLUGIN_DESTROY (1<<4)
#define MUTTER_PLUGIN_SWITCH_WORKSPACE (1<<5)
#define MUTTER_PLUGIN_ALL_EFFECTS (~0)
#define MUTTER_TYPE_PLUGIN (mutter_plugin_get_type ())
#define MUTTER_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MUTTER_TYPE_PLUGIN, MutterPlugin))
#define MUTTER_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MUTTER_TYPE_PLUGIN, MutterPluginClass))
@@ -95,20 +82,18 @@ struct _MutterPluginClass
MutterWindow *actor);
void (*switch_workspace) (MutterPlugin *plugin,
const GList **actors,
gint from,
gint to,
MetaMotionDirection direction);
/*
* Called if an effect should be killed prematurely; the plugin must
* Called if an effects should be killed prematurely; the plugin must
* call the completed() callback as if the effect terminated naturally.
* The events parameter is a bitmask indicating which effects are to be
* killed.
*/
void (*kill_effect) (MutterPlugin *plugin,
MutterWindow *actor,
gulong events);
void (*kill_window_effects) (MutterPlugin *plugin,
MutterWindow *actor);
void (*kill_switch_workspace) (MutterPlugin *plugin);
/* General XEvent filter. This is fired *before* mutter itself handles
* an event. Return TRUE to block any further processing.
@@ -227,9 +212,27 @@ struct _MutterPluginVersion
} \
void
mutter_plugin_effect_completed (MutterPlugin *plugin,
MutterWindow *actor,
unsigned long event);
mutter_plugin_switch_workspace_completed (MutterPlugin *plugin);
void
mutter_plugin_minimize_completed (MutterPlugin *plugin,
MutterWindow *actor);
void
mutter_plugin_maximize_completed (MutterPlugin *plugin,
MutterWindow *actor);
void
mutter_plugin_unmaximize_completed (MutterPlugin *plugin,
MutterWindow *actor);
void
mutter_plugin_map_completed (MutterPlugin *plugin,
MutterWindow *actor);
void
mutter_plugin_destroy_completed (MutterPlugin *plugin,
MutterWindow *actor);
ClutterActor *
mutter_plugin_get_overlay_group (MutterPlugin *plugin);

60
src/include/region.h Normal file
View File

@@ -0,0 +1,60 @@
#ifndef META_REGION_H
#define META_REGION_H
#ifndef PACKAGE_NAME
#error "<config.h> must be included before region.h"
#endif
#include <gdk/gdk.h>
#ifdef USE_CAIRO_REGION
#include <cairo.h>
#define MetaRegion cairo_region_t
typedef enum {
META_REGION_OVERLAP_IN = CAIRO_REGION_OVERLAP_IN,
META_REGION_OVERLAP_OUT = CAIRO_REGION_OVERLAP_OUT,
META_REGION_OVERLAP_PART = CAIRO_REGION_OVERLAP_PART
} MetaOverlapType;
#define meta_region_new() cairo_region_create()
#define meta_region_new_from_rectangle(rect) cairo_region_create_rectangle(rect)
#define meta_region_copy(r) cairo_region_copy(r)
#define meta_region_destroy(r) cairo_region_destroy(r)
#define meta_region_is_empty(r) cairo_region_is_empty(r)
#define meta_region_union_rectangle(r, rect) cairo_region_union_rectangle(r, rect)
#define meta_region_subtract(r, other) cairo_region_subtract(r, other)
#define meta_region_translate(r, x, y) cairo_region_translate(r, x, y)
#define meta_region_intersect(r, other) cairo_region_intersect(r, other)
#define meta_region_contains_rectangle(r, rect) cairo_region_contains_rectangle(r, rect)
void meta_region_get_rectangles (MetaRegion *region,
GdkRectangle **rectangles,
int *n_rectangles);
#else
#define MetaRegion GdkRegion
typedef enum {
META_REGION_OVERLAP_IN = GDK_OVERLAP_RECTANGLE_IN,
META_REGION_OVERLAP_OUT = GDK_OVERLAP_RECTANGLE_OUT,
META_REGION_OVERLAP_PART = GDK_OVERLAP_RECTANGLE_PART
} MetaOverlapType;
#define meta_region_new() gdk_region_new()
#define meta_region_new_from_rectangle(rect) gdk_region_rectangle(rect)
#define meta_region_copy(r) gdk_region_copy(r)
#define meta_region_destroy(r) gdk_region_destroy(r)
#define meta_region_is_empty(r) gdk_region_empty(r)
#define meta_region_union_rectangle(r, rect) gdk_region_union_with_rect(r, rect)
#define meta_region_subtract(r, other) gdk_region_subtract(r, other)
#define meta_region_translate(r, x, y) gdk_region_offset(r, x, y)
#define meta_region_intersect(r, other) gdk_region_intersect(r, other)
#define meta_region_contains_rectangle(r, rect) gdk_region_rect_in(r, rect)
#define meta_region_get_rectangles(r, rects, num) gdk_region_get_rectangles(r, rects, num)
#endif /* HAVE_CAIRO_REGION */
#endif /* META_REGION_H */

View File

@@ -51,6 +51,7 @@ void meta_fatal (const char *format,
typedef enum
{
META_DEBUG_VERBOSE = -1,
META_DEBUG_FOCUS = 1 << 0,
META_DEBUG_WORKAREA = 1 << 1,
META_DEBUG_STACK = 1 << 2,
@@ -78,6 +79,8 @@ typedef enum
void meta_topic_real (MetaDebugTopic topic,
const char *format,
...) G_GNUC_PRINTF (2, 3);
void meta_add_verbose_topic (MetaDebugTopic topic);
void meta_remove_verbose_topic (MetaDebugTopic topic);
void meta_push_no_msg_prefix (void);
void meta_pop_no_msg_prefix (void);

View File

@@ -140,6 +140,7 @@ guint meta_window_get_stable_sequence (MetaWindow *window);
guint32 meta_window_get_user_time (MetaWindow *window);
int meta_window_get_pid (MetaWindow *window);
const char *meta_window_get_client_machine (MetaWindow *window);
gboolean meta_window_is_remote (MetaWindow *window);
gboolean meta_window_is_modal (MetaWindow *window);
const char *meta_window_get_mutter_hints (MetaWindow *window);
#endif

View File

@@ -6,7 +6,7 @@ libgnome_serverdir=@libexecdir@
Name: libmutter-private
Description: Mutter internals shared
Requires: gtk+-2.0
Requires: gtk+-@GTK_API_VERSION@
Version: @VERSION@
Libs: -L${libdir} -lmutter-private
Cflags: -I${includedir}/mutter

View File

@@ -309,17 +309,15 @@ response_cb (GtkDialog *dialog,
}
static void
dialog_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
dialog_cb (GtkAction *action,
gpointer callback_data)
{
make_dialog (GTK_WIDGET (callback_data), 1);
}
static void
modal_dialog_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
modal_dialog_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *dialog;
@@ -337,17 +335,15 @@ modal_dialog_cb (gpointer callback_data,
}
static void
no_parent_dialog_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
no_parent_dialog_cb (GtkAction *action,
gpointer callback_data)
{
make_dialog (NULL, 1);
}
static void
utility_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
utility_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *vbox;
@@ -379,9 +375,8 @@ utility_cb (gpointer callback_data,
}
static void
toolbar_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
toolbar_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *vbox;
@@ -404,9 +399,8 @@ toolbar_cb (gpointer callback_data,
}
static void
menu_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
menu_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *vbox;
@@ -429,9 +423,8 @@ menu_cb (gpointer callback_data,
}
static void
override_redirect_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
override_redirect_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *vbox;
@@ -451,9 +444,8 @@ override_redirect_cb (gpointer callback_data,
}
static void
border_only_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
border_only_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *vbox;
@@ -477,9 +469,8 @@ border_only_cb (gpointer callback_data,
#if 0
static void
changing_icon_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
changing_icon_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *vbox;
@@ -545,9 +536,8 @@ focus_label (GtkWidget *window)
}
static void
splashscreen_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
splashscreen_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *image;
@@ -654,10 +644,27 @@ make_dock (int type)
}
static void
dock_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
dock_cb (GtkAction *action,
gpointer callback_data)
{
guint callback_action;
const gchar *name;
name = gtk_action_get_name (action);
if (!g_strcmp0 (name, "Top dock"))
callback_action = DOCK_TOP;
else if (!g_strcmp0 (name, "Bottom dock"))
callback_action = DOCK_BOTTOM;
else if (!g_strcmp0 (name, "Left dock"))
callback_action = DOCK_LEFT;
else if (!g_strcmp0 (name, "Right dock"))
callback_action = DOCK_RIGHT;
else if (!g_strcmp0 (name, "All docks"))
callback_action = DOCK_ALL;
else
return;
if (callback_action == DOCK_ALL)
{
make_dock (DOCK_TOP);
@@ -672,9 +679,8 @@ dock_cb (gpointer callback_data,
}
static void
desktop_cb (gpointer callback_data,
guint callback_action,
GtkWidget *widget)
desktop_cb (GtkAction *action,
gpointer callback_data)
{
GtkWidget *window;
GtkWidget *label;
@@ -700,40 +706,20 @@ desktop_cb (gpointer callback_data,
gtk_widget_show_all (window);
}
static GtkItemFactoryEntry menu_items[] =
{
{ "/_Windows", NULL, NULL, 0, "<Branch>" },
{ "/Windows/tearoff", NULL, NULL, 0, "<Tearoff>" },
{ "/Windows/_Dialog", "<control>d", dialog_cb, 0, NULL },
{ "/Windows/_Modal dialog", NULL, modal_dialog_cb, 0, NULL },
{ "/Windows/_Parentless dialog", NULL, no_parent_dialog_cb, 0, NULL },
{ "/Windows/_Utility", "<control>u", utility_cb, 0, NULL },
{ "/Windows/_Splashscreen", "<control>s", splashscreen_cb, 0, NULL },
{ "/Windows/_Top dock", NULL, dock_cb, DOCK_TOP, NULL },
{ "/Windows/_Bottom dock", NULL, dock_cb, DOCK_BOTTOM, NULL },
{ "/Windows/_Left dock", NULL, dock_cb, DOCK_LEFT, NULL },
{ "/Windows/_Right dock", NULL, dock_cb, DOCK_RIGHT, NULL },
{ "/Windows/_All docks", NULL, dock_cb, DOCK_ALL, NULL },
{ "/Windows/Des_ktop", NULL, desktop_cb, 0, NULL },
{ "/Windows/Me_nu", NULL, menu_cb, 0, NULL },
{ "/Windows/Tool_bar", NULL, toolbar_cb, 0, NULL },
{ "/Windows/Override Redirect", NULL, override_redirect_cb, 0, NULL },
{ "/Windows/Border Only", NULL, border_only_cb, 0, NULL }
};
static void
sleep_cb (GtkWidget *button,
sleep_cb (GtkAction *action,
gpointer data)
{
sleep (1000);
}
static void
toggle_aspect_ratio (GtkWidget *button,
toggle_aspect_ratio (GtkAction *action,
gpointer data)
{
GtkWidget *window;
GdkGeometry geom;
GtkWidget *widget = GTK_WIDGET (data);
if (aspect_on)
{
@@ -748,10 +734,10 @@ toggle_aspect_ratio (GtkWidget *button,
aspect_on = !aspect_on;
window = gtk_widget_get_ancestor (button, GTK_TYPE_WINDOW);
window = gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW);
if (window)
gtk_window_set_geometry_hints (GTK_WINDOW (window),
GTK_WIDGET (data),
widget,
&geom,
GDK_HINT_ASPECT);
@@ -762,7 +748,7 @@ toggle_decorated_cb (GtkWidget *button,
gpointer data)
{
GtkWidget *window;
window = gtk_widget_get_ancestor (button, GTK_TYPE_WINDOW);
window = gtk_widget_get_ancestor (data, GTK_TYPE_WINDOW);
if (window)
gtk_window_set_decorated (GTK_WINDOW (window),
!gtk_window_get_decorated (GTK_WINDOW (window)));
@@ -836,39 +822,102 @@ destroy_cb (GtkWidget *w, gpointer data)
gtk_main_quit ();
}
static void
insert_stock_button (GtkWidget *toolbar,
const gchar *stock_id,
const gchar *text,
GCallback callback,
gpointer user_data)
{
GtkToolItem *button;
static const gchar *menu_item_string =
"<ui>\n"
"<menubar>\n"
"<menu name='Windows' action='Windows'>\n"
"<menuitem name='Dialog' action='Dialog'/>\n"
"<menuitem name='Modal dialog' action='Modal dialog'/>\n"
"<menuitem name='Parentless dialog' action='Parentless dialog'/>\n"
"<menuitem name='Utility' action='Utility'/>\n"
"<menuitem name='Splashscreen' action='Splashscreen'/>\n"
"<menuitem name='Top dock' action='Top dock'/>\n"
"<menuitem name='Bottom dock' action='Bottom dock'/>\n"
"<menuitem name='Left dock' action='Left dock'/>\n"
"<menuitem name='Right dock' action='Right dock'/>\n"
"<menuitem name='All docks' action='All docks'/>\n"
"<menuitem name='Desktop' action='Desktop'/>\n"
"<menuitem name='Menu' action='Menu'/>\n"
"<menuitem name='Toolbar' action='Toolbar'/>\n"
"<menuitem name='Override Redirect' action='Override Redirect'/>\n"
"<menuitem name='Border Only' action='Border Only'/>\n"
"</menu>\n"
"</menubar>\n"
"<toolbar>\n"
"<toolitem name='New' action='New'/>\n"
"<toolitem name='Lock' action='Lock'/>\n"
"<toolitem name='Decorations' action='Decorations'/>\n"
"<toolitem name='Ratio' action='Ratio'/>\n"
"<toolitem name='Quit' action='Quit'/>\n"
"</toolbar>\n"
"</ui>\n";
button = gtk_tool_button_new_from_stock (stock_id);
gtk_tool_item_set_tooltip_text (button, text);
g_signal_connect (G_OBJECT (button),
"clicked",
callback,
user_data);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
button,
-1); /*-1 means append to end of toolbar*/
}
static const GtkActionEntry menu_items[] =
{
{ "Windows", NULL, "_Windows", NULL,
NULL, NULL },
{ "Dialog", NULL, "_Dialog", "<control>d",
NULL, G_CALLBACK (dialog_cb) },
{ "Modal dialog", NULL, "_Modal dialog", NULL,
NULL, G_CALLBACK (modal_dialog_cb) },
{ "Parentless dialog", NULL, "_Parentless dialog", NULL,
NULL, G_CALLBACK (no_parent_dialog_cb) },
{ "Utility", NULL, "_Utility", "<control>u",
NULL, G_CALLBACK (utility_cb) },
{ "Splashscreen", NULL, "_Splashscreen", "<control>s",
NULL, G_CALLBACK (splashscreen_cb) },
{ "Top dock", NULL, "_Top dock", NULL,
NULL, G_CALLBACK (dock_cb) },
{ "Bottom dock", NULL, "_Bottom dock", NULL,
NULL, G_CALLBACK (dock_cb) },
{ "Left dock", NULL, "_Left dock", NULL,
NULL, G_CALLBACK (dock_cb) },
{ "Right dock", NULL, "_Right dock", NULL,
NULL, G_CALLBACK (dock_cb) },
{ "All docks", NULL, "_All docks", NULL,
NULL, G_CALLBACK (dock_cb) },
{ "Desktop", NULL, "Des_ktop", NULL,
NULL, G_CALLBACK (desktop_cb) },
{ "Menu", NULL, "Me_nu", NULL,
NULL, G_CALLBACK (menu_cb) },
{ "Toolbar", NULL, "Tool_bar", NULL,
NULL, G_CALLBACK (toolbar_cb) },
{ "Override Redirect", NULL, "Override Redirect", NULL,
NULL, G_CALLBACK (override_redirect_cb) },
{ "Border Only", NULL, "Border Only", NULL,
NULL, G_CALLBACK (border_only_cb) }
};
static const GtkActionEntry tool_items[] =
{
{ "New", GTK_STOCK_NEW, NULL, NULL,
"Open another one of these windows", G_CALLBACK (do_appwindow) },
{ "Lock", GTK_STOCK_OPEN, NULL, NULL,
"This is a demo button that"
" locks up the demo", G_CALLBACK (sleep_cb) },
{ "Decorations", GTK_STOCK_OPEN, NULL, NULL,
"This is a demo button that "
"toggles window decorations", G_CALLBACK (toggle_decorated_cb) },
{ "Quit", GTK_STOCK_QUIT, NULL, NULL,
"This is a demo button with "
" a 'quit' icon", G_CALLBACK (clicked_toolbar_cb) },
{ "Ratio", GTK_STOCK_OPEN, NULL, NULL,
"This is a demo button that locks the aspect ratio "
"using a hint", G_CALLBACK (toggle_aspect_ratio) }
};
static GtkWidget *
do_appwindow (void)
{
GtkWidget *window;
GtkWidget *table;
GtkWidget *toolbar;
GtkWidget *handlebox;
GtkWidget *statusbar;
GtkWidget *contents;
GtkWidget *sw;
GtkTextBuffer *buffer;
GtkAccelGroup *accel_group;
GtkItemFactory *item_factory;
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
/* Create the toplevel window
*/
@@ -890,25 +939,28 @@ do_appwindow (void)
/* Create the menubar
*/
accel_group = gtk_accel_group_new ();
gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
g_object_unref (accel_group);
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", accel_group);
contents = gtk_text_view_new ();
/* Set up item factory to go away with the window */
g_object_ref_sink (item_factory);
g_object_set_data_full (G_OBJECT (window),
"<main>",
item_factory,
(GDestroyNotify) g_object_unref);
action_group = gtk_action_group_new ("mainmenu");
gtk_action_group_add_actions (action_group,
menu_items,
G_N_ELEMENTS (menu_items),
window);
gtk_action_group_add_actions (action_group,
tool_items,
G_N_ELEMENTS (tool_items),
window);
ui_manager = gtk_ui_manager_new ();
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
/* create menu items */
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
menu_items, window);
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
gtk_table_attach (GTK_TABLE (table),
gtk_item_factory_get_widget (item_factory, "<main>"),
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
/* X direction */ /* Y direction */
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
@@ -936,7 +988,6 @@ do_appwindow (void)
gtk_window_set_default_size (GTK_WINDOW (window),
200, 200);
contents = gtk_text_view_new ();
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (contents),
PANGO_WRAP_WORD);
@@ -945,31 +996,11 @@ do_appwindow (void)
/* Create the toolbar
*/
toolbar = gtk_toolbar_new ();
insert_stock_button (toolbar, GTK_STOCK_NEW,
"Open another one of these windows",
G_CALLBACK (do_appwindow), window);
insert_stock_button (toolbar, GTK_STOCK_OPEN,
"This is a demo button that locks up the demo",
G_CALLBACK (sleep_cb), window);
insert_stock_button (toolbar, GTK_STOCK_OPEN,
"This is a demo button that toggles window decorations",
G_CALLBACK (toggle_decorated_cb), window);
insert_stock_button (toolbar, GTK_STOCK_OPEN,
"This is a demo button that locks the aspect ratio using a hint",
G_CALLBACK (toggle_aspect_ratio), contents);
insert_stock_button (toolbar, GTK_STOCK_QUIT,
"This is a demo button with a 'quit' icon",
G_CALLBACK (clicked_toolbar_cb), window);
handlebox = gtk_handle_box_new ();
gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
gtk_container_add (GTK_CONTAINER (handlebox),
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
gtk_table_attach (GTK_TABLE (table),
handlebox,
@@ -1014,6 +1045,8 @@ do_appwindow (void)
gtk_widget_show_all (window);
g_object_unref (ui_manager);
return window;
}

View File

@@ -51,7 +51,7 @@ static int screen_right_edge = 0;
static int screen_bottom_edge = 0;
static gint
expose_handler (GtkTooltips *tooltips)
expose_handler (GtkWidget *tooltips)
{
gtk_paint_flat_box (gtk_widget_get_style (tip),
gtk_widget_get_window (tip),

View File

@@ -27,6 +27,7 @@
#include <math.h>
#include "boxes.h"
#include "frames.h"
#include "region.h"
#include "util.h"
#include "core.h"
#include "menu.h"
@@ -36,6 +37,7 @@
#include "ui.h"
#include "gtk-compat.h"
#include "gdk-compat.h"
#ifdef HAVE_SHAPE
#include <X11/extensions/shape.h>
@@ -43,8 +45,6 @@
#define DEFAULT_INNER_BUTTON_BORDER 3
static void meta_frames_class_init (MetaFramesClass *klass);
static void meta_frames_init (MetaFrames *frames);
static void meta_frames_destroy (GtkObject *object);
static void meta_frames_finalize (GObject *object);
static void meta_frames_style_set (GtkWidget *widget,
@@ -76,7 +76,7 @@ static void meta_frames_attach_style (MetaFrames *frames,
static void meta_frames_paint_to_drawable (MetaFrames *frames,
MetaUIFrame *frame,
GdkDrawable *drawable,
GdkRegion *region,
MetaRegion *region,
int x_offset,
int y_offset);
@@ -108,32 +108,7 @@ static void invalidate_all_caches (MetaFrames *frames);
static void invalidate_whole_window (MetaFrames *frames,
MetaUIFrame *frame);
static GtkWidgetClass *parent_class = NULL;
GType
meta_frames_get_type (void)
{
static GType frames_type = 0;
if (!frames_type)
{
static const GtkTypeInfo frames_info =
{
"MetaFrames",
sizeof (MetaFrames),
sizeof (MetaFramesClass),
(GtkClassInitFunc) meta_frames_class_init,
(GtkObjectInitFunc) meta_frames_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
frames_type = gtk_type_unique (GTK_TYPE_WINDOW, &frames_info);
}
return frames_type;
}
G_DEFINE_TYPE (MetaFrames, meta_frames, GTK_TYPE_WINDOW);
static GObject *
meta_frames_constructor (GType gtype,
@@ -143,7 +118,7 @@ meta_frames_constructor (GType gtype,
GObject *object;
GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS (parent_class);
gobject_class = G_OBJECT_CLASS (meta_frames_parent_class);
object = gobject_class->constructor (gtype, n_properties, properties);
g_object_set (object,
@@ -164,8 +139,6 @@ meta_frames_class_init (MetaFramesClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
parent_class = g_type_class_peek_parent (class);
gobject_class->constructor = meta_frames_constructor;
gobject_class->finalize = meta_frames_finalize;
object_class->destroy = meta_frames_destroy;
@@ -275,7 +248,7 @@ meta_frames_destroy (GtkObject *object)
}
g_slist_free (winlist);
GTK_OBJECT_CLASS (parent_class)->destroy (object);
GTK_OBJECT_CLASS (meta_frames_parent_class)->destroy (object);
}
static void
@@ -297,7 +270,7 @@ meta_frames_finalize (GObject *object)
g_hash_table_destroy (frames->frames);
g_hash_table_destroy (frames->cache);
G_OBJECT_CLASS (parent_class)->finalize (object);
G_OBJECT_CLASS (meta_frames_parent_class)->finalize (object);
}
typedef struct
@@ -467,7 +440,7 @@ meta_frames_style_set (GtkWidget *widget,
g_hash_table_foreach (frames->frames,
reattach_style_func, frames);
GTK_WIDGET_CLASS (parent_class)->style_set (widget, prev_style);
GTK_WIDGET_CLASS (meta_frames_parent_class)->style_set (widget, prev_style);
}
static void
@@ -705,15 +678,15 @@ meta_frames_unmanage_window (MetaFrames *frames,
static void
meta_frames_realize (GtkWidget *widget)
{
if (GTK_WIDGET_CLASS (parent_class)->realize)
GTK_WIDGET_CLASS (parent_class)->realize (widget);
if (GTK_WIDGET_CLASS (meta_frames_parent_class)->realize)
GTK_WIDGET_CLASS (meta_frames_parent_class)->realize (widget);
}
static void
meta_frames_unrealize (GtkWidget *widget)
{
if (GTK_WIDGET_CLASS (parent_class)->unrealize)
GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
if (GTK_WIDGET_CLASS (meta_frames_parent_class)->unrealize)
GTK_WIDGET_CLASS (meta_frames_parent_class)->unrealize (widget);
}
static MetaUIFrame*
@@ -2035,22 +2008,26 @@ meta_frames_destroy_event (GtkWidget *widget,
static GdkGC *
get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
{
GdkWindowObject *private = (GdkWindowObject *)window;
GdkWindow *parent = gdk_window_get_parent (window);
GdkPixmap *back_pixmap;
gboolean parent_relative;
guint gc_mask = 0;
GdkGCValues gc_values;
if (private->bg_pixmap == GDK_PARENT_RELATIVE_BG && private->parent)
gdk_window_get_back_pixmap (window, &back_pixmap, &parent_relative);
if (parent_relative && parent)
{
return get_bg_gc (GDK_WINDOW (private->parent),
x_offset + private->x,
y_offset + private->y);
gint window_x, window_y;
gdk_window_get_position (window, &window_x, &window_y);
return get_bg_gc (parent,
x_offset + window_x,
y_offset + window_y);
}
else if (private->bg_pixmap &&
private->bg_pixmap != GDK_PARENT_RELATIVE_BG &&
private->bg_pixmap != GDK_NO_BG)
else if (back_pixmap)
{
gc_values.fill = GDK_TILED;
gc_values.tile = private->bg_pixmap;
gc_values.tile = back_pixmap;
gc_values.ts_x_origin = x_offset;
gc_values.ts_y_origin = y_offset;
@@ -2060,9 +2037,11 @@ get_bg_gc (GdkWindow *window, int x_offset, int y_offset)
}
else
{
GdkColor bg_color;
GdkGC *gc = gdk_gc_new (window);
gdk_gc_set_foreground (gc, &(private->bg_color));
gdk_window_get_background (window, &bg_color);
gdk_gc_set_foreground (gc, &bg_color);
return gc;
}
@@ -2090,7 +2069,7 @@ generate_pixmap (MetaFrames *frames,
MetaRectangle rect)
{
GdkRectangle rectangle;
GdkRegion *region;
MetaRegion *region;
GdkPixmap *result;
rectangle.x = rect.x;
@@ -2103,12 +2082,12 @@ generate_pixmap (MetaFrames *frames,
clear_backing (result, frame->window, rectangle.x, rectangle.y);
region = gdk_region_rectangle (&rectangle);
region = meta_region_new_from_rectangle (&rectangle);
meta_frames_paint_to_drawable (frames, frame, result, region,
-rectangle.x, -rectangle.y);
gdk_region_destroy (region);
meta_region_destroy (region);
return result;
}
@@ -2192,11 +2171,11 @@ populate_cache (MetaFrames *frames,
}
static void
clip_to_screen (GdkRegion *region, MetaUIFrame *frame)
clip_to_screen (MetaRegion *region, MetaUIFrame *frame)
{
GdkRectangle frame_area;
GdkRectangle screen_area = { 0, 0, 0, 0 };
GdkRegion *tmp_region;
MetaRegion *tmp_region;
/* Chop off stuff outside the screen; this optimization
* is crucial to handle huge client windows,
@@ -2211,35 +2190,35 @@ clip_to_screen (GdkRegion *region, MetaUIFrame *frame)
META_CORE_GET_SCREEN_HEIGHT, &screen_area.height,
META_CORE_GET_END);
gdk_region_offset (region, frame_area.x, frame_area.y);
meta_region_translate (region, frame_area.x, frame_area.y);
tmp_region = gdk_region_rectangle (&frame_area);
gdk_region_intersect (region, tmp_region);
gdk_region_destroy (tmp_region);
tmp_region = meta_region_new_from_rectangle (&frame_area);
meta_region_intersect (region, tmp_region);
meta_region_destroy (tmp_region);
gdk_region_offset (region, - frame_area.x, - frame_area.y);
meta_region_translate (region, - frame_area.x, - frame_area.y);
}
static void
subtract_from_region (GdkRegion *region, GdkDrawable *drawable,
subtract_from_region (MetaRegion *region, GdkDrawable *drawable,
gint x, gint y)
{
GdkRectangle rect;
GdkRegion *reg_rect;
MetaRegion *reg_rect;
gdk_drawable_get_size (drawable, &rect.width, &rect.height);
rect.x = x;
rect.y = y;
reg_rect = gdk_region_rectangle (&rect);
gdk_region_subtract (region, reg_rect);
gdk_region_destroy (reg_rect);
reg_rect = meta_region_new_from_rectangle (&rect);
meta_region_subtract (region, reg_rect);
meta_region_destroy (reg_rect);
}
static void
cached_pixels_draw (CachedPixels *pixels,
GdkWindow *window,
GdkRegion *region)
GdkWindow *window,
MetaRegion *region)
{
GdkGC *gc;
int i;
@@ -2271,8 +2250,8 @@ meta_frames_expose_event (GtkWidget *widget,
{
MetaUIFrame *frame;
MetaFrames *frames;
GdkRegion *region;
CachedPixels *pixels;
MetaRegion *region;
frames = META_FRAMES (widget);
@@ -2289,7 +2268,7 @@ meta_frames_expose_event (GtkWidget *widget,
populate_cache (frames, frame);
region = gdk_region_copy (event->region);
region = meta_region_copy (event->region);
pixels = get_cache (frames, frame);
@@ -2298,7 +2277,7 @@ meta_frames_expose_event (GtkWidget *widget,
clip_to_screen (region, frame);
meta_frames_paint_to_drawable (frames, frame, frame->window, region, 0, 0);
gdk_region_destroy (region);
meta_region_destroy (region);
return TRUE;
}
@@ -2312,7 +2291,7 @@ static void
meta_frames_paint_to_drawable (MetaFrames *frames,
MetaUIFrame *frame,
GdkDrawable *drawable,
GdkRegion *region,
MetaRegion *region,
int x_offset,
int y_offset)
{
@@ -2445,7 +2424,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
GdkRectangle area, *areas;
int n_areas;
int screen_width, screen_height;
GdkRegion *edges, *tmp_region;
MetaRegion *edges, *tmp_region;
int top, bottom, left, right;
/* Repaint each side of the frame */
@@ -2459,7 +2438,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
META_CORE_GET_SCREEN_HEIGHT, &screen_height,
META_CORE_GET_END);
edges = gdk_region_copy (region);
edges = meta_region_copy (region);
/* Punch out the client area */
@@ -2467,13 +2446,13 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
area.y = top;
area.width = w;
area.height = h;
tmp_region = gdk_region_rectangle (&area);
gdk_region_subtract (edges, tmp_region);
gdk_region_destroy (tmp_region);
tmp_region = meta_region_new_from_rectangle (&area);
meta_region_subtract (edges, tmp_region);
meta_region_destroy (tmp_region);
/* Now draw remaining portion of region */
gdk_region_get_rectangles (edges, &areas, &n_areas);
meta_region_get_rectangles (edges, &areas, &n_areas);
for (i = 0; i < n_areas; i++)
{
@@ -2516,7 +2495,7 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
}
g_free (areas);
gdk_region_destroy (edges);
meta_region_destroy (edges);
}
else
@@ -2579,7 +2558,7 @@ meta_frames_set_window_background (MetaFrames *frames,
/* Set A in ARGB to window_background_alpha, if we have ARGB */
visual = gtk_widget_get_visual (GTK_WIDGET (frames));
if (visual->depth == 32) /* we have ARGB */
if (gdk_visual_get_depth (visual) == 32) /* we have ARGB */
{
color.pixel = (color.pixel & 0xffffff) &
style->window_background_alpha << 24;

View File

@@ -445,12 +445,11 @@ meta_window_menu_new (MetaFrames *frames,
"workspace",
GINT_TO_POINTER (j));
gtk_signal_connect_full (GTK_OBJECT (submi),
g_signal_connect_data (GTK_OBJECT (submi),
"activate",
G_CALLBACK (activate_cb),
NULL,
md,
g_free, FALSE, FALSE);
(GClosureNotify) g_free, 0);
gtk_menu_shell_append (GTK_MENU_SHELL (submenu), submi);
@@ -473,12 +472,11 @@ meta_window_menu_new (MetaFrames *frames,
md->menu = menu;
md->op = menuitem.op;
gtk_signal_connect_full (GTK_OBJECT (mi),
"activate",
G_CALLBACK (activate_cb),
NULL,
md,
g_free, FALSE, FALSE);
g_signal_connect_data (GTK_OBJECT (mi),
"activate",
G_CALLBACK (activate_cb),
md,
(GClosureNotify) g_free, 0);
}
if (mi)

View File

@@ -39,8 +39,6 @@
#include "gtk-compat.h"
static void meta_accel_label_class_init (MetaAccelLabelClass *klass);
static void meta_accel_label_init (MetaAccelLabel *accel_label);
static void meta_accel_label_destroy (GtkObject *object);
static void meta_accel_label_finalize (GObject *object);
static void meta_accel_label_size_request (GtkWidget *widget,
@@ -51,34 +49,7 @@ static gboolean meta_accel_label_expose_event (GtkWidget *widget,
static void meta_accel_label_update (MetaAccelLabel *accel_label);
static int meta_accel_label_get_accel_width (MetaAccelLabel *accel_label);
static GtkLabelClass *parent_class = NULL;
GType
meta_accel_label_get_type (void)
{
static GType accel_label_type = 0;
if (!accel_label_type)
{
static const GtkTypeInfo accel_label_info =
{
"MetaAccelLabel",
sizeof (MetaAccelLabel),
sizeof (MetaAccelLabelClass),
(GtkClassInitFunc) meta_accel_label_class_init,
(GtkObjectInitFunc) meta_accel_label_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
accel_label_type = gtk_type_unique (GTK_TYPE_LABEL, &accel_label_info);
}
return accel_label_type;
}
G_DEFINE_TYPE (MetaAccelLabel, meta_accel_label, GTK_TYPE_LABEL);
static void
meta_accel_label_class_init (MetaAccelLabelClass *class)
@@ -87,8 +58,6 @@ meta_accel_label_class_init (MetaAccelLabelClass *class)
GtkObjectClass *object_class = GTK_OBJECT_CLASS (class);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
parent_class = g_type_class_peek_parent (class);
gobject_class->finalize = meta_accel_label_finalize;
object_class->destroy = meta_accel_label_destroy;
@@ -199,7 +168,7 @@ meta_accel_label_destroy (GtkObject *object)
accel_label->accel_mods = 0;
accel_label->accel_key = 0;
GTK_OBJECT_CLASS (parent_class)->destroy (object);
GTK_OBJECT_CLASS (meta_accel_label_parent_class)->destroy (object);
}
static void
@@ -209,7 +178,7 @@ meta_accel_label_finalize (GObject *object)
g_free (accel_label->accel_string);
G_OBJECT_CLASS (parent_class)->finalize (object);
G_OBJECT_CLASS (meta_accel_label_parent_class)->finalize (object);
}
void
@@ -246,8 +215,8 @@ meta_accel_label_size_request (GtkWidget *widget,
PangoLayout *layout;
gint width;
if (GTK_WIDGET_CLASS (parent_class)->size_request)
GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition);
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->size_request)
GTK_WIDGET_CLASS (meta_accel_label_parent_class)->size_request (widget, requisition);
layout = gtk_widget_create_pango_layout (widget, accel_label->accel_string);
pango_layout_get_pixel_size (layout, &width, NULL);
@@ -291,8 +260,8 @@ meta_accel_label_expose_event (GtkWidget *widget,
allocation.width -= ac_width;
gtk_widget_set_allocation (widget, &allocation);
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event)
GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event (widget, event);
if (direction == GTK_TEXT_DIR_RTL)
{
@@ -330,8 +299,8 @@ meta_accel_label_expose_event (GtkWidget *widget,
}
else
{
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
if (GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event)
GTK_WIDGET_CLASS (meta_accel_label_parent_class)->expose_event (widget, event);
}
}

View File

@@ -28,8 +28,6 @@
#include <gtk/gtk.h>
#include "preview-widget.h"
static void meta_preview_class_init (MetaPreviewClass *klass);
static void meta_preview_init (MetaPreview *preview);
static void meta_preview_size_request (GtkWidget *widget,
GtkRequisition *req);
static void meta_preview_size_allocate (GtkWidget *widget,
@@ -38,32 +36,7 @@ static gboolean meta_preview_expose (GtkWidget *widget,
GdkEventExpose *event);
static void meta_preview_finalize (GObject *object);
static GtkWidgetClass *parent_class;
GType
meta_preview_get_type (void)
{
static GType preview_type = 0;
if (!preview_type)
{
static const GtkTypeInfo preview_info =
{
"MetaPreview",
sizeof (MetaPreview),
sizeof (MetaPreviewClass),
(GtkClassInitFunc) meta_preview_class_init,
(GtkObjectInitFunc) meta_preview_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
preview_type = gtk_type_unique (GTK_TYPE_BIN, &preview_info);
}
return preview_type;
}
G_DEFINE_TYPE (MetaPreview, meta_preview, GTK_TYPE_BIN);
static void
meta_preview_class_init (MetaPreviewClass *class)
@@ -72,7 +45,6 @@ meta_preview_class_init (MetaPreviewClass *class)
GtkWidgetClass *widget_class;
widget_class = (GtkWidgetClass*) class;
parent_class = g_type_class_peek (GTK_TYPE_BIN);
gobject_class->finalize = meta_preview_finalize;
@@ -125,7 +97,7 @@ meta_preview_new (void)
{
MetaPreview *preview;
preview = gtk_type_new (META_TYPE_PREVIEW);
preview = g_object_new (META_TYPE_PREVIEW, NULL);
return GTK_WIDGET (preview);
}
@@ -140,7 +112,7 @@ meta_preview_finalize (GObject *object)
g_free (preview->title);
preview->title = NULL;
G_OBJECT_CLASS (parent_class)->finalize (object);
G_OBJECT_CLASS (meta_preview_parent_class)->finalize (object);
}
static void
@@ -266,7 +238,7 @@ meta_preview_expose (GtkWidget *widget,
}
/* draw child */
return GTK_WIDGET_CLASS (parent_class)->expose_event (widget, event);
return GTK_WIDGET_CLASS (meta_preview_parent_class)->expose_event (widget, event);
}
static void
@@ -483,11 +455,11 @@ meta_preview_get_mini_icon (void)
return default_icon;
}
GdkRegion *
MetaRegion *
meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint new_window_height)
{
GdkRectangle xrect;
GdkRegion *corners_xregion, *window_xregion;
MetaRegion *corners_xregion, *window_xregion;
gint flags;
MetaFrameLayout *fgeom;
MetaFrameStyle *frame_style;
@@ -496,14 +468,14 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
flags = (META_PREVIEW (preview)->flags);
window_xregion = gdk_region_new ();
window_xregion = meta_region_new ();
xrect.x = 0;
xrect.y = 0;
xrect.width = new_window_width;
xrect.height = new_window_height;
gdk_region_union_with_rect (window_xregion, &xrect);
meta_region_union_rectangle (window_xregion, &xrect);
if (preview->theme == NULL)
return window_xregion;
@@ -514,7 +486,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
fgeom = frame_style->layout;
corners_xregion = gdk_region_new ();
corners_xregion = meta_region_new ();
if (fgeom->top_left_corner_rounded_radius != 0)
{
@@ -531,7 +503,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
xrect.width = width;
xrect.height = 1;
gdk_region_union_with_rect (corners_xregion, &xrect);
meta_region_union_rectangle (corners_xregion, &xrect);
}
}
@@ -549,7 +521,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
xrect.width = width;
xrect.height = 1;
gdk_region_union_with_rect (corners_xregion, &xrect);
meta_region_union_rectangle (corners_xregion, &xrect);
}
}
@@ -567,7 +539,7 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
xrect.width = width;
xrect.height = 1;
gdk_region_union_with_rect (corners_xregion, &xrect);
meta_region_union_rectangle (corners_xregion, &xrect);
}
}
@@ -585,12 +557,12 @@ meta_preview_get_clip_region (MetaPreview *preview, gint new_window_width, gint
xrect.width = width;
xrect.height = 1;
gdk_region_union_with_rect (corners_xregion, &xrect);
meta_region_union_rectangle (corners_xregion, &xrect);
}
}
gdk_region_subtract (window_xregion, corners_xregion);
gdk_region_destroy (corners_xregion);
meta_region_subtract (window_xregion, corners_xregion);
meta_region_destroy (corners_xregion);
return window_xregion;
}

View File

@@ -21,7 +21,10 @@
* 02111-1307, USA.
*/
#include <config.h>
#include "theme.h"
#include "region.h"
#include <gtk/gtk.h>
#ifndef META_PREVIEW_WIDGET_H
@@ -77,7 +80,7 @@ void meta_preview_set_frame_flags (MetaPreview *preview,
void meta_preview_set_button_layout (MetaPreview *preview,
const MetaButtonLayout *button_layout);
GdkRegion * meta_preview_get_clip_region (MetaPreview *preview,
MetaRegion * meta_preview_get_clip_region (MetaPreview *preview,
gint new_window_width,
gint new_window_height);

View File

@@ -32,6 +32,7 @@
*/
#include "../core/workspace-private.h"
#include "../core/frame-private.h"
#include "region.h"
#include "draw-workspace.h"
#include <gtk/gtk.h>
#include <math.h>
@@ -459,9 +460,9 @@ display_entry (MetaTabPopup *popup,
TabEntry *te)
{
GdkRectangle rect;
GdkRegion *region;
GdkRegion *inner_region;
GdkWindow *window;
MetaRegion *region;
MetaRegion *inner_region;
if (popup->current_selected_entry)
@@ -498,16 +499,16 @@ display_entry (MetaTabPopup *popup,
gdk_window_set_background (window,
&gtk_widget_get_style (popup->outline_window)->black);
region = gdk_region_rectangle (&rect);
inner_region = gdk_region_rectangle (&te->inner_rect);
gdk_region_subtract (region, inner_region);
gdk_region_destroy (inner_region);
region = meta_region_new_from_rectangle (&rect);
inner_region = meta_region_new_from_rectangle (&te->inner_rect);
meta_region_subtract (region, inner_region);
meta_region_destroy (inner_region);
gdk_window_shape_combine_region (window,
region,
0, 0);
gdk_region_destroy (region);
meta_region_destroy (region);
/* This should piss off gtk a bit, but we don't want to raise
* above the tab popup. So, instead of calling gtk_widget_show,

View File

@@ -70,94 +70,100 @@ static void run_position_expression_timings (void);
static void run_theme_benchmark (void);
static GtkItemFactoryEntry menu_items[] =
static const gchar *menu_item_string =
"<ui>\n"
"<menubar>\n"
"<menu name='Windows' action='Windows'>\n"
"<menuitem name='Dialog' action='Dialog'/>\n"
"<menuitem name='Modal dialog' action='Modal dialog'/>\n"
"<menuitem name='Utility' action='Utility'/>\n"
"<menuitem name='Splashscreen' action='Splashscreen'/>\n"
"<menuitem name='Top dock' action='Top dock'/>\n"
"<menuitem name='Bottom dock' action='Bottom dock'/>\n"
"<menuitem name='Left dock' action='Left dock'/>\n"
"<menuitem name='Right dock' action='Right dock'/>\n"
"<menuitem name='Desktop' action='Desktop'/>\n"
"</menu>\n"
"</menubar>\n"
"<toolbar>\n"
"<separator/>\n"
"<toolitem name='New' action='New'/>\n"
"<toolitem name='Open' action='Open'/>\n"
"<toolitem name='Quit' action='Quit'/>\n"
"<separator/>\n"
"</toolbar>\n"
"</ui>\n";
static GtkActionEntry menu_items[] =
{
{ N_("/_Windows"), NULL, NULL, 0, "<Branch>" },
{ N_("/Windows/tearoff"), NULL, NULL, 0, "<Tearoff>" },
{ N_("/Windows/_Dialog"), "<control>d", NULL, 0, NULL },
{ N_("/Windows/_Modal dialog"), NULL, NULL, 0, NULL },
{ N_("/Windows/_Utility"), "<control>u", NULL, 0, NULL },
{ N_("/Windows/_Splashscreen"), "<control>s", NULL, 0, NULL },
{ N_("/Windows/_Top dock"), NULL, NULL, 0, NULL },
{ N_("/Windows/_Bottom dock"), NULL, NULL, 0, NULL },
{ N_("/Windows/_Left dock"), NULL, NULL, 0, NULL },
{ N_("/Windows/_Right dock"), NULL, NULL, 0, NULL },
{ N_("/Windows/_All docks"), NULL, NULL, 0, NULL },
{ N_("/Windows/Des_ktop"), NULL, NULL, 0, NULL }
{ "Windows", NULL, N_("_Windows"), NULL, NULL, NULL },
{ "Dialog", NULL, N_("_Dialog"), "<control>d", NULL, NULL },
{ "Modal dialog", NULL, N_("_Modal dialog"), NULL, NULL, NULL },
{ "Utility", NULL, N_("_Utility"), "<control>u", NULL, NULL },
{ "Splashscreen", NULL, N_("_Splashscreen"), "<control>s", NULL, NULL },
{ "Top dock", NULL, N_("_Top dock"), NULL, NULL, NULL },
{ "Bottom dock", NULL, N_("_Bottom dock"), NULL, NULL, NULL },
{ "Left dock", NULL, N_("_Left dock"), NULL, NULL, NULL },
{ "Right dock", NULL, N_("_Right dock"), NULL, NULL, NULL },
{ "All docks", NULL, N_("_All docks"), NULL, NULL, NULL },
{ "Desktop", NULL, N_("Des_ktop"), NULL, NULL, NULL }
};
static void
insert_stock_button (GtkWidget *toolbar,
const gchar *stock_id,
const gchar *text)
static GtkActionEntry tool_items[] =
{
GtkToolItem *button;
button = gtk_tool_button_new_from_stock (stock_id);
gtk_tool_item_set_tooltip_text (button, text);
gtk_toolbar_insert (GTK_TOOLBAR (toolbar),
button,
-1); /*-1 means append to end of toolbar*/
return;
}
{ "New", GTK_STOCK_NEW, NULL, NULL,
N_("Open another one of these windows"), NULL },
{ "Open", GTK_STOCK_OPEN, NULL, NULL,
N_("This is a demo button with an 'open' icon"), NULL },
{ "Quit", GTK_STOCK_QUIT, NULL, NULL,
N_("This is a demo button with a 'quit' icon"), NULL }
};
static GtkWidget *
normal_contents (void)
{
GtkWidget *table;
GtkWidget *toolbar;
GtkWidget *handlebox;
GtkWidget *statusbar;
GtkWidget *contents;
GtkWidget *sw;
GtkItemFactory *item_factory;
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
table = gtk_table_new (1, 4, FALSE);
/* Create the menubar
*/
item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>", NULL);
action_group = gtk_action_group_new ("mainmenu");
gtk_action_group_add_actions (action_group,
menu_items,
G_N_ELEMENTS (menu_items),
NULL);
gtk_action_group_add_actions (action_group,
tool_items,
G_N_ELEMENTS (tool_items),
NULL);
gtk_item_factory_set_translate_func(item_factory,
(GtkTranslateFunc)gettext, NULL, NULL);
ui_manager = gtk_ui_manager_new ();
/* Set up item factory to go away */
g_object_ref (item_factory);
g_object_ref_sink (item_factory);
g_object_unref (item_factory);
g_object_set_data_full (G_OBJECT (table),
"<main>",
item_factory,
(GDestroyNotify) g_object_unref);
gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
/* create menu items */
gtk_item_factory_create_items (item_factory, G_N_ELEMENTS (menu_items),
menu_items, NULL);
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
gtk_table_attach (GTK_TABLE (table),
gtk_item_factory_get_widget (item_factory, "<main>"),
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
/* X direction */ /* Y direction */
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
/* Create the toolbar
*/
toolbar = gtk_toolbar_new ();
insert_stock_button (toolbar, GTK_STOCK_NEW,
_("Open another one of these windows"));
insert_stock_button (toolbar, GTK_STOCK_OPEN,
_("This is a demo button with an 'open' icon"));
insert_stock_button (toolbar, GTK_STOCK_QUIT,
_("This is a demo button with a 'quit' icon"));
handlebox = gtk_handle_box_new ();
gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
gtk_container_add (GTK_CONTAINER (handlebox),
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
gtk_table_attach (GTK_TABLE (table),
handlebox,
/* X direction */ /* Y direction */
@@ -203,6 +209,8 @@ normal_contents (void)
gtk_widget_show_all (table);
g_object_unref (ui_manager);
return table;
}

View File

@@ -26,8 +26,6 @@
#include "gtk-compat.h"
static void meta_area_class_init (MetaAreaClass *klass);
static void meta_area_init (MetaArea *area);
static void meta_area_size_request (GtkWidget *widget,
GtkRequisition *req);
static gint meta_area_expose (GtkWidget *widget,
@@ -35,32 +33,7 @@ static gint meta_area_expose (GtkWidget *widget,
static void meta_area_finalize (GObject *object);
static GtkMiscClass *parent_class;
GType
meta_area_get_type (void)
{
static GType area_type = 0;
if (!area_type)
{
static const GtkTypeInfo area_info =
{
"MetaArea",
sizeof (MetaArea),
sizeof (MetaAreaClass),
(GtkClassInitFunc) meta_area_class_init,
(GtkObjectInitFunc) meta_area_init,
/* reserved_1 */ NULL,
/* reserved_2 */ NULL,
(GtkClassInitFunc) NULL,
};
area_type = gtk_type_unique (GTK_TYPE_MISC, &area_info);
}
return area_type;
}
G_DEFINE_TYPE (MetaArea, meta_area, GTK_TYPE_MISC);
static void
meta_area_class_init (MetaAreaClass *class)
@@ -71,7 +44,6 @@ meta_area_class_init (MetaAreaClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
parent_class = g_type_class_peek (gtk_misc_get_type ());
gobject_class->finalize = meta_area_finalize;
@@ -90,7 +62,7 @@ meta_area_new (void)
{
MetaArea *area;
area = gtk_type_new (META_TYPE_AREA);
area = g_object_new (META_TYPE_AREA, NULL);
return GTK_WIDGET (area);
}
@@ -105,7 +77,7 @@ meta_area_finalize (GObject *object)
if (area->dnotify)
(* area->dnotify) (area->user_data);
G_OBJECT_CLASS (parent_class)->finalize (object);
G_OBJECT_CLASS (meta_area_parent_class)->finalize (object);
}
static gint

View File

@@ -32,6 +32,7 @@
#include "theme.h"
#include "inlinepixbufs.h"
#include "gdk-compat.h"
#include <string.h>
#include <stdlib.h>
@@ -475,7 +476,7 @@ get_cmap (GdkPixmap *pixmap)
/* Be sure we aren't going to blow up due to visual mismatch */
if (cmap &&
(gdk_colormap_get_visual (cmap)->depth !=
(gdk_visual_get_depth (gdk_colormap_get_visual (cmap)) !=
gdk_drawable_get_depth (pixmap)))
{
cmap = NULL;