mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
wayland: Drop raise on click too
We'll handle this through GCD as well.
This commit is contained in:
parent
153463790a
commit
b7b95123ed
@ -281,29 +281,16 @@ handle_button_event (MetaWaylandSeat *seat,
|
|||||||
{
|
{
|
||||||
MetaWaylandPointer *pointer = &seat->pointer;
|
MetaWaylandPointer *pointer = &seat->pointer;
|
||||||
gboolean implicit_grab;
|
gboolean implicit_grab;
|
||||||
uint32_t button;
|
|
||||||
MetaWaylandSurface *surface;
|
|
||||||
|
|
||||||
notify_motion (seat, event);
|
notify_motion (seat, event);
|
||||||
|
|
||||||
implicit_grab = (event->type == CLUTTER_BUTTON_PRESS) && (pointer->button_count == 1);
|
implicit_grab = (event->type == CLUTTER_BUTTON_PRESS) && (pointer->button_count == 1);
|
||||||
if (implicit_grab)
|
if (implicit_grab)
|
||||||
{
|
{
|
||||||
button = clutter_event_get_button (event);
|
pointer->grab_button = clutter_event_get_button (event);
|
||||||
pointer->grab_button = button;
|
|
||||||
pointer->grab_time = clutter_event_get_time (event);
|
pointer->grab_time = clutter_event_get_time (event);
|
||||||
pointer->grab_x = pointer->x;
|
pointer->grab_x = pointer->x;
|
||||||
pointer->grab_y = pointer->y;
|
pointer->grab_y = pointer->y;
|
||||||
|
|
||||||
/* FIXME: synth a XI2 event and handle in display.c */
|
|
||||||
surface = pointer->current;
|
|
||||||
if (button == CLUTTER_BUTTON_PRIMARY &&
|
|
||||||
surface &&
|
|
||||||
surface->window &&
|
|
||||||
surface->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
|
|
||||||
{
|
|
||||||
meta_window_raise (surface->window);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pointer->grab->interface->button (pointer->grab, event);
|
pointer->grab->interface->button (pointer->grab, event);
|
||||||
|
Loading…
Reference in New Issue
Block a user