@@ -500,16 +500,17 @@ void IHyprLayout::performSnap(Vector2D& sourcePos, Vector2D& sourceSize, PHLWIND
500500 const auto * EXTENTDIFF = *SNAPBORDEROVERLAP ? &EXTENTS : &EXTENTNONE;
501501 const auto MON = DRAGGINGWINDOW->m_monitor .lock ();
502502
503- const auto * GAPSOUT = *SNAPRESPECTGAPS ? sc<CCssGapData*>(PGAPSOUT.ptr ()->getData ()) : &GAPSNONE;
504- const auto WORK_AREA = Desktop::CReservedArea{GAPSOUT->m_top , GAPSOUT->m_right , GAPSOUT->m_bottom , GAPSOUT->m_left }.apply (MON->logicalBoxMinusReserved ());
503+ const auto * GAPSOUT = *SNAPRESPECTGAPS ? sc<CCssGapData*>(PGAPSOUT.ptr ()->getData ()) : &GAPSNONE;
504+ const auto RAW_WORK_AREA = MON->logicalBoxMinusReserved ();
505+ const auto WORK_AREA = Desktop::CReservedArea{GAPSOUT->m_top , GAPSOUT->m_right , GAPSOUT->m_bottom , GAPSOUT->m_left }.apply (RAW_WORK_AREA);
505506
506507 SRange monX = {WORK_AREA.x , WORK_AREA.x + WORK_AREA.w };
507508 SRange monY = {WORK_AREA.y , WORK_AREA.y + WORK_AREA.h };
508509
509- const bool HAS_LEFT = WORK_AREA .x != MON->m_position .x ;
510- const bool HAS_TOP = WORK_AREA .y != MON->m_position .y ;
511- const bool HAS_BOTTOM = WORK_AREA .y + WORK_AREA .h != MON->m_position .y + MON->m_size .y ;
512- const bool HAS_RIGHT = WORK_AREA .x + WORK_AREA .w != MON->m_position .x + MON->m_size .y ;
510+ const bool HAS_LEFT = RAW_WORK_AREA .x != MON->m_position .x ;
511+ const bool HAS_TOP = RAW_WORK_AREA .y != MON->m_position .y ;
512+ const bool HAS_BOTTOM = RAW_WORK_AREA .y + RAW_WORK_AREA .h != MON->m_position .y + MON->m_size .y ;
513+ const bool HAS_RIGHT = RAW_WORK_AREA .x + RAW_WORK_AREA .w != MON->m_position .x + MON->m_size .y ;
513514
514515 if (CORNER & (CORNER_TOPLEFT | CORNER_BOTTOMLEFT) &&
515516 ((HAS_LEFT && canSnap (sourceX.start , monX.start , GAPSIZE)) || canSnap (sourceX.start , (monX.start -= MON->m_reservedArea .left () + EXTENTDIFF->topLeft .x ), GAPSIZE))) {
0 commit comments