diff options
author | vaxerski <[email protected]> | 2022-06-23 19:32:00 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-06-23 19:32:00 +0200 |
commit | ae6007522600c969b5fe45b3888be5f12f343d1c (patch) | |
tree | b77989608942a64bec6c84f1e32429caa4f6e13b | |
parent | b25bafda0834f58acf50f472bfa0534f5714f30a (diff) | |
download | Hyprland-ae6007522600c969b5fe45b3888be5f12f343d1c.tar.gz Hyprland-ae6007522600c969b5fe45b3888be5f12f343d1c.zip |
fix calculating damage offset for oversized popups
-rw-r--r-- | src/events/Popups.cpp | 8 |
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 { |