mirror of
https://github.com/labwc/labwc.git
synced 2026-04-10 08:21:07 -04:00
view: disallow minimizing unmapped view
This fixes that XDG clients which send xdg_toplevel.set_minimized before mapping its surface don't get focused, because desktop_focus_view() in map handler only unminimizes a minimized view rather than giving focus.
This commit is contained in:
parent
4f42b7a12b
commit
3b2b2b6396
1 changed files with 5 additions and 0 deletions
|
|
@ -764,6 +764,11 @@ _minimize(struct view *view, bool minimized)
|
|||
if (view->minimized == minimized) {
|
||||
return;
|
||||
}
|
||||
if (!view->mapped && minimized) {
|
||||
/* xdg_toplevel.set_minimized can be sent before mapping */
|
||||
wlr_log(WLR_DEBUG, "not minimizing unmapped view");
|
||||
return;
|
||||
}
|
||||
|
||||
if (view->impl->minimize) {
|
||||
view->impl->minimize(view, minimized);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue