Commit d0910da0 authored by Florian Müllner's avatar Florian Müllner

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
parent a2726f41
......@@ -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
......
......@@ -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,
......
......@@ -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:
......
......@@ -62,20 +62,13 @@ AC_CHECK_SIZEOF(__int64)
AC_C_BIGENDIAN
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"
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}
......
......@@ -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
......
......@@ -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
......
......@@ -19,7 +19,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
......
......@@ -226,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 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 +262,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=$(srcdir)/mutter-schemas.convert
IMAGES=stock_maximize.png stock_minimize.png stock_delete.png
VARIABLES=stock_maximize_data $(srcdir)/stock_maximize.png \
......@@ -287,7 +279,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 +296,7 @@ EXTRA_DIST=$(desktopfiles_files) \
$(IMAGES) \
$(desktopfiles_in_files) \
$(wmproperties_in_files) \
$(schema_in_files) \
org.gnome.mutter.gschema.xml.in \
libmutter.pc.in \
mutter-plugins.pc.in \
mutter-enum-types.h.in \
......
This diff is collapsed.
......@@ -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,13 +277,13 @@ 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:
case G_DESKTOP_VISUAL_BELL_NONE:
/* do nothing */
break;
}
......@@ -293,9 +293,8 @@ void
meta_bell_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
/* flash something */
if (meta_prefs_get_visual_bell ())
bell_visual_notify (display, xkb_ev);
/* flash something if appropriate */
bell_visual_notify (display, xkb_ev);
#ifdef HAVE_LIBCANBERRA
if (meta_prefs_bell_is_audible ())
......
......@@ -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 */
......
......@@ -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;
......
......@@ -49,7 +49,7 @@
static gboolean all_bindings_disabled = FALSE;
/* Prototypes for handlers */
#define keybind(name, handler, param, flags, stroke, description) \
#define keybind(name, handler, param, flags) \
static void \
handler (MetaDisplay *display,\
MetaScreen *screen,\
......@@ -103,7 +103,7 @@ static gboolean process_workspace_switch_grab (MetaDisplay *display,
static void regrab_key_bindings (MetaDisplay *display);
#define keybind(name, handler, param, flags, stroke, description) \
#define keybind(name, handler, param, flags) \
{ #name, handler, handler, param, flags, NULL, NULL },
static MetaKeyHandler key_handlers[] = {
#include "all-keybindings.h"
......@@ -2183,7 +2183,7 @@ process_tab_grab (MetaDisplay *display,
{
if (end_keyboard_grab (display, event->xkey.keycode))
{
invoke_handler_by_name (display, screen, "tab_popup_select", NULL, event);
invoke_handler_by_name (display, screen, "tab-popup-select", NULL, event);
/* We return FALSE to end the grab; if the handler ended the grab itself
* that will be a noop. If the handler didn't end the grab, then it's a
......@@ -2239,7 +2239,7 @@ process_tab_grab (MetaDisplay *display,
}
/* Some unhandled key press */
invoke_handler_by_name (display, screen, "tab_popup_cancel", NULL, event);
invoke_handler_by_name (display, screen, "tab-popup-cancel", NULL, event);
return FALSE;
}
......@@ -2496,138 +2496,6 @@ handle_switch_to_workspace (MetaDisplay *display,
}
}
static void
error_on_command (int command_index,
const char *command,
const char *message,
MetaScreen *screen,
guint32 timestamp)
{
if (command_index < 0)
meta_warning ("Error on terminal command \"%s\": %s\n", command, message);
else
meta_warning ("Error on command %d \"%s\": %s\n",
command_index, command, message);
/*
mutter-dialog said:
FIXME offer to change the value of the command's gconf key
*/
if (command && strcmp(command, "")!=0)
{
char *text = g_strdup_printf (
/* Displayed when a keybinding which is
* supposed to launch a program fails.
*/
_("There was an error running "
"<tt>%s</tt>:\n\n%s"),
command,
message);
meta_show_dialog ("--error",
text,
NULL,
screen->screen_name,
NULL, NULL, 0,
NULL, NULL);
g_free (text);
}
else
{
meta_show_dialog ("--error",
message,
NULL,
screen->screen_name,
NULL, NULL, 0,
NULL, NULL);
}
}
static void
set_display_setup_func (void *data)
{
const char *screen_name = data;
char *full;
full = g_strdup_printf ("DISPLAY=%s", screen_name);
putenv (full);
/* do not free full, because putenv is lame */
}
static gboolean
meta_spawn_command_line_async_on_screen (const gchar *command_line,
MetaScreen *screen,
GError **error)
{
gboolean retval;
gchar **argv = NULL;
g_return_val_if_fail (command_line != NULL, FALSE);
if (!g_shell_parse_argv (command_line,
NULL, &argv,
error))
return FALSE;
retval = g_spawn_async (NULL,
argv,
NULL,
G_SPAWN_SEARCH_PATH,
set_display_setup_func,
screen->screen_name,
NULL,
error);
g_strfreev (argv);
return retval;
}
static void
handle_run_command (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding,
gpointer dummy)
{
gint which = binding->handler->data;
const char *command;
GError *err;
command = meta_prefs_get_command (which);
if (command == NULL)
{
char *s;
meta_topic (META_DEBUG_KEYBINDINGS,
"No command %d to run in response to keybinding press\n",
which);
s = g_strdup_printf (_("No command %d has been defined.\n"),
which + 1);
error_on_command (which, NULL, s, screen, event->xkey.time);
g_free (s);
return;
}
err = NULL;
if (!meta_spawn_command_line_async_on_screen (command, screen, &err))
{
error_on_command (which, command, err->message, screen, event->xkey.time);
g_error_free (err);
}
}
static void
handle_maximize_vertically (MetaDisplay *display,
......@@ -3602,44 +3470,6 @@ meta_set_keybindings_disabled (gboolean setting)
"Keybindings %s\n", all_bindings_disabled ? "disabled" : "enabled");
}
static void
handle_run_terminal (MetaDisplay *display,
MetaScreen *screen,
MetaWindow *window,
XEvent *event,
MetaKeyBinding *binding,
gpointer dummy)
{
const char *command;
GError *err;
command = meta_prefs_get_terminal_command ();
if (command == NULL)
{
char *s;
meta_topic (META_DEBUG_KEYBINDINGS,
"No terminal command to run in response to "
"keybinding press\n");
s = g_strdup_printf (_("No terminal command has been defined.\n"));
error_on_command (-1, NULL, s, screen, event->xkey.time);
g_free (s);
return;
}
err = NULL;
if (!meta_spawn_command_line_async_on_screen (command, screen, &err))
{
error_on_command (-1, command, err->message, screen,
event->xkey.time);
g_error_free (err);
}
}
gboolean
meta_keybindings_set_custom_handler (const gchar *name,
MetaKeyHandlerFunc handler,
......
This diff is collapsed.
......@@ -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 =
......
......@@ -2277,7 +2277,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
......@@ -2617,7 +2617,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,
......@@ -2952,7 +2952,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);
......@@ -6836,7 +6836,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);
......@@ -6889,7 +6889,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);
}
......@@ -9867,7 +9867,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;
}
......
......@@ -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
......
......@@ -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}
/* -*- 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!
*/
/*