b22f13640f72e5740b31c78a7236b360cfe8c19f

Author
outfoxxed <outfoxxed@outfoxxed.me>
Committer
outfoxxed <outfoxxed@outfoxxed.me>
Date

Message

misc: reformat

Diff

  1diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
  2index a1f54a03fb32ba29ad460c97ed255e37c858eaba..5c0a02c0cfd3387c701cfe7718d4fcbaa268f2d3 100644
  3--- a/src/Hy3Layout.cpp
  4+++ b/src/Hy3Layout.cpp
  5@@ -499,8 +499,7 @@ void Hy3Layout::fullscreenRequestForWindow(
  6     bool on
  7 ) {
  8 	if (!g_pCompositor->windowValidMapped(window)) return;
  9-	if (on == window->m_bIsFullscreen || window->m_pWorkspace->m_bIsSpecialWorkspace)
 10-		return;
 11+	if (on == window->m_bIsFullscreen || window->m_pWorkspace->m_bIsSpecialWorkspace) return;
 12 
 13 	const auto monitor = g_pCompositor->getMonitorFromID(window->m_iMonitorID);
 14 	if (window->m_pWorkspace->m_bHasFullscreenWindow && on) return;
 15@@ -710,7 +709,10 @@ void Hy3Layout::makeGroupOnWorkspace(
 16 	this->makeGroupOn(node, layout, ephemeral);
 17 }
 18 
 19-void Hy3Layout::makeOppositeGroupOnWorkspace(const PHLWORKSPACE& workspace, GroupEphemeralityOption ephemeral) {
 20+void Hy3Layout::makeOppositeGroupOnWorkspace(
 21+    const PHLWORKSPACE& workspace,
 22+    GroupEphemeralityOption ephemeral
 23+) {
 24 	auto* node = this->getWorkspaceFocusedNode(workspace);
 25 	this->makeOppositeGroupOn(node, ephemeral);
 26 }
 27@@ -864,7 +866,12 @@ void Hy3Layout::shiftNode(Hy3Node& node, ShiftDirection direction, bool once, bo
 28 	}
 29 }
 30 
 31-void Hy3Layout::shiftWindow(const PHLWORKSPACE& workspace, ShiftDirection direction, bool once, bool visible) {
 32+void Hy3Layout::shiftWindow(
 33+    const PHLWORKSPACE& workspace,
 34+    ShiftDirection direction,
 35+    bool once,
 36+    bool visible
 37+) {
 38 	auto* node = this->getWorkspaceFocusedNode(workspace);
 39 	if (node == nullptr) return;
 40 
 41@@ -936,8 +943,8 @@ void Hy3Layout::moveNodeToWorkspace(const PHLWORKSPACE& origin, std::string wsna
 42 	auto* focused_window_node = this->getNodeFromWindow(focused_window);
 43 
 44 	auto origin_ws = node != nullptr           ? node->workspace
 45-	          : focused_window != nullptr ? focused_window->m_pWorkspace
 46-	                                      : nullptr;
 47+	               : focused_window != nullptr ? focused_window->m_pWorkspace
 48+	                                           : nullptr;
 49 
 50 	if (!valid(origin_ws)) return;
 51 
 52@@ -1230,7 +1237,11 @@ void Hy3Layout::killFocusedNode(const PHLWORKSPACE& workspace) {
 53 	}
 54 }
 55 
 56-void Hy3Layout::expand(const PHLWORKSPACE& workspace, ExpandOption option, ExpandFullscreenOption fs_option) {
 57+void Hy3Layout::expand(
 58+    const PHLWORKSPACE& workspace,
 59+    ExpandOption option,
 60+    ExpandFullscreenOption fs_option
 61+) {
 62 	auto* node = this->getWorkspaceFocusedNode(workspace, false, true);
 63 	if (node == nullptr) return;
 64 
 65@@ -1498,15 +1509,14 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
 66 
 67 	if (!window->m_pWorkspace->m_bIsSpecialWorkspace
 68 	    && ((*no_gaps_when_only != 0 && (only_node || window->m_bIsFullscreen))
 69-	        || (window->m_bIsFullscreen
 70-	            && window->m_pWorkspace->m_efFullscreenMode
 71-	                   == FULLSCREEN_FULL)))
 72+	        || (window->m_bIsFullscreen && window->m_pWorkspace->m_efFullscreenMode == FULLSCREEN_FULL
 73+	        )))
 74 	{
 75 		window->m_sSpecialRenderData.border = *no_gaps_when_only == 2;
 76-		for (auto& workspace_rule : workspace_rules) {
 77+		for (auto& workspace_rule: workspace_rules) {
 78 			if (workspace_rule.border.has_value()) {
 79-				//Hyprland src/desktop/Window.cpp, line 1107, SHA 5e8c25d498ed5cb7852ae74a876b0c138a62d59d
 80-				//does not break the loop, the last value gets to decide
 81+				// Hyprland src/desktop/Window.cpp, line 1107, SHA 5e8c25d498ed5cb7852ae74a876b0c138a62d59d
 82+				// does not break the loop, the last value gets to decide
 83 				window->m_sSpecialRenderData.border = workspace_rule.border.value();
 84 			}
 85 		}
 86@@ -1841,6 +1851,7 @@ bool Hy3Layout::shouldAutotileWorkspace(const PHLWORKSPACE& workspace) {
 87 	if (this->autotile.workspace_blacklist) {
 88 		return !this->autotile.workspaces.contains(workspace->m_iID);
 89 	} else {
 90-		return this->autotile.workspaces.empty() || this->autotile.workspaces.contains(workspace->m_iID);
 91+		return this->autotile.workspaces.empty()
 92+		    || this->autotile.workspaces.contains(workspace->m_iID);
 93 	}
 94 }
 95diff --git a/src/Hy3Layout.hpp b/src/Hy3Layout.hpp
 96index 93333c307b5d1cd7277c9a76b26ca00716d6f22e..930d91d387cb6324dea4c1696e481b930d60aaf4 100644
 97--- a/src/Hy3Layout.hpp
 98+++ b/src/Hy3Layout.hpp
 99@@ -115,7 +115,13 @@ public:
100 	void shiftFocus(const PHLWORKSPACE& workspace, ShiftDirection, bool visible);
101 	void moveNodeToWorkspace(const PHLWORKSPACE& origin, std::string wsname, bool follow);
102 	void changeFocus(const PHLWORKSPACE& workspace, FocusShift);
103-	void focusTab(const PHLWORKSPACE& workspace, TabFocus target, TabFocusMousePriority, bool wrap_scroll, int index);
104+	void focusTab(
105+	    const PHLWORKSPACE& workspace,
106+	    TabFocus target,
107+	    TabFocusMousePriority,
108+	    bool wrap_scroll,
109+	    int index
110+	);
111 	void setNodeSwallow(const PHLWORKSPACE& workspace, SetSwallowOption);
112 	void killFocusedNode(const PHLWORKSPACE& workspace);
113 	void expand(const PHLWORKSPACE& workspace, ExpandOption, ExpandFullscreenOption);
114diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
115index 08fe876a3886f5066678ab9548df298cafb16f5b..d8005b49a3a827147b4fc33dba2e2770a9088451 100644
116--- a/src/TabGroup.cpp
117+++ b/src/TabGroup.cpp
118@@ -560,8 +560,8 @@ void Hy3TabGroup::renderTabBar() {
119 		glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
120 	}
121 
122-	auto fade_opacity =
123-	  this->bar.fade_opacity.value() * (valid(this->workspace) ? this->workspace->m_fAlpha.value() : 1.0);
124+	auto fade_opacity = this->bar.fade_opacity.value()
125+	                  * (valid(this->workspace) ? this->workspace->m_fAlpha.value() : 1.0);
126 
127 	auto render_entry = [&](Hy3TabBarEntry& entry) {
128 		Vector2D entry_pos = {