Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KWin KWin
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 62
    • Issues 62
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 165
    • Merge requests 165
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • KWinKWin
  • Merge requests
  • !2577

Draft: backends/{libinput,wayland,x11}: Provide absolute position in 0..1 range

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Vlad Zahorodnii requested to merge work/zzag/input-device-absolute-pos into master Jun 24, 2022
  • Overview 2
  • Commits 3
  • Pipelines 2
  • Changes 14

At the moment, there's a circular dependency between input backends and the workspace. Besides being a code smell, it can be a potential source of crashes as well. For example, if the workspace has not been created yet and that case is overlooked, kwin is going to crash.

In order to break the circular dependency, this MR changes the api of the InputDevice so absolute position is specified in 0 to 1 range. The Workspace layer is responsible for mapping absolute coordinates to workspace coordinates. As a bonus, the Workspace layer could apply its custom mapping policies, for example tablet input could be aware of the active window.

The erasure of the workspace bits also makes the backend more reusable, which can be useful in our (plasma) future projects.

cc #96

Draft:

  • Make wayland backend create a pointer and a touch device per window
  • Adjust tests
  • Adjust the fake input protocol
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/zzag/input-device-absolute-pos