Commit graph

1637 commits

Author SHA1 Message Date
therealmate
d6aa174093 Update Hungarian translations 2025-07-14 19:34:06 +02:00
Victoria Brekenfeld
505d9c4039 tiling: fix missing output_enter/set_bounds on remap 2025-07-14 17:38:35 +02:00
Ashley Wulber
ef5a1a3284
fix(overlap): check if window is sticky 2025-07-07 14:15:43 -04:00
Victoria Brekenfeld
7a52eff61e workspace: Animation and geometry fixes around maximized windows 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
a7b369fab3 shell: Fix layer on maximize restore 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
befcdadf88 floating: animation fixes 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
7988be12a5 shell: rebase fullscreen changes on for xwayland-grab 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
9d91014b8d shell: Focus window after unfullscreening 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
261134d827 shell: Correctly track was_maximized for fullscreened sticky windows 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
54e76d5ad2 shell: Don't consider animation geometry when remapping fullscreen surfaces 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
d63f1abcdd workspace: Correctly handle unmapping maximized elements 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
77084ba1cc floating: Return pending geometry on unmap 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
24a48fdac6 shell: Fix re-render on toplevel_destroy 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
dec2092684 workspace: Add missing output_enter/leave events for fullscreen surfaces 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
828c0a225b shell: Fix clicking on background fullscreen surfaces 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
165f83fa38 shell: Properly restore maximized state from minimize/fullscreen 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
b11456614f shell/workspace: Don't double-remove animating fullscreen surfaces 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
5f97691ce5 xwayland: Don't allow spurious map_requests to map windows twice 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
83ed79af16 workspace: Consistently set minimized state 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
9d3678e908 shell: Ignore fullscreen requests to minimized windows 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
33044d9efb input: Add fullscreen shortcut 2025-07-04 19:45:54 +02:00
Victoria Brekenfeld
adedb705e7 shell: handle fullscreen windows on a dedicated layer
I hoped to split this up into multiple commits, but the api
changes to `shell/workspace.rs` were to invasive to feasibly do this.

Here is a rough list of changes:

- Fullscreen windows aren't mapped to other layers anymore
  - This they need their own logic for:
    - Sending frames
    - Dmabuf Feedback
    - Primary outputs
    - On commit handlers
    - cursor tests
  - They get their own unmap/remap logic
  - They get a new restore state similar to minimized windows
    - Refactored the minimized window state to reuse as much as possible
      here
  - They need to be part of focus stacks, which means adjusting them
    to a new type `FocusTarget` as they previously only handled
    `CosmicMapped`.
  - Various shell handlers (minimize, move, menu) now have dedicated
    logic for fullscreen surfaces
    - This was partially necessary due to relying on CosmicSurface now,
      partially because they should've had their own logic from the
      start. E.g. the context menu is now reflecting the fullscreen
      state
- Fullscreen windows may be rendered behind other windows now, when they
  loose focus.
  - This needed changes to input handling / rendering
2025-07-04 19:45:54 +02:00
Ian Douglas Scott
8ef6c161a0 screencopy: Fix damage tracking bug with shm screencopy of output
Similar to the change in https://github.com/pop-os/cosmic-comp/pull/780,
but also updates it to be a little clearer than just an uncommented `age
= 0` line.

Ideally we want some robust system to re-use the offscreen buffer (but
not allocate more buffers indefinitely if the client doesn't capture
with the same `wl_buffer`).
2025-07-03 23:36:13 +02:00
Ian Douglas Scott
e5fbf21fee Remove debug prints that probably shouldn't have been merged
Also add a comment to the one place `eprintln!` is used to explain why
it's appropriate.
2025-07-03 14:25:49 +02:00
Ian Douglas Scott
2b4890c550 protocols/workspace: Track group a workspace is on, and update
It seems previously, workspace migration due to output add could result in
a workspace being removed from a group, but not added to the new group
for existing clients, because the workspace group creation didn't happen
until `done`. And `send_workspace_to_client` didn't send
`workspace_enter` except when a workspace instance is newly created.

That logic worked with the old protocol, but now a workspace can be
moved to a different group.

Seems to fix the issue with workspaces disappearing from the workspaces
view in https://github.com/pop-os/cosmic-comp/issues/1470. I don't seem
to be able to reproduce the panel auto-hide issue, but have seen it in
the past. So it may or may not be prevented from happening now.
2025-07-03 14:25:49 +02:00
Ian Douglas Scott
1564b9d1a3 Inhibit keyboard shortcuts if XWayland grab is active
This matches behavior in X11 sessions (Gnome and i3). It presumably is
reasonable to have the same behavior here as with Wayland-native
keyboard shortcut inhibition.
2025-07-02 11:16:53 +02:00
Ian Douglas Scott
30d68af051 Improved handling of XWayland grabs
A solution for https://github.com/Smithay/smithay/issues/1714.

With this, the lock screen is able to get keyboard focus normally, but
focus then reverts to the XWayland grab surface. This can be tested with
the example client from the issue.

Adding a new variant of `KeyboardFocusTarget` is annoying. Maybe it
could map to a different variant of the enum. But it presumably needs to
handle any `wl_surface` XWayland uses. (Override redirect surfaces?
Subsurfaces?) This seems as good as anything for now.
2025-07-02 11:16:53 +02:00
Ian Douglas Scott
791bcac2fd Update smithay with dma_shadow_copy fix
https://github.com/Smithay/smithay/pull/1767

