Compare commits

...

1 Commits

Author SHA1 Message Date
Matthias Clasen
b4e10b6bc3 text: Prevent unexpected notify::direction emissions
Calling gdk_device_get_direction can trigger a
notify::direction emissions, since the X11 backend
determines the direction on demand. Prevent that by
forcing the direction to be determined ahead of time.

Fixes: #5311
2022-11-25 08:12:39 -05:00

View File

@@ -3237,8 +3237,12 @@ gtk_text_focus_changed (GtkEventControllerFocus *controller,
if (gtk_event_controller_focus_is_focus (controller))
{
if (keyboard)
g_signal_connect (keyboard, "notify::direction",
G_CALLBACK (direction_changed), self);
{
/* Work around unexpected notify::direction emissions */
gdk_device_get_direction (keyboard);
g_signal_connect (keyboard, "notify::direction",
G_CALLBACK (direction_changed), self);
}
gtk_text_im_set_focus_in (self);
gtk_text_reset_blink_time (self);