From 84017b9666cc53db42473d253be94a163bbfbcfa Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 11 Nov 2007 21:13:37 +0100 Subject: [PATCH] inverse rotate and translate and fix bar position on right for Xinerama --- draw.c | 2 +- statusbar.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/draw.c b/draw.c index 7b8397d4..b1668453 100644 --- a/draw.c +++ b/draw.c @@ -135,8 +135,8 @@ draw_rotate(Display *disp, int screen, Drawable drawable, int dw, int dh, double source = cairo_xlib_surface_create(disp, drawable, DefaultVisual(disp, screen), dw, dw); cr = cairo_create (surface); - cairo_rotate(cr, angle); cairo_translate(cr, tx, ty); + cairo_rotate(cr, angle); cairo_set_source_surface(cr, source, 0.0, 0.0); cairo_paint(cr); diff --git a/statusbar.c b/statusbar.c index 03b7c7b7..1c1a50da 100644 --- a/statusbar.c +++ b/statusbar.c @@ -165,7 +165,7 @@ drawstatusbar(awesome_config *awesomeconf) draw_rotate(awesomeconf->display, awesomeconf->phys_screen, awesomeconf->statusbar.drawable, awesomeconf->statusbar.width, awesomeconf->statusbar.height, M_PI * 0.5, - 0, -awesomeconf->statusbar.height); + awesomeconf->statusbar.height, 0); else draw_rotate(awesomeconf->display, awesomeconf->phys_screen, awesomeconf->statusbar.drawable, awesomeconf->statusbar.width, @@ -257,7 +257,7 @@ updatebarpos(Display *disp, Statusbar statusbar) XMoveWindow(disp, statusbar.window, si[statusbar.screen].x_org, si[statusbar.screen].y_org); break; case BarRight: - XMoveWindow(disp, statusbar.window, si[statusbar.screen].width - statusbar.height, si[statusbar.screen].y_org); + XMoveWindow(disp, statusbar.window, si[statusbar.screen].x_org + (si[statusbar.screen].width - statusbar.height), si[statusbar.screen].y_org); break; case BarBot: XMoveWindow(disp, statusbar.window, si[statusbar.screen].x_org, si[statusbar.screen].height - statusbar.height);