[maemo-commits] [maemo-commits] r17089 - in projects/haf/branches/libmatchbox2-shaped-mode: . matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Jan 12 12:42:36 EET 2009
- Previous message: [maemo-commits] r17088 - projects/haf/branches
- Next message: [maemo-commits] r17090 - in projects/haf/branches: . libmatchbox2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-01-12 12:42:34 +0200 (Mon, 12 Jan 2009) New Revision: 17089 Modified: projects/haf/branches/libmatchbox2-shaped-mode/ChangeLog projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.c projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.h projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-wm-client.h Log: support for unredirecting clients Modified: projects/haf/branches/libmatchbox2-shaped-mode/ChangeLog =================================================================== --- projects/haf/branches/libmatchbox2-shaped-mode/ChangeLog 2009-01-12 10:39:11 UTC (rev 17088) +++ projects/haf/branches/libmatchbox2-shaped-mode/ChangeLog 2009-01-12 10:42:34 UTC (rev 17089) @@ -1,5 +1,10 @@ 2009-01-02 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + * matchbox/core/mb-window-manager.[ch] (mb_wm_setup_redirection, + mb_wm_unredirect_client): New. Support for unredirecting clients. + +2009-01-02 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + * matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c (mb_wm_comp_mgr_clutter_client_repair_real): Optimisation for file manager like applications. Update the whole bounding box if there are Modified: projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.c =================================================================== --- projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.c 2009-01-12 10:39:11 UTC (rev 17088) +++ projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.c 2009-01-12 10:42:34 UTC (rev 17089) @@ -727,6 +727,61 @@ #if ENABLE_COMPOSITE +static void +mb_wm_unredirect_client (MBWindowManager *wm, + MBWindowManagerClient *client) +{ + /* TODO: handle framed dialogs etc. */ + if (client->xwin_frame) { + XCompositeUnredirectWindow (wm->xdpy, client->xwin_frame, + CompositeRedirectManual); + XCompositeUnredirectSubwindows (wm->xdpy, client->xwin_frame, + CompositeRedirectManual); + XCompositeRedirectWindow (wm->xdpy, client->xwin_frame, + CompositeRedirectAutomatic); + } + else + { + XCompositeUnredirectWindow (wm->xdpy, client->window->xwindow, + CompositeRedirectManual); + XCompositeUnredirectSubwindows (wm->xdpy, client->window->xwindow, + CompositeRedirectManual); + } + client->redirected = False; +} + +void +mb_wm_setup_redirection (MBWindowManager *wm, int redirection) +{ + MBWindowManagerClient *client; + + if (redirection) + { + Window root_win = wm->root_win->xwindow; + + XCompositeRedirectSubwindows (wm->xdpy, root_win, + CompositeRedirectManual); + + mb_wm_stack_enumerate (wm, client) + client->redirected = True; + + wm->redirection = True; + } + else + { + mb_wm_stack_enumerate (wm, client) + { + /* TODO: this should maybe use a HD hook? */ + if (MB_WM_IS_CLIENT_APP (client)) { + mb_wm_unredirect_client (wm, client); + client->redirected = False; + } + } + + wm->redirection = False; + } +} + /* For the compositing engine we need to track overide redirect * windows so the compositor can paint them. */ @@ -775,6 +830,9 @@ */ mb_wm_client_reset_hiding_from_desktop (client); } + + if (!wm->redirection) + mb_wm_unredirect_client (wm, client); } return True; @@ -813,6 +871,9 @@ mb_wm_manage_client (wm, client, True); mb_wm_comp_mgr_map_notify (wm->comp_mgr, client); + if (!wm->redirection) + mb_wm_unredirect_client (wm, client); + return True; } #endif @@ -863,6 +924,11 @@ mb_wm_manage_client (wm, client, True); +#ifdef ENABLE_COMPOSITE + if (wm->redirection) + client->redirected = True; +#endif + return True; } Modified: projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.h =================================================================== --- projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.h 2009-01-12 10:39:11 UTC (rev 17088) +++ projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-window-manager.h 2009-01-12 10:42:34 UTC (rev 17089) @@ -90,6 +90,7 @@ #if ENABLE_COMPOSITE MBWMCompMgr *comp_mgr; int damage_event_base; + Bool redirection; #endif MBWindowManagerCursor cursor; @@ -227,6 +228,9 @@ mb_wm_select_desktop (MBWindowManager *wm, int desktop); void +mb_wm_setup_redirection (MBWindowManager *wm, int redirection); + +void mb_adjust_dialog_title_position (MBWindowManager *wm, int new_padding); Modified: projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-wm-client.h =================================================================== --- projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-wm-client.h 2009-01-12 10:39:11 UTC (rev 17088) +++ projects/haf/branches/libmatchbox2-shaped-mode/matchbox/core/mb-wm-client.h 2009-01-12 10:42:34 UTC (rev 17089) @@ -174,6 +174,7 @@ #if ENABLE_COMPOSITE MBWMCompMgrClient *cm_client; + Bool redirected; /* XComposite redirected? */ #endif };
- Previous message: [maemo-commits] r17088 - projects/haf/branches
- Next message: [maemo-commits] r17090 - in projects/haf/branches: . libmatchbox2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]