[maemo-commits] [maemo-commits] r19251 - in projects/haf/trunk/libmatchbox2: . debian matchbox/comp-mgr matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Sat Aug 29 17:48:57 EEST 2009
- Previous message: [maemo-commits] r19250 - projects/haf/trunk/libmatchbox2/matchbox/core
- Next message: [maemo-commits] r19252 - in projects/haf/trunk/clutter0.8: clutter/x11 debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-08-29 17:48:56 +0300 (Sat, 29 Aug 2009) New Revision: 19251 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/core/mb-window-manager.c Log: Fixes for automatic non-compositing feature and NB#135950. * matchbox/core/mb-window-manager.c (mb_wm_handle_map_notify): Unredirect an unredirected client again if it was reparented, because it has caused an implicit redirection again. * matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c (mb_wm_comp_mgr_clutter_set_client_redirection): (Un)redirect the client window or frame depending on fullscreenness. Remove the server grab, it does not seem to be necessary. * matchbox/core/mb-wm-client.c (mb_wm_client_set_state): Do not assign a bitmask to 'old_state' because it is compared with Bool value later, using '==' operator. This saves us an extra reparenting (and redrawing) when the browser window is mapped in fullscreen. Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-08-29 14:27:15 UTC (rev 19250) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-08-29 14:48:56 UTC (rev 19251) @@ -1,3 +1,19 @@ +2009-08-29 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + + Fixes for automatic non-compositing feature and NB#135950. + + * matchbox/core/mb-window-manager.c (mb_wm_handle_map_notify): + Unredirect an unredirected client again if it was reparented, because + it has caused an implicit redirection again. + * matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c + (mb_wm_comp_mgr_clutter_set_client_redirection): (Un)redirect the + client window or frame depending on fullscreenness. Remove the server + grab, it does not seem to be necessary. + * matchbox/core/mb-wm-client.c (mb_wm_client_set_state): Do not assign + a bitmask to 'old_state' because it is compared with Bool value later, + using '==' operator. This saves us an extra reparenting (and + redrawing) when the browser window is mapped in fullscreen. + 2009-08-28 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Release 0.2.59 Modified: projects/haf/trunk/libmatchbox2/debian/changelog =================================================================== --- projects/haf/trunk/libmatchbox2/debian/changelog 2009-08-29 14:27:15 UTC (rev 19250) +++ projects/haf/trunk/libmatchbox2/debian/changelog 2009-08-29 14:48:56 UTC (rev 19251) @@ -1,6 +1,6 @@ matchbox-window-manager-2 (0.2.60-1~unreleased) unstable; urgency=low - * foo + * Fixes related to NB#135950. -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Fri, 28 Aug 2009 20:18:29 +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-08-29 14:27:15 UTC (rev 19250) +++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 2009-08-29 14:48:56 UTC (rev 19251) @@ -176,35 +176,47 @@ gboolean setting) { MBWMCompMgrClutterClient *cclient = MB_WM_COMP_MGR_CLUTTER_CLIENT(client); + Window xwin = None; mb_wm_util_trap_x_errors (); - XGrabServer (client->wm->xdpy); if (cclient->priv->texture) clutter_x11_texture_pixmap_set_redirection ( CLUTTER_X11_TEXTURE_PIXMAP (cclient->priv->texture), setting); - if (setting && client->wm_client) - { - if (client->wm_client->xwin_frame) - XCompositeRedirectSubwindows (client->wm->xdpy, - client->wm_client->xwin_frame, + /* + g_printerr("%s: %s %p %s win %lx frame %lx\n", __func__, + setting ? "redirecting" : "unredirecting", client->wm_client, + mb_wm_client_get_name (client->wm_client), + client->wm_client->window->xwindow, + client->wm_client->xwin_frame); + */ + + if (client->wm_client) + { + if (client->wm_client->window->ewmh_state & + MBWMClientWindowEWMHStateFullscreen) + xwin = client->wm_client->window->xwindow; + else + xwin = client->wm_client->xwin_frame; + } + + if (setting && xwin != None) + { + XCompositeRedirectSubwindows (client->wm->xdpy, xwin, + CompositeRedirectManual); + XCompositeRedirectWindow (client->wm->xdpy, xwin, + CompositeRedirectManual); + } + else if (xwin != None) + { + XCompositeUnredirectWindow (client->wm->xdpy, xwin, CompositeRedirectManual); - else - g_warning ("%s: %p has no frame\n", __func__, client); - } - else if (client->wm_client) - { - if (client->wm_client->xwin_frame) - XCompositeUnredirectSubwindows (client->wm->xdpy, - client->wm_client->xwin_frame, - CompositeRedirectManual); - else - g_warning ("%s: %p has no frame\n", __func__, client); - } + XCompositeUnredirectSubwindows (client->wm->xdpy, xwin, + CompositeRedirectManual); + } cclient->priv->unredirected = setting ? False : True; XSync (client->wm->xdpy, False); - XUngrabServer (client->wm->xdpy); mb_wm_util_untrap_x_errors (); } Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-08-29 14:27:15 UTC (rev 19250) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-08-29 14:48:56 UTC (rev 19251) @@ -864,6 +864,13 @@ { client->skip_maps--; MB_WM_DBG_SKIP_UNMAPS (client); + + /* we have to unredirect again because the reparenting redirected + * the client again */ + if (client->cm_client && + mb_wm_comp_mgr_clutter_client_is_unredirected (client->cm_client)) + mb_wm_comp_mgr_clutter_set_client_redirection (client->cm_client, + FALSE); } else if (client) {
- Previous message: [maemo-commits] r19250 - projects/haf/trunk/libmatchbox2/matchbox/core
- Next message: [maemo-commits] r19252 - in projects/haf/trunk/clutter0.8: clutter/x11 debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]