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,7 +2486,8 @@ 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);
|
||||
|
@ -2494,16 +2495,21 @@ static Boolean GetXineramaScreenDimensions(
|
|||
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;
|
||||
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 */
|
||||
|
|
Loading…
Reference in a new issue