Commit graph

868 commits

Author SHA1 Message Date
Ian Douglas Scott
46fd6ebd61 Fix tablet input
We need to call `add_tablet` for each tablet device, not just if the
capability is new. Also, the tool needs to be added with `add_tool`.

`xournalpp` seems to be working now.
2024-05-15 08:16:43 +02:00
Ian Douglas Scott
36bf611bac fix: Apply scroll_factor to v120 events
I wasn't sure if, or how, scaling should apply to the `scroll_value120`
events. But it seems both sway and kwin just multiply by the scale
factor then round, so that seems reasonable.

This seems to fix https://github.com/pop-os/cosmic-settings/issues/270.
2024-05-10 14:00:45 +02:00
Ian Douglas Scott
73b12194c0 Update smithay 2024-05-10 13:51:28 +02:00
Ian Douglas Scott
a9740e5040 Change how COSMIC_ENABLE_WAYLAND_SECURITY/privileged is handled
Manually starting `cosmic-panel` was not working properly in release
builds, because without `cfg!(debug_assertions)`, the `privileged` flag
wasn't sent on the panel, so it couldn't be propagated to the applets,
which also fail the `client_has_no_security_context()` check.

I don't see a way to have both the `cfg!(debug_assertions)` check and
`COSMIC_ENABLE_WAYLAND_SECURITY`. Now only the latter is used, and it
determines the value of `privileged` for clients started normally. In
the future, we could make the default value of
`COSMIC_ENABLE_WAYLAND_SECURITY` depend on `cfg!(debug_assertions)` if
desired.

This also corrects the inconsistency that the `cfg!(debug_assertions)`
check wasn't applied to the render-node-specific Wayland sockets.
2024-05-08 13:10:07 +02:00
Victoria Brekenfeld
954aa6edeb output-management: Handle destroy requests better 2024-05-07 12:25:15 +02:00
Victoria Brekenfeld
45bdffe802 output-management: Correctly advertise enabled-state for mirrored outputs 2024-05-07 12:25:15 +02:00
Victoria Brekenfeld
1048d99c05 output-management: Don't advertise wl_output for mirrored outptus 2024-05-07 12:25:15 +02:00
Victoria Brekenfeld
5f4377bf59 wayland: Add cosmic-output-management 2024-05-07 12:25:15 +02:00
Victoria Brekenfeld
98ec82db77 output-configuration: Add vrr state 2024-05-07 12:25:15 +02:00
Victoria Brekenfeld
4b71674e10 output-configuration: Support release-requests / v3 2024-05-07 12:25:15 +02:00
Victoria Brekenfeld
3eb6c02008 kms: Output mirroring 2024-05-07 12:25:15 +02:00
Mattias Eriksson
19ba568f02 Initial support for idle notify and idle ihibit 2024-05-03 14:38:58 +02:00
Ian Douglas Scott
c4fc91d6e9 screencopy: Don't send fail after ready
Cosmic-workspaces was having an issue when the compositor sent `ready`,
`failed`, then `stopped`. This could be worked around client-side, but
presumably the compositor should never send more than one
`failed`/`ready` for a particular frame.

It seems cleaner to have `FrameInner::fail` as the only place that sends
`failed`. So any checks can be there. I believe the logic there should
be appropriate for every call.
2024-05-03 14:21:30 +02:00
Ian Douglas Scott
3697494146 screencopy: Fix reference cycle, that leaks buffer
Before this, `/proc/$(pidof cosmic-comp)/maps` quickly expands in length
when cosmic-workspaces is opened and closed a bunch of time, preventing
the GPU memory from being freed. Which on my Intel system can lead to
OOM eventually.

There may be other leaks to deal with, but `maps` no longer shows this
issue.
2024-04-30 13:05:16 +02:00
Ryan Brue
90227471bf feat: floating window tiling gaps 2024-04-22 10:44:14 +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
Ian Douglas Scott
916b7729a5 fix: Add Element::kind method to CosmicElement
The default implementation always returned `Kind::Unspecified`. Instead,
we should pass this method through to the wrapped element.

This fixes the use of cursor planes. Now trace logs show Smithay
assigning an element to the cursor plane, and tools like `drm_info` show
the cursor plane with an `FB_ID` attached.
2024-04-17 12:01:25 +02:00
Ian Douglas Scott
17ddc7ce24 Update smithay
Updates for changes in https://github.com/Smithay/smithay/pull/1391.
2024-04-17 11:59:13 +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
1216cd0b67 Add unset method to input grab traits
Fixes https://github.com/pop-os/cosmic-comp/issues/403.
2024-04-15 18:53:09 +02:00
Ian Douglas Scott
d16a9e387d Remove outdated TODO comment 2024-04-15 11:37:03 +02:00
Ian Douglas Scott
f2efc5d56f shell: Fix MoveGrab with touch not on output pointer is on 2024-04-15 11:37:03 +02:00
Ian Douglas Scott
2c5c32ad4e shell: Fix resize grab unsetting 2024-04-15 11:37:03 +02:00
Ian Douglas Scott
2961291d26 shell: Fix moving floating windows with touch 2024-04-15 11:37:03 +02:00
Ian Douglas Scott
bddfba464c shell: Add touch support to ResizeSurfaceGrab
Seems to work well with GTK.
2024-04-15 11:37:03 +02:00
Ian Douglas Scott
1da3c7c41e shell: Touch support for ResizeForkTarget/ResizeForkGrab
This seems to be working, though it's quite difficult to actually hit the
small target with touch.
2024-04-15 11:37:03 +02:00
Ian Douglas Scott
b18a3a8bc7 shell: Touch support for move grab
Touch support is still needed for other grabs. And SSDs (and libcosmic)
need to start move/menu/etc. based on touch.
2024-04-15 11:37:03 +02:00
Ryan Brue
895ea6aec1 fix: send pending activated instead of current activated to toplevel_info 2024-04-11 16:30:03 +02:00
Victoria Brekenfeld
11a8265145 toplevel-info: Also send workspace info for new windows 2024-04-11 13:28:49 +02:00
Ryan Brue
f85911020a fix: reduce size of top snap range 2024-04-11 13:28:19 +02:00
Ian Douglas Scott
f83d80d471 Exclude DnD surfaces from workspace capture
Fixes https://github.com/pop-os/cosmic-workspaces-epoch/issues/25.
2024-04-11 12:36:03 +02:00
Ian Douglas Scott
2ff8a2d200 moving: Show snapping_indicator only on current output
Without this check, a floating window that is dragged near an edge
between monitors causes snapping indicators to show on both, since the
window intersects both.
2024-04-11 11:49:12 +02:00
Ian Douglas Scott
de544e1d31 Update smithay to latest commit 2024-04-09 11:26:36 +02:00
Victoria Brekenfeld
6ba7242cfc main: Increase soft file limit 2024-04-05 13:49:36 +02:00
Victoria Brekenfeld
fa7926f7c1 input: Move window anywhere with Super-key 2024-04-02 17:22:30 +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
Ian Douglas Scott
9e5ce71e1c Run cargo fmt 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
10940a723f floating: Don't drop stack on themselves 2024-03-28 17:25:09 +01:00
Victoria Brekenfeld
6416299d58 shell: Send on_commit to sticky windows as well 2024-03-28 13:10:28 +01:00
Victoria Brekenfeld
b371a26362 shell: Fix surface_under for sticky windows as well 2024-03-28 13:10:10 +01:00
Victoria Brekenfeld
62e82837f7 Don't consider gestures animating. Fixes #391 2024-03-28 12:34:46 +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
5449858e70 Fix #385 2024-03-27 17:48:50 +01:00