Mailing List Archive

r19310 - in projects/haf/trunk/libmatchbox2: . debian matchbox/comp-mgr matchbox/core
Author: kihamala
Date: 2009-09-09 15:43:46 +0300 (Wed, 09 Sep 2009)
New Revision: 19310

Modified:
projects/haf/trunk/libmatchbox2/ChangeLog
projects/haf/trunk/libmatchbox2/debian/changelog
projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.c
projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.h
projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
Log:

* matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
(mb_wm_comp_mgr_clutter_maybe_redirect): New function to possibly
redirect clients before they are reparented to the frame.
* matchbox/comp-mgr/mb-wm-comp-mgr.[ch]: Add maybe_redirect class
function for the above.
* matchbox/core/mb-wm-client-base.c (mb_wm_client_base_realize): Call
mb_wm_comp_mgr_client_maybe_redirect before reparenting the frame.
Fixes: NB#122341 - Image viewer draws the content 3 times when it
starts



Modified: projects/haf/trunk/libmatchbox2/ChangeLog
===================================================================
--- projects/haf/trunk/libmatchbox2/ChangeLog 2009-09-09 09:42:40 UTC (rev 19309)
+++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-09-09 12:43:46 UTC (rev 19310)
@@ -1,3 +1,15 @@
+2009-09-09 Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>
+
+ * matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
+ (mb_wm_comp_mgr_clutter_maybe_redirect): New function to possibly
+ redirect clients before they are reparented to the frame.
+ * matchbox/comp-mgr/mb-wm-comp-mgr.[ch]: Add maybe_redirect class
+ function for the above.
+ * matchbox/core/mb-wm-client-base.c (mb_wm_client_base_realize): Call
+ mb_wm_comp_mgr_client_maybe_redirect before reparenting the frame.
+ Fixes: NB#122341 - Image viewer draws the content 3 times when it
+ starts
+
2009-09-04 Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>

Release 0.2.63

Modified: projects/haf/trunk/libmatchbox2/debian/changelog
===================================================================
--- projects/haf/trunk/libmatchbox2/debian/changelog 2009-09-09 09:42:40 UTC (rev 19309)
+++ projects/haf/trunk/libmatchbox2/debian/changelog 2009-09-09 12:43:46 UTC (rev 19310)
@@ -1,6 +1,7 @@
matchbox-window-manager-2 (0.2.64-1~unreleased) unstable; urgency=low

- * foo
+ Kimmo:
+ * Fixes: NB#122341 - Image viewer draws the content 3 times when it starts

-- Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> Fri, 4 Sep 2009 17:36:40 +0300


Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 2009-09-09 09:42:40 UTC (rev 19309)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 2009-09-09 12:43:46 UTC (rev 19310)
@@ -549,6 +549,10 @@
unsigned w, unsigned h);

static void
+mb_wm_comp_mgr_clutter_maybe_redirect (MBWMCompMgr *mgr,
+ MBWindowManagerClient *c);
+
+static void
mb_wm_comp_mgr_clutter_map_notify_real (MBWMCompMgr *mgr,
MBWindowManagerClient *c);

@@ -584,6 +588,7 @@
cm_klass->register_client = mb_wm_comp_mgr_clutter_register_client_real;
cm_klass->turn_on = mb_wm_comp_mgr_clutter_turn_on_real;
cm_klass->turn_off = mb_wm_comp_mgr_clutter_turn_off_real;
+ cm_klass->maybe_redirect = mb_wm_comp_mgr_clutter_maybe_redirect;
cm_klass->map_notify = mb_wm_comp_mgr_clutter_map_notify_real;
cm_klass->my_window = mb_wm_comp_mgr_is_my_window_real;
cm_klass->restack = mb_wm_comp_mgr_clutter_restack_real;
@@ -1119,6 +1124,19 @@
}

static void
+mb_wm_comp_mgr_clutter_maybe_redirect (MBWMCompMgr *mgr,
+ MBWindowManagerClient *c)
+{
+ if (c->xwin_frame)
+ {
+ /* Use CompositeRedirectManual since the frame's immediate child
+ * is using that, see mb_wm_comp_mgr_clutter_set_client_redirection */
+ XCompositeRedirectSubwindows (c->wmref->xdpy, c->xwin_frame,
+ CompositeRedirectManual);
+ }
+}
+
+static void
mb_wm_comp_mgr_clutter_map_notify_real (MBWMCompMgr *mgr,
MBWindowManagerClient *c)
{

Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.c 2009-09-09 09:42:40 UTC (rev 19309)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.c 2009-09-09 12:43:46 UTC (rev 19310)
@@ -319,6 +319,23 @@
klass->restack (mgr);
}

+/* Called for each client to possibly redirect the client before reparenting.
+ * This will save one redraw of the client. See NB#122341 */
+void __attribute__ ((visibility("hidden")))
+mb_wm_comp_mgr_client_maybe_redirect (MBWMCompMgr *mgr,
+ MBWindowManagerClient *c)
+{
+ MBWMCompMgrClass *klass;
+
+ if (!mgr)
+ return;
+
+ klass = MB_WM_COMP_MGR_CLASS (MB_WM_OBJECT_GET_CLASS (mgr));
+
+ if (klass->maybe_redirect)
+ klass->maybe_redirect (mgr, c);
+}
+
/*
* Called when a window we are interested in maps.
*/

Modified: projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.h
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.h 2009-09-09 09:42:40 UTC (rev 19309)
+++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.h 2009-09-09 12:43:46 UTC (rev 19310)
@@ -58,6 +58,7 @@
void (*turn_off) (MBWMCompMgr * mgr);
void (*render) (MBWMCompMgr * mgr);
void (*restack) (MBWMCompMgr * mgr);
+ void (*maybe_redirect) (MBWMCompMgr * mgr, MBWindowManagerClient *c);
void (*map_notify) (MBWMCompMgr * mgr, MBWindowManagerClient *c);
void (*unmap_notify) (MBWMCompMgr * mgr, MBWindowManagerClient *c);
Bool (*handle_damage) (XDamageNotifyEvent * xev, MBWMCompMgr * mgr);
@@ -171,5 +172,8 @@
void
mb_wm_comp_mgr_client_configure (MBWMCompMgrClient * client);

+void __attribute__ ((visibility("hidden")))
+mb_wm_comp_mgr_client_maybe_redirect (MBWMCompMgr *mgr,
+ MBWindowManagerClient *c);

#endif

Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c
===================================================================
--- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c 2009-09-09 09:42:40 UTC (rev 19309)
+++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c 2009-09-09 12:43:46 UTC (rev 19310)
@@ -234,6 +234,10 @@
g_debug("frame for window 0x%lx is 0x%lx",
client->window->xwindow, client->xwin_frame);

+#if ENABLE_COMPOSITE
+ mb_wm_comp_mgr_client_maybe_redirect (wm->comp_mgr, client);
+#endif
+
/*
* Assume geometry sync will fix this up correctly
* together with any decoration creation. Layout

_______________________________________________
maemo-commits mailing list
maemo-commits@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-commits