forked from AuroraMiddleware/gtk
Merge branch 'wl-key-repeat' into 'master'
wayland: Rely on server key repeat info See merge request GNOME/gtk!1150
This commit is contained in:
commit
9dd8652a66
@ -241,7 +241,6 @@ struct _GdkWaylandSeat
|
|||||||
guint32 repeat_key;
|
guint32 repeat_key;
|
||||||
guint32 repeat_count;
|
guint32 repeat_count;
|
||||||
gint64 repeat_deadline;
|
gint64 repeat_deadline;
|
||||||
GSettings *keyboard_settings;
|
|
||||||
uint32_t keyboard_time;
|
uint32_t keyboard_time;
|
||||||
uint32_t keyboard_key_serial;
|
uint32_t keyboard_key_serial;
|
||||||
|
|
||||||
@ -2013,26 +2012,6 @@ keyboard_handle_leave (void *data,
|
|||||||
|
|
||||||
static gboolean keyboard_repeat (gpointer data);
|
static gboolean keyboard_repeat (gpointer data);
|
||||||
|
|
||||||
static GSettings *
|
|
||||||
get_keyboard_settings (GdkWaylandSeat *seat)
|
|
||||||
{
|
|
||||||
if (!seat->keyboard_settings)
|
|
||||||
{
|
|
||||||
GSettingsSchemaSource *source;
|
|
||||||
GSettingsSchema *schema;
|
|
||||||
|
|
||||||
source = g_settings_schema_source_get_default ();
|
|
||||||
schema = g_settings_schema_source_lookup (source, "org.gnome.settings-daemon.peripherals.keyboard", FALSE);
|
|
||||||
if (schema != NULL)
|
|
||||||
{
|
|
||||||
seat->keyboard_settings = g_settings_new_full (schema, NULL, NULL);
|
|
||||||
g_settings_schema_unref (schema);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return seat->keyboard_settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
get_key_repeat (GdkWaylandSeat *seat,
|
get_key_repeat (GdkWaylandSeat *seat,
|
||||||
guint *delay,
|
guint *delay,
|
||||||
@ -2055,20 +2034,9 @@ get_key_repeat (GdkWaylandSeat *seat,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GSettings *keyboard_settings = get_keyboard_settings (seat);
|
repeat = TRUE;
|
||||||
|
*delay = 400;
|
||||||
if (keyboard_settings)
|
*interval = 80;
|
||||||
{
|
|
||||||
repeat = g_settings_get_boolean (keyboard_settings, "repeat");
|
|
||||||
*delay = g_settings_get_uint (keyboard_settings, "delay");
|
|
||||||
*interval = g_settings_get_uint (keyboard_settings, "repeat-interval");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
repeat = TRUE;
|
|
||||||
*delay = 400;
|
|
||||||
*interval = 80;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return repeat;
|
return repeat;
|
||||||
@ -4567,7 +4535,6 @@ gdk_wayland_seat_finalize (GObject *object)
|
|||||||
g_object_unref (seat->keymap);
|
g_object_unref (seat->keymap);
|
||||||
gdk_wayland_pointer_data_finalize (&seat->pointer_info);
|
gdk_wayland_pointer_data_finalize (&seat->pointer_info);
|
||||||
/* FIXME: destroy data_device */
|
/* FIXME: destroy data_device */
|
||||||
g_clear_object (&seat->keyboard_settings);
|
|
||||||
g_clear_object (&seat->drag);
|
g_clear_object (&seat->drag);
|
||||||
g_clear_object (&seat->drop);
|
g_clear_object (&seat->drop);
|
||||||
g_clear_object (&seat->clipboard);
|
g_clear_object (&seat->clipboard);
|
||||||
|
Loading…
Reference in New Issue
Block a user