1
0
Fork 0

2008-05-26 Matthew Allum <mallum@openedhand.com>

* clutter/x11/clutter-stage-x11.c: (clutter_stage_x11_request_coords):
        Dont allow the window to be resize to 0 dimentions. (fixes #933)
This commit is contained in:
Matthew Allum 2008-05-26 20:55:53 +00:00
parent 4ef8d3bb5f
commit 94b2d6f664
2 changed files with 23 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2008-05-26 Matthew Allum <mallum@openedhand.com>
* clutter/x11/clutter-stage-x11.c: (clutter_stage_x11_request_coords):
Dont allow the window to be resize to 0 dimentions. (fixes #933)
2008-05-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug #912 - Invalid use of int* as parameter for glGetIntegerv

View file

@ -176,6 +176,19 @@ clutter_stage_x11_request_coords (ClutterActor *self,
new_width = ABS (CLUTTER_UNITS_TO_INT (box->x2 - box->x1));
new_height = ABS (CLUTTER_UNITS_TO_INT (box->y2 - box->y1));
/* X cant resize to 0 dimentions */
if (new_height == 0)
{
box->y2 = box->y1 + 1;
new_height = 1;
}
if (new_width == 0)
{
box->x2 = box->x1 + 1;
new_width = 1;
}
if (new_width != stage_x11->xwin_width
|| new_height != stage_x11->xwin_height)
{
@ -197,11 +210,11 @@ clutter_stage_x11_request_coords (ClutterActor *self,
if (stage_x11->xwin != None
&& !stage_x11->is_foreign_xwin
&& !stage_x11->handling_configure)
XResizeWindow (stage_x11->xdpy,
stage_x11->xwin,
stage_x11->xwin_width,
stage_x11->xwin_height);
XResizeWindow (stage_x11->xdpy,
stage_x11->xwin,
stage_x11->xwin_width,
stage_x11->xwin_height);
clutter_stage_x11_fix_window_size (stage_x11);
if (stage_x11->xpixmap != None)