mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:07:35 +00:00
WindowServer: Fix visibility of WindowSwitcher constructor
Derivatives of Core::Object should be constructed through ClassName::construct(), to avoid handling ref-counted objects with refcount zero. Fixing the visibility means that misuses like this are more difficult. This commit is separate from the other Servives changes because it required additional adaption of the code. Note that the old code did precisely what these changes try to prevent: Create and handle a ref-counted object with a refcount of zero.
This commit is contained in:
parent
52a1ff4d4b
commit
0e3397aabe
4 changed files with 27 additions and 25 deletions
|
@ -432,7 +432,7 @@ private:
|
|||
|
||||
u8 m_keyboard_modifiers { 0 };
|
||||
|
||||
WindowSwitcher m_switcher;
|
||||
NonnullRefPtr<WindowSwitcher> m_switcher;
|
||||
|
||||
WeakPtr<Button> m_cursor_tracking_button;
|
||||
WeakPtr<Button> m_hovered_button;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue