mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
Fix cursor size update on non-wayland
This commit is contained in:
parent
114bfc04ef
commit
25fd9e005b
@ -36,6 +36,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "keybindings-private.h"
|
||||
#include "meta-accel-parse.h"
|
||||
#include "x11/meta-x11-display-private.h"
|
||||
|
||||
/* If you add a key, it needs updating in init() and in the gsettings
|
||||
* notify listener and of course in the .schemas file.
|
||||
@ -137,9 +138,6 @@ static void bindings_changed (GSettings *settings,
|
||||
gchar *key,
|
||||
gpointer data);
|
||||
|
||||
static void update_cursor_size_from_gtk (GtkSettings *settings,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
static void update_cursor_size (void);
|
||||
|
||||
static void queue_changed (MetaPreference pref);
|
||||
@ -156,7 +154,6 @@ static void do_override (char *key, char *schema);
|
||||
|
||||
static void init_bindings (void);
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
MetaPrefsChangedFunc func;
|
||||
@ -972,10 +969,6 @@ meta_prefs_init (void)
|
||||
G_CALLBACK (wayland_settings_changed), NULL);
|
||||
g_hash_table_insert (settings_schemas, g_strdup (SCHEMA_INTERFACE), settings);
|
||||
|
||||
if (!meta_is_wayland_compositor ())
|
||||
g_signal_connect (gtk_settings_get_default (), "notify::gtk-cursor-theme-size",
|
||||
G_CALLBACK (update_cursor_size_from_gtk), NULL);
|
||||
|
||||
settings = g_settings_new (SCHEMA_INPUT_SOURCES);
|
||||
g_signal_connect (settings, "changed::" KEY_XKB_OPTIONS,
|
||||
G_CALLBACK (settings_changed), NULL);
|
||||
@ -1225,13 +1218,9 @@ update_cursor_size (void)
|
||||
cursor_size =
|
||||
g_settings_get_int (SETTINGS (SCHEMA_INTERFACE), "cursor-size");
|
||||
}
|
||||
else
|
||||
{
|
||||
update_cursor_size_from_gtk (gtk_settings_get_default (), NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
update_cursor_size_from_gtk (GtkSettings *settings,
|
||||
GParamSpec *pspec,
|
||||
gpointer data)
|
||||
|
@ -209,4 +209,8 @@ MetaLogicalMonitor *meta_x11_display_xinerama_index_to_logical_monitor (MetaX11D
|
||||
void meta_x11_display_update_workspace_layout (MetaX11Display *x11_display);
|
||||
void meta_x11_display_update_workspace_names (MetaX11Display *x11_display);
|
||||
|
||||
void update_cursor_size_from_gtk (GtkSettings *settings,
|
||||
GParamSpec *pspec,
|
||||
gpointer data);
|
||||
|
||||
#endif /* META_X11_DISPLAY_PRIVATE_H */
|
||||
|
@ -1317,6 +1317,14 @@ meta_x11_display_new (MetaDisplay *display, GError **error)
|
||||
|
||||
set_x11_bell_is_audible (x11_display, meta_prefs_bell_is_audible ());
|
||||
|
||||
if (!meta_is_wayland_compositor ())
|
||||
{
|
||||
update_cursor_size_from_gtk (gtk_settings_get_default (), NULL, NULL);
|
||||
|
||||
g_signal_connect_object (gtk_settings_get_default (), "notify::gtk-cursor-theme-size",
|
||||
G_CALLBACK (update_cursor_size_from_gtk), NULL, 0);
|
||||
}
|
||||
|
||||
return x11_display;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user