Add support for titlebar on right

This commit is contained in:
Julien Danjou 2008-03-16 18:00:49 +01:00
parent bb0fab396f
commit 720dabbaf6
2 changed files with 29 additions and 0 deletions

View File

@ -401,6 +401,15 @@ client_manage(Window w, XWindowAttributes *wa, int screen)
c->geometry.width + 2 * c->border,
0);
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:
break;
default:

View File

@ -86,6 +86,11 @@ titlebar_update(Client *c)
XFreePixmap(globalconf.display, c->titlebar.sw->drawable);
c->titlebar.sw->drawable = d;
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:
break;
}
@ -126,6 +131,13 @@ titlebar_update_geometry_floating(Client *c)
c->titlebar.sw->geometry.width,
c->geometry.height + 2 * c->border);
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);
@ -167,6 +179,14 @@ titlebar_update_geometry(Client *c, area_t geometry)
geometry.width -= c->titlebar.sw->geometry.width;
geometry.x += c->titlebar.sw->geometry.width;
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);