get_screen_info get screen as arg
This commit is contained in:
parent
e4e8a2966f
commit
f4cb327f6d
|
@ -93,7 +93,7 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
|
|||
ScreenInfo *screens_info = NULL;
|
||||
Client *c;
|
||||
|
||||
screens_info = get_screen_info(disp, awesomeconf->statusbar, &screen_numbers);
|
||||
screens_info = get_screen_info(disp, DefaultScreen(disp), awesomeconf->statusbar, &screen_numbers);
|
||||
|
||||
for(n = 0, c = clients; c; c = c->next)
|
||||
if(IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags))
|
||||
|
|
9
screen.c
9
screen.c
|
@ -24,12 +24,13 @@
|
|||
|
||||
/** Get screens info
|
||||
* \param disp Display ref
|
||||
* \param screen Screen number
|
||||
* \param statusbar statusbar
|
||||
* \param screen_number int pointer filled with number of screens
|
||||
* \return ScreenInfo struct array with all screens info
|
||||
*/
|
||||
ScreenInfo *
|
||||
get_screen_info(Display *disp, Statusbar statusbar, int *screen_number)
|
||||
get_screen_info(Display *disp, int screen, Statusbar statusbar, int *screen_number)
|
||||
{
|
||||
int i;
|
||||
ScreenInfo *si;
|
||||
|
@ -40,9 +41,9 @@ get_screen_info(Display *disp, Statusbar statusbar, int *screen_number)
|
|||
{
|
||||
/* emulate Xinerama info */
|
||||
*screen_number = 1;
|
||||
si = p_new(XineramaScreenInfo, 1);
|
||||
si->width = DisplayWidth(disp, DefaultScreen(disp));
|
||||
si->height = DisplayHeight(disp, DefaultScreen(disp));
|
||||
si = p_new(ScreenInfo, 1);
|
||||
si->width = DisplayWidth(disp, screen);
|
||||
si->height = DisplayHeight(disp, screen);
|
||||
si->x_org = 0;
|
||||
si->y_org = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue