wayland: support left click to raise wayland surfaces

This adds support for raising wayland surfaces when clicked with the
left mouse button.
This commit is contained in:
Robert Bragg 2013-06-15 23:05:31 +01:00 committed by Jasper St. Pierre
parent a5585327dc
commit 85e66f69fa

View File

@ -347,10 +347,20 @@ handle_button_event (MetaWaylandSeat *seat,
{
if (pointer->button_count == 0)
{
MetaWaylandSurface *surface = pointer->current;
pointer->grab_button = button;
pointer->grab_time = event->time;
pointer->grab_x = pointer->x;
pointer->grab_y = pointer->y;
if (button == BTN_LEFT &&
surface &&
surface->window &&
surface->window->client_type == META_WINDOW_CLIENT_TYPE_WAYLAND)
{
meta_window_raise (surface->window);
}
}
pointer->button_count++;