summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-26 12:01:36 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-26 12:01:36 (GMT)
commitf53f18d442629b859dd68ffbc2bae0ec104a9bd2 (patch)
tree095d85946674c2a56c2a552f4b5977f09dae16c7 /src/gui/kernel/qwidget.cpp
parent8a6086b6cc7f535f12f4ac617a9634cf7417c6ff (diff)
parent3604c59a93eae6f27407316e5be3840f87d01711 (diff)
downloadQt-f53f18d442629b859dd68ffbc2bae0ec104a9bd2.zip
Qt-f53f18d442629b859dd68ffbc2bae0ec104a9bd2.tar.gz
Qt-f53f18d442629b859dd68ffbc2bae0ec104a9bd2.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Remove unwanted code after c027f0ae1967ec1d64cb2c9679c8b57f18faf7f5 ActiveQt Internet Explorer component causes Desktop Icons to flicker.
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index d3340df..29ae51f 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -7929,13 +7929,16 @@ inline void setDisabledStyle(QWidget *w, bool setStyle)
// set/reset WS_DISABLED style.
if(w && w->isWindow() && w->isVisible() && w->isEnabled()) {
LONG dwStyle = GetWindowLong(w->winId(), GWL_STYLE);
+ LONG newStyle = dwStyle;
if (setStyle)
- dwStyle |= WS_DISABLED;
+ newStyle |= WS_DISABLED;
else
- dwStyle &= ~WS_DISABLED;
- SetWindowLong(w->winId(), GWL_STYLE, dwStyle);
- // we might need to repaint in some situations (eg. menu)
- w->repaint();
+ newStyle &= ~WS_DISABLED;
+ if (newStyle != dwStyle) {
+ SetWindowLong(w->winId(), GWL_STYLE, newStyle);
+ // we might need to repaint in some situations (eg. menu)
+ w->repaint();
+ }
}
}
#endif