Compare commits

...

21 Commits

Author SHA1 Message Date
393a80d434 Add _DBUS_UNIQUE_NAME and _OBJECT_PATH properties
https://bugzilla.gnome.org/show_bug.cgi?id=664851
2011-12-05 12:54:29 -05:00
a2f95e115c Load _DBUS_APPLICATION_ID property, expose it via API
This is used to associate GtkApplication -> X window, and will
be consumed by gnome-shell.

https://bugzilla.gnome.org/show_bug.cgi?id=664851
2011-12-05 12:52:29 -05:00
b3114bb9e5 Updated Norwegian bokmål translation 2011-12-01 20:29:38 +01:00
497f9be61e window: Listen for pref changes
The workspaces-only-on-primary preference changes how windows are
displayed, so listen for pref changes and update the visibility
accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=664853
2011-11-26 11:34:03 +01:00
a88365df9b Updated Slovenian translation 2011-11-25 21:25:10 +01:00
47f98c5528 Bump version to 3.3.2
Update NEWS
2011-11-21 19:04:44 -05:00
0e50287aea keybindings: Allow to add/remove keybindings at runtime
Add meta_display_add_keybinding()/meta_display_remove_keybinding(),
which allow to add/remove keybindings dynamically at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=663428
2011-11-22 00:42:30 +01:00
d42a2a3c27 keybindings: Store keybindings dynamically
Rather than defining keybindings in static arrays generated at compile
time, store them in a hash table initialized in meta_display_init_keys()
and filled in init_builtin_keybindings().

This is a prerequisite for allowing to add/remove keybindings at runtime.

https://bugzilla.gnome.org/show_bug.cgi?id=663428
2011-11-22 00:42:30 +01:00
78849bef04 Updated Spanish translation 2011-11-17 14:20:54 +01:00
b1a69d1e89 prefs: Fix typo 2011-11-14 20:13:56 +01:00
c5468ee391 prefs: Adapt to re-addition of a separate visual-bell option
Commit d0910da036 merged the visual-bell/visual-bell-type options,
but the change turned out too disruptive for gnome-control-center /
gnome-shell, so gsettings-desktop-schemas commit a5819b2a4e9 re-added
the separate option.
2011-11-14 15:43:48 +01:00
7ce7feeb2b Updated Norwegian bokmål translation 2011-11-13 11:15:37 +01:00
c0432ebb39 build: Specify a minimum version for gsettings-desktop-schemas
The version has been bumped, so we can now depend on a version
which includes the new wm schemas.
2011-11-12 15:29:41 +01:00
1a51d307c8 Fix installation of mutter-schemas.convert 2011-11-11 21:39:54 +01:00
d0910da036 Port preferences to GSettings
Move preferences to GSettings, using mainly shared schemas from
gsettings-desktop-schemas.

Unlike GConf, GSettings support is not optional, as Gio is already
a hard dependency of GTK+.

https://bugzilla.gnome.org/show_bug.cgi?id=635378
2011-11-11 20:26:38 +01:00
a2726f41c9 ui: Replace deprecated gtk_widget_size_request 2011-11-11 09:33:42 +01:00
162213be0d Fix cogl crash from updating non-existent texture
The code here was always incorrect - we were processing damage events for
windows without having a texture. Before, this didn't matter, as
cogl_texture_get_width silently returned 0 for invalid handles. Cogl commit
4c3dadd35e changed this.

The fix here involves two strategies. First, we try to guard MetaTextureTower
from invalid textures. Second, we try not to go down the path that eventually
calls meta_shaped_texture_update_area by not handling damage events if we
don't have a texture for the window.

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2011-11-10 16:40:12 -05:00
1596d1af10 meta-window-group: Fix types typo
gboolean is a typedef for int, so it doesn't matter too much

https://bugzilla.gnome.org/show_bug.cgi?id=660941
2011-11-10 15:52:25 -05:00
441287dc64 theme: handle GTK_STATE_FLAG_WINDOW_UNFOCUSED
This bumps the required GTK+ version to >= 3.3.3 .
2011-11-08 20:59:41 +00:00
6e47f0e846 window: add _NET_WM_STATE_FOCUSED hint to _NET_WM_STATE
This hint reflects whether a window appears focused.

