Commit Graph

498 Commits

Author SHA1 Message Date
Ivan Molodetskikh 66584ab466 config: Extract debug 2025-08-27 10:46:46 +03:00
Ivan Molodetskikh 43638df235 Save & restore num lock across layout changes
In particular, this makes the numlock option work with locale1.
2025-08-26 21:08:17 +03:00
Ivan Molodetskikh 1f76dce345 Implement screen reader announcements via AccessKit 2025-08-26 21:03:54 +03:00
Ivan Molodetskikh 210d5e90fe exit_confirm_dialog: Add open/close animation 2025-08-22 08:57:08 +03:00
Ivan Molodetskikh 7aba44a019 exit_confirm_dialog: Return ArrayVec and add render elements 2025-08-22 08:51:33 +03:00
Ivan Molodetskikh d662811bf6 Unfocus layout when exit confirm dialog is open
Screen readers expect closing a modal dialog to reannounce the previous focus.
This makes the exit confirm dialog more modal in this sense: it will unfocus
the layout and then focus it back when closed, giving the desired behavior.
2025-08-21 12:26:32 +03:00
Ivan Molodetskikh c9e85a0fe2 Simplify/deduplicate hot corner computation 2025-08-21 09:15:49 +03:00
Ivan Molodetskikh 0a8b4e036d Move fallibility inside ExitConfirmDialog
Makes it less annoying on the outside.
2025-08-21 09:07:16 +03:00
yrkv af30cc8df6 niri-ipc: Add window positions and sizes (#1265)
* Add window sizes and positions to the IPC

* basic fixes

* report window_loc instead of window pos

* clean ups

* make scrolling indices 1-based

* add printing to niri msg windows

* don't include render offset in floating tile pos

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-16 11:42:08 +03:00
Christian Meissl af9ce53310 use ScanoutCandidate kind for surfaces
this allows to get direct scan-out on surfaces again
2025-08-13 11:39:12 +03:00
Ivan Molodetskikh 2fb993d221 Bump Smithay (xkbcommon wvkbd fix) 2025-08-11 09:07:13 +03:00
vanderlokken 67361f88fd Add the LoadConfigFile action (#2163)
* Add the `LoadConfigFile` action

* fixes

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-08-09 12:20:08 +00:00
Ivan Molodetskikh 055a94de3d Reload libinput settings when trackball, tablet and touch change
Somehow missed this before.
2025-08-07 17:15:30 +03:00
Ivan Molodetskikh f49ecc31c4 pw_utils: Wait for frame completion before queueing
Without explicit sync, we have no way to signal the PipeWire consumer when the
rendering is done. So, wait until it's done before giving it the frame.

This should fix flickering screencasts on NVIDIA.
2025-08-04 14:36:34 +02:00
Ivan Molodetskikh 43577f4d97 pw_utils: Store LoopHandle 2025-08-04 14:36:34 +02:00
Ivan Molodetskikh 2e3935d77d pw_utils: Extract shared state to CastInner 2025-08-04 14:36:34 +02:00
Ivan Molodetskikh 672bf3e1ff Implement org.fd.a11y KeyboardMonitor
Makes Orca work with niri:
- keyboard watching and announcing everywhere (not just GTK 3 windows)
- grabs for the Orca modifier (with double-press to pass through) and keystrokes
2025-07-31 13:02:54 +02:00
Ivan Molodetskikh 0e3d078a85 Implement fetching xkb options from org.freedesktop.locale1 2025-07-15 18:19:11 +03:00
Ivan Molodetskikh d85eaf9799 Fix LockedHint locked condition 2025-07-14 14:39:57 +03:00
peelz 25cbb739ae Set logind LockedHint on lock/unlock (#1763)
* Set logind LockedHint on lock/unlock

* fixup! Set logind LockedHint on lock/unlock

- use warn!() instead of error!()
- extract dbus call into a separate method

* fixup! Set logind LockedHint on lock/unlock

- Update LockedHint in refresh_and_flush_clients

* fixup! Set logind LockedHint on lock/unlock

woops

* fixup! Set logind LockedHint on lock/unlock

- only call SetLockedHint if niri was run with `--session`

* fixes

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-07-14 11:34:10 +00:00
abmantis 51b6a495c5 Simplify pointer handling in constraint check
Minor change so that `get_pointer()` (which has a lock) does not get
called twice. Also moved the call to `current_location()` to the scope
where it is needed.
2025-07-14 06:48:56 +03:00
Ivan Molodetskikh dfb3683187 Fix new Clippy warnings 2025-07-13 12:54:03 +03:00
Ivan Molodetskikh ce9ba00d54 Implement ext-workspace 2025-07-13 11:43:59 +03:00
Ivan Molodetskikh f3f6e79eec Return app ids with ".desktop" appended to Shell.Introspect
This isn't the correct solution, but it seems to work often enough for window
icons in the screencast dialog.
2025-06-13 09:55:08 +03:00
Ivan Molodetskikh 7aec37f5c9 Extract output_left/right/up/down/previous/next_of() 2025-06-11 21:09:55 +03:00
Ivan Molodetskikh 0407ac5e4c Ignore lock surfaces from unrelated clients
gtklock doesn't mind the fact that it got denied the lock, and just creates a
new lock surface anyway. And we happily replace the running lock with it.
2025-06-10 17:03:32 +03:00
Ivan Molodetskikh 6bab912383 Accept FloatOrInt for input accel_speed, animation slowdown
Technically cfg-breaking due to introducing min/max limits at parse time, but
values outside these limits were invalid anyway, so maybe it's fine?
2025-06-09 14:04:56 +03:00
Ivan Molodetskikh f918eabe6a Implement xwayland-satellite integration 2025-06-07 13:12:50 -07:00
Ivan Molodetskikh a605a3f016 Account for hidden pointer in move_cursor() 2025-05-23 23:08:51 +03:00
Ivan Molodetskikh ef44adea69 Set pointer contents straight to nothing when disabling pointer 2025-05-23 23:08:51 +03:00
Duncan Overbruck 7fdb918cd0 input: do not revert fully invisible cursor to hidden (#1650)
* input: do not force redraw to hide an already hidden cursor

* more

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-05-23 05:24:24 +00:00
Ivan Molodetskikh 3f2b7e63ba Improve comment in on-demand layer-shell keyboard alive check 2025-05-19 09:18:07 +03:00
Ivan Molodetskikh c98537a2b0 Implement baba-is-float for layers 2025-05-12 09:10:59 +03:00
Ivan Molodetskikh fb5c5204e8 Extract confirm_screenshot() 2025-05-09 15:41:57 +03:00
Ivan Molodetskikh 09be90f4e6 Add touch selection support to the screenshot UI 2025-05-09 10:28:20 +03:00
Ivan Molodetskikh 497f186422 Add layout background-color setting 2025-05-06 17:34:40 +03:00
Ivan Molodetskikh 3e31c134a6 Implement place-within-backdrop layer rule 2025-05-06 17:34:40 +03:00
Ivan Molodetskikh fe682938db Simplify exclusive focus on layer check 2025-05-06 17:34:40 +03:00
Ivan Molodetskikh 7b4cf094ef Draw workspace shadows behind all workspaces 2025-05-01 10:10:11 +03:00
erdii 82dabc21f3 feat: implement support to enable numlock at startup
Signed-off-by: erdii <me@erdii.engineering>
2025-04-30 09:54:19 -07:00
Ivan Molodetskikh d5c0c74d2c Fix hot corners preventing focus even when disabled 2025-04-29 08:24:45 +03:00
Ivan Molodetskikh fd389af6d8 Add backdrop-color setting to overview {} 2025-04-28 09:14:43 +03:00
Ivan Molodetskikh db09727b18 Replace Smithay's SolidColor elements with ours
Must've forgotten about these back when I replaced others.
2025-04-28 09:05:55 +03:00
bogdanov 758cca5432 Fix pointer hiding so that it is no longer annoying (#1426)
* replace `pointer_hidden` with `pointer_visiblity`

* disable hidden pointer after content underneath has changed

* fixes

---------

Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com>
2025-04-27 06:25:36 +00:00
Ivan Molodetskikh 1835b532d9 Implement interactive move to a new workspace above/between 2025-04-25 02:00:18 -07:00
Ivan Molodetskikh e6d82d3ee3 Implement top-left hot corner to toggle the Overview
Compared to third-party implementations such as waycorner:

- It works during interactive window move (no surfaces receive pointer
  focus in this case, so this cannot work through layer-shell).
- It works during drag-and-drop.
- It disables itself over fullscreen windows.
- It does not prevent direct scanout.
2025-04-25 02:00:18 -07:00
Ivan Molodetskikh 59de6918b3 overview: Add two-finger touchpad scroll 2025-04-25 02:00:18 -07:00
Ivan Molodetskikh af1fca35bb Implement an Overview 2025-04-25 02:00:18 -07:00
Ivan Molodetskikh 9571d149b2 Render workspaces separately with gaps between
This design makes more sense spatially, and is required for the
Overview. Gaps also make it clear how clipping windows to workspace
bounds works.

Background and bottom layer-shell surfaces get duplicated for each
workspace, while top and overlay stay "on top".
2025-04-25 02:00:18 -07:00
Ivan Molodetskikh 8b878f355f Put interactively moved window on top of background and bottom layer popups 2025-04-25 02:00:18 -07:00