summaryrefslogtreecommitdiff
path: root/recipes/matchbox2/matchbox-wm-2
diff options
context:
space:
mode:
authorStanislav Brabec <utx@penguin.cz>2009-09-22 23:36:32 +0000
committerutx@penguin.cz <utx@penguin.cz>2009-09-22 23:36:32 +0000
commit3bcf3726467d678126952436b80f4a10c2184c4d (patch)
treedec42459f0732cb88b54aac55afd7ac8431d5c4e /recipes/matchbox2/matchbox-wm-2
parent1e4dc820bb189c367daddd07643c0146122823c0 (diff)
matchbox2: Make it working:
* fixed known crashers * created usable icon theme * provided session script
Diffstat (limited to 'recipes/matchbox2/matchbox-wm-2')
-rw-r--r--recipes/matchbox2/matchbox-wm-2/fix-timeout-handler-free.patch105
-rw-r--r--recipes/matchbox2/matchbox-wm-2/makefile-vars.patch234
2 files changed, 339 insertions, 0 deletions
diff --git a/recipes/matchbox2/matchbox-wm-2/fix-timeout-handler-free.patch b/recipes/matchbox2/matchbox-wm-2/fix-timeout-handler-free.patch
new file mode 100644
index 0000000000..1f68176845
--- /dev/null
+++ b/recipes/matchbox2/matchbox-wm-2/fix-timeout-handler-free.patch
@@ -0,0 +1,105 @@
+http://bugzilla.openedhand.com/show_bug.cgi?id=1432
+diff --git a/matchbox/core/mb-wm-client.c b/matchbox/core/mb-wm-client.c
+index 0791060..f6d949d 100644
+--- a/matchbox/core/mb-wm-client.c
++++ b/matchbox/core/mb-wm-client.c
+@@ -55,9 +58,11 @@ mb_wm_client_destroy (MBWMObject *obj)
+
+ client->sig_prop_change_id = 0;
+
+- if (client->ping_cb_id)
+- mb_wm_main_context_timeout_handler_remove (wm->main_ctx,
+- client->ping_cb_id);
++ /* Must call mb_wm_client_ping_stop rather than
++ * mb_wm_main_context_timeout_handler_remove() to prevent a race condition
++ * segfault in the timeout list manipulation
++ */
++ mb_wm_client_ping_stop (client);
+
+ #if ENABLE_COMPOSITE
+ if (mb_wm_compositing_enabled (wm))
+diff --git a/matchbox/core/mb-wm-main-context.c b/matchbox/core/mb-wm-main-context.c
+index f74d249..a206a2e 100644
+--- a/matchbox/core/mb-wm-main-context.c
++++ b/matchbox/core/mb-wm-main-context.c
+@@ -822,7 +822,7 @@ mb_wm_main_context_handle_timeout (MBWMTimeOutEventInfo *tinfo,
+ static Bool
+ mb_wm_main_context_check_timeouts (MBWMMainContext *ctx)
+ {
+- MBWMList * l = ctx->event_funcs.timeout;
++ MBWMList * l = mb_wm_util_list_get_first(ctx->event_funcs.timeout);
+ struct timeval current_time;
+
+ if (!l)
+@@ -833,29 +833,18 @@ mb_wm_main_context_check_timeouts (MBWMMainContext *ctx)
+ while (l)
+ {
+ MBWMTimeOutEventInfo * tinfo = l->data;
++ unsigned long tid = tinfo->id;
+
+ if (!mb_wm_main_context_handle_timeout (tinfo, &current_time))
+- {
+- MBWMList * prev = l->prev;
+- MBWMList * next = l->next;
+-
+- if (prev)
+- prev->next = next;
+- else
+- ctx->event_funcs.timeout = next;
+-
+- if (next)
+- next->prev = prev;
+-
+- free (tinfo);
+- free (l);
+-
+- l = next;
+- }
++ {
++ /* Timeout handler notified it can be removed, do so now */
++ mb_wm_main_context_timeout_handler_remove (ctx,tid);
++ /* To avoid race condition, restart at front of list */
++ l = mb_wm_util_list_get_first(ctx->event_funcs.timeout);
++ }
+ else
+- l = l->next;
++ l = mb_wm_util_list_next(l);
+ }
+-
+ return True;
+ }
+ #endif /* !USE_GLIB_MAINLOOP */
+@@ -904,25 +893,14 @@ mb_wm_main_context_timeout_handler_remove (MBWMMainContext *ctx,
+ MBWMTimeOutEventInfo * info = l->data;
+
+ if (info->id == id)
+- {
+- MBWMList * prev = l->prev;
+- MBWMList * next = l->next;
+-
+- if (prev)
+- prev->next = next;
+- else
+- ctx->event_funcs.timeout = next;
+-
+- if (next)
+- next->prev = prev;
+-
+- free (info);
+- free (l);
+-
+- return;
+- }
+-
+- l = l->next;
++ {
++ /* Reset list head after entry removal */
++ ctx->event_funcs.timeout =
++ mb_wm_util_list_remove(ctx->event_funcs.timeout, l->data);
++ return;
++ }
++
++ l = mb_wm_util_list_next(l);
+ }
+ #else
+ g_source_remove (id);
diff --git a/recipes/matchbox2/matchbox-wm-2/makefile-vars.patch b/recipes/matchbox2/matchbox-wm-2/makefile-vars.patch
new file mode 100644
index 0000000000..8014e978a4
--- /dev/null
+++ b/recipes/matchbox2/matchbox-wm-2/makefile-vars.patch
@@ -0,0 +1,234 @@
+sed -i 's/@\([A-Z0-9_]*\)@/\$(\1)/g;s/\$(MBWM2_API_VERSION)/@MBWM2_API_VERSION@/g;s/_LIBRARIES/_LTLIBRARIES/g;s/_a_/_la_/g;s/\.a/.la/g' $(find -name Makefile.am)
+Index: matchbox/client-types/Makefile.am
+===================================================================
+--- matchbox/client-types/Makefile.am (revision 2087)
++++ matchbox/client-types/Makefile.am (working copy)
+@@ -1,15 +1,15 @@
+ if ENABLE_COMPOSITE
+-compmgr_libs = libmb-wm-client-override.a
++compmgr_libs = libmb-wm-client-override.la
+ compmgr_ltlibs = libmb-wm-client-override.la
+ endif
+
+-THEME_LIBS = @MBWM_THEME_LIBS@/libmb-theme.a
++THEME_LIBS = $(MBWM_THEME_LIBS)/libmb-theme.la
+
+-INCLUDES = @MBWM_INCS@ @MBWM_CFLAGS@
++INCLUDES = $(MBWM_INCS) $(MBWM_CFLAGS)
+ LDADD =$(THEME_LIBS)
+ DEPENDENCIES = $(THEME_LIBS)
+
+-pkgincludedir = $(includedir)/@MBWM2_INCDIR@/client-types
++pkgincludedir = $(includedir)/$(MBWM2_INCDIR)/client-types
+
+ if ENABLE_LIBMATCHBOX
+ pkginclude_HEADERS = mb-wm-client-app.h \
+Index: matchbox/comp-mgr/Makefile.am
+===================================================================
+--- matchbox/comp-mgr/Makefile.am (revision 2087)
++++ matchbox/comp-mgr/Makefile.am (working copy)
+@@ -12,7 +12,7 @@
+ endif
+ endif
+
+-pkgincludedir = $(includedir)/@MBWM2_INCDIR@/comp-mgr
++pkgincludedir = $(includedir)/$(MBWM2_INCDIR)/comp-mgr
+
+ if ENABLE_LIBMATCHBOX
+ pkginclude_HEADERS = mb-wm-comp-mgr-clutter.h mb-wm-comp-mgr.h mb-wm-comp-mgr-xrender.h
+@@ -21,7 +21,7 @@
+ libmatchbox_window_manager_2_compmgr_la_SOURCES = $(core_h) $(core_c) \
+ $(xrender_h) $(xrender_c) \
+ $(clutter_h) $(clutter_c)
+-libmatchbox_window_manager_2_compmgr_la_CFLAGS = @MBWM_INCS@ @MBWM_CFLAGS@
++libmatchbox_window_manager_2_compmgr_la_CFLAGS = $(MBWM_INCS) $(MBWM_CFLAGS)
+
+ MAINTAINERCLEANFILES = Makefile.in
+
+Index: matchbox/core/Makefile.am
+===================================================================
+--- matchbox/core/Makefile.am (revision 2087)
++++ matchbox/core/Makefile.am (working copy)
+@@ -37,13 +37,13 @@
+ mb-wm-main-context.c \
+ xas.c
+
+-pkgincludedir = $(includedir)/@MBWM2_INCDIR@/core
++pkgincludedir = $(includedir)/$(MBWM2_INCDIR)/core
+
+ if ENABLE_LIBMATCHBOX
+ pkginclude_HEADERS = $(core_h)
+ endif
+ noinst_LTLIBRARIES = libmatchbox-window-manager-2-core.la
+ libmatchbox_window_manager_2_core_la_SOURCES = $(core_h) $(core_c)
+-libmatchbox_window_manager_2_core_la_CFLAGS = @MBWM_INCS@ @MBWM_CFLAGS@
++libmatchbox_window_manager_2_core_la_CFLAGS = $(MBWM_INCS) $(MBWM_CFLAGS)
+
+ MAINTAINERCLEANFILES = Makefile.in
+Index: matchbox/theme-engines/Makefile.am
+===================================================================
+--- matchbox/theme-engines/Makefile.am (revision 2087)
++++ matchbox/theme-engines/Makefile.am (working copy)
+@@ -5,7 +5,7 @@
+
+ COMMON_SRC = mb-wm-theme.h mb-wm-theme.c mb-wm-theme-xml.h mb-wm-theme-xml.c
+
+-pkgincludedir = $(includedir)/@MBWM2_INCDIR@/theme-engines
++pkgincludedir = $(includedir)/$(MBWM2_INCDIR)/theme-engines
+
+ if ENABLE_LIBMATCHBOX
+ pkginclude_HEADERS = mb-wm-theme.h mb-wm-theme-png.h mb-wm-theme-xml.h
+@@ -14,6 +14,6 @@
+ libmb_theme_la_SOURCES = $(COMMON_SRC) $(PNG_SRC)
+ libmb_theme_la_CFLAGS =
+
+-INCLUDES = @MBWM_INCS@ @MBWM_CFLAGS@ -DDATADIR=\"$(datadir)\"
++INCLUDES = $(MBWM_INCS) $(MBWM_CFLAGS) -DDATADIR=\"$(datadir)\"
+
+ MAINTAINERCLEANFILES = config.h.in Makefile.in
+Index: matchbox/Makefile.am
+===================================================================
+--- matchbox/Makefile.am (revision 2087)
++++ matchbox/Makefile.am (working copy)
+@@ -7,7 +7,7 @@
+
+ MAINTAINERCLEANFILES = Makefile.in
+
+-pkgincludedir = $(includedir)/@MBWM2_INCDIR@
++pkgincludedir = $(includedir)/$(MBWM2_INCDIR)
+
+ SUBDIRS = core client-types theme-engines $(comp) managers
+
+Index: matchbox/managers/simple/Makefile.am
+===================================================================
+--- matchbox/managers/simple/Makefile.am (revision 2087)
++++ matchbox/managers/simple/Makefile.am (working copy)
+@@ -1,22 +1,22 @@
+ INCLUDES = \
+- @MBWM_INCS@ \
+- @MBWM_CFLAGS@
++ $(MBWM_INCS) \
++ $(MBWM_CFLAGS)
+
+ CLIENT_LIBS = \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-panel.la \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-dialog.la \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-note.la \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-app.la \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-input.la \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-desktop.la \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-menu.la
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-panel.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-dialog.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-note.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-app.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-input.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-desktop.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-menu.la
+
+ if ENABLE_COMPOSITE
+-COMPMGR_LIBS=@MBWM_COMPMGR_BUILDDIR@/libmatchbox-window-manager-2-compmgr.la \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-override.la
++COMPMGR_LIBS=$(MBWM_COMPMGR_BUILDDIR)/libmatchbox-window-manager-2-compmgr.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-override.la
+ endif
+
+-THEME_LIBS = @MBWM_THEME_BUILDDIR@/libmb-theme.la
++THEME_LIBS = $(MBWM_THEME_BUILDDIR)/libmb-theme.la
+
+ bin_PROGRAMS = matchbox-window-manager-2-simple
+
+@@ -28,15 +28,15 @@
+ $(LDFLAGS)
+
+ matchbox_window_manager_2_simple_LDADD = \
+- @MBWM_CORE_LIB@ \
++ $(MBWM_CORE_LIB) \
+ $(THEME_LIBS) \
+ $(CLIENT_LIBS) \
+ $(COMPMGR_LIBS) \
+- @MBWM_LIBS@
++ $(MBWM_LIBS)
+
+
+ matchbox_window_manager_2_simple_DEPENDENCIES = \
+- @MBWM_CORE_LIB@ \
++ $(MBWM_CORE_LIB) \
+ $(THEME_LIBS) \
+ $(CLIENT_LIBS) \
+ $(COMPMGR_LIBS)
+Index: matchbox/managers/maemo/Makefile.am
+===================================================================
+--- matchbox/managers/maemo/Makefile.am (revision 2087)
++++ matchbox/managers/maemo/Makefile.am (working copy)
+@@ -1,23 +1,23 @@
+ SUBDIRS = theme
+
+ INCLUDES = \
+- @MBWM_INCS@ \
+- @MBWM_CFLAGS@
++ $(MBWM_INCS) \
++ $(MBWM_CFLAGS)
+
+ CLIENT_LIBS = \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-panel.a \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-dialog.a \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-note.a \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-app.a \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-input.a \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-desktop.a \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-menu.a
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-panel.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-dialog.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-note.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-app.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-input.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-desktop.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-menu.la
+
+-THEME_LIBS = @MBWM_THEME_BUILDDIR@/libmb-theme.a
++THEME_LIBS = $(MBWM_THEME_BUILDDIR)/libmb-theme.la
+
+ if ENABLE_COMPOSITE
+-COMPMGR_LIBS=@MBWM_COMPMGR_BUILDDIR@/libmatchbox-window-manager-2-compmgr.a \
+- @MBWM_CLIENT_BUILDDIR@/libmb-wm-client-override.a
++COMPMGR_LIBS=$(MBWM_COMPMGR_BUILDDIR)/libmatchbox-window-manager-2-compmgr.la \
++ $(MBWM_CLIENT_BUILDDIR)/libmb-wm-client-override.la
+ endif
+
+ bin_PROGRAMS = matchbox-window-manager-2-maemo
+@@ -33,14 +33,14 @@
+ $(LDFLAGS)
+
+ matchbox_window_manager_2_maemo_LDADD = \
+- @MBWM_CORE_LIB@ \
++ $(MBWM_CORE_LIB) \
+ $(THEME_LIBS) \
+ $(CLIENT_LIBS) \
+ $(COMPMGR_LIBS) \
+- @MBWM_LIBS@
++ $(MBWM_LIBS)
+
+ matchbox_window_manager_2_maemo_DEPENDENCIES = \
+- @MBWM_CORE_LIB@ \
++ $(MBWM_CORE_LIB) \
+ $(THEME_LIBS) \
+ $(CLIENT_LIBS) \
+ $(COMPMGR_LIBS)
+Index: data/Makefile.am
+===================================================================
+--- data/Makefile.am (revision 2087)
++++ data/Makefile.am (working copy)
+@@ -1,10 +1,10 @@
+ SUBDIRS=themes
+
+-pcfiles = libmatchbox2-$(MBWM2_API_VERSION).pc \
++pcfiles = libmatchbox2-@MBWM2_API_VERSION@.pc \
+ libmatchbox2.pc
+
+ # clutter-<major>.<minor>.pc - for generic dependencies
+-libmatchbox2-$(MBWM2_API_VERSION).pc: libmatchbox2.pc
++libmatchbox2-@MBWM2_API_VERSION@.pc: libmatchbox2.pc
+ @cp $< $@
+
+ if ENABLE_LIBMATCHBOX