rough in what should be screen hotplug detection, once QDesktopWidget gets it stuff together

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=742393
This commit is contained in:
Aaron J. Seigo 2007-11-27 22:55:09 +00:00
parent 3166344116
commit 0b2c1b481f
2 changed files with 19 additions and 1 deletions

View File

@ -439,8 +439,18 @@ void Corona::screenResized(int screen)
if (c->screen() == screen) {
// trigger a relayout
c->setScreen(screen);
return;
}
}
// a new screen appeared. neat.
// FIXME: apparently QDesktopWidget doesn't do the Right Thing when a new screen is plugged in
// at runtime. seems it gets confused and thinks it's all one big screen? need to
// fix this upstream
Containment* c = addContainment("desktop");
c->setScreen(screen);
c->setFormFactor(Plasma::Planar);
emit newScreen(screen);
}
bool Corona::isImmutable() const

View File

@ -166,10 +166,18 @@ public Q_SLOTS:
Q_SIGNALS:
/**
* This signal indicates, that a application launch was triggered
* This signal indicates that a application launch was triggered
*/
void launchActivated();
/**
* This signal indicates that a new screen is being handled
* at runtime (e.g. after first creation)
*
* @param screen the xinerama number of the new screen
*/
void newScreen(int screen);
protected:
void dragEnterEvent(QGraphicsSceneDragDropEvent* event);
void dragLeaveEvent(QGraphicsSceneDragDropEvent* event);