ScreenshotEffect: don't expect authorization for interactive screenshots
This commit is contained in:
parent
fee696ec88
commit
fe41af9e50
1 changed files with 12 additions and 2 deletions
|
@ -548,9 +548,14 @@ bool ScreenShotEffect::checkCall() const
|
|||
|
||||
QString ScreenShotEffect::interactive(int mask)
|
||||
{
|
||||
if (!checkCall()) {
|
||||
if (!calledFromDBus()) {
|
||||
return QString();
|
||||
}
|
||||
if (isTakingScreenshot()) {
|
||||
sendErrorReply(s_errorAlreadyTaking, s_errorAlreadyTakingMsg);
|
||||
return QString();
|
||||
}
|
||||
|
||||
m_type = (ScreenShotType) mask;
|
||||
m_windowMode = WindowMode::File;
|
||||
m_replyMessage = message();
|
||||
|
@ -574,9 +579,14 @@ QString ScreenShotEffect::interactive(int mask)
|
|||
|
||||
void ScreenShotEffect::interactive(QDBusUnixFileDescriptor fd, int mask)
|
||||
{
|
||||
if (!checkCall()) {
|
||||
if (!calledFromDBus()) {
|
||||
return;
|
||||
}
|
||||
if (isTakingScreenshot()) {
|
||||
sendErrorReply(s_errorAlreadyTaking, s_errorAlreadyTakingMsg);
|
||||
return;
|
||||
}
|
||||
|
||||
m_fd = dup(fd.fileDescriptor());
|
||||
if (m_fd == -1) {
|
||||
sendErrorReply(s_errorFd, s_errorFdMsg);
|
||||
|
|
Loading…
Reference in a new issue