Commit graph

151 commits

Author SHA1 Message Date
Victoria Brekenfeld
807f63bb72 shell: Lift/refactor (un)maximize, consider sticky windows 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
775e0ccbdc input: Simplify surface_under / lift element_under 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
c50607afd5 input: Add unbound shortcut to toggle sticky state 2024-01-02 13:24:07 +01:00
Ian Douglas Scott
cf9ae91e96 Initial support for tablet input 2024-01-02 12:44:10 +01:00
Ian Douglas Scott
45946fc75d Add map_to_output input option for touch devices 2023-12-28 10:37:08 +01:00
Ian Douglas Scott
70bb9b9a2e Initial wl_touch support
`builtin_output` is similar to `get_builtin_output_name` in Sway.

For full support, we need support for touch targets/grabs, touch support
for SSDs, and a way to configure what output is mapped to what input.

But this is usable for apps that support touch on a laptop with a
touchscreen.
2023-12-28 10:37:08 +01:00
Ian Douglas Scott
144f8cbf69 Fix generation of axis_stop events
`axis_stop` should only be sent if the value is `Some(0)`, while this
also sent it for `None`. So every scroll event on one axis generated
stop events for the other.

This fixes scrolling with a touchpad in Alacritty.

Anvil already does this, comparing against `Some(0.0)`.
2023-12-22 01:28:11 +01:00
Victoria Brekenfeld
a8b401b11d input: Only capture Escape, if a grab is active 2023-12-13 16:36:49 +00:00
Ian Douglas Scott
53de98a068 Fix build with debug feature 2023-12-13 00:08:30 +01:00
Ian Douglas Scott
f70d33d3cb Update Smithay; high-res scroll 2023-12-12 22:09:56 +01:00
Victoria Brekenfeld
2e08bde657 input: Allow Escape to cancel grabs 2023-12-12 18:39:41 +01:00
Victoria Brekenfeld
8c4d77e43c shell: Add window menu 2023-12-12 18:39:41 +01:00
Victoria Brekenfeld
0147c328f9 workspace: Add toggle_stacking/toggle_stacking_focused 2023-12-12 18:39:41 +01:00
Victoria Brekenfeld
677f686afd workspace: Add explicit toogle_floating_window_focused
`toggle_floating_window` -> `toggle_floating_window_focused`
and added `toggle_floating_window` to deal with explicitly provided
`CosmicMapped`.
2023-12-12 18:39:41 +01:00
Victoria Brekenfeld
ea14033d06 input: Fix stack overflow due to shortcut priorities 2023-11-23 12:57:42 +01:00
Victoria Brekenfeld
c09a735289 state: Move Xwayland state into shell 2023-11-23 12:57:42 +01:00
Victoria Brekenfeld
3dee249558 shell: Add keybindings to migrate workspaces 2023-11-21 13:09:38 +01:00
Victoria Brekenfeld
18a8692517 input: Displays take precendence over workspaces 2023-11-20 16:51:15 +01:00
Victoria Brekenfeld
59581f717f input: Take into account output layout 2023-11-20 16:51:15 +01:00
Ian Douglas Scott
440cd03371 Handle session lock surfaces in visible_outputs_for_surface
Fixes issue with re-draw not being queued on initial surface commit
until cursor is moved.
2023-11-15 13:41:19 +01:00
Victoria Brekenfeld
f7cc1985e3 xdg-activation: Initial implementation 2023-11-09 13:48:34 +01:00
Ian Douglas Scott
7e74d8db0b Fix build with debug feature 2023-10-31 09:01:08 -07:00
Ian Douglas Scott
81efd42dd5 Use cosmic-config for dynamic workspace settings
`WorkspaceAmount`, `WorkspaceMode`, and `WorkspaceLayout` can all be
changed dynamically now.
2023-10-27 12:36:40 -07:00
Ian Douglas Scott
f0277eabae Add ext-session-lock protocol 2023-10-27 09:01:25 -07:00
Victoria Brekenfeld
d6434d322e floating: Limit resizing to current output 2023-10-25 19:41:55 +02:00
Ashley Wulber
abbe94e6e1 feat: theme integration
refactor: only apply updates if there is a change in the theme

refactor: include theme in state

cleanup: theme integration
2023-10-25 19:41:55 +02:00
Victoria Brekenfeld
69563420fb shell: Rework maximize/fullscreen 2023-10-25 19:41:55 +02:00
Victoria Brekenfeld
72df9d07e6 shell: One workspace per output 2023-10-25 19:41:55 +02:00
Victoria Brekenfeld
42aaafe586 utils: New geometry spaces local/global 2023-10-25 19:41:55 +02:00
Ian Douglas Scott
111eb4edf4 Update smithay, with cursor/selection changes
We'll probably want to add support for `cursor-shape-v1`. Not sure about
`wlr-data-control-unstable-v1`. But this just updates to work with the
latest smithay commit for new.
2023-10-10 13:32:41 -07:00
Victoria Brekenfeld
4e12957169 chore: Update deps 2023-10-02 21:51:49 +02:00
PixelDots
37fb26a403 Added Modifier-only keybinding support 2023-09-30 08:44:04 -05:00
Ian Douglas Scott
373af07319 Implement pointer constraints; update to send frame manually 2023-09-29 19:21:13 +02:00
Jeremy Soller
aac2c31a38
Fix NextOutput and PreviousOutput when Shell::activate returns None 2023-09-28 13:21:44 -06:00
Victoria Brekenfeld
4709a1d684 shell: Have Move-shortcut for floating layer and fullscreen windows 2023-09-20 18:57:58 +02:00
Victoria Brekenfeld
3d10ca6105 shell: Handle focus shortcuts for floating layer 2023-09-20 16:30:37 +02:00
Victoria Brekenfeld
4e1c16c384 fullscreen: Use CosmicWindow for decorations 2023-09-18 18:51:21 +02:00
Victoria Brekenfeld
abf430f956 shell: Rework fullscreen/maximize 2023-09-14 19:41:36 +02:00
Victoria Brekenfeld
9ad69fe119 tiling: Add logic to move on swap with empty workspace 2023-09-12 20:53:35 +02:00
Victoria Brekenfeld
7ba52d7162 shell: Refresh focus-stacks after swap 2023-09-12 20:53:35 +02:00
Victoria Brekenfeld
1251b7e9f7 shell/tiling: Implement window swap mode 2023-09-12 20:53:35 +02:00
Ian Douglas Scott
6247918cad Send relative_pointer in frame with pointer; update Smithay
The protocol doesn't specify this, but XWayland does assume relative
pointer events are part of a frame.

This works for now, though a better solution will be needed in Smithay
to also handle pointer constraints where a relative motion may occur
alone, etc.

This seems to fix https://github.com/pop-os/cosmic-comp/issues/159.
2023-09-08 11:10:53 -07:00
Ian Douglas Scott
c68625ff78 Add pointer gestures support 2023-09-05 13:47:07 -07:00
Ian Douglas Scott
20159a6c8c input: Add a scroll_factor config option
This is not a setting handled by libinput; we have to scale the
scrolling ourselves.

This should match the behavior of the `scroll_factor` defined in
sway-input(5).
2023-09-01 12:36:12 -07:00
Ian Douglas Scott
56467755a8 cosmic-comp-config crate, and default input config
This adds a `input-default` setting, which is used for input settings if a
device isn't set in `input-devices`. More awkwardly, it also adds an
`input-touchpad` setting, which is used instead of `input-default` for
touchpad devices, so we can separate mouse and touchpad settings even
though they use the same capability and settings.

This no longer sets the input config, and only reads it. If we add a UI
for per-device config, we'll need some IPC mechanism to list connected
devices. (Assuming cosmic-settings can't use libinput directly for that.)

This moves `InputConfig` and `XkbConfig` to a new `cosmic-comp-config`
crate, so they can be used in `cosmic-settings`.
2023-08-31 13:59:49 -07:00
Ian Douglas Scott
4a780cb343 Update smithay-egui and fix compilation of debug 2023-08-07 08:47:51 -07:00
Victoria Brekenfeld
4ee2763139 chore: Formatting updates 2023-07-31 17:36:32 +02:00
Victoria Brekenfeld
85edfc7141 tiling: Mouse dragging visuals 2023-07-21 16:08:55 +02:00
Victoria Brekenfeld
f00dda7591 shell: Allow overview to be triggered by pointer 2023-07-17 21:11:45 +02:00
Victoria Brekenfeld
a8a5ee466a shell: Generalize move grab 2023-07-17 21:11:23 +02:00