aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2010-11-24 00:27:54 +0000
committerRobert Bragg <robert@linux.intel.com>2010-12-09 22:46:48 +0000
commit8e2d625c63b42cba5016e503027faf93fb898e91 (patch)
treeed65933f814d80d4c4f0eff3c1d4f0999db1cda7
parent59aa976f6af9a8c86bd470373e0107d1fbc2a639 (diff)
downloadlibmatchboxwm2-8e2d625c63b42cba5016e503027faf93fb898e91.tar.gz
libmatchboxwm2-8e2d625c63b42cba5016e503027faf93fb898e91.tar.bz2
libmatchboxwm2-8e2d625c63b42cba5016e503027faf93fb898e91.zip
decor: initialise geom before using it for request
In mb_wm_decor_grab_handler when handling motion events we would use the motion events to request new client window geometry via mb_wm_client_request_geometry but we weren't initializing the width and height members which could result in the client being killed by the server when failing to allocate an obscene amount of memory.
-rw-r--r--matchbox/mb-wm-decor.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/matchbox/mb-wm-decor.c b/matchbox/mb-wm-decor.c
index fbb8244..26055bb 100644
--- a/matchbox/mb-wm-decor.c
+++ b/matchbox/mb-wm-decor.c
@@ -219,6 +219,8 @@ mb_wm_decor_grab_handler (XEvent *xev,
geom.x = closure->orig_x + diff_x;
geom.y = closure->orig_y + diff_y;
+ geom.width = decor->parent_client->frame_geometry.width;
+ geom.height = decor->parent_client->frame_geometry.height;
mb_wm_client_request_geometry (decor->parent_client,
&geom,