Skip to content

Add tablet grabs - #2725

Open
Drakulix wants to merge 18 commits into
masterfrom
update-smithay_noble
Open

Add tablet grabs#2725
Drakulix wants to merge 18 commits into
masterfrom
update-smithay_noble

Conversation

@Drakulix

@Drakulix Drakulix commented Aug 11, 2026

Copy link
Copy Markdown
Member

Alternative to #2696, that actually implements the new grabs.

After fighting with it for a while, I finally got the WeylusCommunityEdition to work with my iPad (though screen capture doesn't seem to work with this one on cosmic?) for testing and of course the first attempt is half-broken.

  • Move grabs on SSD
  • Resize grabs floating
  • Resize grabs tiling
  • Menu grabs - might work via tablet tool buttons on hover, but my tablet doesn't send this event
  • Zoom grabs (can't really work)
  • Pointer emulation for clients not binding wp_tablet
    • libcosmic apps seem to bind the tablet, but not handle it's input, nothing tbd from cosmic-comps side
  • Focusing windows with the tablet tool works now

  • I have disclosed use of any AI generated code in my commit messages.
    • If you are using an LLM, and do not fully understand the changes it is making to the code base, do not create a PR.
    • In our experience, AI generated code often results in overly complex code that lacks enough context for a proper fix or feature inclusion. This results in considerably longer code reviews. Due to this, AI authored or partially authored PRs may be closed without comment.
  • I understand these changes in full and will be able to respond to review comments.
  • My change is accurately described in the commit message.
  • My contribution is tested and working as described.
  • I have read the Developer Certificate of Origin and certify my contribution under its conditions.

@Drakulix
Drakulix requested a review from ids1024 August 11, 2026 16:54
@ids1024

ids1024 commented Aug 11, 2026

Copy link
Copy Markdown
Member

Using PointerFocusTarget for tablet tool focus makes sense.

Testing on my Microsoft Surface, Xournal++ and Firefox tablet input seems to be working fine, which generally means this isn't a regression.

I see a couple issues with the new server-side tablet targets.

  • Closing a stack using the pen works, but changing the focused stack element doesn't. (Presumably something we want? but not a major bug.)
  • Starting an SSD window drag (of a window not in a stack) with the pen works. But the drag continues when the pen is removed from the screen and placed next to the screen again, with no obvious way to end the drag using the pen. And when moving the pointer there's also a pointer grab.
    • Should the drag be finished on proximity out?
    • Probably this should be independent of pointer, and not create a pointer grab?

@Drakulix

Drakulix commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

There is one weird bug remaining, where tiled grabs of windows with SSD don't always release properly. Otherwise this should be a major improvement. @ids1024 Can you give this another test?

Once I found that last bug I am gonna do a rebase and then this should finally be good for a proper review and in-depth QA testing.

@hojjatabdollahi

hojjatabdollahi commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Not sure if this PR is relevant here, just FYI: pop-os/iced#376

EDIT: Actually I see you've already mentioned it:

libcosmic apps seem to bind the tablet, but not handle it's input, nothing tbd from cosmic-comps side

@ids1024

ids1024 commented Aug 18, 2026

Copy link
Copy Markdown
Member

SSD drags generally seem to work well now. CSD drags using xdg_toplevel.move don't seem to be working (I can see nautilus calls move but don't get a grab). And stack decorations still seem to need more tablet interactivity, as before. Firefox and Xournal++ still seem fine.

Those aren't really bugs here though since they are existing limitations.

@Drakulix
Drakulix force-pushed the update-smithay_noble branch from d96d9e5 to 08b8277 Compare August 19, 2026 16:12
@Drakulix
Drakulix marked this pull request as ready for review August 19, 2026 16:12
@Drakulix

Drakulix commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

SSD drags generally seem to work well now. CSD drags using xdg_toplevel.move don't seem to be working (I can see nautilus calls move but don't get a grab).

Should be working now! Grab validation didn't fully consider tablets yet.

And stack decorations still seem to need more tablet interactivity, as before. Firefox and Xournal++ still seem fine.

Stack decorations are now interactable with both touch and tablet input. You can drag out a window from a stack using a tablet tool as well. :)

@Drakulix
Drakulix requested review from a team August 19, 2026 16:14
@Drakulix Drakulix changed the title Update smithay and add tablet grabs Add tablet grabs Aug 20, 2026
@ids1024

ids1024 commented Aug 21, 2026

Copy link
Copy Markdown
Member

Yep, those things seem to be working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants