mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Fix regression on titlebar positionned on left/right
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
4a7e52cc27
commit
951b93cc31
1 changed files with 9 additions and 8 deletions
17
titlebar.c
17
titlebar.c
|
@ -83,6 +83,7 @@ titlebar_init(Client *c)
|
||||||
void
|
void
|
||||||
titlebar_update(Client *c)
|
titlebar_update(Client *c)
|
||||||
{
|
{
|
||||||
|
Drawable dw = 0;
|
||||||
DrawCtx *ctx;
|
DrawCtx *ctx;
|
||||||
style_t style;
|
style_t style;
|
||||||
area_t geometry;
|
area_t geometry;
|
||||||
|
@ -96,17 +97,15 @@ titlebar_update(Client *c)
|
||||||
return;
|
return;
|
||||||
case Right:
|
case Right:
|
||||||
case Left:
|
case Left:
|
||||||
XFreePixmap(globalconf.display, c->titlebar.sw->drawable);
|
dw = XCreatePixmap(globalconf.display,
|
||||||
c->titlebar.sw->drawable =
|
RootWindow(globalconf.display, c->titlebar.sw->phys_screen),
|
||||||
XCreatePixmap(globalconf.display,
|
c->titlebar.sw->geometry.height,
|
||||||
RootWindow(globalconf.display, c->titlebar.sw->phys_screen),
|
c->titlebar.sw->geometry.width,
|
||||||
c->titlebar.sw->geometry.height,
|
DefaultDepth(globalconf.display, c->titlebar.sw->phys_screen));
|
||||||
c->titlebar.sw->geometry.width,
|
|
||||||
DefaultDepth(globalconf.display, c->titlebar.sw->phys_screen));
|
|
||||||
ctx = draw_context_new(globalconf.display, c->titlebar.sw->phys_screen,
|
ctx = draw_context_new(globalconf.display, c->titlebar.sw->phys_screen,
|
||||||
c->titlebar.sw->geometry.height,
|
c->titlebar.sw->geometry.height,
|
||||||
c->titlebar.sw->geometry.width,
|
c->titlebar.sw->geometry.width,
|
||||||
c->titlebar.sw->drawable);
|
dw);
|
||||||
geometry.width = c->titlebar.sw->geometry.height;
|
geometry.width = c->titlebar.sw->geometry.height;
|
||||||
geometry.height = c->titlebar.sw->geometry.width;
|
geometry.height = c->titlebar.sw->geometry.width;
|
||||||
break;
|
break;
|
||||||
|
@ -137,10 +136,12 @@ titlebar_update(Client *c)
|
||||||
case Left:
|
case Left:
|
||||||
draw_rotate(ctx, c->titlebar.sw->drawable, ctx->height, ctx->width,
|
draw_rotate(ctx, c->titlebar.sw->drawable, ctx->height, ctx->width,
|
||||||
- M_PI_2, 0, c->titlebar.sw->geometry.height);
|
- M_PI_2, 0, c->titlebar.sw->geometry.height);
|
||||||
|
XFreePixmap(globalconf.display, dw);
|
||||||
break;
|
break;
|
||||||
case Right:
|
case Right:
|
||||||
draw_rotate(ctx, c->titlebar.sw->drawable, ctx->height, ctx->width,
|
draw_rotate(ctx, c->titlebar.sw->drawable, ctx->height, ctx->width,
|
||||||
M_PI_2, c->titlebar.sw->geometry.width, 0);
|
M_PI_2, c->titlebar.sw->geometry.width, 0);
|
||||||
|
XFreePixmap(globalconf.display, dw);
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue