summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop/lock')
-rw-r--r--kdesktop/lock/lockprocess.cc18
-rw-r--r--kdesktop/lock/lockprocess.h1
2 files changed, 17 insertions, 2 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index 685864d10..ecad13177 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -137,7 +137,8 @@ LockProcess::LockProcess(bool child, bool useBlankOnly)
mPipeOpen(false),
mPipeOpen_out(false),
mInfoMessageDisplayed(false),
- mForceReject(false)
+ mForceReject(false),
+ mDialogControLock(false);
{
setupSignals();
setupPipe();
@@ -293,20 +294,24 @@ void LockProcess::checkPipe()
if (numread > 0) {
if (readbuf[0] == 'C') {
mInfoMessageDisplayed=false;
+ mDialogControLock = true;
if (currentDialog != NULL) {
mForceReject = true;
currentDialog->close();
}
+ mDialogControLock = false;
}
if (readbuf[0] == 'T') {
to_display = readbuf;
to_display = to_display.remove(0,1);
// Lock out password dialogs and close any active dialog
mInfoMessageDisplayed=true;
+ mDialogControLock = true;
if (currentDialog != NULL) {
mForceReject = true;
currentDialog->close();
}
+ mDialogControLock = false;
// Display info message dialog
QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
InfoDlg inDlg( this );
@@ -321,10 +326,12 @@ void LockProcess::checkPipe()
to_display = to_display.remove(0,1);
// Lock out password dialogs and close any active dialog
mInfoMessageDisplayed=true;
+ mDialogControLock = true;
if (currentDialog != NULL) {
mForceReject = true;
currentDialog->close();
}
+ mDialogControLock = false;
// Display info message dialog
QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
InfoDlg inDlg( this );
@@ -342,10 +349,12 @@ void LockProcess::checkPipe()
to_display = to_display.remove(0,1);
// Lock out password dialogs and close any active dialog
mInfoMessageDisplayed=true;
+ mDialogControLock = true;
if (currentDialog != NULL) {
mForceReject = true;
currentDialog->close();
}
+ mDialogControLock = false;
// Display query dialog
QTimer::singleShot( PIPE_CHECK_INTERVAL, this, SLOT(checkPipe()) );
QueryDlg qryDlg( this );
@@ -646,10 +655,12 @@ void LockProcess::createSaverWindow()
void LockProcess::desktopResized()
{
+ mDialogControLock = true;
if (currentDialog != NULL) {
mForceReject = true;
currentDialog->close();
}
+ mDialogControLock = false;
// Get root window size
XWindowAttributes rootAttr;
@@ -1142,6 +1153,10 @@ int LockProcess::execDialog( QDialog *dlg )
mDialogs.prepend( dlg );
fakeFocusIn( dlg->winId());
int rt = dlg->exec();
+ while (mDialogControLock == true) {
+ sleep(1);
+ }
+ currentDialog = NULL;
mDialogs.remove( dlg );
if( mDialogs.isEmpty() ) {
XChangeActivePointerGrab( qt_xdisplay(), GRABEVENTS,
@@ -1149,7 +1164,6 @@ int LockProcess::execDialog( QDialog *dlg )
resume( false );
} else
fakeFocusIn( mDialogs.first()->winId());
- currentDialog = NULL;
return rt;
}
diff --git a/kdesktop/lock/lockprocess.h b/kdesktop/lock/lockprocess.h
index ee1621bc8..91d7658b2 100644
--- a/kdesktop/lock/lockprocess.h
+++ b/kdesktop/lock/lockprocess.h
@@ -135,6 +135,7 @@ private:
bool mAutoLogout;
bool mInfoMessageDisplayed;
QDialog *currentDialog;
+ bool mDialogControLock;
bool mForceReject;
bool mPipeOpen;