diff options
author | Volker Hilsheimer <volker.hilsheimer@nokia.com> | 2009-07-17 13:40:49 (GMT) |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@nokia.com> | 2009-07-17 13:43:50 (GMT) |
commit | 13254da6c3192937812983f44ce95fe8e1bc602c (patch) | |
tree | 72a1959c25a9ee9f133fad81bf9ee9f3d5b90696 /src/gui/kernel/qapplication_x11.cpp | |
parent | 83d9c5978fd5089457a28f16be6d26b047d80b7d (diff) | |
download | Qt-13254da6c3192937812983f44ce95fe8e1bc602c.zip Qt-13254da6c3192937812983f44ce95fe8e1bc602c.tar.gz Qt-13254da6c3192937812983f44ce95fe8e1bc602c.tar.bz2 |
Implement QDesktopWidget::screenCountChanged signal on desktop platforms,
and add manual testcase.
Provide replacement "screenCount" for numScreens and document numScreens
as obsolete to be more consistent with other APIs.
Diffstat (limited to 'src/gui/kernel/qapplication_x11.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_x11.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index cc41299..a07ccdd 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -3441,19 +3441,10 @@ int QApplication::x11ProcessEvent(XEvent* event) QSize oldSize(w->size()); w->data->crect.setWidth(DisplayWidth(X11->display, scr)); w->data->crect.setHeight(DisplayHeight(X11->display, scr)); - QVarLengthArray<QRect> oldSizes(desktop->numScreens()); - for (int i = 0; i < desktop->numScreens(); ++i) - oldSizes[i] = desktop->screenGeometry(i); QResizeEvent e(w->size(), oldSize); QApplication::sendEvent(w, &e); - for (int i = 0; i < qMin(oldSizes.count(), desktop->numScreens()); ++i) { - if (oldSizes[i] != desktop->screenGeometry(i)) - emit desktop->resized(i); - } - for (int i = oldSizes.count(); i < desktop->numScreens(); ++i) - emit desktop->resized(i); // added - for (int i = desktop->numScreens(); i < oldSizes.count(); ++i) - emit desktop->resized(i); // removed + if (w != desktop) + QApplication::sendEvent(desktop, &e); } #endif // QT_NO_XRANDR |