Commit Graph
7223 Commits
Author SHA1 Message Date
Vaxry 450d8a0bf7 xdg-shell: queue state updates for toplevel (#14227)
ref https://github.com/hyprwm/Hyprland/discussions/14224
2026-04-30 20:41:55 +01:00
Vaxry cfb2deb664 splashes: update splashes 2026-04-30 20:41:27 +01:00
shezdy 546cc71565 config/workspace-rules: support modifying persistent and monitor (#14217)
* workspace rules: support modifying persistent and monitor

* support modifying isDefault
2026-04-30 20:10:03 +01:00
Zebra2711 bac49db9a1 monitor: fix centered floating windows off-screen in special workspace (#14203)
Signed-off-by: Zebra2711 <zebra2711t@gmail.com>
2026-04-30 19:38:05 +01:00
Vaxry 859bbb11e1 config/actions: fix misuse of ActionResult's error type (#14221) 2026-04-30 14:30:18 +01:00
MightyPlaza 8884b9e6ce binds: add an auto_consuming flag (#13919) 2026-04-30 12:59:03 +01:00
phanium d40860e8e2 config/lua: cannot disable animation (#14215)
* config/lua: cannot disable animation

seems regression from 9ee5ff1f71

* typing typo (auto generated by cmake)
2026-04-30 12:53:51 +01:00
Mihai Fufezan 2ff598896d CI/Nix/Test: check gtest exit status 2026-04-30 11:15:32 +03:00
ImperishableSecret 56d7a43102 config/lua: expand properties in the workspace object (#14194) 2026-04-29 22:13:15 +01:00
Vaxry 31e025dbe0 desktop/window: refactor over fullscreen state 2026-04-29 22:05:32 +01:00
Vaxry 55a1611fd8 desktop/window: expand hidden into proper states 2026-04-29 22:05:32 +01:00
Vaxry a92dae5af7 desktop/window: add alpha container for alpha calculations 2026-04-29 22:05:32 +01:00
Niko Savola 6bd15b948f main: improve error reporting during initialization in main.cpp (#14181) 2026-04-29 22:04:28 +01:00
Vaxry 9ee5ff1f71 animations: add springs (#14171) 2026-04-29 21:31:06 +01:00
Nikolai Nechaev 45ffaee093 tests: Fix more tests failing on CI (#14159)
* tests: Relax color management requirements in the colors test

This continues the work from d4dd299 (#14142):
- Fixes a missed check assuming a fixed value for `colorManagementPreset`
- Stricten checks to require that the expected keywords are present as json keys

* tests: Refactor `Tests::getAttribute` (was `Tests::getWindowAttribute`)

- Improve ergonomics by consistently handling attribute name;
- Remove 'window' from the function name, since it is compatible with
  other responses too;
- Document the function.

* tests: Fix solitary test assuming it knows the complete set of blockers

The test was failing on the CI because new blockers appeared,
which were not expected by the text. Fix the test, so that it
just checks the set of expected blockers is a subset of actual
blockers
2026-04-29 18:32:06 +01:00
UjinT34 202cf48ecf cmakelists: search for any possible lua package name (#14204) 2026-04-29 14:31:48 +01:00
Freevatar 7179a38c5f config: refresh window states on border_size changes (#14201) 2026-04-29 13:44:43 +01:00
Vaxry 342750b56f config/lua: fix unbind behavior (#14199) 2026-04-29 13:41:09 +01:00
ImperishableSecret e61976233e workspace: remove deprecated and unused members (#14198)
Clean up CWorkspace by removing deprecated m_defaultFloating, m_defaultPseudo, and unused m_wlrCoordinateArr
2026-04-28 22:56:18 +01:00
Vaxry 94b90a2cb0 config/lua: add ExpressionVec2, allow using a table for vec2 rules (#14197) 2026-04-28 18:10:25 +01:00
chocoblocko9 ab75bbfbec meta/stubs: update gesture hints to match new fields (#14195) 2026-04-28 18:08:14 +01:00
Vaxry 97886cf0da desktop/rule: cleanup inheritance, use templates to avoid dup 2026-04-28 16:52:41 +01:00
Vaxry 89e2380da8 desktop/rule: use Numeric for number parsing 2026-04-28 16:52:41 +01:00
Vaxry 50b555d86c desktop/layerRule: use variants for storage internally
Improves storage: less dynamic parsing, immediate config errors, faster.
2026-04-28 16:52:41 +01:00
Vaxry cbefb357a5 desktop/windowRule: use variants for storage internally
Improves storage: less dynamic parsing, immediate config errors, faster.
2026-04-28 16:52:41 +01:00
Vaxry 98fbbafef7 config/errors: Report and categorize errors properly for actions (#14192)
Makes all errors categorized, some not displayed, some displayed.
All errors can be obtained after hl.dispatch()
2026-04-28 15:56:07 +01:00
Nikolai Nechaev d4c6ff434c hyprtester: minor refactoring/restructure (#14154)
* hyprtester: Minor misc fixes

- Use `std::filesystem::path` instead of `std::string` in some places;
- Use `std::ranges::sort`, as suggested by clang-tidy;
- Reset colors at the end of every log line;
- Give more specific error messages in main.

* hyprtester: Fix a bug in `hyprlandAlive()`

Successful standard library calls are permitted to (and do) modify the
value of `errno` arbitrarily. Checking the value of `errno` only makes
sense when the library function returns an error. So, the correct
condition of a successful signal delivery is that the call to `kill`
returns 0.

Btw, given the possible other error values of `kill(2)`, should we even
consider `errno` at all?

* hyprtester: Restructure main

Split main's `main()` into multiple functions, separate responsibilities
more cleanly.

Add default values for cmd-line options to the help message.

* hyprtester: Remove redundant path canonicalization

* hyprtester: Run unified clean up code before every test

* tests: Use RAII for clients in client tests

Turn clients in client tests into classes. Constructors
initialize, destructors deinitialize.

Not only is it better design when entities (clients) are
modeled as classes, keeping all the methods connected,
this also ensures the tests perform their custom cleanup.

This will be especially important when we introduce early
termination on failure into the tests.

* hyprtester: Rewrite the testing framework!

- Implement a new test definition system used via the `TEST_CASE` and
  `SUBTEST` macros.

- Adds `ASSERT*` and reimplements `EXPECT*` macros. The former now
  terminate the test immediately. Also add some new macros, such as
  `FAIL_TEST`.

- Move existing tests to the new system. For trivial cases, break
  existing test functions down to multiple test cases.

- For non-trivial cases and a few other possible improvements, leave
  TODOs.

* tests: Use `EXPECT*` instead of `ASSERT*` in some places

`ASSERT*` macros terminate the test as soon as they fail. They are
appropriate to use when, if something fails, the rest of the test
does not make sense and more error messages from failing checks will
just pollute the output.

`EXPECT*` macros mark the test as failed but its execution continues.
It makes sense to use them when error messages from the following checks
in the test may be useful for someone who will be reading the log.

I changed some uses of `ASSERT*` in main tests to `EXPECT*`. But I was
not reading tests very carefully, so maybe I was wrong in some places.
My rule of thumb was:
- Checks that ensure that a kitty opens / a certain set/number of
  windows exists are fatal;
- A series of checks, especially on the same string returned by
  `Hyprland`, are non-fatal;
- Checks in tests with tightly coupled steps (i.e., do this, check,
  do this with the result of the previous step, check, etc) are fatal.
2026-04-28 11:17:12 +01:00
Vaxry 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
Vaxry 3b5d979d41 examples: merge config blocks in lua example as demo 2026-04-27 00:23:26 +01:00
Vaxry 3ed490ac01 config/lua: fix window object to selector logic 2026-04-26 23:44:33 +01:00
Vaxry a5baf45d69 input: fix device configs for pointer devices 2026-04-26 23:29:18 +01:00
Vaxry 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