On Sun, Jul 22, 2012 at 12:34 PM, Kristian Høgsberg <[email protected]> wrote: > On Wed, Jul 18, 2012 at 01:37:59PM +0800, Juan Zhao wrote: >> attach file: This patch resolved problem like this. > > Right, I see. I think we just need the moving code to restrict the > motion so that the point we're dragging (maybe +/- a couple of pixels) > can't end up under the panel for that.
I made a drawing: https://docs.google.com/drawings/d/1pWHb9jjfTa4GJcDlSsPsbjYUOoMyTL7iENUE178xx4Y/edit > Kristian > > >> Thanks, >> Juan >> >> On Tue, 2012-07-17 at 22:25 -0700, [email protected] wrote: >> > From: Juan Zhao <[email protected]> >> > >> > When applications not directly based on toytoolkit, like simple-egl, efl >> > applications is grabbed and moved, they may be moved to the place under >> > the panel. Then they could not be grabbed again. >> > Add panel height limitation when configuring the surface new places. >> > >> > Signed-off-by: Juan Zhao <[email protected]> >> > --- >> > src/shell.c | 15 +++++++++++++++ >> > 1 file changed, 15 insertions(+) >> > >> > diff --git a/src/shell.c b/src/shell.c >> > index 613304f..9372edc 100644 >> > --- a/src/shell.c >> > +++ b/src/shell.c >> > @@ -221,6 +221,13 @@ get_shell_surface(struct weston_surface *surface); >> > static struct desktop_shell * >> > shell_surface_get_shell(struct shell_surface *shsurf); >> > >> > +static int >> > +get_output_panel_height(struct desktop_shell *shell, >> > + struct weston_output *output); >> > + >> > +static struct weston_output * >> > +get_default_output(struct weston_compositor *compositor); >> > + >> > static bool >> > shell_surface_is_top_fullscreen(struct shell_surface *shsurf) >> > { >> > @@ -784,13 +791,21 @@ move_grab_motion(struct wl_pointer_grab *grab, >> > struct wl_pointer *pointer = grab->pointer; >> > struct shell_surface *shsurf = move->base.shsurf; >> > struct weston_surface *es; >> > + struct desktop_shell *shell = NULL; >> > int dx = wl_fixed_to_int(pointer->x + move->dx); >> > int dy = wl_fixed_to_int(pointer->y + move->dy); >> > + int panel_height = 0; >> > >> > if (!shsurf) >> > return; >> > >> > es = shsurf->surface; >> > + shsurf->output = shsurf->output ? shsurf->output >> > + : get_default_output(es->compositor); >> > + shell = shell_surface_get_shell(shsurf); >> > + panel_height = get_output_panel_height(shell, shsurf->output); >> > + if ( dy < panel_height ) >> > + dy = panel_height; >> > >> > weston_surface_configure(es, dx, dy, >> > es->geometry.width, es->geometry.height); >> > > _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
