Skip to content

Commit

Permalink
Fix build & cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Tin <[email protected]>
  • Loading branch information
Caellian committed Nov 10, 2023
1 parent cc604bc commit 04b3b62
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Conky can display more than 300 built-in objects, including support for:
usage**, disk usage, **"top"** like process stats, and **network
monitoring**, just to name a few).
- Built-in **IMAP** and **POP3** support.
- Built-in support for many popular music players ([MPD][https://www.musicpd.org/],
[XMMS2][https://github.com/XMMS2], [Audacious][https://audacious-media-player.org/]).
- Built-in support for many popular music players ([MPD][],
[XMMS2][], [Audacious][]).
- Can be extended using built-in [**Lua**](lua) support, or any of your
own scripts and programs ([more](https://github.com/brndnmtthws/conky/wiki#tutorial)).
- Built-in [**Imlib2**][imlib2] and [**Cairo**][cairo] bindings for arbitrary drawing
Expand Down
4 changes: 2 additions & 2 deletions cmake/ConkyBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ else()
endif(OS_DARWIN)

dependent_option(BUILD_ARGB "Build ARGB (real transparency) support" true
"OWN_WINDOW" false
"ARGB support requires OWN_WINDOW enabled")
"(BUILD_X11 AND OWN_WINDOW) OR BUILD_WAYLAND" false
"ARGB support requires OWN_WINDOW for X11 or Wayland enabled")
dependent_option(BUILD_XINERAMA "Build Xinerama support" true
"BUILD_X11" false
"Xinerama support requires X11")
Expand Down
6 changes: 3 additions & 3 deletions doc/config_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -392,16 +392,16 @@ values:
(see `/usr/lib/X11/rgb.txt`).
default: black
args:
- seconds
- color
- name: own_window_hints
desc: |-
If own_window is yes, you may use these window manager hints
If own_window is yes, you may specify comma separated window manager hints
to affect the way Conky displays. Notes: Use own_window_type desktop
as another way to implement many of these hints implicitly. If you use
own_window_type override, window manager hints have no meaning and are
ignored.
args:
- seconds
- hint(,hint)*
- name: own_window_title
desc: |-
Manually set the window name.
Expand Down
12 changes: 5 additions & 7 deletions src/display-wayland.cc
Original file line number Diff line number Diff line change
Expand Up @@ -946,19 +946,17 @@ void display_output_wayland::end_draw_stuff() {
void display_output_wayland::clear_text(int exposures) {
struct window *window = global_window;
cairo_save(window->cr);
Colour color;
#ifdef OWN_WINDOW
Colour color{};

#ifdef BUILD_ARGB
color = background_colour.get(*state);
if (set_transparent.get(*state)) {
color.alpha = 0;
} else {
#ifdef BUILD_ARGB
color.alpha = own_window_argb_value.get(*state);
#else
color.alpha = 0xff;
#endif
}
#endif
#endif /* BUILD_ARGB */

cairo_set_source_rgba(window->cr, color.red / 255.0, color.green / 255.0,
color.blue / 255.0, color.alpha / 255.0);
cairo_set_operator(window->cr, CAIRO_OPERATOR_SOURCE);
Expand Down
3 changes: 3 additions & 0 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ static void print_version() {
#endif /* BUILD_X11 */
#ifdef BUILD_WAYLAND
<< _(" Wayland:\n")
#ifdef BUILD_ARGB
<< _(" * ARGB visual\n")
#endif /* BUILD_ARGB */
#ifdef BUILD_MOUSE_EVENTS
<< _(" * Mouse events\n")
#endif /* BUILD_MOUSE_EVENTS */
Expand Down

0 comments on commit 04b3b62

Please sign in to comment.