Commit graph

1226 commits

Author SHA1 Message Date
Victoria Brekenfeld
971c28db38 xwayland: Add descaling option 2024-09-02 18:58:13 +02:00
Victoria Brekenfeld
c9220a7acc chore: Update smithay 2024-09-02 18:58:13 +02:00
julianbraha
52ad30c264 Remove unnecessary lifetimes 2024-08-30 17:53:56 +02:00
pknepps
09b34bb40e Natural scrolling turned off will now turn off natural scrolling for 4-finger gestures 2024-08-30 17:19:02 +02:00
Ian Douglas Scott
ed64e26faf Add xdg-foreign-unstable-v2 protocol 2024-08-30 13:08:08 +02:00
Ian Douglas Scott
1342c000ab Add ext-foreign-toplevel-list-v1 protocol 2024-08-29 17:04:12 +02:00
julianbraha
59b0e0e74e Only use .cloned() on the element instead of the entire iterator 2024-08-29 16:39:39 +02:00
julianbraha
06d25df4ef Iterate over the array instead of an unnecessary vector 2024-08-29 16:39:39 +02:00
julianbraha
2e2356ab5f Use map.entry().or_insert() instead of map.contains_key() and map.insert() 2024-08-29 16:39:39 +02:00
Ian Douglas Scott
536484e9da screencopy: Use buffer age of 0 for render to temporary buffer
It seems we allocate a new `GlesRenderbuffer` every time we screencopy
to an shm buffer.

We probably should use a more complicated approach to do proper damage
tracking without any unnecessary copies, and re-using the GPU buffer,
but as long as this allocates a buffer the age of that buffer should be
treated as `0`.

Fixes corruption in cosmic-workspaces when shm screencopy is used. (For
instance, when Cosmic is run with software rendering.)
2024-08-27 23:28:13 +02:00
BrunoWallner
8114116e04 fixed animation issue completely for keyboard navigation and partially for touchpad gestures 2024-08-26 14:26:57 +02:00
Roxfr
e8dc4b6dc9 Create cosmic_comp.ftl 2024-08-26 13:53:00 +02:00
João Capucho
66695482d0 Don't pass pointer button events to client when moving or resizing 2024-08-23 17:18:39 +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
3625454420 Use monotonic time instead of 0 for motion events
Update to https://github.com/Smithay/smithay/pull/1509, and adopt a
similar change.
2024-08-22 07:22:44 -06:00
Ian Douglas Scott
ca6f05c585 Update pointer focus before motion occurs
If the surface under the pointer has changed, we should send an `enter`
event immediately, instead of waiting for the next motion event. This
seems to fix that, without producing unnecessary events.

Instead of `time: 0`, this and other synthesized events should probably
use `CLOCK_MONOTONIC`. It seems libinput does document that it uses
that.
2024-08-21 13:36:58 -06:00
Ian Douglas Scott
889499b64d Add single-pixel-buffer-v1 2024-08-21 09:26:13 -06:00
Ian Douglas Scott
c48dc1107f Update smithay and smithay-egui 2024-08-21 09:26:13 -06:00
johnny c.
baf6ae3a80 Add Romanian translation 2024-08-21 05:12:39 -06:00
Ian Douglas Scott
e119f10cdc toplevel-management: Set active output if changed, and move cursor
Previously, alt-tab wouldn't actually focus a window if it was on
another output, since the active output/workspace was unchanged.

We need to move the cursor if we activate a window on another output.
2024-08-21 05:10:51 -06:00
Ian Douglas Scott
7d0d878ad1 Don't enable thin LTO in dev profile
Using `lto = "thin"` seems to increase incremental build time when a file
is `touch`ed from about 3 seconds to almost 30.

