-
Notifications
You must be signed in to change notification settings - Fork 48
fix: need update exclusion zone when screen was added or removed #1093
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 Guide by SourceryThis pull request fixes an issue where the exclusion zone was not being updated when a screen was added or removed. It also corrects the calculation of the bottom strut partial. The changes involve connecting the Sequence diagram for screen added eventsequenceDiagram
participant QGuiApplication
participant LayerShellEmulation
participant QTimer
QGuiApplication->>LayerShellEmulation: screenAdded(newScreen)
activate LayerShellEmulation
LayerShellEmulation->>newScreen: connect(geometryChanged, onPositionChanged)
LayerShellEmulation->>newScreen: connect(geometryChanged, QTimer::start)
LayerShellEmulation->>QTimer: start()
deactivate LayerShellEmulation
Sequence diagram for screen removed eventsequenceDiagram
participant QGuiApplication
participant LayerShellEmulation
participant QTimer
QGuiApplication->>LayerShellEmulation: screenRemoved()
activate LayerShellEmulation
LayerShellEmulation->>QTimer: start()
deactivate LayerShellEmulation
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.
Hey @yixinshark - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider extracting the lambda connected to
screenAdded
into a named method for better readability. - It looks like
m_exclusionZoneChangedTimer.start()
is called twice when a screen is added, which is probably not what you want.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
}); | ||
connect(qApp, &QGuiApplication::primaryScreenChanged, &m_exclusionZoneChangedTimer, static_cast<void (QTimer::*)()>(&QTimer::start)); | ||
connect(m_window, &QWindow::screenChanged, this, [this](QScreen *nowScreen){ | ||
onPositionChanged(); | ||
m_exclusionZoneChangedTimer.start(); | ||
}); | ||
|
||
connect(qApp, &QGuiApplication::screenRemoved, &m_exclusionZoneChangedTimer, static_cast<void (QTimer::*)()>(&QTimer::start)); |
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.
这种插拔多次, 会重复连接吧,
是不是应该加上Qt::UniqueConnection,
as title Log: as title Pms: BUG-306339
263b6df
to
482efd1
Compare
deepin pr auto review关键摘要:
是否建议立即修改:
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/forcemerge |
This pr force merged! (status: blocked) |
as title
Log: as title
Pms: BUG-306339
Summary by Sourcery
Update exclusion zone handling to trigger recalculation when screens are added or removed
Bug Fixes:
Enhancements: