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

The Dropbox Icon on systray Has White Background #1856

Closed
purboo opened this issue Jun 20, 2017 · 5 comments
Closed

The Dropbox Icon on systray Has White Background #1856

purboo opened this issue Jun 20, 2017 · 5 comments
Labels

Comments

@purboo
Copy link

purboo commented Jun 20, 2017

Output of awesome --version:

awesome v4.1 (Technologic)
 • Compiled against Lua 5.3.4 (running with Lua 5.3)
 • D-Bus support: ✔
 • execinfo support: ✔
 • xcb-randr version: 1.5
 • LGI version: 0.9.1

Dropbox version is 28.4.14.

My ~/.Xresources:

Xft.dpi:        192
Xft.autohint:   0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintslight
Xft.hinting:    1
Xft.antialias:  1

How to reproduce the issue:

  1. Install AwesomeWM
sudo pacman -S awesome
  1. Install Dropbox
sudo yaourt --noconfirm -S dropbox
  1. Setting the display dpi to be 192 (for hidpi display) by adding these lines to ~/.Xresources:
Xft.dpi:        192
Xft.autohint:   0
Xft.lcdfilter:  lcddefault
Xft.hintstyle:  hintslight
Xft.hinting:    1
Xft.antialias:  1
  1. Reboot.

Actual result:

The Dropbox icon has a white background.

dropbox-background

Expected result:

The Dropbox icon should be melt into the systray.

@psychon
Copy link
Member

psychon commented Jun 20, 2017

dropbox uses Qt, right? That's a bug in Qt. Since Qt 5 they do not really support transparent background in a systray unless the systray manager does extra magic to make proper transparency work. Instead, they take a screenshot of wherever their systray icon is and use that as their background. There are lots of possible races with this screenshot-approach and I guess you are seeing one of them.

Duplicate of: #1738 #1720 #283 #176 (I just searched for "Qt" and "systray" in our bug list).

@purboo
Copy link
Author

purboo commented Jun 20, 2017

@psychon

Maybe this is due to the bugs of Qt 5, but I am pretty sure this is not the transparency problem, because the icon fits the systray pretty well if I don't double the dpi.

It can be seen from the screenshot that there are huge white regions outside the icon border.

@psychon
Copy link
Member

psychon commented Jun 20, 2017

this is not the transparency problem, b

Which one is "the" transparency problem?

X11 is older than me. X11 does not support transparency (no alpha channel). Then came extensions such as DAMAGE, COMPOSITE and RENDER. These now allow to have an alpha channel, but the X server does not make transparency work. Instead, you need a compositing manager such as compton that takes the windows' contents, applies transparency and gives the result to the X server to display (things like gnome already have one built-in).

Then someone came up with the idea to also use this for the systray. Traditionally, systray icons were expected to just "draw ontop" of the background. With this new systray protocol, systray icons can also use real transparency instead.

In Qt5, the drawing code was changed a lot. The Qt drawing code no longer supports the "draw ontop of the background" mode of doing things. Instead it wants to draw the whole area. That is no problem when the systray manager supports compositing and real transparency can be used. If not, then Qt does its screenshot-dance as a fallback.

I don't consider "Qt broke their stuff and now you need to implement this complicated stuff so that Qt can properly draw its systray icon" a valid reason for implementing it. Also, I'm doing this work as a volunteer and motivation is a big influence in what I do. "Qt broke their stuff" is not motivating me to implement this really, really complicated stuff.

Edit: Fixed some grammar mistakes (this vs these, "windows contents" vs "windows' contents")

@psychon
Copy link
Member

psychon commented Jun 20, 2017

because the icon fits the systray pretty well if I don't double the dpi.

I don't understand this part either. Are you saying that in your screenshot the dropbox icon does not fit the systray?

@purboo
Copy link
Author

purboo commented Jun 20, 2017

@psychon
I mean, the background of Dropbox icon is transparent if the dpi is 96 rather than 192:

dropbox-icon

When the dpi is changed to 192, the background of Thunderbird icon is also not transparent:

thunderbird-icon

But Thunderbird is written in GTK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants