Commit graph

2078 commits

Author SHA1 Message Date
Michael Aaron Murphy
5ca8cc2cdf feat(tiling-exceptions): add exception for Slack huddle preview 2026-06-11 09:23:38 -06:00
Hojjat
0312f9a201 fix: draw the focused window border for the current window only 2026-06-09 23:21:26 -04:00
Ian Douglas Scott
5153d497e7 fix(dbus): Block on creation of zbus connection to avoid deadlock
A fix for the issue reported in
https://github.com/pop-os/cosmic-comp/pull/2450.

Using `block_on` in some places for zbus calls is fine (that's what
zbus's blocking API does; it has its own executor for background tasks),
but this is problematic with `async_once_cell`. If we also use that in
the calloop async executor.

I think ideally we should avoid blocking the main thread on any async
tasks, but for now we can just block in initialization here.
2026-06-09 18:09:36 -04:00
Hojjat
94e9437c4e fix: use SOURCE_GIT_HASH when building for pop ci 2026-06-09 18:07:07 -04:00
Ian Douglas Scott
651877e622 image-copy: Adjust cursor position for subsurface offset
The `themed_window` example of `smithay-client-toolkit` is a good test
for this.
2026-06-09 10:42:48 -07:00
Ian Douglas Scott
84d2a9d297 shell: Fix definition of surface_tree_offset()
Using `with_surface_tree_downward()` is wrong because it will traverse
other branches of the surface tree than the one containing `surface`,
and add their offsets.

It's simple enough to instead walk up the surface tree.
2026-06-09 10:42:48 -07:00
Ian Douglas Scott
7d0d374fd8 image-copy: Adjust toplevel capture coordinate for window geometry 2026-06-09 10:42:48 -07:00
Ian Douglas Scott
7a50625e78 image-copy: Fix cursor pos for toplevels with SSD 2026-06-09 10:42:48 -07:00
Ian Douglas Scott
8aea6cc158 image-copy: Function for duplicated toplevel cursor enter/motion code
Deduplicate this before making it more complicated.

Also allows early returns to avoid deep nesting. And avoid duplicating
calculations here for multiple sessions (though normally there won't be
multiple capture sessions of same toplevel with cursor metadata,
probably).
2026-06-09 10:42:48 -07: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
Ian Douglas Scott
4a8931896f image-copy: Subtract output position for pointer position sent to client 2026-06-09 10:42:48 -07:00
Ian Douglas Scott
b6b76e1d4a image-copy: Don't send redundantly pointer changes on fullscreen
The code for sending pointer position changes for toplevels should
handle this adequately; no need to also handle it here.
2026-06-09 10:42:48 -07:00
Hojjat
51dd3bc66f fix: pass the full window size to xwayland 2026-06-09 10:42:22 -07:00
Ian Douglas Scott
4eaaf4f55c dbus: Refactor to share DBus connections
We should avoid creating more than one session connection or more than
one system connection. We should also ideally avoid blocking the main
thread.

For now this still uses blocking in a couple places, but wrapping async
code (which is how `zbus::blocking` is implemented anyway).

This moves the `NameOwners` creation out of `A11yKeyboardMonitorState`,
so it can be shared with other things. We will likely want that for
https://github.com/pop-os/cosmic-comp/pull/465 to define a secured
protocol to pass an fd to the portal, and potentially any other
sensitive DBus protocols implemented by the compositor.
2026-06-08 19:03:50 +02:00
Ian Douglas Scott
c8d9ff1215 dbus: Remove unused return value from dbus::init
If we don't use this anyway, this can make things simpler.
2026-06-08 19:03:50 +02:00
Ian Douglas Scott
571565c28e dbus: Use calloop async executor
New version of callop has a fix for this, so we're no longer blocked
from using it.
2026-06-08 19:03:50 +02:00
Ian Douglas Scott
3c834e9c85 dbus: Use FutureSource instead of a channel 2026-06-08 19:03:50 +02: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
Hojjat Abdollahi
28ef6bdbc8
feat: support multiple fullscreen windows per workspace 2026-06-02 17:48:33 +02:00
Ian Douglas Scott
9f28a764a7 chore: update smithay
Includes the fix in https://github.com/Smithay/smithay/pull/2038,
which helps addresses a regression in controller input for Steam games.
2026-06-01 07:52:42 -07:00
Skygrango
203cad8cbd shell: disable WindowUI detection if constraint is active 2026-06-01 07:52:42 -07:00
Skygrango
208c2128cd wayland: implement new_constraint, remove_constraint and cursor_position_hint for PointerConstraintsHandler
new_constraint: check if the surface has pointer focus, keyboard focus, and if the pointer is within toplevel geometry or constraint region. If these conditions are met, then enable the constraint.

remove_constraint: apply last cursor position hint that saved in seat.

cursor_position_hint: save the cursor position hints provided by the client to the seat.
2026-06-01 07:52:42 -07:00
Skygrango
4fb7d49316 chore: update smithay 2026-06-01 07:52:42 -07:00
Skygrango
81066d437a shell: remove constraint when target changed 2026-06-01 07:52:42 -07:00
Skygrango
9702aae523 input: when updating pointer in the confined mode, recalibrate to the valid coordinates 2026-06-01 07:52:42 -07:00
Skygrango
a533ac1ec3 input: implement apply_cursor_hint 2026-06-01 07:52:42 -07:00
Skygrango
e75c9c0c48 shell: implement surface_geometry_offset_from_toplevel for WorkspaceSet 2026-06-01 07:52:42 -07:00
Skygrango
d829ec3815 shell: implement has_surface for KeyboardFocusTarget 2026-06-01 07:52:42 -07:00
Skygrango
32b54cc31f shell: implement surface_offset and surface_tree_offset 2026-06-01 07:52:42 -07:00
devpa
22fe419747 input: allow layout switching and brightness/volume control under session lock 2026-05-27 16:43:39 +02:00
Victoria Brekenfeld
cefe8472b2
Merge pull request #2411 from weblate/weblate-pop-os-cosmic-comp 2026-05-26 13:08:07 +02:00
Hosted Weblate
8c309d5231
i18n: translation updates from weblate
Co-authored-by: therealmate <hellogaming91@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/pop-os/cosmic-comp/hu/
Translation: Pop OS/COSMIC Comp
2026-05-25 23:11:40 +00:00
Niklas Herder
28258e5a5f cursor: Add idle-hide timeout
Adds a cursor_hide_timeout config key (Option<u32> seconds) to
CosmicCompConfig. When set, the cursor is hidden after the configured
period of pointer inactivity and revealed again by any pointer event.
Touch input does not count as activity (no visible cursor to surface).

Implementation:
- Per-seat hidden flag, calloop timer token, and last-armed Instant on
  CursorStateInner.
- notify_cursor_activity called from each pointer-related input branch
  (motion, button, axis, tablet) resets the flag and reschedules the
  timer; rapid successive calls are coalesced behind a 100ms throttle
  so high-frequency mice don't churn the calloop timer source.
- On timer fire, the hidden flag is set, draw_cursor short-circuits to
  an empty element list, and a render is scheduled. Active pointer
  grabs (drags, resizes) suppress the hide.
- Config reload arms or cancels the timer immediately; None as the
  configured value collapses the cancel path into the same function.

Closes #2231.

Drafted with Claude (Anthropic); reviewed and tested by the committer.
2026-05-22 14:14:17 +02:00
Levi Portenier
6ebe2a1f04
Merge pull request #2395 from hojjatabdollahi/hojjat/fix-fullscreen
fix: fullscreen x11 games opening as floating/tiled windows
2026-05-21 10:27:06 -06:00
Hojjat
451b8319d6 fix: ignore configure requests from fullscreen windows
Fixes steam big picture mode full screen not taking the whole screen
2026-05-20 19:19:21 -06:00
Hojjat
200074e580 fix: fullscreen x11 games opening as floating/tiled windows 2026-05-20 18:30:03 -06:00
Levi Portenier
8450e89de4
Merge pull request #2381 from dra11y/fix-magnifier-scroll
fix(magnifier): smooth mouse wheel zoom and respect natural scroll direction
2026-05-20 11:39:42 -06:00
Tom Grushka
c776eeac03 change a11y zoom easing function from EaseInOutCubic to Linear to avoid lagging mouse wheel scroll 2026-05-19 17:46:21 -06:00
Tom Grushka
657f0aeddf revert self.update_zoom to update with wheel 2026-05-19 16:30:46 -06:00
Victoria Brekenfeld
61e677e39f kms: Try to re-open the device on permission errors after resume 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
23b198f30b kms: Fix surface drop_and_join 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
61149d95d0 xwm: Reflect sticky state 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
85630236fa xwm: Support sticky requests for unmapped windows 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
6e4551a200 shell/element: Drop minimize/mapping X11 workaround 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
9defbe7b13 shell/element: Throttle X11 resizes as well via sync-req 2026-05-19 19:26:25 +02:00
Victoria Brekenfeld
1ce1ebdc1f chore: update smithay 2026-05-19 19:26:25 +02:00
Ian Douglas Scott
4106904a7e chore: Update smithay with Dispatch2 2026-05-19 19:26:25 +02:00
Tom Grushka
92fcceba54 fix(magnifier): smooth mouse wheel zoom and respect natural scroll direction
- Disable animation for mouse wheel zoom to eliminate the timing race
  that causes lag and sudden jumps. Each wheel tick now zooms instantly.
- Invert zoom direction when natural scrolling is enabled so that
  forward scroll zooms in, matching macOS/Windows behavior.
2026-05-15 15:51:24 -06:00
Hojjat
b5186ef21a fix: restore snapped windows as snapped after maximize/minimize 2026-05-13 12:43:02 +02:00