[maemo-commits] [maemo-commits] r19328 - in projects/haf/trunk/libmatchbox2: . debian matchbox/comp-mgr matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu Sep 10 17:27:48 EEST 2009
- Previous message: [maemo-commits] r19327 - projects/haf/trunk/libmatchbox2/debian
- Next message: [maemo-commits] r19329 - in projects/haf/trunk/libmatchbox2: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-09-10 17:27:34 +0300 (Thu, 10 Sep 2009) New Revision: 19328 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: fixed the regression in the NB#122341 fix Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-09-10 13:54:17 UTC (rev 19327) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-09-10 14:27:34 UTC (rev 19328) @@ -1,5 +1,17 @@ 2009-09-10 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + Regression-free version of: + + * 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 + Release 0.2.65 Revert the fix for NB#122341, it causes a regression. Modified: projects/haf/trunk/libmatchbox2/debian/changelog =================================================================== --- projects/haf/trunk/libmatchbox2/debian/changelog 2009-09-10 13:54:17 UTC (rev 19327) +++ projects/haf/trunk/libmatchbox2/debian/changelog 2009-09-10 14:27:34 UTC (rev 19328) @@ -1,6 +1,7 @@ matchbox-window-manager-2 (0.2.66-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 at nokia.com> Thu, 10 Sep 2009 16:52:50 +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-10 13:54:17 UTC (rev 19327) +++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 2009-09-10 14:27:34 UTC (rev 19328) @@ -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,18 @@ } static void +mb_wm_comp_mgr_clutter_maybe_redirect (MBWMCompMgr *mgr, + MBWindowManagerClient *c) +{ + if (c->xwin_frame) + { + /* CompositeRedirectManual does not work here... */ + XCompositeRedirectSubwindows (c->wmref->xdpy, c->xwin_frame, + CompositeRedirectAutomatic); + } +} + +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-10 13:54:17 UTC (rev 19327) +++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.c 2009-09-10 14:27:34 UTC (rev 19328) @@ -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-10 13:54:17 UTC (rev 19327) +++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.h 2009-09-10 14:27:34 UTC (rev 19328) @@ -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-10 13:54:17 UTC (rev 19327) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c 2009-09-10 14:27:34 UTC (rev 19328) @@ -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
- Previous message: [maemo-commits] r19327 - projects/haf/trunk/libmatchbox2/debian
- Next message: [maemo-commits] r19329 - in projects/haf/trunk/libmatchbox2: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]