Commit graph

164 commits

Author SHA1 Message Date
Ian Douglas Scott
aac8166962 Add cosmic-workspace-v2, image source, toplevel info changes
This new protocol extends `ext-workspace-v1` with the same additional
functionality `cosmic-workspace-v1` provided. Toplevel info and toplevel
management are also updated to use ext handles, and there's an image
source for ext workspaces.

For now, the old protocol is still supported.
2025-03-03 12:30:25 +01:00
Ian Douglas Scott
b685512127 Migrate away from Rectangle::from_loc_and_size
Deprecated in `smithay` by https://github.com/Smithay/smithay/pull/1621.
2025-01-07 12:50:35 +01:00
Victoria Brekenfeld
fc84fa9948 shell: Fix windows global geometry to include ssd 2024-12-05 18:20:10 +01:00
Victoria Brekenfeld
0092dac08c input: Use render_input_order 2024-10-22 19:43:47 +02:00
Victoria Brekenfeld
51c8588f89 render: Use render_input_order 2024-10-22 19:43:47 +02:00
Ian Douglas Scott
6fc36cb00e Fix spelling of prefers 2024-10-21 18:10:53 +02:00
Victoria Brekenfeld
4d215755f6 shell: Fix incomplete focus_stack after swapping 2024-09-10 21:10:02 +02:00
skewballfox
7da0bc430a added cursor_follows_focus and focus_follows_cursor 2024-09-04 20:22:40 +02:00
julianbraha
52ad30c264 Remove unnecessary lifetimes 2024-08-30 17:53:56 +02:00
Ian Douglas Scott
4748916ff9 Make RenderElement implementations generic to reduce duplication
It would make sense to have a bound like
`for<'frame> R::Frame<'frame>: AsGlowFrame<'frame>`. But that appears to
not behave properly due to current limitations of the borrow checker:
https://blog.rust-lang.org/2022/10/28/gats-stabilization.html#implied-static-requirement-from-higher-ranked-trait-bounds

Instead, this makes `glow_frame` and `glow_frame_mut` associated
functions of the `AsGlowRenderer` trait. Then it is pretty
straightforward to make the `RenderElement` implementations generic
using that and `FromGlesError`.

It would make sense to make `Self::Error: FromGlessError` a requirement
of the `AsGlowRenderer` trait, but due to the lack of implied bounds
support, that produces a bunch of errors about missing bounds. If Rustc
improves that eventually, some bounds could be cleaned up a bit:
https://github.com/rust-lang/rust/issues/44491
2024-08-05 12:58:52 +02:00
Ian Douglas Scott
94fecec9cb Add a SplitRenderElements type, with useful methods
`(w_elements, p_elements)` tuples are used in a bunch of places. A
struct with named fields is generally an improvement just due to the
fact the order is non-obvious.

But we can also add methods. In particular,
`extend_from_workspace_elements` abstracts out some of the more
redundant code in `workspace_elements`.

It would be nice to avoid allocation everywhere, but iterators would
complicate lifetimes, run into issues with needing multiple mutable
borrows to things like the `Renderer`, and be awkward in certain
functions without generator syntax. In any case, cosmic-comp already
relies on allocating vectors here.

If this abstraction is commonly useful in compositors, perhaps it could
be moved to Smithay.
2024-07-15 17:12:05 +02:00
Victoria Brekenfeld
c506d94ac8 shell: Don't consider active overviews animations 2024-07-15 16:31:24 +02:00
Victoria Brekenfeld
3eb3e3b1c0 xwm: Fix edge-cases for fullscreening 2024-07-10 22:36:40 +02:00
Michael Aaron Murphy
553c49b42b feat: runtime configurable keybindings 2024-07-01 15:20:23 +02:00
Victoria Brekenfeld
5662a0f219 floating: Correctly place grabbed tiled windows 2024-06-28 12:24:09 +02:00
Victoria Brekenfeld
da9af7ad23 floating: Add proper recalculate function
Don't just check maximized windows on every refresh, remapping them and
causing flickering, but introduce a proper recalculate method to be
called on layer-shell events / set_output event.

