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

WindowServer: Switch Window to IntrusiveList from InlineLinkedList

Another small step towards unifying IntrusiveList / InlineLinkedList.
This commit is contained in:
Brian Gianforcaro 2021-06-03 03:23:01 -07:00 committed by Andreas Kling
parent 7e691f96e1
commit d0dbb014a0
3 changed files with 36 additions and 29 deletions

View file

@ -64,9 +64,7 @@ enum class WindowMenuDefaultAction {
Restore
};
class Window final
: public Core::Object
, public InlineLinkedListNode<Window> {
class Window final : public Core::Object {
C_OBJECT(Window);
public:
@ -264,9 +262,7 @@ public:
Gfx::IntRect tiled_rect(WindowTileType) const;
void recalculate_rect();
// For InlineLinkedList.
Window* m_next { nullptr };
Window* m_prev { nullptr };
IntrusiveListNode<Window> m_list_node;
void detach_client(Badge<ClientConnection>);
@ -399,6 +395,9 @@ private:
int m_minimize_animation_step { -1 };
Optional<int> m_progress;
bool m_should_show_menubar { true };
public:
using List = IntrusiveList<Window, RawPtr<Window>, &Window::m_list_node>;
};
}