2f01054f801f7b9c818bcc3af9ca0c7c6710a83c
- 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 5771ace18a92c7fbfddd85216bfa8b4d648a2cce..8f52044ac553161059f6fa061c1bf7500fa0a81f 100644
3--- a/flake.lock
4+++ b/flake.lock
5@@ -20,11 +20,11 @@
6 ]
7 },
8 "locked": {
9- "lastModified": 1734906446,
10- "narHash": "sha256-6OWluVE2A8xi+8V3jN9KA72RCgJjYdyyuLBUjxZ2q2U=",
11+ "lastModified": 1736102453,
12+ "narHash": "sha256-5qb4kb7Xbt8jJFL/oDqOor9Z2+E+A+ql3PiyDvsfWZ0=",
13 "owner": "hyprwm",
14 "repo": "aquamarine",
15- "rev": "eecb74dc79bb6752a2a507e6edee3042390a6091",
16+ "rev": "4846091641f3be0ad7542086d52769bb7932bde6",
17 "type": "github"
18 },
19 "original": {
20@@ -116,11 +116,11 @@
21 ]
22 },
23 "locked": {
24- "lastModified": 1734906236,
25- "narHash": "sha256-vH/ysV2ONGQgYZPtcJKwc8jJivzyVxru2aaOxC20ZOE=",
26+ "lastModified": 1736115290,
27+ "narHash": "sha256-Jcn6yAzfUMcxy3tN/iZRbi/QgrYm7XLyVRl9g/nbUl4=",
28 "owner": "hyprwm",
29 "repo": "hyprgraphics",
30- "rev": "6dea3fba08fd704dd624b6d4b261638fb4003c9c",
31+ "rev": "52202272d89da32a9f866c0d10305a5e3d954c50",
32 "type": "github"
33 },
34 "original": {
35@@ -145,17 +145,17 @@
36 "xdph": "xdph"
37 },
38 "locked": {
39- "lastModified": 1734907157,
40- "narHash": "sha256-sF3Wot4jIemoSo0YigdHyoR5JMaXgKja+mPJGoXXk/k=",
41+ "lastModified": 1736542519,
42+ "narHash": "sha256-gGxZNtLLqDPtXB5OZbEltfLW5ZzB6zXGobcuKPt02lg=",
43 "owner": "hyprwm",
44 "repo": "Hyprland",
45- "rev": "5f7ad767dbf0bac9ddd6bf6c825fb9ed7921308a",
46+ "rev": "cef09fbfe6624d2133d81be863bd48bcfc5939d3",
47 "type": "github"
48 },
49 "original": {
50 "owner": "hyprwm",
51 "repo": "Hyprland",
52- "rev": "5f7ad767dbf0bac9ddd6bf6c825fb9ed7921308a",
53+ "rev": "cef09fbfe6624d2133d81be863bd48bcfc5939d3",
54 "type": "github"
55 }
56 },
57@@ -171,11 +171,11 @@
58 ]
59 },
60 "locked": {
61- "lastModified": 1728345020,
62- "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
63+ "lastModified": 1735774328,
64+ "narHash": "sha256-vIRwLS9w+N99EU1aJ+XNOU6mJTxrUBa31i1r82l0V7s=",
65 "owner": "hyprwm",
66 "repo": "hyprland-protocols",
67- "rev": "a7c183800e74f337753de186522b9017a07a8cee",
68+ "rev": "e3b6af97ddcfaafbda8e2828c719a5af84f662cb",
69 "type": "github"
70 },
71 "original": {
72@@ -200,11 +200,11 @@
73 ]
74 },
75 "locked": {
76- "lastModified": 1734906472,
77- "narHash": "sha256-pWPRv/GA/X/iAwoE6gMNUqn/ZeJX1IeLPRpZI0tTPK0=",
78+ "lastModified": 1736114838,
79+ "narHash": "sha256-FxbuGQExtN37ToWYnGmO6weOYN6WPHN/RAqbr7gNPek=",
80 "owner": "hyprwm",
81 "repo": "hyprland-qtutils",
82- "rev": "c77109d7e1ddbcdb87cafd32ce411f76328ae152",
83+ "rev": "6997fe382dcf396704227d2b98ffdd5066da6959",
84 "type": "github"
85 },
86 "original": {
87@@ -229,11 +229,11 @@
88 ]
89 },
90 "locked": {
91- "lastModified": 1734906259,
92- "narHash": "sha256-P79t/7HbACO4/PuJBroGpTptvCWJtXTv+gWsF+sM6MI=",
93+ "lastModified": 1735393019,
94+ "narHash": "sha256-NPpqA8rtmDLsEmZOmz+qR67zsB6Y503Jnv+nSFLKJZ8=",
95 "owner": "hyprwm",
96 "repo": "hyprlang",
97- "rev": "0404833ea18d543df44df935ebf1b497310eb046",
98+ "rev": "55608efdaa387af7bfdc0eddb404c409958efa43",
99 "type": "github"
100 },
101 "original": {
102@@ -254,11 +254,11 @@
103 ]
104 },
105diff --git a/flake.nix b/flake.nix
106index 93d75c59a7332ebac32e915ef3a170a50e7fcaf3..154b2cc97284fe9adc2e97516b711801f0573622 100644
107--- a/flake.nix
108+++ b/flake.nix
109@@ -1,6 +1,6 @@
110 {
111 inputs = {
112- hyprland.url = "github:hyprwm/Hyprland?rev=5f7ad767dbf0bac9ddd6bf6c825fb9ed7921308a";
113+ hyprland.url = "github:hyprwm/Hyprland?rev=cef09fbfe6624d2133d81be863bd48bcfc5939d3";
114 };
115
116 outputs = { self, hyprland, ... }: let
117diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
118index 519e6acc7790e64c4728b75aac1a00e272998ce6..375877df4f8bc24f3cb219ff0177c43a51c668a7 100644
119--- a/src/Hy3Layout.cpp
120+++ b/src/Hy3Layout.cpp
121@@ -504,10 +504,10 @@ void Hy3Layout::resizeActiveWindow(const Vector2D& delta, eRectCorner corner, PH
122 } else if (window->m_bIsFloating) {
123 // No parent node - is this a floating window? If so, use the same logic as the `main` layout
124 const auto required_size = Vector2D(
125- std::max((window->m_vRealSize.goal() + delta).x, 20.0),
126- std::max((window->m_vRealSize.goal() + delta).y, 20.0)
127+ std::max((window->m_vRealSize->goal() + delta).x, 20.0),
128+ std::max((window->m_vRealSize->goal() + delta).y, 20.0)
129 );
130- window->m_vRealSize = required_size;
131+ *window->m_vRealSize = required_size;
132 }
133 }
134
135@@ -531,23 +531,23 @@ void Hy3Layout::fullscreenRequestForWindow(
136 this->applyNodeDataToWindow(node);
137 } else {
138 // restore floating position if not
139- window->m_vRealPosition = window->m_vLastFloatingPosition;
140- window->m_vRealSize = window->m_vLastFloatingSize;
141+ *window->m_vRealPosition = window->m_vLastFloatingPosition;
142+ *window->m_vRealSize = window->m_vLastFloatingSize;
143
144 window->unsetWindowData(PRIORITY_LAYOUT);
145 }
146 } else {
147 // save position and size if floating
148 if (window->m_bIsFloating) {
149- window->m_vLastFloatingPosition = window->m_vRealPosition.goal();
150- window->m_vPosition = window->m_vRealPosition.goal();
151- window->m_vLastFloatingSize = window->m_vRealSize.goal();
152- window->m_vSize = window->m_vRealSize.goal();
153+ window->m_vLastFloatingPosition = window->m_vRealPosition->goal();
154+ window->m_vPosition = window->m_vRealPosition->goal();
155+ window->m_vLastFloatingSize = window->m_vRealSize->goal();
156+ window->m_vSize = window->m_vRealSize->goal();
157 }
158
159 if (target_mode == FSMODE_FULLSCREEN) {
160- window->m_vRealPosition = monitor->vecPosition;
161- window->m_vRealSize = monitor->vecSize;
162+ *window->m_vRealPosition = monitor->vecPosition;
163+ *window->m_vRealSize = monitor->vecSize;
164 } else {
165 // Copy of vaxry's massive hack
166
167@@ -1212,15 +1212,15 @@ Hy3Node* findTabBarAt(Hy3Node& node, Vector2D pos, Hy3Node** focused_node) {
168 auto& children = group.children;
169 auto& tab_bar = *group.tab_bar;
170
171- auto size = tab_bar.size.value();
172- auto x = pos.x - tab_bar.pos.value().x;
173+ auto size = tab_bar.size->value();
174+ auto x = pos.x - tab_bar.pos->value().x;
175 auto child_iter = children.begin();
176
177 for (auto& tab: tab_bar.bar.entries) {
178 if (child_iter == children.end()) break;
179
180- if (x > tab.offset.value() * size.x
181- && x < (tab.offset.value() + tab.width.value()) * size.x)
182+ if (x > tab.offset->value() * size.x
183+ && x < (tab.offset->value() + tab.width->value()) * size.x)
184 {
185 *focused_node = *child_iter;
186 return &node;
187@@ -1646,24 +1646,24 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
188
189 const auto reserved = window->getFullWindowReservedArea();
190
191- window->m_vRealPosition = window->m_vPosition + reserved.topLeft;
192- window->m_vRealSize = window->m_vSize - (reserved.topLeft + reserved.bottomRight);
193+ *window->m_vRealPosition = window->m_vPosition + reserved.topLeft;
194+ *window->m_vRealSize = window->m_vSize - (reserved.topLeft + reserved.bottomRight);
195
196- g_pXWaylandManager->setWindowSize(window, window->m_vRealSize.goal());
197+ g_pXWaylandManager->setWindowSize(window, window->m_vRealSize->goal());
198 } else {
199 auto reserved = window->getFullWindowReservedArea();
200 auto wb = node->getStandardWindowArea({-reserved.topLeft, -reserved.bottomRight});
201
202- window->m_vRealPosition = wb.pos();
203- window->m_vRealSize = wb.size();
204+ *window->m_vRealPosition = wb.pos();
205+ *window->m_vRealSize = wb.size();
206
207 g_pXWaylandManager->setWindowSize(window, wb.size());
208
209 if (no_animation) {
210 g_pHyprRenderer->damageWindow(window);
211
212- window->m_vRealPosition.warp();
213- window->m_vRealSize.warp();
214+ window->m_vRealPosition->warp();
215+ window->m_vRealSize->warp();
216
217 g_pHyprRenderer->damageWindow(window);
218 }
219diff --git a/src/Hy3Node.cpp b/src/Hy3Node.cpp
220index 1766e93a439d376e8dec67507ec84d290169bd0d..5bede0d2878025cea4df72c77c85d8777ed66b82 100644
221--- a/src/Hy3Node.cpp
222+++ b/src/Hy3Node.cpp
223@@ -325,8 +325,8 @@ void Hy3Node::recalcSizePosRecursive(bool no_animation) {
224 auto monitor = this->workspace->m_pMonitor.lock();
225
226 if (window->isEffectiveInternalFSMode(FSMODE_FULLSCREEN)) {
227- window->m_vRealPosition = monitor->vecPosition;
228- window->m_vRealSize = monitor->vecSize;
229+ *window->m_vRealPosition = monitor->vecPosition;
230+ *window->m_vRealSize = monitor->vecSize;
231 return;
232 }
233
234diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
235index c9ac3250bb2ca53b47e20fa5ca8cf5c57a87e238..da6438b911b728352d79938cc3ec6dc69ee9148e 100644
236--- a/src/TabGroup.cpp
237+++ b/src/TabGroup.cpp
238@@ -36,45 +36,62 @@ merge_colors(float f1, CHyprColor c1, float f2, CHyprColor c2, float f3, CHyprCo
239 }
240
241 Hy3TabBarEntry::Hy3TabBarEntry(Hy3TabBar& tab_bar, Hy3Node& node): tab_bar(tab_bar), node(node) {
242- this->focused
243- .create(0.0f, g_pConfigManager->getAnimationPropertyConfig("fadeSwitch"), AVARDAMAGE_NONE);
244-
245- this->urgent
246- .create(0.0f, g_pConfigManager->getAnimationPropertyConfig("fadeSwitch"), AVARDAMAGE_NONE);
247+ g_pAnimationManager->createAnimation(
248+ 0.0F,
249+ this->focused,
250+ g_pConfigManager->getAnimationPropertyConfig("fadeSwitch"),
251+ AVARDAMAGE_NONE
252+ );
253
254- this->offset
255- .create(-1.0f, g_pConfigManager->getAnimationPropertyConfig("windowsMove"), AVARDAMAGE_NONE);
256+ g_pAnimationManager->createAnimation(
257+ 0.0F,
258+ this->urgent,
259+ g_pConfigManager->getAnimationPropertyConfig("fadeSwitch"),
260+ AVARDAMAGE_NONE
261+ );
262
263- this->width
264- .create(-1.0f, g_pConfigManager->getAnimationPropertyConfig("windowsMove"), AVARDAMAGE_NONE);
265+ g_pAnimationManager->createAnimation(
266+ -1.0F,
267+ this->offset,
268+ g_pConfigManager->getAnimationPropertyConfig("windowsMove"),
269+ AVARDAMAGE_NONE
270+ );
271
272- this->vertical_pos
273- .create(1.0f, g_pConfigManager->getAnimationPropertyConfig("windowsMove"), AVARDAMAGE_NONE);
274+ g_pAnimationManager->createAnimation(
275+ -1.0F,
276+ this->width,
277+ g_pConfigManager->getAnimationPropertyConfig("windowsMove"),
278+ AVARDAMAGE_NONE
279+ );
280
281- this->fade_opacity
282- .create(0.0f, g_pConfigManager->getAnimationPropertyConfig("windowsMove"), AVARDAMAGE_NONE);
283+ g_pAnimationManager->createAnimation(
284+ 1.0F,
285+ this->vertical_pos,
286+ g_pConfigManager->getAnimationPropertyConfig("windowsMove"),
287+ AVARDAMAGE_NONE
288+ );
289
290- this->focused.registerVar();
291- this->urgent.registerVar();
292- this->offset.registerVar();
293- this->width.registerVar();
294- this->vertical_pos.registerVar();
295- this->fade_opacity.registerVar();
296+ g_pAnimationManager->createAnimation(
297+ 0.0F,
298+ this->fade_opacity,
299+ g_pConfigManager->getAnimationPropertyConfig("windowsMove"),
300+ AVARDAMAGE_NONE
301+ );
302
303- auto update_callback = [this](void*) { this->tab_bar.dirty = true; };
304+ auto update_callback = [this](auto) { this->tab_bar.dirty = true; };
305
306- this->focused.setUpdateCallback(update_callback);
307- this->urgent.setUpdateCallback(update_callback);
308- this->offset.setUpdateCallback(update_callback);
309- this->width.setUpdateCallback(update_callback);
310- this->vertical_pos.setUpdateCallback(update_callback);
311- this->fade_opacity.setUpdateCallback(update_callback);
312+ this->focused->setUpdateCallback(update_callback);
313+ this->urgent->setUpdateCallback(update_callback);
314+ this->offset->setUpdateCallback(update_callback);
315+ this->width->setUpdateCallback(update_callback);
316+ this->vertical_pos->setUpdateCallback(update_callback);
317+ this->fade_opacity->setUpdateCallback(update_callback);
318
319 this->window_title = node.getTitle();
320- this->urgent = node.isUrgent();
321+ *this->urgent = node.isUrgent();
322
323- this->vertical_pos = 0.0;
324- this->fade_opacity = 1.0;
325+ *this->vertical_pos = 0.0;
326+ *this->fade_opacity = 1.0;
327 }
328
329 bool Hy3TabBarEntry::operator==(const Hy3Node& node) const { return this->node == node; }
330@@ -84,15 +101,15 @@ bool Hy3TabBarEntry::operator==(const Hy3TabBarEntry& entry) const {
331 }
332
333 void Hy3TabBarEntry::setFocused(bool focused) {
334- if (this->focused.goal() != focused) {
335- this->focused = focused;
336+ if (this->focused->goal() != focused) {
337+ *this->focused = focused;
338diff --git a/src/TabGroup.hpp b/src/TabGroup.hpp
339index 9e85e9dbade38e35398d6db8517fe527d1767173..b05a43d7fb09ecb1f35046bf8d9f814309f178fc 100644
340--- a/src/TabGroup.hpp
341+++ b/src/TabGroup.hpp
342@@ -17,12 +17,12 @@ struct Hy3TabBarEntry {
343 std::string window_title;
344 bool destroying = false;
345 SP<CTexture> texture;
346- CAnimatedVariable<float> focused;
347- CAnimatedVariable<float> urgent;
348- CAnimatedVariable<float> offset; // 0.0-1.0 of total bar
349- CAnimatedVariable<float> width; // 0.0-1.0 of total bar
350- CAnimatedVariable<float> vertical_pos; // 0.0-1.0, user specified direction
351- CAnimatedVariable<float> fade_opacity; // 0.0-1.0
352+ PHLANIMVAR<float> focused;
353+ PHLANIMVAR<float> urgent;
354+ PHLANIMVAR<float> offset; // 0.0-1.0 of total bar
355+ PHLANIMVAR<float> width; // 0.0-1.0 of total bar
356+ PHLANIMVAR<float> vertical_pos; // 0.0-1.0, user specified direction
357+ PHLANIMVAR<float> fade_opacity; // 0.0-1.0
358 Hy3TabBar& tab_bar;
359 Hy3Node& node; // only used for comparioson. do not deref.
360
361@@ -65,7 +65,7 @@ public:
362 bool destroy = false;
363 bool dirty = true;
364 bool damaged = true;
365- CAnimatedVariable<float> fade_opacity;
366+ PHLANIMVAR<float> fade_opacity;
367
368 Hy3TabBar();
369 void beginDestroy();
370@@ -105,8 +105,8 @@ public:
371 PHLWORKSPACE workspace = nullptr;
372 bool hidden = false;
373 Hy3TabBar bar;
374- CAnimatedVariable<Vector2D> pos;
375- CAnimatedVariable<Vector2D> size;
376+ PHLANIMVAR<Vector2D> pos;
377+ PHLANIMVAR<Vector2D> size;
378
379 // initialize a group with the given node. UB if node is not a group.
380 Hy3TabGroup(Hy3Node&);