mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 11:45:59 +01:00
subsurfaces: guard node's surface
This commit is contained in:
parent
dfb78e0593
commit
c9f7afbf78
1 changed files with 3 additions and 0 deletions
|
@ -3,6 +3,9 @@
|
||||||
#include "../Compositor.hpp"
|
#include "../Compositor.hpp"
|
||||||
|
|
||||||
void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) {
|
void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) {
|
||||||
|
if (!node->pSurface || !node->pSurface->exists())
|
||||||
|
return;
|
||||||
|
|
||||||
*lx += node->pSurface->wlr()->current.dx;
|
*lx += node->pSurface->wlr()->current.dx;
|
||||||
*ly += node->pSurface->wlr()->current.dy;
|
*ly += node->pSurface->wlr()->current.dy;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue