mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
view: only (un)maximize when required
This commit is contained in:
parent
b8c6f9c216
commit
954d1fa54e
1 changed files with 5 additions and 2 deletions
|
|
@ -37,7 +37,11 @@ view_unminimize(struct view *view)
|
|||
void
|
||||
view_maximize(struct view *view, bool maximize)
|
||||
{
|
||||
if(maximize == true) {
|
||||
if (view->maximized == maximize) {
|
||||
return;
|
||||
}
|
||||
view->impl->maximize(view, maximize);
|
||||
if (maximize) {
|
||||
struct wlr_output_layout *layout = view->server->output_layout;
|
||||
struct wlr_output* output = wlr_output_layout_output_at(
|
||||
layout, view->x + view->w / 2, view->y + view->h / 2);
|
||||
|
|
@ -75,7 +79,6 @@ view_maximize(struct view *view, bool maximize)
|
|||
view_move_resize(view, view->unmaximized_geometry);
|
||||
view->maximized = false;
|
||||
}
|
||||
view->impl->maximize(view, maximize);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue