@@ -507,7 +507,7 @@ void IHyprLayout::performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWIND
507507 SRange monX = {WORK_AREA.x , WORK_AREA.x + WORK_AREA.w };
508508 SRange monY = {WORK_AREA.y , WORK_AREA.y + WORK_AREA.h };
509509
510- const bool HAS_LEFT = RAW_WORK_AREA.x != MON->m_position .x ;
510+ const bool HAS_LEFT = RAW_WORK_AREA.x != MON->m_position .x ;
511511 const bool HAS_TOP = RAW_WORK_AREA.y != MON->m_position .y ;
512512 const bool HAS_BOTTOM = RAW_WORK_AREA.y + RAW_WORK_AREA.h != MON->m_position .y + MON->m_size .y ;
513513 const bool HAS_RIGHT = RAW_WORK_AREA.x + RAW_WORK_AREA.w != MON->m_position .x + MON->m_size .y ;
@@ -518,7 +518,7 @@ void IHyprLayout::performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWIND
518518 snaps |= SNAP_LEFT;
519519 }
520520 if (CORNER & (CORNER_TOPRIGHT | CORNER_BOTTOMRIGHT) &&
521- ((HAS_RIGHT > 0 && canSnap (sourceX.end , monX.end , GAPSIZE)) || canSnap (sourceX.end , (monX.end += MON->m_reservedArea .right () + EXTENTDIFF->bottomRight .x ), GAPSIZE))) {
521+ ((HAS_RIGHT && canSnap (sourceX.end , monX.end , GAPSIZE)) || canSnap (sourceX.end , (monX.end += MON->m_reservedArea .right () + EXTENTDIFF->bottomRight .x ), GAPSIZE))) {
522522 SNAP (sourceX.end , sourceX.start , monX.end );
523523 snaps |= SNAP_RIGHT;
524524 }
@@ -528,7 +528,7 @@ void IHyprLayout::performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWIND
528528 snaps |= SNAP_UP;
529529 }
530530 if (CORNER & (CORNER_BOTTOMLEFT | CORNER_BOTTOMRIGHT) &&
531- ((HAS_BOTTOM > 0 && canSnap (sourceY.end , monY.end , GAPSIZE)) ||
531+ ((HAS_BOTTOM && canSnap (sourceY.end , monY.end , GAPSIZE)) ||
532532 canSnap (sourceY.end , (monY.end += MON->m_reservedArea .bottom () + EXTENTDIFF->bottomRight .y ), GAPSIZE))) {
533533 SNAP (sourceY.end , sourceY.start , monY.end );
534534 snaps |= SNAP_DOWN;
0 commit comments