introduce get_screen_count(...) function
This commit is contained in:
parent
ca16334351
commit
4662cf109e
17
screen.c
17
screen.c
|
@ -121,6 +121,23 @@ get_screen_bycoord(Display *disp, int x, int y)
|
|||
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
|
||||
uicb_focusnextscreen(Display *disp,
|
||||
DC *drawcontext,
|
||||
|
|
1
screen.h
1
screen.h
|
@ -31,6 +31,7 @@ typedef XineramaScreenInfo ScreenInfo;
|
|||
ScreenInfo * get_screen_info(Display *, int, Statusbar *, int *);
|
||||
ScreenInfo * get_display_info(Display *, int, Statusbar);
|
||||
int get_screen_bycoord(Display *, int, int);
|
||||
int get_screen_count(Display *);
|
||||
UICB_PROTO(uicb_focusnextscreen);
|
||||
UICB_PROTO(uicb_focusprevscreen);
|
||||
|
||||
|
|
Loading…
Reference in New Issue