in X11 some surfaces is a parent of itself and creates a cyclic loop
when trying to find its parent. check for old parent and break if its
beginning to roll over.
some weird combination of scrolling/nesting hyprland and closing a
window i managed to divide by zero here, reported by ubsan. add a check
to ensure we dont hit UB.
* watchdog: dont detach and cause race condition
instead of detaching and causing a race condition on destruction where
the thread is alive and watchdog has been destroyed, check if its
joinable and join it on destruction.
causes heap use after free on exit of compositor.
* render: add checks for compositor shutting down
avoid member call on null pointer, if the g_pHyprRenderer is destroyed
we can call the member makeEGLCurrent on it, causes undefined behaviour
on destruction of the compositor/hyprrenderer.
found with ubsan.
* surfacerole: add virtual destructor
all classes that will be derived from should have a virtual destructor
otherwise deleting an instance via pointer to a base class is undefined
behaviour, layershell/xdgshell hits this with std::default_delete in the
new sharedptr implentation.
* includes: fix missing includes
fix missing includes for no precompiled headers builds, and remove a
redefiniton of a macro already defined in macros.hpp
if we are blurring, we cannot be sure whether the occluded region won't be included in the expanded damage. If it is, we'd get dark shimmers.
fixes#6547
* pointer_manager: add lock/unlock software wrappers that receive the raw pointer
* monitor: lock/unlock software pointer rendering when adding/removing mirrored screens
* use relative path in includes
* window: use const references instead of copies
use const references instead of wasteful copies and make the = operator
check for self assignment and return early. also use const in all the
other operators.
* listener: pass std::function as const reference
instead of copies pass the std::functions as const references.
* config: dont unnecessarily convert to c_str
getHyprlangConfigValuePtr wants an std::string and we already have an
std::string, dont convert it to a c_str only for it to be converted back
to an std::string.
* buffer: pass attributes as const reference
pass attributes as const reference instead of copies.