mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
pointer: Don't fizzle out surface changes too soon
During a DND grab, pointer->focus_surface is NULL, since the wl_pointer doesn't have any focused surface (it's in drag mode). In this case, the drag interface has control of the focus, and when dragging into a NULL surface, drag_grab_focus won't get called, properly detaching it from the previous surface. Let the interface->focus implementation do the fizzling out. In the future, we should split out wl_pointer's implementation (pointer->focus_surface) from the Wayland side of the generic pointer wrapper (pointer->current) and use our event routing system to determine or similar whether it should go to wl_pointer or wl_data_device.
This commit is contained in:
parent
64d40792c4
commit
9203db0655
@ -272,12 +272,9 @@ sync_focus_surface (MetaWaylandPointer *pointer)
|
|||||||
g_assert_not_reached ();
|
g_assert_not_reached ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (focus_surface != pointer->focus_surface)
|
|
||||||
{
|
|
||||||
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
||||||
interface->focus (pointer->grab, focus_surface);
|
interface->focus (pointer->grab, focus_surface);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
repick_for_event (MetaWaylandPointer *pointer,
|
repick_for_event (MetaWaylandPointer *pointer,
|
||||||
|
Loading…
Reference in New Issue
Block a user