Compare commits

..

4 Commits
3.3.3 ... 3.2.2

Author SHA1 Message Date
Owen W. Taylor
aac695f326 Bump version to 3.2.2
Update NEWS
2012-01-18 10:25:16 -05:00
Adel Gadllah
12a5e1c02b meta-window-actor: Add error traps in meta_window_actor_set_redirected
meta_window_actor_set_redirected makes X calls on the client window
so it need to set error traps.
2012-01-17 16:24:53 -05:00
Jasper St. Pierre
974be1035e util: Fix memory leak in meta_later_remove
We never destroy the later list that's added by meta_later_add.

==4289== 16 bytes in 1 blocks are definitely lost in loss record 1,632 of 7,258
==4289==    at 0x4C2640D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==4289==    by 0x5178D9F: standard_malloc (gmem.c:88)
==4289==    by 0x5178E37: g_malloc (gmem.c:164)
==4289==    by 0x51924B5: g_slice_alloc (gslice.c:842)
==4289==    by 0x5194521: g_slist_insert_sorted_real (gslist.c:900)
==4289==    by 0x519465A: g_slist_insert_sorted (gslist.c:957)
==4289==    by 0x4EA609A: meta_later_add (util.c:876)
==4289==    by 0x4E9C330: meta_screen_queue_workarea_recalc (screen.c:2640)
==4289==    by 0x4E9A360: update_num_workspaces (screen.c:1646)
==4289==    by 0x4E99026: meta_screen_new (screen.c:924)
==4289==    by 0x4E7AB51: meta_display_open (display.c:803)
==4289==    by 0x4E9168E: meta_run (main.c:552)

https://bugzilla.gnome.org/show_bug.cgi?id=642652
2012-01-17 16:23:54 -05:00
krishnababu k
a22add8fbb Updated Telugu translations 2011-10-25 17:36:35 +05:30
55 changed files with 6023 additions and 4539 deletions

4
.gitignore vendored
View File

@@ -19,7 +19,6 @@ libtool
ltmain.sh
missing
.deps
src/50-mutter-windows.xml
src/mutter-wm.desktop
src/mutter.desktop
*.o
@@ -49,8 +48,7 @@ libmutter.pc
mutter
mutter-theme-viewer
mutter.desktop
org.gnome.mutter.gschema.valid
org.gnome.mutter.gschema.xml
mutter.schemas
testasyncgetprop
testboxes
testgradient

View File

