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 non-text content using own_window_argb_value #2105

Merged
merged 1 commit into from
Dec 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
8 changes: 3 additions & 5 deletions src/display-wayland.cc
Original file line number Diff line number Diff line change
Expand Up @@ -784,9 +784,6 @@ void display_output_wayland::cleanup() {

void display_output_wayland::set_foreground_color(Colour c) {
current_color = c;
#ifdef BUILD_ARGB
current_color.alpha = own_window_argb_value.get(*state);
#endif /* BUILD_ARGB */
Comment on lines -787 to -789
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transparent bars caused by this.

if (global_window->cr) {
cairo_set_source_rgba(global_window->cr, current_color.red / 255.0,
current_color.green / 255.0,
Expand Down Expand Up @@ -926,8 +923,9 @@ void display_output_wayland::clear_text(int exposures) {

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);
cairo_paint(window->cr);
cairo_set_operator(window->cr, CAIRO_OPERATOR_CLEAR);
cairo_rectangle(window->cr, 0, 0, window->rectangle.width(),
window->rectangle.height());
Comment on lines -929 to +928
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems more correct - SO answer.

Resetting to OVER isn't needed because of cairo_restore.

cairo_restore(window->cr);
}

Expand Down
Loading