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 <[email protected]>
---
 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

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to