Skip to content

Commit 027a1ad

Browse files
clang-format
1 parent 36b9941 commit 027a1ad

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/layout/IHyprLayout.cpp

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -445,12 +445,12 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
445445
const int OTHERBORDERSIZE = other->getRealBorderSize();
446446
const double BORDERSIZE = OVERLAP ? std::max(DRAGGINGBORDERSIZE, OTHERBORDERSIZE) : (DRAGGINGBORDERSIZE + OTHERBORDERSIZE);
447447

448-
const CBox SURF = other->getWindowMainSurfaceBox();
449-
double gapOffset = 0;
448+
const CBox SURF = other->getWindowMainSurfaceBox();
449+
double gapOffset = 0;
450450
if (*SNAPRESPECTGAPS) {
451-
static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in");
452-
auto* PGAPSINPTR = (CCssGapData*)(PGAPSINDATA.ptr())->getData();
453-
gapOffset = std::max({PGAPSINPTR->m_left, PGAPSINPTR->m_right, PGAPSINPTR->m_top, PGAPSINPTR->m_bottom});
451+
static auto PGAPSINDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_in");
452+
auto* PGAPSINPTR = (CCssGapData*)(PGAPSINDATA.ptr())->getData();
453+
gapOffset = std::max({PGAPSINPTR->m_left, PGAPSINPTR->m_right, PGAPSINPTR->m_top, PGAPSINPTR->m_bottom});
454454
}
455455
const SRange SURFBX = {SURF.x - BORDERSIZE - gapOffset, SURF.x + SURF.w + BORDERSIZE + gapOffset};
456456
const SRange SURFBY = {SURF.y - BORDERSIZE - gapOffset, SURF.y + SURF.h + BORDERSIZE + gapOffset};
@@ -504,11 +504,11 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
504504
const double GAPSIZE = *SNAPMONITORGAP;
505505
const double BORDERDIFF = OVERLAP ? DRAGGINGBORDERSIZE : 0;
506506
const auto MON = DRAGGINGWINDOW->m_monitor.lock();
507-
double gapOffset = 0;
507+
double gapOffset = 0;
508508
if (*SNAPRESPECTGAPS) {
509509
static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>("general:gaps_out");
510510
auto* PGAPSOUTPTR = (CCssGapData*)(PGAPSOUTDATA.ptr())->getData();
511-
gapOffset = std::max({PGAPSOUTPTR->m_left, PGAPSOUTPTR->m_right, PGAPSOUTPTR->m_top, PGAPSOUTPTR->m_bottom});
511+
gapOffset = std::max({PGAPSOUTPTR->m_left, PGAPSOUTPTR->m_right, PGAPSOUTPTR->m_top, PGAPSOUTPTR->m_bottom});
512512
}
513513

514514
if (CORNER & (CORNER_TOPLEFT | CORNER_BOTTOMLEFT) &&
@@ -518,7 +518,8 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
518518
snaps |= SNAP_LEFT;
519519
}
520520
if (CORNER & (CORNER_TOPRIGHT | CORNER_BOTTOMRIGHT) &&
521-
((MON->m_reservedBottomRight.x > 0 && canSnap(sourceX.end, MON->m_position.x + MON->m_size.x - MON->m_reservedBottomRight.x - DRAGGINGBORDERSIZE - gapOffset, GAPSIZE)) ||
521+
((MON->m_reservedBottomRight.x > 0 &&
522+
canSnap(sourceX.end, MON->m_position.x + MON->m_size.x - MON->m_reservedBottomRight.x - DRAGGINGBORDERSIZE - gapOffset, GAPSIZE)) ||
522523
canSnap(sourceX.end, MON->m_position.x + MON->m_size.x - MON->m_reservedBottomRight.x + BORDERDIFF - gapOffset, GAPSIZE))) {
523524
SNAP(sourceX.end, sourceX.start, MON->m_position.x + MON->m_size.x - MON->m_reservedBottomRight.x - DRAGGINGBORDERSIZE - gapOffset);
524525
snaps |= SNAP_RIGHT;
@@ -530,7 +531,8 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
530531
snaps |= SNAP_UP;
531532
}
532533
if (CORNER & (CORNER_BOTTOMLEFT | CORNER_BOTTOMRIGHT) &&
533-
((MON->m_reservedBottomRight.y > 0 && canSnap(sourceY.end, MON->m_position.y + MON->m_size.y - MON->m_reservedBottomRight.y - DRAGGINGBORDERSIZE - gapOffset, GAPSIZE)) ||
534+
((MON->m_reservedBottomRight.y > 0 &&
535+
canSnap(sourceY.end, MON->m_position.y + MON->m_size.y - MON->m_reservedBottomRight.y - DRAGGINGBORDERSIZE - gapOffset, GAPSIZE)) ||
534536
canSnap(sourceY.end, MON->m_position.y + MON->m_size.y - MON->m_reservedBottomRight.y + BORDERDIFF - gapOffset, GAPSIZE))) {
535537
SNAP(sourceY.end, sourceY.start, MON->m_position.y + MON->m_size.y - MON->m_reservedBottomRight.y - DRAGGINGBORDERSIZE - gapOffset);
536538
snaps |= SNAP_DOWN;

0 commit comments

Comments
 (0)