This small patch allows to use the cool mokosuite's mokohome as an
Illume2 home (with working home-switcher), I think it could be applied
to OE directly since to run a mokohome instance as a normal window you
need to pass it the "-w" argument...
From 7f690da8656c10273ce62f5af33701ed1bc75c3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20(Trevi=C3=B1o)?= <[email protected]>
Date: Fri, 19 Nov 2010 03:19:59 +0100
Subject: [PATCH] mokosuite: allow to use mokohome as a basic window

Thanks to these patches mokohome can be run also like a basic application
(using the "-w" argument); this allows to use it as an Illume2 home.
---
 ...t-the-mokohome-as-a-basic-maximized-windo.patch |   30 ++++++++++++
 ...e-the-w-argument-to-run-it-as-a-Basic-Win.patch |   51 ++++++++++++++++++++
 recipes/openmoko-3rdparty/mokosuite2_git.bb        |    7 ++-
 3 files changed, 86 insertions(+), 2 deletions(-)
 create mode 100644 recipes/openmoko-3rdparty/mokosuite2/0001-mokohome-set-the-mokohome-as-a-basic-maximized-windo.patch
 create mode 100644 recipes/openmoko-3rdparty/mokosuite2/0002-mokohome-use-the-w-argument-to-run-it-as-a-Basic-Win.patch

diff --git a/recipes/openmoko-3rdparty/mokosuite2/0001-mokohome-set-the-mokohome-as-a-basic-maximized-windo.patch b/recipes/openmoko-3rdparty/mokosuite2/0001-mokohome-set-the-mokohome-as-a-basic-maximized-windo.patch
new file mode 100644
index 0000000..4738373
--- /dev/null
+++ b/recipes/openmoko-3rdparty/mokosuite2/0001-mokohome-set-the-mokohome-as-a-basic-maximized-windo.patch
@@ -0,0 +1,30 @@
+From 16e0862eaa80354d6346b24bf797773303a5747e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marco=20Trevisan=20(Trevi=C3=B1o)?= <[email protected]>
+Date: Fri, 19 Nov 2010 02:50:55 +0100
+Subject: [PATCH 1/2] mokohome: set the mokohome as a basic  maximized window
+
+This allows to use mokohome as an illume2-home
+---
+ mokohome/main.c |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/mokohome/main.c b/mokohome/main.c
+index 93dcd24..c9b1dee 100644
+--- a/mokohome/main.c
++++ b/mokohome/main.c
+@@ -62,9 +62,10 @@ int main(int argc, char* argv[])
+ 
+     elm_theme_overlay_add(NULL, "elm/scroller/base/desktop");
+ 
+-    Evas_Object* win = elm_win_add(NULL, "mokohome", ELM_WIN_DESKTOP);
+-    elm_win_title_set(win, "Home");
++    Evas_Object* win = elm_win_add(NULL, "mokohome", ELM_WIN_BASIC);
++    elm_win_title_set(win, "MokoHome");
+     elm_win_borderless_set(win, TRUE);
++    elm_win_maximized_set(win, TRUE);
+     //elm_win_layer_set(win, 90);    // home layer :)
+ 
+     // for not accepting focus...
+-- 
+1.7.1
+
diff --git a/recipes/openmoko-3rdparty/mokosuite2/0002-mokohome-use-the-w-argument-to-run-it-as-a-Basic-Win.patch b/recipes/openmoko-3rdparty/mokosuite2/0002-mokohome-use-the-w-argument-to-run-it-as-a-Basic-Win.patch
new file mode 100644
index 0000000..c43712e
--- /dev/null
+++ b/recipes/openmoko-3rdparty/mokosuite2/0002-mokohome-use-the-w-argument-to-run-it-as-a-Basic-Win.patch
@@ -0,0 +1,51 @@
+From 7b326f619fc4ca46832a034ab850d5ff2dd215b4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marco=20Trevisan=20(Trevi=C3=B1o)?= <[email protected]>
+Date: Fri, 19 Nov 2010 03:12:36 +0100
+Subject: [PATCH 2/2] mokohome: use the "-w" argument to run it as a Basic Window
+
+---
+ mokohome/main.c |   12 +++++++++++-
+ 1 files changed, 11 insertions(+), 1 deletions(-)
+
+diff --git a/mokohome/main.c b/mokohome/main.c
+index c9b1dee..a8735f2 100644
+--- a/mokohome/main.c
++++ b/mokohome/main.c
+@@ -45,10 +45,19 @@ int main(int argc, char* argv[])
+ {
+     moko_factory_init(argc, argv, PACKAGE, VERSION);
+     elm_need_efreet();
++    Elm_Win_Type win_t = ELM_WIN_DESKTOP;
+ 
+     Ecore_X_Window *roots = NULL;
+     int num = 0;
+ 
++    int i;
++    for (i = 1; i < argc; i++) {
++        if (!strcmp(argv[i], "-w")) {
++            win_t = ELM_WIN_BASIC;
++            break;
++        }
++    }
++
+     roots = ecore_x_window_root_list(&num);
+     if ((!roots) || (num <= 0)) {
+         g_error("Unable to get root window. Exiting.");
+@@ -57,12 +66,13 @@ int main(int argc, char* argv[])
+ 
+     int x, y, w, h;
+     ecore_x_window_geometry_get(roots[0], &x, &y, &w, &h);
++
+     g_debug("w = %d, h = %d", w, h);
+     g_free(roots);
+ 
+     elm_theme_overlay_add(NULL, "elm/scroller/base/desktop");
+ 
+-    Evas_Object* win = elm_win_add(NULL, "mokohome", ELM_WIN_BASIC);
++    Evas_Object* win = elm_win_add(NULL, "mokohome", win_t);
+     elm_win_title_set(win, "MokoHome");
+     elm_win_borderless_set(win, TRUE);
+     elm_win_maximized_set(win, TRUE);
+-- 
+1.7.1
+
diff --git a/recipes/openmoko-3rdparty/mokosuite2_git.bb b/recipes/openmoko-3rdparty/mokosuite2_git.bb
index c861837..55a0bea 100644
--- a/recipes/openmoko-3rdparty/mokosuite2_git.bb
+++ b/recipes/openmoko-3rdparty/mokosuite2_git.bb
@@ -6,10 +6,13 @@ DEPENDS = "mokowm elementary libfakekey libfreesmartphone-glib libphone-utils eg
 SECTION = "misc/utils"
 
 PV = "1.0.99+gitr${SRCPV}"
-PR = "r2"
+PR = "r3"
 SRCREV = "19a39c557feea5c17f6176a92f39084846865393"
 
-SRC_URI = "git://gitorious.org/mokosuite2/appbunch.git;protocol=git"
+SRC_URI = "git://gitorious.org/mokosuite2/appbunch.git;protocol=git \
+           file://0001-mokohome-set-the-mokohome-as-a-basic-maximized-windo.patch \
+           file://0002-mokohome-use-the-w-argument-to-run-it-as-a-Basic-Win.patch \
+"
 S = "${WORKDIR}/git"
 
 PARALLEL_MAKE = ""
-- 
1.7.1

_______________________________________________
Shr-devel mailing list
[email protected]
http://lists.shr-project.org/mailman/listinfo/shr-devel

Reply via email to