Commit Graph
7364 Commits
Author SHA1 Message Date
Lucas Ritzdorf 3a67eb7982 config/lua: improve error handle-ability with Lua require (#14937)
* config/lua: make `require` throw an actual error for nonexistent modules

`require` uses pcall to catch errors and display them to the user. This
is usually okay, but it also hides errors if Lua tries to load a
nonexistent module, which the Lua config might actually want to detect
and handle on its own (e.g. by loading a different module, or disabling
functionality).

Ref #14534

* config/lua: make vanilla `require` available as `__require`

If `safeLuaRequire()`'s error-catching behavior isn't wanted, this
allows the user to call the original version directly, as `__require`.
Or, they could bring it back as the default by doing e.g.
`require = __require`, which might be desired to avoid breaking
third-party modules that want to catch errors during module load.
2026-06-07 12:27:13 +02:00
Barrett Ruth 70cd53676c renderer: fix cursor:zoom_rigid being ignored with detached camera (#14995)
Problem: `cursor:zoom_rigid` is ignored when `cursor:zoom_detached_camera` is on (the default), so the camera still pans to the cursor at screen edges.

Solution: honor `cursor:zoom_rigid` in `zoomWithDetachedCamera`, skipping the edge-pan so the camera locks at the zoom anchor.
2026-06-07 12:27:13 +02:00
Daniel Krupiński e0571994e8 desktop/rule: optimize mapping rule properties to strings and engines (#14945) 2026-06-07 12:27:13 +02:00
NotPppp1116andPppp1116 ff41b04e7c renderer: reduce per-frame heap allocations (#14932)
* renderer: reduce per-frame heap allocations

* renderer: avoid temporary traversal allocations

* renderer: avoid read-only hot-path copies

* config/actions: guard workspace change without active workspace

* config/lua: release owned state on shutdown

---------

Co-authored-by: Pppp1116 <pcaiadoguerreiro@gmail.com>
2026-06-07 12:27:12 +02:00
Vaxry 0e21e051a2 layout/dragController: reset floating offset on ended drag (#14940) 2026-06-07 12:26:47 +02:00
Son Luong Ngoc bdf0aaa540 renderer/gl: release failed fence syncs (#14956)
A Framework Desktop crash on Hyprland 0.55.2 ended in the renderer
begin path after Aquamarine reported EGL_BAD_PARAMETER from
eglDupNativeFenceFDANDROID. Fix the failed export path because it
creates an EGLSyncKHR before trying to export a native fence fd.

ERR from aquamarine ]: [EGL] Command eglDupNativeFenceFDANDROID errored out with EGL_BAD_PARAMETER (0x12300): eglDupNativeFenceFDANDROID

The coredump stack was:

                Stack trace of thread 5829:
                #0  0x00007fafef025808 abort (libc.so.6 + 0x25808)
                #1  0x0000561bbd621ee4 n/a (Hyprland + 0x3bbee4)
                #2  0x00007fafef044e30 n/a (libc.so.6 + 0x44e30)
                #3  0x00007fafef0ae9cb pthread_kill (libc.so.6 + 0xae9cb)
                #4  0x00007fafef044d08 raise (libc.so.6 + 0x44d08)
                #5  0x0000561bbdc2defa _ZN6Render2GL15CHyprOpenGLImpl5beginEN9Hyprutils6Memory14CSharedPointerI8CMonitorEERKNS2_4Math7CRegionENS4_INS_12IFramebufferEEESt8optionalIS8_E (Hyprland + 0x9c7efa)
                #6  0x0000561bbdc17ea1 _ZN6Render2GL15CHyprGLRenderer19beginRenderInternalEN9Hyprutils6Memory14CSharedPointerI8CMonitorEERNS2_4Math7CRegionEb (Hyprland + 0x9b1ea1)
                #7  0x0000561bbdc7b2f2 _ZN6Render13IHyprRenderer11beginRenderEN9Hyprutils6Memory14CSharedPointerI8CMonitorEERNS1_4Math7CRegionENS_11eRenderModeENS3_I9IHLBufferEENS3_INS_12IFramebufferEEEb (Hyprland + 0xa152f2)
                #8  0x0000561bbdc81579 _ZN6Render13IHyprRenderer13renderMonitorEN9Hyprutils6Memory14CSharedPointerI8CMonitorEEb (Hyprland + 0xa1b579)
                #9  0x0000561bbd84fc7c _ZN22CMonitorFrameScheduler7onFrameEv (Hyprland + 0x5e9c7c)
                #10 0x00007faff0dcb0f9 _ZN9Hyprutils6Signal15CSignalListener12emitInternalEPv (libhyprutils.so.12 + 0x450f9)
                #11 0x00007faff0dcb583 _ZN9Hyprutils6Signal11CSignalBase12emitInternalEPv (libhyprutils.so.12 + 0x45583)
                #12 0x00007faff0eac382 _ZN10Aquamarine8CBackend12dispatchIdleEv (libaquamarine.so.11 + 0x83382)
                #13 0x0000561bbd985c9a n/a (Hyprland + 0x71fc9a)
                #14 0x00007faff0c6ea62 wl_event_loop_dispatch (libwayland-server.so.0 + 0xaa62)
                #15 0x00007faff0c70d07 wl_display_run (libwayland-server.so.0 + 0xcd07)
                #16 0x0000561bbd9892a0 _ZN17CEventLoopManager9enterLoopEv (Hyprland + 0x7232a0)
                #17 0x0000561bbd4dad64 main (Hyprland + 0x274d64)
                #18 0x00007fafef027c4e n/a (libc.so.6 + 0x27c4e)
                #19 0x00007fafef027d8b __libc_start_main (libc.so.6 + 0x27d8b)
                #20 0x0000561bbd60be45 _start (Hyprland + 0x3a5e45)

Destroy the sync object before returning so repeated failures do not
leak EGL sync resources under an already resource-constrained GPU path.
Also log the EGL error value so future reports can distinguish this
path from other export failures.

Validated with:
cmake --build ./build --config Debug --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
git diff --check
ctest --test-dir build --output-on-failure -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
make format-check
2026-06-07 12:26:13 +02:00
NotPppp1116andPppp1116 6a5a369522 monitor: move floating windows with layout changes (#14928)
Co-authored-by: Pppp1116 <pcaiadoguerreiro@gmail.com>
2026-06-07 12:26:13 +02:00
NotPppp1116andPppp1116 112da46788 monitor: retry transient mode selection failures (#14927)
Co-authored-by: Pppp1116 <pcaiadoguerreiro@gmail.com>
2026-06-07 12:26:13 +02:00
Vaxry 4cfead2b01 compositor: give preference to same-workspace windows in getWindowInDirection (#14941)
ref https://github.com/hyprwm/Hyprland/discussions/13782, scrolling needs this to function properly
2026-06-07 12:26:11 +02:00
LionHeartP 44a70fe9cd jeremy: fix auto-generating hyprlang instead of lua config file by default (#14944)
* jeremy: fix auto-generating hyprlang instead of lua config file by default

* jeremy: make safe-mode config also lua
2026-06-07 12:26:03 +02:00
ErrorNoInternet c2ed371edc main: gain SCHED_RR and drop CAP_SYS_NICE earlier (#14897)
Some NixOS users reported that CAP_SYS_NICE still isn't being dropped properly.
Drop CAP_SYS_NICE before other threads are spawned so that it is
properly inherited.
2026-06-07 12:26:03 +02:00
Hagai Cohen 50352e5862 config/actions: fix null derefs in pin dispatcher (#14914)
* hyprtester: add issue14134 regression test

D#14134 reports a pin dispatcher SEGV when a monitor hosting a
pinned floating window is disabled (e.g. lid close on a laptop).
After CMonitor::onDisconnect resets m_activeWorkspace to null,
the CMonitor SP stays alive in m_realMonitors, and the pinned-
window branch of moveWorkspaceToMonitor leaves the window's
m_monitor pointing at the disabled monitor.

The next pin dispatch does null deref inside Config::Actions::pinWindow.

* config/actions: fix null derefs in pin dispatcher

PR #14061 replaced moveToWorkspace(m_activeWorkspace) with
assignToSpace(m_activeWorkspace->m_space) and a separate
layoutTarget() call.

The two new derefs aren't covered by the existing PMONITOR check,
and either one being null crashes the compositor.

In practice, i use pyprland which uses pining function,
and since i am on laptop, sometimes my lid is closed and i have
monitor disabled, this causes null deref when computer goes idle.

    Layout::CWindowTarget::assignToSpace   <- segv
    Config::Actions::pinWindow
    pin
    CDispatcherTranslator::run
    CHyprCtl::getReply

In this fix i've added null checks to avoid crashing
2026-06-07 12:26:03 +02:00
Taz 93daf6e9c8 renderer/gl: skip invalidation clear on empty damage (#14921) 2026-06-07 12:26:03 +02:00
UjinT34 7e2407e4bb renderer: fix screenshader with fp16 (#14918) 2026-06-07 12:26:03 +02:00
NotPppp1116andPppp1116 e8c0163983 internal: replace O_CLOEXEC with FD_CLOEXEC for file descriptor flags (#14909)
* refactor: replace O_CLOEXEC with FD_CLOEXEC for file descriptor flags

* chore: remove local clangd config from PR

---------

Co-authored-by: Pppp1116 <pcaiadoguerreiro@gmail.com>
2026-06-07 12:26:02 +02:00
Vaxry 84ccaf3daa hyprctl: add config full-reload for performing a ground-up reload (#14748)
allows to switch to/from lua at runtime
2026-06-07 12:26:02 +02:00
Vaxry e2ebdcf59a desktop/window: allow focus while held to non-OR X11 windows (#14821)
the drag bug only happens on OR windows, so we should just skip those. Regular toplevels should be focusable.
2026-06-07 12:26:02 +02:00
Vaxry 8bc3925eee config/propRefresher: schedule frames on screen shader refresh (#14874) 2026-06-07 12:26:02 +02:00
Vaxry fc8c353598 core: fix a few fd leaks (#14870)
* core: fix a few fd leaks

ref #14839

* core: fix a few fd leaks

ref #14839
2026-06-07 12:26:02 +02:00
Vaxry f898323082 protocols: bump xdg-decoration to rev 2 (#14869) 2026-06-07 12:26:02 +02:00
Awused 2580e8aa0e desktop/window: fix wrong scale being applied after workspace rules (#14832) 2026-06-07 12:26:02 +02:00
BENDIand0xdeadcode-arch 3ef4e0dc4d binds/submap: fix submap enter bind == bind inside submap (#14856)
* Only process submap bindings if its the same on press

Move the check below the pattern match and check if the key was pressed

Address comment: Remove {}

Remove the new submap check and replace the old one

* tests/keybinds: add additional submap testcase

This tests for cases where the keybind to enter the submap is also bound inside it

---------

Co-authored-by: 0xdeadcode-arch <code.akshat.thukral@gmail.com>
2026-06-07 12:26:02 +02:00
Tom Englund b9e7d097a2 desktop/popup: fix reposition artifacts (#14820)
visible() m_alpha check was reversed, m_lastPos cant be set in
onReposition() and then later used in onCommit() it means its can be
ahead of time and use wrong cords. also expand the damage box by 4 like
done elsewhere.
2026-06-07 12:26:02 +02:00
Tom Englund d15b64e92a renderer: send frame callbacks on presented if no change (#14849)
some very picky clients like firefox expects a frame callback to
continue rendering and send buffers, if the frame is returning early
because no change its not going to recieve it, this becomes very
noticeable on a single firefox window and using new_render_scheduling
where it renders the monitor one extra time where occasionally nothing
had really changed.
2026-06-07 12:26:02 +02:00
umbrageodotus b2632eb4ce xwayland: fix ICCCM synthetic event comparison (#14827) 2026-06-07 12:26:02 +02:00
Awused 55b136e390 protocols/fractional-scale: track if scale is known and send scales eagerly when known (#14798) 2026-06-07 12:26:02 +02:00
ImperishableSecret acf0972147 screencopy: fix screenshare copyfb pending frames (#14837)
* screenshare: only copy fb for pending frames

* render: track stale mirror framebuffer damage
2026-06-07 12:26:02 +02:00
Ahmed Kallel 91b45de657 input: aggregate modifier states from all keyboards on focus enter (#14633)
* fix: aggregate modifier states from all keyboards on focus enter

* hyprtester: add keyboard modifier merging e2e test

* nix: install keyboard-modifiers client binary for tests
2026-06-07 12:26:02 +02:00
Mint a5acafacd8 layout/scrolling: check if cursor overlaps with target in focusOnInput (#14687)
* layout/scrolling: check if cursor overlaps with target in focusOnInput

* test
2026-06-07 12:26:01 +02:00
samsyu518 5b6729c9ab compositor: fix monitor re-enabling on hotplug when dpms is off (#14818) 2026-06-07 12:25:33 +02:00
Awused 44317d084b layersurface: inform layer surfaces of scale changes (#14771)
* layersurface: inform layer surfaces of scale changes

* monitor: move surface scale and transform updates into their own method

* layersurface: ensure layer subsurfaces have scales set on map/commit
2026-06-07 12:24:08 +02:00
Ivo Šmerek 52bd8c48ba config: fix VRR not applying on runtime change (#14744)
* config/values: refresh monitor states on misc:vrr change

`misc:vrr` was missing a `.refresh` annotation, so `refreshBits()` returned 0 and runtime changes via the Lua `hl.set` path never triggered a monitor refresh — the value updated but VRR wasn't applied until a config reload.

Tag the option with `REFRESH_MONITOR_STATES`, which the Lua dynamic-set path schedules (`LuaBindingsConfigRules.cpp`), tripping `PropRefresher` -> `monitorRuleMgr()->ensureVRR()`.

* config/monitor: call ensureVRR after performMonitorReload

`performMonitorReload` swaps `m_activeMonitorRule` via `applyMonitorRule`, but never re-runs `ensureVRR()` for the now-current rule. The PropRefresher does call `ensureVRR()`, but earlier — before `applyMonitorRule` has updated `m_activeMonitorRule.m_vrr` — so it reads the previous setting and the monitor stays on the old VRR mode.

Call `ensureVRR()` after the reload loop completes, matching the contract documented in `CMonitor::applyMonitorRule` ("will be tested in CConfigManager::ensureVRR()").

* clang-format fix

Signed-off-by: BlueManCZ <ivo97@centrum.cz>

---------

Signed-off-by: BlueManCZ <ivo97@centrum.cz>
2026-06-07 12:24:08 +02:00
Vaxry 0bed0d4265 algo/master: guard target in remove (#14756) 2026-06-07 12:24:08 +02:00
UjinT34 17ca8e63ff compositor: fix render unfocused for subsurfaces (#14718) 2026-06-07 12:24:08 +02:00
Vaxry 14cb67b8ba keybinds: store hit binds first, then execute callbacks (#14743)
lua can invalidate the m_keybinds vec in callbacks
2026-06-07 12:24:08 +02:00
Vaxry 7087fe2b03 config/lua: report errors better without check* (#14695) 2026-06-07 12:24:08 +02:00
neonetizen 5ecd8393a2 internal: fix null deref in setWindowFullscreenInternal when fullscreen state stale (#14725) 2026-06-07 12:24:08 +02:00
David Ehnert 71bb405589 config/monitor: refresh splash texture on monitor reload (#14632) 2026-06-07 12:24:08 +02:00
fazzi 308bac5df0 renderer: minor shader fixes (#14584)
* renderer: correctly transpose BT2020toLMS and its inverse

* renderer: fix blur and fade out in HDR
2026-06-07 12:24:08 +02:00
Christopher Kaster e68def5824 meta/lua: add missing notification text field and make timeout required (#14665) 2026-06-07 12:24:08 +02:00
Ivo Šmerek f88569b1a2 config: fix decoration values to refresh on runtime eval/keyword change (#14590)
* config: fix decoration values to refresh on runtime eval/keyword change

Signed-off-by: BlueManCZ <ivo97@centrum.cz>

* config: fix border colors to refresh on runtime eval/keyword change

Signed-off-by: BlueManCZ <ivo97@centrum.cz>

* call damageMonitor in REFRESH_WINDOW_STATES

Signed-off-by: BlueManCZ <ivo97@centrum.cz>

---------

Signed-off-by: BlueManCZ <ivo97@centrum.cz>
2026-06-07 12:24:08 +02:00
Tom Englund 7cb54c91e6 texture: cache G and A swizzle channels aswell (#14605)
add caching for G and A channels aswell.
2026-06-07 12:24:08 +02:00
Nikolai Nechaev 103604996e meta/lua: Gestures can accept a lua function (#14649) 2026-06-07 12:24:08 +02:00
Vaxry acdad4ed38 keybinds: set a fallback releasePending flag for special lua binds (#14600)
fixes #14445
2026-06-07 12:24:08 +02:00
Vaxry c11104377e decoration/glow: fix visibility when no decorate is set (#14602)
fixes #14585
2026-06-07 12:24:08 +02:00
Vaxry 39d7e209c7 version: bump to 0.55.2 v0.55.2 2026-05-16 13:59:19 +01:00
floresce d165363c53 layout/WindowTarget: fix crash when toggling float on oversized windows (#14587)
Related to my issue https://github.com/hyprwm/Hyprland/discussions/14537#discussion-10063053
2026-05-16 13:59:10 +01:00
UjinT34 1f8086ad92 renderer: fix border cm for mirroring (#14574) 2026-05-16 13:59:10 +01:00
Vaxry 850f30ccca config/values: default no_hardware_cursors to 2 (#14575) 2026-05-16 13:59:10 +01:00
Anthony Green fd5450615d protocols/grab: fix refocus to unreachable windows (#14555) 2026-05-16 13:59:10 +01:00