d0056945d088c984232216c82e19428b9981fafc
- 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 a929c200cb388c82dd577da38a23f86f67803069..7de4a6af96075c96b7604fd90ba95f0f94f2e790 100644
3--- a/flake.lock
4+++ b/flake.lock
5@@ -16,11 +16,11 @@
6 ]
7 },
8 "locked": {
9- "lastModified": 1717181720,
10- "narHash": "sha256-yv+QZWsusu/NWjydkxixHC2g+tIJ9v+xkE2EiVpJj6g=",
11+ "lastModified": 1718450675,
12+ "narHash": "sha256-jpsns6buS4bK+1sF8sL8AaixAiCRjA+nldTKvcwmvUs=",
13 "owner": "hyprwm",
14 "repo": "hyprcursor",
15- "rev": "9e27a2c2ceb1e0b85bd55b0afefad196056fe87c",
16+ "rev": "66d5b46ff94efbfa6fa3d1d1b66735f1779c34a6",
17 "type": "github"
18 },
19 "original": {
20@@ -40,16 +40,16 @@
21 "xdph": "xdph"
22 },
23 "locked": {
24- "lastModified": 1718272446,
25- "narHash": "sha256-hLnnNBWP1Qjs1I3fndMgp8rbWJruxdnGTq77A4Rv4R4=",
26- "rev": "9e781040d9067c2711ec2e9f5b47b76ef70762b3",
27- "revCount": 4818,
28+ "lastModified": 1719164993,
29+ "narHash": "sha256-FABhTnL6CBNrvsHVrEXWYoH+zrNfA4yPmgorQupUSZo=",
30+ "rev": "8a68199a0ceb2894a5d9cc300961c38123ac0312",
31+ "revCount": 4879,
32 "submodules": true,
33 "type": "git",
34 "url": "https://github.com/hyprwm/Hyprland"
35 },
36 "original": {
37- "rev": "9e781040d9067c2711ec2e9f5b47b76ef70762b3",
38+ "rev": "8a68199a0ceb2894a5d9cc300961c38123ac0312",
39 "submodules": true,
40 "type": "git",
41 "url": "https://github.com/hyprwm/Hyprland"
42@@ -69,11 +69,11 @@
43 ]
44 },
45 "locked": {
46- "lastModified": 1691753796,
47- "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
48+ "lastModified": 1714869498,
49+ "narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=",
50 "owner": "hyprwm",
51 "repo": "hyprland-protocols",
52- "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
53+ "rev": "e06482e0e611130cd1929f75e8c1cf679e57d161",
54 "type": "github"
55 },
56 "original": {
57@@ -123,11 +123,11 @@
58 ]
59 },
60 "locked": {
61- "lastModified": 1717881334,
62- "narHash": "sha256-a0inRgJhPL6v9v7RPM/rx1kbXdfe3xJA1c9z0ZkYnh4=",
63+ "lastModified": 1718804078,
64+ "narHash": "sha256-CqRZne63BpYlPd/i8lXV0UInUt59oKogiwdVtBRHt60=",
65 "owner": "hyprwm",
66 "repo": "hyprutils",
67- "rev": "0693f9398ab693d89c9a0aa3b3d062dd61b7a60e",
68+ "rev": "4f1351295c55a8f51219b25aa4a6497a067989d0",
69 "type": "github"
70 },
71 "original": {
72@@ -148,11 +148,11 @@
73 ]
74 },
75 "locked": {
76- "lastModified": 1717784906,
77- "narHash": "sha256-YxmfxHfWed1fosaa7fC1u7XoKp1anEZU+7Lh/ojRKoM=",
78+ "lastModified": 1718119275,
79+ "narHash": "sha256-nqDYXATNkyGXVmNMkT19fT4sjtSPBDS1LLOxa3Fueo4=",
80 "owner": "hyprwm",
81 "repo": "hyprwayland-scanner",
82- "rev": "0f30f9eca6e404130988554accbb64d1c9ec877d",
83+ "rev": "1419520d5f7f38d35e05504da5c1b38212a38525",
84 "type": "github"
85 },
86 "original": {
87@@ -163,11 +163,11 @@
88 },
89 "nixpkgs": {
90 "locked": {
91- "lastModified": 1717974879,
92- "narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=",
93+ "lastModified": 1718530797,
94+ "narHash": "sha256-pup6cYwtgvzDpvpSCFh1TEUjw2zkNpk8iolbKnyFmmU=",
95 "owner": "NixOS",
96 "repo": "nixpkgs",
97- "rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3",
98+ "rev": "b60ebf54c15553b393d144357375ea956f89e9a9",
99 "type": "github"
100 },
101 "original": {
102@@ -214,11 +214,11 @@
103 ]
104 },
105diff --git a/flake.nix b/flake.nix
106index 0f81af8b85f83dcc10b734d840e1c69e77ae15c5..6d21cf44437a06d5ff2894cee5070a95aa161401 100644
107--- a/flake.nix
108+++ b/flake.nix
109@@ -1,6 +1,6 @@
110 {
111 inputs = {
112- hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=9e781040d9067c2711ec2e9f5b47b76ef70762b3";
113+ hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1&rev=8a68199a0ceb2894a5d9cc300961c38123ac0312";
114 };
115
116 outputs = { self, hyprland, ... }: let
117diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
118index b05a5d69601332894a002c213d755a701cc952d6..a4f075e74249aa4b39dbf8c257d87e3fd4d63e2c 100644
119--- a/src/Hy3Layout.cpp
120+++ b/src/Hy3Layout.cpp
121@@ -549,14 +549,14 @@ void Hy3Layout::fullscreenRequestForWindow(
122
123 // clang-format off
124 auto gap_pos_offset = Vector2D(
125- -(gaps_in->left - gaps_out->left),
126- -(gaps_in->top - gaps_out->top)
127+ (int) -(gaps_in->left - gaps_out->left),
128+ (int) -(gaps_in->top - gaps_out->top)
129 );
130 // clang-format on
131
132 auto gap_size_offset = Vector2D(
133- -(gaps_in->left - gaps_out->left) + -(gaps_in->right - gaps_out->right),
134- -(gaps_in->top - gaps_out->top) + -(gaps_in->bottom - gaps_out->bottom)
135+ (int) (-(gaps_in->left - gaps_out->left) + -(gaps_in->right - gaps_out->right)),
136+ (int) (-(gaps_in->top - gaps_out->top) + -(gaps_in->bottom - gaps_out->bottom))
137 );
138
139 Hy3Node fakeNode = {
140@@ -968,15 +968,14 @@ void changeNodeWorkspaceRecursive(Hy3Node& node, const PHLWORKSPACE& workspace)
141 }
142
143 void Hy3Layout::moveNodeToWorkspace(const PHLWORKSPACE& origin, std::string wsname, bool follow) {
144- std::string target_name;
145- auto target_id = getWorkspaceIDFromString(wsname, target_name);
146+ auto target = getWorkspaceIDNameFromString(wsname);
147
148- if (target_id == WORKSPACE_INVALID) {
149+ if (target.id == WORKSPACE_INVALID) {
150 hy3_log(ERR, "moveNodeToWorkspace called with invalid workspace {}", wsname);
151 return;
152 }
153
154- auto workspace = g_pCompositor->getWorkspaceByID(target_id);
155+ auto workspace = g_pCompositor->getWorkspaceByID(target.id);
156
157 if (origin == workspace) return;
158
159@@ -991,9 +990,9 @@ void Hy3Layout::moveNodeToWorkspace(const PHLWORKSPACE& origin, std::string wsna
160 if (!valid(origin_ws)) return;
161
162 if (workspace == nullptr) {
163- hy3_log(LOG, "creating target workspace {} for node move", target_id);
164+ hy3_log(LOG, "creating target workspace {} for node move", target.id);
165
166- workspace = g_pCompositor->createNewWorkspace(target_id, origin_ws->m_iMonitorID, target_name);
167+ workspace = g_pCompositor->createNewWorkspace(target.id, origin_ws->m_iMonitorID, target.name);
168 }
169
170 // floating or fullscreen
171@@ -1583,10 +1582,12 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
172 auto calcPos = window->m_vPosition;
173 auto calcSize = window->m_vSize;
174
175- auto gaps_offset_topleft = Vector2D(gaps_in->left, gaps_in->top) + node->gap_topleft_offset;
176+ auto gaps_offset_topleft =
177+ Vector2D((int) gaps_in->left, (int) gaps_in->top) + node->gap_topleft_offset;
178+
179 auto gaps_offset_bottomright =
180- Vector2D(gaps_in->left + gaps_in->right, gaps_in->top + gaps_in->bottom)
181- + node->gap_bottomright_offset + node->gap_topleft_offset;
182+ Vector2D((int) (gaps_in->left + gaps_in->right), (int) (gaps_in->top + gaps_in->bottom))
183+ + node->gap_bottomright_offset + node->gap_topleft_offset;
184
185 calcPos = calcPos + gaps_offset_topleft;
186 calcSize = calcSize - gaps_offset_bottomright;
187diff --git a/src/Hy3Node.cpp b/src/Hy3Node.cpp
188index 5a9dd3d648499af2e3c4e7a44a6523eec3332627..32a93942dbfdeb4c6322471645080a571ba5ee6d 100644
189--- a/src/Hy3Node.cpp
190+++ b/src/Hy3Node.cpp
191@@ -5,8 +5,8 @@
192 #include <bits/ranges_util.h>
193 #include <hyprland/src/Compositor.hpp>
194 #include <hyprland/src/defines.hpp>
195-#include <hyprland/src/helpers/Box.hpp>
196 #include <hyprland/src/plugins/PluginAPI.hpp>
197+#include <hyprutils/math/Box.hpp>
198
199 #include "Hy3Layout.hpp"
200 #include "Hy3Node.hpp"
201@@ -304,17 +304,15 @@ void Hy3Node::recalcSizePosRecursive(bool no_animation) {
202 static const auto group_inset = ConfigValue<Hyprlang::INT>("plugin:hy3:group_inset");
203 static const auto tab_bar_height = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:height");
204 static const auto tab_bar_padding = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:padding");
205- // clang-format on
206
207- // clang-format off
208 auto gap_topleft_offset = Vector2D(
209- -(gaps_in->left - gaps_out->left),
210- -(gaps_in->top - gaps_out->top)
211+ (int) -(gaps_in->left - gaps_out->left),
212+ (int) -(gaps_in->top - gaps_out->top)
213 );
214
215 auto gap_bottomright_offset = Vector2D(
216- -(gaps_in->right - gaps_out->right),
217- -(gaps_in->bottom - gaps_out->bottom)
218+ (int) -(gaps_in->right - gaps_out->right),
219+ (int) -(gaps_in->bottom - gaps_out->bottom)
220 );
221 // clang-format on
222
223@@ -447,16 +445,16 @@ void Hy3Node::recalcSizePosRecursive(bool no_animation) {
224 if (this->parent != nullptr) child->gap_bottomright_offset.x += *group_inset;
225 } else if (child == group.children.front()) {
226 child->gap_topleft_offset = gap_topleft_offset;
227- child->gap_bottomright_offset = Vector2D(0, gap_bottomright_offset.y);
228+ child->gap_bottomright_offset = Vector2D(0.0, gap_bottomright_offset.y);
229 child->size.x += gap_topleft_offset.x;
230 offset += gap_topleft_offset.x;
231 } else if (child == group.children.back()) {
232- child->gap_topleft_offset = Vector2D(0, gap_topleft_offset.y);
233+ child->gap_topleft_offset = Vector2D(0.0, gap_topleft_offset.y);
234 child->gap_bottomright_offset = gap_bottomright_offset;
235 child->size.x += gap_bottomright_offset.x;
236 } else {
237- child->gap_topleft_offset = Vector2D(0, gap_topleft_offset.y);
238- child->gap_bottomright_offset = Vector2D(0, gap_bottomright_offset.y);
239+ child->gap_topleft_offset = Vector2D(0.0, gap_topleft_offset.y);
240+ child->gap_bottomright_offset = Vector2D(0.0, gap_bottomright_offset.y);
241 }
242
243 child->recalcSizePosRecursive(no_animation);
244@@ -476,16 +474,16 @@ void Hy3Node::recalcSizePosRecursive(bool no_animation) {
245 if (this->parent != nullptr) child->gap_bottomright_offset.y += *group_inset;
246 } else if (child == group.children.front()) {
247 child->gap_topleft_offset = gap_topleft_offset;
248- child->gap_bottomright_offset = Vector2D(gap_bottomright_offset.x, 0);
249+ child->gap_bottomright_offset = Vector2D(gap_bottomright_offset.x, 0.0);
250 child->size.y += gap_topleft_offset.y;
251 offset += gap_topleft_offset.y;
252 } else if (child == group.children.back()) {
253- child->gap_topleft_offset = Vector2D(gap_topleft_offset.x, 0);
254+ child->gap_topleft_offset = Vector2D(gap_topleft_offset.x, 0.0);
255 child->gap_bottomright_offset = gap_bottomright_offset;
256 child->size.y += gap_bottomright_offset.y;
257 } else {
258- child->gap_topleft_offset = Vector2D(gap_topleft_offset.x, 0);
259- child->gap_bottomright_offset = Vector2D(gap_bottomright_offset.x, 0);
260+ child->gap_topleft_offset = Vector2D(gap_topleft_offset.x, 0.0);
261+ child->gap_bottomright_offset = Vector2D(gap_bottomright_offset.x, 0.0);
262 }
263
264 child->recalcSizePosRecursive(no_animation);
265diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
266index 2e384bf7be2c09363fa7e4cbebd492c520c1d671..76184eee9946b0323b57ca6885f8a62a5f4a776a 100644
267--- a/src/TabGroup.cpp
268+++ b/src/TabGroup.cpp
269@@ -4,15 +4,15 @@
270 #include <hyprland/src/Compositor.hpp>
271 #include <hyprland/src/desktop/DesktopTypes.hpp>
272 #include <hyprland/src/desktop/Workspace.hpp>
273-#include <hyprland/src/helpers/Box.hpp>
274 #include <hyprland/src/helpers/Color.hpp>
275 #include <hyprland/src/render/OpenGL.hpp>
276+#include <hyprland/src/render/Texture.hpp>
277 #include <hyprutils/memory/SharedPtr.hpp>
278+#include <hyprutils/math/Box.hpp>
279 #include <pango/pangocairo.h>
280 #include <pixman.h>
281
282 #include "globals.hpp"
283-#include "src/render/Texture.hpp"
284
285 Hy3TabBarEntry::Hy3TabBarEntry(Hy3TabBar& tab_bar, Hy3Node& node): tab_bar(tab_bar), node(node) {
286 this->focused
287@@ -419,7 +419,7 @@ void Hy3TabGroup::updateWithGroup(Hy3Node& node, bool warp) {
288 static const auto bar_height = ConfigValue<Hyprlang::INT>("plugin:hy3:tabs:height");
289
290 auto& gaps = node.parent == nullptr ? gaps_out : gaps_in;
291- auto tpos = node.position + Vector2D(gaps->left, gaps->top) + node.gap_topleft_offset;
292+ auto tpos = node.position + Vector2D((int) gaps->left, (int) gaps->top) + node.gap_topleft_offset;
293
294 // clang-format off
295 auto tsize = Vector2D(