diff --git a/AUTHORS b/AUTHORS index 5443877d..85bec293 100644 --- a/AUTHORS +++ b/AUTHORS @@ -39,12 +39,22 @@ Gwenhael LE MOINE Hannu Saransaari Main code +<<<<<<< AUTHORS +<<<<<<< AUTHORS +Jason Mitchell + UTF8 fix + Source clean up + +======= +======= j-rock - #otw on freenode small fix for XFT +>>>>>>> 1.4 jack_mort - gentoo forums $tab patch +>>>>>>> 1.3 Jarmo Hekkanen SETI stuff @@ -101,3 +111,4 @@ Walt Nelson William DiPlacido Frequency from /proc/cpuinfo Some other SETI stuff + diff --git a/conky.c b/conky.c index 2aaf5d69..58e6cbd1 100644 --- a/conky.c +++ b/conky.c @@ -197,6 +197,9 @@ static unsigned int stuff_in_upper_case; static int text_alignment; static int gap_x, gap_y; +/* Always on bottom */ +static int on_bottom; + /* Update interval */ static double update_interval; @@ -3566,6 +3569,7 @@ static enum alignment string_to_alignment(const char *s) static void set_default_configurations(void) { text_alignment = BOTTOM_LEFT; + on_bottom = 1; fork_to_background = 0; border_margin = 3; border_width = 1; @@ -3701,6 +3705,12 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, a) == 0) } else CONF_ERR; } + CONF("on_bottom") { + if(value) + on_bottom = string_to_bool(value); + else + CONF_ERR; + } CONF("background") { fork_to_background = string_to_bool(value); } @@ -4234,7 +4244,7 @@ int main(int argc, char **argv) init_window (own_window, text_width - + border_margin * 2 + 1, text_height + border_margin * 2 + 1); + + border_margin * 2 + 1, text_height + border_margin * 2 + 1, on_bottom); update_text_area(); /* to position text/window on screen */ diff --git a/conky.h b/conky.h index 4ac50831..ae4bc7d7 100644 --- a/conky.h +++ b/conky.h @@ -225,7 +225,7 @@ extern int workarea[4]; extern struct conky_window window; void init_X11(); -void init_window(int use_own_window, int width, int height); +void init_window(int use_own_window, int width, int height, int on_bottom); void create_gc(); void set_transparent_background(Window win); long get_x11_color(const char *); diff --git a/metarinfo.c b/metarinfo.c index f8ac0ac6..a1a94c6f 100644 --- a/metarinfo.c +++ b/metarinfo.c @@ -167,11 +167,17 @@ void update_metar() if (!status) { status = 2; iret1 = pthread_create(&thread1, NULL, fetch_ftp, NULL); +<<<<<<< metarinfo.c + } else if (status == 2) { /* thread is still running. what else can we do? */ + return; + } else { /* status must be 1 */ +======= } else if (status == 2) { /* thread is still running. let's kill it and start again */ pthread_cancel(thread1); status = 2; iret1 = pthread_create(&thread1, NULL, fetch_ftp, NULL); } else { /* status must be 1 */ +>>>>>>> 1.9 pthread_join(thread1, NULL); status = 2; iret1 = pthread_create(&thread1, NULL, fetch_ftp, NULL); diff --git a/x11.c b/x11.c index 8fb28925..8c756ea2 100644 --- a/x11.c +++ b/x11.c @@ -160,7 +160,7 @@ void set_transparent_background(Window win) XClearWindow(display, win); } -void init_window(int own_window, int w, int h) +void init_window(int own_window, int w, int h, int l) { /* There seems to be some problems with setting transparent background (on * fluxbox this time). It doesn't happen always and I don't know why it @@ -172,8 +172,9 @@ void init_window(int own_window, int w, int h) XSetWindowAttributes attrs; XClassHint class_hints; - /* just test color */ + /* just test color attrs.background_pixel = get_x11_color("green"); + */ window.window = XCreateWindow(display, RootWindow(display, screen), window.x, window.y, w, h, 0, CopyFromParent, /* depth */ CopyFromParent, /* class */ @@ -216,6 +217,17 @@ void init_window(int own_window, int w, int h) (unsigned char *) &prop, 1); } + if(l) { + /* make sure the layer is on the bottom */ + a = XInternAtom(display, "_WIN_LAYER", True); + if (a != None) { + long prop = 0; + XChangeProperty(display, window.window, a, + XA_CARDINAL, 32, + PropModeReplace, + (unsigned char *) &prop, 1); + } + } } XMapWindow(display, window.window);