我在 xubuntu 16.10 上使用 compton,因为这样我的系统就不会出现撕裂现象。当我使用 Thunar 时,窗口阴影正常,但如果我使用 Nautilus(我更喜欢它),窗口阴影就会像图片中那样出现故障。
即使我从 compton.conf 中完全禁用阴影,也会发生这种情况。
这是我的 compton.conf:
# Compton Configuration, courtesy of Xubuntu Developers
# Please note that Compton is not supported by Xubuntu and may not work
# correctly for you. This file is provided as a set of sane defaults and is in
# no way endorsed by the Xubuntu team.
#
# About Compton: https://github.com/chjj/compton
# Heavily based on: http://bit.ly/1l5OrzL
# Sample settings: https://github.com/chjj/compton/blob/master/compton.sample.conf
# --- Backend (OpenGL used by default)
# Related Links
# https://github.com/chjj/compton/wiki/perf-guide
# https://github.com/chjj/compton/wiki/vsync-guide
backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
unredir-if-possible = true;
vsync = "opengl-swc";
# --- Shadows (Disable with shadow = false;)
# The shadow exclude options are helpful if you have shadows enabled.
# Due to the way compton draws its shadows, certain applications (Such as
# shaped windows, custom popups, non-standard toolkits) will have visual glitches.
shadow = true; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental).
shadow-radius = 10; # The blur radius for shadows. (default 10)
shadow-offset-x = -15; # The left offset for shadows. (default -15)
shadow-offset-y = -12; # The top offset for shadows. (default -12)
shadow-opacity = 0.4;
shadow-exclude = [
"! name~=''", # "Unknown" windows, including xfwm4 alt-tab
"n:e:Notification",
"n:e:Plank",
"n:e:Docky",
"g:e:Synapse",
"g:e:Kupfer",
"g:e:Conky",
"n:w:*Firefox*",
"n:w:*Chrome*",
"n:w:*Chromium*",
"class_g ?= 'Notify-osd'",
"class_g ?= 'Cairo-dock'",
"class_g ?= 'Xfce4-notifyd'",
"class_g ?= 'Xfce4-power-manager'",
"class_g ?= 'Xfwm4'", # For the "new" xfwm4 alt-tab
"_GTK_FRAME_EXTENTS@:c", # GTK+ 3 CSD windows https://github.com/chjj/compton/issues/189
"class_g ?= 'Nautilus'",
"WM_CLASS@:s *?= 'Nautilus'"
];
# --- Fading (Disable with fading = false;)
fading = true; # Fade windows during opacity changes.
fade-delta = 5; # The time between steps in a fade in milliseconds. (default 5).
fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.03).
fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03).
# --- Additional Settings
detect-client-opacity = true;
# --- Window type settings
wintypes:
{
tooltip = { fade = true; shadow = false; opacity = 0.9; focus = true; };
};
请注意,我使用 Adapta-nokto 作为 gtk 主题。有什么想法吗?谢谢
更新:因此执行compton --shadow-exclude '_NET_WM_OPAQUE_REGION@:c'
解决了这个问题,但我得到了Another composite manager is already running
重新启动后,添加到 compton.conf 的阴影排除部分也'_NET_WM_OPAQUE_REGION@:c'
不起作用
答案1
如果禁用此功能,将会删除某些窗口外的透明框 clear-shadow = true; # 将窗口后面阴影遮罩的部分清零(实验)。 但它会在原处添加阴影。
我尝试了您说的命令加上 clear-shadow=false 解决了这个问题,但现在有些窗口根本没有阴影