summaryrefslogtreecommitdiff
path: root/src/protocols
Commit message (Collapse)AuthorAgeFilesLines
* core: reserve vector sizes as much as we can (#9118)Tom Englund2025-01-194-2/+20
| | | | | 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.
* core: fixup includesvaxerski2025-01-171-1/+1
|
* core: add LIKELY and UNLIKELY macrosvaxerski2025-01-1756-395/+391
| | | | helps the compiler optimize
* core: cleanup header includes (#9088)user1111111111111111111111111111111112025-01-1726-12/+37
| | | Cleanup some unneeded includes to speed up compilation
* protocols: immediately copy toplevel content when ignoreDamage set (#9049)outfoxxed2025-01-142-3/+8
| | | Also sets m_ignoreDamage, as it wasn't set before.
* protocols: allow hyprland-toplevel-export to capture hidden windows (#9041)outfoxxed2025-01-121-2/+2
|
* protocols: do not capture cursor in toplevel without pointer focus (#9042)outfoxxed2025-01-122-4/+24
|
* renderer: Do not set hdr metadata unless needed (#9014)UjinT342025-01-123-9/+34
|
* core: Add render:allow_early_buffer_release to make buffer release ↵UjinT342025-01-101-5/+10
| | | | configurable (#9019)
* windows: honor xdg_toplevel_set_fullscreen output hint (#8965)Dardo D Kleiner2025-01-092-4/+11
| | | Co-authored-by: Dardo D Kleiner <dardo.kleiner@nrl.navy.mil>
* protocols: fix compilation error (#8988)staz2025-01-081-1/+1
|
* core: Add support for HDR and color management protocols (#8715)UjinT342025-01-076-0/+1017
|
* core: move parts of the animation system to hyprutils (#8868)Maximilian Seidler2025-01-073-13/+13
| | | | | | | | | | | | | * core: change animation manager to use Hyprutils::Animation * config: move animation config to hyprutils animation tree * use g_pAnimationManager->createAnimation and the new PHLANIMVAR template * core: use CGenericAnimatedVariabled::{enabled,setConfig,getStyle} and adapt callbacks * core: adapt animated variable usage (dereference the shared pointer) * misc: bump CMakeLists to hyprutils 0.3.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
* protocols: fix alpha-modifier noncompliance (#8929)outfoxxed2025-01-022-74/+81
| | | | Also fixes small issues with hyprland-surface opacity < 1.0 while surface alpha = 1.0.
* protocols: add hyprland_surface_v1 implementation (#8877)outfoxxed2025-01-012-0/+165
|
* ctm: disable fade animation by default on nvidiavaxerski2024-12-302-0/+15
| | | | Fixes #8891, the nvidia driver dies when we spam CTM too much.
* ctm: add an internal fade animation to ctm transitionsvaxerski2024-12-292-1/+57
|
* foreign-toplevel: update active on null window focus (#8860)user1111111111111111111111111111111112024-12-271-1/+1
| | | | | | | * update ForeignTopLevel on null window focus * fix * clang
* 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-173-8/+2
|
* xwayland: Support cross DnD from Wayland (#8708)Vaxry2024-12-154-60/+211
| | | 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-0725-71/+69
| | | | | This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
* cleanup: Revert use doLater instead of adding idle event handlers (#8624)vaxerski2024-12-034-28/+31
| | | | This reverts commit 6d7544458d0fafcae410c1978a0cabce2fb4a346.
* core: move colorspace handling to oklab (#8635)Vaxry2024-12-033-8/+8
| | | | | | | | | | | * Meson: add hyprgraphics * Nix: add hyprgraphics * CI/setup_base: get hyprgraphics-git --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* cleanup: use doLater instead of adding idle event handlers (#8624)Ikalco2024-12-014-31/+28
|
* 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
* xdg-shell: even more robust layout min/max sizeVaxry2024-11-191-6/+12
| | | | although I don't think any apps use this, but better safe than sorry
* xdg-shell: don't report invalid min/max sizes on unsetVaxry2024-11-191-0/+4
| | | | fixes #8522
* constraints: don't warp pointer position on release (#8491)johannes hanika2024-11-181-1/+1
| | | | | | | | this was annoying for nuklear properties/ui slider elements that grab the pointer via GLFW_CURSOR_DISABLE to allow more range and finer control. upon mouse release, the pointer is reset to the middle of the window without this patch, making long mouse movements necessary to go back to the original position for readjustments. fwiw the new behaviour is consistent with x11 and weston.
* windows/xdg: minor cleanup of min/max size calculationsVaxry2024-11-172-0/+11
| | | | fixes #8495
* pointer: add drm dumb buffers for cursors (#8399)Vaxry2024-11-142-7/+21
| | | | | --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* screencopy: fix build with legacyrendererVaxry2024-11-051-1/+1
| | | | fixes #8355
* renderer: improve api around new framebuffer changesVaxry2024-11-022-2/+2
| | | | ref #8325
* 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.
* core: move internal structures to monitor pointers (#8266)Vaxry2024-10-273-7/+7
|
* internal: cleanup CMonitor usage and fix a few ref hogsVaxry2024-10-2618-59/+57
| | | | ref #8221
* security-context: avoid UB in C macro (#8229)Tom Englund2024-10-252-7/+17
| | | | | | | to safely use wl_container_of with a class the class has to be no virtual functions, no inheritance, and uniform access control (e.g all public) work around this by putting this into a destroywrapper struct.
* internal: Remove some unused lambda captures (#8218)Honkazel2024-10-242-3/+3
|
* internal: Move CMonitor to SP (#8178)Vaxry2024-10-1920-73/+67
| | | | | * move monitors to sp * XD