rename get_current_layout to layout_get_current()
This commit is contained in:
parent
e0099da269
commit
1b63e8a3c5
8
client.c
8
client.c
|
@ -508,7 +508,7 @@ client_resize(Client *c, Area geometry, Bool sizehints)
|
||||||
/* save the floating geometry if the window is floating but not
|
/* save the floating geometry if the window is floating but not
|
||||||
* maximized */
|
* maximized */
|
||||||
if((c->isfloating ||
|
if((c->isfloating ||
|
||||||
get_current_layout(new_screen)->arrange == layout_floating) && !c->ismax)
|
layout_get_current(new_screen)->arrange == layout_floating) && !c->ismax)
|
||||||
c->f_geometry = geometry;
|
c->f_geometry = geometry;
|
||||||
|
|
||||||
XConfigureWindow(globalconf.display, c->win,
|
XConfigureWindow(globalconf.display, c->win,
|
||||||
|
@ -847,7 +847,7 @@ uicb_client_moveresize(int screen, char *arg)
|
||||||
Window dummy;
|
Window dummy;
|
||||||
Area area;
|
Area area;
|
||||||
Client *sel = globalconf.focus->client;
|
Client *sel = globalconf.focus->client;
|
||||||
Layout *curlay = get_current_layout(screen);
|
Layout *curlay = layout_get_current(screen);
|
||||||
|
|
||||||
if(curlay->arrange != layout_floating ||
|
if(curlay->arrange != layout_floating ||
|
||||||
!sel || !sel->isfloating || sel->isfixed || !arg)
|
!sel || !sel->isfloating || sel->isfixed || !arg)
|
||||||
|
@ -922,7 +922,7 @@ client_maximize(Client *c, Area geometry)
|
||||||
{
|
{
|
||||||
c->wasfloating = c->isfloating;
|
c->wasfloating = c->isfloating;
|
||||||
c->m_geometry = c->geometry;
|
c->m_geometry = c->geometry;
|
||||||
if(get_current_layout(c->screen)->arrange != layout_floating)
|
if(layout_get_current(c->screen)->arrange != layout_floating)
|
||||||
client_setfloating(c, True);
|
client_setfloating(c, True);
|
||||||
client_focus(c, c->screen, True);
|
client_focus(c, c->screen, True);
|
||||||
client_resize(c, geometry, False);
|
client_resize(c, geometry, False);
|
||||||
|
@ -934,7 +934,7 @@ client_maximize(Client *c, Area geometry)
|
||||||
client_resize(c, c->m_geometry, False);
|
client_resize(c, c->m_geometry, False);
|
||||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||||
}
|
}
|
||||||
else if(get_current_layout(c->screen)->arrange == layout_floating)
|
else if(layout_get_current(c->screen)->arrange == layout_floating)
|
||||||
{
|
{
|
||||||
client_resize(c, c->m_geometry, False);
|
client_resize(c, c->m_geometry, False);
|
||||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||||
|
|
4
layout.c
4
layout.c
|
@ -45,7 +45,7 @@ static void
|
||||||
arrange(int screen)
|
arrange(int screen)
|
||||||
{
|
{
|
||||||
Client *c;
|
Client *c;
|
||||||
Layout *curlay = get_current_layout(screen);
|
Layout *curlay = layout_get_current(screen);
|
||||||
unsigned int dui;
|
unsigned int dui;
|
||||||
int di, x, y;
|
int di, x, y;
|
||||||
Window rootwin, childwin;
|
Window rootwin, childwin;
|
||||||
|
@ -103,7 +103,7 @@ layout_refresh(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
Layout *
|
Layout *
|
||||||
get_current_layout(int screen)
|
layout_get_current(int screen)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
Tag **curtags = tags_get_current(screen);
|
||||||
Layout *l = curtags[0]->layout;
|
Layout *l = curtags[0]->layout;
|
||||||
|
|
2
layout.h
2
layout.h
|
@ -41,7 +41,7 @@ struct Layout
|
||||||
DO_SLIST(Layout, layout, p_delete);
|
DO_SLIST(Layout, layout, p_delete);
|
||||||
|
|
||||||
int layout_refresh(void);
|
int layout_refresh(void);
|
||||||
Layout * get_current_layout(int);
|
Layout * layout_get_current(int);
|
||||||
void loadawesomeprops(int);
|
void loadawesomeprops(int);
|
||||||
void saveawesomeprops(int);
|
void saveawesomeprops(int);
|
||||||
|
|
||||||
|
|
2
mouse.c
2
mouse.c
|
@ -49,7 +49,7 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
Area area, geometry;
|
Area area, geometry;
|
||||||
Client *c = globalconf.focus->client, *target;
|
Client *c = globalconf.focus->client, *target;
|
||||||
Layout *layout = get_current_layout(screen);
|
Layout *layout = layout_get_current(screen);
|
||||||
|
|
||||||
if(!c)
|
if(!c)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue