I have made the following changes intended for : CE:MW:Shared / maliit-framework
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/7846 Thank You, pvuorela [This message was auto-generated] --- Request # 7846: Messages from BOSS: State: review at 2013-02-11T14:22:42 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:pvuorela:branches:CE:MW:Shared / maliit-framework -> CE:MW:Shared / maliit-framework changes files: -------------- --- maliit-framework.changes +++ maliit-framework.changes @@ -0,0 +1,3 @@ +* Mon Feb 11 2013 Pekka Vuorela <[email protected]> - 0.81.4 +- Upgrade to new upstream version + old: ---- maliit-framework-0.81.3.0.1-version.patch maliit-framework-0.81.3.0.1.tar.bz2 new: ---- maliit-framework-0.81.4.tar.bz2 spec files: ----------- --- maliit-framework.spec +++ maliit-framework.spec @@ -9,7 +9,7 @@ # << macros Summary: Core libraries of Maliit and server -Version: 0.81.3.0.1 +Version: 0.81.4 Release: 1 Group: System/Libraries License: LGPLv2.1 @@ -19,8 +19,7 @@ Source2: maliit-server.sh Source3: maliit-server.service Source100: maliit-framework.yaml -Patch0: maliit-framework-0.81.3.0.1-version.patch -Patch1: enable-systemd-activation.patch +Patch0: enable-systemd-activation.patch Requires: dbus-x11 Requires(pre): %{_bindir}/gconftool-2 Requires(preun): %{_bindir}/gconftool-2 @@ -135,10 +134,8 @@ %prep %setup -q -n %{name}-%{version} -# maliit-framework-0.81.3.0.1-version.patch -%patch0 -p1 # enable-systemd-activation.patch -%patch1 -p1 +%patch0 -p1 # >> setup # << setup other changes: -------------- ++++++ maliit-framework-0.81.3.0.1.tar.bz2 -> maliit-framework-0.81.4.tar.bz2 --- NEWS +++ NEWS @@ -1,3 +1,29 @@ +0.81.4 +====== + +CHANGES SINCE 0.81.3 +* QML support cleanup +* Implement show/hide transition support for QML plugins +* MImXApplication: use QScopedPointer for data instead of auto_ptr +* Ut_MIMPluginManager::testSwitchShow test added +* Move all connection code to connection/ directory +* Move duplicated code into common library +* Update cached value of extended attribute on application side +* Implemented method to deliver extended attributes from framework to application +* Extensions manager sends notification when toolbar attribute is changed + +BUG FIXES +* Fix transient hint for first focused application +* Fix test compilation +* Fixes: NB#281340 - Often VKB rotation is not in sync. +* Fixes: NB#298276 - Observed im-ui-server crashes on CITA +* Fixes: NB#298678 - (Regression): Alphabetical VKB shown automatically in "Change security code"-view +* Fixes: NB#296576 Vkb is not shown in text field, when swype keyboard is enabled & disabled in a scenario +* Fixes: NB#298229 - PIN query appears black for several seconds during startup +* Fix lost update problem in MImOnScreen::setAllSubViewsEnabled +* Fixes: NB#295883 - All input methods are still installed after tapping the emergency keyboard button in the device lock screen and typing the lock +* Fixed: NB#295179 - Create a method to load all input plugins for security lock ui purpose + 0.81.3 ====== --- VERSION +++ VERSION @@ -1 +1 @@ -0.81.3 +0.81.4 --- maliit-plugins-quick/input-method/minputmethodquick.cpp +++ maliit-plugins-quick/input-method/minputmethodquick.cpp @@ -102,7 +102,10 @@ return; } - m_content->show(); + if (not m_controller->pluginHandlesTransitions()) + m_content->show(); + + m_controller->setActive(true); } void hideUI() @@ -111,7 +114,10 @@ return; } - m_content->hide(); + if (not m_controller->pluginHandlesTransitions()) + m_content->hide(); + + m_controller->setActive(false); } void setToolbar(const QSharedPointer<const MToolbarData>&) @@ -121,10 +127,9 @@ void loadQmlFile(const QString &qmlFileName) { - const bool wasContentVisible(m_content ? m_content->isVisible() : false); - - if (wasContentVisible) { - m_controller->hide(); + if (m_content) { + qWarning() << "Qml file already loaded"; + return; } m_component.reset(new QDeclarativeComponent(m_engine, QUrl(qmlFileName))); @@ -140,13 +145,7 @@ m_content = new QGraphicsTextItem("Error loading QML"); } - if (wasContentVisible) { - m_controller->show(); - m_content->show(); - } else { - m_content->hide(); - } - + m_content->hide(); m_scene->addItem(m_content); } }; @@ -171,8 +170,10 @@ bool sipIsInhibited; QSharedPointer<MKeyOverrideQuick> actionKeyOverride; QSharedPointer<MKeyOverride> sentActionKeyOverride; + bool active; + bool pluginHandlesTransitions; - Q_DECLARE_PUBLIC(MInputMethodQuick); + Q_DECLARE_PUBLIC(MInputMethodQuick) MInputMethodQuickPrivate(QWidget *mainWindow, MInputMethodQuick *im) @@ -187,6 +188,8 @@ , sipIsInhibited(false) , actionKeyOverride(new MKeyOverrideQuick()) , sentActionKeyOverride() + , active(false) + , pluginHandlesTransitions(false) { updateActionKey(MKeyOverride::All); } @@ -204,7 +207,10 @@ if (not host) { return; } - host->setScreenRegion(region); + + if (not pluginHandlesTransitions) { + host->setScreenRegion(region); + } host->setInputMethodArea(region); } @@ -256,16 +262,19 @@ { Q_D(MInputMethodQuick); d->sipRequested = true; - if(d->sipIsInhibited) { - return; + if (d->sipIsInhibited) { + return; } handleAppOrientationChanged(d->appOrientation); if (d->activeState == MInputMethod::OnScreen) { - d->loader->showUI(); - const QRegion r(inputMethodArea()); - d->handleInputMethodAreaUpdate(inputMethodHost(), r); + d->loader->showUI(); + + if (not d->pluginHandlesTransitions) { + const QRegion r(inputMethodArea()); + d->handleInputMethodAreaUpdate(inputMethodHost(), r); + } } } @@ -391,11 +400,16 @@ if (d->inputMethodArea != area) { d->inputMethodArea = area; - + d->handleInputMethodAreaUpdate(inputMethodHost(), d->inputMethodArea); Q_EMIT inputMethodAreaChanged(d->inputMethodArea); } } +void MInputMethodQuick::setScreenRegion(const QRect ®ion) +{ + inputMethodHost()->setScreenRegion(region); +} + void MInputMethodQuick::sendPreedit(const QString &text) { QList<MInputMethod::PreeditTextFormat> lst; @@ -469,3 +483,33 @@ { sendCommit("\n"); } + +bool MInputMethodQuick::isActive() const +{ + Q_D(const MInputMethodQuick); + return d->active; +} + +void MInputMethodQuick::setActive(bool enable) +{ + Q_D(MInputMethodQuick); + if (d->active != enable) { + d->active = enable; + Q_EMIT activeChanged(); + } +} + +bool MInputMethodQuick::pluginHandlesTransitions() const +{ + Q_D(const MInputMethodQuick); + return d->pluginHandlesTransitions; +} + +void MInputMethodQuick::setPluginHandlesTransitions(bool enable) +{ + Q_D(MInputMethodQuick); + if (d->pluginHandlesTransitions != enable) { + d->pluginHandlesTransitions = enable; + Q_EMIT pluginHandlesTransitionsChanged(); + } +} --- maliit-plugins-quick/input-method/minputmethodquick.h +++ maliit-plugins-quick/input-method/minputmethodquick.h @@ -62,6 +62,15 @@ Q_PROPERTY(MKeyOverrideQuick *actionKeyOverride READ actionKeyOverride NOTIFY actionKeyOverrideChanged) + //! Property for whether input method is active + Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) + + // TODO: make this default behavior without ability to change + //! Until 0.81.3 MInputMethodQuick handled showing and hiding input methods. This did not support + //! implementing transitions. Settings this true makes the QML side in control how and when items + //! are shown. + Q_PROPERTY(bool pluginHandlesTransitions READ pluginHandlesTransitions WRITE setPluginHandlesTransitions NOTIFY pluginHandlesTransitionsChanged) + public: enum KeyEvent { KeyPress = QEvent::KeyPress, KeyRelease = QEvent::KeyRelease }; @@ -104,15 +113,28 @@ QRect inputMethodArea() const; //! Sets input method area. Called by QML components. - //! area the area consumed by the QML input method. + //! area the area reserved for QML input method. On transitions can reserve target area at start. Q_INVOKABLE void setInputMethodArea(const QRect &area); + //! Sets area input method is actually using from the screen. + Q_INVOKABLE void setScreenRegion(const QRect ®ion); + //! Returns action key override. MKeyOverrideQuick *actionKeyOverride() const; //! Activates action key, that is - sends enter keypress. Q_INVOKABLE void activateActionKey(); + //! Return true on input method expected to be shown + bool isActive() const; + //! Sets input method expected to be shown/hidden + void setActive(bool enable); + + //! Return true when plugin handles showing and hiding its root item + bool pluginHandlesTransitions() const; + //! Sets plugin in charge of viewing its own items + void setPluginHandlesTransitions(bool enable); + Q_SIGNALS: //! Emitted when screen height changes. void screenHeightChanged(int height); @@ -129,6 +151,10 @@ //! Emitted when key action override changes. void actionKeyOverrideChanged(MKeyOverride *override); + void activeChanged(); + + void pluginHandlesTransitionsChanged(); + public Q_SLOTS: //! Sends preedit string. Called by QML components. //! \param text the preedit string. @@ -145,8 +171,9 @@ void userHide(); private: - Q_DISABLE_COPY(MInputMethodQuick); - Q_DECLARE_PRIVATE(MInputMethodQuick); + Q_DISABLE_COPY(MInputMethodQuick) + Q_DECLARE_PRIVATE(MInputMethodQuick) + MInputMethodQuickPrivate *const d_ptr; private Q_SLOTS: --- src/mimremotewindow.cpp +++ src/mimremotewindow.cpp @@ -70,9 +70,14 @@ void MImRemoteWindow::setIMWidget(const QWidget *widget) { - XSetTransientForHint(QX11Info::display(), - widget->effectiveWinId(), - wid); + WId imId = widget->effectiveWinId(); + if (imId != 0) { + XSetTransientForHint(QX11Info::display(), imId, wid); + } else { + qCritical() << __PRETTY_FUNCTION__ + << "Input method may not become visible:" + << "Could not set transient hint because input method widget has no window id."; + } // Using PropertyChangeMask is a work-around for NB#172722 (a WONTFIX): XSelectInput(QX11Info::display(), --- src/mimxapplication.cpp +++ src/mimxapplication.cpp @@ -170,7 +170,6 @@ const bool wasRedirected(mRemoteWindow.data() && mRemoteWindow->isRedirected()); mRemoteWindow.reset(new MImRemoteWindow(newRemoteWinId, this)); - mRemoteWindow->setIMWidget(mPassThruWindow->window()); connect(mRemoteWindow.data(), SIGNAL(contentUpdated(QRegion)), this, SLOT(updatePassThruWindow(QRegion))); --- src/mpassthruwindow.cpp +++ src/mpassthruwindow.cpp @@ -116,6 +116,9 @@ if (e->type() == QEvent::WinIdChange) { updateWindowType(); updateInputRegion(); + if (remoteWindow) { + remoteWindow->setIMWidget(window()); + } } else if (e->type() == QEvent::Show) { // Qt resets the window type after we get the WinIdChange event. // We need to set it again before the window is mapped. @@ -224,8 +227,11 @@ { remoteWindow = newWindow; - if (!newWindow) + if (!newWindow) { inputPassthrough(); + } else if (window()->effectiveWinId() != 0) { + newWindow->setIMWidget(window()); + } } void MPassThruWindow::updateFromRemoteWindow(const QRegion ®ion) --- tests/ut_mimapplication/ut_mimapplication.cpp +++ tests/ut_mimapplication/ut_mimapplication.cpp @@ -6,6 +6,7 @@ #include <QSignalSpy> #include <QGraphicsView> #include <QDebug> +#include <QX11Info> #include <X11/X.h> #include <X11/Xlib.h> @@ -15,7 +16,8 @@ const WId FakeRemoteWId = 1; // must be non-zero to be considered "valid" } -void Ut_MIMApplication::initTestCase() + +void Ut_MIMApplication::init() { static char *argv[1] = { (char *) "ut_mimapplication" }; static int argc = 1; @@ -24,22 +26,16 @@ subject = static_cast<MPassThruWindow *>(app->passThruWindow()); } -void Ut_MIMApplication::cleanupTestCase() +void Ut_MIMApplication::cleanup() { delete app; + app = 0; } -void Ut_MIMApplication::init() +void Ut_MIMApplication::testHandleTransientEvents() { app->setTransientHint(FakeRemoteWId); -} -void Ut_MIMApplication::cleanup() -{ -} - -void Ut_MIMApplication::testHandleTransientEvents() -{ XEvent xevent; xevent.type = UnmapNotify; xevent.xunmap.event = FakeRemoteWId; @@ -59,6 +55,8 @@ void Ut_MIMApplication::testConfigureWidgetsForCompositing() { + app->setTransientHint(FakeRemoteWId); + QFETCH(bool, selfCompositing); QWidget mainWindow(app->passThruWindow()); @@ -82,5 +80,21 @@ } } +void Ut_MIMApplication::testHandleTransient() +{ + // simulate first focus when passthru gets shown only after app has signaled on new focus target + QWidget dummyWindow; + dummyWindow.show(); + app->setTransientHint(dummyWindow.effectiveWinId()); + + QWidget *passthru = app->passThruWindow(); + passthru->show(); + int passthruWinId = passthru->effectiveWinId(); + + WId transientTarget; + XGetTransientForHint(QX11Info::display(), passthruWinId, &transientTarget); + QCOMPARE(transientTarget, dummyWindow.effectiveWinId()); +} + QTEST_APPLESS_MAIN(Ut_MIMApplication) --- tests/ut_mimapplication/ut_mimapplication.h +++ tests/ut_mimapplication/ut_mimapplication.h @@ -12,9 +12,6 @@ Q_OBJECT private Q_SLOTS: - void initTestCase(); - void cleanupTestCase(); - void init(); void cleanup(); @@ -23,6 +20,8 @@ void testConfigureWidgetsForCompositing_data(); void testConfigureWidgetsForCompositing(); + void testHandleTransient(); + private: void handleMessages(); --- tests/utils/utils.h +++ tests/utils/utils.h @@ -58,7 +58,7 @@ protected: virtual bool filterEvent(const QEvent *event) { - push_back(transform(event)); + this->push_back(transform(event)); return true; } ++++++ maliit-framework.yaml --- maliit-framework.yaml +++ maliit-framework.yaml @@ -1,6 +1,6 @@ Name: maliit-framework Summary: Core libraries of Maliit and server -Version: 0.81.3.0.1 +Version: 0.81.4 Release: 1 Group: System/Libraries License: LGPLv2.1 @@ -8,7 +8,6 @@ Sources: - "%{name}-%{version}.tar.bz2" Patches: - - maliit-framework-0.81.3.0.1-version.patch - enable-systemd-activation.patch ExtraSources: - maliit-server.desktop;%{_sysconfdir}/xdg/autostart ++++++ deleted files: --- maliit-framework-0.81.3.0.1-version.patch
