diff options
author | Rafal Mielniczuk <rafal.mielniczuk2@gmail.com> | 2013-03-11 19:26:53 +0100 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-03-19 12:09:52 -0400 |
commit | 23c6759b7675a8797e7a9c37631d7561f770d168 (patch) | |
tree | 52b76cc915e6bb7a6f9eaef8fab39797da85a6f4 | |
parent | f3e39f987275ed1636920d70590bd7e97437d1de (diff) |
shell: block move, rotate, resize in maximized state
To remain consisten with client side window, which blocks moving and
resizing of window in maximized state, we should do so on the compositor
side as well.
(until there is some unmaximize notification from server, which will
allow window to start drawing shadows and revert itself to toplevel
state)
-rw-r--r-- | src/shell.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/shell.c b/src/shell.c index 565d0e26..d6fc30a5 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1174,7 +1174,8 @@ surface_resize(struct shell_surface *shsurf, { struct weston_resize_grab *resize; - if (shsurf->type == SHELL_SURFACE_FULLSCREEN) + if (shsurf->type == SHELL_SURFACE_FULLSCREEN || + shsurf->type == SHELL_SURFACE_MAXIMIZED) return 0; if (edges == 0 || edges > 15 || @@ -2387,7 +2388,8 @@ move_binding(struct wl_seat *seat, uint32_t time, uint32_t button, void *data) return; shsurf = get_shell_surface(surface); - if (shsurf == NULL || shsurf->type == SHELL_SURFACE_FULLSCREEN) + if (shsurf == NULL || shsurf->type == SHELL_SURFACE_FULLSCREEN || + shsurf->type == SHELL_SURFACE_MAXIMIZED) return; surface_move(shsurf, (struct weston_seat *) seat); @@ -2406,7 +2408,8 @@ resize_binding(struct wl_seat *seat, uint32_t time, uint32_t button, void *data) return; shsurf = get_shell_surface(surface); - if (!shsurf || shsurf->type == SHELL_SURFACE_FULLSCREEN) + if (!shsurf || shsurf->type == SHELL_SURFACE_FULLSCREEN || + shsurf->type == SHELL_SURFACE_MAXIMIZED) return; weston_surface_from_global(surface, @@ -2665,7 +2668,8 @@ rotate_binding(struct wl_seat *seat, uint32_t time, uint32_t button, return; surface = get_shell_surface(base_surface); - if (!surface || surface->type == SHELL_SURFACE_FULLSCREEN) + if (!surface || surface->type == SHELL_SURFACE_FULLSCREEN || + surface->type == SHELL_SURFACE_MAXIMIZED) return; surface_rotate(surface, seat); |