[PATCH weston] shell: When rotating use the parent if available
Derek Foreman
derekf at osg.samsung.com
Wed Sep 2 09:32:05 PDT 2015
This prevents the rotation mouse bind from rotating pop-up menus
directly by using a shell surface's eldest parent instead.
Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
desktop-shell/shell.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 034d39b..b080339 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -4993,6 +4993,12 @@ surface_rotate(struct shell_surface *surface, struct weston_pointer *pointer)
float dx, dy;
float r;
+ /* We don't want to rotate pop-ups, so let's always start
+ * rotations with a parent surface.
+ */
+ while (surface->parent)
+ surface = get_shell_surface(surface->parent);
+
rotate = malloc(sizeof *rotate);
if (!rotate)
return;
--
2.5.1
More information about the wayland-devel
mailing list