From 09aa48b7485818120a31cac617be62bdeb91a23c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 3 May 2016 22:52:38 -0400 Subject: [PATCH] wayland: Don't emit direction-changed unless it did We can easily check this, so lets do it. --- gdk/wayland/gdkdevice-wayland.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 72d856bfd4..71389e3153 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -1568,12 +1568,17 @@ keyboard_handle_keymap (void *data, uint32_t size) { GdkWaylandSeat *seat = data; + PangoDirection direction; + + direction = gdk_keymap_get_direction (seat->keymap); _gdk_wayland_keymap_update_from_fd (seat->keymap, format, fd, size); g_signal_emit_by_name (seat->keymap, "keys-changed"); g_signal_emit_by_name (seat->keymap, "state-changed"); - g_signal_emit_by_name (seat->keymap, "direction-changed"); + + if (direction != gdk_keymap_get_direction (seat->keymap)) + g_signal_emit_by_name (seat->keymap, "direction-changed"); } static void