Fixes errors and Nvidia driver crash with `cosmic-workspaces` on
AMD+Nvidia system.
2025-07-01 11:32:28 -07:00
Ian Douglas Scott
1844afde09 kms: Do not attempt to import dmabuf on device not supporting format
Previously, if `expected_node` couldn't import a buffer, it would print
an error, then try the next node. There shouldn't really be a reason to
attempt import if the format/modifier isn't in `dmabuf_texture_formats`.

It seems the issue I've been seeing with cosmic-workspaces crashing
the Nvidia driver is fixed by removing this, and disabling `dma_shadow_copy`
(which was producing the same error). Importing Nvidia buffers on the AMD
GPU seems to be causing issues.

Not sure how `dma_shadow_copy` should be fixed, but a test for supported
formats is easy to add here anyway.
2025-07-01 11:32:28 -07:00
jermanuts
db0b5108ad i18n(ar): Add Arabic translation 2025-06-30 17:31:25 +02:00
Ian Douglas Scott
17d6edb6d5 Send wl_surface::leave before destroying output global 2025-06-26 11:37:09 +02:00
Ian Douglas Scott
e581cbf05a Update smithay 2025-06-26 11:37:09 +02:00
Ian Douglas Scott
614d99fc05 Update smithay, egui, and smithay-egui 2025-06-25 20:32:53 +02:00
Jeremy Soller
48a165d182 Update libcosmic 2025-06-23 12:06:41 -06:00
Ashley Wulber
156742985d chore: add keybinding for power off button handling 2025-06-13 19:19:32 +02:00
Ashley Wulber
8a3436edb2 Revert "feat: power button handling"
This reverts commit 534584b9e48fcae406094367bdcb911f8957a523.
2025-06-13 19:19:32 +02:00
Ashley Wulber
8e3590fb4d feat: power button handling 2025-06-13 18:40:30 +02:00
Ian Douglas Scott
5eeff3735f Send dmabuf feedback for dnd icon surface, and cursor surface 2025-06-10 19:24:05 +02:00
Ian Douglas Scott
726994b858 Consider cursor and drag surfaces in visible_output_for_surface
This ensures that a commit to a cursor or drag surface will queue a
redraw, even if nothing else has changed on screen.

This can be tested by running `vkgears` in an otherwise empty
cosmic-comp instance, and dragging it.
2025-06-10 19:24:05 +02:00
Ian Douglas Scott
3197e52afd Unwrap user data in cursor_image_status
This is added on creation of the seat, and unwrapped, when setting the
status, so the `unwrap_or` case here seems unnecessary.
2025-06-10 19:24:05 +02:00
Ian Douglas Scott
fa4bffdbe6 Add cursor_image_status/set_cursor_image_status to SeatExt
The `cursor_image_status()` function saves some duplication in various
places. The `set_cursor_image_status()` saves a bit less, but is also
handy.
2025-06-10 19:24:05 +02:00
Ian Douglas Scott
ddc23fcaa5 Set primary scanout output for dnd icon surface
It can still get unthrottled frame callbacks by not having any primary
scanout output, but presumably we want this. Alongside the code setting
it for cursor surfaces, and dragged windows.
2025-06-10 19:24:05 +02:00
Ian Douglas Scott
fde5b9aa91 Send frame callback for dnd icon surfaces
`org.gnome.gitlab.YaLTeR.Identity` is a good way to test animated dnd
surfaces.
2025-06-10 19:24:05 +02:00
Ian Douglas Scott
b823dd4247 kms/surface: Split off part of redraw into take_screencopy_frames 2025-06-10 16:01:04 +02:00
Ian Douglas Scott
e80e46e911 kms/surface: Update how errors in send_screencopy_result are handled
Previously, some errors in the screencopy code resulted in `redraw`
returning an error, while others make the screencopy frame fail, and
logged a warning.

Instead, make all errors here log a warning, and call `reset()` on the
session, but continue running `redraw()`.

Calling `frame.error` explictly isn't needed, since the same error will
be sent on drop otherwise.
2025-06-10 16:01:04 +02:00
Ian Douglas Scott
ca817e2579 kms/surface: Split off part of redraw into postprocess_elements 2025-06-10 16:01:04 +02:00
Ian Douglas Scott
39b1ac2955 kms/surface: Split off part of redraw into a send_screencopy_result
This should not change behavior in any way.
2025-06-10 16:01:04 +02:00
Victoria Brekenfeld
e94377f4de chore: Update smithay 2025-06-03 15:38:44 +02:00
Ian Douglas Scott
4fa3113c76 Update smithay
https://github.com/Smithay/smithay/pull/1748
2025-06-02 18:58:49 +02:00
Ian Douglas Scott
f86cd933d4 kms/surface: Call cleanup_texture_cache for each device at end of draw
Fixes an issue where a dual GPU system would keep allocating dGPU PBOs in
`cpu_copy()` every frame, but `cleanup()` was not being called, since the
surface thread for the builtin output was rendered on the
primary/integrated GPU, targeting the same GPU.

Even if a different monitor was compositing on the dGPU, That wouldn't
help since that thread has it's own `GpuManager` with it's own renderer
and cache.

Running cleanup at the end (or start) of each frame seems like a good
idea. Not sure if it would be best to avoid additional calls, or if
that's desirable/fine.
2025-06-02 18:58:49 +02:00