aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/config/ConfigManager.cpp1
-rw-r--r--src/layout/IHyprLayout.cpp22
2 files changed, 22 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp
index 09733596..89195a27 100644
--- a/src/config/ConfigManager.cpp
+++ b/src/config/ConfigManager.cpp
@@ -317,6 +317,7 @@ CConfigManager::CConfigManager() {
m_pConfig->addConfigValue("general:hover_icon_on_border", Hyprlang::INT{1});
m_pConfig->addConfigValue("general:layout", {"dwindle"});
m_pConfig->addConfigValue("general:allow_tearing", Hyprlang::INT{0});
+ m_pConfig->addConfigValue("general:resize_corner", Hyprlang::INT{0});
m_pConfig->addConfigValue("misc:disable_hyprland_logo", Hyprlang::INT{0});
m_pConfig->addConfigValue("misc:disable_splash_rendering", Hyprlang::INT{0});
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index 433434de..d2ec1ab1 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -217,7 +217,27 @@ void IHyprLayout::onBeginDragWindow() {
m_vLastDragXY = m_vBeginDragXY;
// get the grab corner
- if (m_vBeginDragXY.x < m_vBeginDragPositionXY.x + m_vBeginDragSizeXY.x / 2.0) {
+ static auto RESIZECORNER = CConfigValue<Hyprlang::INT>("general:resize_corner");
+ if (*RESIZECORNER != 0 && *RESIZECORNER <= 4) {
+ switch (*RESIZECORNER) {
+ case 1:
+ m_eGrabbedCorner = CORNER_TOPLEFT;
+ g_pInputManager->setCursorImageUntilUnset("nw-resize");
+ break;
+ case 2:
+ m_eGrabbedCorner = CORNER_TOPRIGHT;
+ g_pInputManager->setCursorImageUntilUnset("ne-resize");
+ break;
+ case 3:
+ m_eGrabbedCorner = CORNER_BOTTOMRIGHT;
+ g_pInputManager->setCursorImageUntilUnset("se-resize");
+ break;
+ case 4:
+ m_eGrabbedCorner = CORNER_BOTTOMLEFT;
+ g_pInputManager->setCursorImageUntilUnset("sw-resize");
+ break;
+ }
+ } else if (m_vBeginDragXY.x < m_vBeginDragPositionXY.x + m_vBeginDragSizeXY.x / 2.0) {
if (m_vBeginDragXY.y < m_vBeginDragPositionXY.y + m_vBeginDragSizeXY.y / 2.0) {
m_eGrabbedCorner = CORNER_TOPLEFT;
g_pInputManager->setCursorImageUntilUnset("nw-resize");