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:
parent
d8d8508fe3
commit
7c3c03388a
1 changed files with 12 additions and 6 deletions
|
@ -2486,24 +2486,30 @@ static Boolean GetXineramaScreenDimensions(
|
||||||
unsigned int wx, wy;
|
unsigned int wx, wy;
|
||||||
unsigned int i, sx, sy, sw, sh;
|
unsigned int i, sx, sy, sw, sh;
|
||||||
|
|
||||||
while(w && !XtIsShell(w)) w=XtParent (w);
|
while (w && !XtIsShell(w))
|
||||||
|
w=XtParent (w);
|
||||||
|
|
||||||
wx=XtX(w);
|
wx=XtX(w);
|
||||||
wy=XtY(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++){
|
for (i=0; i<dt_xi->numscreens; i++){
|
||||||
if(!_DtXineramaGetScreen(dt_xi,i,&sw,&sh,&sx,&sy))break;
|
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_width=(int)sw;
|
||||||
*s_height=(int)sh;
|
*s_height=(int)sh;
|
||||||
*org_x=(int)sx;
|
*org_x=(int)sx;
|
||||||
*org_y=(int)sy;
|
*org_y=(int)sy;
|
||||||
|
free(dt_xi);
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return False;
|
|
||||||
|
free(dt_xi);
|
||||||
|
return False;
|
||||||
}
|
}
|
||||||
#endif /* USE_XINERAMA */
|
#endif /* USE_XINERAMA */
|
||||||
|
|
Loading…
Reference in a new issue