diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2026-04-30 20:41:55 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-30 20:41:55 +0100 |
| commit | 450d8a0bf703f3ec460d367f38d61b5966daf8fe (patch) | |
| tree | 3650fcfce70e2118b459c993dee009bbf5da4ea7 /src/protocols/XDGShell.hpp | |
| parent | cfb2deb6644cc2ce474bc8f5feb96d0768768441 (diff) | |
xdg-shell: queue state updates for toplevel (#14227)
ref https://github.com/hyprwm/Hyprland/discussions/14224
Diffstat (limited to 'src/protocols/XDGShell.hpp')
| -rw-r--r-- | src/protocols/XDGShell.hpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/protocols/XDGShell.hpp b/src/protocols/XDGShell.hpp index 3d94d282..79f15432 100644 --- a/src/protocols/XDGShell.hpp +++ b/src/protocols/XDGShell.hpp @@ -18,6 +18,7 @@ class CXDGPopupResource; class CSeatGrab; class CWLSurfaceResource; class CXDGDialogV1Resource; +struct SEventLoopDoLaterLock; struct SXDGPositionerState { Vector2D requestedSize; @@ -149,8 +150,11 @@ class CXDGToplevelResource { std::vector<WP<CXDGToplevelResource>> m_children; private: - SP<CXdgToplevel> m_resource; - void applyState(); + SP<CXdgToplevel> m_resource; + + UP<SEventLoopDoLaterLock> m_stateUpdate; + + void scheduleStateApplication(); }; class CXDGSurfaceRole : public ISurfaceRole { @@ -202,12 +206,12 @@ class CXDGSurfaceResource { void configure(); private: - SP<CXdgSurface> m_resource; + SP<CXdgSurface> m_resource; - uint32_t m_lastConfigureSerial = 0; - uint32_t m_scheduledSerial = 0; + UP<SEventLoopDoLaterLock> m_stateUpdate; - wl_event_source* m_configureSource = nullptr; + uint32_t m_lastConfigureSerial = 0; + uint32_t m_scheduledSerial = 0; // std::vector<WP<CXDGPopupResource>> m_popups; |
