From 291e3afae4c3018084aa785c48be13a4f9cffd57 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Mon, 17 Dec 2007 18:26:38 +0000 Subject: [PATCH] respond to xrandr changes for *all* containments on the affected screen svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=749729 --- corona.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/corona.cpp b/corona.cpp index 292ce1b83..15faf9a97 100644 --- a/corona.cpp +++ b/corona.cpp @@ -443,14 +443,19 @@ void Corona::containmentDestroyed(QObject* obj) void Corona::screenResized(int screen) { + bool desktopFound = false; foreach (Containment *c, d->containments) { if (c->screen() == screen) { // trigger a relayout c->setScreen(screen); - return; + desktopFound = desktopFound || c->containmentType() == Containment::DesktopContainment; } } + if (desktopFound) { + 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