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
03a27a00
Commit
03a27a00
authored
Sep 30, 2020
by
Fang Tan
Browse files
The client may have closed itself here,will cause kwin to crash
parent
5e6c81ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
effects/screenshot/screenshot.cpp
View file @
03a27a00
...
...
@@ -491,6 +491,11 @@ void ScreenShotEffect::screenshotWindowUnderCursor(int mask)
return
;
}
m_type
=
(
ScreenShotType
)
mask
;
scheduleScreenshotWindowUnderCursor
();
}
void
ScreenShotEffect
::
scheduleScreenshotWindowUnderCursor
()
{
const
QPoint
cursor
=
effects
->
cursorPos
();
EffectWindowList
order
=
effects
->
stackingOrder
();
EffectWindowList
::
const_iterator
it
=
order
.
constEnd
(),
first
=
order
.
constBegin
();
...
...
@@ -863,7 +868,7 @@ void ScreenShotEffect::windowClosed( EffectWindow* w )
{
if
(
w
==
m_scheduledScreenshot
)
{
m_scheduledScreenshot
=
nullptr
;
screenshotWindowUnderCursor
(
m_type
);
sc
heduleSc
reenshotWindowUnderCursor
();
}
}
...
...
effects/screenshot/screenshot.h
View file @
03a27a00
...
...
@@ -49,6 +49,7 @@ public:
static
bool
supported
();
static
void
convertFromGLImage
(
QImage
&
img
,
int
w
,
int
h
);
void
scheduleScreenshotWindowUnderCursor
();
public
Q_SLOTS
:
Q_SCRIPTABLE
void
screenshotForWindow
(
qulonglong
winid
,
int
mask
=
0
);
/**
...
...
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