remove screen from layouts arrange() arg

This commit is contained in:
Julien Danjou 2007-09-17 14:07:31 +02:00
parent d9523d3436
commit d967edfec9
8 changed files with 24 additions and 24 deletions

View File

@ -65,7 +65,7 @@ typedef struct awesome_config awesome_config;
typedef struct typedef struct
{ {
char *symbol; char *symbol;
void (*arrange) (Display *, int, awesome_config *); void (*arrange) (Display *, awesome_config *);
} Layout; } Layout;
typedef struct typedef struct

View File

@ -45,7 +45,7 @@ arrange(Display * disp, DC *drawcontext, awesome_config *awesomeconf)
else if(c->screen == awesomeconf->screen) else if(c->screen == awesomeconf->screen)
ban(c); ban(c);
} }
awesomeconf->current_layout->arrange(disp, awesomeconf->screen, awesomeconf); awesomeconf->current_layout->arrange(disp, awesomeconf);
focus(disp, drawcontext, NULL, True, awesomeconf); focus(disp, drawcontext, NULL, True, awesomeconf);
restack(disp, drawcontext, awesomeconf); restack(disp, drawcontext, awesomeconf);
} }

View File

@ -27,12 +27,12 @@
extern Client *clients; /* global client */ extern Client *clients; /* global client */
void void
floating(Display *disp __attribute__ ((unused)), int screen, awesome_config *awesomeconf) floating(Display *disp __attribute__ ((unused)), awesome_config *awesomeconf)
{ /* default floating layout */ { /* default floating layout */
Client *c; Client *c;
for(c = clients; c; c = c->next) for(c = clients; c; c = c->next)
if(isvisible(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) if(isvisible(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags))
{ {
if(c->ftview) if(c->ftview)
{ {

View File

@ -23,6 +23,6 @@
#ifndef AWESOME_FLOATING_H #ifndef AWESOME_FLOATING_H
#define AWESOME_FLOATING_H #define AWESOME_FLOATING_H
void floating(Display *, int, awesome_config *); /* floating layout */ void floating(Display *, awesome_config *); /* floating layout */
#endif #endif

View File

@ -28,7 +28,7 @@
extern Client *clients; /* global client list */ extern Client *clients; /* global client list */
static void static void
fibonacci(Display *disp, int screen, awesome_config *awesomeconf, int shape) fibonacci(Display *disp, awesome_config *awesomeconf, int shape)
{ {
int n, nx, ny, nh, nw, i; int n, nx, ny, nh, nw, i;
Client *c; Client *c;
@ -38,12 +38,12 @@ fibonacci(Display *disp, int screen, awesome_config *awesomeconf, int shape)
nw = get_windows_area_width(disp, awesomeconf->statusbar); nw = get_windows_area_width(disp, awesomeconf->statusbar);
nh = get_windows_area_height(disp, awesomeconf->statusbar); nh = get_windows_area_height(disp, awesomeconf->statusbar);
for(n = 0, c = clients; c; c = c->next) for(n = 0, c = clients; c; c = c->next)
if(IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) if(IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags))
n++; n++;
for(i = 0, c = clients; c; c = c->next) for(i = 0, c = clients; c; c = c->next)
{ {
if(!IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) if(!IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags))
continue; continue;
c->ismax = False; c->ismax = False;
@ -87,13 +87,13 @@ fibonacci(Display *disp, int screen, awesome_config *awesomeconf, int shape)
void void
dwindle(Display *disp, int screen, awesome_config *awesomeconf) dwindle(Display *disp, awesome_config *awesomeconf)
{ {
fibonacci(disp, screen, awesomeconf, 1); fibonacci(disp, awesomeconf, 1);
} }
void void
spiral(Display *disp, int screen, awesome_config *awesomeconf) spiral(Display *disp, awesome_config *awesomeconf)
{ {
fibonacci(disp, screen, awesomeconf, 0); fibonacci(disp, awesomeconf, 0);
} }

View File

@ -23,7 +23,7 @@
#ifndef AWESOME_SPIRAL_H #ifndef AWESOME_SPIRAL_H
#define AWESOME_SPIRAL_H #define AWESOME_SPIRAL_H
void dwindle(Display *, int, awesome_config *); /* dwindle windows */ void dwindle(Display *, awesome_config *); /* dwindle windows */
void spiral(Display *, int, awesome_config *); /* spiral windows */ void spiral(Display *, awesome_config *); /* spiral windows */
#endif #endif

View File

@ -79,7 +79,7 @@ uicb_setmwfact(Display *disp,
} }
static void static void
_tile(Display *disp, int screen, awesome_config *awesomeconf, const Bool right) _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
{ {
/* windows area geometry */ /* windows area geometry */
int wah = 0, waw = 0, wax = 0, way = 0; int wah = 0, waw = 0, wax = 0, way = 0;
@ -93,15 +93,15 @@ _tile(Display *disp, int screen, awesome_config *awesomeconf, const Bool right)
ScreenInfo *screens_info = NULL; ScreenInfo *screens_info = NULL;
Client *c; Client *c;
screens_info = get_screen_info(disp, screen, awesomeconf->statusbar, &screen_numbers); screens_info = get_screen_info(disp, awesomeconf->screen, 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, screen, awesomeconf->selected_tags, awesomeconf->ntags)) if(IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags))
n++; n++;
for(i = 0, c = clients; c; c = c->next) for(i = 0, c = clients; c; c = c->next)
{ {
if(!IS_TILED(c, screen, awesomeconf->selected_tags, awesomeconf->ntags)) if(!IS_TILED(c, awesomeconf->screen, awesomeconf->selected_tags, awesomeconf->ntags))
continue; continue;
if(use_screen == -1 if(use_screen == -1
@ -192,13 +192,13 @@ _tile(Display *disp, int screen, awesome_config *awesomeconf, const Bool right)
} }
void void
tile(Display *disp, int screen, awesome_config *awesomeconf) tile(Display *disp, awesome_config *awesomeconf)
{ {
_tile(disp, screen, awesomeconf, True); _tile(disp, awesomeconf, True);
} }
void void
tileleft(Display *disp, int screen, awesome_config *awesomeconf) tileleft(Display *disp, awesome_config *awesomeconf)
{ {
_tile(disp, screen, awesomeconf, False); _tile(disp, awesomeconf, False);
} }

View File

@ -28,7 +28,7 @@
void uicb_setnmaster(Display *, DC *, awesome_config *, const char *); /* change number of master windows */ void uicb_setnmaster(Display *, DC *, awesome_config *, const char *); /* change number of master windows */
void uicb_setncols(Display *, DC *, awesome_config *, const char *); void uicb_setncols(Display *, DC *, awesome_config *, const char *);
void uicb_setmwfact(Display *, DC *, awesome_config *, const char *); /* sets master width factor */ void uicb_setmwfact(Display *, DC *, awesome_config *, const char *); /* sets master width factor */
void tile(Display *, int, awesome_config *); void tile(Display *, awesome_config *);
void tileleft(Display *, int, awesome_config *); void tileleft(Display *, awesome_config *);
#endif #endif