Don't pass mouse clicks when window is desktop type.
[monky] / src / conky.c
index 5582ba9..8668d6d 100644 (file)
@@ -2148,7 +2148,7 @@ static struct text_object *construct_text_object(const char *s,
                        obj->type = OBJ_text;
                        return NULL;
                }
-               DBGP("parsed platform args: '%s' '%s' %d %f %f\n", buf1, buf2, n, factor, offset);
+               DBGP("parsed platform args: '%s' '%s' %d %f %f", buf1, buf2, n, factor, offset);
                obj->data.sysfs.fd = open_platform_sensor((*buf1) ? buf1 : 0, buf2, n,
                                &obj->data.sysfs.arg, obj->data.sysfs.devtype);
                strncpy(obj->data.sysfs.type, buf2, 63);
@@ -2985,7 +2985,7 @@ static struct text_object *construct_text_object(const char *s,
        END OBJ(rss, 0)
                if (arg) {
                        float interval = 0;
-                       int argc, act_par;
+                       int argc, act_par = 0;
                        unsigned int nrspaces = 0;
                        char *uri = (char *) malloc(128 * sizeof(char));
                        char *action = (char *) malloc(64 * sizeof(char));
@@ -3080,9 +3080,9 @@ static struct text_object *construct_text_object(const char *s,
                                }
                                obj->data.weather_forecast.day = day;
 
-                               /* Limit the data retrieval interval to 2 hours and an half */
-                               if (interval < 150) {
-                                       interval = 150;
+                               /* Limit the data retrieval interval to 3 hours and an half */
+                               if (interval < 210) {
+                                       interval = 210;
                                }
 
                                /* Convert to seconds */
@@ -6584,6 +6584,7 @@ static inline void set_foreground_color(long c)
                attron(COLOR_PAIR(c));
        }
 #endif /* NCURSES */
+       UNUSED(c);
        return;
 }
 
@@ -7175,8 +7176,8 @@ static int draw_line(char *s, int special_index)
        }
 #endif /* NCURSES */
        draw_string(s);
-       //'special_index - special_index' instead of 0 otherwise gcc complains about not using special_index when build without X11
-       return special_index - special_index;
+       UNUSED(special_index);
+       return 0;
 }
 
 static void draw_text(void)
@@ -7586,9 +7587,10 @@ static void main_loop(void)
                                        case ButtonPress:
                                                if (own_window) {
                                                        /* if an ordinary window with decorations */
-                                                       if ((window.type == TYPE_NORMAL)
-                                                               && (!TEST_HINT(window.hints,
-                                                               HINT_UNDECORATED))) {
+                                                       if ((window.type == TYPE_NORMAL &&
+                                                                               (!TEST_HINT(window.hints,
+                                                                                                       HINT_UNDECORATED))) ||
+                                                                       window.type == TYPE_DESKTOP) {
                                                                /* allow conky to hold input focus. */
                                                                break;
                                                        } else {
@@ -7824,7 +7826,6 @@ void clean_up(void *memtofree1, void* memtofree2)
 
 #ifdef NCURSES
        if(output_methods & TO_NCURSES) {
-               delwin(stdscr);
                endwin();
        }
 #endif
@@ -7914,6 +7915,9 @@ void clean_up(void *memtofree1, void* memtofree2)
        llua_shutdown_hook();
        llua_close();
 #endif /* HAVE_LUA */
+#ifdef IMLIB2
+       cimlib_deinit();
+#endif /* IMLIB2 */
 #ifdef XOAP
        xmlCleanupParser();
 #endif /* XOAP */