summaryrefslogtreecommitdiffstats
path: root/kcontrol/randr/krandrapp.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-01-06 19:44:37 -0600
committerTimothy Pearson <[email protected]>2012-01-06 19:44:37 -0600
commitf2ef0ca599f2e400b75c1f15bd379647a436bc54 (patch)
treeb1d34c7b64db708061e7c4d521724e6b5679b312 /kcontrol/randr/krandrapp.cpp
parent0e63b78065481b7320982840fe93f89a59e4a81a (diff)
downloadtdebase-f2ef0ca599f2e400b75c1f15bd379647a436bc54.tar.gz
tdebase-f2ef0ca599f2e400b75c1f15bd379647a436bc54.zip
Implement X11 event merging in krandrtray
This closes Bug 758
Diffstat (limited to 'kcontrol/randr/krandrapp.cpp')
-rw-r--r--kcontrol/randr/krandrapp.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/kcontrol/randr/krandrapp.cpp b/kcontrol/randr/krandrapp.cpp
index 2d773dd22..eab459e8e 100644
--- a/kcontrol/randr/krandrapp.cpp
+++ b/kcontrol/randr/krandrapp.cpp
@@ -28,13 +28,20 @@
KRandRApp::KRandRApp()
: m_tray(new KRandRSystemTray(0L, "RANDRTray"))
{
+ connect(&m_eventMergingTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(handleX11ConfigChangeEvent()));
m_tray->show();
}
+void KRandRApp::handleX11ConfigChangeEvent()
+{
+ m_eventMergingTimer.stop();
+ m_tray->configChanged();
+}
+
bool KRandRApp::x11EventFilter(XEvent* e)
{
if (e->type == m_tray->screenChangeNotifyEvent()) {
- m_tray->configChanged();
+ m_eventMergingTimer.start(1000, TRUE);
}
return KApplication::x11EventFilter( e );
}