Add support for titlebar on right
This commit is contained in:
parent
bb0fab396f
commit
720dabbaf6
9
client.c
9
client.c
|
@ -401,6 +401,15 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
|
||||||
c->geometry.width + 2 * c->border,
|
c->geometry.width + 2 * c->border,
|
||||||
0);
|
0);
|
||||||
break;
|
break;
|
||||||
|
case Right:
|
||||||
|
c->titlebar.sw = simplewindow_new(globalconf.display,
|
||||||
|
phys_screen,
|
||||||
|
c->geometry.x + c->geometry.width + 2 * c->border,
|
||||||
|
c->geometry.y,
|
||||||
|
titlebar_height,
|
||||||
|
c->geometry.width + 2 * c->border,
|
||||||
|
0);
|
||||||
|
break;
|
||||||
case Off:
|
case Off:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
20
titlebar.c
20
titlebar.c
|
@ -86,6 +86,11 @@ titlebar_update(Client *c)
|
||||||
XFreePixmap(globalconf.display, c->titlebar.sw->drawable);
|
XFreePixmap(globalconf.display, c->titlebar.sw->drawable);
|
||||||
c->titlebar.sw->drawable = d;
|
c->titlebar.sw->drawable = d;
|
||||||
break;
|
break;
|
||||||
|
case Right:
|
||||||
|
d = draw_rotate(ctx, c->titlebar.sw->phys_screen, M_PI_2,
|
||||||
|
c->titlebar.sw->geometry.width, 0);
|
||||||
|
XFreePixmap(globalconf.display, c->titlebar.sw->drawable);
|
||||||
|
c->titlebar.sw->drawable = d;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -126,6 +131,13 @@ titlebar_update_geometry_floating(Client *c)
|
||||||
c->titlebar.sw->geometry.width,
|
c->titlebar.sw->geometry.width,
|
||||||
c->geometry.height + 2 * c->border);
|
c->geometry.height + 2 * c->border);
|
||||||
break;
|
break;
|
||||||
|
case Right:
|
||||||
|
simplewindow_move_resize(c->titlebar.sw,
|
||||||
|
c->geometry.x + c->geometry.width + 2 * c->border,
|
||||||
|
c->geometry.y,
|
||||||
|
c->titlebar.sw->geometry.width,
|
||||||
|
c->geometry.height + 2 * c->border);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
titlebar_update(c);
|
titlebar_update(c);
|
||||||
|
@ -167,6 +179,14 @@ titlebar_update_geometry(Client *c, area_t geometry)
|
||||||
geometry.width -= c->titlebar.sw->geometry.width;
|
geometry.width -= c->titlebar.sw->geometry.width;
|
||||||
geometry.x += c->titlebar.sw->geometry.width;
|
geometry.x += c->titlebar.sw->geometry.width;
|
||||||
break;
|
break;
|
||||||
|
case Right:
|
||||||
|
geometry.width -= c->titlebar.sw->geometry.width;
|
||||||
|
simplewindow_move_resize(c->titlebar.sw,
|
||||||
|
geometry.x + geometry.width + 2 * c->border,
|
||||||
|
geometry.y,
|
||||||
|
c->titlebar.sw->geometry.width,
|
||||||
|
geometry.height + 2 * c->border);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
titlebar_update(c);
|
titlebar_update(c);
|
||||||
|
|
Loading…
Reference in New Issue