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
111819e1
Commit
111819e1
authored
Apr 09, 2021
by
Niccolò Venerandi
Browse files
Add a -1 to make the mouse input not redirect to a margin pixel.
BUG: 413736
FIXED-IN: 5.22
parent
c1b9f3fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
shell/panelview.cpp
View file @
111819e1
...
...
@@ -1056,9 +1056,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
()
...
...
Niccolò Venerandi
@niccolove
mentioned in commit
40c7390b
·
Apr 23, 2021
mentioned in commit
40c7390b
mentioned in commit 40c7390b85855b0a8685888a1bb30c9b3e81c23d
Toggle commit list
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