https://bugzilla.gnome.org/show_bug.cgi?id=661427
2011-11-08 19:19:32 +00:00
4fb2fab7f7 window.c: add meta_window_move_resize_frame
meta_window_move_resize_frame operates much like
meta_window_move_resize, but ensures the window
and its frame (if present) will fit within the
specified dimensions.

https://bugzilla.gnome.org/show_bug.cgi?id=651899
2011-11-05 18:52:43 -04:00
42 changed files with 3267 additions and 4642 deletions

3
.gitignore vendored
View File

@ -48,7 +48,8 @@ libmutter.pc
mutter
mutter-theme-viewer
mutter.desktop
mutter.schemas
org.gnome.mutter.gschema.valid
org.gnome.mutter.gschema.xml
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+ >= 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
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
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,

25
NEWS
View File

@ -1,3 +1,28 @@
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)
3.2.1
=====
* Allow keyboard window switching (alt-Tab) during drag-and-drop

29
README
View File

@ -18,8 +18,7 @@ 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. You also need GConf 1.2 (unless building a funky
extra-small embedded metacity with --disable-gconf, see below).
GNOME ftp site.
You need Clutter 1.0. You need gobject-introspection 0.6.3.
REPORTING BUGS AND SUBMITTING PATCHES
@ -59,25 +58,24 @@ 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 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
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
See theme-format.txt for docs on the theme format. Use
metacity-theme-viewer to preview themes.
- Change number of workspaces via gconf-editor or gconftool:
gconftool-2 --type=int --set /apps/metacity/general/num_workspaces 5
- Change number of workspaces via gsettings:
gsettings set org.gnome.desktop.wm.preferences num-workspaces 5
Can also change workspaces from GNOME 2 pager.
- Change focus mode:
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
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
- Global keybinding defaults include:
@ -92,10 +90,9 @@ MUTTER FEATURES
Change keybindings for example:
unst gconftool-2 --type=string --set /apps/metacity/global_keybindings/switch_to_workspace_1 '<Alt>F1'
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 '[<Alt>F1]'
Also try the GNOME keyboard shortcuts control panel, or
gconf-editor.
Also try the GNOME keyboard shortcuts control panel.
- Window keybindings:

View File

@ -1,8 +1,8 @@
AC_PREREQ(2.50)
m4_define([mutter_major_version], [3])
m4_define([mutter_minor_version], [2])
m4_define([mutter_micro_version], [1])
m4_define([mutter_minor_version], [3])
m4_define([mutter_micro_version], [2])
m4_define([mutter_version],
[mutter_major_version.mutter_minor_version.mutter_micro_version])
@ -61,21 +61,14 @@ AC_CHECK_SIZEOF(__int64)
## byte order
AC_C_BIGENDIAN
GTK_MIN_VERSION=2.91.7
GTK_MIN_VERSION=3.3.3
GIO_MIN_VERSION=2.25.10
CANBERRA_GTK=libcanberra-gtk3
CANBERRA_GTK_VERSION=0.26
MUTTER_PC_MODULES="gtk+-3.0 >= $GTK_MIN_VERSION pango >= 1.2.0 cairo >= 1.10.0"
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"
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
GLIB_GSETTINGS
AC_ARG_ENABLE(verbose-mode,
AC_HELP_STRING([--disable-verbose-mode],
@ -400,18 +393,6 @@ 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])
@ -511,13 +492,6 @@ 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"
@ -534,7 +508,6 @@ 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 gconf database.
Reload a theme which is specified on gsettings database.
.TP
.B enable-keybindings
Enable all of keybindings which is specified on gconf database.
Enable all of keybindings which is specified on gsettings database.
.TP
.B disable-keybindings
Disable all of keybindings which is specified on gconf database.
Disable all of keybindings which is specified on gsettings 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 gconf editing (gconf-editor or gconftool-2).
\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.
.SH SEE ALSO
.BR mutter-message (1)
.SH AUTHOR

View File

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

1408
po/es.po

File diff suppressed because it is too large Load Diff

677
po/nb.po

File diff suppressed because it is too large Load Diff

763
po/sl.po

File diff suppressed because it is too large Load Diff

View File

@ -152,7 +152,6 @@ 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)
@ -226,7 +225,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 Gdk-3.0 Gtk-3.0 Clutter-1.0 xlib-2.0 xfixes-4.0
@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@_PACKAGES = clutter-1.0 gtk+-3.0
@META_GIR@_CFLAGS = $(INCLUDES)
@META_GIR@_LIBS = libmutter.la
@ -262,20 +261,12 @@ wmproperties_in_files=mutter-wm.desktop.in
wmproperties_files=$(wmproperties_in_files:.desktop.in=.desktop)
wmproperties_DATA = $(wmproperties_files)
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@
@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
convertdir = $(datadir)/GConf/gsettings
convert_DATA = mutter-schemas.convert
IMAGES=stock_maximize.png stock_minimize.png stock_delete.png
VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
@ -287,7 +278,7 @@ CLEANFILES = \
inlinepixbufs.h \
mutter.desktop \
mutter-wm.desktop \
mutter.schemas \
org.gnome.mutter.gschema.xml \
$(mutter_built_sources) \
$(typelib_DATA) \
$(gir_DATA)
@ -304,7 +295,8 @@ EXTRA_DIST=$(desktopfiles_files) \
$(IMAGES) \
$(desktopfiles_in_files) \
$(wmproperties_in_files) \
$(schema_in_files) \
org.gnome.mutter.gschema.xml.in \
mutter-schemas.convert \
libmutter.pc.in \
mutter-plugins.pc.in \
mutter-enum-types.h.in \

View File

@ -198,6 +198,9 @@ 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

@ -958,6 +958,9 @@ 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,
@ -2029,6 +2032,8 @@ 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

@ -186,7 +186,7 @@ meta_window_group_paint (ClutterActor *actor)
if (META_IS_WINDOW_ACTOR (l->data))
{
MetaWindowActor *window_actor = l->data;
gboolean x, y;
int x, y;
if (!actor_is_untransformed (CLUTTER_ACTOR (window_actor), &x, &y))
continue;

View File

@ -1,400 +0,0 @@
/* -*- 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 () != META_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK &&
!display->mouse_mode)
meta_display_increment_focus_sentinel (display);
XFlush (display->xdisplay);
@ -277,15 +277,12 @@ bell_visual_notify (MetaDisplay *display,
{
switch (meta_prefs_get_visual_bell_type ())
{
case META_VISUAL_BELL_FULLSCREEN_FLASH:
case G_DESKTOP_VISUAL_BELL_FULLSCREEN_FLASH:
bell_flash_fullscreen (display, xkb_ev);
break;
case META_VISUAL_BELL_FRAME_FLASH:
case G_DESKTOP_VISUAL_BELL_FRAME_FLASH:
bell_flash_frame (display, xkb_ev); /* does nothing yet */
break;
case META_VISUAL_BELL_INVALID:
/* do nothing */
break;
}
}
@ -294,7 +291,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

@ -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 () == META_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () == G_DESKTOP_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

