From 0c42ddefadb3839a3b04ba68d83020a5359c5b5e Mon Sep 17 00:00:00 2001 From: Nick Diego Yamane Date: Tue, 15 Oct 2024 05:40:16 -0400 Subject: [PATCH] wayland/xdg-toplevel-drag: Disable show/hide effects This disables the visibility change effects for the dragged window, which makes it feel a bit smoother. TODO: Double-check whether this is indeed desirable. Note: ChromeOS imp does this and Chromium-X11 used to do this at client side. Status: - [x] Basic window drag triggering - [x] Exclude the dragged window from event targets - [x] Event forwarding (window drag vs wayland grabs) - [x] Offset calc relative to toplevel geometry - [x] Attach already mapped windows - [x] Properly support not-yet-mapped windows - [x] Disable visibility change animations - [ ] Dnd events stream adaptations Signed-off-by: Nick Diego Yamane Part-of: --- src/core/window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/window.c b/src/core/window.c index bf9bfd332..f266442b5 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2473,6 +2473,9 @@ meta_window_show (MetaWindow *window) break; } + if (meta_window_is_tied_to_drag (window)) + effect = META_COMP_EFFECT_NONE; + meta_compositor_show_window (window->display->compositor, window, effect); window->pending_compositor_effect = META_COMP_EFFECT_NONE; @@ -2560,6 +2563,9 @@ meta_window_hide (MetaWindow *window) break; } + if (meta_window_is_tied_to_drag (window)) + effect = META_COMP_EFFECT_NONE; + meta_compositor_hide_window (window->display->compositor, window, effect); window->pending_compositor_effect = META_COMP_EFFECT_NONE; }