* config: add xwayland enabled option to config
* xwayland: use DISPLAY env variable for enable/disable of new launches
* xwayland: close X11 windows when turning of XWayland
* clang: format fix
* config: add better description for xwayland:enabled
* xwayland: close X11 windows on disable without crashes
* xwayland: better method of informing CXWayland if xwayland enabled
* xwayland: prevent closing non-xwayland windows on disable
* misc: loop formatting
* input: return early in mouseMoveUnified when the session is locked
* sessionLock: make make a commit an opportunity to focus session lock surfaces
* compositor: allow resetting focus when session is locked
* input: remove redundant PMONITOR checks
PMONITOR is checked above
* input: check isSessionLocked earlier in mouseMoveUnified
A bit of reordering, so that we don't call some stuff that is irrelevant
when the session is locked
hyprctl dispatch -- movetoworkspacesilent x,"^kitty$" where X is the
current workspace makes kitty stops updating until current workspace is
changed while it is on the screen. update the suspend state after it has
been moved.
* keybindmgr: avoid uint rollover on mouse keycode
mouse keycode is 0, and the switch case checks for 0 - 8 and rolls over,
just return early if keycode is 0.
* watchdog: avoid data races in watchdog
asan thread sanitizer reported data races in the watchdog from reading
and setting the bool variables make them std::atomic bools. also add a
atomic bool for the main thread to wait for to avoid data race when
reading the config values.
* hyprdebug: change non unicode character to name
asan created false positives and didnt like this bit, so for the sake of
easier debugging rename it to something unicode.
change the hook to monitorAdded instead of newMonitor so its finalized
in the compositor and added to vMonitors, move the
checkDefaultCursorWarp to PointerManager and check for it upon mode
change. and also ensure it doesnt go out of bounds by replacing it in
the middle again on resolution changes.
* framebuffer: avoid gluint overflow
GLuint was being initialized to -1 and rolling over to unsigned int max,
its defined behaviour but very unnecessery. add a bool and use it for
checking if allocated or not.
* opengl: avoid gluint rollover
-1 rolls over to unsigned int max, use 0xFF instead.
* core: big uint64_t to int type conversion
there were a few uint64_t to int implicit conversions overflowing int
and causing UB, make all monitor/workspaces/windows use the new
typedefs. also fix the various related 64 to 32 implicit conversions
going around found with -Wshorten-64-to-32
src/Compositor.cpp:2295:74: error: no member named 'bit_floor' in namespace 'std'
2295 | const eFullscreenMode CURRENT_EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)PWINDOW->m_sFullscreenState.internal);
| ~~~~~^
src/Compositor.cpp:2296:74: error: no member named 'bit_floor' in namespace 'std'
2296 | const eFullscreenMode EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)state.internal);
| ~~~~~^
src/desktop/Window.cpp:1242:34: error: no member named 'bit_floor' in namespace 'std'
1242 | return (eFullscreenMode)std::bit_floor((uint8_t)m_sFullscreenState.internal) == MODE;
| ~~~~~^
* bezier: dont loop on float values
Using a floating-point loop variable with a fixed increment can cause precision
errors over time due to the nature of floating-point arithmetic.
and cause undesired effects.
ex
iteration 1 = 0.10000000149011611938
iteration 2 = 0.20000000298023223877
eventually..
iteration 8 = 0.80000001192092895508
iteration 9 = 0.89999997615814208984
* hyprctl: close sockets on destruction
store socketpath and close the fd and unlink the socket path on exit.
* eventloopmgr: close the timerfd
close the timerfd on exit.
* debug: make logging thread safe
instead of opening and closing the logfile on each write open it on init
and close it on compositor exit. also add a mutex so accidently using
logging from a thread like the watchdog or similiar doesnt cause issues.
* xwl: clean up fd logic
check if the fd is actually opened before closing, and close the
pipesource FD on exit.
* compositor: implement wayland socket handover
This commit implements the compositor side of the Wayland socket
handover protocol as described in the [KDE Wiki]. The CLI options are
chosen so that they are compatible with Kwin.
[KDE Wiki]: https://invent.kde.org/plasma/kwin/-/wikis/Restarting
* main: verify that --wayland-fd is a valid file descriptor
* main: fail if only one of --socket and --wayland-fd is passed
* renderer: add destructor and destroy event source
add destructor and destroy the event source.
one less leak on exit of compositor reported by asan.
* compositor: cleanup eventloop on exit
destruct hyprctl to release the event sources, and properly cleanup the
event loop on exit of compositor. less leaks on exit reported by asan
* threadmgr: destroy event source on destruction
destroy the event source on destruction.
* eventloopmgr: reset eventloopmgr on exit aswell
reset the eventloopmanager on exit of compositor and free the leaking
last idle frame on monitor destroy.
* core: move to hyprutils for utils
Nix: add hyprutils dep
* Meson: add hyprutils dep
* flake.lock: update
---------
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* pointermgr: add destructor to state and free buf
if the pointer has a buffer set it wont be freed upon destruction, make
asan more happy by adding a destructor and wlr_buf_unlock it on exit.
* cursormgr: free the animation timer event source
properly free the animation timer event source on destruction.
* compositor: free the critsig event source on exit
properly free the critical signal event source on exit.
* popup: clang format style
clang format.