<html><head><title>Samsung Enterprise Portal mySingle</title>
<meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
<style id="mysingle_style" type="text/css">P {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
TD {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
LI {
        MARGIN-TOP: 5px; FONT-FAMILY: Arial, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
BODY {
        LINE-HEIGHT: 1.4; MARGIN: 10px; FONT-FAMILY: Arial, arial; FONT-SIZE: 9pt
}
</style>

<meta name="GENERATOR" content="ActiveSquare">
</head><body>
<p>Hi,</p>
<p>I think you have duplicated the effort :). I had submitted the patch for the same bug few days before.</p>
<p><a href="http://lists.freedesktop.org/archives/wayland-devel/2014-June/015528.html">http://lists.freedesktop.org/archives/wayland-devel/2014-June/015528.html</a>. </p>
<p></p>
<p>Regards,</p>
<p>Vivek Ellur</p>
<p> </p>
<p>------- <b>Original Message</b> -------</p>
<p><b>Sender</b> : Boyan Ding<stu_dby@126.com></p>
<p><b>Date</b> : Jun 26, 2014 09:21 (GMT+05:30)</p>
<p><b>Title</b> : [PATCH weston] desktop-shell: Don't resize into the panel</p>
<p> </p>Previously we can resize windows into panel in weston. This patch puts<br>a constraint in position when resizing just like what was done in<br>moving to avoid resizing window into the panel.<br><br>https://bugs.freedesktop.org/show_bug.cgi?id=80228<br>Signed-off-by: Boyan Ding <stu_dby@126.com><br>---<br>desktop-shell/shell.c | 35 ++++++++++++++++++++++++++++++-----<br>1 file changed, 30 insertions(+), 5 deletions(-)<br><br>diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c<br>index d267cde..eccfa1e 100644<br>--- a/desktop-shell/shell.c<br>+++ b/desktop-shell/shell.c<br>@@ -1689,6 +1689,35 @@ struct weston_resize_grab {<br>};<br><br>static void<br>+constrain_resize_position(struct weston_resize_grab *resize,<br>+   wl_fixed_t *from_x, wl_fixed_t *from_y,<br>+   wl_fixed_t *to_x, wl_fixed_t *to_y)<br>+{<br>+ struct shell_surface *shsurf = resize->base.shsurf;<br>+ struct weston_pointer *pointer = resize->base.grab.pointer;<br>+ int panel_height;<br>+ wl_fixed_t grab_x, grab_y, x, y, panel_height_fixed;<br>+<br>+ grab_x = pointer->grab_x;<br>+ grab_y = pointer->grab_y;<br>+ x = pointer->x;<br>+ y = pointer->y;<br>+<br>+ panel_height = get_output_panel_height(shsurf->shell,<br>+        shsurf->surface->output);<br>+ panel_height_fixed = wl_fixed_from_int(panel_height);<br>+<br>+ if (grab_y < panel_height_fixed)<br>+ grab_y = panel_height_fixed;<br>+ if (y < panel_height_fixed)<br>+ y = panel_height_fixed;<br>+<br>+ weston_view_from_global_fixed(shsurf->view, grab_x, grab_y,<br>+       from_x, from_y);<br>+ weston_view_from_global_fixed(shsurf->view, x, y, to_x, to_y);<br>+}<br>+<br>+static void<br>resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time,<br>   wl_fixed_t x, wl_fixed_t y)<br>{<br>@@ -1704,11 +1733,7 @@ resize_grab_motion(struct weston_pointer_grab *grab, uint32_t time,<br>if (!shsurf)<br>return;<br><br>- weston_view_from_global_fixed(shsurf->view,<br>-       pointer->grab_x, pointer->grab_y,<br>-       &from_x, &from_y);<br>- weston_view_from_global_fixed(shsurf->view,<br>-       pointer->x, pointer->y, &to_x, &to_y);<br>+ constrain_resize_position(resize, &from_x, &from_y, &to_x, &to_y);<br><br>width = resize->width;<br>if (resize->edges & WL_SHELL_SURFACE_RESIZE_LEFT) {<br>-- <br>2.0.0<br><br><br>_______________________________________________<br>wayland-devel mailing list<br>wayland-devel@lists.freedesktop.org<br>http://lists.freedesktop.org/mailman/listinfo/wayland-devel<br>
<p> </p>
<p> </p><!--SP:vivek.ellur--><!--vivek.ellur:EP-->
<p> </p>
<table id="confidentialsignimg">
<tbody>
<tr>
<td NAMO_LOCK="">
<p><img border="0" src="cid:BEI0XT4NZ5JE@namo.co.kr" width="520"></p></td></tr></tbody></table></stu_dby@126.com></body></html><img src='http://ext.samsung.net/mailcheck/SeenTimeChecker?do=90638be07fe790cdcde344fe4af5d8c80460785bc095b687f838b827acb1a07568faa76fc6d0059275e86b19dccefbe8abdf0e51799c0dfb021b7a989945d95349e5ff3dfdc8681d76f80bf81d31c863cf878f9a26ce15a0' border=0 width=0 height=0 style='display:none'>