Commit Graph

154 Commits

Author SHA1 Message Date
Ivan Molodetskikh fd1d4b07fd Replace renderer() with with_primary_renderer() 2024-01-03 11:38:09 +04:00
Ivan Molodetskikh 8b5acd5e6e Rename RenderResult::Error to Skipped 2024-01-03 11:38:07 +04:00
Ivan Molodetskikh 31bb9096e2 Move Niri::render() invocation to backends 2024-01-03 11:38:02 +04:00
Ivan Molodetskikh dae93ee159 Render again for screencast
Will be needed when multi-gpu support is added.
2024-01-03 11:37:04 +04:00
Ivan Molodetskikh 0dd9a42087 Move DmabufState to Niri 2023-12-31 12:02:39 +04:00
Ivan Molodetskikh b13892ca63 Activate windows when clicking on the border 2023-12-28 08:45:12 +04:00
Ivan Molodetskikh be2e551a89 Move clones up from find_window_and_output 2023-12-24 17:38:13 +04:00
Ivan Molodetskikh 461ce5f363 Move output_size to utils 2023-12-24 14:30:19 +04:00
Ivan Molodetskikh 86c4c1368e Implement pointer-constraints 2023-12-21 16:19:16 +04:00
Ivan Molodetskikh c29a049245 Fix some cases of incomplete search for surface output
Most visibly, fixes screen not immediately redrawing upon layer-shell
popup commits.

There's still a number of places with questionable handling left, mostly
to do with subsurfaces (like, find_popup_root_surface() doesn't go up to
subsurfaces), and session-lock. I don't have good clients to test these.
2023-12-19 13:32:13 +04:00
Ivan Molodetskikh 243519598e Live-reload keyboard config
This needed the Smithay bump for a deadlock fix.
2023-12-08 07:58:03 +04:00
Ivan Molodetskikh cb1e5d6c19 Track tablet pointer separately, don't sent wl_pointer events
Tablets are not supposed to send wl_pointer events. This unbreaks GTK 4
clients for example.
2023-12-05 10:24:41 +04:00
Ivan Molodetskikh 11ae17b220 Extract to_xkb_config() to a method 2023-12-05 08:04:46 +04:00
Ivan Molodetskikh 40b633be5c Implement relative-pointer
Xwayland actually makes use of it, so I can finally verify that it
works!
2023-12-04 18:12:12 +04:00
Ivan Molodetskikh 0e29e7f6ff Keep monitor aspect ratio and clamp to monitor for tablets
Before, the full tablet area was used, even if the aspect ratio didn't
match the monitor. Also, the coordinates weren't clamped.
2023-12-03 13:50:07 +04:00
Ivan Molodetskikh 113ae1aaff Live reload animation slowdown 2023-11-25 10:25:12 +04:00
Ivan Molodetskikh a2ad7b0854 Upgrade dependencies 2023-11-24 11:49:07 +04:00
Ivan Molodetskikh c9a79464da niri: Add a check for target screencast time below last
I've had this crash my session twice. Not sure what exactly happened.
2023-11-24 09:34:53 +04:00
Ivan Molodetskikh c082e2a618 niri: Rename presentation_time to target_presentation_time
Makes it clearer that this is a prediction.
2023-11-24 09:21:56 +04:00
Ivan Molodetskikh 19cafffe0f Fix top layer-shell surfaces keeping keyboard focus during fullscreen 2023-11-17 18:30:24 +04:00
Kirill Chibisov 5c48521646 Don't set screenshot for primary selection
It's already in clipboard selection, so no need to duplicate it.
2023-11-08 22:19:25 +04:00
Kirill Chibisov 907e0a03ef Add 'input.keyboard.track_layout' config option
Track layout for each window individually when user requested `Window`
tracking mode, keeping the default as global.
2023-11-08 19:09:11 +04:00
Ivan Molodetskikh 889d062df7 Render top layer under fullscreen surfaces when stationary 2023-11-02 13:07:01 +04:00
Ivan Molodetskikh 10905efeaf Refactor layer surface under cursor
Prepare for varying the top layer position.
2023-11-02 13:01:34 +04:00
Christian Meissl e7857efbd2 pointer input for layer surface 2023-11-01 20:28:44 +04:00
Ivan Molodetskikh 15144220fa Show notification on screenshot 2023-10-31 17:06:14 +04:00
Ivan Molodetskikh b0af1129c9 Include filename in screenshot-path 2023-10-31 14:23:54 +04:00
Ivan Molodetskikh 8fa5bf9a36 Make screenshot path configurable 2023-10-31 08:57:44 +04:00
Ivan Molodetskikh d854c2d699 Change cursor to crosshairs when taking a screenshot 2023-10-31 07:16:36 +04:00
Ivan Molodetskikh 073b52c3e6 Implement area selection screenshots 2023-10-30 20:29:03 +04:00
Ivan Molodetskikh 31f6b32fa3 Extract render_to_texture() 2023-10-30 20:28:13 +04:00
Ivan Molodetskikh 76db55c38c Don't block pointer focus refresh on transitions during lock 2023-10-30 20:19:51 +04:00
Ivan Molodetskikh 088877889d Add cursor-shape protocol 2023-10-30 14:00:27 +04:00
Kirill Chibisov 5c24754435 Don't send key on release from niri actions
Some clients run logic on `Release`, thus don't send the key originally
used for running `niri` actions.

