1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:17:35 +00:00

LibGUI+WindowServer: Notify Windows on input preemption

Previously Menus set themselves as active input solely to make
sure CaptureInput modals would close, but this is a functional
half-truth. Menus don't actually use the active input role; they
preempt normal Windows during event handling instead.

Now the active input window is notified on preemption and Menus
can remain outside the active input concept. This lets us make
more granular choices about modal behavior. For now, the only
thing clients care about is menu preemption on popup.

Fixes windows which close on changes to active input closing
on their own context menus.
This commit is contained in:
thankyouverycool 2022-09-07 07:49:00 -04:00 committed by Linus Groh
parent 6c35aac617
commit 463aff827e
13 changed files with 48 additions and 15 deletions

View file

@ -54,6 +54,7 @@ private:
virtual void update_system_fonts(String const&, String const&, String const&) override;
virtual void update_system_effects(Vector<bool> const&) override;
virtual void window_state_changed(i32, bool, bool, bool) override;
virtual void window_input_preempted(i32, i32) override;
virtual void display_link_notification() override;
virtual void track_mouse_move(Gfx::IntPoint const&) override;
virtual void ping() override;