Commit graph

7239 commits

Author SHA1 Message Date
Niko Savola
f60e50da00
internal: improve cursor size logging (#14180) 2026-05-02 20:36:14 +01:00
fazzi
e180c59b46
desktop/windowRule: add confine_pointer window rule (#13379) 2026-05-02 20:34:43 +01:00
30cd345add
hyprctl: fix bools in getoption 2026-05-02 19:23:09 +01:00
Vaxry
a3fa7b4950
keybinds: fix keycode matching on lua (#14254) 2026-05-02 19:18:44 +01:00
Gregor
fceb15979e
config/lua: workspace.move/rename should accept "workspace" instead of "id" as a parameter (#14232) 2026-05-02 17:22:02 +01:00
Tom Englund
c3e07986cc
renderer: only set presentationmode when required (#14252)
if guard the setPresentationMode with the current state, shows up in
profiling as minor waste on each frame.
2026-05-02 16:24:20 +01:00
c065e951d6
layout/dwindle,master: return invalid layoutmsg errors 2026-05-02 00:26:35 +01:00
Barrett Ruth
f9723133cc
gestures: add live pinch cursor zoom (#14049) 2026-05-02 00:02:01 +01:00
Vaxry
c7b8fe13c1
tests: fix gtests crashing (#14244) 2026-05-01 23:50:57 +01:00
Vaxry
6e1fcfa81e
hyprctl: fix getoption with custom types (#14243) 2026-05-01 23:50:26 +01:00
Eren
4ab3a40398
screenshare: adjust session cleanup and event emission order (#14229)
* fix(screenshare): adjust session cleanup and event emission order

Revised the handling of `stoppedListener` initialization in
`getManagedSession` to ensure correct scoping and lifecycle management.
Updated the `stop` method in `CScreenshareSession` to adjust the order
of `screenshareEvents` and `stopped.emit()` to prevent potential
use-after-free scenarios.

* fix(screenshare): ensure managedSession removal uses consistent target reference

This change updates the lambda in the stopped listener to use
a pre-fetched target pointer for comparison when erasing sessions.

* fix(screenshare): use early-return and smart ptr comparison in session cleanup
2026-05-01 23:50:02 +01:00
5f9df52b55
protocolMgr: set m_self properly when updating mirrored outputs
When we have onMonitorModeChange, we can't leave an output with a null m_self as that will fuck up other things wanting a ref

ref https://github.com/basecamp/omarchy/issues/5457
2026-05-01 15:40:11 +01:00
241eeae51a
config/lua: add noop 2026-05-01 12:50:55 +01:00
Maxim Andreev
e2ba19535d
tests: fix ConfigLuaValueTypes - boolBadType test, 0 and 1 are allowed integer values for bool type (#14240) 2026-05-01 12:39:16 +01:00
Visal Vijay
a45de66d22
cleanup: avoid repeated weak_ptr::lock() usage in MasterAlgorithm (#14226) 2026-04-30 22:48:14 +01:00
Vaxry
c6fc1cab99
helpers/systemInfo: extract info fns (#14222) 2026-04-30 22:31:29 +01:00
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
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
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
31e025dbe0 desktop/window: refactor over fullscreen state 2026-04-29 22:05:32 +01:00
55a1611fd8 desktop/window: expand hidden into proper states 2026-04-29 22:05:32 +01:00
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
97886cf0da desktop/rule: cleanup inheritance, use templates to avoid dup 2026-04-28 16:52:41 +01:00
89e2380da8 desktop/rule: use Numeric for number parsing 2026-04-28 16:52:41 +01:00
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
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
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