Commit graph

475 commits

Author SHA1 Message Date
Aleksandr Kosachev
7d1daab7bc fix: remove foreign toplevel handle too 2026-09-08 23:50:31 +02:00
Hojjat
0f56d214b9 chore: clippy fixes 2026-09-05 01:16:34 +02:00
Hojjat
057e7b72cc chore: remove the gaurd against large paddings 2026-09-04 16:05:57 -04:00
Victoria Brekenfeld
6467f79025 shell: Add tablet grabs 2026-09-03 21:00:11 +02:00
Ian Douglas Scott
8ec1ffb740 protocols/keyboard-layout: Send ei modifiers on group change
This makes `cosmic-osk` show a group change on `super+space`. Previously
a change like that wouldn't be sent until a keyboard input changed the
modifier state, for instance releasing the shift key.
2026-09-03 19:31:56 +02:00
Hojjat
8691956644 fix: validate layer radius against the pending surface size 2026-09-02 15:32:26 -06:00
Victoria Brekenfeld
b407ed560a wayland/decoration: Make default decoration mode configurable 2026-09-01 08:01:43 -06:00
Hojjat
9fe22c86b6 fix(corner-radius): use layer surface size for radius validation 2026-08-31 19:10:49 +02:00
RipleyTom
94178034dd feat: allow XWayland window to start minimized 2026-08-31 16:29:03 +02:00
Victoria Brekenfeld
5c93094574 chore: update smithay 2026-08-26 20:07:05 +02:00
chris-010
04026259e0 fix: treat unlocking the session as user activity
SessionLockHandler::unlock clears the lock and schedules a render, but
never tells IdleNotifierState that the user is there. Unlock paths that
produce no input event -- fingerprint and smartcard readers -- therefore
leave the idle clock running across the entire lock period, and it is
already past its timeouts by the time the session is unlocked.

The visible result is that the screen stays off after a successful
unlock until the user moves the mouse or presses a key, or that the
session locks itself again seconds after being unlocked.

Notifying activity for every seat in unlock() resets the timers the same
way an input event would.

Drafted with AI assistance (Claude Code); the change was reviewed,
built and tested by me on real hardware as described.

Signed-off-by: chris-010 <10660568+chris-010@users.noreply.github.com>
2026-08-20 13:19:53 +02:00
Ian Douglas Scott
861a460e6c chore: Fix clippy lints 2026-08-17 12:22:35 -07:00
Hojjat
f4ee52c46a Ei protocol support
- Use the configured keyboard layout, track ei seats to reconfigure their keyboards
- DBus interface
- Disambiguate input devices per backend instance
- Add support for `ei_keysym` and `ei_text`
- Act as input method for ei_text UTF-8 injection
- Create a region per output for abosolute pointer position
- Map ei region for touchscreen emulation
- Release pointer buttons and keys on removal
- Send modifiers to EI connections
2026-08-17 12:22:35 -07:00
Ian Douglas Scott
18ae082615 Update smithay with tablet API changes
For now, only `WlSurface` receives tablet focus, as was previously the
case.

Also updates `reis` to latest bugfix release.
2026-08-17 12:22:35 -07:00
Victoria Brekenfeld
091583ac84 backend: Support wl-dmabuf v6 2026-07-29 22:08:23 +02:00
zyads
ffeda3375a fix(corner_radius): check LayerHookId for layer surfaces
GetCornerRadiusLayer looked up the existing hook via ToplevelHookId while
inserting into LayerHookId a few lines later. Both are
Mutex<Option<(HookId, Weak<..>)>> so it compiles, but they are distinct
data_map slots: the "does this surface already have a corner-radius object?"
check for a layer surface read the toplevel slot, so it could not see a layer
object that was already there, and it created a toplevel entry on a layer
surface as a side effect.

Every other read of the layer hook already uses LayerHookId.

Disclosure: found and written with AI assistance (Claude). The change is the
one line quoted above; I understand it and verified the tree builds with it.
2026-07-29 00:30:01 +02:00
RipleyTom
6108cef8b3 fix: workaround for Chromium apps breaking below 1.0 scaling 2026-07-25 01:13:59 +02:00
littlezabi
1d72227a30 fix: release active popup grabs on toplevel destruction
If a window with an active popup grab is closed or crashes unexpectedly, the input grab state can get stuck, freezing keyboard and mouse clicks.
    This patch iterates over all seats and releases the active seat grab if it is owned by the destroyed window or one of its child popups.

