summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-15 23:18:19 +0800
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-15 23:18:19 +0800
commit97406dfe9761ebac2f32375e67c7b7b8428cfc88 (patch)
treeef9948a941ab2456eea180bb93349c3f100939fc
parentsession: add scrim (diff)
downloadcaelestia-shell-97406dfe9761ebac2f32375e67c7b7b8428cfc88.tar.gz
caelestia-shell-97406dfe9761ebac2f32375e67c7b7b8428cfc88.tar.bz2
caelestia-shell-97406dfe9761ebac2f32375e67c7b7b8428cfc88.zip
interactions: fix mouse position
Didn't account for border thickness
-rw-r--r--modules/drawers/Interactions.qml11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/drawers/Interactions.qml b/modules/drawers/Interactions.qml
index 884d36c..e937326 100644
--- a/modules/drawers/Interactions.qml
+++ b/modules/drawers/Interactions.qml
@@ -14,11 +14,13 @@ MouseArea {
property point dragStart
function withinPanelHeight(panel: Item, x: real, y: real): bool {
- return y >= panel.y && y <= panel.y + panel.height;
+ const panelY = BorderConfig.thickness + panel.y;
+ return y >= panelY && y <= panelY + panel.height;
}
function inRightPanel(panel: Item, x: real, y: real): bool {
- return x > panel.x && withinPanelHeight(panel, x, y);
+ return x > BorderConfig.thickness + panel.x && withinPanelHeight(panel, x, y);
+ }
}
anchors.fill: parent
@@ -30,7 +32,10 @@ MouseArea {
target: Hyprland
function onCursorPosChanged(): void {
- const {x, y} = Hyprland.cursorPos;
+ const {
+ x,
+ y
+ } = Hyprland.cursorPos;
// Show osd on hover
const showOsd = root.inRightPanel(panels.osd, x, y);