Also if we need to remap, remap all windows to keep stacking order.
2024-06-27 13:35:48 +02:00
Victoria Brekenfeld
e78e199663 chore: Update smithay for thread-safety 2024-06-26 12:59:33 +02:00
Ian Douglas Scott
f2342f56c1 Update to latest Smithay version 2024-06-19 12:39:16 +02:00
Ian Douglas Scott
4f076e0753 Update smithay, with xwayland shell, Cow, etc. 2024-05-21 19:31:50 +02:00
Ian Douglas Scott
73b12194c0 Update smithay 2024-05-10 13:51:28 +02:00
Victoria Brekenfeld
5d5a510691 state: Move shell behind RwLock 2024-04-16 18:50:54 +02:00
Ian Douglas Scott
de544e1d31 Update smithay to latest commit 2024-04-09 11:26:36 +02:00
Victoria Brekenfeld
6416299d58 shell: Send on_commit to sticky windows as well 2024-03-28 13:10:28 +01:00
Victoria Brekenfeld
5459f52d5e input: Rework PointerFocus to operate directly on WlSurface 2024-03-26 18:50:56 +01:00
Ian Douglas Scott
4579cca6fa Fix Workspace::minimize for tiled fullscreen applications
Using `is_tiled()` here doesn't work for fullscreen windows, since
`is_tiled()` returns `false` for them.

This (plus the previous changes for supporting minimize) seems to fix
the behavior of `SDL_MINIMIZE_ON_FOCUS_LOSS` in XWayland applications
(https://github.com/pop-os/cosmic-comp/issues/231). Wine had a similar
issue, though I haven't tested it yet.

It doesn't seem ideal visually that the fullscreen window becomes tiled
then minimized itself, but that's less of a problem.

May need to check if this is an issue with any other uses of `is_tiled()`
or `is_floating()`.
2024-03-26 09:28:18 +01:00
Victoria Brekenfeld
b40d153809 cosmic-screencopy-v2 2024-03-25 16:55:31 +01:00
Victoria Brekenfeld
6858238bd6 shell: Unify element_for_(x11_|wl_)surface 2024-03-25 12:51:01 +01:00
Victoria Brekenfeld
d341cb8b86 debug: Drop puffin integration 2024-03-21 17:49:06 +01:00
Ian Douglas Scott
a1c8b3aa3e Add support for profiling using tracy 2024-03-20 23:55:21 +01:00
Victoria Brekenfeld
e3159f92d1 Fix #344 2024-03-11 16:06:15 +01:00
Victoria Brekenfeld
153ed8d0a5 workspace: Re-maximize windows when changing tile mode 2024-03-07 12:22:39 +01:00
Victoria Brekenfeld
14a9bd5579 workspace: Unset minimize on unmap 2024-03-04 19:20:52 +01:00
Victoria Brekenfeld
3eb7e5f82e shell: implement minimize 2024-03-04 19:20:52 +01:00
Victoria Brekenfeld
068b70d4bc shell: empty (un)minimize handlers 2024-03-04 19:20:52 +01:00
Victoria Brekenfeld
a668df27ae tiling: Cleanup old code from spanning outputs 2024-03-04 13:19:57 +01:00
Ian Douglas Scott
3036448c19 Update Smithay, with Window that supports X11 surfaces 2024-02-22 17:49:46 +01:00
Victoria Brekenfeld
83ec68d383 chore: Update smithay 2024-02-19 13:09:49 +01:00
Victoria Brekenfeld
c0f7524a09 shell: Drop static workspaces 2024-02-07 21:40:23 +01:00
Victoria Brekenfeld
226bf7f49d workspace: Add tiling_state 2024-02-07 21:40:23 +01:00
Victoria Brekenfeld
ce74675b0e shell: Handle tiling_enabled for previous_state better 2024-01-29 01:48:40 +01:00
Victoria Brekenfeld
61a3aa8d79 floating: Maximize animation 2024-01-29 01:48:40 +01:00
Victoria Brekenfeld
9ca5edc836 floating: Allow dragging windows into stacks 2024-01-15 11:02:56 +01:00
Victoria Brekenfeld
835dbe45f3 shell: Unify mapping windows into stacks logic 2024-01-15 11:02:56 +01:00
Victoria Brekenfeld
35264ca4a6 shell: Lift next_focus to mix-and-match sticky and floating windows 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
a829978ce9 shell: Lift move_current_element to consider sticky windows 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
c6e6f1b181 shell: Fix x11 stacking order of sticky windows on workspace switch 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
c3ecbeee3b render: Fix OR window and sticky X11 windows stacking order 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
97a13ea515 shell: Lift/Refactor (interactive) resize to consider sticky windows 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
a333753c96 shell: Lift toggle_stacking(_focused) to handle sticky windows 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
807f63bb72 shell: Lift/refactor (un)maximize, consider sticky windows 2024-01-02 13:24:07 +01:00