* opengl: check if g_pHyprOpengl exist
on compositor destruction we can hit a race where a CEGLSync destructs
and tries to call eglDestroySyncKHR on a null g_pHyprOpengl.
/src/render/OpenGL.cpp:3019:32: runtime error: member access within null pointer of type 'struct CHyprOpenGLImpl'
#0 0x555565eed979 in CEGLSync::~CEGLSync() /src/render/OpenGL.cpp:3019
#1 0x555565f6271e in std::default_delete<CEGLSync>::operator()(CEGLSync*)
const /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/unique_ptr.h:93
* xdgshell: dont apply state on empty states
setsize can be called before a state has been added to pending,
resulting in calling ApplyState with a empty state.
/src/protocols/XDGShell.cpp:323:11: runtime error: null pointer passed as argument 2, which is declared to never be null
#0 0x5555659bf67e in CXDGToplevelResource::applyState() /src/protocols/XDGShell.cpp:323
#1 0x5555659bcedc in CXDGToplevelResource::setSize(Hyprutils::Math::Vector2D const&) /src/protocols/XDGShell.cpp: 256
#2 0x555563eed0ef in Events::listener_commitWindow(void*, void*) /src/events/Windows.cpp:841
for xdg-shell, we can ping the wm_base, and thus render an ANR dialog if an app dies
for XWayland, there probably is a similar method, but I don't know about it and don't care.
this avoids the usage of the unique_ptr PROTO::protocol before it has
been constructed incase one wants to log something inside the
constructor itself, move the logging to macros and print file:linenumber
on ERR,CRIT,WARN and classname on the rest of the levels.
When both flip directions use more space than is available, pick the
direction that has more space available instead of just the opposite
of what was initially requested.