mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
view: handle initially minimized views (minimal fix)
The view->impl functions do not directly support mapping a view while minimized. Instead, mark it as not minimized, map it, and then minimize it again. Fixes: #2627
This commit is contained in:
parent
f0c7277c4a
commit
5148c2aa31
1 changed files with 12 additions and 1 deletions
13
src/view.c
13
src/view.c
|
|
@ -2436,7 +2436,18 @@ static void
|
||||||
handle_map(struct wl_listener *listener, void *data)
|
handle_map(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
struct view *view = wl_container_of(listener, view, mappable.map);
|
struct view *view = wl_container_of(listener, view, mappable.map);
|
||||||
view->impl->map(view);
|
if (view->minimized) {
|
||||||
|
/*
|
||||||
|
* The view->impl functions do not directly support
|
||||||
|
* mapping a view while minimized. Instead, mark it as
|
||||||
|
* not minimized, map it, and then minimize it again.
|
||||||
|
*/
|
||||||
|
view->minimized = false;
|
||||||
|
view->impl->map(view);
|
||||||
|
view_minimize(view, true);
|
||||||
|
} else {
|
||||||
|
view->impl->map(view);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue