use real and smaller surface size to draw statusbar when rotating
This commit is contained in:
parent
8741fdba69
commit
ae49735001
6
draw.c
6
draw.c
|
@ -134,10 +134,10 @@ draw_rotate(Display *disp, int screen, Drawable drawable, int dw, int dh, double
|
||||||
|
|
||||||
newdrawable = XCreatePixmap(disp,
|
newdrawable = XCreatePixmap(disp,
|
||||||
RootWindow(disp, screen),
|
RootWindow(disp, screen),
|
||||||
dw, dw,
|
dh, dw,
|
||||||
DefaultDepth(disp, screen));
|
DefaultDepth(disp, screen));
|
||||||
surface = cairo_xlib_surface_create(disp, newdrawable, DefaultVisual(disp, screen), dw, dw);
|
surface = cairo_xlib_surface_create(disp, newdrawable, DefaultVisual(disp, screen), dh, dw);
|
||||||
source = cairo_xlib_surface_create(disp, drawable, DefaultVisual(disp, screen), dw, dw);
|
source = cairo_xlib_surface_create(disp, drawable, DefaultVisual(disp, screen), dw, dh);
|
||||||
cr = cairo_create (surface);
|
cr = cairo_create (surface);
|
||||||
|
|
||||||
cairo_translate(cr, tx, ty);
|
cairo_translate(cr, tx, ty);
|
||||||
|
|
16
statusbar.c
16
statusbar.c
|
@ -60,7 +60,7 @@ drawstatusbar(awesome_config *awesomeconf)
|
||||||
drawable = XCreatePixmap(awesomeconf->display,
|
drawable = XCreatePixmap(awesomeconf->display,
|
||||||
RootWindow(awesomeconf->display, awesomeconf->phys_screen),
|
RootWindow(awesomeconf->display, awesomeconf->phys_screen),
|
||||||
awesomeconf->statusbar.width,
|
awesomeconf->statusbar.width,
|
||||||
awesomeconf->statusbar.width,
|
awesomeconf->statusbar.height,
|
||||||
DefaultDepth(awesomeconf->display, awesomeconf->phys_screen));
|
DefaultDepth(awesomeconf->display, awesomeconf->phys_screen));
|
||||||
|
|
||||||
for(i = 0; i < awesomeconf->ntags; i++)
|
for(i = 0; i < awesomeconf->ntags; i++)
|
||||||
|
@ -174,15 +174,13 @@ drawstatusbar(awesome_config *awesomeconf)
|
||||||
{
|
{
|
||||||
Drawable d;
|
Drawable d;
|
||||||
if(awesomeconf->statusbar.position == BarRight)
|
if(awesomeconf->statusbar.position == BarRight)
|
||||||
d = draw_rotate(awesomeconf->display, awesomeconf->phys_screen,
|
d = draw_rotate(awesomeconf->display, awesomeconf->phys_screen, drawable,
|
||||||
drawable, awesomeconf->statusbar.width,
|
awesomeconf->statusbar.width, awesomeconf->statusbar.height,
|
||||||
awesomeconf->statusbar.height, M_PI_2,
|
M_PI_2, awesomeconf->statusbar.height, 0);
|
||||||
awesomeconf->statusbar.height, 0);
|
|
||||||
else
|
else
|
||||||
d = draw_rotate(awesomeconf->display, awesomeconf->phys_screen,
|
d = draw_rotate(awesomeconf->display, awesomeconf->phys_screen, drawable,
|
||||||
drawable, awesomeconf->statusbar.width,
|
awesomeconf->statusbar.width, awesomeconf->statusbar.height,
|
||||||
awesomeconf->statusbar.height, - M_PI_2,
|
- M_PI_2, 0, awesomeconf->statusbar.width);
|
||||||
0, awesomeconf->statusbar.width);
|
|
||||||
XCopyArea(awesomeconf->display, d,
|
XCopyArea(awesomeconf->display, d,
|
||||||
awesomeconf->statusbar.window,
|
awesomeconf->statusbar.window,
|
||||||
DefaultGC(awesomeconf->display, awesomeconf->phys_screen), 0, 0,
|
DefaultGC(awesomeconf->display, awesomeconf->phys_screen), 0, 0,
|
||||||
|
|
Loading…
Reference in New Issue