Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
54313d32
Commit
54313d32
authored
Jan 18, 2021
by
Vlad Zahorodnii
Browse files
effects/magnifier: Schedule a repaint when window is damaged
This is needed to make per-screen rendering work correctly.
BUG: 431652
parent
35e254a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
effects/magnifier/magnifier.cpp
View file @
54313d32
...
...
@@ -58,6 +58,7 @@ MagnifierEffect::MagnifierEffect()
effects
->
registerGlobalShortcut
(
Qt
::
META
+
Qt
::
Key_0
,
a
);
connect
(
effects
,
&
EffectsHandler
::
mouseChanged
,
this
,
&
MagnifierEffect
::
slotMouseChanged
);
connect
(
effects
,
&
EffectsHandler
::
windowDamaged
,
this
,
&
MagnifierEffect
::
slotWindowDamaged
);
reconfigure
(
ReconfigureAll
);
}
...
...
@@ -332,6 +333,13 @@ void MagnifierEffect::slotMouseChanged(const QPoint& pos, const QPoint& old,
effects
->
addRepaintFull
();
}
void
MagnifierEffect
::
slotWindowDamaged
()
{
if
(
isActive
())
{
effects
->
addRepaint
(
magnifierArea
());
}
}
bool
MagnifierEffect
::
isActive
()
const
{
return
zoom
!=
1.0
||
zoom
!=
target_zoom
;
...
...
effects/magnifier/magnifier.h
View file @
54313d32
...
...
@@ -50,6 +50,7 @@ private Q_SLOTS:
void
slotMouseChanged
(
const
QPoint
&
pos
,
const
QPoint
&
old
,
Qt
::
MouseButtons
buttons
,
Qt
::
MouseButtons
oldbuttons
,
Qt
::
KeyboardModifiers
modifiers
,
Qt
::
KeyboardModifiers
oldmodifiers
);
void
slotWindowDamaged
();
void
destroyPixmap
();
private:
QRect
magnifierArea
(
QPoint
pos
=
cursorPos
())
const
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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