introduce get_screen_count(...) function

This commit is contained in:
Julien Danjou 2007-09-27 15:29:14 +02:00
parent ca16334351
commit 4662cf109e
2 changed files with 18 additions and 0 deletions

View File

@ -121,6 +121,23 @@ get_screen_bycoord(Display *disp, int x, int y)
return -1; return -1;
} }
/** Return the actual screen count
* \param disp Display ref
* \return the number of screen available
*/
int
get_screen_count(Display *disp)
{
int screen_number;
if(XineramaIsActive(disp))
XineramaQueryScreens(disp, &screen_number);
else
return ScreenCount(disp);
return screen_number;
}
void void
uicb_focusnextscreen(Display *disp, uicb_focusnextscreen(Display *disp,
DC *drawcontext, DC *drawcontext,

View File

@ -31,6 +31,7 @@ typedef XineramaScreenInfo ScreenInfo;
ScreenInfo * get_screen_info(Display *, int, Statusbar *, int *); ScreenInfo * get_screen_info(Display *, int, Statusbar *, int *);
ScreenInfo * get_display_info(Display *, int, Statusbar); ScreenInfo * get_display_info(Display *, int, Statusbar);
int get_screen_bycoord(Display *, int, int); int get_screen_bycoord(Display *, int, int);
int get_screen_count(Display *);
UICB_PROTO(uicb_focusnextscreen); UICB_PROTO(uicb_focusnextscreen);
UICB_PROTO(uicb_focusprevscreen); UICB_PROTO(uicb_focusprevscreen);