I'm not sure if this helped with anything, but there are probably better
ways to improve `dev` performance than enabling LTO.
2024-08-20 17:12:20 -06:00
Jeremy Soller
a3c81119e8 Use fallback scale if size is invalid 2024-08-16 06:59:51 -06:00
Victoria Brekenfeld
8d2cc05f03
kms: Try to calculate dpi and scale factor (Take 2)
Co-authored-by: Jeremy Soller <jackpot51@gmail.com>
2024-08-15 15:10:40 -06:00
Richard Weber
bad8837d19 Add wl-clipboard to tiling exceptions 2024-08-14 11:05:58 -06:00
Victoria Brekenfeld
0916d3599a chore: Update smithay 2024-08-10 14:51:29 +02:00
Victoria Brekenfeld
7660f7aaa9 focus: Don't swap focus from maximized tiled windows 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
f9d39144ed focus: Check target for fullscreen instead of workspace 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
e5a7dfbdb0 layout/tiling: enumerate all children before swapping 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
450cc6a323 layout/tiling: Make swapping layout less confusing 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
1f8915f802 layout/tiling: Don't unmap before moving children 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
3eb002c3f1 state: Also set primary_output/preferred_scale for lock/cursor-surfaces 2024-08-08 21:26:30 +02:00
Victoria Brekenfeld
10d45f7134 iced: Set default font 2024-08-08 16:44:27 +02:00
Ian Douglas Scott
5537fa4822 Use EGL_MESA_device_software as fallback for screen capture
Previously, screenshots and screencopy panicked if no DRM render nodes
are present.

Instead, create a `GlowRenderer` using llvmpipe, if available. This
should work as a fallback until pixman is integrated.
2024-08-07 10:49:39 -07:00
Ian Douglas Scott
87020c79ba Define a RendererRef enum, referencing multi or glow renderer
Avoids a little duplication (matching two variants, instead of three
backends).

The behavior, including errors and panics, should be unchanged for now.
Performance should also not be impacted.

This should help for adding llvmpipe rendering without a device node on
the kms backend, or for adding a variant for pixman.
2024-08-07 10:49:39 -07: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
Michael Aaron Murphy
3dd3460ee0
fix(config): PlayPause is not a valid xkb keysym 2024-08-03 11:16:40 +02:00
Aaron Honeycutt
90e3deb43a
chore(config): add PlayPause/Prev/Next shortcuts
* Add PlayPause
* Add Prev/Next
* Update cosmic-settings-config crate

---------

Co-authored-by: Aaron Honeycutt <aaronhoneycutt@proton.me>
2024-08-03 03:37:51 +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
Victoria Brekenfeld
c299748997 config: Load toolkit config on start 2024-08-02 20:54:15 +02:00
Victoria Brekenfeld
24462f728b chore: Update libcosmic 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
9239dc1e75 Run cargo update
Updates `libcosmic`/`iced`, `cosmic-text`, and a few other things.
2024-08-02 09:25:55 +02:00
Victoria Brekenfeld
2cef99ae78 Revert "kms: Try to calculate dpi and scale factor"
This reverts commit 607bd71aeb.
2024-08-01 23:38:11 +02:00
Daniel
e01a55aae7
input: resize on Super + Right-Click Drag 2024-08-01 19:50:28 +02:00
Ian Douglas Scott
c1bf410466 toplevel-info: Fix race between binding wl_ouput and output_enter
This fixes an issue with `cosmic-panel` where, when a workspace is moved
back to an output after a monitor is disconnected and reconnected, the
panel doesn't hide because `cosmic-panel` thinks no toplevel is open on
that monitor.

After some testing, it seems `output_enter` isn't being sent here. In
particular, the `output_leave` call happens before the client binds the
`wl_output`, so there is no `wl_output` to send in an event yet.

This is addressed by keeping track of a set of `wl_output`s that we have
sent the event to. So if an output is bound, `refresh` can add it to
this list and send the event.

This is not needed for workspaces (though it could be done similarly)
since the handle objects are created by server events. So no race should
occur as long as the workspaces global is bound before the toplevel info
one.
2024-08-01 16:35:26 +02:00
Berk Elyesa Yıldırım
a2f9340b02 Update Turkish translation
Fix little mistakes and bring it closer to
the established FOSS translations for consistency

Signed-off-by: Berk Elyesa Yıldırım <beryesa@sayafe.org>
2024-07-31 14:43:02 +02:00
Victoria Brekenfeld
607bd71aeb kms: Try to calculate dpi and scale factor 2024-07-31 13:02:08 +02:00
Michael Aaron Murphy
6209e32f7b chore(config): enable tap-to-click and disable-while-typing by default for touchpads 2024-07-31 09:53:42 +02:00