[maemo-commits] [maemo-commits] r17642 - in projects/haf/trunk/libmatchbox2: . matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Mar 11 22:50:38 EET 2009
- Previous message: [maemo-commits] r17641 - in projects/haf/trunk/hildon-thumbnail: . thumbs
- Next message: [maemo-commits] r17643 - in projects/haf/trunk/hildon-initscripts: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: tthurman Date: 2009-03-11 22:50:32 +0200 (Wed, 11 Mar 2009) New Revision: 17642 Modified: projects/haf/trunk/libmatchbox2/ChangeLog projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c Log: * matchbox/core/mb-window-manager.c: extra check for null dereference Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-03-11 17:24:48 UTC (rev 17641) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-03-11 20:50:32 UTC (rev 17642) @@ -1,3 +1,7 @@ +2009-03-11 Thomas Thurman <thomas.thurman at collabora.co.uk> + + * matchbox/core/mb-window-manager.c: extra check for null dereference + 2009-03-11 Gordon Williams <gordon.williams at collabora.co.uk> * matchbox/comp-mgr/mb-wm-comp-mgr-clutter.c: Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-03-11 17:24:48 UTC (rev 17641) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-window-manager.c 2009-03-11 20:50:32 UTC (rev 17642) @@ -663,7 +663,6 @@ int req_y = xev->y; int req_w = xev->width; int req_h = xev->height; - MBGeometry req_geom, *win_geom; client = mb_wm_managed_client_from_xwindow(wm, xev->window); @@ -689,29 +688,34 @@ } value_mask = xev->value_mask; - win_geom = &client->window->geometry; - req_geom.x = (value_mask & CWX) ? req_x : win_geom->x; - req_geom.y = (value_mask & CWY) ? req_y : win_geom->y; - req_geom.width = (value_mask & CWWidth) ? req_w : win_geom->width; - req_geom.height = (value_mask & CWHeight) ? req_h : win_geom->height; + if (client->window && client->window->geometry) + { + MBGeometry req_geom, + *win_geom = &client->window->geometry; - /* We can't determine at this point what the right response - * to this configure request is since layout management might - * also want to tweak the window geometry. - * - * We make a note that the configure request needs a response - * and when we reach mb_wm_sync - but after all layout decisions - * have been made - then we can determine if the request - * has been accepted or not and send any synthetic events as - * needed. - */ - mb_wm_client_configure_request_ack_queue (client); + req_geom.x = (value_mask & CWX) ? req_x : win_geom->x; + req_geom.y = (value_mask & CWY) ? req_y : win_geom->y; + req_geom.width = (value_mask & CWWidth) ? req_w : win_geom->width; + req_geom.height = (value_mask & CWHeight) ? req_h : win_geom->height; - mb_wm_client_request_geometry (client, - &req_geom, - MBWMClientReqGeomIsViaConfigureReq); + /* We can't determine at this point what the right response + * to this configure request is since layout management might + * also want to tweak the window geometry. + * + * We make a note that the configure request needs a response + * and when we reach mb_wm_sync - but after all layout decisions + * have been made - then we can determine if the request + * has been accepted or not and send any synthetic events as + * needed. + */ + mb_wm_client_configure_request_ack_queue (client); + mb_wm_client_request_geometry (client, + &req_geom, + MBWMClientReqGeomIsViaConfigureReq); + } + return True; }
- Previous message: [maemo-commits] r17641 - in projects/haf/trunk/hildon-thumbnail: . thumbs
- Next message: [maemo-commits] r17643 - in projects/haf/trunk/hildon-initscripts: . debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]