mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-25 19:56:30 +00:00
LibWeb: Don't always stop drawing scrollbar on mouseleave
Some checks failed
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled
Some checks failed
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Build Dev Container Image / build (push) Has been cancelled
PaintableBox::handle_mouseleave is turning off scrollbar updating, but the user might still have the primary button down to scroll. Don't turn it off if grabbing the thumb to scroll. Resolves crashing on MacOSX AppKit and Qt where gutter_size is 0 when mouse is moved outside window.
This commit is contained in:
parent
658477620a
commit
a60debe7bb
Notes:
github-actions[bot]
2025-08-20 00:13:02 +00:00
Author: https://github.com/rcorsi
Commit: a60debe7bb
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5882
Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 5 additions and 0 deletions
|
@ -1049,6 +1049,11 @@ Paintable::DispatchEventOfSameName PaintableBox::handle_mousemove(Badge<EventHan
|
||||||
|
|
||||||
void PaintableBox::handle_mouseleave(Badge<EventHandler>)
|
void PaintableBox::handle_mouseleave(Badge<EventHandler>)
|
||||||
{
|
{
|
||||||
|
// FIXME: early return needed as MacOSX calls this even when user is pressing mouse button
|
||||||
|
// https://github.com/LadybirdBrowser/ladybird/issues/5844
|
||||||
|
if (m_scroll_thumb_dragging_direction.has_value())
|
||||||
|
return;
|
||||||
|
|
||||||
auto previous_draw_enlarged_horizontal_scrollbar = m_draw_enlarged_horizontal_scrollbar;
|
auto previous_draw_enlarged_horizontal_scrollbar = m_draw_enlarged_horizontal_scrollbar;
|
||||||
m_draw_enlarged_horizontal_scrollbar = false;
|
m_draw_enlarged_horizontal_scrollbar = false;
|
||||||
if (previous_draw_enlarged_horizontal_scrollbar != m_draw_enlarged_horizontal_scrollbar)
|
if (previous_draw_enlarged_horizontal_scrollbar != m_draw_enlarged_horizontal_scrollbar)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue