kick out rotate option

This commit is contained in:
Julien Danjou 2008-01-24 10:37:16 +01:00
parent 595003b8e1
commit 6396d08c25
3 changed files with 18 additions and 18 deletions

View File

@ -211,12 +211,18 @@ statusbar_init(Statusbar *statusbar)
statusbar->width = area.width; statusbar->width = area.width;
} }
if(statusbar->dposition == Right || statusbar->dposition == Left) switch(statusbar->dposition)
statusbar->sw = {
simplewindow_new(phys_screen, 0, 0, statusbar->height, statusbar->width, 0, True); case Right:
else case Left:
statusbar->sw = statusbar->sw =
simplewindow_new(phys_screen, 0, 0, statusbar->width, statusbar->height, 0, False); 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); widget_calculate_alignments(statusbar->widgets);

View File

@ -178,7 +178,7 @@ window_settrans(Window win, double opacity)
SimpleWindow * SimpleWindow *
simplewindow_new(int phys_screen, int x, int y, unsigned int w, unsigned int h, 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; XSetWindowAttributes wa;
SimpleWindow *sw; SimpleWindow *sw;
@ -206,16 +206,10 @@ simplewindow_new(int phys_screen, int x, int y, unsigned int w, unsigned int h,
CWOverrideRedirect | CWBackPixmap | CWEventMask, CWOverrideRedirect | CWBackPixmap | CWEventMask,
&wa); &wa);
if(rotate_drawable) sw->drawable = XCreatePixmap(globalconf.display,
sw->drawable = XCreatePixmap(globalconf.display, RootWindow(globalconf.display, phys_screen),
RootWindow(globalconf.display, phys_screen), w, h,
h, w, DefaultDepth(globalconf.display, phys_screen));
DefaultDepth(globalconf.display, phys_screen));
else
sw->drawable = XCreatePixmap(globalconf.display,
RootWindow(globalconf.display, phys_screen),
w, h,
DefaultDepth(globalconf.display, phys_screen));
XDefineCursor(globalconf.display, XDefineCursor(globalconf.display,
sw->window, sw->window,

View File

@ -30,7 +30,7 @@ Status window_configure(Window, Area, int);
void window_grabbuttons(int, Window, Bool, Bool); void window_grabbuttons(int, Window, Bool, Bool);
void window_setshape(int, Window); void window_setshape(int, Window);
int window_settrans(Window, double); 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 *); void simplewindow_delete(SimpleWindow *);
int simplewindow_move(SimpleWindow *, int, int); int simplewindow_move(SimpleWindow *, int, int);
int simplewindow_refresh_drawable(SimpleWindow *, int); int simplewindow_refresh_drawable(SimpleWindow *, int);