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

Premultiply background colors for X11 #1421

Merged
merged 5 commits into from
Feb 24, 2023

Conversation

bi4k8
Copy link
Collaborator

@bi4k8 bi4k8 commented Feb 23, 2023

Checklist

  • I have described the changes
  • I have linked to any relevant GitHub issues, if applicable
  • [n/a] Documentation in doc/ has been updated
  • All new code is licensed under GPLv3

Description

Fixes #1416. Tested with the following config on both Wayland and X11 builds:

conky.config = {
	alignment='bottom_middle',
	background=false,
	border_width=1,
	cpu_avg_samples=2,
	draw_borders=true,
	draw_shades=true,
	double_buffer=true,
	out_to_x=true,
	out_to_wayland=true,
	own_window=true,
	own_window_transparent=false,
	own_window_colour='ffffff',
	own_window_class='Conky',
	own_window_type='desktop',
	own_window_argb_visual=true,
	own_window_argb_value = 182,
	update_interval=1.0,
	use_xft=true,
	font="Sans:size=8",
	default_color='efefef',
	default_shade_color='black',
	color1='ffffff',
}
conky.text = 
[[
test${alignr}test
${color1}${font Sans:size=8:bold}$nodename [$sysname $kernel $machine]$font
]]

bi4k8 added 5 commits February 23, 2023 10:35
this does not change behavior, but avoids passing uninitialized data to X/Xft functions
this variable only has meaning with respect to X11
otherwise, we may try to use colors with alpha when we no longer requested a 32-bit visual
@netlify
Copy link

netlify bot commented Feb 23, 2023

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit d1f2f84
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/63f7890de353900007b5a93b

@github-actions github-actions bot added the sources PR modifies project sources label Feb 23, 2023
Copy link

@rschell rschell left a comment

Choose a reason for hiding this comment

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

Resolved the transparency issue on my Debian 6.1.13 version

@brndnmtthws brndnmtthws merged commit 4a7bec5 into brndnmtthws:main Feb 24, 2023
@brndnmtthws brndnmtthws added the bug Bug report or bug fix PR label Mar 4, 2023
simotek pushed a commit to simotek/conky that referenced this pull request Apr 5, 2023
* initialize XColor/XftColor

this does not change behavior, but avoids passing uninitialized data to X/Xft functions

* gui, x11: move have_argb_visual to x11 files

this variable only has meaning with respect to X11

* x11: clear have_argb_visual if the setting changes to false

otherwise, we may try to use colors with alpha when we no longer requested a 32-bit visual

* x11: premultiply alpha of background colors

* x11: clean up set_foreground_color a bit

---------

Co-authored-by: bi4k8 <bi4k8@github>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR sources PR modifies project sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: changing own_window_argb_value setting has no effect
3 participants