Send modifiers to wayland clients on focus in
authorDerek Foreman <derekf@osg.samsung.com>
Mon, 9 Mar 2015 20:37:02 +0000 (16:37 -0400)
committerChris Michael <cp.michael@samsung.com>
Mon, 9 Mar 2015 20:37:02 +0000 (16:37 -0400)
Summary:
If we don't update the modifiers on focus in we can end up with stuck
modifiers if a modifier is held when starting a client.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2124

src/bin/e_comp_wl.c

index c4fa5d5..8bfdd71 100644 (file)
@@ -427,11 +427,20 @@ _e_comp_wl_client_focus(E_Client *ec)
    /* send keyboard_enter to all keyboard resources */
    wc = wl_resource_get_client(ec->comp_data->surface);
    serial = wl_display_next_serial(e_comp->wl_comp_data->wl.disp);
+
+   e_comp_wl_input_keyboard_modifiers_serialize(e_comp->wl_comp_data);
+
    EINA_LIST_FOREACH(e_comp->wl_comp_data->kbd.resources, l, res)
      {
         if (wl_resource_get_client(res) != wc) continue;
         wl_keyboard_send_enter(res, serial, ec->comp_data->surface,
                                &e_comp->wl_comp_data->kbd.keys);
+        wl_keyboard_send_modifiers(res, serial,
+                                   e_comp->wl_comp_data->kbd.mod_depressed,
+                                   e_comp->wl_comp_data->kbd.mod_latched,
+                                   e_comp->wl_comp_data->kbd.mod_locked,
+                                   e_comp->wl_comp_data->kbd.mod_group);
+
         ec->comp_data->focus_update = 0;
      }
 }