-
Notifications
You must be signed in to change notification settings - Fork 55
feat: add keyboard focus management for plugin surfaces #1205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideImplements keyboard focus management for plugin surfaces by adding a setKeyboardFocus API exposed to QML and triggering it on hover in the ShellSurfaceItemProxy to route keyboard input via the Wayland seat. Sequence diagram for keyboard focus management on plugin surface hoversequenceDiagram
actor User
participant ShellSurfaceItemProxy (QML)
participant PluginSurface
participant QWaylandSeat
participant QWaylandSurface
User->>ShellSurfaceItemProxy (QML): Hover over plugin surface
ShellSurfaceItemProxy (QML)->>PluginSurface: setKeyboardFocus()
PluginSurface->>QWaylandSeat: setKeyboardFocus(QWaylandSurface)
QWaylandSeat-->>PluginSurface: Keyboard focus set
PluginSurface-->>ShellSurfaceItemProxy (QML): (returns)
ShellSurfaceItemProxy (QML)-->>User: (keyboard input now routed)
Class diagram for PluginSurface keyboard focus APIclassDiagram
class PluginSurface {
+Q_INVOKABLE void setKeyboardFocus()
}
class QWaylandSeat {
+void setKeyboardFocus(QWaylandSurface*)
}
PluginSurface --> QWaylandSeat : uses
PluginSurface --> QWaylandSurface : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Added setKeyboardFocus method to PluginSurface class to handle keyboard focus via Wayland seat 2. Exposed the method as Q_INVOKABLE for QML access 3. Implemented focus handling in ShellSurfaceItemProxy when hovered 4. Includes necessary QWaylandSeat header for keyboard focus management 5. This ensures proper keyboard input handling when interacting with plugin surfaces feat: 为插件表面添加键盘焦点管理 1. 在 PluginSurface 类中添加 setKeyboardFocus 方法,通过 Wayland seat 处 理键盘焦点 2. 将方法暴露为 Q_INVOKABLE 以便 QML 访问 3. 在 ShellSurfaceItemProxy 中实现悬停时的焦点处理 4. 包含必要的 QWaylandSeat 头文件用于键盘焦点管理 5. 确保与插件表面交互时能正确处理键盘输入 Pms: BUG-312795
deepin pr auto review代码审查意见:
综上所述,代码中存在一些潜在的问题,需要进一步优化和改进。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, wjyrich The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |
|
This pr force merged! (status: behind) |
feat: 为插件表面添加键盘焦点管理
Pms: BUG-312795
Summary by Sourcery
Introduce keyboard focus management for plugin surfaces in the compositor and QML layer
New Features:
Enhancements: