introduce get_real_scree()

This commit is contained in:
Julien Danjou 2007-09-28 11:36:39 +02:00
parent 8112ec2cca
commit d4211d3bfb
2 changed files with 15 additions and 0 deletions

View File

@ -138,6 +138,20 @@ get_screen_count(Display *disp)
return screen_number; return screen_number;
} }
/** This returns the real X screen number for a logical
* screen if Xinerama is active.
* \param disp Display ref
* \param screen the logical screen
* \return the X screen
*/
int
get_real_screen(Display *disp, int screen)
{
if(XineramaIsActive(disp))
return DefaultScreen(disp);
return screen;
}
void void
move_client_to_screen(Client *c, awesome_config *acf_new) move_client_to_screen(Client *c, awesome_config *acf_new)
{ {

View File

@ -32,6 +32,7 @@ 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 *); int get_screen_count(Display *);
int get_real_screen(Display *, int);
void move_client_to_screen(Client *, awesome_config *); void move_client_to_screen(Client *, awesome_config *);
UICB_PROTO(uicb_focusnextscreen); UICB_PROTO(uicb_focusnextscreen);
UICB_PROTO(uicb_focusprevscreen); UICB_PROTO(uicb_focusprevscreen);