status/keyboard: Synchronize input source switching with key events
Currently we simply set the gsettings key when activating an input source. This obviously introduces a time window, between the event that activates the switch and when the switch is complete, under which key events are being delivered to applications and interpreted according to the previous input source. The patches in bug 696996 introduce a DBus API in g-s-d that allows us to know when an input source if effectively active. Using that and freezing keyboard events in the X server until we hear back from g-s-d we can ensure that events won't be misinterpreted after an input source switch. https://bugzilla.gnome.org/show_bug.cgi?id=697007
This commit is contained in:
@ -1007,6 +1007,13 @@ shell_global_end_modal (ShellGlobal *global,
|
||||
meta_plugin_end_modal (global->plugin, timestamp);
|
||||
}
|
||||
|
||||
void
|
||||
shell_global_freeze_keyboard (ShellGlobal *global,
|
||||
guint32 timestamp)
|
||||
{
|
||||
meta_display_freeze_keyboard (global->meta_display, global->stage_xwindow, timestamp);
|
||||
}
|
||||
|
||||
/* Code to close all file descriptors before we exec; copied from gspawn.c in GLib.
|
||||
*
|
||||
* Authors: Padraig O'Briain, Matthias Clasen, Lennart Poettering
|
||||
|
@ -44,6 +44,8 @@ gboolean shell_global_begin_modal (ShellGlobal *global,
|
||||
MetaModalOptions options);
|
||||
void shell_global_end_modal (ShellGlobal *global,
|
||||
guint32 timestamp);
|
||||
void shell_global_freeze_keyboard (ShellGlobal *global,
|
||||
guint32 timestamp);
|
||||
|
||||
typedef enum {
|
||||
SHELL_STAGE_INPUT_MODE_NORMAL,
|
||||
|
Reference in New Issue
Block a user