Fixes #28.
2023-10-29 13:59:34 +04:00
Kirill Chibisov 0a2052945e Add support for wl_compositor@v6 2023-10-29 13:58:48 +04:00
Ivan Molodetskikh e73f33d6a3 Draw background with a solid color buffer 2023-10-29 10:45:24 +04:00
Ivan Molodetskikh 27e2648bd4 Remove some now-unnecessary &muts 2023-10-29 10:45:24 +04:00
Ivan Molodetskikh 5e543b8dc6 Move cursor surface alive check to refresh() 2023-10-29 10:45:24 +04:00
Ivan Molodetskikh 909a45db6f Use png crate directly instead of image
Reduce dependencies a bit.
2023-10-24 17:49:08 +04:00
Ivan Molodetskikh b20d8e7062 Implement ext-session-lock 2023-10-24 15:06:07 +04:00
Ivan Molodetskikh 3fd421f13f Update Smithay 2023-10-24 15:05:14 +04:00
Ivan Molodetskikh fb866c63e5 Extract update_pointer_focus() 2023-10-21 20:58:30 +04:00
Ivan Molodetskikh bae9575cc1 Rename refresh_cursor_focus() into pointer 2023-10-21 20:58:30 +04:00
Ivan Molodetskikh 8bde252ba4 Stop updating focus during transitions
This also includes touchpad swipes.
2023-10-21 20:58:30 +04:00
Ivan Molodetskikh 052ecdbe2a Check for ongoing animations earlier
Removes the inconsistency that when animating towards an empty
pointer position, the focus change would not wait until the end of the
animation.
2023-10-15 18:58:48 +04:00
Ivan Molodetskikh da59dfc5b4 Refresh pointer focus continuously
Fixes pointer focus not updating after:
- switching workspaces
- switching between windows so they move around
- client appearing below cursor
- client resizing to appear below cursor

And all other similar cases. Hopefully this doesn't slow things down
too much. Preliminary tracy analysis seems to indicate that it doesn't.
2023-10-15 16:33:24 +04:00
Ivan Molodetskikh d59fe34243 Make clear color a const
The damage tracker doesn't understand clear color changes.
2023-10-13 13:30:36 +04:00
Ivan Molodetskikh 0a32747495 Send dmabuf feedbacks from the backend 2023-10-13 13:30:36 +04:00
Ivan Molodetskikh f625dede1a Extract niri.clear_color() 2023-10-13 13:30:36 +04:00
Ivan Molodetskikh 3602876b5e Add a few more Tracy spans 2023-10-11 14:53:53 +04:00