[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-active
Subject:    Maliit, Plasma Active and Mer
From:       Marco Martin <notmart () gmail ! com>
Date:       2012-05-21 15:56:07
Message-ID: 201205211756.07657.notmart () gmail ! com
[Download RAW message or body]

Hi all,
first of all sorry for the big cross posting but is a topic that is important 
to all 3 lists.

As we discussed on irc a couple of times, in the Plasma Active project we 
would like to use Maliit as system for the virtual keyboard.

Now that i had a bit of time to play with it, i got a plasma-themed qml 
keyboard that we can use and results so far can be seen here:
http://www.youtube.com/watch?v=rZs-RPyF9zE

As base system we use Mer, which at the moment has Maliit 0.8 packaged, and as 
noted it had some bugs, besides the support for qml keyboards being still a 
bit at early stages:
http://ppenz.blogspot.it/2012/04/plasma-active-and-maliit.html


So, i tried to package the current git revision here:
https://build.pub.meego.com/project/show?project=home%3Amart%3Abranches%3ACE%3AMW%3AShared


in order to correctly package the thing, and to have a fully functional qml 
keyboard i had to put a few patches into maliit-framework, of which i would 
like to upstream those who make sense and if there are some incorrect ones to 
get them right and upstream.

* build out-of-tree: the maalit-glib folder didn't build if the build is done 
outside the source directory, this patch fixes it.
Related issue: if the build is done inside the tree on obs it doesn't build on 
arm (possible qemu issue?) when in the sdk folder make clean is called, it 
fails on that architecture.

* resize the qgraphicsview at start: this patch looks quite strange but seems 
to be necessary: if the qgraphicsview is not resized to the desktop size right 
after it's created it will stay the wrong size (displaying only a piece of the 
keyboard)

* keep scenerect focused: this patch fixes the problem that after some times 
that the keyboard is opened and closed, the scenerect of the qgraphicsview 
drifts a bit (didn't find the real reason) so the keyboard appears moved down 
offscreen of 100 pixels or so

* remove the -as-needed linker option: with this option in the linker any 
application that doesn't explicitly link to libmaliit won't be able to use it 
(the plugin load fails with an unresolved symbol on libmaliit) that's why the 
keyboard worked with the examples but not with plain qt applications


The actual keyboard seen in the video is derived from the nemo keyboard plugin 
but quite modified, besides using plasma for the visual theme has some feature 
that may be useful to port it back to the nemo keyboard as well, if someone is 
interested (accents popup on long press, changing the pressed button when 
moving the finger around the keyboard)


That's it for now, it's quite a lot of stuff, various items can be discussed 
one by one ;)

Cheers,
Marco Martin

["initialize-window-size.patch" (text/x-patch)]

From 172659bad327d97d2bc57123094744a3fc701933 Mon Sep 17 00:00:00 2001
From: Marco Martin <notmart@gmail.com>
Date: Fri, 18 May 2012 12:41:48 +0200
Subject: [PATCH] initialize the window at the proper size

---
 src/windowedsurface.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/windowedsurface.cpp b/src/windowedsurface.cpp
index 2683172..b1387b5 100644
--- a/src/windowedsurface.cpp
+++ b/src/windowedsurface.cpp
@@ -64,6 +64,7 @@ public:
         mToplevel->setAttribute(Qt::WA_X11DoNotAcceptFocus);
         mToplevel->setAutoFillBackground(false);
         mToplevel->setBackgroundRole(QPalette::NoRole);
+        mToplevel->resize(QApplication::desktop()->screenGeometry().size());
 
         mToplevel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
 
-- 
1.7.3.4


["keep-scenerect-focused.patch" (text/x-patch)]

From 5cf0bd9c3e4dca41280a26c73b46014f12814b0c Mon Sep 17 00:00:00 2001
From: Marco Martin <notmart@gmail.com>
Date: Fri, 18 May 2012 19:45:06 +0200
Subject: [PATCH] keep the scenerect focused

---
 src/windowedsurface.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/windowedsurface.cpp b/src/windowedsurface.cpp
index b1387b5..d52565b 100644
--- a/src/windowedsurface.cpp
+++ b/src/windowedsurface.cpp
@@ -271,6 +271,7 @@ public:
             mRoot->setRect(rect);
             mRoot->show();
         }
