diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-05-27 13:41:01 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-05-27 13:52:28 (GMT) |
commit | df4a095019638356520728f88ac4d919e654dcdd (patch) | |
tree | f8044662d2c292b204a11c25fb43272d3cda05de /src/gui/kernel/qapplication_s60.cpp | |
parent | 14b0be5b4eabf7e52a4c3f6d5696aacacb11878b (diff) | |
download | Qt-df4a095019638356520728f88ac4d919e654dcdd.zip Qt-df4a095019638356520728f88ac4d919e654dcdd.tar.gz Qt-df4a095019638356520728f88ac4d919e654dcdd.tar.bz2 |
Modify QDesktopWidget to emit proper signals on resize.
The resize behavior of QDesktopWidget was somewhat undefined on Symbian
because we weren't actually changing the size of the widget. This patch
fixes that and also implements the resizeEvent() function so that it
properly emits signals. We didn't call resize() to change the size here
because our implementation of setGeometry_sys() ignores the desktop
widget since it doesn't have a backing store and isn't a real window.
Task-number: 253930
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index dd51fcd..5b2c1fb 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -14,6 +14,7 @@ #include "qevent.h" #include "qeventdispatcher_s60_p.h" #include "qwidget.h" +#include "qdesktopwidget.h" #include "private/qbackingstore_p.h" #include "qt_s60_p.h" #include "private/qevent_p.h" @@ -49,6 +50,8 @@ static bool appNoGrab = false; // Grabbing enabled Q_GUI_EXPORT QS60Data *qt_s60Data = 0; extern bool qt_sendSpontaneousEvent(QObject*,QEvent*); +extern QDesktopWidget *qt_desktopWidget; // qapplication.cpp + QWidget *qt_button_down = 0; // widget got last button-down bool qt_nograb() // application no-grab option @@ -988,6 +991,13 @@ int QApplication::s60ProcessEvent(TWsEvent *event) case EEventScreenDeviceChanged: if (S60) S60->updateScreenSize(); + if (qt_desktopWidget) { + QSize oldSize = qt_desktopWidget->size(); + qt_desktopWidget->data->crect.setWidth(S60->screenWidthInPixels); + qt_desktopWidget->data->crect.setHeight(S60->screenHeightInPixels); + QResizeEvent e(qt_desktopWidget->size(), oldSize); + QApplication::sendEvent(qt_desktopWidget, &e); + } return 0; // Propagate to CONE case EEventWindowVisibilityChanged: if (controlInMap) { |