Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Workspace
Commits
40c7390b
Commit
40c7390b
authored
Apr 09, 2021
by
Niccolò Venerandi
Committed by
Nate Graham
Apr 23, 2021
Browse files
Add a -1 to make the mouse input not redirect to a margin pixel.
BUG: 413736
FIXED-IN: 5.22 (cherry picked from commit
111819e1
)
parent
5c7c4a7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
shell/panelview.cpp
View file @
40c7390b
...
...
@@ -1021,9 +1021,12 @@ QPointF PanelView::positionAdjustedForContainment(const QPointF &point) const
}
QRectF
containmentRect
(
containmentItem
->
mapToScene
(
QPoint
(
0
,
0
)),
QSizeF
(
containmentItem
->
width
(),
containmentItem
->
height
()));
return
QPointF
(
qBound
(
containmentRect
.
left
()
+
m_leftPadding
,
point
.
x
(),
containmentRect
.
right
()
-
m_rightPadding
),
qBound
(
containmentRect
.
top
()
+
m_topPadding
,
point
.
y
(),
containmentRect
.
bottom
()
-
m_bottomPadding
));
// We are removing 1 to the e.g. containmentRect.right() - m_rightPadding because the last pixel would otherwise
// the first one in the margin, and thus the mouse event would be discarded. Instead, the first pixel given by
// containmentRect.left() + m_leftPadding the first one *not* in the margin, so it work.
return
QPointF
(
qBound
(
containmentRect
.
left
()
+
m_leftPadding
,
point
.
x
(),
containmentRect
.
right
()
-
m_rightPadding
-
1
),
qBound
(
containmentRect
.
top
()
+
m_topPadding
,
point
.
y
(),
containmentRect
.
bottom
()
-
m_bottomPadding
-
1
));
}
void
PanelView
::
updateMask
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment