summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2011-04-14 10:00:29 (GMT)
committerSami Merila <sami.merila@nokia.com>2011-04-14 10:02:24 (GMT)
commitf4dedf1a4d7e530c715f99327da175cec67d66e4 (patch)
tree56bff6cd0d7f6b315cf8e8aaa20a8de33e8b7cb4
parentc156280a637abd6acb3894723a9e21ba2abc8fb8 (diff)
downloadQt-f4dedf1a4d7e530c715f99327da175cec67d66e4.zip
Qt-f4dedf1a4d7e530c715f99327da175cec67d66e4.tar.gz
Qt-f4dedf1a4d7e530c715f99327da175cec67d66e4.tar.bz2
QGraphicsView with vertical scrollbar flickers when splitview opens
Do windowstate change to fullscreen inside updateEnabled(false) - updateEnabled(true) guard block to avoid flickering of screen area, when keyboard opens in splitview. In worst case, screen is drawn three times: - resize the content area to fit into splitview - change windowstate to fullscreen - ensure visibility of the focusitem by scrolling the view Now, all these happen inside one "update". Task-number: QTBUG-18737 Reviewed-by: Guoqing Zhang
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index b64ce0c..e4b965b 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -531,13 +531,15 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget)
// and greatly reduces event passing in orientation switch cases,
// as the statuspane size is not changing.
+ if (alwaysResize)
+ windowToMove->setUpdatesEnabled(false);
+
if (!(windowToMove->windowState() & Qt::WindowFullScreen)) {
windowToMove->setWindowState(
(windowToMove->windowState() & ~(Qt::WindowMinimized | Qt::WindowFullScreen)) | Qt::WindowFullScreen);
}
if (alwaysResize) {
- windowToMove->setUpdatesEnabled(false);
if (!moveWithinVisibleArea) {
m_splitViewResizeBy = widget->height();
windowTop = widget->geometry().top();
@@ -548,11 +550,13 @@ void QCoeFepInputContext::ensureFocusWidgetVisible(QWidget *widget)
const QRectF microFocusRect = gv->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF();
gv->ensureVisible(microFocusRect);
}
- windowToMove->setUpdatesEnabled(true);
} else {
translateInputWidget();
}
+ if (alwaysResize)
+ windowToMove->setUpdatesEnabled(true);
+
widget->setAttribute(Qt::WA_Resized, userResize); //not a user resize
}