summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-09-08 16:56:57 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-09-08 16:56:57 -0400
commita4a42f0ab5d3e786dd9a64e54784596304d85a8a (patch)
treeb513b77564aa4d0259588c09f882426960fac0dd
parentf8ab46e1490a175d7b1b16d67f8e18f6a7fb2443 (diff)
shell: Reject moving or resizing toplevel windows
-rw-r--r--compositor/shell.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/compositor/shell.c b/compositor/shell.c
index 393dfee4..7c35fd0f 100644
--- a/compositor/shell.c
+++ b/compositor/shell.c
@@ -80,8 +80,6 @@ wlsc_surface_move(struct wlsc_surface *es,
{
struct wlsc_move_grab *move;
- /* FIXME: Reject if fullscreen */
-
move = malloc(sizeof *move);
if (!move)
return -1;
@@ -831,7 +829,8 @@ move_binding(struct wl_input_device *device, uint32_t time,
struct wlsc_surface *surface =
(struct wlsc_surface *) device->pointer_focus;
- if (surface == NULL)
+ if (surface == NULL ||
+ surface->map_type == WLSC_SURFACE_MAP_FULLSCREEN)
return;
if (surface == shell->panel)
return;
@@ -852,8 +851,8 @@ resize_binding(struct wl_input_device *device, uint32_t time,
uint32_t edges = 0;
int32_t x, y;
- if (surface == NULL)
- return;
+ if (surface == NULL ||
+ surface->map_type == WLSC_SURFACE_MAP_FULLSCREEN)
if (surface == shell->panel)
return;
if (surface == shell->background)