Skip to content

Commit

Permalink
compositor: fix wrongly unsetting the fullscreen or maximized state
Browse files Browse the repository at this point in the history
  • Loading branch information
giucam committed Jul 28, 2017
1 parent 68c81fe commit 07ea218
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compositor/weston-desktop/wdesktop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ void WDesktop::committed(weston_desktop_surface *surface, int32_t sx, int32_t sy
bool maximized = weston_desktop_surface_get_maximized(surface);
bool fullscreen = weston_desktop_surface_get_fullscreen(surface);

if ((!maximized && ds->maximized) || (!fullscreen && ds->fullscreen)) {
// we reset to the normal state if (it was maximized and it's no more, and it's not fullscreen) or
// if (it was fullscreen and it's no more and it's not maximized)
if ((!maximized && ds->maximized && !fullscreen) || (!fullscreen && ds->fullscreen && !maximized)) {
ds->shsurf->setToplevel();
}

Expand Down

0 comments on commit 07ea218

Please sign in to comment.