1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

dtfile/Encaps: CID 174844

This commit is contained in:
Jon Trulson 2018-04-11 16:12:52 -06:00
parent d8d8508fe3
commit 7c3c03388a

View file

@ -2486,24 +2486,30 @@ static Boolean GetXineramaScreenDimensions(
unsigned int wx, wy;
unsigned int i, sx, sy, sw, sh;
while(w && !XtIsShell(w)) w=XtParent (w);
while (w && !XtIsShell(w))
w=XtParent (w);
wx=XtX(w);
wy=XtY(w);
if(!(dt_xi=_DtXineramaInit(XtDisplay(w)))) return False;
if (!(dt_xi=_DtXineramaInit(XtDisplay(w)))) return False;
for(i=0; i<dt_xi->numscreens; i++){
if(!_DtXineramaGetScreen(dt_xi,i,&sw,&sh,&sx,&sy))break;
for (i=0; i<dt_xi->numscreens; i++){
if (!_DtXineramaGetScreen(dt_xi,i,&sw,&sh,&sx,&sy))
break;
if(wx>=sx && wx<(sx+sw) && wy>=sy && wy<(sy+sh)){
if (wx>=sx && wx<(sx+sw) && wy>=sy && wy<(sy+sh))
{
*s_width=(int)sw;
*s_height=(int)sh;
*org_x=(int)sx;
*org_y=(int)sy;
free(dt_xi);
return True;
}
}
free(dt_xi);
return False;
}
#endif /* USE_XINERAMA */