Ignore decoration when updating focused window in PointerInput and TouchInput
Currently, it's possible to have the case where the pointer input device handler or the touch input device handler thinks that there's a focused window, but the corresponding focused surface in wayland seat is unset, because the pointer hovers the server side decoration. If the server side decoration is destroyed, the input device handler will fail to update wayland seat's focused surface. In order to make pointer input device handler and touch input device handler code more intuitive, this change makes focusUpdate() functions ignore the decoration. BUG: 411884 BUG: 440380
This commit is contained in:
parent
b1686fd472
commit
41237ea30b
2 changed files with 2 additions and 5 deletions
|
@ -564,9 +564,7 @@ void PointerInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow
|
|||
}
|
||||
|
||||
auto seat = waylandServer()->seat();
|
||||
if (!focusNow || !focusNow->surface() || decoration()) {
|
||||
// Clean up focused pointer surface if there's no client to take focus,
|
||||
// or the pointer is on a client without surface or on a decoration.
|
||||
if (!focusNow || !focusNow->surface()) {
|
||||
seat->setFocusedPointerSurface(nullptr);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -95,8 +95,7 @@ void TouchInputRedirection::focusUpdate(Toplevel *focusOld, Toplevel *focusNow)
|
|||
}
|
||||
|
||||
auto seat = waylandServer()->seat();
|
||||
if (!focusNow || !focusNow->surface() || decoration()) {
|
||||
// no new surface or internal window or on decoration -> cleanup
|
||||
if (!focusNow || !focusNow->surface()) {
|
||||
seat->setFocusedTouchSurface(nullptr);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue