summaryrefslogtreecommitdiff
path: root/src/protocols/core
Commit message (Collapse)AuthorAgeFilesLines
...
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-172-1/+5
| | | Cleanup some unneeded includes to speed up compilation
* core: Add render:allow_early_buffer_release to make buffer release ↵UjinT342025-01-101-5/+10
| | | | configurable (#9019)
* core: Add support for HDR and color management protocols (#8715)UjinT342025-01-071-0/+3
|
* core/compositor: fix too early buffer release (#8966)UjinT342025-01-061-4/+4
|
* datadevice: guard XWayland server against crashesvaxerski2025-01-061-1/+1
| | | | | | The server might be dead or restarting, and we'd deref null ref #7822
* dnd/seat: avoid sending button events during a dnd opvaxerski2025-01-021-1/+1
| | | | fixes #8781
* Renderer: rewrite render scheduling (#8683)Vaxry2024-12-223-4/+12
| | | This rewrites renderer scheduling. Occlusion is now unified in a new Pass type.
* data-device: fix edge case crash on null xwmVaxry2024-12-211-6/+8
| | | | fixes #8787
* internal: remove dead code (#8748)Ikalco2024-12-171-1/+0
|
* xwayland: Support cross DnD from Wayland (#8708)Vaxry2024-12-152-60/+160
| | | Adds support for drag-and-drop from Wayland clients to XWayland ones
* core/data: Use pointer focus for DnD operations (#8707)Vaxry2024-12-142-13/+28
| | | fixes #7737
* data-device: fixup wrong box expansionVaxry2024-12-121-2/+2
| | | | oopsie 7c03e9d376abe5308c47772b4c17a9c345788f60 was wrong
* core/data-device: expand damage region to fix minor px errorsVaxry2024-12-111-1/+1
| | | | fixes #7656
* core/output: don't send enter too aggresivelyVaxry2024-12-101-1/+1
| | | | | | sometimes this might be like 1px and send enter to the wrong output fixes #8654
* core: Add clang-tidy (#8664)Vaxry2024-12-073-11/+11
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* seat: fix double scrolling in some applications (#8583)Ikalco2024-11-262-0/+5
|
* shm: fix shm fd size check before creating or resizing shm_pool (#8572)Nabil Otsmane2024-11-251-0/+21
| | | | | * protocols: fix shm fd size check before creating or resizing shm_pool * added static to function
* pointer: add drm dumb buffers for cursors (#8399)Vaxry2024-11-142-7/+21
| | | | | --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* internal: more profiling less calls and local copies (#8300)Tom Englund2024-10-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * compositor: reduce amount of window box copies mousemoveunified can call this very frequently, the cbox copying actually shows up as an impact in such cases, move it down in the scope and only do it when necessery. * core: constify and reference frequent calls profiling shows these as frequent called functions try to reduce the amount of copies with references and const the variables. * pointermgr: remove not used local copy, const ref remove unneded local copies and const ref cursorsize. * inputmgr: reduce amount of calls to vectortowindow the amount of calls to g_pCompositor->vectorToWindowUnified fast ramps up in cpu usage with enough windows existing and moving the mouse, move the PWINDOWIDEAL up and reuse it if its already the same. * protocol: compositor remove unused local copy remove unused local copy of accumulateCurrentBufferDamage and const previousBuffer. * renderer: reduce scope of variables and refactor move a few variables down in their scopes to reduce the amount of calls and copies when not needed, also add one more for loop in renderWorkspaceWindows and store the windows in a vector with weakpointers that should be rendered, this adds a loop but reduces the amount of repeated calls to shouldRenderWindow and also makes the rest of the loops go over way smaller vector when many windows exist.
* seat: avoid sending pointless 'keymap' and 'repeat_info' events (#8276)staticssleever6682024-10-282-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #### Describe your PR, what does it fix/add? Fix lag spikes when pressing more than 6 keys at the same time. #### Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.) Debugging process: <details> This is triggered by typing some applications, like CopyQ or XWayland. Typing in Firefox doesn't lead to lag, however it itself does lag handling these events. Profiling CopyQ shows that paths leading to `QtWaylandClient::QWaylandInputDevice::Keyboard::keyboard` take over 80% of processing time of an otherwise idle program. Looking at output of 'wev' even when it's not focused shows same events received over and over again. ``` [14: wl_keyboard] repeat_info: rate: 25 keys/sec; delay: 300 ms [14: wl_keyboard] keymap: format: 1 (xkb v1), size: 64754 ``` Looking at what passes through CInputManager::onKeyboardKey() -> CSeatManager::setKeyboard() shows Hyprland 'switching' between endpoints of the same keyboard, one of them being named like the other but with '-1' suffix. </details> Tested changing layouts in Fcitx5 and with following config. ``` input:kb_layout = us,cz input:kb_variant = ,qwerty input:kb_options = grp:alt_shift_toggle ``` Also tested changing 'input:repeat_delay' while running. Curiously, now these events appear in the output of 'wev' only once. Changing layouts still seems to work fine though. #### Is it ready for merging, or does it need work? Ready for merging.
* internal: few more marginal optimisations from profiling (#8271)Tom Englund2024-10-282-2/+3
| | | | | | | | | | | | | | | | | * deco: reduce local temporars and function calls profiling shows this is a high used function, reduce the amount of function calls and local temporar copies and also check if we even need to add extents at all in the loop. * popup: optimize bfhelper in popups pass nodes as const reference and reserve the size of the children node vector help reduce the reallocations. * procotol: make compositor bfhelper use const ref use const ref for nodes and reserve second nodes vector size to reduce amount of reallocation needed.
* internal: cleanup CMonitor usage and fix a few ref hogsVaxry2024-10-264-13/+13
| | | | ref #8221
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-192-2/+2
| | | | | * move monitors to sp * XD
* output: send enter events on late wl_output bindsVaxry2024-10-163-0/+29
| | | | fixes #6560
* output: update state even if no owner exists (#8044)trianta2024-10-091-1/+1
|
* output/xdg-output: avoid sending events to released globalsVaxry2024-10-091-1/+4
| | | | ref #6835
* wayland/output: send geometry in updateStateVaxry2024-09-301-2/+3
|
* shm: send a static list of shm formatsVaxry2024-09-201-5/+2
| | | | fixes #7733
* data-device: conform to reported source actionsvaxerski2024-09-172-4/+20
| | | | fixes #7815
* data-device: don't send default action of moveVaxry2024-09-141-3/+1
| | | | gtk doesn't like it?
* data-device: send clock time in motion eventsVaxry2024-09-141-1/+4
| | | | remove hack
* presentation-feedback: minor fixupsVaxry2024-08-302-2/+2
|
* data-device: send dndFinished when dnd offer is destroyed while unfinishedVaxry2024-08-282-1/+11
| | | | | | | | fixes #7496 see https://invent.kde.org/plasma/kwin/-/commit/711c5bb43f2823766d5189dc8d567c8f4cec253c see https://bugs.kde.org/show_bug.cgi\?id\=482142
* misc: constify the remaining for loops (#7534)Tom Englund2024-08-266-14/+14
| | | now we roll loops at blazing constified speed.
* core: make most for loops use const references (#7527)Tom Englund2024-08-264-10/+10
| | | | why not let the compiler optimise things for us at hyprspeeds when we can.
* output: dont cast enum out of range (#7448)Tom Englund2024-08-211-1/+1
| | | | avoid casting non typed enum out of range, looks like WL_OUTPUT_MODE_CURRENT was the intention here.
* shm: align size to stride (#7383)Tom Englund2024-08-181-1/+1
| | | calculate the size to the stride we got to better align it.
* protocols: refactor protocol logging to a macro (#7324)Tom Englund2024-08-155-10/+0
| | | | | | 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.
* wayland/compositor: introduce client commit eventsVaxry2024-08-072-2/+5
|
* wayland/compositor: drop pending buffer ref if synchronousVaxry2024-08-061-1/+3
| | | | fixes https://github.com/hyprwm/hyprpicker/issues/85
* renderer: Explicit sync fixes (#7151)Vaxry2024-08-062-10/+12
| | | | | Enables explicit sync by default for most platforms `misc:no_direct_scanout` -> `render:direct_scanout`
* wayland/surface: fixup self-owning surface rolesVaxry2024-08-033-13/+24
| | | | fixes #7133
* pointer: fix buffer crash (#7131)Tom Englund2024-08-011-3/+3
| | | | current buffer->buffer can turn out to be null actually check for its existence or use the lastbuffer when calling updateCursorShm()
* core/surface/buffer: Buffer lock/release fixes (#7110)Vaxry2024-07-316-67/+140
|
* core/surface: fixup a few pointer handling edge casesVaxry2024-07-292-2/+9
|
* surface: emit unmap before unmapping and releasing the buffersvaxerski2024-07-282-2/+2
|
* core: emit unmap event after unmap in surface destroyvaxerski2024-07-281-1/+3
|
* core/surface: drop map/unmap events in member funcsvaxerski2024-07-282-4/+2
| | | | causes loops
* input: refocus last window on keyboard unfocusable surfacesvaxerski2024-07-271-4/+4
| | | | fixes #4460
* wayland/compositor: fixup double buffer releasesvaxerski2024-07-272-14/+8
| | | | fixes #7043