From f4cb327f6d8eefebd2a12bba5f8909362b9e7b10 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sat, 15 Sep 2007 23:09:02 +0200 Subject: [PATCH] get_screen_info get screen as arg --- layouts/tile.c | 2 +- screen.c | 9 +++++---- screen.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/layouts/tile.c b/layouts/tile.c index 6644155a9..a3afbb978 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -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)) diff --git a/screen.c b/screen.c index afb70b9ff..902bdacd2 100644 --- a/screen.c +++ b/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; } diff --git a/screen.h b/screen.h index 3cb791bb6..b37630200 100644 --- a/screen.h +++ b/screen.h @@ -29,7 +29,7 @@ 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); #endif