get_screen_info get screen as arg

This commit is contained in:
Julien Danjou 2007-09-15 23:09:02 +02:00
parent e4e8a2966f
commit f4cb327f6d
3 changed files with 7 additions and 6 deletions

View File

@ -93,7 +93,7 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
ScreenInfo *screens_info = NULL; ScreenInfo *screens_info = NULL;
Client *c; 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) for(n = 0, c = clients; c; c = c->next)
if(IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags)) if(IS_TILED(c, awesomeconf->selected_tags, awesomeconf->ntags))

View File

@ -24,12 +24,13 @@
/** Get screens info /** Get screens info
* \param disp Display ref * \param disp Display ref
* \param screen Screen number
* \param statusbar statusbar * \param statusbar statusbar
* \param screen_number int pointer filled with number of screens * \param screen_number int pointer filled with number of screens
* \return ScreenInfo struct array with all screens info * \return ScreenInfo struct array with all screens info
*/ */
ScreenInfo * 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; int i;
ScreenInfo *si; ScreenInfo *si;
@ -40,9 +41,9 @@ get_screen_info(Display *disp, Statusbar statusbar, int *screen_number)
{ {
/* emulate Xinerama info */ /* emulate Xinerama info */
*screen_number = 1; *screen_number = 1;
si = p_new(XineramaScreenInfo, 1); si = p_new(ScreenInfo, 1);
si->width = DisplayWidth(disp, DefaultScreen(disp)); si->width = DisplayWidth(disp, screen);
si->height = DisplayHeight(disp, DefaultScreen(disp)); si->height = DisplayHeight(disp, screen);
si->x_org = 0; si->x_org = 0;
si->y_org = 0; si->y_org = 0;
} }

View File

@ -29,7 +29,7 @@
typedef XineramaScreenInfo ScreenInfo; typedef XineramaScreenInfo ScreenInfo;
ScreenInfo * get_screen_info(Display *, Statusbar, int *); ScreenInfo * get_screen_info(Display *, int, Statusbar, int *);
ScreenInfo * get_display_info(Display *disp, int, Statusbar statusbar); ScreenInfo * get_display_info(Display *disp, int, Statusbar statusbar);
#endif #endif