mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 19:25:58 +01:00
fix popup coords iterator
This commit is contained in:
parent
c46be7346e
commit
78491f7092
1 changed files with 9 additions and 3 deletions
|
@ -18,13 +18,19 @@
|
|||
void addPopupGlobalCoords(void* pPopup, int* x, int* y) {
|
||||
SXDGPopup *const PPOPUP = (SXDGPopup*)pPopup;
|
||||
|
||||
auto curPopup = PPOPUP;
|
||||
|
||||
int px = 0;
|
||||
int py = 0;
|
||||
|
||||
auto curPopup = PPOPUP;
|
||||
while (true) {
|
||||
px += curPopup->popup->current.geometry.x - curPopup->popup->base->current.geometry.x;
|
||||
py += curPopup->popup->current.geometry.y - curPopup->popup->base->current.geometry.y;
|
||||
px += curPopup->popup->current.geometry.x;
|
||||
py += curPopup->popup->current.geometry.y;
|
||||
|
||||
if (curPopup == PPOPUP) {
|
||||
px -= curPopup->popup->base->current.geometry.x;
|
||||
py -= curPopup->popup->base->current.geometry.y;
|
||||
}
|
||||
|
||||
// fix oversized fucking popups
|
||||
// kill me
|
||||
|
|
Loading…
Reference in a new issue