xf_FixWindowCoordinates occasionally set the dimensions of the window to invalid values (0) because the minimum value check was done at the beginning of the method rather than at the end
vscreen_width = xfc->vscreen.area.right - xfc->vscreen.area.left + 1;
vscreen_height = xfc->vscreen.area.bottom - xfc->vscreen.area.top + 1;
- if (*width < 1)
- {
- *width = 1;
- }
-
- if (*height < 1)
- {
- *height = 1;
- }
-
if (*x < xfc->vscreen.area.left)
{
*width += *x;
{
*height = vscreen_height;
}
+
+ if (*width < 1)
+ {
+ *width = 1;
+ }
+
+ if (*height < 1)
+ {
+ *height = 1;
+ }
}
int xf_AppWindowInit(xfContext* xfc, xfAppWindow* appWindow)