add DC to arrange()
This commit is contained in:
parent
9897e5a839
commit
de3fdc02d8
4
client.c
4
client.c
|
@ -406,7 +406,7 @@ manage(Display * disp, DC *drawcontext, Window w, XWindowAttributes * wa, awesom
|
|||
attachstack(c);
|
||||
XMoveResizeWindow(disp, c->win, c->x, c->y, c->w, c->h); /* some windows require this */
|
||||
ban(c);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, drawcontext, awesomeconf);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -566,7 +566,7 @@ unmanage(Client * c, DC *drawcontext, long state, awesome_config *awesomeconf)
|
|||
XSetErrorHandler(xerror);
|
||||
XUngrabServer(c->display);
|
||||
if(state != NormalState)
|
||||
arrange(c->display, awesomeconf);
|
||||
arrange(c->display, drawcontext, awesomeconf);
|
||||
p_delete(&c->tags);
|
||||
p_delete(&c);
|
||||
}
|
||||
|
|
4
event.c
4
event.c
|
@ -265,7 +265,7 @@ handle_event_configurenotify(XEvent * e, awesome_config *awesomeconf)
|
|||
XResizeWindow(e->xany.display, awesomeconf->statusbar.window,
|
||||
DisplayWidth(e->xany.display, DefaultScreen(e->xany.display)), awesomeconf->statusbar.height);
|
||||
updatebarpos(e->xany.display, awesomeconf->statusbar);
|
||||
arrange(e->xany.display, awesomeconf);
|
||||
arrange(e->xany.display, &dc, awesomeconf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ handle_event_propertynotify(XEvent * e, awesome_config *awesomeconf)
|
|||
case XA_WM_TRANSIENT_FOR:
|
||||
XGetTransientForHint(e->xany.display, c->win, &trans);
|
||||
if(!c->isfloating && (c->isfloating = (getclient(trans) != NULL)))
|
||||
arrange(e->xany.display, awesomeconf);
|
||||
arrange(e->xany.display, &dc, awesomeconf);
|
||||
break;
|
||||
case XA_WM_NORMAL_HINTS:
|
||||
updatesizehints(c);
|
||||
|
|
10
layout.c
10
layout.c
|
@ -32,7 +32,7 @@ extern Client *clients, *sel; /* global client list */
|
|||
extern DC dc;
|
||||
|
||||
void
|
||||
arrange(Display * disp, awesome_config *awesomeconf)
|
||||
arrange(Display * disp, DC *drawcontext, awesome_config *awesomeconf)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
|
@ -42,7 +42,7 @@ arrange(Display * disp, awesome_config *awesomeconf)
|
|||
else
|
||||
ban(c);
|
||||
awesomeconf->current_layout->arrange(disp, awesomeconf);
|
||||
focus(disp, &dc, NULL, True, awesomeconf);
|
||||
focus(disp, drawcontext, NULL, True, awesomeconf);
|
||||
restack(disp, awesomeconf);
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ uicb_setlayout(Display *disp, awesome_config * awesomeconf, const char *arg)
|
|||
c->ftview = True;
|
||||
|
||||
if(sel)
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
else
|
||||
drawstatus(disp, &dc, awesomeconf);
|
||||
|
||||
|
@ -195,7 +195,7 @@ uicb_togglebar(Display *disp,
|
|||
else
|
||||
awesomeconf->statusbar.position = BarOff;
|
||||
updatebarpos(disp, awesomeconf->statusbar);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -274,6 +274,6 @@ uicb_zoom(Display *disp __attribute__ ((unused)),
|
|||
detach(sel);
|
||||
attach(sel);
|
||||
focus(sel->display, &dc, sel, True, awesomeconf);
|
||||
arrange(sel->display, awesomeconf);
|
||||
arrange(sel->display, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
|
|
2
layout.h
2
layout.h
|
@ -29,7 +29,7 @@
|
|||
|
||||
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
|
||||
|
||||
void arrange(Display *, awesome_config *); /* arranges all windows depending on the layout in use */
|
||||
void arrange(Display *, DC *, awesome_config *); /* arranges all windows depending on the layout in use */
|
||||
void restack(Display *, awesome_config *); /* restores z layers of all clients */
|
||||
void uicb_focusnext(Display *, awesome_config *, const char *); /* focuses next visible client */
|
||||
void uicb_focusprev(Display *, awesome_config *, const char *); /* focuses prev visible client */
|
||||
|
|
|
@ -59,7 +59,7 @@ uicb_setnmaster(Display *disp,
|
|||
return;
|
||||
}
|
||||
if(sel)
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
else
|
||||
drawstatus(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ uicb_setmwfact(Display *disp,
|
|||
else if(mwfact > 0.9)
|
||||
mwfact = 0.9;
|
||||
}
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
17
tag.c
17
tag.c
|
@ -26,6 +26,7 @@
|
|||
#include "tag.h"
|
||||
|
||||
extern Client *sel; /* global client list */
|
||||
extern DC dc;
|
||||
|
||||
static Regs *regs = NULL;
|
||||
|
||||
|
@ -155,7 +156,7 @@ uicb_tag(Display *disp, awesome_config *awesomeconf, const char *arg)
|
|||
if(i >= 0 && i < awesomeconf->ntags)
|
||||
sel->tags[i] = True;
|
||||
saveprops(sel, awesomeconf->ntags);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
/** Toggle floating state of a client
|
||||
|
@ -183,7 +184,7 @@ uicb_togglefloating(Display *disp,
|
|||
sel->rh = sel->h;
|
||||
}
|
||||
saveprops(sel, awesomeconf->ntags);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
/** Toggle tag view
|
||||
|
@ -207,7 +208,7 @@ uicb_toggletag(Display *disp,
|
|||
if(j == awesomeconf->ntags)
|
||||
sel->tags[i] = True;
|
||||
saveprops(sel, awesomeconf->ntags);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
/** Add a tag to viewed tags
|
||||
|
@ -229,7 +230,7 @@ uicb_toggleview(Display *disp,
|
|||
if(j == awesomeconf->ntags)
|
||||
awesomeconf->selected_tags[i] = True; /* cannot toggle last view */
|
||||
saveawesomeprops(disp, awesomeconf);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
/** View tag
|
||||
|
@ -257,7 +258,7 @@ uicb_view(Display *disp,
|
|||
awesomeconf->current_layout = awesomeconf->tag_layouts[i];
|
||||
}
|
||||
saveawesomeprops(disp, awesomeconf);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
/** View previously selected tags
|
||||
|
@ -280,7 +281,7 @@ uicb_viewprevtags(Display * disp,
|
|||
awesomeconf->selected_tags[i] = awesomeconf->prev_selected_tags[i];
|
||||
awesomeconf->prev_selected_tags[i] = t;
|
||||
}
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
/** View next tag
|
||||
|
@ -306,7 +307,7 @@ uicb_tag_viewnext(Display *disp,
|
|||
firsttag = 0;
|
||||
awesomeconf->selected_tags[firsttag] = True;
|
||||
saveawesomeprops(disp, awesomeconf);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
||||
/** View previous tag
|
||||
|
@ -332,5 +333,5 @@ uicb_tag_viewprev(Display *disp,
|
|||
firsttag = awesomeconf->ntags - 1;
|
||||
awesomeconf->selected_tags[firsttag] = True;
|
||||
saveawesomeprops(disp, awesomeconf);
|
||||
arrange(disp, awesomeconf);
|
||||
arrange(disp, &dc, awesomeconf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue