From 54e735924301fd96d54b64c8aa769b813891b1f9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 16 Sep 2022 00:34:43 +0200 Subject: [PATCH] LibWeb: Repaint the page immediately when using the mouse to select Otherwise we'd repaint the next time our "caret blink" timer would fire (or something else caused a repaint). This made selection feel sluggish. --- Userland/Libraries/LibWeb/Page/EventHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibWeb/Page/EventHandler.cpp b/Userland/Libraries/LibWeb/Page/EventHandler.cpp index c812c1351b..4255a1f50d 100644 --- a/Userland/Libraries/LibWeb/Page/EventHandler.cpp +++ b/Userland/Libraries/LibWeb/Page/EventHandler.cpp @@ -466,6 +466,7 @@ bool EventHandler::handle_mousemove(Gfx::IntPoint const& position, unsigned butt if (start_index.has_value() && hit.has_value() && hit->dom_node()) { m_browsing_context.set_cursor_position(DOM::Position(*hit->dom_node(), *start_index)); layout_root()->set_selection_end({ hit->paintable->layout_node(), hit->index_in_node }); + m_browsing_context.set_needs_display(); } if (auto* page = m_browsing_context.page()) page->client().page_did_change_selection();