remove display as arg of layouts
This commit is contained in:
parent
c4e130d7d9
commit
17cf2c230d
2
common.h
2
common.h
|
@ -28,6 +28,6 @@
|
||||||
#define UICB_PROTO(name) void name(awesome_config *, const char *)
|
#define UICB_PROTO(name) void name(awesome_config *, const char *)
|
||||||
|
|
||||||
/** Common prototype definition for layouts function */
|
/** Common prototype definition for layouts function */
|
||||||
#define LAYOUT_PROTO(name) void name(Display *, awesome_config *)
|
#define LAYOUT_PROTO(name) void name(awesome_config *)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
2
config.h
2
config.h
|
@ -49,7 +49,7 @@ typedef struct awesome_config awesome_config;
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
char *symbol;
|
char *symbol;
|
||||||
void (*arrange) (Display *, awesome_config *);
|
void (*arrange) (awesome_config *);
|
||||||
} Layout;
|
} Layout;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
2
layout.c
2
layout.c
|
@ -46,7 +46,7 @@ arrange(Display * disp, 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);
|
awesomeconf->current_layout->arrange(awesomeconf);
|
||||||
focus(disp, NULL, True, awesomeconf);
|
focus(disp, NULL, True, awesomeconf);
|
||||||
restack(disp, awesomeconf);
|
restack(disp, awesomeconf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
#include "layouts/floating.h"
|
#include "layouts/floating.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
layout_floating(Display *disp __attribute__ ((unused)), awesome_config *awesomeconf)
|
layout_floating(awesome_config *awesomeconf)
|
||||||
{ /* default floating layout */
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
|
|
||||||
for(c = *awesomeconf->clients; c; c = c->next)
|
for(c = *awesomeconf->clients; c; c = c->next)
|
||||||
|
|
|
@ -24,10 +24,10 @@
|
||||||
#include "layouts/max.h"
|
#include "layouts/max.h"
|
||||||
|
|
||||||
void
|
void
|
||||||
layout_max(Display *disp, awesome_config *awesomeconf)
|
layout_max(awesome_config *awesomeconf)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
ScreenInfo *si = get_screen_info(disp, awesomeconf->screen, &awesomeconf->statusbar);
|
ScreenInfo *si = get_screen_info(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar);
|
||||||
|
|
||||||
for(c = *awesomeconf->clients; c; c = c->next)
|
for(c = *awesomeconf->clients; c; c = c->next)
|
||||||
if(IS_TILED(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags))
|
if(IS_TILED(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags))
|
||||||
|
|
|
@ -83,7 +83,7 @@ uicb_setmwfact(awesome_config * awesomeconf,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_tile(Display *disp, awesome_config *awesomeconf, const Bool right)
|
_tile(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;
|
||||||
|
@ -96,7 +96,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->screen, &awesomeconf->statusbar);
|
screens_info = get_screen_info(awesomeconf->display, awesomeconf->screen, &awesomeconf->statusbar);
|
||||||
|
|
||||||
for(n = 0, c = *awesomeconf->clients; c; c = c->next)
|
for(n = 0, c = *awesomeconf->clients; c; c = c->next)
|
||||||
if(IS_TILED(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags))
|
if(IS_TILED(c, awesomeconf->screen, awesomeconf->tags, awesomeconf->ntags))
|
||||||
|
@ -168,13 +168,13 @@ _tile(Display *disp, awesome_config *awesomeconf, const Bool right)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
layout_tile(Display *disp, awesome_config *awesomeconf)
|
layout_tile(awesome_config *awesomeconf)
|
||||||
{
|
{
|
||||||
_tile(disp, awesomeconf, True);
|
_tile(awesomeconf, True);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
layout_tileleft(Display *disp, awesome_config *awesomeconf)
|
layout_tileleft(awesome_config *awesomeconf)
|
||||||
{
|
{
|
||||||
_tile(disp, awesomeconf, False);
|
_tile(awesomeconf, False);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue