summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 488d9d4..1b21a71 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -78,3 +78,3 @@ using namespace KOrg;
78 78
79#define IDLETIMEOUT 3 79#define IDLETIMEOUT 15
80 80
@@ -577,3 +577,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
577 connect( mAgenda, SIGNAL( updateViewSignal() ), this, SLOT( fillAgenda()) ); 577 connect( mAgenda, SIGNAL( updateViewSignal() ), this, SLOT( fillAgenda()) );
578 578
579 connect( mAllDayAgenda, SIGNAL( sendPing() ),this, SLOT( startIdleTimeout()) );
580 connect( mAgenda, SIGNAL( sendPing() ), this, SLOT( startIdleTimeout()) );
581
582
579 mIdleTimer = new QTimer ( this );; 583 mIdleTimer = new QTimer ( this );;
@@ -581,2 +585,7 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
581} 585}
586void KOAgendaView::startIdleTimeout()
587{
588 mIdleStart = QDateTime::currentDateTime();
589 mIdleTimer->start( IDLETIMEOUT * 1000 );
590}
582void KOAgendaView::slotIdleTimeout() 591void KOAgendaView::slotIdleTimeout()
@@ -587,7 +596,7 @@ void KOAgendaView::slotIdleTimeout()
587 bool isActice = topLevelWidget()->isActiveWindow(); 596 bool isActice = topLevelWidget()->isActiveWindow();
588 qDebug("KO: Active Window %d ", isActice); 597 qDebug("KO: Active Window %d %d", isActice, isVisible());
589 // we do nothing if we wake up from a suspend 598 // we do nothing if we wake up from a suspend
590 if ( secsfromstart > IDLETIMEOUT + 50 && isActice ) { 599 if ( secsfromstart > IDLETIMEOUT + 30 && isActice ) {
591 qDebug("KO: Wakeup from suspend "); 600 qDebug("KO: Wakeup from suspend ");
592 mIdleTimer->start( IDLETIMEOUT * 1000 ); 601 startIdleTimeout();
593 return; 602 return;
@@ -1323,4 +1332,3 @@ void KOAgendaView::fillAgenda()
1323 repaintAgenda(); 1332 repaintAgenda();
1324 mIdleTimer->start ( IDLETIMEOUT *1000 ); 1333 startIdleTimeout();
1325 mIdleStart = QDateTime::currentDateTime();
1326 onlyOne = false; 1334 onlyOne = false;