[meego-commits] 7952: Changes to MeeGo:1.1:Core:Testing/libmeegotouch
Kaitlin Rupert
no_reply at build.meego.com
Wed Sep 29 23:38:27 UTC 2010
Hi,
I have made the following changes to libmeegotouch in project MeeGo:1.1:Core:Testing. Please review and accept ASAP.
Thank You,
Kaitlin Rupert
[This message was auto-generated]
---
Request #7952:
submit: devel:qt-mtf:stable/libmeegotouch(r5) -> MeeGo:1.1:Core:Testing/libmeegotouch
Message:
* Tue Sep 28 2010 Kaitlin Rupert <kaitlin.rupert at intel.com> 0.20.25
- BMC#7326 - hide status bar when virtual keyboard launches
Using devel:qt-mtf:stable to stage MeeGo:1.1:Core:Testing updates.
State: new 2010-09-29T16:38:27 krupert
Comment: None
changes files:
--------------
--- libmeegotouch.changes
+++ libmeegotouch.changes
@@ -0,0 +1,3 @@
+* Tue Sep 28 2010 Kaitlin Rupert <kaitlin.rupert at intel.com> 0.20.25
+- BMC#7326 - hide status bar when virtual keyboard launches
+
new:
----
hide_status_bar_for_vkb.patch
spec files:
-----------
--- libmeegotouch.spec
+++ libmeegotouch.spec
@@ -27,6 +27,7 @@
Patch10: re-enable_code_to_set_orientation.patch
Patch11: include_order.patch
Patch12: arm_ftbfs_egl.patch
+Patch13: hide_status_bar_for_vkb.patch
Requires: meegotouch-theme >= 0.20.14
Requires(pre): GConf2
Requires(preun): GConf2
@@ -109,6 +110,8 @@
%patch11 -p1
# arm_ftbfs_egl.patch
%patch12 -p1
+# hide_status_bar_for_vkb.patch
+%patch13 -p1
# >> setup
# << setup
other changes:
--------------
++++++ hide_status_bar_for_vkb.patch (new)
--- hide_status_bar_for_vkb.patch
+++ hide_status_bar_for_vkb.patch
+From 066cc7793dfdad55a34b47a46e6f2ffa22c99104 Mon Sep 17 00:00:00 2001
+From: Jarno Malmari <ext-jarno.malmari at nokia.com>
+Date: Tue, 29 Jun 2010 17:56:39 +0300
+Subject: [PATCH] New: Status bar hides when virtual keyboard comes up.
+
+RevBy: Daniel d'Andrada, Michael Hasselmann, Dominik Kapusta
+Details: Status bar and other navigation control hiding is moved to
+MApplicationWindow. This restricts the functionality to apply only to
+MApplicationWindow and not plain MWindows that can have status bar via
+an MWindowDecorator. Currently the only common place for this hiding
+logic would be in MSceneManager but it cannot take control over its
+scene window's appearance statuses.
+
+Workarounds have been suggested, such as hiding the necessary scene windows
+in scene manager without touching their appearance status but windows can
+only be hidden this way. Not shown.
+
+Status bar hiding needs to work together with fullscreen mode and phone
+calls (which make status bar always appear).
+---
+ src/corelib/scene/mscenemanager.cpp | 89 ++++-------
+ src/corelib/scene/mscenemanager.h | 3 +-
+ src/corelib/scene/mscenemanager_p.h | 10 +-
+ src/corelib/widgets/mapplicationwindow.cpp | 161 +++++++++++++++-----
+ src/corelib/widgets/mapplicationwindow.h | 1 +
+ src/corelib/widgets/mapplicationwindow_p.h | 16 ++-
+ .../ut_mapplicationwindow.cpp | 75 +++++++++
+ .../ut_mapplicationwindow/ut_mapplicationwindow.h | 13 ++
+ tests/ut_mscenemanager/ut_mscenemanager.cpp | 1 -
+ 9 files changed, 260 insertions(+), 109 deletions(-)
+
+diff --git a/src/corelib/scene/mscenemanager.cpp b/src/corelib/scene/mscenemanager.cpp
+index 5fef282..4cc4683 100644
+--- a/src/corelib/scene/mscenemanager.cpp
++++ b/src/corelib/scene/mscenemanager.cpp
+@@ -40,8 +40,6 @@
+ #include "mscenelayereffect.h"
+ #include "mnavigationbar.h"
+ #include "mdockwidget.h"
+-#include "mescapebuttonpanel.h"
+-#include "mescapebuttonpanelmodel.h"
+ #include "mobjectmenu.h"
+ #include "mapplication.h"
+ #include "mwindow.h"
+@@ -78,11 +76,7 @@ void MSceneManagerPrivate::init(MScene *scene)
+
+ this->scene = scene;
+
+- navBar = 0;
+- escapeButtonPanel = 0;
+ currentPage = 0;
+- navBarHidden = false;
+- escapeButtonHidden = false;
+
+ focusedInputWidget = 0;
+ alteredSceneWindow = 0;
+@@ -112,7 +106,7 @@ void MSceneManagerPrivate::init(MScene *scene)
+ // This also implies that the software input panel could come up without an explicit request
+ // from the application side.
+ q->connect(MInputMethodState::instance(), SIGNAL(inputMethodAreaChanged(QRect)),
+- q, SLOT(_q_relocateWindowByInputPanel(QRect)),
++ q, SLOT(_q_inputPanelAreaChanged(const QRect &)),
+ Qt::UniqueConnection);
+
+ q->connect(q, SIGNAL(orientationChangeFinished(M::Orientation)),
+@@ -439,7 +433,16 @@ void MSceneManagerPrivate::_q_onPageSwitchAnimationFinished()
+ applySceneWindowTransitionsFromPageSwitchQueue();
+ }
+
+-void MSceneManagerPrivate::_q_relocateWindowByInputPanel(const QRect &inputPanelRect)
++void MSceneManagerPrivate::_q_inputPanelAreaChanged(const QRect &panelRect)
++{
++ if (panelRect.isEmpty()) {
++ restoreSceneWindow();
++ } else {
++ relocateWindowByInputPanel(panelRect);
++ }
++}
++
++void MSceneManagerPrivate::relocateWindowByInputPanel(const QRect &inputPanelRect)
+ {
+ Q_Q(MSceneManager);
+
+@@ -450,11 +453,21 @@ void MSceneManagerPrivate::_q_relocateWindowByInputPanel(const QRect &inputPanel
+ }
+
+ // This method is not responsible for restoring visibility when the input panel is closed -
+- // _q_inputPanelClosed() does that. Therefore, it is OK to also ignore empty rectangles here.
++ // restoreSceneWindow() does that. Therefore, it is OK to also ignore empty rectangles here.
+ if (!focusedInputWidget || inputPanelRect.isEmpty()) {
+ return;
+ }
+
++ // Find the first scene window parent of the focused input widget, since only those should
++ // be scrolled or moved in this context.
++ MSceneWindow *newParent = parentSceneWindow(focusedInputWidget);
++
++ // Don't move navigation bar. Focus can also be in dock widget but because it can get
++ // obfuscated by input panel we need to move it.
++ if (newParent->windowType() == MSceneWindow::NavigationBar) {
++ return;
++ }
++
+ // The visible scene size is already mapped to the rootElement's coordinate system.
+ const QRect screenSizeRect(QPoint(0, 0), q->visibleSceneSize());
+ const QRect mappedRect(rootElement->mapRectFromScene(inputPanelRect).toRect());
+@@ -470,15 +483,13 @@ void MSceneManagerPrivate::_q_relocateWindowByInputPanel(const QRect &inputPanel
+ int adjustment = (rootElement->mapRectFromScene(microFocusRect).toRect().center() -
+ visibleRect.center()).y();
+
+- // Find the first scene window parent of the focused input widget, since only those should
+- // be scrolled or moved in this context. The altered scene window is moved back to its
++ // The altered scene window is moved back to its
+ // original location, although - if it has pannable contents - it is not scrolled back.
+- MSceneWindow *newParent = parentSceneWindow(focusedInputWidget);
+ adjustment -= scrollPageContents(newParent, adjustment);
+ moveSceneWindow(newParent, adjustment, obstructedHeight);
+ }
+
+-void MSceneManagerPrivate::_q_restoreSceneWindow()
++void MSceneManagerPrivate::restoreSceneWindow()
+ {
+ if (alteredSceneWindow) {
+ sceneWindowTranslation *= -1;
+@@ -492,7 +503,7 @@ void MSceneManager::ensureCursorVisible()
+ {
+ Q_D(MSceneManager);
+
+- d->_q_relocateWindowByInputPanel(MInputMethodState::instance()->inputMethodArea());
++ d->_q_inputPanelAreaChanged(MInputMethodState::instance()->inputMethodArea());
+ }
+
+ M::Orientation MSceneManagerPrivate::orientation(M::OrientationAngle angle) const
+@@ -630,7 +641,7 @@ void MSceneManagerPrivate::setParentItemForSceneWindow(MSceneWindow *sceneWindow
+
+ void MSceneManagerPrivate::setSceneWindowGeometries()
+ {
+- _q_restoreSceneWindow();
++ restoreSceneWindow();
+ const int size = windows.size();
+ MSceneWindow *sceneWindow;
+
+@@ -933,12 +944,6 @@ void MSceneManagerPrivate::prepareWindowShow(MSceneWindow *window)
+ setSceneWindowGeometry(window);
+ createLayerEffectForWindow(window);
+
+- if (window->windowType() == MSceneWindow::NavigationBar)
+- navBar = qobject_cast<MNavigationBar *>(window);
+-
+- if (window->windowType() == MSceneWindow::EscapeButtonPanel)
+- escapeButtonPanel = window;
+-
+ if (window->windowType() == MSceneWindow::StatusBar) {
+ // There can be only one status bar in the scene.
+ Q_ASSERT(statusBar == 0);
+@@ -1479,48 +1484,21 @@ void MSceneManagerPrivate::createDisappearanceAnimationForSceneWindow(MSceneWind
+
+ void MSceneManagerPrivate::_q_inputPanelOpened()
+ {
+- Q_Q(MSceneManager);
+-
+- if (!focusedInputWidget)
+- return;
+-
+- const bool widgetOnPage = onApplicationPage(focusedInputWidget);
+- if (!navBarHidden && navBar && widgetOnPage) {
+- navBarHidden = true;
+- q->disappearSceneWindow(navBar);
+- }
+- if (!escapeButtonHidden && escapeButtonPanel && (widgetOnPage || (navBar && navBar->isAncestorOf(focusedInputWidget)))) {
+- escapeButtonHidden = true;
+- q->disappearSceneWindow(escapeButtonPanel);
+- }
+-
+ // Have to call the slot explicitly at least once: The focused widget can change without the
+- // MIMS sending new signals (e.g., the input field's content type stays the same).
++ // MIMS sending new area (e.g., the input field's content type stays the same) and then
++ // relocateWindowByInputPanel is not called.
+ // TODO: Rethink the design of MIMS to allow pending updates (so that we'll *know* wether we
+ // get a signal later or not).
+- _q_relocateWindowByInputPanel(MInputMethodState::instance()->inputMethodArea());
++ relocateWindowByInputPanel(MInputMethodState::instance()->inputMethodArea());
+ }
+
+ void MSceneManagerPrivate::_q_inputPanelClosed()
+ {
+- Q_Q(MSceneManager);
+-
+ if (!pendingSIPClose) {
+ return;
+ }
+
+ focusedInputWidget = 0;
+-
+- if (navBar && navBarHidden) {
+- q->appearSceneWindow(navBar);
+- navBarHidden = false;
+- }
(542 more lines skipped)
++++++ libmeegotouch.yaml
--- libmeegotouch.yaml
+++ libmeegotouch.yaml
@@ -21,6 +21,7 @@
- re-enable_code_to_set_orientation.patch
- include_order.patch
- arm_ftbfs_egl.patch
+ - hide_status_bar_for_vkb.patch
Requires:
- meegotouch-theme >= 0.20.14
Description: |
More information about the MeeGo-commits
mailing list