mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
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.
This commit is contained in:
parent
9bcd7dc0ce
commit
db852548ce
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue