summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/clipboardapplet/clipboard.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp
index 4fbdf6f..3099a84 100644
--- a/core/applets/clipboardapplet/clipboard.cpp
+++ b/core/applets/clipboardapplet/clipboard.cpp
@@ -127,13 +127,13 @@ ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget(
connect ( QApplication::clipboard ( ), SIGNAL( dataChanged ( )), this, SLOT( newData ( )));
connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( newData ( )));
connect ( qApp, SIGNAL( aboutToQuit ( )), this, SLOT( shutdown ( )));
- m_timer-> start ( 1500 );
-
m_menu = 0;
m_dirty = true;
m_lasttext = QString::null;
+
+ m_timer-> start ( 0, true );
}
ClipboardApplet::~ClipboardApplet ( )
{
@@ -227,8 +227,17 @@ void ClipboardApplet::paintEvent ( QPaintEvent* )
}
void ClipboardApplet::newData ( )
{
+ static bool excllock = false;
+
+ if ( excllock )
+ return;
+ else
+ excllock = true;
+
+ m_timer-> stop ( );
+
QCString type = "plain";
QString txt = QApplication::clipboard ( )-> text ( type );
if ( !txt. isEmpty ( ) && !m_history. contains ( txt )) {
@@ -238,5 +247,9 @@ void ClipboardApplet::newData ( )
m_history. remove ( m_history. begin ( ));
m_dirty = true;
}
+
+ m_timer-> start ( 1500, true );
+
+ excllock = false;
}