Lack of WM_CLASS or other identifiers in alt-tab wireframes makes it impossible to skip drawing shadows on wireframes with compton
When one uses compton as the compositor with shadows, the wireframe effect during alt+tab ("Draw frame around selected windows while cycling") cannot be targeted to skip drawing shadows (because the X11 window used to draw the wireframe doesn't have class, name or other metadata). As a result, when I use alt+tab I get extra darkening effect for the window that is the current target to switch windows using alt+tab UI.
There's an old patch at https://github.com/chjj/compton/issues/128#issuecomment-21941581 to add the missing hint but it has never been included in the official Xfwm4. In addition, the author of that patch speculated that adding the hint might be too expensive computationally https://github.com/chjj/compton/issues/128#issuecomment-22086891 – however, since this only needs to be once per user interaction I would assume the runtime performance of adding the hint wouldn't be that much an issue. I don't understand that patch well enough to know if it causes a resource leak every time that codepath is used.
To reproduce the problem, just tick the "Draw frame around selected windows while cycling", disable compositor in Xfwm4 and start compton with following command line:
compton --config /dev/null --backend glx -o 0.4 -r 8 -l -12 -t -12 --shadow --xrender-sync-fence --shadow-exclude '_GTK_FRAME_EXTENTS@:c'
and then try pressing alt+tab while you have multiple windows. Note how the window to be focused has dark overlay (shadow fill) on top of it?
The shadow exclude rule is needed to get correct rendering with GTK3 CSD windows.
As explained by the author of the patch mentioned above, one could then add --shadow-exclude 'class_g = "Xfwm4" && name = "xfwm4-wireframe"'
and get rid of the erraenous shadow fill for the wireframe. I think having a single string xfwm4-wireframe
somewhere would be enough. The double check for both class and name seems redundant.