summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp2
-rw-r--r--src/gui/kernel/qcursor.cpp3
-rw-r--r--src/gui/kernel/qdesktopwidget_s60.cpp1
-rw-r--r--src/gui/kernel/qt_s60_p.h4
-rw-r--r--src/gui/kernel/qwidget_mac.mm6
-rw-r--r--src/gui/kernel/qwidget_s60.cpp24
6 files changed, 33 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index ccc39c9..4a15cf2 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1034,7 +1034,7 @@ void QSymbianControl::HandleResourceChange(int resourceType)
qwidget->adjustSize();
qwidget->setAttribute(Qt::WA_Resized, false); //not a user resize
}
- if (!qwidget->testAttribute(Qt::WA_Moved)) {
+ if (!qwidget->testAttribute(Qt::WA_Moved) && qwidget->windowType() != Qt::Dialog) {
TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
SetPosition(r.iTl);
qwidget->setAttribute(Qt::WA_Moved, false); // not really an explicit position
diff --git a/src/gui/kernel/qcursor.cpp b/src/gui/kernel/qcursor.cpp
index f38e4f5..ae1f60d 100644
--- a/src/gui/kernel/qcursor.cpp
+++ b/src/gui/kernel/qcursor.cpp
@@ -348,7 +348,8 @@ QCursor::QCursor(const QPixmap &pixmap, int hotX, int hotY)
\o B=1 and M=1 gives black.
\o B=0 and M=1 gives white.
\o B=0 and M=0 gives transparent.
- \o B=1 and M=0 gives an XOR'd result.
+ \o B=1 and M=0 gives an XOR'd result under Windows, undefined
+ results on all other platforms.
\endlist
Use the global Qt color Qt::color0 to draw 0-pixels and Qt::color1 to
diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp
index 84e3c5d..e4d0bf3 100644
--- a/src/gui/kernel/qdesktopwidget_s60.cpp
+++ b/src/gui/kernel/qdesktopwidget_s60.cpp
@@ -88,6 +88,7 @@ QDesktopWidgetPrivate::~QDesktopWidgetPrivate()
void QDesktopWidgetPrivate::init(QDesktopWidget *that)
{
+ Q_UNUSED(that);
// int screenCount=0;
// ### TODO: Implement proper multi-display support
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 735ca7a..cedede1 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -68,12 +68,12 @@
#include <eikappui.h>
#ifdef Q_WS_S60
-#include <aknutils.h> // AknLayoutUtils
+#include <AknUtils.h> // AknLayoutUtils
#include <avkon.hrh> // EEikStatusPaneUidTitle
#include <akntitle.h> // CAknTitlePane
#include <akncontext.h> // CAknContextPane
#include <eikspane.h> // CEikStatusPane
-#include <aknpopupfader.h> // MAknFadedComponent and TAknPopupFader
+#include <AknPopupFader.h> // MAknFadedComponent and TAknPopupFader
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index 4b45abd..a0e4050 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -4783,8 +4783,10 @@ void QWidgetPrivate::syncCocoaMask()
if (!q->testAttribute(Qt::WA_WState_Created) || !extra)
return;
- if (extra->hasMask && extra->maskBits.size() != q->size()) {
- extra->maskBits = QImage(q->size(), QImage::Format_Mono);
+ if (extra->hasMask) {
+ if(extra->maskBits.size() != q->size()) {
+ extra->maskBits = QImage(q->size(), QImage::Format_Mono);
+ }
extra->maskBits.fill(QColor(Qt::color1).rgba());
extra->maskBits.setNumColors(2);
extra->maskBits.setColor(0, QColor(Qt::color0).rgba());
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 7fb21d2..79702af 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1037,6 +1037,17 @@ QPoint QWidget::mapFromGlobal(const QPoint &pos) const
return widgetPos;
}
+static Qt::WindowStates effectiveState(Qt::WindowStates state)
+{
+ if (state & Qt::WindowMinimized)
+ return Qt::WindowMinimized;
+ else if (state & Qt::WindowFullScreen)
+ return Qt::WindowFullScreen;
+ else if (state & Qt::WindowMaximized)
+ return Qt::WindowMaximized;
+ return Qt::WindowNoState;
+}
+
void QWidget::setWindowState(Qt::WindowStates newstate)
{
Q_D(QWidget);
@@ -1052,6 +1063,8 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
return;
if (isWindow()) {
+ const bool wasResized = testAttribute(Qt::WA_Resized);
+ const bool wasMoved = testAttribute(Qt::WA_Moved);
QSymbianControl *window = static_cast<QSymbianControl *>(effectiveWinId());
if (window && newstate & Qt::WindowMinimized) {
@@ -1090,7 +1103,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
createWinId();
Q_ASSERT(testAttribute(Qt::WA_WState_Created));
// Ensure the initial size is valid, since we store it as normalGeometry below.
- if (!testAttribute(Qt::WA_Resized) && !isVisible())
+ if (!wasResized && !isVisible())
adjustSize();
QTLWExtra *top = d->topData();
@@ -1105,6 +1118,15 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
//restore normal geometry
top->normalGeometry = normalGeometry;
+
+ // FixMe QTBUG-8977
+ // In some platforms, WA_Resized and WA_Moved are also not set when application window state is
+ // anything else than normal. In Symbian we can restore them only for normal window state since
+ // restoring for other modes, will make fluidlauncher to be launched in wrong size (200x100)
+ if (effectiveState(newstate) == Qt::WindowNoState) {
+ setAttribute(Qt::WA_Resized, wasResized);
+ setAttribute(Qt::WA_Moved, wasMoved);
+ }
}
data->window_state = newstate;