From a3bed4b7baf5707fc12956a7900f4f872bf4996a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 31 Dec 2011 15:01:41 +0100 Subject: [PATCH] Connect Kephal signals directly to screenChangedTimer No need to have a slot for each screen change which only starts the screenChangedTimer. --- workspace.cpp | 32 ++++---------------------------- workspace.h | 4 ---- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index f339422b7d..5f0273f9fd 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -251,10 +251,10 @@ Workspace::Workspace(bool restore) init(); - connect(Kephal::Screens::self(), SIGNAL(screenAdded(Kephal::Screen*)), SLOT(screenAdded(Kephal::Screen*))); - connect(Kephal::Screens::self(), SIGNAL(screenRemoved(int)), SLOT(screenRemoved(int))); - connect(Kephal::Screens::self(), SIGNAL(screenResized(Kephal::Screen*,QSize,QSize)), SLOT(screenResized(Kephal::Screen*,QSize,QSize))); - connect(Kephal::Screens::self(), SIGNAL(screenMoved(Kephal::Screen*,QPoint,QPoint)), SLOT(screenMoved(Kephal::Screen*,QPoint,QPoint))); + connect(Kephal::Screens::self(), SIGNAL(screenAdded(Kephal::Screen*)), &screenChangedTimer, SLOT(start())); + connect(Kephal::Screens::self(), SIGNAL(screenRemoved(int)), &screenChangedTimer, SLOT(start())); + connect(Kephal::Screens::self(), SIGNAL(screenResized(Kephal::Screen*,QSize,QSize)), &screenChangedTimer, SLOT(start())); + connect(Kephal::Screens::self(), SIGNAL(screenMoved(Kephal::Screen*,QPoint,QPoint)), &screenChangedTimer, SLOT(start())); connect(&activityController_, SIGNAL(currentActivityChanged(QString)), SLOT(updateCurrentActivity(QString))); connect(&activityController_, SIGNAL(activityRemoved(QString)), SLOT(activityRemoved(QString))); @@ -271,30 +271,6 @@ void Workspace::screenChangeTimeout() desktopResized(); } -void Workspace::screenAdded(Kephal::Screen* screen) -{ - kDebug(); - screenChangedTimer.start(); -} - -void Workspace::screenRemoved(int screen) -{ - kDebug(); - screenChangedTimer.start(); -} - -void Workspace::screenResized(Kephal::Screen* screen, QSize old, QSize newSize) -{ - kDebug(); - screenChangedTimer.start(); -} - -void Workspace::screenMoved(Kephal::Screen* screen, QPoint old, QPoint newPos) -{ - kDebug(); - screenChangedTimer.start(); -} - void Workspace::init() { #ifdef KWIN_BUILD_SCREENEDGES diff --git a/workspace.h b/workspace.h index 60693243d4..6e9ce15365 100644 --- a/workspace.h +++ b/workspace.h @@ -649,10 +649,6 @@ private slots: void configureWM(); void desktopResized(); void screenChangeTimeout(); - void screenAdded(Kephal::Screen*); - void screenRemoved(int); - void screenResized(Kephal::Screen*, QSize, QSize); - void screenMoved(Kephal::Screen*, QPoint, QPoint); void slotUpdateToolWindows(); void delayFocus(); void gotTemporaryRulesMessage(const QString&);