diff options
author | Tuur Vanhoutte <[email protected]> | 2023-07-09 23:08:40 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-07-09 23:08:40 +0200 |
commit | b99ac063eae32995ba83047a4c5d4cb3490a4b10 (patch) | |
tree | e0a517df4037fd8e96f77dd2680308ae2efc8c39 /src/Compositor.hpp | |
parent | b33d82734fb3b88b87e1c89cbf2ec8883ea029ac (diff) | |
download | Hyprland-b99ac063eae32995ba83047a4c5d4cb3490a4b10.tar.gz Hyprland-b99ac063eae32995ba83047a4c5d4cb3490a4b10.zip |
Reuse same ID when reconnecting monitor, otherwise use minimum available ID (#2666)
Fixes #2601
Diffstat (limited to 'src/Compositor.hpp')
-rw-r--r-- | src/Compositor.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 6f1be1b6..e4f5483f 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -101,6 +101,8 @@ class CCompositor { std::vector<CWindow*> m_vWindowsFadingOut; std::vector<SLayerSurface*> m_vSurfacesFadingOut; + std::unordered_map<std::string, int64_t> m_mMonitorIDMap; + void initServer(); void startCompositor(); void cleanup(); @@ -168,7 +170,7 @@ class CCompositor { CMonitor* getMonitorInDirection(const char&); void updateAllWindowsAnimatedDecorationValues(); void updateWindowAnimatedDecorationValues(CWindow*); - int getNextAvailableMonitorID(); + int getNextAvailableMonitorID(std::string const & name); void moveWorkspaceToMonitor(CWorkspace*, CMonitor*); void swapActiveWorkspaces(CMonitor*, CMonitor*); CMonitor* getMonitorFromString(const std::string&); |