! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Miniature view in Workspace switcher is transparent
Status:
RESOLVED: FIXED
Product:
Xfce4-panel
Component:
Workspace Switcher

Comments

Description Marcel Kühlhorn 2019-07-09 12:04:56 CEST
Created attachment 8740 
Transparent miniature view on Workspace switcher

In some cases the miniature view of windows in the workspace switcher is transparent
Comment 1 Marcel Kühlhorn 2019-07-09 12:06:23 CEST
Created attachment 8741 
Correct miniature view after reloading the panel

Reloading the panel with xfce4-panel -r fixes the issue
Comment 2 Marcel Kühlhorn 2019-07-09 12:09:00 CEST
For me this always happens after booting, someone else on the mailinglist reported for them it happens after resuming from suspend
https://mail.xfce.org/pipermail/xfce/2019-July/036491.html
Comment 3 Theo Linkspfeifer editbugs 2019-07-10 20:35:40 CEST
I can trigger this glitch by assigning the 'primary' status to a different monitor via xfce4-display-settings. Other display related changes may work too, but I did not test them.

Furthermore, this only happens with certain themes like Adwaita or Arc while Greybird and Numix are not affected.
Comment 4 Theo Linkspfeifer editbugs 2019-07-11 11:05:10 CEST
/* Workspace switcher provided by libwnck */
wnck-pager:selected {
  background-color: shade(#398ee7, 0.88); }


This CSS code from the Greybird theme is what prevents the glitch from occurring.
Comment 5 Theo Linkspfeifer editbugs 2019-07-11 11:11:11 CEST
I have to add that this only applies to the currently selected workspace, so I assume that a general background color needs to be specified for wnck-pager.
Comment 6 Simon Steinbeiss editbugs 2019-07-13 23:42:00 CEST
@Theo: If you read the pager code closely you'll see that the theme code you mention shouldn't have anything to do with the problem. Furthermore it's possible you're seeing a bug different from the OP's, but I'll test.

To sum things up:
The panel sets the background color of plugin buttons to "transparent" by default, because that's how the panel's color can "shine through" on them.
The pager widget tries to get the panel's background color to set it for the widget (apparently it does custom cairo drawing and therefore relies on the background color of the widget):
https://git.xfce.org/xfce/xfce4-panel/tree/plugins/pager/pager.c#n298

So I would guess the Marcel is seeing a race condition where either
1) the "style-updated" signal fired too early (leading to unsuccessful querying the panel's color values, hence the widget remains transparent or even black)
2) or the "style-updated" signal didn't fire at all under some circumstances.
Comment 7 Simon Steinbeiss editbugs 2019-07-13 23:51:54 CEST
Created attachment 8770 
Patch setting the bg color when widget is re-created

The two issues may actually be related to the same root cause: Currently the background css is only injected on the style-updated signal, which doesn't fire when the screen layout is changed.
As Theo correctly observed, changing the screen layout (e.g. by changing the panel position through the "primary" setting) the pager widget gets re-created from scratch, so the background css is missing at that point.

The attached patch should fix the problem for both of you.
Comment 8 Theo Linkspfeifer editbugs 2019-07-14 13:54:44 CEST
I tested the patch and can confirm that it fixes the bug.
Comment 9 Marcel Kühlhorn 2019-07-14 15:43:39 CEST
Fixed with the patch here too
Comment 10 Git Bot editbugs 2019-07-14 21:41:34 CEST
Simon Steinbeiss referenced this bugreport in commit 6f0fc6628ef721521025e34c543a6e865ad01a9e

pager: Ensure bg color is set correctly (Bug #15690)

https://git.xfce.org/xfce/xfce4-panel/commit?id=6f0fc6628ef721521025e34c543a6e865ad01a9e
Comment 11 Simon Steinbeiss editbugs 2019-07-14 21:42:26 CEST
Thanks for testing!
Comment 12 Simon Steinbeiss editbugs 2020-05-22 01:07:54 CEST
*** Bug 15895 has been marked as a duplicate of this bug. ***

Bug #15690

Reported by:
Marcel Kühlhorn
Reported on: 2019-07-09
Last modified on: 2020-05-22
Duplicates (1):
  • 15895 Strange appearance in non used or selected workspace

People

Assignee:
Simon Steinbeiss
CC List:
3 users

Version

Version:
4.13.6

Attachments

Additional information