+        view()->setSceneRect(QRect(QPoint(), mToplevel->size()));
     }
 
     void setSize(const QSize &size)
-- 
1.7.3.4


["link-libmaliit.patch" (text/x-patch)]

diff --git a/config.pri b/config.pri
index 314ab66..a295081 100644
--- a/config.pri
+++ b/config.pri
@@ -18,7 +18,7 @@ MALIIT_GLIB_LIB = maliit-glib-$${MALIIT_INTERFACE_VERSION}
 include(defines.pri)
 
 # Linker optimization for release build
-QMAKE_LFLAGS_RELEASE+=-Wl,--as-needed
+QMAKE_LFLAGS_RELEASE+=-Wl
 # Compiler warnings are error if the build type is debug
 QMAKE_CXXFLAGS_DEBUG+=-Werror -O0
 QMAKE_CFLAGS_DEBUG+=-Werror -O0

["out-of-tree-build.patch" (text/x-patch)]

From 7168e4febcd8e844f3dbbd0590cfe1151f51d275 Mon Sep 17 00:00:00 2001
From: Marco Martin <notmart@gmail.com>
Date: Fri, 18 May 2012 12:42:21 +0200
Subject: [PATCH] fix out of tree build for maliit-glib

---
 maliit-glib/maliit-glib.pro |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/maliit-glib/maliit-glib.pro b/maliit-glib/maliit-glib.pro
index dada208..add7272 100644
--- a/maliit-glib/maliit-glib.pro
+++ b/maliit-glib/maliit-glib.pro
@@ -18,12 +18,12 @@ HEADERS += \
     $$HEADERSINSTALL \
     maliitattributeextensionregistry.h \
     maliitattributeextensionprivate.h \
-    maliitmarshallers.h
+    $$OUT_PWD/maliitmarshallers.h
 
 SOURCES += \
     maliitattributeextension.c \
     maliitattributeextensionregistry.c \
-    maliitmarshallers.c
+    $$OUT_PWD/maliitmarshallers.c
 
 target.path += $$M_IM_INSTALL_LIBS
 
@@ -54,8 +54,8 @@ for(OPTION,$$list($$lower($$COV_OPTION))){
 QMAKE_CLEAN += \
     $$OBJECTS_DIR/*.gcno \
     $$OBJECTS_DIR/*.gcda \
-    maliitmarshallers.h \
-    maliitmarshallers.c
+    $$OUT_PWD/maliitmarshallers.h \
+    $$OUT_PWD/maliitmarshallers.c
 
 OTHER_FILES += \
     libmaliit-glib.pri
@@ -76,10 +76,17 @@ maliit_marshallers_c.commands = \
     glib-genmarshal --prefix=maliit_marshal --body --internal --g-fatal-warnings \
--stdinc $$IN_PWD/maliitmarshallers.list >$$OUT_PWD/maliitmarshallers.c  
 # Use to work around the fact that qmake looks up the target for the generated \
                header wrong
-QMAKE_EXTRA_TARGETS += fake_maliit_marshallers_h fake_maliit_marshallers_c
+QMAKE_EXTRA_TARGETS += fake_maliit_marshallers_h fake_maliit_marshallers_c \
otherfake_maliit_marshallers_h otherfake_maliit_marshallers_c  
-fake_maliit_marshallers_h.target = maliitmarshallers.h
+fake_maliit_marshallers_h.target = $$OUT_PWD/maliitmarshallers.h
 fake_maliit_marshallers_h.depends = maliit_marshallers_h
 
-fake_maliit_marshallers_c.target = maliitmarshallers.c
+fake_maliit_marshallers_c.target = $$OUT_PWD/maliitmarshallers.c
 fake_maliit_marshallers_c.depends = maliit_marshallers_c
+
+otherfake_maliit_marshallers_h.target = maliitmarshallers.h
+otherfake_maliit_marshallers_h.depends = maliit_marshallers_h
+
+otherfake_maliit_marshallers_c.target = maliitmarshallers.c
+otherfake_maliit_marshallers_c.depends = maliit_marshallers_c
+
-- 
1.7.3.4



_______________________________________________
Active mailing list
Active@kde.org
https://mail.kde.org/mailman/listinfo/active


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic