summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorMightyPlaza <123664421+MightyPlaza@users.noreply.github.com>2023-08-17 08:13:19 +0000
committerGitHub <noreply@github.com>2023-08-17 10:13:19 +0200
commit7155b4c26606d7681bacb2517b1d19495336c6c3 (patch)
tree8940a2c6fc136ff053676459bc7e9c89a60a53e5 /src/managers/input/InputManager.cpp
parent7e8a21202729ca806cd244fb37e5b45abb4cc69b (diff)
renderer: Border improvements (#2986)
* simplify getting border size modified: src/Window.cpp modified: src/Window.hpp modified: src/layout/DwindleLayout.cpp modified: src/layout/MasterLayout.cpp modified: src/render/decorations/CHyprGroupBarDecoration.cpp * fix border damage and input box modified: src/Window.cpp modified: src/managers/AnimationManager.cpp * add border size in resize_on_border box modified: src/managers/input/InputManager.cpp * simplify border (fixes possible typo) modified: src/Window.cpp * use updateSpecialRenderData() modified: Window.cpp modified: Window.hpp modified: events/Windows.cpp modified: layout/DwindleLayout.cpp modified: layout/IHyprLayout.cpp modified: layout/MasterLayout.cpp modified: render/Renderer.cpp * update window workspace rule data on reload modified: src/config/ConfigManager.cpp * use rounding() modified: src/Window.cpp
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index bee83388..c4490f3c 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -1531,14 +1531,16 @@ void CInputManager::setCursorIconOnBorder(CWindow* w) {
}
static auto* const PROUNDING = &g_pConfigManager->getConfigValuePtr("decoration:rounding")->intValue;
- static const auto* PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
static const auto* PEXTENDBORDERGRAB = &g_pConfigManager->getConfigValuePtr("general:extend_border_grab_area")->intValue;
+ const int BORDERSIZE = w->getRealBorderSize();
+
// give a small leeway (10 px) for corner icon
- const auto CORNER = *PROUNDING + *PBORDERSIZE + 10;
+ const auto CORNER = *PROUNDING + BORDERSIZE + 10;
const auto mouseCoords = getMouseCoordsInternal();
wlr_box box = {w->m_vRealPosition.vec().x, w->m_vRealPosition.vec().y, w->m_vRealSize.vec().x, w->m_vRealSize.vec().y};
eBorderIconDirection direction = BORDERICON_NONE;
- wlr_box boxFullGrabInput = {box.x - *PEXTENDBORDERGRAB, box.y - *PEXTENDBORDERGRAB, box.width + 2 * *PEXTENDBORDERGRAB, box.height + 2 * *PEXTENDBORDERGRAB};
+ wlr_box boxFullGrabInput = {box.x - *PEXTENDBORDERGRAB - BORDERSIZE, box.y - *PEXTENDBORDERGRAB - BORDERSIZE, box.width + 2 * (*PEXTENDBORDERGRAB + BORDERSIZE),
+ box.height + 2 * (*PEXTENDBORDERGRAB + BORDERSIZE)};
if (!wlr_box_contains_point(&boxFullGrabInput, mouseCoords.x, mouseCoords.y) || (!m_lCurrentlyHeldButtons.empty() && !currentlyDraggedWindow)) {
direction = BORDERICON_NONE;