Commit graph

7196 commits

Author SHA1 Message Date
e1bda229bd
config/actions: remove spammy errors and make them silent
those are just annoying
2026-04-27 23:55:50 +01:00
Psilocybin78
c8c66642e4
seat: fix dropped wl_keyboard.enter after stale keyboardFocusResource (#14143)
* seat: fix dropped wl_keyboard.enter after stale keyboardFocusResource

CSeatManager::setKeyboardFocus's leave loop was gated on
m_state.keyboardFocusResource (a WP<CWLSeatResource>). That weak
pointer can expire between focus cycles — most reliably via the
explicit `.reset()` in KeybindManager::passKeys for XWayland
targets, but also in practice after certain wl_seat rebind
sequences from toolkit-level churn. When the WP is expired, the
leave loop's `if (m_state.keyboardFocusResource)` is false, the
loop is skipped, and no wl_keyboard.leave is sent for the previous
focus. The old client's CWLKeyboardResource keeps m_currentSurface
pointing at its old surface.

On the next focus back to that surface,
CWLKeyboardResource::sendEnter's per-keyboard dedup fires
(`if (m_currentSurface == surface) return;`) and the enter is
silently dropped. Net result: client believes it's still focused,
compositor routes keys via m_state.keyboardFocusResource which now
points somewhere else, typed keystrokes silently go to a different
window. A mouse drag resyncs because
InputManager::processMouseDownNormal → refocus() →
mouseMoveUnified(refocus=true) → rawWindowFocus(…, foundSurface)
takes a different path that forces the leave/enter pair through.

Reported and reproducible in discussion #14141.

Fix: iterate PROTO::seat->m_keyboards (the global owning list) in
the leave loop and let sendLeave()'s own m_currentSurface gate
decide whether each keyboard needs the event. sendLeave() and the
sendMods(0,…) that precedes it are already gated on m_currentSurface
being set, so iterating every keyboard is a no-op for any keyboard
that wasn't on the previous focus — identical semantics to the old
code in the healthy case, correct in the broken case.

Enter loop unchanged: it's driven by surf->client() which is a
cached wl_client* on the surface resource, stable across cycles.

Verified against the repro in #14141 (two wev instances cycled via
`hyprctl dispatch focuswindow`). Before the fix both windows get
stuck in a "I am focused" state after ~3 cycles. After the fix
leave/enter pair each dispatch cleanly.

* seat: apply same leave-loop fix to setPointerFocus

Identical failure mode to the keyboard case in the previous commit:
setPointerFocus's leave loop is gated on m_state.pointerFocusResource,
which can expire between focus changes. When it does, the leave is
skipped, the previously-focused client's wl_pointer m_currentSurface
stays stuck, and the next sendEnter's per-pointer dedup silently
drops the enter.

sendPointerButton also early-returns on `if (!m_state.pointerFocusResource)`,
so the visible symptom is "a click on a taskbar / dock / menu button
doesn't register after a layer-shell Overlay surface appeared or
disappeared, until the user moves the mouse." Motion re-syncs focus
via InputManager::mouseMoveUnified → setPointerFocus with a fresh
resource, at which point clicks work again.

