Merge pull request #4116 from ChickenPeanut/patch-1
Fixed BadValue with XCreateWindow
This commit is contained in:
commit
aa9ff84978
@ -594,16 +594,6 @@ void xf_FixWindowCoordinates(xfContext* xfc, int* x, int* y, int* width,
|
||||
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;
|
||||
@ -625,6 +615,16 @@ void xf_FixWindowCoordinates(xfContext* xfc, int* x, int* y, int* width,
|
||||
{
|
||||
*height = vscreen_height;
|
||||
}
|
||||
|
||||
if (*width < 1)
|
||||
{
|
||||
*width = 1;
|
||||
}
|
||||
|
||||
if (*height < 1)
|
||||
{
|
||||
*height = 1;
|
||||
}
|
||||
}
|
||||
|
||||
int xf_AppWindowInit(xfContext* xfc, xfAppWindow* appWindow)
|
||||
|
Loading…
Reference in New Issue
Block a user