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,11 +272,8 @@ sync_focus_surface (MetaWaylandPointer *pointer)
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
if (focus_surface != pointer->focus_surface)
|
||||
{
|
||||
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
||||
interface->focus (pointer->grab, focus_surface);
|
||||
}
|
||||
const MetaWaylandPointerGrabInterface *interface = pointer->grab->interface;
|
||||
interface->focus (pointer->grab, focus_surface);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user