Fix is the same: iterate PROTO::seat->m_pointers and let sendLeave's
m_currentSurface gate decide. No-op for pointers not on the old
surface.
2026-04-27 22:39:39 +01:00
erstarr
5caf1df1af
examples: fix missing permissions entry in lua example config (#14177) 2026-04-27 22:39:16 +01:00
Michael Tennant
d73d3f0028
logging: update uri of debug log in ConfigManager to reflect change in wiki (#14185) 2026-04-27 21:02:38 +01:00
Tom Englund
62136f1669
cmake: install the default example hyprland.lua (#14174)
install the default lua example aswell.
2026-04-27 20:59:45 +01:00
fazzi
cc726ad6d0
NotificationOverlay: take reserved space into account (#14184) 2026-04-27 20:50:51 +01:00
Visal Vijay
5419ea6a44
tests: tolerate plugin config mismatch in CI (#14173) 2026-04-27 15:29:38 +01:00
Freevatar
9e357f2481
xdg-foreign-v2: Keep invalid imported objects alive (#14166)
* xdg-foreign-v2: validate toplevel surfaces correctly before exporting or parenting

* xdg-foreign-v2: Keep invalid imported objects alive
2026-04-27 13:24:38 +01:00
xxyangyoulin
b5d0519ccd
desktop/view: fix SIGABRT in CWindow::onUnmap when monitor is expired (#14148)
m_monitor is a WP<CMonitor> (weak_ptr). In onUnmap(), calling
m_monitor->activeWorkspaceID() without .lock() causes SIGABRT when
the monitor has been destroyed before the XWayland unmap event
arrives, e.g. when a window on a special workspace is unmapped.
2026-04-27 13:22:34 +01:00
Vaxry
80763b13ff
keybindMgr: use legacy behavior for single-key binds on lua (#14176) 2026-04-27 01:10:28 +01:00
3b5d979d41
examples: merge config blocks in lua example as demo 2026-04-27 00:23:26 +01:00
3ed490ac01
config/lua: fix window object to selector logic 2026-04-26 23:44:33 +01:00
a5baf45d69
input: fix device configs for pointer devices 2026-04-26 23:29:18 +01:00
99a6c5f2e2
config/legacy: translate default window args properly
fixes some dispatchers
2026-04-26 23:18:26 +01:00
Vaxry
0e64d9e2b6
config/lua: don't pop up an error if no target was found (#14175) 2026-04-26 23:07:17 +01:00
fazzi
84d45bd13a
monitor: set format back after failing DS activation (#14168)
we do run m_lastScanout.reset(), but m_lastScanout might sometimes not
be set. cache format from before attempting DS, and set back to it on
activation failure.
2026-04-26 19:21:13 +01:00
fazzi
d669ea7db2
renderer: swizzle on shm screencopy (#14167)
in ds format (XBGR8888) the swizzle was pretty much being ignored. It
would cause screenshots taken within DS, or apps which use screencopy
like hyprpicker, wayfreeze, and still, to come out with the red and blue
channels flipped.
2026-04-26 19:20:18 +01:00
3ventic
2652e2aeab
config/legacy: default to active window for movetoworkspace dispatchers (#14170) 2026-04-26 19:13:56 +01:00
Vaxry
c6847eb357
example/hyprland.lua: fix wiki links for new stuff (#14172) 2026-04-26 18:31:12 +01:00
vaxerski
13d3695dd1 [gha] build man pages 2026-04-26 14:16:54 +00:00
Vaxry
5ba33f8461
config/lua: init lua config manager, use lua if available (#13817)
Adds a new lua config manager, which will automatically be used if there is a lua config present.
2026-04-26 15:16:36 +01:00
Damien Trala
329b2b356d
internal: include setByUser in CConfigManager::getConfigValue (#14155) 2026-04-26 10:57:10 +01:00
vaxerski
b7a3042964 [gha] Nix: update inputs 2026-04-25 21:17:24 +00:00
Vaxry
ab8e015bc9
screenshare/frame: set m_copied after shm copy succeeds (#14165) 2026-04-25 22:15:14 +01:00
Vaxry
e3c9b64812
opengl/shadow: fix shadow offset rendering (#14156) 2026-04-24 15:21:16 +01:00
Tom Englund
b65714e3b8
opengl: minor egl changes (#14147)
* opengl: explicitly set stencil mask

set stencil mask to 0xFF to allow writes, when done set it back to 0x00
to become readonly, avoids potential mishaps. also at the end set the
stencil op to GL_KEEP and it will certainly be read only until next time
its changed.

* opengl: use modern glClearBufferfv over glClear

use more modern glClearBufferfv instead, and also clear the entire
buffer if a clearpass has been added but no renderdamage exist.
2026-04-23 13:32:11 +01:00
ssareta
300cdb7c32
workspace: fix missing null access guard (#14119) 2026-04-22 21:21:19 +01:00
Visal Vijay
d4dd299d80
tests: stabilize CI by relaxing env-dependent checks and timing-sensitive assertions (#14142)
* tests: relax initial colorManagementPreset expectation

* tests: relax hardcoded dwindle position expectation

* tests: stabilize keybind timing and relax env-dependent color checks

* fix cf
2026-04-22 14:29:04 +01:00
vaxerski
019dac7a05 [gha] Nix: update inputs 2026-04-21 21:09:26 +00:00
Visal Vijay
c9b551f59c
xwayland: handle transient read errors in selection transfer (#14135) 2026-04-21 22:07:58 +01:00
Conner
73f4807796
keybinds: fix missing z-order update on floating toggle (#14100) 2026-04-20 19:45:22 +01:00
Mihail Costea
e12d2b7cc8
input: implement follow_mouse_shrink (#13707)
* input: implement follow_mouse_shrink

Add a new config option `input:follow_mouse_shrink` (INT, 0-300, default 0)
that shrinks inactive window hitboxes by the specified number of pixels for
focus detection purposes. This creates a dead zone in gaps between windows
where moving the cursor will not trigger a focus change.

The shrink only applies to inactive (non-focused) windows and only during
mouse-move focus checks (follow_mouse = 1). Click and scroll interactions
are unaffected — clicking on a window in the shrunk area still works
normally once the window is focused.

Closes #9973

* tests: add integration test for follow_mouse_shrink
2026-04-20 16:56:30 +01:00
Vaxry
a360c31d04
errorOverlay: modernize, refactor, use GPU rendering (#14122)
Improves the overlay's rendering:
- GPU accelerated
- supports gradients
- wraps
- cleaner code a bit
2026-04-19 18:47:49 +01:00
889ee4f26d
hyprctl: add hw cursor flag 2026-04-18 13:08:29 +01:00
UjinT34
d50ad2475c
renderer: simplify shadows (#14047) 2026-04-18 11:35:16 +01:00
593fd5650a
protocols/compositor: fix presentFeedback being blocked
ref #14105
2026-04-18 10:43:16 +01:00
Vaxry
78f0918339
algo/scroll: add center for centering the current col (#14059)
ref #14027
2026-04-17 19:48:58 +01:00
f75a14d19e CI/Nix: use org-wide actions 2026-04-17 16:54:27 +03:00
Vaxry
b5ea887f07
debug/overlay: optimize rendering, cleanup and nicetify (#14097)
optimizes the rendering, drops direct cairo, fixes up api.
Also improves the visuals etc of the overlay
2026-04-16 19:47:53 +01:00
UjinT34
66ea2e2c9e
renderer: Various CM fixes, part 8 of refactors (#13860)
Part 8 of Ujin's refactors.
2026-04-16 19:19:25 +01:00
Vaxry
4cce7f60a9
notifications: move and small refactor (#14094)
moves to notification/, and adds a new style manager getter.
2026-04-16 17:56:25 +01:00
Nikolai Nechaev
ff459f4a2a
groups: fix movewindoworgroup when moving from group to group (#14086)
* Add test for movewindowgroup

* groups: Fix `movewindoworgroup` moving into group

Fixes `CKeybindManager::moveWindowIntoGroup` to
remove a window from a group before attempting
to add it to another group. Addresses #13843.

But the animation of moving a window from a group
into another group now looks weird: as if the
whole target group is being moved.
2026-04-16 17:54:04 +01:00
Visal Vijay
1ea0a43615
monocle: avoid repeated workspace monitor lock() calls (#14085)
* refactor(monocle): avoid repeated workspace monitor lock() calls

* clang-format

* cleanup: avoid repeated weak_ptr::lock() calls

* style: shorten variable name PMONITORWORKSPACEOWNER to PMONITOR
2026-04-16 17:53:12 +01:00
Vaxry
ed349e84d2
notifications: optimize rendering (#14088)
drop cairo, use proper gpu rendering
2026-04-16 13:57:27 +01:00
ErrorNoInternet
e6c5040f41
init: drop CAP_SYS_NICE from ambient set after gaining SCHED_RR (#14082) 2026-04-15 23:20:20 +01:00
Visal Vijay
88f3e7e9d5
monitor: ensure swapchain is updated before mode test (#14065)
* monitor: ensure swapchain is updated before mode test

* monitor: ensure swapchain update via helper for all mode set paths

* monitor: fix formatting

* monitor: move swapchain helper to CMonitorState

* monitor: move swapchain helper to CMonitorState
2026-04-14 18:24:44 +01:00
Vaxry
e539d21174
config: fix safe mode config generation (#14024) 2026-04-13 22:19:37 +01:00
933a24caa6
screencopy: clear buffer before rendering (#14064)
If reusing wl_buffers when capturing a transparent window, the current
frame would overlay the previous frame instead of replacing it.
2026-04-13 09:17:10 +01:00
Vaxry
814337fdd2
keybinds: fix wrong space assignment in pin (#14061) 2026-04-12 23:04:42 +01:00
Vaxry
d67c4e2b7f
layout/algo: preserve focused target if applicable on layout switches (#14058)
fixes #13804
2026-04-12 18:04:56 +01:00