@@ -1682,16 +1682,25 @@ SDispatchResult CKeybindManager::moveActiveTo(std::string args) {
1682
1682
1683
1683
if (PLASTWINDOW->m_isFloating ) {
1684
1684
std::optional<float > vPosx, vPosy;
1685
- const auto PMONITOR = PLASTWINDOW->m_monitor .lock ();
1686
- const auto BORDERSIZE = PLASTWINDOW->getRealBorderSize ();
1685
+ const auto PMONITOR = PLASTWINDOW->m_monitor .lock ();
1686
+ const auto BORDERSIZE = PLASTWINDOW->getRealBorderSize ();
1687
+ static auto PGAPSCUSTOMDATA = CConfigValue<Hyprlang::CUSTOMTYPE>(" general:float_gaps" );
1688
+ static auto PGAPSOUTDATA = CConfigValue<Hyprlang::CUSTOMTYPE>(" general:gaps_out" );
1689
+ auto * PGAPSOUT = (CCssGapData*)PGAPSCUSTOMDATA.ptr ()->getData ();
1690
+ if (PGAPSOUT->m_left < 0 || PGAPSOUT->m_right < 0 || PGAPSOUT->m_top < 0 || PGAPSOUT->m_bottom < 0 )
1691
+ PGAPSOUT = (CCssGapData*)PGAPSOUTDATA.ptr ()->getData ();
1687
1692
1688
1693
switch (arg) {
1689
- case ' l' : vPosx = PMONITOR->m_reservedTopLeft .x + BORDERSIZE + PMONITOR->m_position .x ; break ;
1690
- case ' r' : vPosx = PMONITOR->m_size .x - PMONITOR->m_reservedBottomRight .x - PLASTWINDOW->m_realSize ->goal ().x - BORDERSIZE + PMONITOR->m_position .x ; break ;
1694
+ case ' l' : vPosx = PMONITOR->m_reservedTopLeft .x + BORDERSIZE + PMONITOR->m_position .x + PGAPSOUT->m_left ; break ;
1695
+ case ' r' :
1696
+ vPosx = PMONITOR->m_size .x - PMONITOR->m_reservedBottomRight .x - PLASTWINDOW->m_realSize ->goal ().x - BORDERSIZE + PMONITOR->m_position .x - PGAPSOUT->m_right ;
1697
+ break ;
1691
1698
case ' t' :
1692
- case ' u' : vPosy = PMONITOR->m_reservedTopLeft .y + BORDERSIZE + PMONITOR->m_position .y ; break ;
1699
+ case ' u' : vPosy = PMONITOR->m_reservedTopLeft .y + BORDERSIZE + PMONITOR->m_position .y + PGAPSOUT-> m_top ; break ;
1693
1700
case ' b' :
1694
- case ' d' : vPosy = PMONITOR->m_size .y - PMONITOR->m_reservedBottomRight .y - PLASTWINDOW->m_realSize ->goal ().y - BORDERSIZE + PMONITOR->m_position .y ; break ;
1701
+ case ' d' :
1702
+ vPosy = PMONITOR->m_size .y - PMONITOR->m_reservedBottomRight .y - PLASTWINDOW->m_realSize ->goal ().y - BORDERSIZE + PMONITOR->m_position .y - PGAPSOUT->m_bottom ;
1703
+ break ;
1695
1704
}
1696
1705
1697
1706
*PLASTWINDOW->m_realPosition = Vector2D (vPosx.value_or (PLASTWINDOW->m_realPosition ->goal ().x ), vPosy.value_or (PLASTWINDOW->m_realPosition ->goal ().y ));
0 commit comments