Connect Kephal signals directly to screenChangedTimer
No need to have a slot for each screen change which only starts the screenChangedTimer.
This commit is contained in:
parent
2b434c3667
commit
a3bed4b7ba
2 changed files with 4 additions and 32 deletions
|
@ -251,10 +251,10 @@ Workspace::Workspace(bool restore)
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
connect(Kephal::Screens::self(), SIGNAL(screenAdded(Kephal::Screen*)), SLOT(screenAdded(Kephal::Screen*)));
|
connect(Kephal::Screens::self(), SIGNAL(screenAdded(Kephal::Screen*)), &screenChangedTimer, SLOT(start()));
|
||||||
connect(Kephal::Screens::self(), SIGNAL(screenRemoved(int)), SLOT(screenRemoved(int)));
|
connect(Kephal::Screens::self(), SIGNAL(screenRemoved(int)), &screenChangedTimer, SLOT(start()));
|
||||||
connect(Kephal::Screens::self(), SIGNAL(screenResized(Kephal::Screen*,QSize,QSize)), SLOT(screenResized(Kephal::Screen*,QSize,QSize)));
|
connect(Kephal::Screens::self(), SIGNAL(screenResized(Kephal::Screen*,QSize,QSize)), &screenChangedTimer, SLOT(start()));
|
||||||
connect(Kephal::Screens::self(), SIGNAL(screenMoved(Kephal::Screen*,QPoint,QPoint)), SLOT(screenMoved(Kephal::Screen*,QPoint,QPoint)));
|
connect(Kephal::Screens::self(), SIGNAL(screenMoved(Kephal::Screen*,QPoint,QPoint)), &screenChangedTimer, SLOT(start()));
|
||||||
|
|
||||||
connect(&activityController_, SIGNAL(currentActivityChanged(QString)), SLOT(updateCurrentActivity(QString)));
|
connect(&activityController_, SIGNAL(currentActivityChanged(QString)), SLOT(updateCurrentActivity(QString)));
|
||||||
connect(&activityController_, SIGNAL(activityRemoved(QString)), SLOT(activityRemoved(QString)));
|
connect(&activityController_, SIGNAL(activityRemoved(QString)), SLOT(activityRemoved(QString)));
|
||||||
|
@ -271,30 +271,6 @@ void Workspace::screenChangeTimeout()
|
||||||
desktopResized();
|
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()
|
void Workspace::init()
|
||||||
{
|
{
|
||||||
#ifdef KWIN_BUILD_SCREENEDGES
|
#ifdef KWIN_BUILD_SCREENEDGES
|
||||||
|
|
|
@ -649,10 +649,6 @@ private slots:
|
||||||
void configureWM();
|
void configureWM();
|
||||||
void desktopResized();
|
void desktopResized();
|
||||||
void screenChangeTimeout();
|
void screenChangeTimeout();
|
||||||
void screenAdded(Kephal::Screen*);
|
|
||||||
void screenRemoved(int);
|
|
||||||
void screenResized(Kephal::Screen*, QSize, QSize);
|
|
||||||
void screenMoved(Kephal::Screen*, QPoint, QPoint);
|
|
||||||
void slotUpdateToolWindows();
|
void slotUpdateToolWindows();
|
||||||
void delayFocus();
|
void delayFocus();
|
||||||
void gotTemporaryRulesMessage(const QString&);
|
void gotTemporaryRulesMessage(const QString&);
|
||||||
|
|
Loading…
Reference in a new issue