conky-1.10.4-x11-build.patch 944 B

1234567891011121314151617181920212223242526272829303132
  1. From 178015a9495b7d40031ed7459e4f6b6731633a7c Mon Sep 17 00:00:00 2001
  2. From: shizeeg <shizeeque@gmail.com>
  3. Date: Thu, 8 Sep 2016 18:24:29 +0300
  4. Subject: [PATCH] Fix build without X11 (#317)
  5. ---
  6. src/conky.cc | 4 ++++
  7. 1 file changed, 4 insertions(+)
  8. diff --git a/src/conky.cc b/src/conky.cc
  9. index 0a812fc..4c5da94 100644
  10. --- a/src/conky.cc
  11. +++ b/src/conky.cc
  12. @@ -1404,6 +1404,9 @@ static void draw_string(const char *s)
  13. int draw_each_line_inner(char *s, int special_index, int last_special_applied)
  14. {
  15. +#ifndef BUILD_X11
  16. + static int cur_x, cur_y; /* current x and y for drawing */
  17. +#endif
  18. #ifdef BUILD_X11
  19. int font_h = 0;
  20. int cur_y_add = 0;
  21. @@ -1934,6 +1937,7 @@ static void draw_text(void)
  22. static void draw_stuff(void)
  23. {
  24. + static int text_offset_x, text_offset_y; /* offset for start position */
  25. text_offset_x = text_offset_y = 0;
  26. #ifdef BUILD_IMLIB2
  27. cimlib_render(text_start_x, text_start_y, window.width, window.height);