[maemo-commits] [maemo-commits] r17344 - in projects/haf/trunk/libmatchbox2: . matchbox/comp-mgr matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Mon Feb 2 15:39:02 EET 2009
- Previous message: [maemo-commits] r17343 - in projects/haf/trunk/libmatchbox2: . debian matchbox/comp-mgr
- Next message: [maemo-commits] r17345 - in projects/haf/trunk/libmatchbox2: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: aendrodi Date: 2009-02-02 15:38:36 +0200 (Mon, 02 Feb 2009) New Revision: 17344 Modified: projects/haf/trunk/libmatchbox2/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.h projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.h Log: * matchbox/core/mb-window-manager.c: mb_adjust_dialog_title_position(): Don't make the decor dirty if the old and new positions are the same. * matchbox/core/mb-wm-stack.h * matchbox/core/mb-wm-stack.c: Made mb_wm_stack_dump() more handy. * mb_wm_handle_root_config_notify(): Tell the cmgr the screen size has changed. * matchbox/comp-mgr/mb-wm-comp-mgr.h: New virtual method screen_size_changed(). Warrants a version bump. * matchbox/comp_mgr/mb-wm-comp-mgr-clutter.c: mb_wm_comp_mgr_clutter_turn_on_real(): Set the size of the overlay window correctly. mb_wm_comp_mgr_clutter_screen_size_changed(): Keep the root window, the stage and the overlay window size in sync. Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-02-02 12:49:12 UTC (rev 17343) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-02-02 13:38:36 UTC (rev 17344) @@ -1,3 +1,23 @@ +2009-02-02 Adam Endrodi <adam.endrodi at blumsoft.eu> + + * matchbox/core/mb-window-manager.c: + mb_adjust_dialog_title_position(): + Don't make the decor dirty if the old and new positions are the same. + * matchbox/core/mb-wm-stack.h + * matchbox/core/mb-wm-stack.c: + Made mb_wm_stack_dump() more handy. + + * mb_wm_handle_root_config_notify(): + Tell the cmgr the screen size has changed. + * matchbox/comp-mgr/mb-wm-comp-mgr.h: + New virtual method screen_size_changed(). + Warrants a version bump. + * matchbox/comp_mgr/mb-wm-comp-mgr-clutter.c: + mb_wm_comp_mgr_clutter_turn_on_real(): + Set the size of the overlay window correctly. + mb_wm_comp_mgr_clutter_screen_size_changed(): + Keep the root window, the stage and the overlay window size in sync. + 2009-02-02 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> * matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 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-02-02 12:49:12 UTC (rev 17343) +++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c 2009-02-02 13:38:36 UTC (rev 17344) @@ -412,6 +412,10 @@ mb_wm_comp_mgr_clutter_turn_off_real (MBWMCompMgr *mgr); static void +mb_wm_comp_mgr_clutter_screen_size_changed (MBWMCompMgr *mgr, + unsigned w, unsigned h); + +static void mb_wm_comp_mgr_clutter_map_notify_real (MBWMCompMgr *mgr, MBWindowManagerClient *c); @@ -452,6 +456,7 @@ cm_klass->restack = mb_wm_comp_mgr_clutter_restack_real; cm_klass->select_desktop = mb_wm_comp_mgr_clutter_select_desktop; cm_klass->handle_damage = mb_wm_comp_mgr_clutter_handle_damage; + cm_klass->screen_size_changed = mb_wm_comp_mgr_clutter_screen_size_changed; clutter_klass->client_new = mb_wm_comp_mgr_clutter_client_new; } @@ -574,8 +579,12 @@ */ xwin = clutter_x11_get_stage_window (CLUTTER_STAGE (stage)); + /* Make sure the overlay window's size is the same as the screen's + * actual size. Necessary if the screen is rotated. */ priv->overlay_window = XCompositeGetOverlayWindow (wm->xdpy, wm->root_win->xwindow); + XResizeWindow (wm->xdpy, priv->overlay_window, + wm->xdpy_width, wm->xdpy_height); /* * Reparent the stage window to the overlay window, this makes it @@ -607,7 +616,19 @@ } } +/* Synchronize the size of the stage and the overlay window + * with the root window. */ static void +mb_wm_comp_mgr_clutter_screen_size_changed (MBWMCompMgr *mgr, + unsigned w, unsigned h) +{ + MBWMCompMgrClutterPrivate *priv = MB_WM_COMP_MGR_CLUTTER (mgr)->priv; + + clutter_actor_set_size (clutter_stage_get_default (), w, h); + XResizeWindow (mgr->wm->xdpy, priv->overlay_window, w, h); +} + +static void mb_wm_comp_mgr_clutter_client_repair_real (MBWMCompMgrClient *client, Damage damage) { 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-02-02 12:49:12 UTC (rev 17343) +++ projects/haf/trunk/libmatchbox2/matchbox/comp-mgr/mb-wm-comp-mgr.h 2009-02-02 13:38:36 UTC (rev 17344) @@ -72,6 +72,7 @@ void (*select_desktop) (MBWMCompMgr * mgr, int desktop, int old_desktop); + void (*screen_size_changed) (MBWMCompMgr * mgr, unsigned w, unsigned h); }; int Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-02-02 12:49:12 UTC (rev 17343) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-02-02 13:38:36 UTC (rev 17344) @@ -636,6 +636,18 @@ wm->xdpy_width = xev->width; wm->xdpy_height = xev->height; +#if ENABLE_COMPOSITE + if (wm->comp_mgr && !wm->comp_mgr->disabled) + { + MBWMCompMgrClass *k; + + k = MB_WM_COMP_MGR_CLASS (MB_WM_OBJECT_GET_CLASS (wm->comp_mgr)); + if (k->screen_size_changed) + k->screen_size_changed (wm->comp_mgr, + wm->xdpy_width, wm->xdpy_height); + } +#endif + mb_wm_display_sync_queue (wm, MBWMSyncGeometry); return True; } @@ -2275,11 +2287,15 @@ mb_adjust_dialog_title_position (MBWindowManager *wm, int new_padding) { - MBWindowManagerClient *top = mb_wm_get_visible_main_client(wm); + MBWindowManagerClient *top; - left_padding = new_padding + LEFT_GUTTER; + new_padding += LEFT_GUTTER; + if (left_padding == new_padding) + return; + left_padding = new_padding; - if (!top) + top = mb_wm_get_visible_main_client(wm); + if (!top || top == wm->desktop) { g_debug ("No visible window-- bailing"); return; Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.c 2009-02-02 12:49:12 UTC (rev 17343) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.c 2009-02-02 13:38:36 UTC (rev 17344) @@ -18,6 +18,7 @@ * */ +#include <stdarg.h> #include "mb-wm.h" @@ -35,13 +36,22 @@ } void -mb_wm_stack_dump (MBWindowManager *wm) +mb_wm_stack_dump (MBWindowManager *wm, const char * why, ...) { MBWindowManagerClient *client; MBWMStackLayerType stacking_layer; g_warning ("\n==== window stack =====\n"); + if (why) + { + va_list printf_args; + va_start (printf_args, why); + vfprintf (stderr, why, printf_args); + fputc ('\n', stderr); + va_end (printf_args); + } + mb_wm_stack_enumerate_reverse (wm, client) { MBWindowManagerClient *trans_client = client; @@ -92,6 +102,8 @@ * FIXME: This isn't optimal */ +// mb_wm_stack_dump (wm, "BEGIN"); + /* bottom -> top on layer types */ for (i=1; i<N_MBWMStackLayerTypes; i++) { @@ -99,6 +111,7 @@ client = wm->stack_bottom; seen = NULL; +// mb_wm_stack_dump (wm, "TYPE=%d", i); while (client != seen && client != NULL) { /* get the next valid client ( ignore transients ) before @@ -121,14 +134,14 @@ seen = client; mb_wm_client_stack (client, 0); +// mb_wm_stack_dump (wm, "AFTER CLIENT %p", client); } client = next; } } - /* ENABLE ME WHEN YOU NEED ME - mb_wm_stack_dump (wm); - */ +// ENABLE ME WHEN YOU NEED ME +// mb_wm_stack_dump (wm, "FINISH"); } void Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.h =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.h 2009-02-02 12:49:12 UTC (rev 17343) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-stack.h 2009-02-02 13:38:36 UTC (rev 17344) @@ -93,6 +93,6 @@ mb_wm_stack_remove (MBWindowManagerClient *client); void -mb_wm_stack_dump (MBWindowManager *wm); +mb_wm_stack_dump (MBWindowManager *wm, const char * why, ...); #endif
- Previous message: [maemo-commits] r17343 - in projects/haf/trunk/libmatchbox2: . debian matchbox/comp-mgr
- Next message: [maemo-commits] r17345 - in projects/haf/trunk/libmatchbox2: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]