* 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.
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.
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.
* 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
* 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>
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.
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.
* 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
* 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
* 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>