Commit graph

64 commits

Author SHA1 Message Date
skewballfox
7da0bc430a added cursor_follows_focus and focus_follows_cursor 2024-09-04 20:22:40 +02:00
julianbraha
52ad30c264 Remove unnecessary lifetimes 2024-08-30 17:53:56 +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
Victoria Brekenfeld
d4926c3a9e shell: Allow dragged windows to be focused 2024-07-17 18:57:21 +02:00
Victoria Brekenfeld
d85b6f0e50 focus: set minimized windows unfocused 2024-07-10 22:36:40 +02:00
Victoria Brekenfeld
c06529b548 focus: Don't send enter/leave for same surface 2024-07-10 22:36:40 +02:00
Victoria Brekenfeld
dc882ffc36 focus: Fall back to first window, if stack is empty 2024-07-03 21:03:58 +02:00
Michael Aaron Murphy
553c49b42b feat: runtime configurable keybindings 2024-07-01 15:20:23 +02:00
Victoria Brekenfeld
953c277cb0 focus: Fix crash when no output is available 2024-06-27 12:35:01 +02:00
Victoria Brekenfeld
c7d50e7c5b seat: Make render-related state thread-safe 2024-06-26 12:59:33 +02:00
Victoria Brekenfeld
b5dcec5215 focus: Don't stack overflow because None=None 2024-06-06 13:07:29 +02:00
Ian Douglas Scott
d9a1ec04bd Set clipboard/primary focus in refresh_focus
This should fix https://github.com/pop-os/cosmic-comp/issues/494, and
make clipboard and primary focus consistently correct.

Changing the active element of a stack needs to change the clipboard
focus, but it wasn't being changed since the `KeyboardFocusTarget` was
unchanged. The `CosmicStack` methods that change the active stack
element also have no obvious way to change the keyboard focus. So we can
set this in `refresh_focus`, which should be correct.

If the new focus `WlSurface` is `None`, this clears the focus instead of
leaving it as the previous code did. I believe that is desirable.

Requires https://github.com/Smithay/smithay/pull/1442 to avoid repeated
`offer`s, instead of only when focus changed.

(Perhaps this could better be solved by having a `WlSurface` variant of
`KeyboardFocusTarget`, like pointer focus, or some mechanism for a stack
of focus, which could help other things. But it's also unclear exactly
how that would work with the code for setting the active stack element,
among other questions.)
2024-06-04 13:24:25 +02:00
Ian Douglas Scott
4f076e0753 Update smithay, with xwayland shell, Cow, etc. 2024-05-21 19:31:50 +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
d16a9e387d Remove outdated TODO comment 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
26d2556be0 Initial touch support for SSD 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
cf75bc1952 chore: Update smithay/libcosmic 2024-03-26 18:50:56 +01:00
Victoria Brekenfeld
3cff426805 focus: Fix screencopy 2024-03-26 18:50:56 +01:00
Victoria Brekenfeld
5459f52d5e input: Rework PointerFocus to operate directly on WlSurface 2024-03-26 18:50:56 +01:00
Victoria Brekenfeld
dcf1fce28a focus: Fix endless raising window cycle 2024-03-05 13:53:59 +01:00
Victoria Brekenfeld
3eb7e5f82e shell: implement minimize 2024-03-04 19:20:52 +01:00
Ian Douglas Scott
3036448c19 Update Smithay, with Window that supports X11 surfaces 2024-02-22 17:49:46 +01:00
Victoria Brekenfeld
f928f80f09 formatting fixes 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
e67e139e15 focus: Allow sticky windows in focus_stacks, allow dialogs to stay on top 2024-01-02 13:24:07 +01:00
Victoria Brekenfeld
d2e394b957 menu: Allow toggling sticky state 2024-01-02 13:24:07 +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
3bec008d3a Fix handling of layer shell surface with exclusive interactivity
This should now match the protocol specification, and how Sway behaves.

If a surface in the `Top` or `Overlay` has
`KeyboardInteractivity::Exclusive`, only that surface can have keyboard
focus. If multiple surfaces do, focus can be changed between those with
keyboard exclusivity on the highest layer.

This is similar to session lock surfaces, except a session lock takes
precedence.

This fixes the behavior of keyboard focus in `cosmic-greeter`, with the
current layer-shell based implementation.
2023-11-02 12:49:03 -07:00
Ian Douglas Scott
f0277eabae Add ext-session-lock protocol 2023-10-27 09:01:25 -07:00
Victoria Brekenfeld
4f076f73d9 xwm: Fix stacking order 2023-10-25 19:41:55 +02:00
Victoria Brekenfeld
781427a74c focus: Restore nested popup grabs 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
Ian Douglas Scott
373af07319 Implement pointer constraints; update to send frame manually 2023-09-29 19:21:13 +02:00
Victoria Brekenfeld
de83185af9 focus: Don't sort children behind their parents 2023-09-20 19:20:35 +02:00
Victoria Brekenfeld
4709a1d684 shell: Have Move-shortcut for floating layer and fullscreen windows 2023-09-20 18:57:58 +02:00
Victoria Brekenfeld
4e1c16c384 fullscreen: Use CosmicWindow for decorations 2023-09-18 18:51:21 +02:00
Ian Douglas Scott
e7e9b768c8 Update Smithay, adjusting for API changes
The main changes are those related to pointer gestures. Which are a bit
verbose but not too difficult.
2023-09-05 13:46:48 -07:00
Victoria Brekenfeld
b818a68a91 tiling: Properly handle resizing using a ptr device 2023-07-11 16:33:23 +02:00
Victoria Brekenfeld
2004705080 workspace/layout: Resize windows/groups 2023-07-06 00:08:46 +02:00
Victoria Brekenfeld
c282c5c08e shell: Don't activate windows, if groups are selected 2023-06-09 19:49:19 +02:00
Victoria Brekenfeld
56131b13ae tiling: Allow selecting groups 2023-06-05 18:42:05 +02:00
Victoria Brekenfeld
b1e39452d0 Fix #120 2023-05-26 12:47:39 +02:00
Victoria Brekenfeld
4ea0136a9b tiling: Add code to render group hints 2023-05-25 00:15:42 +02:00
Darksome
e3a718dab5 Fix focus when switching from empty workspace 2023-04-01 21:01:00 +04:00
Darksome
a11c3e8f67 Fix refresh_focus 2023-04-01 20:35:58 +04:00