@ -1921,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 () == META_FOCUS_MODE_CLICK &&
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
meta_prefs_get_application_based () &&
!window->has_focus &&
window->type != META_WINDOW_DOCK &&
@ -2009,8 +2009,8 @@ event_callback (XEvent *event,
{
switch (meta_prefs_get_focus_mode ())
{
case META_FOCUS_MODE_SLOPPY:
case META_FOCUS_MODE_MOUSE:
case G_DESKTOP_FOCUS_MODE_SLOPPY:
case G_DESKTOP_FOCUS_MODE_MOUSE:
display->mouse_mode = TRUE;
if (window->type != META_WINDOW_DOCK &&
window->type != META_WINDOW_DESKTOP)
@ -2048,7 +2048,7 @@ event_callback (XEvent *event,
* alternative mechanism works great.
*/
if (window->type == META_WINDOW_DESKTOP &&
meta_prefs_get_focus_mode() == META_FOCUS_MODE_MOUSE &&
meta_prefs_get_focus_mode() == G_DESKTOP_FOCUS_MODE_MOUSE &&
display->expected_focus_window != NULL)
{
meta_topic (META_DEBUG_FOCUS,
@ -2060,7 +2060,7 @@ event_callback (XEvent *event,
event->xcrossing.time);
}
break;
case META_FOCUS_MODE_CLICK:
case G_DESKTOP_FOCUS_MODE_CLICK:
break;
}
@ -4003,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 () != META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
{
meta_verbose (" (well, not grabbing since not in click to focus mode)\n");
return;

View File

@ -31,6 +31,26 @@
#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);
@ -52,6 +72,14 @@ 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

File diff suppressed because it is too large Load Diff

View File

@ -1186,7 +1186,7 @@ prefs_changed_callback (MetaPreference pref,
if (pref == META_PREF_NUM_WORKSPACES)
{
/* GConf doesn't provide timestamps, but luckily update_num_workspaces
/* GSettings doesn't provide timestamps, but luckily update_num_workspaces
* often doesn't need it...
*/
guint32 timestamp =

View File

@ -97,9 +97,13 @@ 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 net_wm_pid;

View File

@ -1592,6 +1592,78 @@ reload_gtk_theme_variant (MetaWindow *window,
}
}
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))
{
g_free (current_id);
if (new_id)
window->dbus_application_id = g_strdup (new_id);
else
window->dbus_application_id = 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))
{
g_free (current_id);
if (new_id)
window->dbus_unique_name = g_strdup (new_id);
else
window->dbus_unique_name = NULL;
g_object_notify ((GObject*)window, "dbus-unique-name");
}
}
static void
reload_dbus_object_path (MetaWindow *window,
MetaPropValue *value,
gboolean initial)
{
char *new_path = NULL;
char *current_path = window->dbus_object_path;
if (value->type != META_PROP_VALUE_INVALID)
new_path = value->v.str;
if (g_strcmp0 (new_path, current_path))
{
g_free (current_path);
if (new_path)
window->dbus_object_path = g_strdup (new_path);
else
window->dbus_object_path = NULL;
g_object_notify ((GObject*)window, "dbus-object-path");
}
}
/**
* Initialises the property hooks system. Each row in the table named "hooks"
* represents an action to take when a property is found on a newly-created
@ -1645,6 +1717,9 @@ meta_display_init_window_prop_hooks (MetaDisplay *display)
{ display->atom__MOTIF_WM_HINTS, META_PROP_VALUE_MOTIF_HINTS, reload_mwm_hints, TRUE, FALSE },
{ XA_WM_TRANSIENT_FOR, META_PROP_VALUE_WINDOW, reload_transient_for, TRUE, FALSE },
{ display->atom__GTK_THEME_VARIANT, META_PROP_VALUE_UTF8, reload_gtk_theme_variant, TRUE, FALSE },
{ display->atom__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,7 +164,10 @@ enum {
PROP_APPEARS_FOCUSED,
PROP_RESIZEABLE,
PROP_ABOVE,
PROP_WM_CLASS
PROP_WM_CLASS,
PROP_DBUS_APPLICATION_ID,
PROP_DBUS_UNIQUE_NAME,
PROP_DBUS_OBJECT_PATH
};
enum
@ -179,6 +182,20 @@ 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)
{
@ -195,6 +212,8 @@ meta_window_finalize (GObject *object)
meta_icon_cache_free (&window->icon_cache);
meta_prefs_remove_listener (prefs_changed_callback, window);
g_free (window->sm_client_id);
g_free (window->wm_client_machine);
g_free (window->startup_id);
@ -205,6 +224,9 @@ meta_window_finalize (GObject *object)
g_free (window->icon_name);
g_free (window->desc);
g_free (window->gtk_theme_variant);
g_free (window->dbus_application_id);
g_free (window->dbus_unique_name);
g_free (window->dbus_object_path);
}
static void
@ -268,6 +290,15 @@ 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;
@ -434,6 +465,30 @@ 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",
"_DBUS_APPLICATION_ID",
"Contents of the _DBUS_APPLICATION_ID property of this window",
NULL,
G_PARAM_READABLE));
g_object_class_install_property (object_class,
PROP_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),
@ -475,6 +530,7 @@ meta_window_class_init (MetaWindowClass *klass)
static void
meta_window_init (MetaWindow *self)
{
meta_prefs_add_listener (prefs_changed_callback, self);
}
#ifdef WITH_VERBOSE_MODE
@ -1897,7 +1953,7 @@ static void
set_net_wm_state (MetaWindow *window)
{
int i;
unsigned long data[12];
unsigned long data[13];
i = 0;
if (window->shaded)
@ -1960,6 +2016,11 @@ 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);
@ -2272,7 +2333,7 @@ idle_calc_showing (gpointer data)
tmp = tmp->next;
}
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () != G_DESKTOP_FOCUS_MODE_CLICK)
{
/* When display->mouse_mode is false, we want to ignore
* EnterNotify events unless they come from mouse motion. To do
@ -2612,7 +2673,7 @@ window_state_on_map (MetaWindow *window,
* approximation to enforce so we do that.
*/
if (*takes_focus &&
meta_prefs_get_focus_new_windows () == META_FOCUS_NEW_WINDOWS_STRICT &&
meta_prefs_get_focus_new_windows () == G_DESKTOP_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,
@ -2947,7 +3008,7 @@ meta_window_show (MetaWindow *window)
* that new window below a lot of other windows.
*/
if (overlap ||
(meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK &&
(meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK &&
meta_prefs_get_raise_on_click ()))
meta_window_stack_just_below (window, focus_window);
@ -4996,6 +5057,41 @@ 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
@ -6594,6 +6690,17 @@ 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
@ -6639,9 +6746,7 @@ meta_window_propagate_focus_appearance (MetaWindow *window,
if (child_focus_state_changed && !parent->has_focus &&
parent != window->display->expected_focus_window)
{
g_object_notify (G_OBJECT (parent), "appears-focused");
if (parent->frame)
meta_frame_queue_draw (parent->frame);
meta_window_appears_focused_changed (parent);
}
child = parent;
@ -6787,7 +6892,7 @@ meta_window_notify_focus (MetaWindow *window,
*
* There is dicussion in bugs 102209, 115072, and 461577
*/
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
!meta_prefs_get_raise_on_click())
meta_display_ungrab_focus_window_button (window->display, window);
@ -6795,11 +6900,8 @@ meta_window_notify_focus (MetaWindow *window,
g_object_notify (G_OBJECT (window->display), "focus-window");
if (!window->attached_focus_window)
{
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
meta_window_appears_focused_changed (window);
meta_window_propagate_focus_appearance (window, TRUE);
}
}
@ -6832,11 +6934,7 @@ meta_window_notify_focus (MetaWindow *window,
window->has_focus = FALSE;
if (!window->attached_focus_window)
{
g_object_notify (G_OBJECT (window), "appears-focused");
if (window->frame)
meta_frame_queue_draw (window->frame);
}
meta_window_appears_focused_changed (window);
meta_error_trap_push (window->display);
XUninstallColormap (window->display->xdisplay,
@ -6847,7 +6945,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 () == META_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
!meta_prefs_get_raise_on_click ())
meta_display_grab_focus_window_button (window->display, window);
}
@ -9825,7 +9923,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 () ==
META_FOCUS_NEW_WINDOWS_STRICT &&
G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
__window_is_terminal (window))
window->display->allow_terminal_deactivation = FALSE;
}
@ -10152,6 +10250,42 @@ 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

View File

@ -1201,7 +1201,7 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
}
if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK ||
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK ||
!workspace->screen->display->mouse_mode)
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
else
@ -1239,9 +1239,9 @@ meta_workspace_focus_default_window (MetaWorkspace *workspace,
window);
}
}
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_SLOPPY)
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_SLOPPY)
focus_ancestor_or_mru_window (workspace, not_this_one, timestamp);
else if (meta_prefs_get_focus_mode () == META_FOCUS_MODE_MOUSE)
else if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_MOUSE)
{
meta_topic (META_DEBUG_FOCUS,
"Setting focus to no_focus_window, since no valid "
@ -1300,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 () == META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () == G_DESKTOP_FOCUS_MODE_CLICK)
meta_window_raise (ancestor);
return;
@ -1346,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 () == META_FOCUS_MODE_CLICK)
if (meta_prefs_get_focus_mode () == G_DESKTOP_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: gtk+-3.0 @CLUTTER_PACKAGE@ x11
Requires: gsettings-desktop-schemas 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,6 +59,9 @@ item(_MUTTER_SET_KEYBINDINGS_MESSAGE)
item(_MUTTER_TOGGLE_VERBOSE)
item(_MUTTER_HINTS)
item(_GTK_THEME_VARIANT)
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)
@ -164,6 +167,7 @@ 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,6 +1,9 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* Mutter common types shared by core.h and ui.h */
/* Mutter common types shared by core.h and ui.h
*
* PLEASE KEEP IN SYNC WITH GSETTINGS SCHEMAS!
*/
/*
* Copyright (C) 2001 Havoc Pennington
@ -164,32 +167,6 @@ 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,
@ -374,10 +351,8 @@ 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,6 +124,16 @@ 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,37 +23,11 @@
#include <meta/display.h>
#include <meta/common.h>
/**
* 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;
};
#define META_TYPE_KEY_BINDING (meta_key_binding_get_type ())
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,8 +27,11 @@
/* 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,
@ -47,8 +50,6 @@ 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,
@ -77,16 +78,16 @@ void meta_prefs_remove_listener (MetaPrefsChangedFunc func,
void meta_prefs_init (void);
void meta_prefs_override_preference_location (const char *original_key,
const char *new_key);
void meta_prefs_override_preference_schema (const char *key,
const char *schema);
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);
MetaFocusMode meta_prefs_get_focus_mode (void);
MetaFocusNewWindows meta_prefs_get_focus_new_windows (void);
GDesktopFocusMode meta_prefs_get_focus_mode (void);
GDesktopFocusNewWindows 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);
@ -101,19 +102,18 @@ 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_command (int i);
const char* meta_prefs_get_screenshot_command (void);
char* meta_prefs_get_gconf_key_for_command (int i);
const char* meta_prefs_get_window_screenshot_command (void);
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 */
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);
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);
void meta_prefs_set_num_workspaces (int n_workspaces);
@ -187,41 +187,6 @@ 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,
@ -269,6 +234,15 @@ 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;
@ -276,16 +250,31 @@ 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
{
const char *name;
const char *default_keybinding;
char *name;
char *schema;
MetaKeyBindingAction action;
/**
* A list of MetaKeyCombos. Each of them is bound to
* this keypref. If one has keysym==modifiers==0, it is
* ignored. For historical reasons, the first entry is
* governed by the pref FOO and the remainder are
* governed by the pref FOO_list.
* ignored.
*/
GSList *bindings;
@ -294,10 +283,14 @@ 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;
void meta_prefs_get_key_bindings (const MetaKeyPref **bindings,
int *n_bindings);
GType meta_key_binding_get_type (void);
GList *meta_prefs_get_keybindings (void);
MetaKeyBindingAction meta_prefs_get_keybinding_action (const char *name);
@ -307,17 +300,9 @@ 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);
MetaVisualBellType meta_prefs_get_visual_bell_type (void);
GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
#endif

