@@ -445,12 +445,12 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
445
445
const int OTHERBORDERSIZE = other->getRealBorderSize ();
446
446
const double BORDERSIZE = OVERLAP ? std::max (DRAGGINGBORDERSIZE, OTHERBORDERSIZE) : (DRAGGINGBORDERSIZE + OTHERBORDERSIZE);
447
447
448
- const CBox SURF = other->getWindowMainSurfaceBox ();
449
- double gapOffset = 0 ;
448
+ const CBox SURF = other->getWindowMainSurfaceBox ();
449
+ double gapOffset = 0 ;
450
450
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 });
454
454
}
455
455
const SRange SURFBX = {SURF.x - BORDERSIZE - gapOffset, SURF.x + SURF.w + BORDERSIZE + gapOffset};
456
456
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
504
504
const double GAPSIZE = *SNAPMONITORGAP;
505
505
const double BORDERDIFF = OVERLAP ? DRAGGINGBORDERSIZE : 0 ;
506
506
const auto MON = DRAGGINGWINDOW->m_monitor .lock ();
507
- double gapOffset = 0 ;
507
+ double gapOffset = 0 ;
508
508
if (*SNAPRESPECTGAPS) {
509
509
static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>(" general:gaps_out" );
510
510
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 });
512
512
}
513
513
514
514
if (CORNER & (CORNER_TOPLEFT | CORNER_BOTTOMLEFT) &&
@@ -518,7 +518,8 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
518
518
snaps |= SNAP_LEFT;
519
519
}
520
520
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)) ||
522
523
canSnap (sourceX.end , MON->m_position .x + MON->m_size .x - MON->m_reservedBottomRight .x + BORDERDIFF - gapOffset, GAPSIZE))) {
523
524
SNAP (sourceX.end , sourceX.start , MON->m_position .x + MON->m_size .x - MON->m_reservedBottomRight .x - DRAGGINGBORDERSIZE - gapOffset);
524
525
snaps |= SNAP_RIGHT;
@@ -530,7 +531,8 @@ static void performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWINDOW DRA
530
531
snaps |= SNAP_UP;
531
532
}
532
533
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)) ||
534
536
canSnap (sourceY.end , MON->m_position .y + MON->m_size .y - MON->m_reservedBottomRight .y + BORDERDIFF - gapOffset, GAPSIZE))) {
535
537
SNAP (sourceY.end , sourceY.start , MON->m_position .y + MON->m_size .y - MON->m_reservedBottomRight .y - DRAGGINGBORDERSIZE - gapOffset);
536
538
snaps |= SNAP_DOWN;
0 commit comments