aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/events/Popups.cpp
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-06-23 19:32:00 +0200
committervaxerski <[email protected]>2022-06-23 19:32:00 +0200
commitae6007522600c969b5fe45b3888be5f12f343d1c (patch)
treeb77989608942a64bec6c84f1e32429caa4f6e13b /src/events/Popups.cpp
parentb25bafda0834f58acf50f472bfa0534f5714f30a (diff)
downloadHyprland-ae6007522600c969b5fe45b3888be5f12f343d1c.tar.gz
Hyprland-ae6007522600c969b5fe45b3888be5f12f343d1c.zip
fix calculating damage offset for oversized popups
Diffstat (limited to 'src/events/Popups.cpp')
-rw-r--r--src/events/Popups.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/events/Popups.cpp b/src/events/Popups.cpp
index 0b075295..7e619632 100644
--- a/src/events/Popups.cpp
+++ b/src/events/Popups.cpp
@@ -26,6 +26,14 @@ void addPopupGlobalCoords(void* pPopup, int* x, int* y) {
px += curPopup->popup->current.geometry.x;
py += curPopup->popup->current.geometry.y;
+ // fix oversized fucking popups
+ // kill me
+ if (curPopup->pSurfaceTree && curPopup->pSurfaceTree->pSurface && !curPopup->parentPopup) {
+ const auto EXTENTSSURFACE = pixman_region32_extents(&curPopup->pSurfaceTree->pSurface->input_region);
+ px -= EXTENTSSURFACE->x1;
+ py -= EXTENTSSURFACE->y1;
+ }
+
if (curPopup->parentPopup) {
curPopup = curPopup->parentPopup;
} else {