summaryrefslogtreecommitdiffstats
path: root/kdesktop
diff options
context:
space:
mode:
Diffstat (limited to 'kdesktop')
-rw-r--r--kdesktop/lock/lockprocess.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index aa68ba1a0..c08c4d424 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -1845,8 +1845,9 @@ bool LockProcess::checkPass()
// Wait for SAK press before continuing...
SAKDlg inDlg( this );
execDialog( &inDlg );
- if (trinity_desktop_lock_closing_windows)
+ if (trinity_desktop_lock_closing_windows) {
return 0;
+ }
}
showVkbd();
@@ -2028,7 +2029,9 @@ void LockProcess::cleanupPopup()
{
TQWidget *dlg = (TQWidget *)sender();
mDialogs.remove( dlg );
- fakeFocusIn( mDialogs.first()->winId() );
+ if ( mDialogs.isEmpty() ) {
+ fakeFocusIn( mDialogs.first()->winId() );
+ }
}
void LockProcess::doFunctionKeyBroadcast() {
@@ -2547,7 +2550,7 @@ void LockProcess::slotMouseActivity(XEvent *event)
bool inDialog = 0;
XButtonEvent *be = (XButtonEvent *) event;
XMotionEvent *me = (XMotionEvent *) event;
- if ((event->type == ButtonPress) && (mDialogs.first())) {
+ if ((event->type == ButtonPress) && (!mDialogs.isEmpty())) {
// Get geometry including window frame/titlebar
TQRect fgeom = mDialogs.first()->frameGeometry();
TQRect wgeom = mDialogs.first()->geometry();
@@ -2588,7 +2591,7 @@ void LockProcess::slotMouseActivity(XEvent *event)
int deltaY = me->y_root - m_mousePrevY;
m_dialogPrevX = m_dialogPrevX + deltaX;
m_dialogPrevY = m_dialogPrevY + deltaY;
- if (mDialogs.first()) mDialogs.first()->move(m_dialogPrevX, m_dialogPrevY);
+ if (!mDialogs.isEmpty()) mDialogs.first()->move(m_dialogPrevX, m_dialogPrevY);
m_mousePrevX = me->x_root;
m_mousePrevY = me->y_root;