diff options
author | thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> | 2022-08-12 19:51:52 -0400 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-16 16:43:27 +0200 |
commit | db852548ce212c764266a0bf6910ec15c9992539 (patch) | |
tree | 98dabd96ff586aa24d5e35fdbc56a80cf7b3be81 /Userland/Services | |
parent | 9bcd7dc0ce9ceae1808072921653430011f4b2fc (diff) | |
download | serenity-db852548ce212c764266a0bf6910ec15c9992539.zip |
WindowServer: Force cursor invalidation when composing immediately
And invalidate the cursor before creating a new drag-and-drop
overlay. Fixes dnd overlay bitmaps failing to draw at the correct
location immedately after changing cursors.
Diffstat (limited to 'Userland/Services')
-rw-r--r-- | Userland/Services/WindowServer/Compositor.cpp | 2 | ||||
-rw-r--r-- | Userland/Services/WindowServer/WindowManager.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Services/WindowServer/Compositor.cpp b/Userland/Services/WindowServer/Compositor.cpp index d41c656355..59aa87780d 100644 --- a/Userland/Services/WindowServer/Compositor.cpp +++ b/Userland/Services/WindowServer/Compositor.cpp @@ -857,7 +857,7 @@ Gfx::IntRect Compositor::current_cursor_rect() const void Compositor::invalidate_cursor(bool compose_immediately) { - if (m_invalidated_cursor) + if (m_invalidated_cursor && !compose_immediately) return; m_invalidated_cursor = true; m_invalidated_any = true; diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp index f3359c8b27..ef2614269e 100644 --- a/Userland/Services/WindowServer/WindowManager.cpp +++ b/Userland/Services/WindowServer/WindowManager.cpp @@ -2081,10 +2081,10 @@ void WindowManager::start_dnd_drag(ConnectionFromClient& client, String const& t VERIFY(!m_dnd_client); m_dnd_client = client; m_dnd_text = text; + Compositor::the().invalidate_cursor(true); m_dnd_overlay = Compositor::the().create_overlay<DndOverlay>(text, bitmap); m_dnd_overlay->set_enabled(true); m_dnd_mime_data = mime_data; - Compositor::the().invalidate_cursor(); set_automatic_cursor_tracking_window(nullptr); } |