Only recreate event source when onWrite() returns 1 (needs continuation).
Prevents infinite loop when no valid transfers are available, fixing high
CPU usage and error spam.
wl_event_source_check makes the event trigger until onx11event returns non
zero. but we arent removing the event source from the event loop so lets
not mark it at all and recieve spurious constant calls.
* Refactored SXSelection::onSelection in XWM.cpp
- Made the function more readable and less redundant
- Extracted repeated conditions into booleans.
- Reduced nested conditionals
- Reused (conn) pointer
* Refectd readProp
* Refactor initSelection
* Revert "xwayland: don't create an abstract unix domain socket on linux (#8874)" (#9574)
This reverts commit 2b01a5bcf6.
* xwayland: make the abstract Unix domain socket optional (#9574)
* xwayland: extend the default permissions for a regular Unix domain socket (#9574)
* xwayland: a little refactoring for `createSocket`
add INCR protocol support for large transfers
fix write handling for partial transfers
fix an issue where wayland windows could die from a paste from an
xwayland window
* xwayland: configure the window on a configure request
* xwayland: move coordinate conversion handling to their own functions
* xwayland: rename configure to configureRequest
* config: make fd use CFileDescriptor
make use of the new hyprutils CFileDescriptor instead of manual FD
handling.
* hyprctl: make fd use CFileDescriptor
make use of the new hyprutils CFileDescriptor instead of manual FD
handling.
* ikeyboard: make fd use CFileDescriptor
make use of the new CFileDescriptor instead of manual FD handling, also
in sendKeymap remove dead code, it already early returns if keyboard
isnt valid, and dont try to close the FD that ikeyboard owns.
* core: make SHMFile functions use CFileDescriptor
make SHMFile misc functions use CFileDescriptor and its associated usage
in dmabuf and keyboard.
* core: make explicit sync use CFileDescriptor
begin using CFileDescriptor in explicit sync and its timelines and
eglsync usage in opengl, there is still a bit left with manual handling
that requires future aquamarine change aswell.
* eventmgr: make fd and sockets use CFileDescriptor
make use of the hyprutils CFileDescriptor instead of manual FD and
socket handling and closing.
* eventloopmgr: make timerfd use CFileDescriptor
make the timerfd use CFileDescriptor instead of manual fd handling
* opengl: make gbm fd use CFileDescriptor
make the gbm rendernode fd use CFileDescriptor instead of manual fd
handling
* core: make selection source/offer use CFileDescriptor
make data selection source and offers use CFileDescriptor and its
associated use in xwm and protocols
* protocols: convert protocols fd to CFileDescriptor
make most fd handling use CFileDescriptor in protocols
* shm: make SHMPool use CfileDescriptor
make SHMPool use CFileDescriptor instead of manual fd handling.
* opengl: duplicate fd with CFileDescriptor
duplicate fenceFD with CFileDescriptor duplicate instead.
* xwayland: make sockets and fds use CFileDescriptor
instead of manual opening/closing make sockets and fds use
CFileDescriptor
* keybindmgr: make sockets and fds use CFileDescriptor
make sockets and fds use CFileDescriptor instead of manual handling.
avoid reallocations as much as possible with a few edge cases where the
reservation overshoots a tiny bit. but a few bytes of memory short term
is better used then the overhead of potential reallocation.