From 6396d08c2592e489377bfed23bf6a4633d500f36 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 24 Jan 2008 10:37:16 +0100 Subject: [PATCH] kick out rotate option --- statusbar.c | 18 ++++++++++++------ window.c | 16 +++++----------- window.h | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/statusbar.c b/statusbar.c index 318d96668..3313a2393 100644 --- a/statusbar.c +++ b/statusbar.c @@ -211,12 +211,18 @@ statusbar_init(Statusbar *statusbar) statusbar->width = area.width; } - if(statusbar->dposition == Right || statusbar->dposition == Left) - statusbar->sw = - simplewindow_new(phys_screen, 0, 0, statusbar->height, statusbar->width, 0, True); - else - statusbar->sw = - simplewindow_new(phys_screen, 0, 0, statusbar->width, statusbar->height, 0, False); + switch(statusbar->dposition) + { + case Right: + case Left: + statusbar->sw = + simplewindow_new(phys_screen, 0, 0, statusbar->height, statusbar->width, 0); + break; + default: + statusbar->sw = + simplewindow_new(phys_screen, 0, 0, statusbar->width, statusbar->height, 0); + break; + } widget_calculate_alignments(statusbar->widgets); diff --git a/window.c b/window.c index 3c5edbda3..90392ca26 100644 --- a/window.c +++ b/window.c @@ -178,7 +178,7 @@ window_settrans(Window win, double opacity) SimpleWindow * simplewindow_new(int phys_screen, int x, int y, unsigned int w, unsigned int h, - unsigned int border_width, Bool rotate_drawable) + unsigned int border_width) { XSetWindowAttributes wa; SimpleWindow *sw; @@ -206,16 +206,10 @@ simplewindow_new(int phys_screen, int x, int y, unsigned int w, unsigned int h, CWOverrideRedirect | CWBackPixmap | CWEventMask, &wa); - if(rotate_drawable) - sw->drawable = XCreatePixmap(globalconf.display, - RootWindow(globalconf.display, phys_screen), - h, w, - DefaultDepth(globalconf.display, phys_screen)); - else - sw->drawable = XCreatePixmap(globalconf.display, - RootWindow(globalconf.display, phys_screen), - w, h, - DefaultDepth(globalconf.display, phys_screen)); + sw->drawable = XCreatePixmap(globalconf.display, + RootWindow(globalconf.display, phys_screen), + w, h, + DefaultDepth(globalconf.display, phys_screen)); XDefineCursor(globalconf.display, sw->window, diff --git a/window.h b/window.h index 2d6f3b378..d5cf9116e 100644 --- a/window.h +++ b/window.h @@ -30,7 +30,7 @@ Status window_configure(Window, Area, int); void window_grabbuttons(int, Window, Bool, Bool); void window_setshape(int, Window); int window_settrans(Window, double); -SimpleWindow * simplewindow_new(int, int, int, unsigned int, unsigned int, unsigned int, Bool); +SimpleWindow * simplewindow_new(int, int, int, unsigned int, unsigned int, unsigned int); void simplewindow_delete(SimpleWindow *); int simplewindow_move(SimpleWindow *, int, int); int simplewindow_refresh_drawable(SimpleWindow *, int);