@@ -42,10 +42,10 @@ Minimal Building/Testing Environment
build a development version of Metacity -- odds are, you may be able
to build metacity from CVS without building any other modules.
As long as you have gtk+ >= 3.0 and GIO >= 2.25.10 with your distro
(gtk+ >= 2.6 if you manually revert the change from bug 348633), you
should be able to install your distro's development packages
(e.g. gtk2-devel, glib-devel, startup-notification-devel on
As long as you have gtk+ >= 2.10 and GConf with your distro (gtk+ >=
2.6 if you manually revert the change from bug 348633), you should
be able to install your distro's development packages
(e.g. gtk2-devel, GConf2-devel, startup-notification-devel on
Fedora; also, remember to install the gnome-common package which is
needed for building cvs versions of Gnome modules like Metacity) as
well as the standard development tools (gcc, autoconf, automake,

48
NEWS
View File

@@ -1,47 +1,13 @@
3.3.3
3.2.2
=====
* Add keybindings for tiling to left or right [Florian; #648700]
* Support GTK+'s hide-titlebar-when-maximized hint [Florian; #665617]
* Load _DBUS_APPLICATION_ID, _DBUS_UNIQUE_NAME, _DBUS_OBJECT_PATH
property [Colin, Ryan; #664851]
* Handle changes to workspaces-only-on-primary GSetting [Florian; #664853]
* Don't use the Clutter default stage [Jasper; #664028]
* Fix compilation with --disable-introspection [Lionel; #661871]
* Fix problem where stage could end up mis-sized on startup with
multiple monitors [Lionel]
* Misc bug fixes [Adel, Lionel, Jasper; #666015]
* Fix a crash that could occur when unredirected full-screen windows [Adel]
* Fix a memory leak [Jasper; #642652]
Contributors:
Adel Gadllah, Lionel Landwerlin, Florian Müllner, Jasper St. Pierre
Jasper St. Pierre, Adel Gadllah
Translations:
Daniel Mustieles [es], Yaron Shahrabani [he], Kjartan Maraas [nb],
Matej Urbančič [sk], Muhammet Kara [tr]
3.3.2
=====
* Move from GConf to GSettings for preferences [Florian; #635378]
* Add meta_display_add_keybinding()/meta_display_remove_keybinding()
to allow creating new keybindings at runtime [Florian; #663428]
* Add suport for new _NET_WM_STATE_FOCUSED atom in _NET_WM_STATE
to allow applications to draw unfocused windows differently
[Rui; #661427]
* Add meta_window_move_resize_frame() to allow specifying the
size and position of a window via the outside dimensions of the
window frame.
* Don't activate window tiling when moving in snap mode
[Rui; #662270]
* Remove the ability to resize a window from the inner edge of
the titlebar [Jasper; #660129]
* Fix for deprecations in GTK+ [Jasper, Rico; #662574, #662895]
* Misc bug fixes [Jasper, Rico, Rui; #662895, #642652, #660941, #662225]
Contributors:
Tim Cuthbertson, Rui Matos, Florian Müllner, Jasper St. Pierre, Rico Tzschichholz
Translations:
Jorge González (es), Kjartan Maraas (nb), Krishnababu Krothapalli (te), Nguyễn Thái Ngọc Duy (vi)
Translations
Krishnababu Krothapalli [te], Nguyễn Thái Ngọc Duy [vi]
3.2.1
=====
@@ -61,7 +27,7 @@ Translations:
* Misc bug fixes [Adel, Jasper, Rui; #660464, #660854, #662053]
Contributors:
Matthias Clasen, Sandro Mani, Rui Matos, Jasper St. Pierre, Owen Taylor
Matthias Clasen, Adel Gadllah, Sandro Mani, Rui Matos, Jasper St. Pierre, Owen Taylor
Translations:
Tommi Vainikainen [fi], Miroslav Nikolić [sr, sr@latin], Muhammet Kara [tr]

29
README
View File

@@ -18,7 +18,8 @@ COMPILING MUTTER
You need GTK+ 2.2. For startup notification to work you need
libstartup-notification at
http://www.freedesktop.org/software/startup-notification/ or on the
GNOME ftp site.
GNOME ftp site. You also need GConf 1.2 (unless building a funky
extra-small embedded metacity with --disable-gconf, see below).
You need Clutter 1.0. You need gobject-introspection 0.6.3.
REPORTING BUGS AND SUBMITTING PATCHES
@@ -58,24 +59,25 @@ MUTTER FEATURES
and should work with KWin, fvwm2, and other EWMH-compliant WMs.)
- Has a simple theme system and a couple of extra themes come with it.
Change themes via gsettings:
gsettings set org.gnome.desktop.wm.preferences theme Crux
gsettings set org.gnome.desktop.wm.preferences theme Gorilla
gsettings set org.gnome.desktop.wm.preferences theme Atlanta
gsettings set org.gnome.desktop.wm.preferences theme Bright
Change themes via gconf-editor or gconftool or GNOME themes control
panel:
gconftool-2 --type=string --set /apps/metacity/general/theme Crux
gconftool-2 --type=string --set /apps/metacity/general/theme Gorilla
gconftool-2 --type=string --set /apps/metacity/general/theme Atlanta
gconftool-2 --type=string --set /apps/metacity/general/theme Bright
See theme-format.txt for docs on the theme format. Use
metacity-theme-viewer to preview themes.
- Change number of workspaces via gsettings:
gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
- Change number of workspaces via gconf-editor or gconftool:
gconftool-2 --type=int --set /apps/metacity/general/num_workspaces 5
Can also change workspaces from GNOME 2 pager.
- Change focus mode:
gsettings set org.gnome.desktop.wm.preferences focus-mode mouse
gsettings set org.gnome.desktop.wm.preferences focus-mode sloppy
gsettings set org.gnome.desktop.wm.preferences focus-mode click
gconftool-2 --type=string --set /apps/metacity/general/focus_mode mouse
gconftool-2 --type=string --set /apps/metacity/general/focus_mode sloppy
gconftool-2 --type=string --set /apps/metacity/general/focus_mode click
- Global keybinding defaults include:
@@ -90,9 +92,10 @@ MUTTER FEATURES
Change keybindings for example:
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 '[<Alt>F1]'
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
Also try the GNOME keyboard shortcuts control panel.
Also try the GNOME keyboard shortcuts control panel, or
gconf-editor.
- Window keybindings:

View File

@@ -1,8 +1,8 @@
AC_PREREQ(2.50)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [3])
m4_define([mutter_micro_version], [3])
m4_define([mutter_minor_version], [2])
m4_define([mutter_micro_version], [2])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
@@ -61,14 +61,21 @@ AC_CHECK_SIZEOF(__int64)
## byte order
AC_C_BIGENDIAN
GTK_MIN_VERSION=3.3.3
GIO_MIN_VERSION=2.25.10
GTK_MIN_VERSION=2.91.7
CANBERRA_GTK=libcanberra-gtk3
CANBERRA_GTK_VERSION=0.26
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION gio-2.0 >= $GIO_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0 gsettings-desktop-schemas >= 3.3.0"
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0"
GLIB_GSETTINGS
AC_ARG_ENABLE(gconf,
AC_HELP_STRING([--disable-gconf],
[disable gconf usage, for embedded/size-sensitive non-GNOME builds]),,
enable_gconf=yes)
if test x$enable_gconf = xyes; then
AC_DEFINE(HAVE_GCONF,1,[Build with gconf support])
MUTTER_PC_MODULES="$MUTTER_PC_MODULES gconf-2.0 >= 1.2.0"
fi
AC_ARG_ENABLE(verbose-mode,
AC_HELP_STRING([--disable-verbose-mode],
@@ -393,6 +400,18 @@ fi
AC_SUBST(GDK_PIXBUF_CSOURCE)
if test x$enable_gconf = xyes; then
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi
AM_GCONF_SOURCE_2
else
GCONF_SCHEMAS_INSTALL_TRUE='#'
GCONF_SCHEMAS_INSTALL_FALSE=
fi
AC_PATH_PROG(ZENITY, zenity, no)
if test x"$ZENITY" = xno; then
AC_MSG_ERROR([zenity not found in your path - needed for dialogs])
@@ -492,6 +511,13 @@ po/Makefile.in
AC_OUTPUT
if test x$enable_gconf = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without GConf. This means there's no"
echo "*** way to change prefs except hacking source code."
echo "*** This is intended for embedded systems etc., not for normal use."
fi
if test x$enable_verbose_mode = xno; then
echo "*** WARNING WARNING WARNING WARNING WARNING"
echo "*** Building without verbose mode"
@@ -508,6 +534,7 @@ mutter-$VERSION
source code location: ${srcdir}
compiler: ${CC}
GConf: ${enable_gconf}
XFree86 Xinerama: ${use_xfree_xinerama}
Solaris Xinerama: ${use_solaris_xinerama}
Startup notification: ${have_startup_notification}

View File

@@ -46,13 +46,13 @@ because the original program does not have a manual page.
Restart \fBmutter\fP(1) which is running.
.TP
.B reload-theme
Reload a theme which is specified on gsettings database.
Reload a theme which is specified on gconf database.
.TP
.B enable-keybindings
Enable all of keybindings which is specified on gsettings database.
Enable all of keybindings which is specified on gconf database.
.TP
.B disable-keybindings
Disable all of keybindings which is specified on gsettings database.
Disable all of keybindings which is specified on gconf database.
.SH SEE ALSO
.BR mutter (1)
.SH AUTHOR

View File

@@ -51,7 +51,7 @@ Print the version number.
.B \-?, \-\-help
Show summary of options.
.SH CONFIGURATION
\fBmutter\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gsettings.
\fBmutter\fP configuration can be found under \fIPreferences\fP->\fIWindows\fP and \fIPreferences\fP->\fIKeyboard Shortcuts\fP on the menu-panel. Advanced configuration can be achieved directly through gconf editing (gconf-editor or gconftool-2).
.SH SEE ALSO
.BR mutter-message (1)
.SH AUTHOR

View File

@@ -1,7 +1,7 @@
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
src/50-mutter-windows.xml.in
src/compositor/compositor.c
src/core/all-keybindings.h
src/core/bell.c
src/core/core.c
src/core/delete.c
@@ -19,7 +19,7 @@ src/core/window-props.c
src/core/xprops.c
src/mutter.desktop.in
src/mutter-wm.desktop.in
src/org.gnome.mutter.gschema.xml.in
src/mutter.schemas.in
src/tools/mutter-message.c
src/ui/frames.c
src/ui/menu.c

967
po/es.po

File diff suppressed because it is too large Load Diff

1417
po/he.po

File diff suppressed because it is too large Load Diff

697
po/nb.po

File diff suppressed because it is too large Load Diff

783
po/sl.po

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: metacity.gnome-2-26\n"
"Report-Msgid-Bugs-To: http://bugzilla.gnome.org/enter_bug.cgi?"
"product=mutter&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2011-10-24 21:07+0000\n"
"POT-Creation-Date: 2011-10-18 19:39+0000\n"
"PO-Revision-Date: 2009-03-11 13:29+0530\n"
"Last-Translator: A Mohan Vamsee <mohan.arza@ymail.com>\n"
"Language-Team: Telugu <indlinux-telugu@lists.sourceforge.net>\n"

981
po/tr.po

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<KeyListEntries schema="org.gnome.mutter.keybindings"
group="system"
_name="Windows"
wm_name="Mutter"
package="mutter">
<KeyListEntry name="toggle-tiled-left"
_description="View split on left"/>
<KeyListEntry name="toggle-tiled-right"
_description="View split on right"/>
</KeyListEntries>

View File

@@ -27,6 +27,8 @@ INCLUDES= \
-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
mutter_built_sources = \
mutter-marshal.h \
mutter-marshal.c \
mutter-enum-types.h \
mutter-enum-types.c
@@ -150,6 +152,7 @@ libmutter_la_SOURCES = \
meta/theme.h \
ui/theme-private.h \
ui/ui.c \
core/all-keybindings.h \
meta/preview-widget.h \
ui/preview-widget.c \
$(mutter_built_sources)
@@ -223,7 +226,7 @@ typelib_DATA = Meta-$(api_version).typelib
INTROSPECTION_GIRS = Meta-$(api_version).gir
Meta-$(api_version).gir: libmutter.la
@META_GIR@_INCLUDES = GObject-2.0 GDesktopEnums-3.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
@META_GIR@_INCLUDES = GObject-2.0 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
@META_GIR@_PACKAGES = clutter-1.0 gtk+-3.0
@META_GIR@_CFLAGS = $(INCLUDES)
@META_GIR@_LIBS = libmutter.la
@@ -259,17 +262,20 @@ wmproperties_in_files=mutter-wm.desktop.in
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
wmproperties_DATA = $(wmproperties_files)
xmldir = @GNOME_KEYBINDINGS_KEYSDIR@
xml_in_files = \
50-mutter-windows.xml.in
xml_DATA = $(xml_in_files:.xml.in=.xml)
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = mutter.schemas.in
schema_DATA = $(schema_in_files:.schemas.in=.schemas)
gsettings_SCHEMAS = org.gnome.mutter.gschema.xml
@INTLTOOL_XML_NOMERGE_RULE@
@GSETTINGS_RULES@
convertdir = $(datadir)/GConf/gsettings
convert_DATA = mutter-schemas.convert
@INTLTOOL_SCHEMAS_RULE@
if GCONF_SCHEMAS_INSTALL
install-data-local:
GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) $(GCONFTOOL) --makefile-install-rule $(schema_DATA)
else
install-data-local:
endif
IMAGES=stock_maximize.png stock_minimize.png stock_delete.png
VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
@@ -281,8 +287,7 @@ CLEANFILES = \
inlinepixbufs.h \
mutter.desktop \
mutter-wm.desktop \
org.gnome.mutter.gschema.xml \
$(xml_DATA) \
mutter.schemas \
$(mutter_built_sources) \
$(typelib_DATA) \
$(gir_DATA)
@@ -299,18 +304,37 @@ EXTRA_DIST=$(desktopfiles_files) \
$(IMAGES) \
$(desktopfiles_in_files) \
$(wmproperties_in_files) \
$(xml_in_files) \
org.gnome.mutter.gschema.xml.in \
mutter-schemas.convert \
$(schema_in_files) \
libmutter.pc.in \
mutter-plugins.pc.in \
mutter-enum-types.h.in \
mutter-enum-types.c.in
mutter-enum-types.c.in \
mutter-marshal.list
BUILT_SOURCES += $(mutter_built_sources)
MUTTER_STAMP_FILES = stamp-mutter-enum-types.h
MUTTER_STAMP_FILES = stamp-mutter-marshal.h stamp-mutter-enum-types.h
CLEANFILES += $(MUTTER_STAMP_FILES)
mutter-marshal.h: stamp-mutter-marshal.h
@true
stamp-mutter-marshal.h: Makefile mutter-marshal.list
$(AM_V_GEN) $(GLIB_GENMARSHAL) \
--prefix=_mutter_marshal \
--header \
$(srcdir)/mutter-marshal.list > xgen-tmh && \
(cmp -s xgen-tmh mutter-marshal.h || cp -f xgen-tmh mutter-marshal.h) && \
rm -f xgen-tmh && \
echo timestamp > $(@F)
mutter-marshal.c: Makefile mutter-marshal.list
$(AM_V_GEN) (echo "#include \"mutter-marshal.h\"" ; \
$(GLIB_GENMARSHAL) \
--prefix=_mutter_marshal \
--body \
$(srcdir)/mutter-marshal.list ) > xgen-tmc && \
cp -f xgen-tmc mutter-marshal.c && \
rm -f xgen-tmc
mutter-enum-types.h: stamp-mutter-enum-types.h Makefile
@true
stamp-mutter-enum-types.h: $(libmutterinclude_base_headers) mutter-enum-types.h.in

View File

@@ -515,15 +515,13 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
meta_screen_set_cm_selection (screen);
info->stage = clutter_stage_new ();
info->stage = clutter_stage_get_default ();
meta_screen_get_size (screen, &width, &height);
clutter_actor_realize (info->stage);
clutter_actor_set_size (info->stage, width, height);
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
XResizeWindow (xdisplay, xwin, width, height);
event_mask = FocusChangeMask |
ExposureMask |
EnterWindowMask | LeaveWindowMask |
@@ -1141,18 +1139,12 @@ meta_compositor_sync_screen_size (MetaCompositor *compositor,
guint width,
guint height)
{
MetaDisplay *display = meta_screen_get_display (screen);
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
Display *xdisplay;
Window xwin;
MetaCompScreen *info = meta_screen_get_compositor_data (screen);
DEBUG_TRACE ("meta_compositor_sync_screen_size\n");
g_return_if_fail (info);
xdisplay = meta_display_get_xdisplay (display);
xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (info->stage));
XResizeWindow (xdisplay, xwin, width, height);
clutter_actor_set_size (info->stage, width, height);
meta_background_actor_screen_size_changed (screen);

View File

@@ -360,7 +360,7 @@ meta_shadow_paint (MetaShadow *shadow,
* @window_height: actual height of the region to paint a shadow for
*
* Computes the bounds of the pixels that will be affected by
* meta_shadow_paint()
* meta_shadow_paints()
*/
void
meta_shadow_get_bounds (MetaShadow *shadow,
@@ -442,7 +442,8 @@ meta_shadow_factory_class_init (MetaShadowFactoryClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}

View File

@@ -198,9 +198,6 @@ meta_texture_tower_update_area (MetaTextureTower *tower,
g_return_if_fail (tower != NULL);
if (tower->textures[0] == COGL_INVALID_HANDLE)
return;
texture_width = cogl_texture_get_width (tower->textures[0]);
texture_height = cogl_texture_get_height (tower->textures[0]);

View File

@@ -232,13 +232,15 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
g_signal_new ("position-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
signals[SIZE_CHANGED] =
g_signal_new ("size-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
@@ -826,9 +828,9 @@ meta_window_actor_get_x_window (MetaWindowActor *self)
/**
* meta_window_actor_get_meta_window:
*
* Gets the #MetaWindow object that the the #MetaWindowActor is displaying
* Gets the MetaWindow object that the the MetaWindowActor is displaying
*
* Return value: (transfer none): the displayed #MetaWindow
* Return value: (transfer none): the displayed MetaWindow
*/
MetaWindow *
meta_window_actor_get_meta_window (MetaWindowActor *self)
@@ -841,7 +843,7 @@ meta_window_actor_get_meta_window (MetaWindowActor *self)
*
* Gets the ClutterActor that is used to display the contents of the window
*
* Return value: (transfer none): the #ClutterActor for the contents
* Return value: (transfer none): the ClutterActor for the contents
*/
ClutterActor *
meta_window_actor_get_texture (MetaWindowActor *self)
@@ -956,9 +958,6 @@ meta_window_actor_damage_all (MetaWindowActor *self)
"pixmap-height", &pixmap_height,
NULL);
if (!priv->mapped || priv->needs_pixmap)
return;
clutter_x11_texture_pixmap_update_area (texture_x11,
0,
0,
@@ -1811,7 +1810,7 @@ meta_window_actor_set_visible_region_beneath (MetaWindowActor *self,
* @self: a #MetaWindowActor
*
* Unsets the regions set by meta_window_actor_reset_visible_region() and
* meta_window_actor_reset_visible_region_beneath()
*meta_window_actor_reset_visible_region_beneath()
*/
void
meta_window_actor_reset_visible_regions (MetaWindowActor *self)
@@ -2035,8 +2034,6 @@ meta_window_actor_process_damage (MetaWindowActor *self,
return;
}
if (!priv->mapped || priv->needs_pixmap)
return;
clutter_x11_texture_pixmap_update_area (texture_x11,
event->area.x,

View File

@@ -101,25 +101,6 @@ actor_is_untransformed (ClutterActor *actor,
return TRUE;
}
#if CLUTTER_CHECK_VERSION(1, 9, 0)
#define has_effects clutter_actor_has_effects
#else
static gboolean
has_effects(ClutterActor *actor)
{
GList *list;
gboolean ret;
list = clutter_actor_get_effects (actor);
ret = list != NULL;
g_list_free (list);
return ret;
}
#endif
static void
meta_window_group_paint (ClutterActor *actor)
{
@@ -127,7 +108,7 @@ meta_window_group_paint (ClutterActor *actor)
cairo_region_t *unredirected_window_region = NULL;
ClutterActor *stage;
cairo_rectangle_int_t visible_rect, unredirected_rect;
GList *children, *l;
GList *children, *l, *effects;
MetaWindowGroup *window_group = META_WINDOW_GROUP (actor);
MetaCompScreen *info = meta_screen_get_compositor_data (window_group->screen);
@@ -180,13 +161,16 @@ meta_window_group_paint (ClutterActor *actor)
* as well for the same reason, but omitted for simplicity in the
* hopes that no-one will do that.
*/
if (has_effects (l->data))
continue;
if ((effects = clutter_actor_get_effects (l->data)) != NULL)
{
g_list_free (effects);
continue;
}
if (META_IS_WINDOW_ACTOR (l->data))
{
MetaWindowActor *window_actor = l->data;
int x, y;
gboolean x, y;
if (!actor_is_untransformed (CLUTTER_ACTOR (window_actor), &x, &y))
continue;

400
src/core/all-keybindings.h Normal file
View File

@@ -0,0 +1,400 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2008 Thomas Thurman
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
/**
* A list of screen keybinding information.
*
* Each action which can have a keystroke bound to it is listed below.
* To use this file, define keybind() to be a seven-argument macro (you can
* throw any of the arguments you please away), include this file,
* and then undefine the macro again.
*
* (If you aren't familiar with this technique, sometimes called "x-macros",
* see DDJ of May 2001: <http://www.ddj.com/cpp/184401387>.)
*
* This makes it possible to keep all information about all the keybindings
* in the same place. The only exception is the code to run when an action
* is actually invoked; while we *could* have put that in this file, it would
* have made debugging ridiculously difficult. Instead, each action should
* have a corresponding static function named handle_<name>() in
* keybindings.c.
*
* The arguments to keybind() are:
* 1) the name of the binding; a bareword identifier
* (it's fine if it happens to clash with a C reserved word)
* 2) the name of the function which implements it.
* Clearly we could have guessed this from the binding very often,
* but we choose to write it in full for the benefit of grep.
* 3) an integer parameter to pass to the handler
* 4) a set of boolean flags, ORed together:
* BINDING_PER_WINDOW - this is a window-based binding.
* It is only valid if there is a
* current window, and will operate in
* some way on that window.
* BINDING_REVERSES - the binding can reverse if you hold down Shift
* BINDING_IS_REVERSED - the same, but the senses are reversed from the
* handler's point of view (let me know if I should
* explain this better)
* or 0 if no flag applies.
*
* 5) a string representing the default binding.
* If this is NULL, the action is unbound by default.
* Please use NULL and not "disabled".
* 6) a short description.
* It must be marked translatable (i.e. inside "_(...)").
*
* Don't try to do XML entity escaping anywhere in the strings.
*/
#ifndef keybind
#error "keybind () must be defined when you include screen-bindings.h"
#endif
/***********************************/
#ifndef _BINDINGS_DEFINED_CONSTANTS
#define _BINDINGS_DEFINED_CONSTANTS 1
#define BINDING_PER_WINDOW 0x01
#define BINDING_REVERSES 0x02
#define BINDING_IS_REVERSED 0x04
#endif /* _BINDINGS_DEFINED_CONSTANTS */
/***********************************/
/* convenience, since in this file they must always be set together */
#define REVERSES_AND_REVERSED (BINDING_REVERSES | BINDING_IS_REVERSED)
keybind (switch_to_workspace_1, handle_switch_to_workspace, 0, 0, NULL,
_("Switch to workspace 1"))
keybind (switch_to_workspace_2, handle_switch_to_workspace, 1, 0, NULL,
_("Switch to workspace 2"))
keybind (switch_to_workspace_3, handle_switch_to_workspace, 2, 0, NULL,
_("Switch to workspace 3"))
keybind (switch_to_workspace_4, handle_switch_to_workspace, 3, 0, NULL,
_("Switch to workspace 4"))
keybind (switch_to_workspace_5, handle_switch_to_workspace, 4, 0, NULL,
_("Switch to workspace 5"))
keybind (switch_to_workspace_6, handle_switch_to_workspace, 5, 0, NULL,
_("Switch to workspace 6"))
keybind (switch_to_workspace_7, handle_switch_to_workspace, 6, 0, NULL,
_("Switch to workspace 7"))
keybind (switch_to_workspace_8, handle_switch_to_workspace, 7, 0, NULL,
_("Switch to workspace 8"))
keybind (switch_to_workspace_9, handle_switch_to_workspace, 8, 0, NULL,
_("Switch to workspace 9"))
keybind (switch_to_workspace_10, handle_switch_to_workspace, 9, 0, NULL,
_("Switch to workspace 10"))
keybind (switch_to_workspace_11, handle_switch_to_workspace, 10, 0, NULL,
_("Switch to workspace 11"))
keybind (switch_to_workspace_12, handle_switch_to_workspace, 11, 0, NULL,
_("Switch to workspace 12"))
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of keybind() throws them away, you don't need to include
* workspace.h, of course.
*/
keybind (switch_to_workspace_left, handle_switch_to_workspace,
META_MOTION_LEFT, 0, "<Control><Alt>Left",
_("Switch to workspace on the left of the current workspace"))
keybind (switch_to_workspace_right, handle_switch_to_workspace,
META_MOTION_RIGHT, 0, "<Control><Alt>Right",
_("Switch to workspace on the right of the current workspace"))
keybind (switch_to_workspace_up, handle_switch_to_workspace,
META_MOTION_UP, 0, "<Control><Alt>Up",
_("Switch to workspace above the current workspace"))
keybind (switch_to_workspace_down, handle_switch_to_workspace,
META_MOTION_DOWN, 0, "<Control><Alt>Down",
_("Switch to workspace below the current workspace"))
/***********************************/
/* The ones which have inverses. These can't be bound to any keystroke
* containing Shift because Shift will invert their "backward" state.
*
* TODO: "NORMAL" and "DOCKS" should be renamed to the same name as their
* action, for obviousness.
*
* TODO: handle_switch and handle_cycle should probably really be the
* same function checking a bit in the parameter for difference.
*/
keybind (switch_group, handle_switch, META_TAB_LIST_GROUP,
BINDING_REVERSES, "<Alt>Above_Tab",
_("Move between windows of an application, using a popup window"))
keybind (switch_group_backward, handle_switch, META_TAB_LIST_GROUP,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows of an application, "
"using a popup window"))
keybind (switch_windows, handle_switch, META_TAB_LIST_NORMAL,
BINDING_REVERSES, "<Alt>Tab",
_("Move between windows, using a popup window"))
keybind (switch_windows_backward, handle_switch, META_TAB_LIST_NORMAL,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows, using a popup window"))
keybind (switch_panels, handle_switch, META_TAB_LIST_DOCKS,
BINDING_REVERSES, "<Control><Alt>Tab",
_("Move between panels and the desktop, using a popup window"))
keybind (switch_panels_backward, handle_switch, META_TAB_LIST_DOCKS,
REVERSES_AND_REVERSED, NULL,
_("Move backward between panels and the desktop, "
"using a popup window"))
keybind (cycle_group, handle_cycle, META_TAB_LIST_GROUP,
BINDING_REVERSES, "<Alt>F6",
_("Move between windows of an application immediately"))
keybind (cycle_group_backward, handle_cycle, META_TAB_LIST_GROUP,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows of an application immediately"))
keybind (cycle_windows, handle_cycle, META_TAB_LIST_NORMAL,
BINDING_REVERSES, "<Alt>Escape",
_("Move between windows immediately"))
keybind (cycle_windows_backward, handle_cycle, META_TAB_LIST_NORMAL,
REVERSES_AND_REVERSED, NULL,
_("Move backward between windows immediately"))
keybind (cycle_panels, handle_cycle, META_TAB_LIST_DOCKS,
BINDING_REVERSES, "<Control><Alt>Escape",
_("Move between panels and the desktop immediately"))
keybind (cycle_panels_backward, handle_cycle, META_TAB_LIST_DOCKS,
REVERSES_AND_REVERSED, NULL,
_("Move backward between panels and the desktop immediately"))
/***********************************/
/* These two are special pseudo-bindings that are provided for allowing
* custom handlers, but will never be bound to a key. While a tab
* grab is in effect, they are invoked for releasing the primary modifier
* or pressing some unbound key, respectively.
*/
keybind (tab_popup_select, handle_tab_popup_select, 0, 0, NULL,
"Select window from tab popup")
keybind (tab_popup_cancel, handle_tab_popup_cancel, 0, 0, NULL,
"Cancel tab popup")
/***********************************/
keybind (show_desktop, handle_show_desktop, 0, 0, "<Control><Alt>d",
_("Hide all normal windows and set focus to the desktop"))
keybind (panel_main_menu, handle_panel,
META_KEYBINDING_ACTION_PANEL_MAIN_MENU, 0, "<Alt>F1",
_("Show the panel's main menu"))
keybind (panel_run_dialog, handle_panel,
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG, 0, "<Alt>F2",
_("Show the panel's \"Run Application\" dialog box"))
keybind (toggle_recording, handle_toggle_recording, 0, 0, "<Control><Shift><Alt>r",
_("Start or stop recording the session"))
/* Yes, the param is offset by one. Historical reasons. (Maybe worth fixing
* at some point.) The description is NULL here because the stanza is
* irregularly shaped in mutter.schemas.in. This will probably be fixed
* as well.
*/
keybind (run_command_1, handle_run_command, 0, 0, NULL, NULL)
keybind (run_command_2, handle_run_command, 1, 0, NULL, NULL)
keybind (run_command_3, handle_run_command, 2, 0, NULL, NULL)
keybind (run_command_4, handle_run_command, 3, 0, NULL, NULL)
keybind (run_command_5, handle_run_command, 4, 0, NULL, NULL)
keybind (run_command_6, handle_run_command, 5, 0, NULL, NULL)
keybind (run_command_7, handle_run_command, 6, 0, NULL, NULL)
keybind (run_command_8, handle_run_command, 7, 0, NULL, NULL)
keybind (run_command_9, handle_run_command, 8, 0, NULL, NULL)
keybind (run_command_10, handle_run_command, 9, 0, NULL, NULL)
keybind (run_command_11, handle_run_command, 10, 0, NULL, NULL)
keybind (run_command_12, handle_run_command, 11, 0, NULL, NULL)
keybind (run_command_13, handle_run_command, 12, 0, NULL, NULL)
keybind (run_command_14, handle_run_command, 13, 0, NULL, NULL)
keybind (run_command_15, handle_run_command, 14, 0, NULL, NULL)
keybind (run_command_16, handle_run_command, 15, 0, NULL, NULL)
keybind (run_command_17, handle_run_command, 16, 0, NULL, NULL)
keybind (run_command_18, handle_run_command, 17, 0, NULL, NULL)
keybind (run_command_19, handle_run_command, 18, 0, NULL, NULL)
keybind (run_command_20, handle_run_command, 19, 0, NULL, NULL)
keybind (run_command_21, handle_run_command, 20, 0, NULL, NULL)
keybind (run_command_22, handle_run_command, 21, 0, NULL, NULL)
keybind (run_command_23, handle_run_command, 22, 0, NULL, NULL)
keybind (run_command_24, handle_run_command, 23, 0, NULL, NULL)
keybind (run_command_25, handle_run_command, 24, 0, NULL, NULL)
keybind (run_command_26, handle_run_command, 25, 0, NULL, NULL)
keybind (run_command_27, handle_run_command, 26, 0, NULL, NULL)
keybind (run_command_28, handle_run_command, 27, 0, NULL, NULL)
keybind (run_command_29, handle_run_command, 28, 0, NULL, NULL)
keybind (run_command_30, handle_run_command, 29, 0, NULL, NULL)
keybind (run_command_31, handle_run_command, 30, 0, NULL, NULL)
keybind (run_command_32, handle_run_command, 31, 0, NULL, NULL)
keybind (run_command_screenshot, handle_run_command, 32, 0, "Print",
_("Take a screenshot"))
keybind (run_command_window_screenshot, handle_run_command, 33, 0,"<Alt>Print",
_("Take a screenshot of a window"))
keybind (run_command_terminal, handle_run_terminal, 0, 0, NULL, _("Run a terminal"))
/* No description because this is undocumented */
keybind (set_spew_mark, handle_set_spew_mark, 0, 0, NULL, NULL)
#undef REVERSES_AND_REVERSED
/************************ PER WINDOW BINDINGS ************************/
/* These take a window as an extra parameter; they have no effect
* if no window is active.
*/
keybind (activate_window_menu, handle_activate_window_menu, 0,
BINDING_PER_WINDOW, "<Alt>space",
_("Activate the window menu"))
keybind (toggle_fullscreen, handle_toggle_fullscreen, 0, BINDING_PER_WINDOW,
NULL,
_("Toggle fullscreen mode"))
keybind (toggle_maximized, handle_toggle_maximized, 0, BINDING_PER_WINDOW, "<Alt>F10",
_("Toggle maximization state"))
keybind (toggle_above, handle_toggle_above, 0, BINDING_PER_WINDOW, NULL,
_("Toggle whether a window will always be visible over other windows"))
keybind (maximize, handle_maximize, 0, BINDING_PER_WINDOW, NULL,
_("Maximize window"))
keybind (unmaximize, handle_unmaximize, 0, BINDING_PER_WINDOW, "<Alt>F5",
_("Restore window"))
keybind (toggle_shaded, handle_toggle_shaded, 0, BINDING_PER_WINDOW, NULL,
_("Toggle shaded state"))
keybind (minimize, handle_minimize, 0, BINDING_PER_WINDOW, "<Alt>F9",
_("Minimize window"))
keybind (close, handle_close, 0, BINDING_PER_WINDOW, "<Alt>F4",
_("Close window"))
keybind (begin_move, handle_begin_move, 0, BINDING_PER_WINDOW, "<Alt>F7",
_("Move window"))
keybind (begin_resize, handle_begin_resize, 0, BINDING_PER_WINDOW, "<Alt>F8",
_("Resize window"))
keybind (toggle_on_all_workspaces, handle_toggle_on_all_workspaces, 0,
BINDING_PER_WINDOW, NULL,
_("Toggle whether window is on all workspaces or just one"))
keybind (move_to_workspace_1, handle_move_to_workspace, 0, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 1"))
keybind (move_to_workspace_2, handle_move_to_workspace, 1, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 2"))
keybind (move_to_workspace_3, handle_move_to_workspace, 2, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 3"))
keybind (move_to_workspace_4, handle_move_to_workspace, 3, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 4"))
keybind (move_to_workspace_5, handle_move_to_workspace, 4, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 5"))
keybind (move_to_workspace_6, handle_move_to_workspace, 5, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 6"))
keybind (move_to_workspace_7, handle_move_to_workspace, 6, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 7"))
keybind (move_to_workspace_8, handle_move_to_workspace, 7, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 8"))
keybind (move_to_workspace_9, handle_move_to_workspace, 8, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 9"))
keybind (move_to_workspace_10, handle_move_to_workspace, 9, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 10"))
keybind (move_to_workspace_11, handle_move_to_workspace, 10, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 11"))
keybind (move_to_workspace_12, handle_move_to_workspace, 11, BINDING_PER_WINDOW,
NULL,
_("Move window to workspace 12"))
/* META_MOTION_* are negative, and so distinct from workspace numbers,
* which are always zero or positive.
* If you make use of these constants, you will need to include workspace.h
* (which you're probably using already for other reasons anyway).
* If your definition of keybind() throws them away, you don't need to include
* workspace.h, of course.
*/
keybind (move_to_workspace_left, handle_move_to_workspace,
META_MOTION_LEFT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Left",
_("Move window one workspace to the left"))
keybind (move_to_workspace_right, handle_move_to_workspace,
META_MOTION_RIGHT, BINDING_PER_WINDOW, "<Control><Shift><Alt>Right",
_("Move window one workspace to the right"))
keybind (move_to_workspace_up, handle_move_to_workspace,
META_MOTION_UP, BINDING_PER_WINDOW, "<Control><Shift><Alt>Up",
_("Move window one workspace up"))
keybind (move_to_workspace_down, handle_move_to_workspace,
META_MOTION_DOWN, BINDING_PER_WINDOW, "<Control><Shift><Alt>Down",
_("Move window one workspace down"))
keybind (raise_or_lower, handle_raise_or_lower, 0, BINDING_PER_WINDOW, NULL,
_("Raise window if it's covered by another window, otherwise lower it"))
keybind (raise, handle_raise, 0, BINDING_PER_WINDOW, NULL,
_("Raise window above other windows"))
keybind (lower, handle_lower, 0, BINDING_PER_WINDOW, NULL,
_("Lower window below other windows"))
keybind (maximize_vertically, handle_maximize_vertically, 0,
BINDING_PER_WINDOW, NULL,
_("Maximize window vertically"))
keybind (maximize_horizontally, handle_maximize_horizontally, 0,
BINDING_PER_WINDOW, NULL,
_("Maximize window horizontally"))
keybind (move_to_corner_nw, handle_move_to_corner_nw, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to north-west (top left) corner"))
keybind (move_to_corner_ne, handle_move_to_corner_ne, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to north-east (top right) corner"))
keybind (move_to_corner_sw, handle_move_to_corner_sw, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to south-west (bottom left) corner"))
keybind (move_to_corner_se, handle_move_to_corner_se, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to south-east (bottom right) corner"))
keybind (move_to_side_n, handle_move_to_side_n, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to north (top) side of screen"))
keybind (move_to_side_s, handle_move_to_side_s, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to south (bottom) side of screen"))
keybind (move_to_side_e, handle_move_to_side_e, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to east (right) side of screen"))
keybind (move_to_side_w, handle_move_to_side_w, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to west (left) side of screen"))
keybind (move_to_center, handle_move_to_center, 0,
BINDING_PER_WINDOW, NULL,
_("Move window to center of screen"))
/* eof all-keybindings.h */

View File

@@ -130,7 +130,7 @@ bell_flash_screen (MetaDisplay *display,
XFreeGC (display->xdisplay, gc);
}
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK &&
!display->mouse_mode)
meta_display_increment_focus_sentinel (display);
XFlush (display->xdisplay);
@@ -277,12 +277,15 @@ bell_visual_notify (MetaDisplay *display,
{
switch (meta_prefs_get_visual_bell_type ())
{
case G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH:
case META_VISUAL_BELL_FULLSCREEN_FLASH:
bell_flash_fullscreen (display, xkb_ev);
break;
case G_DESKTOP_VISUAL_BELL_FRAME_FLASH:
case META_VISUAL_BELL_FRAME_FLASH:
bell_flash_frame (display, xkb_ev); /* does nothing yet */
break;
case META_VISUAL_BELL_INVALID:
/* do nothing */
break;
}
}
@@ -291,7 +294,7 @@ meta_bell_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
/* flash something */
if (meta_prefs_get_visual_bell ())
if (meta_prefs_get_visual_bell ())
bell_visual_notify (display, xkb_ev);
#ifdef HAVE_LIBCANBERRA

View File

@@ -439,13 +439,9 @@ setup_constraint_info (ConstraintInfo *info,
monitor_info->number);
/* Workaround braindead legacy apps that don't know how to
* fullscreen themselves properly - don't get fooled by
* windows which hide their titlebar when maximized; that's
* not the same as fullscreen, even if there are no struts
* making the workarea smaller than the monitor.
* fullscreen themselves properly.
*/
if (meta_prefs_get_force_fullscreen() &&
!window->hide_titlebar_when_maximized &&
meta_rectangle_equal (new, &monitor_info->rect) &&
window->has_fullscreen_func &&
!window->fullscreen)

View File

@@ -212,7 +212,7 @@ lower_window_and_transients (MetaWindow *window,
meta_window_foreach_transient (window, lower_window_and_transients, NULL);
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
meta_prefs_get_raise_on_click ())
{
/* Move window to the back of the focusing workspace's MRU list.
@@ -538,70 +538,70 @@ meta_core_get_menu_accelerator (MetaMenuOp menu_op,
break;
case META_MENU_OP_UNSTICK:
case META_MENU_OP_STICK:
name = "toggle-on-all-workspaces";
name = "toggle_on_all_workspaces";
break;
case META_MENU_OP_ABOVE:
case META_MENU_OP_UNABOVE:
name = "toggle-above";
name = "toggle_above";
break;
case META_MENU_OP_WORKSPACES:
switch (workspace)
{
case 1:
name = "move-to-workspace-1";
name = "move_to_workspace_1";
break;
case 2:
name = "move-to-workspace-2";
name = "move_to_workspace_2";
break;
case 3:
name = "move-to-workspace-3";
name = "move_to_workspace_3";
break;
case 4:
name = "move-to-workspace-4";
name = "move_to_workspace_4";
break;
case 5:
name = "move-to-workspace-5";
name = "move_to_workspace_5";
break;
case 6:
name = "move-to-workspace-6";
name = "move_to_workspace_6";
break;
case 7:
name = "move-to-workspace-7";
name = "move_to_workspace_7";
break;
case 8:
name = "move-to-workspace-8";
name = "move_to_workspace_8";
break;
case 9:
name = "move-to-workspace-9";
name = "move_to_workspace_9";
break;
case 10:
name = "move-to-workspace-10";
name = "move_to_workspace_10";
break;
case 11:
name = "move-to-workspace-11";
name = "move_to_workspace_11";
break;
case 12:
name = "move-to-workspace-12";
name = "move_to_workspace_12";
break;
}
break;
case META_MENU_OP_MOVE:
name = "begin-move";
name = "begin_move";
break;
case META_MENU_OP_RESIZE:
name = "begin-resize";
name = "begin_resize";
break;
case META_MENU_OP_MOVE_LEFT:
name = "move-to-workspace-left";
name = "move_to_workspace_left";
break;
case META_MENU_OP_MOVE_RIGHT:
name = "move-to-workspace-right";
name = "move_to_workspace_right";
break;
case META_MENU_OP_MOVE_UP:
name = "move-to-workspace-up";
name = "move_to_workspace_up";
break;
case META_MENU_OP_MOVE_DOWN:
name = "move-to-workspace-down";
name = "move_to_workspace_down";
break;
case META_MENU_OP_RECOVER:
/* No keybinding for this one */

View File

@@ -230,7 +230,8 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
display_signals[WINDOW_CREATED] =
@@ -238,7 +239,8 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, META_TYPE_WINDOW);
display_signals[WINDOW_DEMANDS_ATTENTION] =
@@ -246,7 +248,8 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, META_TYPE_WINDOW);
display_signals[WINDOW_MARKED_URGENT] =
@@ -254,7 +257,8 @@ meta_display_class_init (MetaDisplayClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
META_TYPE_WINDOW);
@@ -1917,7 +1921,7 @@ event_callback (XEvent *event,
* in application-based mode, and the different
* app is not a dock or desktop, eat the focus click.
*/
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
meta_prefs_get_application_based () &&
!window->has_focus &&
window->type != META_WINDOW_DOCK &&
@@ -2005,8 +2009,8 @@ event_callback (XEvent *event,
{
switch (meta_prefs_get_focus_mode ())
{
case G_DESKTOP_FOCUS_MODE_SLOPPY:
case G_DESKTOP_FOCUS_MODE_MOUSE:
case META_FOCUS_MODE_SLOPPY:
case META_FOCUS_MODE_MOUSE:
display->mouse_mode = TRUE;
if (window->type != META_WINDOW_DOCK &&
window->type != META_WINDOW_DESKTOP)
@@ -2044,7 +2048,7 @@ event_callback (XEvent *event,
* alternative mechanism works great.
*/
if (window->type == META_WINDOW_DESKTOP &&
meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE &&
meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE &&
display->expected_focus_window != NULL)
{
meta_topic (META_DEBUG_FOCUS,
@@ -2056,7 +2060,7 @@ event_callback (XEvent *event,
event->xcrossing.time);
}
break;
case G_DESKTOP_FOCUS_MODE_CLICK:
case META_FOCUS_MODE_CLICK:
break;
}
@@ -3999,7 +4003,7 @@ meta_display_grab_focus_window_button (MetaDisplay *display,
* focus window may not be raised, and who wants to think about
* mouse focus anyway.
*/
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
{
meta_verbose (" (well, not grabbing since not in click to focus mode)\n");
return;

View File

@@ -31,26 +31,6 @@
#include <meta/keybindings.h>
struct _MetaKeyHandler
{
char *name;
MetaKeyHandlerFunc func;
MetaKeyHandlerFunc default_func;
gint data, flags;
gpointer user_data;
GDestroyNotify user_data_free_func;
};
struct _MetaKeyBinding
{
const char *name;
KeySym keysym;
KeyCode keycode;
unsigned int mask;
MetaVirtualModifier modifiers;
MetaKeyHandler *handler;
};
void meta_display_init_keys (MetaDisplay *display);
void meta_display_shutdown_keys (MetaDisplay *display);
void meta_screen_grab_keys (MetaScreen *screen);
@@ -72,14 +52,6 @@ void meta_set_keybindings_disabled (gboolean setting);
void meta_display_process_mapping_event (MetaDisplay *display,
XEvent *event);
gboolean meta_prefs_add_keybinding (const char *name,
const char *schema,
MetaKeyBindingAction action,
MetaKeyBindingFlags flags);
gboolean meta_prefs_remove_keybinding (const char *name);
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -25,7 +25,9 @@
#include <meta/main.h>
#include <meta/util.h>
#ifdef HAVE_INTROSPECTION
#include "meta-plugin-manager.h"
#endif
#include <glib.h>

File diff suppressed because it is too large Load Diff

View File

@@ -39,6 +39,7 @@
#include "stack.h"
#include "xprops.h"
#include <meta/compositor.h>
#include "mutter-marshal.h"
#include "mutter-enum-types.h"
#ifdef HAVE_SOLARIS_XINERAMA
@@ -161,7 +162,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaScreenClass, restacked),
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
pspec = g_param_spec_int ("n-workspaces",
@@ -175,7 +177,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
1,
G_TYPE_INT);
@@ -185,7 +188,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE,
1,
G_TYPE_INT);
@@ -195,7 +199,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
_mutter_marshal_VOID__INT_INT_ENUM,
G_TYPE_NONE,
3,
G_TYPE_INT,
@@ -207,7 +212,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
_mutter_marshal_VOID__INT_OBJECT,
G_TYPE_NONE, 2,
G_TYPE_INT,
META_TYPE_WINDOW);
@@ -217,7 +223,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
_mutter_marshal_VOID__INT_OBJECT,
G_TYPE_NONE, 2,
G_TYPE_INT,
META_TYPE_WINDOW);
@@ -227,7 +234,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
screen_signals[TOGGLE_RECORDING] =
@@ -235,7 +243,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
screen_signals[WORKAREAS_CHANGED] =
@@ -243,7 +252,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaScreenClass, workareas_changed),
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
screen_signals[MONITORS_CHANGED] =
@@ -251,7 +261,8 @@ meta_screen_class_init (MetaScreenClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaScreenClass, monitors_changed),
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
g_object_class_install_property (object_class,
@@ -1175,7 +1186,7 @@ prefs_changed_callback (MetaPreference pref,
if (pref == META_PREF_NUM_WORKSPACES)
{
/* GSettings doesn't provide timestamps, but luckily update_num_workspaces
/* GConf doesn't provide timestamps, but luckily update_num_workspaces
* often doesn't need it...
*/
guint32 timestamp =
@@ -1554,7 +1565,7 @@ static void
update_num_workspaces (MetaScreen *screen,
guint32 timestamp)
{
int new_num, old_num;
int new_num;
GList *tmp;
int i;
GList *extras;
@@ -1584,7 +1595,6 @@ update_num_workspaces (MetaScreen *screen,
++i;
tmp = tmp->next;
}
old_num = i;
g_assert (last_remaining);
@@ -1619,22 +1629,22 @@ update_num_workspaces (MetaScreen *screen,
g_assert (w->windows == NULL);
meta_workspace_remove (w);
tmp = tmp->next;
}
g_list_free (extras);
for (i = old_num; i < new_num; i++)
meta_workspace_new (screen);
while (i < new_num)
{
meta_workspace_new (screen);
++i;
}
set_number_of_spaces_hint (screen, new_num);
meta_screen_queue_workarea_recalc (screen);
for (i = old_num; i < new_num; i++)
g_signal_emit (screen, screen_signals[WORKSPACE_ADDED], 0, i);
g_object_notify (G_OBJECT (screen), "n-workspaces");
}

View File

@@ -97,15 +97,10 @@ struct _MetaWindow
char *role;
char *sm_client_id;
char *wm_client_machine;
char *startup_id;
char *mutter_hints;
char *gtk_theme_variant;
char *dbus_application_id;
char *dbus_unique_name;
char *dbus_object_path;
int hide_titlebar_when_maximized;
int net_wm_pid;
Window xtransient_for;
@@ -134,9 +129,6 @@ struct _MetaWindow
* this is the current mode. If not, it is the mode which will be
* requested after the window grab is released */
guint tile_mode : 2;
/* The last "full" maximized/unmaximized state. We need to keep track of
* that to toggle between normal/tiled or maximized/tiled states. */
guint saved_maximize : 1;
int tile_monitor_number;
/* Whether we're shaded */
@@ -658,6 +650,5 @@ void meta_window_propagate_focus_appearance (MetaWindow *window,
gboolean focused);
gboolean meta_window_should_attach_to_parent (MetaWindow *window);
gboolean meta_window_can_tile_side_by_side (MetaWindow *window);
#endif

View File

@@ -1578,108 +1578,17 @@ reload_gtk_theme_variant (MetaWindow *window,
requested_variant, window->desc);
}
if (g_strcmp0 (requested_variant, current_variant) != 0)
if (g_strcmp0 (requested_variant, current_variant))
{
g_free (current_variant);
window->gtk_theme_variant = g_strdup (requested_variant);
if (window->frame)
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
}
}
static void
reload_gtk_hide_titlebar_when_maximized (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
gboolean requested_value = FALSE;
gboolean current_value = window->hide_titlebar_when_maximized;
if (value->type != META_PROP_VALUE_INVALID)
{
requested_value = ((int) value->v.cardinal == 1);
meta_verbose ("Request to hide titlebar for window %s.\n", window->desc);
}
if (requested_value == current_value)
return;
window->hide_titlebar_when_maximized = requested_value;
if (META_WINDOW_MAXIMIZED (window))
{
meta_window_queue (window, META_QUEUE_MOVE_RESIZE);
if (window->frame)
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
}
}
static void
reload_dbus_application_id (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
char *new_id = NULL;
char *current_id = window->dbus_application_id;
if (value->type != META_PROP_VALUE_INVALID)
new_id = value->v.str;
if (g_strcmp0 (new_id, current_id) != 0)
{
g_free (current_id);
if (new_id)
window->dbus_application_id = g_strdup (new_id);
if (requested_variant)
window->gtk_theme_variant = g_strdup (requested_variant);
else
window->dbus_application_id = NULL;
window->gtk_theme_variant = NULL;
g_object_notify ((GObject*)window, "dbus-application-id");
}
}
static void
reload_dbus_unique_name (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
char *new_id = NULL;
char *current_id = window->dbus_unique_name;
if (value->type != META_PROP_VALUE_INVALID)
new_id = value->v.str;
if (g_strcmp0 (new_id, current_id) != 0)
{
g_free (current_id);
window->dbus_unique_name = g_strdup (new_id);
g_object_notify ((GObject*)window, "dbus-unique-name");
}
}
static void
reload_dbus_object_path (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
char *new_path = NULL;
char *current_path = window->dbus_object_path;
if (value->type != META_PROP_VALUE_INVALID)
new_path = value->v.str;
if (g_strcmp0 (new_path, current_path) != 0)
{
g_free (current_path);
window->dbus_object_path = g_strdup (new_path);
g_object_notify ((GObject*)window, "dbus-object-path");
if (window->frame)
meta_ui_update_frame_style (window->screen->ui, window->frame->xwindow);
}
}
@@ -1736,10 +1645,6 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
{ display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, TRUE, FALSE },
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, TRUE, FALSE },
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, TRUE, FALSE },
{ display->atom__GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED, META_PROP_VALUE_CARDINAL, reload_gtk_hide_titlebar_when_maximized, TRUE, FALSE },
{ display->atom__DBUS_APPLICATION_ID, META_PROP_VALUE_UTF8, reload_dbus_application_id, TRUE, FALSE },
{ display->atom__DBUS_UNIQUE_NAME, META_PROP_VALUE_UTF8, reload_dbus_unique_name, TRUE, FALSE },
{ display->atom__DBUS_OBJECT_PATH, META_PROP_VALUE_UTF8, reload_dbus_object_path, TRUE, FALSE },
{ display->atom__NET_WM_USER_TIME_WINDOW, META_PROP_VALUE_WINDOW, reload_net_wm_user_time_window, TRUE, FALSE },
{ display->atom_WM_STATE, META_PROP_VALUE_INVALID, NULL, FALSE, FALSE },
{ display->atom__NET_WM_ICON, META_PROP_VALUE_INVALID, reload_net_wm_icon, FALSE, FALSE },

View File

@@ -164,10 +164,7 @@ enum {
PROP_APPEARS_FOCUSED,
PROP_RESIZEABLE,
PROP_ABOVE,
PROP_WM_CLASS,
PROP_DBUS_APPLICATION_ID,
PROP_DBUS_UNIQUE_NAME,
PROP_DBUS_OBJECT_PATH
PROP_WM_CLASS
};
enum
@@ -182,20 +179,6 @@ enum
static guint window_signals[LAST_SIGNAL] = { 0 };
static void
prefs_changed_callback (MetaPreference pref,
gpointer data)
{
MetaWindow *window = data;
if (pref != META_PREF_WORKSPACES_ONLY_ON_PRIMARY)
return;
meta_window_update_on_all_workspaces (window);
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
}
static void
meta_window_finalize (GObject *object)
{
@@ -212,8 +195,6 @@ meta_window_finalize (GObject *object)
meta_icon_cache_free (&window->icon_cache);
meta_prefs_remove_listener (prefs_changed_callback, window);
g_free (window->sm_client_id);
g_free (window->wm_client_machine);
g_free (window->startup_id);
@@ -224,9 +205,6 @@ meta_window_finalize (GObject *object)
g_free (window->icon_name);
g_free (window->desc);
g_free (window->gtk_theme_variant);
g_free (window->dbus_application_id);
g_free (window->dbus_unique_name);
g_free (window->dbus_object_path);
}
static void
@@ -290,15 +268,6 @@ meta_window_get_property(GObject *object,
case PROP_ABOVE:
g_value_set_boolean (value, win->wm_state_above);
break;
case PROP_DBUS_APPLICATION_ID:
g_value_set_string (value, win->dbus_application_id);
break;
case PROP_DBUS_UNIQUE_NAME:
g_value_set_string (value, win->dbus_unique_name);
break;
case PROP_DBUS_OBJECT_PATH:
g_value_set_string (value, win->dbus_object_path);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -465,36 +434,13 @@ meta_window_class_init (MetaWindowClass *klass)
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_DBUS_APPLICATION_ID,
g_param_spec_string ("dbus-application-id",
"DBusApplicationID",
"Contents of the _DBUS_APPLICATION_ID property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_DBUS_UNIQUE_NAME,
g_param_spec_string ("dbus-unique-name",
"_DBUS_UNIQUE_NAME",
"Contents of the _DBUS_UNIQUE_NAME property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_DBUS_OBJECT_PATH,
g_param_spec_string ("dbus-object-path",
"_DBUS_OBJECT_PATH",
"Contents of the _DBUS_OBJECT_PATH property of this window",
NULL,
G_PARAM_READABLE));
window_signals[WORKSPACE_CHANGED] =
g_signal_new ("workspace-changed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, workspace_changed),
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1,
G_TYPE_INT);
@@ -503,7 +449,8 @@ meta_window_class_init (MetaWindowClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, focus),
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
window_signals[RAISED] =
@@ -511,7 +458,8 @@ meta_window_class_init (MetaWindowClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, raised),
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
window_signals[UNMANAGED] =
@@ -519,14 +467,14 @@ meta_window_class_init (MetaWindowClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (MetaWindowClass, unmanaged),
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
}
static void
meta_window_init (MetaWindow *self)
{
meta_prefs_add_listener (prefs_changed_callback, self);
}
#ifdef WITH_VERBOSE_MODE
@@ -1949,7 +1897,7 @@ static void
set_net_wm_state (MetaWindow *window)
{
int i;
unsigned long data[13];
unsigned long data[12];
i = 0;
if (window->shaded)
@@ -2012,11 +1960,6 @@ set_net_wm_state (MetaWindow *window)
data[i] = window->display->atom__NET_WM_STATE_STICKY;
++i;
}
if (meta_window_appears_focused (window))
{
data[i] = window->display->atom__NET_WM_STATE_FOCUSED;
++i;
}
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
@@ -2329,7 +2272,7 @@ idle_calc_showing (gpointer data)
tmp = tmp->next;
}
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
{
/* When display->mouse_mode is false, we want to ignore
* EnterNotify events unless they come from mouse motion. To do
@@ -2669,7 +2612,7 @@ window_state_on_map (MetaWindow *window,
* approximation to enforce so we do that.
*/
if (*takes_focus &&
meta_prefs_get_focus_new_windows () == G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
meta_prefs_get_focus_new_windows () == META_FOCUS_NEW_WINDOWS_STRICT &&
!window->display->allow_terminal_deactivation &&
__window_is_terminal (window->display->focus_window) &&
!meta_window_is_ancestor_of_transient (window->display->focus_window,
@@ -3004,7 +2947,7 @@ meta_window_show (MetaWindow *window)
* that new window below a lot of other windows.
*/
if (overlap ||
(meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
(meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
meta_prefs_get_raise_on_click ()))
meta_window_stack_just_below (window, focus_window);
@@ -3454,9 +3397,6 @@ meta_window_maximize_internal (MetaWindow *window,
else
meta_window_save_rect (window);
if (maximize_horizontally && maximize_vertically)
window->saved_maximize = TRUE;
window->maximized_horizontally =
window->maximized_horizontally || maximize_horizontally;
window->maximized_vertically =
@@ -3619,10 +3559,6 @@ meta_window_tile (MetaWindow *window)
window,
&old_rect,
&new_rect);
if (window->frame)
meta_ui_queue_frame_draw (window->screen->ui,
window->frame->xwindow);
}
else
{
@@ -3635,10 +3571,16 @@ meta_window_tile (MetaWindow *window)
static gboolean
meta_window_can_tile_maximized (MetaWindow *window)
{
return window->has_maximize_func;
if (!META_WINDOW_ALLOWS_RESIZE (window))
return FALSE;
if (!window->has_maximize_func)
return FALSE;
return TRUE;
}
gboolean
static gboolean
meta_window_can_tile_side_by_side (MetaWindow *window)
{
const MetaMonitorInfo *monitor;
@@ -3717,9 +3659,6 @@ meta_window_unmaximize_internal (MetaWindow *window,
unmaximize_vertically = directions & META_MAXIMIZE_VERTICAL;
g_assert (unmaximize_horizontally || unmaximize_vertically);
if (unmaximize_horizontally && unmaximize_vertically)
window->saved_maximize = FALSE;
/* Only do something if the window isn't already maximized in the
* given direction(s).
*/
@@ -5057,41 +4996,6 @@ meta_window_move_between_rects (MetaWindow *window,
window->user_rect.height);
}
/**
* meta_window_move_resize_frame:
* @window: a #MetaWindow
* @user_op: bool to indicate whether or not this is a user operation
* @root_x_nw: new x
* @root_y_nw: new y
* @w: desired width
* @h: desired height
*
* Resizes the window so that its outer bounds (including frame)
* fit within the given rect
*/
void
meta_window_move_resize_frame (MetaWindow *window,
gboolean user_op,
int root_x_nw,
int root_y_nw,
int w,
int h)
{
if (window->frame)
{
MetaFrameBorders borders;
meta_frame_calc_borders (window->frame, &borders);
/* offset by the distance between the origin of the window
* and the origin of the enclosing window decorations ( + border)
*/
root_x_nw += borders.visible.left;
root_y_nw += borders.visible.top;
w -= borders.visible.left + borders.visible.right;
h -= borders.visible.top + borders.visible.bottom;
}
meta_window_move_resize (window, user_op, root_x_nw, root_y_nw, w, h);
}
/**
* meta_window_move_to_monitor:
* @window: a #MetaWindow
@@ -6690,17 +6594,6 @@ meta_window_client_message (MetaWindow *window,
return FALSE;
}
static void
meta_window_appears_focused_changed (MetaWindow *window)
{
set_net_wm_state (window);
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
/**
* meta_window_propagate_focus_appearance:
* @window: the window to start propagating from
@@ -6746,7 +6639,9 @@ meta_window_propagate_focus_appearance (MetaWindow *window,
if (child_focus_state_changed && !parent->has_focus &&
parent != window->display->expected_focus_window)
{
meta_window_appears_focused_changed (parent);
g_object_notify (G_OBJECT (parent), "appears-focused");
if (parent->frame)
meta_frame_queue_draw (parent->frame);
}
child = parent;
@@ -6892,7 +6787,7 @@ meta_window_notify_focus (MetaWindow *window,
*
* There is dicussion in bugs 102209, 115072, and 461577
*/
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
!meta_prefs_get_raise_on_click())
meta_display_ungrab_focus_window_button (window->display, window);
@@ -6900,8 +6795,11 @@ meta_window_notify_focus (MetaWindow *window,
g_object_notify (G_OBJECT (window->display), "focus-window");
if (!window->attached_focus_window)
meta_window_appears_focused_changed (window);
{
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
meta_window_propagate_focus_appearance (window, TRUE);
}
}
@@ -6934,7 +6832,11 @@ meta_window_notify_focus (MetaWindow *window,
window->has_focus = FALSE;
if (!window->attached_focus_window)
meta_window_appears_focused_changed (window);
{
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
meta_error_trap_push (window->display);
XUninstallColormap (window->display->xdisplay,
@@ -6945,7 +6847,7 @@ meta_window_notify_focus (MetaWindow *window,
meta_window_update_layer (window);
/* Re-grab for click to focus and raise-on-click, if necessary */
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
!meta_prefs_get_raise_on_click ())
meta_display_grab_focus_window_button (window->display, window);
}
@@ -8530,16 +8432,9 @@ update_move (MetaWindow *window,
shake_threshold = meta_ui_get_drag_threshold (window->screen->ui) *
DRAG_THRESHOLD_TO_SHAKE_THRESHOLD_FACTOR;
if (snap)
{
/* We don't want to tile while snapping. Also, clear any previous tile
request. */
window->tile_mode = META_TILE_NONE;
window->tile_monitor_number = -1;
}
else if (meta_prefs_get_edge_tiling () &&
!META_WINDOW_MAXIMIZED (window) &&
!META_WINDOW_TILED_SIDE_BY_SIDE (window))
if (meta_prefs_get_edge_tiling () &&
!META_WINDOW_MAXIMIZED (window) &&
!META_WINDOW_TILED_SIDE_BY_SIDE (window))
{
const MetaMonitorInfo *monitor;
MetaRectangle work_area;
@@ -9923,7 +9818,7 @@ meta_window_set_user_time (MetaWindow *window,
* doesn't want to have focus transferred for now due to new windows.
*/
if (meta_prefs_get_focus_new_windows () ==
G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
META_FOCUS_NEW_WINDOWS_STRICT &&
__window_is_terminal (window))
window->display->allow_terminal_deactivation = FALSE;
}
@@ -10250,42 +10145,6 @@ meta_window_get_wm_class_instance (MetaWindow *window)
return window->res_name;
}
/**
* meta_window_get_dbus_application_id:
* @window: a #MetaWindow
*
* Return value: (transfer none): the application ID
**/
const char *
meta_window_get_dbus_application_id (MetaWindow *window)
{
return window->dbus_application_id;
}
/**
* meta_window_get_dbus_unique_name:
* @window: a #MetaWindow
*
* Return value: (transfer none): the unique name
**/
const char *
meta_window_get_dbus_unique_name (MetaWindow *window)
{
return window->dbus_unique_name;
}
/**
* meta_window_get_dbus_object_path:
* @window: a #MetaWindow
*
* Return value: (transfer none): the object path
**/
const char *
meta_window_get_dbus_object_path (MetaWindow *window)
{
return window->dbus_object_path;
}
/**
* meta_window_get_compositor_private:
* @window: a #MetaWindow
@@ -10539,8 +10398,7 @@ meta_window_get_frame_type (MetaWindow *window)
/* can't add border if undecorated */
return META_FRAME_TYPE_LAST;
}
else if ((window->border_only && base_type != META_FRAME_TYPE_ATTACHED) ||
(window->hide_titlebar_when_maximized && META_WINDOW_MAXIMIZED (window)))
else if (window->border_only && base_type != META_FRAME_TYPE_ATTACHED)
{
/* override base frame type */
return META_FRAME_TYPE_BORDER;

View File

@@ -121,14 +121,16 @@ meta_workspace_class_init (MetaWorkspaceClass *klass)
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
META_TYPE_WINDOW);
signals[WINDOW_REMOVED] = g_signal_new ("window-removed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1,
META_TYPE_WINDOW);
@@ -1199,7 +1201,7 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
}
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
!workspace->screen->display->mouse_mode)
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
else
@@ -1237,9 +1239,9 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
window);
}
}
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_SLOPPY)
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY)
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE)
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE)
{
meta_topic (META_DEBUG_FOCUS,
"Setting focus to no_focus_window, since no valid "
@@ -1298,7 +1300,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
meta_window_focus (ancestor, timestamp);
/* Also raise the window if in click-to-focus */
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
meta_window_raise (ancestor);
return;
@@ -1344,7 +1346,7 @@ focus_ancestor_or_mru_window (MetaWorkspace *workspace,
meta_window_focus (window, timestamp);
/* Also raise the window if in click-to-focus */
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK)
meta_window_raise (window);
}
else

View File

@@ -12,7 +12,7 @@ mutter_plugin_api_version=@MUTTER_PLUGIN_API_VERSION@
Name: libmutter
Description: Mutter window manager library
Requires: gsettings-desktop-schemas gtk+-3.0 @CLUTTER_PACKAGE@ x11
Requires: gtk+-3.0 @CLUTTER_PACKAGE@ x11
Version: @VERSION@
Libs: -L${libdir} -lmutter
Cflags: -I${includedir}/mutter -DMUTTER_MAJOR_VERSION=${mutter_major_version} -DMUTTER_MINOR_VERSION=${mutter_minor_version} -DMUTTER_MICRO_VERSION=${mutter_micro_version} -DMUTTER_PLUGIN_API_VERSION=${mutter_plugin_api_version}

View File

@@ -59,10 +59,6 @@ item(_MUTTER_SET_KEYBINDINGS_MESSAGE)
item(_MUTTER_TOGGLE_VERBOSE)
item(_MUTTER_HINTS)
item(_GTK_THEME_VARIANT)
item(_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED)
item(_DBUS_APPLICATION_ID)
item(_DBUS_UNIQUE_NAME)
item(_DBUS_OBJECT_PATH)
item(_GNOME_WM_KEYBINDINGS)
item(_GNOME_PANEL_ACTION)
item(_GNOME_PANEL_ACTION_MAIN_MENU)
@@ -168,7 +164,6 @@ item(_NET_WM_ACTION_ABOVE)
item(_NET_WM_ACTION_BELOW)
item(_NET_WM_STATE_STICKY)
item(_NET_WM_FULLSCREEN_MONITORS)
item(_NET_WM_STATE_FOCUSED)
#if 0
/* We apparently never use: */

View File

@@ -1,9 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Mutter common types shared by core.h and ui.h
*
* PLEASE KEEP IN SYNC WITH GSETTINGS SCHEMAS!
*/
/* Mutter common types shared by core.h and ui.h */
/*
* Copyright (C) 2001 Havoc Pennington
@@ -167,6 +164,32 @@ typedef enum
} MetaCursor;
typedef enum
{
META_FOCUS_MODE_CLICK,
META_FOCUS_MODE_SLOPPY,
META_FOCUS_MODE_MOUSE
} MetaFocusMode;
typedef enum
{
META_FOCUS_NEW_WINDOWS_SMART,
META_FOCUS_NEW_WINDOWS_STRICT
} MetaFocusNewWindows;
typedef enum
{
META_ACTION_TITLEBAR_TOGGLE_SHADE,
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE,
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY,
META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY,
META_ACTION_TITLEBAR_MINIMIZE,
META_ACTION_TITLEBAR_NONE,
META_ACTION_TITLEBAR_LOWER,
META_ACTION_TITLEBAR_MENU,
META_ACTION_TITLEBAR_LAST
} MetaActionTitlebar;
typedef enum
{
META_FRAME_TYPE_NORMAL,
@@ -351,8 +374,10 @@ void meta_frame_borders_clear (MetaFrameBorders *self);
/* G_PRIORITY_DEFAULT_IDLE:
* Mutter plugin unloading
* GConf notify idle
*/
/* Chosen to be below the GConf notify idle */
#define META_PRIORITY_PREFS_NOTIFY (G_PRIORITY_DEFAULT_IDLE + 10)
/************************************************************/

View File

@@ -124,16 +124,6 @@ void meta_display_end_grab_op (MetaDisplay *display,
MetaGrabOp meta_display_get_grab_op (MetaDisplay *display);
gboolean meta_display_add_keybinding (MetaDisplay *display,
const char *name,
const char *schema,
MetaKeyBindingFlags flags,
MetaKeyHandlerFunc handler,
gpointer user_data,
GDestroyNotify free_data);
gboolean meta_display_remove_keybinding (MetaDisplay *display,
const char *name);
MetaKeyBindingAction meta_display_get_keybinding_action (MetaDisplay *display,
unsigned int keycode,
unsigned long mask);

View File

@@ -23,11 +23,37 @@
#include <meta/display.h>
#include <meta/common.h>
#define META_TYPE_KEY_BINDING (meta_key_binding_get_type ())
/**
* MetaKeyHandlerFunc: (skip)
*
*/
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding,
gpointer user_data);
typedef struct
{
const char *name;
MetaKeyHandlerFunc func;
MetaKeyHandlerFunc default_func;
gint data, flags;
gpointer user_data;
GDestroyNotify user_data_free_func;
} MetaKeyHandler;
struct _MetaKeyBinding
{
const char *name;
KeySym keysym;
KeyCode keycode;
unsigned int mask;
MetaVirtualModifier modifiers;
MetaKeyHandler *handler;
};
const char *meta_key_binding_get_name (MetaKeyBinding *binding);
MetaVirtualModifier meta_key_binding_get_modifiers (MetaKeyBinding *binding);
guint meta_key_binding_get_mask (MetaKeyBinding *binding);
gboolean meta_keybindings_set_custom_handler (const gchar *name,
MetaKeyHandlerFunc handler,

View File

@@ -27,11 +27,8 @@
/* This header is a "common" one between the UI and core side */
#include <meta/common.h>
#include <meta/types.h>
#include <pango/pango-font.h>
#include <gdesktop-enums.h>
/* Keep in sync with GSettings schemas! */
typedef enum
{
META_PREF_MOUSE_BUTTON_MODS,
@@ -50,6 +47,8 @@ typedef enum
META_PREF_APPLICATION_BASED,
META_PREF_KEYBINDINGS,
META_PREF_DISABLE_WORKAROUNDS,
META_PREF_COMMANDS,
META_PREF_TERMINAL_COMMAND,
META_PREF_BUTTON_LAYOUT,
META_PREF_WORKSPACE_NAMES,
META_PREF_VISUAL_BELL,
@@ -78,16 +77,16 @@ void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
void meta_prefs_init (void);
void meta_prefs_override_preference_schema (const char *key,
const char *schema);
void meta_prefs_override_preference_location (const char *original_key,
const char *new_key);
const char* meta_preference_to_string (MetaPreference pref);
MetaVirtualModifier meta_prefs_get_mouse_button_mods (void);
guint meta_prefs_get_mouse_button_resize (void);
guint meta_prefs_get_mouse_button_menu (void);
GDesktopFocusMode meta_prefs_get_focus_mode (void);
GDesktopFocusNewWindows meta_prefs_get_focus_new_windows (void);
MetaFocusMode meta_prefs_get_focus_mode (void);
MetaFocusNewWindows meta_prefs_get_focus_new_windows (void);
gboolean meta_prefs_get_attach_modal_dialogs (void);
gboolean meta_prefs_get_raise_on_click (void);
const char* meta_prefs_get_theme (void);
@@ -102,18 +101,19 @@ gboolean meta_prefs_get_gnome_accessibility (void);
gboolean meta_prefs_get_gnome_animations (void);
gboolean meta_prefs_get_edge_tiling (void);
const char* meta_prefs_get_screenshot_command (void);
const char* meta_prefs_get_command (int i);
const char* meta_prefs_get_window_screenshot_command (void);
char* meta_prefs_get_gconf_key_for_command (int i);
const char* meta_prefs_get_terminal_command (void);
const char* meta_prefs_get_gconf_key_for_terminal_command (void);
void meta_prefs_get_button_layout (MetaButtonLayout *button_layout);
/* Double, right, middle click can be configured to any titlebar meta-action */
GDesktopTitlebarAction meta_prefs_get_action_double_click_titlebar (void);
GDesktopTitlebarAction meta_prefs_get_action_middle_click_titlebar (void);
GDesktopTitlebarAction meta_prefs_get_action_right_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_double_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_middle_click_titlebar (void);
MetaActionTitlebar meta_prefs_get_action_right_click_titlebar (void);
void meta_prefs_set_num_workspaces (int n_workspaces);
@@ -187,12 +187,45 @@ typedef enum _MetaKeyBindingAction
META_KEYBINDING_ACTION_PANEL_MAIN_MENU,
META_KEYBINDING_ACTION_PANEL_RUN_DIALOG,
META_KEYBINDING_ACTION_TOGGLE_RECORDING,
META_KEYBINDING_ACTION_COMMAND_1,
META_KEYBINDING_ACTION_COMMAND_2,
META_KEYBINDING_ACTION_COMMAND_3,
META_KEYBINDING_ACTION_COMMAND_4,
META_KEYBINDING_ACTION_COMMAND_5,
META_KEYBINDING_ACTION_COMMAND_6,
META_KEYBINDING_ACTION_COMMAND_7,
META_KEYBINDING_ACTION_COMMAND_8,
META_KEYBINDING_ACTION_COMMAND_9,
META_KEYBINDING_ACTION_COMMAND_10,
META_KEYBINDING_ACTION_COMMAND_11,
META_KEYBINDING_ACTION_COMMAND_12,
META_KEYBINDING_ACTION_COMMAND_13,
META_KEYBINDING_ACTION_COMMAND_14,
META_KEYBINDING_ACTION_COMMAND_15,
META_KEYBINDING_ACTION_COMMAND_16,
META_KEYBINDING_ACTION_COMMAND_17,
META_KEYBINDING_ACTION_COMMAND_18,
META_KEYBINDING_ACTION_COMMAND_19,
META_KEYBINDING_ACTION_COMMAND_20,
META_KEYBINDING_ACTION_COMMAND_21,
META_KEYBINDING_ACTION_COMMAND_22,
META_KEYBINDING_ACTION_COMMAND_23,
META_KEYBINDING_ACTION_COMMAND_24,
META_KEYBINDING_ACTION_COMMAND_25,
META_KEYBINDING_ACTION_COMMAND_26,
META_KEYBINDING_ACTION_COMMAND_27,
META_KEYBINDING_ACTION_COMMAND_28,
META_KEYBINDING_ACTION_COMMAND_29,
META_KEYBINDING_ACTION_COMMAND_30,
META_KEYBINDING_ACTION_COMMAND_31,
META_KEYBINDING_ACTION_COMMAND_32,
META_KEYBINDING_ACTION_COMMAND_SCREENSHOT,
META_KEYBINDING_ACTION_COMMAND_WINDOW_SCREENSHOT,
META_KEYBINDING_ACTION_COMMAND_TERMINAL,
META_KEYBINDING_ACTION_SET_SPEW_MARK,
META_KEYBINDING_ACTION_ACTIVATE_WINDOW_MENU,
META_KEYBINDING_ACTION_TOGGLE_FULLSCREEN,
META_KEYBINDING_ACTION_TOGGLE_MAXIMIZED,
META_KEYBINDING_ACTION_TOGGLE_TILED_LEFT,
META_KEYBINDING_ACTION_TOGGLE_TILED_RIGHT,
META_KEYBINDING_ACTION_TOGGLE_ABOVE,
META_KEYBINDING_ACTION_MAXIMIZE,
META_KEYBINDING_ACTION_UNMAXIMIZE,
@@ -236,15 +269,6 @@ typedef enum _MetaKeyBindingAction
META_KEYBINDING_ACTION_LAST
} MetaKeyBindingAction;
typedef enum
{
META_KEY_BINDING_NONE,
META_KEY_BINDING_PER_WINDOW = 1 << 0,
META_KEY_BINDING_BUILTIN = 1 << 1,
META_KEY_BINDING_REVERSES = 1 << 2,
META_KEY_BINDING_IS_REVERSED = 1 << 3
} MetaKeyBindingFlags;
typedef struct
{
unsigned int keysym;
@@ -252,31 +276,16 @@ typedef struct
MetaVirtualModifier modifiers;
} MetaKeyCombo;
/**
* MetaKeyHandlerFunc:
* @event: (type gpointer):
*
*/
typedef void (* MetaKeyHandlerFunc) (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding,
gpointer user_data);
typedef struct _MetaKeyHandler MetaKeyHandler;
typedef struct
{
char *name;
char *schema;
MetaKeyBindingAction action;
const char *name;
const char *default_keybinding;
/**
* A list of MetaKeyCombos. Each of them is bound to
* this keypref. If one has keysym==modifiers==0, it is
* ignored.
* ignored. For historical reasons, the first entry is
* governed by the pref FOO and the remainder are
* governed by the pref FOO_list.
*/
GSList *bindings;
@@ -285,14 +294,10 @@ typedef struct
/** for keybindings that apply only to a window */
gboolean per_window:1;
/** for keybindings not added with meta_display_add_keybinding() */
gboolean builtin:1;
} MetaKeyPref;
GType meta_key_binding_get_type (void);
GList *meta_prefs_get_keybindings (void);
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
int *n_bindings);
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
@@ -302,9 +307,17 @@ void meta_prefs_get_window_binding (const char *name,
void meta_prefs_get_overlay_binding (MetaKeyCombo *combo);
typedef enum
{
META_VISUAL_BELL_INVALID = 0,
META_VISUAL_BELL_FULLSCREEN_FLASH,
META_VISUAL_BELL_FRAME_FLASH
} MetaVisualBellType;
gboolean meta_prefs_get_visual_bell (void);
gboolean meta_prefs_bell_is_audible (void);
GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
MetaVisualBellType meta_prefs_get_visual_bell_type (void);
#endif

View File

@@ -95,13 +95,8 @@ const char * meta_window_get_wm_class (MetaWindow *window);
const char * meta_window_get_wm_class_instance (MetaWindow *window);
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
const char * meta_window_get_dbus_application_id (MetaWindow *window);
const char * meta_window_get_dbus_unique_name (MetaWindow *window);
const char * meta_window_get_dbus_object_path (MetaWindow *window);
void meta_window_move(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
void meta_window_move_frame(MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw);
void meta_window_move_resize_frame (MetaWindow *window, gboolean user_op, int root_x_nw, int root_y_nw, int w, int h);
void meta_window_move_to_monitor (MetaWindow *window, int monitor);
void meta_window_resize(MetaWindow *window, gboolean user_op, int w, int h);

2
src/mutter-marshal.list Normal file
View File

@@ -0,0 +1,2 @@
VOID:INT,INT,ENUM
VOID:INT,OBJECT

View File

@@ -1,6 +0,0 @@
[org.gnome.mutter]
overlay-key = /apps/mutter/general/overlay_key
attach-modal-dialogs = /apps/mutter/general/attach_modal_dialogs
live-hidden-windows = /apps/mutter/general/live_hidden_windows
workspaces-only-on-primary = /apps/mutter/general/workspaces_only_on_primary
draggable-border-width = /apps/mutter/general/draggable_border_width

89
src/mutter.schemas.in Normal file
View File

@@ -0,0 +1,89 @@
<gconfschemafile>
<schemalist>
<!-- General preferences -->
<schema>
<key>/schemas/apps/mutter/general/overlay_key</key>
<applyto>/apps/mutter/general/overlay_key</applyto>
<owner>mutter</owner>
<type>string</type>
<default>Super_L</default>
<locale name="C">
<short>Modifier to use for extended window management operations</short>
<long>
This key will initiate the "overlay", which is a combination window
overview and application launching system. The default is intended
to be the "Windows key" on PC hardware.
It's expected that this binding either the default or set to
the empty string.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/attach_modal_dialogs</key>
<applyto>/apps/mutter/general/attach_modal_dialogs</applyto>
<owner>mutter</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Attach modal dialogs</short>
<long>
When true, instead
of having independent titlebars, modal dialogs appear attached to the titlebar
of the parent window and are moved together with the parent window.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/live_hidden_windows</key>
<applyto>/apps/mutter/general/live_hidden_windows</applyto>
<owner>mutter</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Live Hidden Windows</short>
<long>
Determines whether hidden windows (i.e., minimized windows and
windows on other workspaces than the current one) should be kept
alive.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/workspaces_only_on_primary</key>
<applyto>/apps/mutter/general/workspaces_only_on_primary</applyto>
<owner>mutter</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
<short>Workspaces only on primary</short>
<long>
Determines whether workspace switching should happen for windows
on all monitors or only for windows on the primary monitor.
</long>
</locale>
</schema>
<schema>
<key>/schemas/apps/mutter/general/draggable_border_width</key>
<applyto>/apps/mutter/general/draggable_border_width</applyto>
<owner>mutter</owner>
<type>int</type>
<default>10</default>
<locale name="C">
<short>Draggable border width</short>
<long>
The amount of total draggable borders. If the theme's visible
borders are not enough, invisible borders will be added to meet
this value.
</long>
</locale>
</schema>
</schemalist>
</gconfschemafile>

View File

@@ -1,105 +0,0 @@
<schemalist>
<schema id="org.gnome.mutter" path="/org/gnome/mutter/"
gettext-domain="@GETTEXT_DOMAIN">
<key name="overlay-key" type="s">
<default>'Super_L'</default>
<_summary>Modifier to use for extended window management operations</_summary>
<_description>
This key will initiate the "overlay", which is a combination window
overview and application launching system. The default is intended
to be the "Windows key" on PC hardware.
It's expected that this binding either the default or set to
the empty string.
</_description>
</key>
<key name="attach-modal-dialogs" type="b">
<default>false</default>
<_summary>Attach modal dialogs</_summary>
<_description>
When true, instead of having independent titlebars, modal dialogs
appear attached to the titlebar of the parent window and are moved
together with the parent window.
</_description>
</key>
<key name="live-hidden-windows" type="b">
<default>false</default>
<_summary>Live Hidden Windows</_summary>
<_description>
Determines whether hidden windows (i.e., minimized windows and
windows on other workspaces than the current one) should be kept
alive.
</_description>
</key>
<key name="edge-tiling" type="b">
<default>false</default>
<_summary>Enable edge tiling when dropping windows on screen edges</_summary>
<_description>
If enabled, dropping windows on vertical screen edges maximizes them
vertically and resizes them horizontally to cover half of the available
area. Dropping windows on the top screen edge maximizes them completely.
</_description>
</key>
<key name="workspaces-only-on-primary" type="b">
<default>false</default>
<_summary>Workspaces only on primary</_summary>
<_description>
Determines whether workspace switching should happen for windows
on all monitors or only for windows on the primary monitor.
</_description>
</key>
<key name="no-tab-popup" type="b">
<default>false</default>
<_summary>No tab popup</_summary>
<_description>
Determines whether the use of popup and highlight frame should
be disabled for window cycling.
</_description>
</key>
<key name="draggable-border-width" type="i">
<default>10</default>
<range min="0" max="64"/>
<_summary>Draggable border width</_summary>
<_description>
The amount of total draggable borders. If the theme's visible
borders are not enough, invisible borders will be added to meet
this value.
</_description>
</key>
<child name="keybindings" schema="org.gnome.mutter.keybindings"/>
</schema>
<schema id="org.gnome.mutter.keybindings" path="/org/gnome/mutter/keybindings/">
<key name="toggle-recording" type="as">
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
</key>
<key name="toggle-tiled-left" type="as">
<default><![CDATA[['<Super>Left']]]></default>
</key>
<key name="toggle-tiled-right" type="as">
<default><![CDATA[['<Super>Right']]]></default>
</key>
<key name="tab-popup-select" type="as">
<default>[]</default>
<_summary>Select window from tab popup</_summary>
</key>
<key name="tab-popup-cancel" type="as">
<default>[]</default>
<_summary>Cancel tab popup</_summary>
</key>
</schema>
</schemalist>

View File

@@ -148,15 +148,8 @@ grab_area_at_mouse (GtkWidget *invisible,
static void
shutdown_grab (void)
{
GdkDeviceManager *manager;
GdkDevice *device;
manager = gdk_display_get_device_manager (gdk_display_get_default ());
device = gdk_device_manager_get_client_pointer (manager);
gdk_device_ungrab (device, gtk_get_current_event_time ());
gdk_device_ungrab (gdk_device_get_associated_device (device),
gtk_get_current_event_time ());
gdk_keyboard_ungrab (gtk_get_current_event_time ());
gdk_pointer_ungrab (gtk_get_current_event_time ());
gtk_grab_remove (grab_widget);
}
@@ -204,8 +197,6 @@ key_press (GtkWidget *invisible,
g_signal_handlers_disconnect_by_func (invisible, mouse_press, NULL);
g_signal_handlers_disconnect_by_func (invisible, key_press, NULL);
gtk_main_quit ();
return TRUE;
}
@@ -236,8 +227,6 @@ static void
begin_area_grab (void)
{
GdkWindow *window;
GdkDeviceManager *manager;
GdkDevice *device;
if (grab_widget == NULL)
{
@@ -250,31 +239,24 @@ begin_area_grab (void)
}
window = gtk_widget_get_window (grab_widget);
manager = gdk_display_get_device_manager (gdk_display_get_default ());
device = gdk_device_manager_get_client_pointer (manager);
if (gdk_device_grab (device,
window,
GDK_OWNERSHIP_NONE,
FALSE,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
NULL,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
if (gdk_keyboard_grab (window,
FALSE,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
{
g_warning ("Failed to grab pointer to do eyedropper");
g_warning ("Failed to grab keyboard to do eyedropper");
return;
}
if (gdk_device_grab (gdk_device_get_associated_device (device),
window,
GDK_OWNERSHIP_NONE,
FALSE,
GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK,
NULL,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
if (gdk_pointer_grab (window,
FALSE,
GDK_BUTTON_RELEASE_MASK | GDK_BUTTON_PRESS_MASK | GDK_POINTER_MOTION_MASK,
NULL,
NULL,
gtk_get_current_event_time ()) != GDK_GRAB_SUCCESS)
{
gdk_device_ungrab (device, gtk_get_current_event_time ());
g_warning ("Failed to grab keyboard to do eyedropper");
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
g_warning ("Failed to grab pointer to do eyedropper");
return;
}

View File

@@ -353,7 +353,7 @@ utility_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -386,7 +386,7 @@ toolbar_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -410,7 +410,7 @@ menu_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -431,7 +431,7 @@ override_redirect_cb (GtkAction *action,
window = gtk_window_new (GTK_WINDOW_POPUP);
gtk_window_set_title (GTK_WINDOW (window), "Override Redirect");
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -455,7 +455,7 @@ border_only_cb (GtkAction *action,
gtk_window_set_transient_for (GTK_WINDOW (window), GTK_WINDOW (callback_data));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -477,7 +477,7 @@ changing_icon_cb (GtkAction *action,
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Changing Icon");
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
@@ -545,7 +545,7 @@ splashscreen_cb (GtkAction *action,
set_gtk_window_type (GTK_WINDOW (window), "_NET_WM_WINDOW_TYPE_SPLASHSCREEN");
gtk_window_set_title (GTK_WINDOW (window), "Splashscreen");
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_box_pack_start (GTK_BOX (vbox), image, FALSE, FALSE, 0);
@@ -581,11 +581,11 @@ make_dock (int type)
{
case DOCK_LEFT:
case DOCK_RIGHT:
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
break;
case DOCK_TOP:
case DOCK_BOTTOM:
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
box = gtk_hbox_new (FALSE, 0);
break;
case DOCK_ALL:
break;
@@ -909,7 +909,8 @@ static GtkWidget *
do_appwindow (void)
{
GtkWidget *window;
GtkWidget *grid;
GtkWidget *table;
GtkWidget *handlebox;
GtkWidget *statusbar;
GtkWidget *contents;
GtkWidget *sw;
@@ -930,12 +931,9 @@ do_appwindow (void)
g_signal_connect (G_OBJECT (window), "destroy",
G_CALLBACK (destroy_cb), NULL);
grid = gtk_grid_new ();
gtk_widget_set_vexpand (grid, TRUE);
gtk_widget_set_hexpand (grid, TRUE);
gtk_container_add (GTK_CONTAINER (window), grid);
table = gtk_table_new (1, 4, FALSE);
gtk_container_add (GTK_CONTAINER (window), table);
/* Create the menubar
*/
@@ -960,12 +958,12 @@ do_appwindow (void)
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
gtk_grid_attach (GTK_GRID (grid),
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
0, 0, 1, 1);
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
TRUE);
gtk_table_attach (GTK_TABLE (table),
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 document
*/
@@ -978,13 +976,13 @@ do_appwindow (void)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_IN);
gtk_grid_attach (GTK_GRID (grid),
sw,
0, 2, 1, 1);
gtk_widget_set_hexpand (sw, TRUE);
gtk_widget_set_vexpand (sw, TRUE);
gtk_table_attach (GTK_TABLE (table),
sw,
/* X direction */ /* Y direction */
0, 1, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
0, 0);
gtk_window_set_default_size (GTK_WINDOW (window),
200, 200);
@@ -998,22 +996,27 @@ do_appwindow (void)
/* Create the toolbar
*/
gtk_grid_attach (GTK_GRID (grid),
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
0, 1, 1, 1);
handlebox = gtk_handle_box_new ();
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
TRUE);
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 */
0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
/* Create statusbar */
statusbar = gtk_statusbar_new ();
gtk_grid_attach (GTK_GRID (grid),
statusbar,
0, 3, 1, 1);
gtk_widget_set_hexpand (statusbar,
TRUE);
gtk_table_attach (GTK_TABLE (table),
statusbar,
/* X direction */ /* Y direction */
0, 1, 3, 4,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
/* Show text widget info in the statusbar */
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (contents));

View File

@@ -1299,7 +1299,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
switch (action)
{
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_SHADE:
case META_ACTION_TITLEBAR_TOGGLE_SHADE:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@@ -1319,7 +1319,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE:
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@@ -1332,7 +1332,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE_HORIZONTALLY:
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@@ -1345,7 +1345,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case G_DESKTOP_TITLEBAR_ACTION_TOGGLE_MAXIMIZE_VERTICALLY:
case META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@@ -1358,7 +1358,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case G_DESKTOP_TITLEBAR_ACTION_MINIMIZE:
case META_ACTION_TITLEBAR_MINIMIZE:
{
meta_core_get (display, frame->xwindow,
META_CORE_GET_FRAME_FLAGS, &flags,
@@ -1371,17 +1371,17 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
}
break;
case G_DESKTOP_TITLEBAR_ACTION_NONE:
case META_ACTION_TITLEBAR_NONE:
/* Yaay, a sane user that doesn't use that other weird crap! */
break;
case G_DESKTOP_TITLEBAR_ACTION_LOWER:
case META_ACTION_TITLEBAR_LOWER:
meta_core_user_lower_and_unfocus (display,
frame->xwindow,
event->time);
break;
case G_DESKTOP_TITLEBAR_ACTION_MENU:
case META_ACTION_TITLEBAR_MENU:
meta_core_show_window_menu (display,
frame->xwindow,
event->x_root,
@@ -1389,6 +1389,9 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
event->button,
event->time);
break;
case META_ACTION_TITLEBAR_LAST:
break;
}
return TRUE;
@@ -1939,7 +1942,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
Display *display;
frames = META_FRAMES (widget);
display = GDK_DISPLAY_XDISPLAY (gdk_window_get_display (event->window));
display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
if (frame == NULL)
@@ -1968,8 +1971,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
MetaFrameControl control;
int x, y;
gdk_window_get_device_position (frame->window, event->device,
&x, &y, NULL);
gdk_window_get_pointer (frame->window, &x, &y, NULL);
/* Control is set to none unless it matches
* the current grab
@@ -2010,8 +2012,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
MetaFrameControl control;
int x, y;
gdk_window_get_device_position (frame->window, event->device,
&x, &y, NULL);
gdk_window_get_pointer (frame->window, &x, &y, NULL);
control = get_control (frames, frame, x, y);
@@ -2636,6 +2637,7 @@ control_rect (MetaFrameControl control,
return rect;
}
#define RESIZE_EXTENDS 15
#define TOP_RESIZE_HEIGHT 4
static MetaFrameControl
get_control (MetaFrames *frames,
@@ -2724,8 +2726,8 @@ get_control (MetaFrames *frames,
* in case of overlap.
*/
if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
x >= (fgeom.width - fgeom.borders.total.right))
if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SE;
@@ -2734,8 +2736,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;
}
else if (y >= (fgeom.height - fgeom.borders.total.bottom) &&
x <= fgeom.borders.total.left)
else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS) &&
x <= (fgeom.borders.total.left + RESIZE_EXTENDS))
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_SW;
@@ -2744,8 +2746,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.borders.invisible.top) &&
x <= fgeom.borders.total.left && has_north_resize)
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
x <= (fgeom.borders.total.left + RESIZE_EXTENDS) && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NW;
@@ -2754,8 +2756,8 @@ get_control (MetaFrames *frames,
else if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (y < (fgeom.borders.invisible.top) &&
x >= fgeom.width - fgeom.borders.total.right && has_north_resize)
else if (y < (fgeom.borders.invisible.top + RESIZE_EXTENDS) &&
x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS) && has_north_resize)
{
if (has_vert && has_horiz)
return META_FRAME_CONTROL_RESIZE_NE;
@@ -2769,17 +2771,17 @@ get_control (MetaFrames *frames,
if (has_vert && has_north_resize)
return META_FRAME_CONTROL_RESIZE_N;
}
else if (y >= (fgeom.height - fgeom.borders.total.bottom))
else if (y >= (fgeom.height - fgeom.borders.total.bottom - RESIZE_EXTENDS))
{
if (has_vert)
return META_FRAME_CONTROL_RESIZE_S;
}
else if (x <= fgeom.borders.total.left)
else if (x <= fgeom.borders.total.left + RESIZE_EXTENDS)
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_W;
}
else if (x >= (fgeom.width - fgeom.borders.total.right))
else if (x >= (fgeom.width - fgeom.borders.total.right - RESIZE_EXTENDS))
{
if (has_horiz)
return META_FRAME_CONTROL_RESIZE_E;

View File

@@ -116,7 +116,7 @@ popup_position_func (GtkMenu *menu,
pos = user_data;
gtk_widget_get_preferred_size (GTK_WIDGET (menu), &req, NULL);
gtk_widget_size_request (GTK_WIDGET (menu), &req);
*x = pos->x;
*y = pos->y;

View File

@@ -217,9 +217,9 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
gboolean outline)
{
MetaTabPopup *popup;
int i, left, top;
int i, left, right, top, bottom;
int height;
GtkWidget *grid;
GtkWidget *table;
GtkWidget *vbox;
GtkWidget *align;
GList *tmp;
@@ -273,12 +273,12 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
if (i % width)
height += 1;
grid = gtk_grid_new ();
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
table = gtk_table_new (height, width, FALSE);
vbox = gtk_vbox_new (FALSE, 0);
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
gtk_container_set_border_width (GTK_CONTAINER (grid), 1);
gtk_container_set_border_width (GTK_CONTAINER (table), 1);
gtk_container_add (GTK_CONTAINER (popup->window),
frame);
gtk_container_add (GTK_CONTAINER (frame),
@@ -289,7 +289,7 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
gtk_box_pack_start (GTK_BOX (vbox), align, TRUE, TRUE, 0);
gtk_container_add (GTK_CONTAINER (align),
grid);
table);
popup->label = gtk_label_new ("");
@@ -306,11 +306,13 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
max_label_width = 0;
top = 0;
bottom = 1;
tmp = popup->entries;
while (tmp && top < height)
{
left = 0;
right = 1;
while (tmp && left < width)
{
@@ -349,22 +351,26 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
te->widget = image;
gtk_grid_attach (GTK_GRID (grid),
te->widget,
left, top, 1, 1);
gtk_table_attach (GTK_TABLE (table),
te->widget,
left, right, top, bottom,
0, 0,
0, 0);
/* Efficiency rules! */
gtk_label_set_markup (GTK_LABEL (popup->label),
te->title);
gtk_widget_get_preferred_size (popup->label, &req, NULL);
gtk_widget_size_request (popup->label, &req);
max_label_width = MAX (max_label_width, req.width);
tmp = tmp->next;
++left;
++right;
}
++top;
++bottom;
}
/* remove all the temporary text */

View File

@@ -122,18 +122,19 @@ static GtkActionEntry tool_items[] =
static GtkWidget *
normal_contents (void)
{
GtkWidget *grid;
GtkWidget *table;
GtkWidget *handlebox;
GtkWidget *statusbar;
GtkWidget *contents;
GtkWidget *sw;
GtkActionGroup *action_group;
GtkUIManager *ui_manager;
grid = gtk_grid_new ();
table = gtk_table_new (1, 4, FALSE);
/* Create the menubar
*/
action_group = gtk_action_group_new ("mainmenu");
gtk_action_group_add_actions (action_group,
menu_items,
@@ -151,21 +152,24 @@ normal_contents (void)
/* create menu items */
gtk_ui_manager_add_ui_from_string (ui_manager, menu_item_string, -1, NULL);
gtk_grid_attach (GTK_GRID (grid),
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
0, 0, 1, 1);
gtk_table_attach (GTK_TABLE (table),
gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
/* X direction */ /* Y direction */
0, 1, 0, 1,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/menubar"),
TRUE);
handlebox = gtk_handle_box_new ();
/* Create the toolbar
*/
gtk_grid_attach (GTK_GRID (grid),
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
0, 1, 1, 1);
gtk_container_add (GTK_CONTAINER (handlebox),
gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"));
gtk_widget_set_hexpand (gtk_ui_manager_get_widget (ui_manager, "/ui/toolbar"),
TRUE);
gtk_table_attach (GTK_TABLE (table),
handlebox,
/* X direction */ /* Y direction */
0, 1, 1, 2,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
/* Create document
*/
@@ -179,12 +183,12 @@ normal_contents (void)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
GTK_SHADOW_IN);
gtk_grid_attach (GTK_GRID (grid),
sw,
0, 2, 1, 1);
gtk_widget_set_hexpand (sw, TRUE);
gtk_widget_set_vexpand (sw, TRUE);
gtk_table_attach (GTK_TABLE (table),
sw,
/* X direction */ /* Y direction */
0, 1, 2, 3,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
0, 0);
contents = gtk_text_view_new ();
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (contents),
@@ -196,17 +200,18 @@ normal_contents (void)
/* Create statusbar */
statusbar = gtk_statusbar_new ();
gtk_grid_attach (GTK_GRID (grid),
statusbar,
0, 3, 1, 1);
gtk_table_attach (GTK_TABLE (table),
statusbar,
/* X direction */ /* Y direction */
0, 1, 3, 4,
GTK_EXPAND | GTK_FILL, 0,
0, 0);
gtk_widget_set_hexpand (statusbar, TRUE);
gtk_widget_show_all (grid);
gtk_widget_show_all (table);
g_object_unref (ui_manager);
return grid;
return table;
}
static void
@@ -228,7 +233,7 @@ dialog_contents (void)
GtkWidget *image;
GtkWidget *button;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
action_area = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
@@ -253,7 +258,7 @@ dialog_contents (void)
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (hbox), image,
FALSE, FALSE, 0);
@@ -273,11 +278,11 @@ dialog_contents (void)
static GtkWidget*
utility_contents (void)
{
GtkWidget *grid;
GtkWidget *table;
GtkWidget *button;
int i, j;
grid = gtk_grid_new ();
table = gtk_table_new (3, 4, FALSE);
i = 0;
while (i < 3)
@@ -293,9 +298,12 @@ utility_contents (void)
g_free (str);
gtk_grid_attach (GTK_GRID (grid),
button,
i, j, 1, 1);
gtk_table_attach (GTK_TABLE (table),
button,
/* X direction */ /* Y direction */
i, i+1, j, j+1,
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL,
0, 0);
++j;
}
@@ -303,9 +311,9 @@ utility_contents (void)
++i;
}
gtk_widget_show_all (grid);
gtk_widget_show_all (table);
return grid;
return table;
}
static GtkWidget*
@@ -320,7 +328,7 @@ menu_contents (void)
gtk_frame_set_shadow_type (GTK_FRAME (frame),
GTK_SHADOW_OUT);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
i = 0;
while (i < 10)
@@ -357,7 +365,7 @@ border_only_contents (void)
color.alpha = 1.0;
gtk_widget_override_background_color (event_box, 0, &color);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
vbox = gtk_vbox_new (FALSE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 3);
w = gtk_label_new (_("Border-only window"));
@@ -479,7 +487,7 @@ preview_collection (int font_size,
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_box_set_spacing (GTK_BOX (box), 20);
gtk_container_set_border_width (GTK_CONTAINER (box), 20);
@@ -703,7 +711,7 @@ previews_of_button_layouts (void)
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
box = gtk_vbox_new (FALSE, 0);
gtk_box_set_spacing (GTK_BOX (box), 20);
gtk_container_set_border_width (GTK_CONTAINER (box), 20);

View File

@@ -6403,8 +6403,6 @@ meta_gtk_state_from_string (const char *str)
return GTK_STATE_FLAG_INCONSISTENT;
else if (g_ascii_strcasecmp ("focused", str) == 0)
return GTK_STATE_FLAG_FOCUSED;
else if (g_ascii_strcasecmp ("window-unfocused", str) == 0)
return GTK_STATE_FLAG_WINDOW_UNFOCUSED;
else
return -1; /* hack */
}
@@ -6428,8 +6426,6 @@ meta_gtk_state_to_string (GtkStateFlags state)
return "INCONSISTENT";
case GTK_STATE_FLAG_FOCUSED:
return "FOCUSED";
case GTK_STATE_FLAG_WINDOW_UNFOCUSED:
return "WINDOW_UNFOCUSED";
}
return "<unknown>";

View File

@@ -102,7 +102,6 @@ maybe_redirect_mouse_event (XEvent *xevent)
{
GdkDisplay *gdisplay;
GdkDeviceManager *gmanager;
GdkDevice *gdevice;
MetaUI *ui;
GdkEvent *gevent;
GdkWindow *gdk_window;
@@ -134,14 +133,11 @@ maybe_redirect_mouse_event (XEvent *xevent)
if (gdk_window == NULL)
return FALSE;
gmanager = gdk_display_get_device_manager (gdisplay);
gdevice = gdk_device_manager_get_client_pointer (gmanager);
/* If GDK already thinks it has a grab, we better let it see events; this
* is the menu-navigation case and events need to get sent to the appropriate
* (client-side) subwindow for individual menu items.
*/
if (gdk_display_device_is_grabbed (gdisplay, gdevice))
if (gdk_display_pointer_is_grabbed (gdisplay))
return FALSE;
switch (xevent->type)
@@ -211,7 +207,8 @@ maybe_redirect_mouse_event (XEvent *xevent)
}
/* If we've gotten here, we've created the gdk_event and should send it on */
gdk_event_set_device (gevent, gdevice);
gmanager = gdk_display_get_device_manager (gdisplay);
gdk_event_set_device (gevent, gdk_device_manager_get_client_pointer (gmanager));
gtk_main_do_event (gevent);
gdk_event_free (gevent);

View File

@@ -195,6 +195,10 @@ class test_ansi(BuildTest):
def run(self):
return self.run_build(c='ansi')
class test_gconfoff(BuildTest):
def run(self):
return self.run_build(autogen='--disable-gconf')
class test_compositoroff(BuildTest):
def run(self):
return self.run_build(autogen='--disable-compositor')