Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Q qtwayland
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • Qt Project
  • qt
  • qtwayland
  • Merge requests
  • !18

Wayland client: use wl_keyboard to determine active state

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Méven Car requested to merge meven/qtwayland:cherry-pick-change-I4343d2ed9fb5b066cde95628ed0b4ccc84a424db into kde/5.15 Oct 07, 2021
  • Overview 26
  • Commits 1
  • Changes 13

Commit f497a5bb made QWaylandDisplay use the xdgshell's active state for QWindow::isActive(), instead of using wl_keyboard activate/deactivate events.

That seems to have been a misunderstanding, since xdgshell activation is only supposed to be used to determine visual appearance, and there is an explicit warning not to assume it means focus.

This commit reverts this logic back to listening to wl_keyboard. It adds a fallback when there is no wl_keyboard available to handle activated/deactivated events through xdg-shell, in order to fix QTBUG-53702.

windowStates is handled so that we're not using the Xdg hint for anything with QWindowSystemInterface::handleWindowStateChanged or anything where we need to track only having one active.

We are still exposing it for decorations, which is the only reason to use the Xdghint over keyboard focus - so you can keep the toplevel active whilst you show a popup.

cherry-pick 40036a1b

Change-Id: I4343d2ed9fb5b066cde95628ed0b4ccc84a424db Reviewed-by: default avatarEskil Abrahamsen Blomfeldt eskil.abrahamsen-blomfeldt@qt.io

https://codereview.qt-project.org/c/qt/qtwayland/+/367306

cc @davidedmundson @apol

Edited Oct 25, 2021 by Méven Car
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: cherry-pick-change-I4343d2ed9fb5b066cde95628ed0b4ccc84a424db