Major refactoring in preparation for bar modules
This commit is contained in:
@@ -5,18 +5,18 @@ holdbar(const Arg *arg)
|
||||
return;
|
||||
selmon->showbar = 2;
|
||||
updateholdbarpos(selmon);
|
||||
#if BARPADDING_PATCH
|
||||
#if BAR_PADDING_PATCH
|
||||
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx + sp, selmon->by + vp, selmon->ww - 2 * sp, bh);
|
||||
#else
|
||||
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
|
||||
#endif // BARPADDING_PATCH
|
||||
#if EXTRABAR_PATCH
|
||||
#if BARPADDING_PATCH
|
||||
#endif // BAR_PADDING_PATCH
|
||||
#if BAR_EXTRABAR_PATCH
|
||||
#if BAR_PADDING_PATCH
|
||||
XMoveResizeWindow(dpy, selmon->extrabarwin, selmon->wx + sp, selmon->eby - vp, selmon->ww - 2 * sp, bh);
|
||||
#else
|
||||
XMoveResizeWindow(dpy, selmon->extrabarwin, selmon->wx, selmon->eby, selmon->ww, bh);
|
||||
#endif // BARPADDING_PATCH
|
||||
#endif // EXTRABAR_PATCH
|
||||
#endif // BAR_PADDING_PATCH
|
||||
#endif // BAR_EXTRABAR_PATCH
|
||||
}
|
||||
|
||||
void
|
||||
@@ -35,18 +35,18 @@ keyrelease(XEvent *e)
|
||||
if (e->xkey.keycode == XKeysymToKeycode(dpy, HOLDKEY) && selmon->showbar == 2) {
|
||||
selmon->showbar = 0;
|
||||
updateholdbarpos(selmon);
|
||||
#if BARPADDING_PATCH
|
||||
#if BAR_PADDING_PATCH
|
||||
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx + sp, selmon->by + vp, selmon->ww - 2 * sp, bh);
|
||||
#else
|
||||
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
|
||||
#endif // BARPADDING_PATCH
|
||||
#if EXTRABAR_PATCH
|
||||
#if BARPADDING_PATCH
|
||||
#endif // BAR_PADDING_PATCH
|
||||
#if BAR_EXTRABAR_PATCH
|
||||
#if BAR_PADDING_PATCH
|
||||
XMoveResizeWindow(dpy, selmon->extrabarwin, selmon->wx + sp, selmon->eby - vp, selmon->ww - 2 * sp, bh);
|
||||
#else
|
||||
XMoveResizeWindow(dpy, selmon->extrabarwin, selmon->wx, selmon->eby, selmon->ww, bh);
|
||||
#endif // BARPADDING_PATCH
|
||||
#endif // EXTRABAR_PATCH
|
||||
#endif // BAR_PADDING_PATCH
|
||||
#endif // BAR_EXTRABAR_PATCH
|
||||
arrange(selmon);
|
||||
}
|
||||
#if COMBO_PATCH
|
||||
@@ -59,8 +59,8 @@ updateholdbarpos(Monitor *m)
|
||||
{
|
||||
m->wy = m->my;
|
||||
m->wh = m->mh;
|
||||
#if EXTRABAR_PATCH
|
||||
#if BARPADDING_PATCH
|
||||
#if BAR_EXTRABAR_PATCH
|
||||
#if BAR_PADDING_PATCH
|
||||
m->wh = m->wh - vertpad * m->showbar * 2 - bh * m->showbar * 2;
|
||||
m->wy = m->showbar ? m->wy + bh + vertpad: m->wy;
|
||||
if (m->showbar) {
|
||||
@@ -80,8 +80,8 @@ updateholdbarpos(Monitor *m)
|
||||
m->by = -bh;
|
||||
m->eby = -bh;
|
||||
}
|
||||
#endif // BARPADDING_PATCH
|
||||
#elif BARPADDING_PATCH
|
||||
#endif // BAR_PADDING_PATCH
|
||||
#elif BAR_PADDING_PATCH
|
||||
if (m->showbar) {
|
||||
m->wh = m->wh - vertpad - bh;
|
||||
m->by = m->topbar ? m->wy : m->wy + m->wh + vertpad;
|
||||
@@ -95,5 +95,5 @@ updateholdbarpos(Monitor *m)
|
||||
m->wy = m->topbar ? m->wy + bh : m->wy;
|
||||
} else
|
||||
m->by = -bh;
|
||||
#endif // EXTRABAR_PATCH
|
||||
#endif // BAR_EXTRABAR_PATCH
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user