1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-27 04:32:55 +00:00

Fix a couple of problems when compiling without OWN_WINDOW

This commit is contained in:
Pavel Labath 2010-03-14 22:24:03 +01:00
parent cc71dea079
commit 4b38666777
2 changed files with 8 additions and 5 deletions

View File

@ -1969,9 +1969,10 @@ static void main_loop(void)
selected_font = 0;
update_text_area();
#if defined(OWN_WINDOW) || defined(BUILD_XDBE)
long border_total = window.border_inner_margin
+ window.border_outer_margin + window.border_width;
#endif
#ifdef OWN_WINDOW
if (own_window) {
int changed = 0;
@ -2878,9 +2879,9 @@ static int do_config_step(int *line, FILE *fp, char *buf, char **name, char **va
}
#ifdef BUILD_X11
void setalignment(int* text_alignment, unsigned int windowtype, const char* value, const char *f, int line, bool conffile) {
void setalignment(int* text_alignment, const char* value, const char *f, int line, bool conffile) {
#ifdef OWN_WINDOW
if (windowtype == TYPE_DOCK) {
if (window.type == TYPE_DOCK) {
NORM_ERR("alignment is disabled when own_window_type is dock");
} else
#endif /*OWN_WINDOW */
@ -2942,7 +2943,7 @@ char load_config_file(const char *f)
}
}
CONF("alignment") {
setalignment(&text_alignment, window.type, value, f, line, true);
setalignment(&text_alignment, value, f, line, true);
}
CONF("background") {
fork_to_background = string_to_bool(value);
@ -4074,7 +4075,7 @@ void initialisation(int argc, char **argv) {
set_first_font(optarg);
break;
case 'a':
setalignment(&text_alignment, window.type, optarg, NULL, 0, false);
setalignment(&text_alignment, optarg, NULL, 0, false);
break;
#ifdef OWN_WINDOW

View File

@ -266,6 +266,8 @@ void destroy_window(void)
void init_window(int own_window, int w, int h, int set_trans, int back_colour,
char **argv, int argc)
{
// these vars are unused if OWN_WINDOW is not defined
(void)own_window; (void)w; (void)h; (void)argv; (void)argc;
/* 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
* happens but I bet the bug is somewhere here. */