aeaf7669607952bbcf25ca33433966b6a1b4563d
- Author
- outfoxxed <outfoxxed@outfoxxed.me>
- Committer
- outfoxxed <outfoxxed@outfoxxed.me>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/flake.lock b/flake.lock
2index 3bde2180e07337be30acda305ba9e17d8678a12e..01347bdb68339f5d26ade4fa7ba70b8065c20e61 100644
3--- a/flake.lock
4+++ b/flake.lock
5@@ -20,11 +20,11 @@
6 ]
7 },
8 "locked": {
9- "lastModified": 1780756231,
10- "narHash": "sha256-tXQxKdG5716uB9/LIkLQqQwHKf5mRSpHoZhz3lyI2Cg=",
11+ "lastModified": 1782073106,
12+ "narHash": "sha256-dnS5SaZlPqR1E0dPXaPc+lFkBwLUbAgbwsVMk7uA6dY=",
13 "owner": "hyprwm",
14 "repo": "aquamarine",
15- "rev": "6ecde03f47172753fe5a2f334f9d3facfb7e6784",
16+ "rev": "6d6e2384f381def4ea4ea81543cba4bbdac72457",
17 "type": "github"
18 },
19 "original": {
20@@ -49,28 +49,6 @@
21 "type": "github"
22 }
23 },
24- "gitignore": {
25- "inputs": {
26- "nixpkgs": [
27- "hyprland",
28- "pre-commit-hooks",
29- "nixpkgs"
30- ]
31- },
32- "locked": {
33- "lastModified": 1709087332,
34- "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
35- "owner": "hercules-ci",
36- "repo": "gitignore.nix",
37- "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
38- "type": "github"
39- },
40- "original": {
41- "owner": "hercules-ci",
42- "repo": "gitignore.nix",
43- "type": "github"
44- }
45- },
46 "hyprcursor": {
47 "inputs": {
48 "hyprlang": [
49@@ -116,11 +94,11 @@
50 ]
51 },
52 "locked": {
53- "lastModified": 1776426399,
54- "narHash": "sha256-RUESLKNikIeEq9ymGJ6nmcDXiSFQpUW1IhJ245nL3xM=",
55+ "lastModified": 1782566056,
56+ "narHash": "sha256-haEZcHzYrePnjFOYSWTbxm/Nrla0aPslJfmvdCvqtVc=",
57 "owner": "hyprwm",
58 "repo": "hyprgraphics",
59- "rev": "68d064434787cf1ed4a2fe257c03c5f52f33cf84",
60+ "rev": "c6e7b9f673f4360bc813d3dc75028f75ee88d3f8",
61 "type": "github"
62 },
63 "original": {
64@@ -146,17 +124,17 @@
65 "xdph": "xdph"
66 },
67 "locked": {
68- "lastModified": 1781729184,
69- "narHash": "sha256-S5Lq1/5RgsLZSFMrjnO5jzpV3/3q3Zt4Nsrz2TnVQzQ=",
70+ "lastModified": 1783881054,
71+ "narHash": "sha256-FeiCDFKENNVFt/PMAqYiCUAJQm+SCPItcilh613dEjQ=",
72 "owner": "hyprwm",
73 "repo": "hyprland",
74- "rev": "2b81ad3bdf95d866b2c51460e67474f3190e6a80",
75+ "rev": "f4b9c1ab240f5c5d2b5a2e659113361e476772a5",
76 "type": "github"
77 },
78 "original": {
79 "owner": "hyprwm",
80 "repo": "hyprland",
81- "rev": "2b81ad3bdf95d866b2c51460e67474f3190e6a80",
82+ "rev": "f4b9c1ab240f5c5d2b5a2e659113361e476772a5",
83 "type": "github"
84 }
85 },
86@@ -193,11 +171,11 @@
87 ]
88 },
89 "locked": {
90- "lastModified": 1776426575,
91- "narHash": "sha256-KI6nIfVihn/DPaeB5Et46Xg3dkNHrrEtUd5LBBVomB0=",
92+ "lastModified": 1782563850,
93+ "narHash": "sha256-rs/EzgrgPHbCtJjFZN4aR1HYldH/0NtGAempWVpWQTs=",
94 "owner": "hyprwm",
95 "repo": "hyprland-guiutils",
96- "rev": "a968d211048e3ed538e47b84cb3649299578f19d",
97+ "rev": "5ba080ee036c30cb2485f2647ff8a61f7aa08178",
98 "type": "github"
99 },
100 "original": {
101@@ -299,11 +277,11 @@
102 ]
103 },
104 "locked": {
105diff --git a/flake.nix b/flake.nix
106index d30def5ed97fae54e39913d50f047690fefb149e..4c34e5025aadeb5d9852d502e7cacb7d28cd50b6 100644
107--- a/flake.nix
108+++ b/flake.nix
109@@ -1,6 +1,6 @@
110 {
111 inputs = {
112- hyprland.url = "github:hyprwm/hyprland/2b81ad3bdf95d866b2c51460e67474f3190e6a80";
113+ hyprland.url = "github:hyprwm/hyprland/f4b9c1ab240f5c5d2b5a2e659113361e476772a5";
114 };
115
116 outputs = {
117diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
118index c0f68af0368a8583a72234271114e300ee7e4835..dfbb21cbee92b955f13aa719635dbe2bbe654c0c 100644
119--- a/src/Hy3Layout.cpp
120+++ b/src/Hy3Layout.cpp
121@@ -8,23 +8,27 @@
122 #include <hyprland/src/output/Monitor.hpp>
123 #include <hyprland/src/state/WorkspaceState.hpp>
124 #include <hyprland/src/state/MonitorState.hpp>
125+#include <hyprland/src/desktop/state/GlobalWindowController.hpp>
126 #include <hyprland/src/desktop/state/FocusState.hpp>
127 #include <hyprland/src/config/ConfigManager.hpp>
128 #include <hyprland/src/desktop/DesktopTypes.hpp>
129 #include <hyprland/src/desktop/Workspace.hpp>
130 #include <hyprland/src/desktop/rule/Engine.hpp>
131-#include <hyprland/src/managers/PointerManager.hpp>
132 #include <hyprland/src/managers/SeatManager.hpp>
133+#include <hyprland/src/managers/fullscreen/FullscreenController.hpp>
134 #include <hyprland/src/managers/input/InputManager.hpp>
135+#include <hyprland/src/pointer/PointerController.hpp>
136+#include <hyprland/src/pointer/PointerManager.hpp>
137 #include <hyprland/src/plugins/PluginAPI.hpp>
138 #include <hyprland/src/plugins/PluginSystem.hpp>
139 #include <hyprland/src/xwayland/XWayland.hpp>
140 #include <hyprland/src/config/shared/workspace/WorkspaceRuleManager.hpp>
141 #include <hyprutils/math/Vector2D.hpp>
142+#include <hyprland/src/config/shared/ConfigErrors.hpp>
143+#include <hyprland/src/config/shared/complex/ComplexDataTypes.hpp>
144+#include <hyprland/src/desktop/state/WindowState.hpp>
145 #include <ranges>
146
147-#include "config/shared/ConfigErrors.hpp"
148-#include "config/shared/complex/ComplexDataTypes.hpp"
149 #include "log.hpp"
150 #include "Hy3Layout.hpp"
151 #include "Hy3Node.hpp"
152@@ -50,7 +54,7 @@ PHLWORKSPACE workspace_for_action(bool allow_fullscreen) {
153 if (!valid(workspace)) workspace = Desktop::focusState()->monitor()->m_activeWorkspace;
154
155 if (!valid(workspace)) return nullptr;
156- if (!allow_fullscreen && workspace->m_hasFullscreenWindow) return nullptr;
157+ if (!allow_fullscreen && Fullscreen::controller()->hasFullscreen(workspace)) return nullptr;
158 if (!hy3InstanceForWorkspace(workspace)) return nullptr;
159
160 return workspace;
161@@ -110,7 +114,7 @@ Hy3Layout::Hy3Layout() {
162
163 auto view = ptr_surface->view();
164 auto* window = dynamic_cast<Desktop::View::CWindow*>(view.get());
165- if (!window || window->m_isFloating || window->isFullscreen()) return;
166+ if (!window || window->m_isFloating || Fullscreen::controller()->isFullscreen(window->m_self.lock())) return;
167
168 auto* node = this->getNodeFromWindow(window);
169 if (!node) return;
170@@ -221,10 +225,8 @@ void Hy3Layout::insertNode(UP<Hy3Node> node_up, std::optional<Vector2D> focalPoi
171
172 if (rootNode != nullptr) {
173 if (focalPoint) {
174- auto window_at_point = g_pCompositor->vectorToWindowUnified(
175- *focalPoint,
176- RESERVED_EXTENTS | INPUT_EXTENTS
177- );
178+ auto window_at_point =
179+ Desktop::viewState()->hitTest().windowAt(*focalPoint, RESERVED_EXTENTS | INPUT_EXTENTS);
180
181 if (window_at_point && window_at_point->m_workspace == ws) {
182 opening_after = this->getNodeFromWindow(window_at_point.get());
183@@ -598,7 +600,7 @@ PHLWINDOW Hy3Layout::findTiledWindowCandidate(const CWindow* from) {
184
185 PHLWINDOW Hy3Layout::findFloatingWindowCandidate(const CWindow* from) {
186 // return the first floating window on the same workspace that has not asked not to be focused
187- for (auto& w: g_pCompositor->m_windows | std::views::reverse) {
188+ for (const auto& w: Desktop::windowState()->windows() | std::views::reverse) {
189 if (w->m_isMapped && !w->isHidden() && w->m_isFloating && !w->isX11OverrideRedirect()
190 && w->m_workspace == from->m_workspace && !w->m_X11ShouldntFocus
191 && !w->m_ruleApplicator->noFocus().valueOrDefault() && w.get() != from)
192@@ -791,18 +793,20 @@ void Hy3Layout::shiftFocus(
193 auto current_window = Desktop::focusState()->window();
194
195 if (current_window != nullptr) {
196- if (current_window->m_workspace->m_hasFullscreenWindow) {
197+ if (Fullscreen::controller()->hasFullscreen(current_window->m_workspace)) {
198 return;
199 }
200
201 if (current_window->m_isFloating) {
202- auto next_window =
203- g_pCompositor->getWindowInDirection(current_window, shiftToMathDirection(direction));
204+ auto next_window = Desktop::windowState()->query().inDirection(
205+ current_window,
206+ shiftToMathDirection(direction)
207+ );
208
209 if (next_window != nullptr) {
210 g_pInputManager->unconstrainMouse();
211 Desktop::focusState()->fullWindowFocus(next_window, Desktop::FOCUS_REASON_KEYBIND);
212- if (warp) Hy3Layout::warpCursorToBox(next_window->m_position, next_window->m_size);
213+ if (warp) Hy3Layout::warpCursorToBox(next_window->m_reportedPosition, next_window->m_reportedSize);
214 }
215 return;
216 }
217@@ -965,10 +969,10 @@ void Hy3Layout::moveNodeToWorkspace(
218 }
219
220 if (focused_window != nullptr
221diff --git a/src/Hy3Node.cpp b/src/Hy3Node.cpp
222index 7b2c1440786974855c7ffda62d01f50ee8846a3b..7e4b3609d8a02c328d4d7a626f6bc6f905529746 100644
223--- a/src/Hy3Node.cpp
224+++ b/src/Hy3Node.cpp
225@@ -10,8 +10,9 @@
226 #include <hyprland/src/plugins/PluginAPI.hpp>
227 #include <hyprland/src/config/shared/workspace/WorkspaceRuleManager.hpp>
228 #include <hyprutils/math/Box.hpp>
229+#include <hyprland/src/config/shared/complex/ComplexDataTypes.hpp>
230+#include <hyprland/src/desktop/state/WindowState.hpp>
231
232-#include "config/shared/complex/ComplexDataTypes.hpp"
233 #include "log.hpp"
234 #include "Hy3Layout.hpp"
235 #include "Hy3Node.hpp"
236@@ -240,13 +241,13 @@ void Hy3Node::focus(bool warp, Desktop::eFocusReason reason) {
237 auto window = this->as_window();
238 window->setHidden(false);
239 Desktop::focusState()->fullWindowFocus(window, reason);
240- if (warp) Hy3Layout::warpCursorToBox(window->m_position, window->m_size);
241+ if (warp) Hy3Layout::warpCursorToBox(window->m_reportedPosition, window->m_reportedSize);
242 break;
243 }
244 case Hy3NodeType::Group: {
245 Desktop::focusState()->resetWindowFocus();
246 for (auto& window: this->windows()) {
247- g_pCompositor->changeWindowZOrder(window.m_self.lock(), true);
248+ Desktop::windowState()->raise(window.m_self.lock());
249 }
250
251 if (warp) Hy3Layout::warpCursorToBox(this->visualBox.pos(), this->visualBox.size());
252@@ -490,7 +491,7 @@ void Hy3Node::recalcSizePosRecursive(CBox offsets, bool no_animation) {
253 // Find the visible window with the highest z-order in this subtree.
254 static CWindow* findTopVisibleWindow(Hy3Node& node) {
255 CWindow* result = nullptr;
256- auto& compositor_windows = g_pCompositor->m_windows;
257+ const auto& compositor_windows = Desktop::windowState()->windows();
258 auto it = compositor_windows.begin();
259 for (auto& window: node.windows(true)) {
260 for (auto search = it; search != compositor_windows.end(); ++search) {
261diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
262index c1155e7dd0b2ad6abc91aa716143a4a91b4cd5e8..ec1d6164e88ca0fc542c007fdc5b019058b483a1 100644
263--- a/src/TabGroup.cpp
264+++ b/src/TabGroup.cpp
265@@ -12,8 +12,9 @@
266 #include <hyprland/src/desktop/DesktopTypes.hpp>
267 #include <hyprland/src/desktop/Workspace.hpp>
268 #include <hyprland/src/helpers/Color.hpp>
269-#include <hyprland/src/managers/animation/AnimationManager.hpp>
270+#include <hyprland/src/animation/AnimationManager.hpp>
271 #include <hyprland/src/managers/input/InputManager.hpp>
272+#include <hyprland/src/managers/fullscreen/FullscreenController.hpp>
273 #include <hyprland/src/render/OpenGL.hpp>
274 #include <hyprland/src/render/Texture.hpp>
275 #include <hyprland/src/config/shared/animation/AnimationTree.hpp>
276@@ -51,56 +52,57 @@ CHyprColor merge_colors(Args... colors) {
277 }
278
279 Hy3TabBarEntry::Hy3TabBarEntry(Hy3TabBar& tab_bar, Hy3Node& node): tab_bar(tab_bar), node(&node) {
280- g_pAnimationManager->createAnimation(
281+ auto& mgr = Animation::mgr();
282+ mgr->createAnimation(
283 0.0F,
284 this->active,
285 Config::animationTree()->getAnimationPropertyConfig("fadeSwitch"),
286 AVARDAMAGE_NONE
287 );
288
289- g_pAnimationManager->createAnimation(
290+ mgr->createAnimation(
291 0.0F,
292 this->focused,
293 Config::animationTree()->getAnimationPropertyConfig("fadeSwitch"),
294 AVARDAMAGE_NONE
295 );
296
297- g_pAnimationManager->createAnimation(
298+ mgr->createAnimation(
299 0.0F,
300 this->urgent,
301 Config::animationTree()->getAnimationPropertyConfig("fadeSwitch"),
302 AVARDAMAGE_NONE
303 );
304
305- g_pAnimationManager->createAnimation(
306+ mgr->createAnimation(
307 0.0F,
308 this->active_monitor,
309 Config::animationTree()->getAnimationPropertyConfig("fadeSwitch"),
310 AVARDAMAGE_NONE
311 );
312
313- g_pAnimationManager->createAnimation(
314+ mgr->createAnimation(
315 -1.0F,
316 this->offset,
317 Config::animationTree()->getAnimationPropertyConfig("windowsMove"),
318 AVARDAMAGE_NONE
319 );
320
321- g_pAnimationManager->createAnimation(
322+ mgr->createAnimation(
323 -1.0F,
324 this->width,
325 Config::animationTree()->getAnimationPropertyConfig("windowsMove"),
326 AVARDAMAGE_NONE
327 );
328
329- g_pAnimationManager->createAnimation(
330+ mgr->createAnimation(
331 1.0F,
332 this->vertical_pos,
333 Config::animationTree()->getAnimationPropertyConfig("windowsMove"),
334 AVARDAMAGE_NONE
335 );
336
337- g_pAnimationManager->createAnimation(
338+ mgr->createAnimation(
339 0.0F,
340 this->fade_opacity,
341 Config::animationTree()->getAnimationPropertyConfig("windowsMove"),
342@@ -396,14 +398,15 @@ CHyprColor Hy3TabBarEntry::mergeColors(
343 }
344
345 Hy3TabBar::Hy3TabBar() {
346- g_pAnimationManager->createAnimation(
347+ auto& mgr = Animation::mgr();
348+ mgr->createAnimation(
349 1.0f,
350 this->fade_opacity,
351 Config::animationTree()->getAnimationPropertyConfig("windowsMove"),
352 AVARDAMAGE_NONE
353 );
354
355- g_pAnimationManager->createAnimation(
356+ mgr->createAnimation(
357 0.0F,
358 this->locked,
359 Config::animationTree()->getAnimationPropertyConfig("fadeSwitch"),
360@@ -585,14 +588,16 @@ Hy3TabGroupWrapper& Hy3TabGroupWrapper::operator=(UP<Hy3TabGroup> tg) {
361 }
362
363 Hy3TabGroup::Hy3TabGroup(Hy3Node& node) {
364- g_pAnimationManager->createAnimation(
365diff --git a/src/dispatchers.cpp b/src/dispatchers.cpp
366index 1bf65e9b617ce97fc900dea7f1d163365a4da4eb..74e9a958689dacad8111312772789bfc1383888f 100644
367--- a/src/dispatchers.cpp
368+++ b/src/dispatchers.cpp
369@@ -9,6 +9,7 @@
370 #include <hyprutils/string/VarList.hpp>
371 #include <hyprland/src/config/lua/LuaBindings.hpp>
372 #include <hyprland/src/config/lua/bindings/LuaBindingsInternal.hpp>
373+#include <hyprland/src/managers/fullscreen/FullscreenController.hpp>
374
375 #include "dispatchers.hpp"
376 #include "log.hpp"
377@@ -323,7 +324,8 @@ static SDispatchResult moveFocus(ShiftDirection shift, bool visible, std::option
378
379 static const auto no_cursor_warps = CConfigValue<Config::INTEGER>("cursor:no_warps");
380 auto warp_cursor = warp_override.value_or(!*no_cursor_warps);
381- if (ws->m_hasFullscreenWindow) {
382+
383+ if (Fullscreen::controller()->hasFullscreen(ws)) {
384 hy3->focusMonitor(shift);
385 return SDispatchResult {};
386 }