mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-14 19:39:47 +00:00
Fix a couple of problems when compiling without OWN_WINDOW
This commit is contained in:
parent
cc71dea079
commit
4b38666777
11
src/conky.cc
11
src/conky.cc
@ -1969,9 +1969,10 @@ static void main_loop(void)
|
|||||||
selected_font = 0;
|
selected_font = 0;
|
||||||
update_text_area();
|
update_text_area();
|
||||||
|
|
||||||
|
#if defined(OWN_WINDOW) || defined(BUILD_XDBE)
|
||||||
long border_total = window.border_inner_margin
|
long border_total = window.border_inner_margin
|
||||||
+ window.border_outer_margin + window.border_width;
|
+ window.border_outer_margin + window.border_width;
|
||||||
|
#endif
|
||||||
#ifdef OWN_WINDOW
|
#ifdef OWN_WINDOW
|
||||||
if (own_window) {
|
if (own_window) {
|
||||||
int changed = 0;
|
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
|
#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
|
#ifdef OWN_WINDOW
|
||||||
if (windowtype == TYPE_DOCK) {
|
if (window.type == TYPE_DOCK) {
|
||||||
NORM_ERR("alignment is disabled when own_window_type is dock");
|
NORM_ERR("alignment is disabled when own_window_type is dock");
|
||||||
} else
|
} else
|
||||||
#endif /*OWN_WINDOW */
|
#endif /*OWN_WINDOW */
|
||||||
@ -2942,7 +2943,7 @@ char load_config_file(const char *f)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
CONF("alignment") {
|
CONF("alignment") {
|
||||||
setalignment(&text_alignment, window.type, value, f, line, true);
|
setalignment(&text_alignment, value, f, line, true);
|
||||||
}
|
}
|
||||||
CONF("background") {
|
CONF("background") {
|
||||||
fork_to_background = string_to_bool(value);
|
fork_to_background = string_to_bool(value);
|
||||||
@ -4074,7 +4075,7 @@ void initialisation(int argc, char **argv) {
|
|||||||
set_first_font(optarg);
|
set_first_font(optarg);
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
setalignment(&text_alignment, window.type, optarg, NULL, 0, false);
|
setalignment(&text_alignment, optarg, NULL, 0, false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef OWN_WINDOW
|
#ifdef OWN_WINDOW
|
||||||
|
@ -266,6 +266,8 @@ void destroy_window(void)
|
|||||||
void init_window(int own_window, int w, int h, int set_trans, int back_colour,
|
void init_window(int own_window, int w, int h, int set_trans, int back_colour,
|
||||||
char **argv, int argc)
|
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
|
/* 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
|
* (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. */
|
* happens but I bet the bug is somewhere here. */
|
||||||
|
Loading…
Reference in New Issue
Block a user