mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
src/view.c: Fix minimizing the last window
Before this patch, minimizing the last un-minimized window would not cause it to be set to inactive. This in turn would confuse panels which depend on the 'active' flag to decide when to either activate or minimize the clicked on window. Reported-by: @Flrian Predicted-by: @johanmalm
This commit is contained in:
parent
adc1e0876d
commit
ce5e7e153c
1 changed files with 12 additions and 0 deletions
12
src/view.c
12
src/view.c
|
|
@ -217,6 +217,18 @@ view_minimize(struct view *view, bool minimized)
|
|||
if (minimized) {
|
||||
view->impl->unmap(view);
|
||||
desktop_move_to_back(view);
|
||||
_view_set_activated(view, false);
|
||||
if (view == view->server->focused_view) {
|
||||
/*
|
||||
* Prevents clearing the active view when
|
||||
* we don't actually have keyboard focus.
|
||||
*
|
||||
* This may happen when using a custom mouse
|
||||
* focus configuration or by using the foreign
|
||||
* toplevel protocol via some panel.
|
||||
*/
|
||||
view->server->focused_view = NULL;
|
||||
}
|
||||
} else {
|
||||
view->impl->map(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue