Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix render order in draw_stuff #1801

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions src/conky.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1592,15 +1592,16 @@ static void draw_text() {
}

void draw_stuff() {
for (auto output : display_outputs()) output->begin_draw_stuff();

#ifdef BUILD_GUI
text_offset_x = text_offset_y = 0;
llua_draw_pre_hook();

#ifdef BUILD_IMLIB2
text_offset_x = text_offset_y = 0;
cimlib_render(text_start_x, text_start_y, window.width, window.height);
#endif /* BUILD_IMLIB2 */
#endif /* BUILD_GUI */
for (auto output : display_outputs()) output->begin_draw_stuff();
#ifdef BUILD_GUI
llua_draw_pre_hook();

for (auto output : display_outputs()) {
if (!output->graphical()) continue;
// XXX: we assume a single graphical display
Expand Down Expand Up @@ -1633,12 +1634,16 @@ void draw_stuff() {
set_foreground_color(default_color.get(*state));
unset_display_output();
}

#endif /* BUILD_GUI */
// always draw text
draw_mode = FG;
draw_text();
#if defined(BUILD_GUI)
#ifdef BUILD_GUI

llua_draw_post_hook();
#endif /* BUILD_GUI */

for (auto output : display_outputs()) output->end_draw_stuff();
}

Expand Down