wayland: Don't emit direction-changed unless it did

We can easily check this, so lets do it.
This commit is contained in:
Matthias Clasen 2016-05-03 22:52:38 -04:00
parent 3b75cadc41
commit 09aa48b748

View File

@ -1568,11 +1568,16 @@ 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");
if (direction != gdk_keymap_get_direction (seat->keymap))
g_signal_emit_by_name (seat->keymap, "direction-changed");
}