Commit graph

189 commits

Author SHA1 Message Date
Vukašin Vojinović
ea2215ec3f fix(window): center window title 2024-10-10 19:58:56 +02:00
Vukašin Vojinović
b7a34bdd1e fix(menu): styling
Also improves the styling of resize indicators, and removes the unnecessary `.density()` method call for the SSD header.
2024-10-10 19:58:56 +02:00
Ian Douglas Scott
a96394f7a6 Update egui, smithay-egui, smithay 2024-10-02 23:55:10 +02:00
Victoria Brekenfeld
9c7c41c508 toplevel-info/mgmt: Update to v2/v3 2024-09-23 10:55:00 +02:00
Victoria Brekenfeld
ad449f9db0 chore: libcosmic update 2024-09-20 12:43:58 +02:00
may
0ffe6ae718
wayland: Implement cursor-shape-v1 2024-09-09 16:21:27 +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
João Capucho
3c24934f48 Track if a move or resize request is client initiated 2024-08-23 17:18:39 +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
Victoria Brekenfeld
dc3dbfdba0 chore: Remove unused method 2024-08-02 20:54:15 +02:00
Victoria Brekenfeld
c3524d3546 stack: Fix round corners on maximize 2024-08-02 20:54:15 +02:00
Victoria Brekenfeld
5aaac707f8 window: Fix round corners on maximize 2024-08-02 20:54:15 +02:00
Ashley Wulber
b8eaf5dcb4 chore: update smithay 2024-08-02 15:54:05 +02:00
Ian Douglas Scott
de264e250f Fix build with debug feature 2024-07-29 14:49:44 +02:00
Victoria Brekenfeld
61f11d1363 element/stack: Style fixes 2024-07-26 14:59:11 +02:00
Dominic Gerhauser
3214ef0250 element/window: Add maximize on header double-click 2024-07-26 13:22:56 +02:00
Victoria Brekenfeld
9239584435 chore: libcosmic update 2024-07-26 13:22:56 +02:00
Dominic Gerhauser
27f048b998 respect cosmic-tk setting for minimize and maximize 2024-07-22 19:08:19 +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
3b9d0ce3d7 HACK: Remap minimized X11 windows on restore 2024-07-10 22:36:40 +02:00
Victoria Brekenfeld
bf6ea3414b x11surface: Unmap on minimize 2024-07-10 22:36:40 +02:00
Victoria Brekenfeld
e61a76d39c chore: libcosmic update 2024-07-08 12:11:58 +02:00
Michael Aaron Murphy
553c49b42b feat: runtime configurable keybindings 2024-07-01 15:20:23 +02:00
Victoria Brekenfeld
3d58ec062d ssd: Fix styling 2024-06-28 11:24:54 +02:00
Victoria Brekenfeld
ddcb435632 debug: Fix running with new kms backend 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
92f3dbce01 chore: Cleanup 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
c7d50e7c5b seat: Make render-related state thread-safe 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
bd58481d19 element: Introduce CosmicMappedKey for safely hashing windows across threads 2024-06-26 12:59:33 +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
697ec9e1fe Use active() instead of surfaces().any in stack same_client_as
Setting the clipboard is only allowed when the keyboard focus is the
same client as the client trying to set the clipboard. We shouldn't
allow background windows in stacks to set the clipboard.

I don't know if anything else expects `same_client_as` to have this `any`
behavior.
2024-06-04 13:24:25 +02:00
Ryan Brue
6ca1a37a53 design: Make server side decorations compact 2024-05-30 23:05:34 +02:00
Ian Douglas Scott
0c54511477 Invert is_decorated test in min_size/max_size
It looks like these if conditions assumed `true` mean "has SSDs". But it
actually means the surface is client-side decorated.
2024-05-29 06:26:41 -06: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
Ian Douglas Scott
8cee91c88f Support touch drag for SSD toplevels, and stacks
We already direct touch events to Iced, and the Cosmic `HeaderBar`
widget already recognizes drags from touch events. So it seems updating
`last_seat` is all that was needed for windows SSDs.

For stacks, the same works, plus moving using the same logic for
detecting drags that is used for mouse events.
2024-04-19 09:30:46 +02:00
Victoria Brekenfeld
5d5a510691 state: Move shell behind RwLock 2024-04-16 18:50:54 +02:00
Victoria Brekenfeld
647deb81f1 shell: Move seats into shell 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
Ian Douglas Scott
7cd13ec6a9 Correctly handle window geometry loc in Focus::under
`Focus::under` replaced code in 4 places, that were inconsistent in how
they handled this. This seems to be more correct, in each case.
2024-04-02 17:12:28 +02:00
Ian Douglas Scott
418954a34b Fix SSD width to use toplevel "geometry"
We really need to do something about the term "geometry" being
overloaded.
2024-04-02 17:12:28 +02:00
Ian Douglas Scott
c957d673ba CosmicStack: Share Focus type with CosmicWindow
There's probably more duplicated logic that can be abstracted, but this
removes a bit of redundancy at least.
2024-04-02 17:12:28 +02:00
Ian Douglas Scott
26d2556be0 Initial touch support for SSD 2024-04-02 17:12:28 +02:00
Ian Douglas Scott
18d48665ef CosmicWindow: Define Focus::{under, cursor_shape}
Handling of `PointerTarget::motion` should be unchanged.
`PointerTarget::enter` previously was comparing `loc - geo` rather than
`loc`. The generic version could accommodate that, but I assume this was
incorrect, and the position sent to `enter` wasn't handled correctly.
2024-04-02 17:12:28 +02:00
Ian Douglas Scott
d34662661b CosmicWindow: Use Option<Focus> instead of a Focus::None
Slighter harder to convert to a `u8`, but allows matching over only the
non-None variants, and is more idiomatic.
2024-04-02 17:12:28 +02:00
Victoria Brekenfeld
3da08ed22d stack: Adjust decorations to window geometry 2024-03-28 18:21:44 +01:00
Victoria Brekenfeld
daf669e656 Fix Text for the floating stacks hint is gone #387 2024-03-27 18:10:33 +01:00
Victoria Brekenfeld
cf75bc1952 chore: Update smithay/libcosmic 2024-03-26 18:50:56 +01:00
Victoria Brekenfeld
3cff426805 focus: Fix screencopy 2024-03-26 18:50:56 +01:00