Signed-off-by: littlezabi <zohaibjozvi@gmail.com>
2026-07-21 18:04:33 +02:00
Ian Douglas Scott
d7d6be3cdb image-copy: Only embed cursor in toplevel capture if focused 2026-07-21 17:02:58 +02:00
Ian Douglas Scott
2648aea0df image-copy: Move duplicate code to a cursor_capture_constraints()
This ensures we avoid advertising a `0,0` buffer size (which will
protocol error to actually allocate), and avoids defining the supported
formats for cursor capture buffers in a bunch of places.
2026-07-21 17:02:58 +02:00
Ian Douglas Scott
27956e6e00 Make cursor_geometry() return a CursorGeometry struct
A bit better than just a tuple.
2026-07-21 17:02:58 +02:00
Ian Douglas Scott
dd6ebd03c9 image-copy: Hold references to Buffers to block release
The `wl_buffer` now won't be released until sync fence polls ready.
2026-07-21 17:02:58 +02:00
Ian Douglas Scott
d84d5d46ce image-copy: Use seat from WlPointer instead of last_active() 2026-07-21 17:02:58 +02:00
RipleyTom
8955024bff Fix: improve edge pointer accuracy 2026-07-21 15:50:19 +02:00
Vukašin Vojinović
d41124a51d chore: clippy fixes 2026-07-18 09:09:30 +02:00
Victoria Brekenfeld
2d95d46a37 chore: formatting fixes 2026-07-16 19:43:10 +02:00
Victoria Brekenfeld
8ab946f10a chore: clippy fixes 2026-07-16 19:43:10 +02:00
Ashley Wulber
8f82cade68 cleanup: remove attempts to force redraw
They seem to always fail anyways and it has no negative effect as far as I can tell
2026-07-15 14:48:33 -04:00
Victoria Brekenfeld
3e17157ccf chore: update smithay 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
f6cb4519a0 render/blur: Cache native texture type 2026-07-09 18:08:01 +02:00
Ashley Wulber
b890f7b0fa fix(corner_radius): loosen padding size constraint 2026-07-09 18:08:01 +02:00
Ashley Wulber
77f57a656d fix: pad_rect typos 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
5ee2fa911a wayland: Support cosmic-corner-radius v2 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
cfed174e9b chore: Fix clippy lints 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
de8b47839c render: Make blur_strength configurable 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
1c5ef576f4 render: Don't use separate damage_output calls 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
a9bf89d8b2 element/wayland: Add blur background-effect 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
e4c0716951 element: Refactor element acquisition to be push based 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
178c6593dc element: Introduce SurfaceRenderElement 2026-07-09 18:08:01 +02:00
Victoria Brekenfeld
8b990e5658 render: Merge FromGlesError into AsGlowRenderer 2026-07-09 18:08:01 +02:00
Ian Douglas Scott
f765696834 Avoid unnecessarily unwrapping stack_ref() after is_stack()
In a lot of cases, matching on `stack_ref()` also works.
2026-07-07 17:46:23 -07:00
Ian Douglas Scott
29320bdab5 Add cosmic-keyboard-layout-unstable-v1 protocol
https://github.com/pop-os/cosmic-protocols/pull/28

Allows clients like `cosmic-applet-input-sources` to show which layout
group is active and update it. Currently this is implemented by update
the `xkb_config` to change the layout order.
2026-07-07 16:44:09 +02:00
Hojjat Abdollahi
9d52653d5c
revert: "fix: follow the focus after alt+tab to another output"
This reverts commit 56f84fba2d.
2026-07-02 17:53:03 +02:00
Ilia Malanin
aac1e19f08 fix: set_rectangle leak 2026-06-18 13:37:14 -04:00
Victoria Brekenfeld
106b50293b wayland/activation: Fix requests without active outputs 2026-06-18 18:29:37 +02:00
Skygrango
b6cab38528 wayland: implement pointer_warp_v1 2026-06-16 14:49:28 -06:00
Gavin John
d4c5714c10 perf(toplevel_info): optimize send_toplevel_to_client
PR #1279 tried to throttle `send_toplevel_to_client`, which was rejected. This takes (what I think is) a better approach, and instead makes some optimizations. We delay grabbing the mutex until it's actually needed, and we also checks to see if the state actually needs to be resent. This resolves some lock contention, and also avoids having to generate the state in the first place. Since `wayland-rs` uses a single mutex to lock the entire state, this both massively reduces lock contention and avoids making (apparently quite a lot of) unnecessary computation.

I decided to give this one to AI since I'm a bit busy right now (although I am still manually writing the commit messages and descriptions). I think it generally did a pretty good job, although I did have to make a few manual tweaks. While I don't have any empirical data, cosmic-comp idle CPU has gone down from ~3% all-core to 0-0.5%, even stress testing it with far more windows open. I can't say it *liked* opening 30-some windows in 2 seconds, but after it finished opening them all, it was still buttery smooth. Overall very happy with the results.

Assisted-by: Claude:claude-4-opus
2026-06-16 18:09:28 +02:00
Ian Douglas Scott
82dcd9a46a image-copy: Don't send 0x0 buffer params for cursor capture
Fixes panics in `xdg-desktop-portal-cosmic` when it tries to use cursor
capture, and an application hides the cursor.
2026-06-09 10:42:48 -07:00
Robin Nehls
2f7c34f29a feat: add config option for xdg activation behavior 2026-06-03 08:09:29 +02:00
Hojjat
56f84fba2d fix: follow the focus after alt+tab to another output 2026-06-02 12:14:39 -06:00