pointer: Don't send modifiers on mouse enter

I talked to Kristian about this. It should be enough to simply
send it when we activate the surface and give it keyboard focus.
This commit is contained in:
Jasper St. Pierre
2014-02-18 23:18:44 -05:00
parent ff5867e4d3
commit 48f7232492
2 changed files with 3 additions and 53 deletions

View File

@ -60,14 +60,6 @@
#include "meta-wayland-private.h"
static MetaWaylandSeat *
meta_wayland_keyboard_get_seat (MetaWaylandKeyboard *keyboard)
{
MetaWaylandSeat *seat = wl_container_of (keyboard, seat, keyboard);
return seat;
}
static int
create_anonymous_file (off_t size,
GError **error)
@ -291,28 +283,11 @@ default_grab_modifiers (MetaWaylandKeyboardGrab *grab, uint32_t serial,
uint32_t mods_locked, uint32_t group)
{
MetaWaylandKeyboard *keyboard = grab->keyboard;
MetaWaylandSeat *seat = meta_wayland_keyboard_get_seat (keyboard);
MetaWaylandPointer *pointer = &seat->pointer;
struct wl_resource *resource, *pr;
resource = keyboard->focus_resource;
if (!resource)
return;
wl_keyboard_send_modifiers (resource, serial, mods_depressed,
mods_latched, mods_locked, group);
if (pointer && pointer->focus_surface && pointer->focus_surface != keyboard->focus_surface)
if (keyboard->focus_resource)
{
pr = find_resource_for_surface (&keyboard->resource_list, pointer->focus_surface);
if (pr)
{
wl_keyboard_send_modifiers (pr, serial,
mods_depressed,
mods_latched,
mods_locked,
group);
}
wl_keyboard_send_modifiers (keyboard->focus_resource, serial, mods_depressed,
mods_latched, mods_locked, group);
}
}