[PATCH] Desktop-shell: Fixed window resize issue
vivek
vivek.ellur at samsung.com
Thu Jun 19 10:06:16 PDT 2014
This is a fix to the following bug
https://bugs.freedesktop.org/show_bug.cgi?id=80228
Signed-off-by: vivek <vivek.ellur at samsung.com>
---
desktop-shell/shell.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 48b9faf..01fbb22 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -1696,6 +1696,7 @@ resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time,
struct weston_pointer *pointer = grab->pointer;
struct shell_surface *shsurf = resize->base.shsurf;
int32_t width, height;
+ int32_t new_y, panel_height, draw_flag = 1;
wl_fixed_t from_x, from_y;
wl_fixed_t to_x, to_y;
@@ -1719,12 +1720,22 @@ resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time,
height = resize->height;
if (resize->edges & WL_SHELL_SURFACE_RESIZE_TOP) {
- height += wl_fixed_to_int(from_y - to_y);
+ new_y = wl_fixed_to_int(pointer->y);
+ panel_height = get_output_panel_height(shsurf->shell,
+ shsurf->surface->output);
+ if (new_y < panel_height) {
+ height += 0;
+ draw_flag = 0;
+ }
+ else {
+ height += wl_fixed_to_int(from_y - to_y);
+ }
} else if (resize->edges & WL_SHELL_SURFACE_RESIZE_BOTTOM) {
height += wl_fixed_to_int(to_y - from_y);
}
- shsurf->client->send_configure(shsurf->surface, width, height);
+ if (draw_flag == 1)
+ shsurf->client->send_configure(shsurf->surface, width, height);
}
static void
--
1.9.1
More information about the wayland-devel
mailing list