mirror of
https://github.com/Trensa-Organization/hy3.git
synced 2025-03-15 18:53:40 +01:00
misc: reformat
This commit is contained in:
parent
fdc4749ac7
commit
b22f13640f
3 changed files with 34 additions and 17 deletions
|
@ -499,8 +499,7 @@ void Hy3Layout::fullscreenRequestForWindow(
|
|||
bool on
|
||||
) {
|
||||
if (!g_pCompositor->windowValidMapped(window)) return;
|
||||
if (on == window->m_bIsFullscreen || window->m_pWorkspace->m_bIsSpecialWorkspace)
|
||||
return;
|
||||
if (on == window->m_bIsFullscreen || window->m_pWorkspace->m_bIsSpecialWorkspace) return;
|
||||
|
||||
const auto monitor = g_pCompositor->getMonitorFromID(window->m_iMonitorID);
|
||||
if (window->m_pWorkspace->m_bHasFullscreenWindow && on) return;
|
||||
|
@ -710,7 +709,10 @@ void Hy3Layout::makeGroupOnWorkspace(
|
|||
this->makeGroupOn(node, layout, ephemeral);
|
||||
}
|
||||
|
||||
void Hy3Layout::makeOppositeGroupOnWorkspace(const PHLWORKSPACE& workspace, GroupEphemeralityOption ephemeral) {
|
||||
void Hy3Layout::makeOppositeGroupOnWorkspace(
|
||||
const PHLWORKSPACE& workspace,
|
||||
GroupEphemeralityOption ephemeral
|
||||
) {
|
||||
auto* node = this->getWorkspaceFocusedNode(workspace);
|
||||
this->makeOppositeGroupOn(node, ephemeral);
|
||||
}
|
||||
|
@ -864,7 +866,12 @@ void Hy3Layout::shiftNode(Hy3Node& node, ShiftDirection direction, bool once, bo
|
|||
}
|
||||
}
|
||||
|
||||
void Hy3Layout::shiftWindow(const PHLWORKSPACE& workspace, ShiftDirection direction, bool once, bool visible) {
|
||||
void Hy3Layout::shiftWindow(
|
||||
const PHLWORKSPACE& workspace,
|
||||
ShiftDirection direction,
|
||||
bool once,
|
||||
bool visible
|
||||
) {
|
||||
auto* node = this->getWorkspaceFocusedNode(workspace);
|
||||
if (node == nullptr) return;
|
||||
|
||||
|
@ -1230,7 +1237,11 @@ void Hy3Layout::killFocusedNode(const PHLWORKSPACE& workspace) {
|
|||
}
|
||||
}
|
||||
|
||||
void Hy3Layout::expand(const PHLWORKSPACE& workspace, ExpandOption option, ExpandFullscreenOption fs_option) {
|
||||
void Hy3Layout::expand(
|
||||
const PHLWORKSPACE& workspace,
|
||||
ExpandOption option,
|
||||
ExpandFullscreenOption fs_option
|
||||
) {
|
||||
auto* node = this->getWorkspaceFocusedNode(workspace, false, true);
|
||||
if (node == nullptr) return;
|
||||
|
||||
|
@ -1498,9 +1509,8 @@ void Hy3Layout::applyNodeDataToWindow(Hy3Node* node, bool no_animation) {
|
|||
|
||||
if (!window->m_pWorkspace->m_bIsSpecialWorkspace
|
||||
&& ((*no_gaps_when_only != 0 && (only_node || window->m_bIsFullscreen))
|
||||
|| (window->m_bIsFullscreen
|
||||
&& window->m_pWorkspace->m_efFullscreenMode
|
||||
== FULLSCREEN_FULL)))
|
||||
|| (window->m_bIsFullscreen && window->m_pWorkspace->m_efFullscreenMode == FULLSCREEN_FULL
|
||||
)))
|
||||
{
|
||||
window->m_sSpecialRenderData.border = *no_gaps_when_only == 2;
|
||||
for (auto& workspace_rule: workspace_rules) {
|
||||
|
@ -1841,6 +1851,7 @@ bool Hy3Layout::shouldAutotileWorkspace(const PHLWORKSPACE& workspace) {
|
|||
if (this->autotile.workspace_blacklist) {
|
||||
return !this->autotile.workspaces.contains(workspace->m_iID);
|
||||
} else {
|
||||
return this->autotile.workspaces.empty() || this->autotile.workspaces.contains(workspace->m_iID);
|
||||
return this->autotile.workspaces.empty()
|
||||
|| this->autotile.workspaces.contains(workspace->m_iID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,13 @@ public:
|
|||
void shiftFocus(const PHLWORKSPACE& workspace, ShiftDirection, bool visible);
|
||||
void moveNodeToWorkspace(const PHLWORKSPACE& origin, std::string wsname, bool follow);
|
||||
void changeFocus(const PHLWORKSPACE& workspace, FocusShift);
|
||||
void focusTab(const PHLWORKSPACE& workspace, TabFocus target, TabFocusMousePriority, bool wrap_scroll, int index);
|
||||
void focusTab(
|
||||
const PHLWORKSPACE& workspace,
|
||||
TabFocus target,
|
||||
TabFocusMousePriority,
|
||||
bool wrap_scroll,
|
||||
int index
|
||||
);
|
||||
void setNodeSwallow(const PHLWORKSPACE& workspace, SetSwallowOption);
|
||||
void killFocusedNode(const PHLWORKSPACE& workspace);
|
||||
void expand(const PHLWORKSPACE& workspace, ExpandOption, ExpandFullscreenOption);
|
||||
|
|
|
@ -560,8 +560,8 @@ void Hy3TabGroup::renderTabBar() {
|
|||
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
|
||||
}
|
||||
|
||||
auto fade_opacity =
|
||||
this->bar.fade_opacity.value() * (valid(this->workspace) ? this->workspace->m_fAlpha.value() : 1.0);
|
||||
auto fade_opacity = this->bar.fade_opacity.value()
|
||||
* (valid(this->workspace) ? this->workspace->m_fAlpha.value() : 1.0);
|
||||
|
||||
auto render_entry = [&](Hy3TabBarEntry& entry) {
|
||||
Vector2D entry_pos = {
|
||||
|
|
Loading…
Add table
Reference in a new issue