seat/dnd: unfocus pointer from surfaces on dnd start

GTK is speshyal and requires this for functioning properly. Ugh.

It's technically not required by spec, f you gtk.

Ref #6509
This commit is contained in:
Vaxry 2024-06-16 16:23:35 +02:00
parent 3eaf35f1e2
commit 1b5444494d
2 changed files with 12 additions and 2 deletions

View file

@ -191,6 +191,11 @@ void CSeatManager::setPointerFocus(SP<CWLSurfaceResource> surf, const Vector2D&
if (state.pointerFocus == surf)
return;
if (PROTO::data->dndActive() && surf) {
Debug::log(LOG, "[seatmgr] Refusing pointer focus during an active dnd");
return;
}
if (!mouse || !mouse->wlr()) {
Debug::log(ERR, "BUG THIS: setPointerFocus without a valid mouse set");
return;