Ivan Molodetskikh
3e598c565e
Implement border window rule
2024-04-24 22:01:26 +04:00
Ivan Molodetskikh
49f5402669
Implement window-resize custom-shader
2024-04-21 20:16:54 +04:00
Ivan Molodetskikh
2c8d1030ab
Separate tile X and Y movement animations
...
Helps with the jank caused by lack of transactions when consuming to the
left/right. Resize triggers a few frames later and restarts the
movement. Now it only restarts the vertical and not the horizontal
movement.
2024-04-19 12:44:24 +04:00
Ivan Molodetskikh
47f6c85f64
Preserve tile move config on animation restarts
...
This fixes a problem where consume-into-column would use resize
animation config instead of the window-movement config in most cases
(since a resize comes very shortly after the move starts).
A similar change to the column movement anim is more detrimental than
it's worth.
2024-04-18 00:30:12 +04:00
Ivan Molodetskikh
73e9ef5fe2
Resolve animation defaults during parsing
2024-04-17 14:06:32 +04:00
Ivan Molodetskikh
1b496ee21f
Clamp animated window size
2024-04-16 17:44:06 +04:00
Ivan Molodetskikh
21ef5aded8
Remove jumps on consume/expel animation start
2024-04-16 10:48:54 +04:00
Ivan Molodetskikh
69f723d68a
Implement vertical window move animations
2024-04-15 21:19:09 +04:00
Ivan Molodetskikh
2c873044e8
Restore view offset upon unfullscreening
2024-04-13 20:07:37 +04:00
Ivan Molodetskikh
1336a581a6
tile: Fix returned snapshot size
2024-04-13 18:05:56 +04:00
Ivan Molodetskikh
9d5f1c7ef7
Unify Animation- and RenderSnapshot
2024-04-13 14:16:07 +04:00
Ivan Molodetskikh
71be19b234
Implement window resize animations
2024-04-13 11:07:23 +04:00
Ivan Molodetskikh
5383a0591f
Use clamped animations where it makes sense
2024-04-10 11:28:49 +04:00
Ivan Molodetskikh
6cd3f96a10
Fix building on stable
2024-04-10 09:26:56 +04:00
Ivan Molodetskikh
1888696567
Reimplement window closing anim in an efficient way
...
- Keep a root surface cache to be accessible in surface destroyed()
- Only snapshot during / right before closing, rather than every frame
- Store textures rather than elements to handle scale and alpha properly
2024-04-10 09:14:04 +04:00
Ivan Molodetskikh
dd011f1012
Implement window closing animations
2024-04-09 23:42:01 +04:00
Ivan Molodetskikh
4856522a7a
Implement window open shift in terms of window-movement
...
This removes the quite unobvious visual size, and fixes jerking when
opening multiple windows in quick succession.
2024-04-08 19:25:45 +04:00
Ivan Molodetskikh
493c8dc890
Implement block-out-from window rule, fix alpha on window screenshots
2024-03-24 10:22:56 +04:00
Ivan Molodetskikh
8b4a9d68e0
Implement opacity window rule
2024-03-24 08:30:26 +04:00
Ivan Molodetskikh
db49deb7fd
Implement draw-border-with-background window rule
2024-03-19 18:29:13 +04:00
Ivan Molodetskikh
3963f537a4
Wrap mapped windows in a Mapped
2024-03-19 18:29:13 +04:00
Ivan Molodetskikh
ae89b2e514
Implement spring animations
2024-03-05 13:32:52 +04:00
Ivan Molodetskikh
8bebd54c6d
tile: Prepare for oscillating animations
2024-03-05 10:33:25 +04:00
Ivan Molodetskikh
48f0f6fb3c
Implement gradient borders
2024-02-21 22:15:21 +04:00
Ivan Molodetskikh
646e3d8995
Accept location in FocusRing
...
Makes it work more like other elements.
2024-02-21 11:08:48 +04:00
Ivan Molodetskikh
9ce19ad7de
Use niri_render_elements! for the screenshot UI
2024-02-21 09:12:40 +04:00
Ivan Molodetskikh
18f06a7acd
Fix border getting default values for focus ring
2024-02-12 09:34:54 +04:00
Ivan Molodetskikh
6424a2738d
Make all animations configurable
2024-02-07 17:14:24 +04:00
Ivan Molodetskikh
753a90430a
animation: Accept ms as u32
...
Less boilerplate elsewhere.
2024-02-07 16:32:38 +04:00
Ivan Molodetskikh
f9085db564
Implement window open animations
2024-02-07 13:16:54 +04:00
Ivan Molodetskikh
d4929b8e18
Inline variable
2024-02-06 19:52:10 +04:00
Ivan Molodetskikh
93c547f749
Move focus ring into Tile
...
For now, will make the open animation better.
2024-02-06 19:49:51 +04:00
Ivan Molodetskikh
b2298db5c5
Split render_helpers.rs
2024-02-06 11:25:25 +04:00
Ivan Molodetskikh
6bb83757ee
Convert everything to niri_render_elements! {}
2024-02-05 14:05:08 +04:00
Ivan Molodetskikh
bf978fe98d
layout/tile: Return Iterator of render elements
...
Avoid a Vec.
2024-02-05 13:55:09 +04:00
Ivan Molodetskikh
57521c69c3
layout: Add TileRenderElement
2024-02-04 22:52:11 +04:00
Ivan Molodetskikh
da826e42aa
layout: Add LayoutElementRenderElement
...
Allows for testing layout rendering without Wayland windows.
2024-02-04 22:31:44 +04:00
Ivan Molodetskikh
44d3a5b9a2
Use saturating_sub in window_height_for_tile_height()
2023-12-29 11:38:01 +04:00
Ivan Molodetskikh
097c415036
layout: Use saturating_add() in several places
...
Apparently VSCode sends i32::MAX worth of max_size?
2023-12-28 18:53:08 +04:00
Ivan Molodetskikh
2d16c04869
Fix unfullscreening not always updating view offset
2023-12-28 10:49:31 +04:00
Ivan Molodetskikh
b13892ca63
Activate windows when clicking on the border
2023-12-28 08:45:12 +04:00
Ivan Molodetskikh
777ad4ee5c
Rename window -> tile, fix popup unconstraining window_y
...
I missed the window_y thing and found it thanks to the rename. Too lazy
to split it into a commit.
2023-12-28 08:25:42 +04:00
Ivan Molodetskikh
c21805bf70
layout: Refactor to support window decorations, add border and fullscreen backdrop
...
Windows are now wrapped in Tiles, which keep track of window-specific
decorations. Particularly, I implemented a black fullscreen backdrop,
which finally brings fullscreened windows smaller than the screen in
line with how the Wayland protocol says they should look—centered in a
black rectangle. I also implemented window borders, which are similar to
the focus ring, but always visible (and hence affect the layout and
sizing).
2023-12-27 21:51:42 +04:00