Ivan Molodetskikh
91a42fdf58
layout: Fix windows on other workspaces losing activated state
...
This erroneous check was introduced in interactive move.
2024-12-01 22:24:21 -08:00
Ivan Molodetskikh
5ed5243be6
layout: Fix possible crash when dropping move on different, animating output
2024-12-01 22:24:21 -08:00
Christian Meissl
305fc3b557
Activate newly mapped windows with a valid activation token
...
most of the time the activation token is passed
while the window is still unmapped. in this case
store the intend to activate the window for
later retrieval on map.
2024-11-29 21:57:36 -08:00
FluxTape
11f351dbeb
Implement empty-workspace-above-first ( #745 )
...
* Implement empty-workspace-above-first option
* add two failing tests
* fix interactive_move_onto_empty_output_ewaf and
interactive_move_onto_first_empty_workspace tests
* Add two failing ewaf option toggle tests
* Fix adding/removing first empty workspace on option toggle
* Don't remove first empty workspace if focused
* Stop workspace switch when enabling ewaf
* layout/monitor: Offset workspace switch on adding workspace above
* Fix some initial active workspace ids with ewaf
* wiki: Document empty-workspace-above-first
---------
Co-authored-by: Ivan Molodetskikh <yalterz@gmail.com >
2024-11-29 08:46:13 +03:00
Ivan Molodetskikh
815fa379ea
layout: Stop workspace switch when moving workspaces to primary
...
Okay, this might be one of the oldest layout issues to have remained uncaught.
Well, maybe as I add more randomized tests, I'll catch even more of those.
2024-11-27 20:55:20 +03:00
Ivan Molodetskikh
4c480a1ea3
layout/tests: Add post option update to randomized test
...
Will help to catch cases where updating options doesn't update the state
correctly.
2024-11-26 22:02:46 +03:00
Ivan Molodetskikh
fa4aa0e06d
layout: Fix adjusting for scale for moved tile when reloading config
2024-11-26 22:01:26 +03:00
Ivan Molodetskikh
e2a6374bf5
layout/tests: Return Layout from check_ops()
...
Cuts down on boilerplate in a few places.
2024-11-26 22:00:44 +03:00
Ivan Molodetskikh
dc14554053
layout: Extract update_options()
2024-11-26 21:59:05 +03:00
Ivan Molodetskikh
985ca7b643
layout/tests: Allow AddWindowRightOf interactive moved window
...
Guess I forgot this.
2024-11-26 15:24:28 +03:00
Ivan Molodetskikh
60624d64fa
layout/tests: Standardize on usize for output id in tests
2024-11-26 15:24:28 +03:00
Ivan Molodetskikh
4c22c3285d
Refactor animation timing to use lazy clocks
2024-11-25 04:07:59 -08:00
Ivan Molodetskikh
93cee2994a
Refactor animations to take explicit current time
2024-11-25 04:07:59 -08:00
Ivan Molodetskikh
1e6b8906e0
layout/monitor: Extract add_workspace_bottom()
2024-11-23 15:07:52 +03:00
Ivan Molodetskikh
6c5b92e5c0
Add interactive_move_onto_empty_output test
...
Tests the add_workspace_bottom() in Monitor::add_tile().
2024-11-23 15:07:35 +03:00
Ivan Molodetskikh
88f4c1d610
layout: Preserve active workspace for removed outputs
2024-11-05 21:52:02 +03:00
Ivan Molodetskikh
ddcb5c5e10
layout: Move some types further down
2024-11-05 21:08:50 +03:00
Ivan Molodetskikh
fce5d66878
Follow window corner radius in insert hint
2024-11-02 10:53:55 +03:00
Ivan Molodetskikh
05d218113c
Add gradient support for the insert hint
...
Implement it via FocusRing which already handles SolidColor vs. Border
render element.
2024-11-02 10:53:55 +03:00
Ivan Molodetskikh
6632699e00
Remove obsolete TODO
2024-11-02 10:53:55 +03:00
Rasmus Eneman
e887ee93a3
Implement interactive window move
2024-10-27 23:07:39 -07:00
Ivan Molodetskikh
d640e85158
Require Clone for LayoutElement::Id
...
Now that we have MappedId, this could really be Copy. But it's quite a
big refactor, so for now just require Clone as I'll need it.
2024-10-27 23:07:39 -07:00
Ivan Molodetskikh
4b837f429c
layout: Accept anim_config in remove_column_by_idx
2024-10-17 08:59:06 +03:00
Ivan Molodetskikh
a13b9298c6
Draw the layout as inactive when layer-shell has focus
2024-10-15 11:11:57 +03:00
Ivan Molodetskikh
be7fbd418f
layout: Return Tile + info upon removal
2024-10-14 18:08:44 +03:00
Ivan Molodetskikh
06ec9eecdb
layout/tests: Use existing method
2024-10-14 17:39:55 +03:00
Ivan Molodetskikh
79eef5ee90
layout: Remove unnecessary vec lookup
2024-10-14 17:36:00 +03:00
Ivan Molodetskikh
d5cbc35811
Implement ConsumeOrExpelWindow{Left,Right} by id
2024-10-12 09:58:03 +03:00
Ivan Molodetskikh
810ea245f9
layout: Deduplicate default width resolution
2024-10-10 10:40:59 +03:00
Ivan Molodetskikh
58fc5f3b06
layout: Replace move_window_to_output with move_to_output
2024-10-10 10:28:55 +03:00
Ivan Molodetskikh
7d4e99b760
layout/workspace: Reduce code duplication in adding windows
2024-10-10 10:17:16 +03:00
Ivan Molodetskikh
ab7d81aae0
layout: Reduce field visibility
...
The outside code isn't supposed to mess with the fields.
2024-10-10 09:24:20 +03:00
Ivan Molodetskikh
d0f2b9abd0
Fix formatting
2024-09-12 20:54:44 +03:00
Ivan Molodetskikh
43578e21b1
Always clamp non-auto window height with >1 windows in column
2024-09-12 19:31:47 +03:00
Ivan Molodetskikh
55a798bd8b
Prevent unintended focus-follows-mouse during workspace switch
2024-09-12 16:48:29 +03:00
Ivan Molodetskikh
c3cb42f04d
Add SwitchPresetWindowHeight by id
2024-09-12 02:32:44 -07:00
Christian Rieger
d0e624e615
Implement preset window heights
2024-09-12 02:32:44 -07:00
Ivan Molodetskikh
dcb29efce5
Implement by-id window addressing in IPC and CLI, fix move-column-to-workspace
...
This is a JSON-breaking change for the IPC actions that changed from
unit variants to struct variants. Unfortunately, I couldn't find a way
with serde to both preserve a single variant, and make it serialize to
the old value when the new field is None. I don't think anyone is using
these actions from JSON at the moment, so this breaking change is fine.
2024-09-06 18:32:41 +03:00
elkowar
fd8ebb9d06
implement always_center_single_column layout option
2024-09-05 01:01:41 -07:00
Ivan Molodetskikh
f0157e03e7
Use libdisplay-info for make/model/serial parsing, implement throughout
2024-09-03 13:48:08 +03:00
Ivan Molodetskikh
f7181fb066
Implement by-id workspace action addressing
...
It's not added to clap because there's no convenient mutually-exclusive
argument enum derive yet (to have either the current <REFERENCE> or an
--id <ID>). It's not added to config parsing because I don't see how it
could be useful there. As such, it's only accessible through raw IPC.
2024-09-01 23:47:19 -07:00
Ivan Molodetskikh
30b213601a
Implement the event stream IPC
2024-09-01 23:47:19 -07:00
Ivan Molodetskikh
8eb34b2e18
Animate focus-workspace by idx/back and forth/previous
...
Deleting the test because it only made sense when no-animation was
special cased.
2024-09-01 23:47:19 -07:00
Ivan Molodetskikh
74d1b1f406
layout: Cache monitor output name
2024-09-01 23:47:19 -07:00
Ivan Molodetskikh
c8839f7658
Implement window close transaction
...
Mainly visible with disabled animations.
2024-08-23 15:41:06 +03:00
Ivan Molodetskikh
09f3d3fb12
Extract Niri::update_render_elements()
2024-08-23 12:54:07 +03:00
Ivan Molodetskikh
7bfdf87bf0
Implement resize transactions
2024-08-22 15:19:11 +03:00
Ivan Molodetskikh
cf357d7058
Implement window resize throttling
2024-08-22 14:40:40 +03:00
Ivan Molodetskikh
66f23c3980
layout: Implement weighted height distribution
...
The intention is to make columns add up to the working area height most
of the time, while still preserving the ability to have one fixed-height
window.
Automatic heights are now distributed according to their weight, rather
than evenly. This is similar to flex-grow in CSS or fraction in Typst.
Resizing one window in a column still makes that window fixed, however
it changes all other windows to automatic height, computing their
weights in such a way as to preserve their apparent heights.
2024-08-15 10:50:38 +03:00
Ivan Molodetskikh
b454fd5d9e
Add negative struts to tests
2024-07-22 13:12:42 +03:00