View File

@ -95,8 +95,13 @@ const char * meta_window_get_wm_class (MetaWindow *window);
const char * meta_window_get_wm_class_instance (MetaWindow *window);
gboolean meta_window_showing_on_its_workspace (MetaWindow *window);
const char * meta_window_get_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);

View File

@ -0,0 +1,6 @@
[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

View File

@ -1,89 +0,0 @@
<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

@ -0,0 +1,97 @@
<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="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

@ -1299,7 +1299,7 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
switch (action)
{
case META_ACTION_TITLEBAR_TOGGLE_SHADE:
case G_DESKTOP_TITLEBAR_ACTION_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 META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE:
case G_DESKTOP_TITLEBAR_ACTION_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 META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_HORIZONTALLY:
case G_DESKTOP_TITLEBAR_ACTION_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 META_ACTION_TITLEBAR_TOGGLE_MAXIMIZE_VERTICALLY:
case G_DESKTOP_TITLEBAR_ACTION_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 META_ACTION_TITLEBAR_MINIMIZE:
case G_DESKTOP_TITLEBAR_ACTION_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 META_ACTION_TITLEBAR_NONE:
case G_DESKTOP_TITLEBAR_ACTION_NONE:
/* Yaay, a sane user that doesn't use that other weird crap! */
break;
case META_ACTION_TITLEBAR_LOWER:
case G_DESKTOP_TITLEBAR_ACTION_LOWER:
meta_core_user_lower_and_unfocus (display,
frame->xwindow,
event->time);
break;
case META_ACTION_TITLEBAR_MENU:
case G_DESKTOP_TITLEBAR_ACTION_MENU:
meta_core_show_window_menu (display,
frame->xwindow,
event->x_root,
@ -1389,9 +1389,6 @@ meta_frame_titlebar_event (MetaUIFrame *frame,
event->button,
event->time);
break;
case META_ACTION_TITLEBAR_LAST:
break;
}
return TRUE;

View File

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

View File

@ -356,7 +356,7 @@ meta_ui_tab_popup_new (const MetaTabEntry *entries,
/* Efficiency rules! */
gtk_label_set_markup (GTK_LABEL (popup->label),
te->title);
gtk_widget_size_request (popup->label, &req);
gtk_widget_get_preferred_size (popup->label, &req, NULL);
max_label_width = MAX (max_label_width, req.width);
tmp = tmp->next;

View File

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

View File

@ -195,10 +195,6 @@ 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')