jonaburg / picom

A lightweight compositor for X11 (previously a compton fork)
Other
954 stars 98 forks source link

"xinerama-shadow-crop = true" doesn't work, shadows are still visible on the next monitor, and borders bugs when moving/resizing windows #71

Open D3SK3R opened 2 years ago

D3SK3R commented 2 years ago

Platform

Manjaro, 5.15.34-xanmod1-tt-1

GPU, drivers, and screen setup

Intel 5005u xf86-video-intel 1:2.99.917+916+g31486f40-2

glxinfo: name of display: :0 display: :0 screen: 0 direct rendering: Yes Extended renderer info (GLX_MESA_query_renderer): Vendor: Intel (0x8086) Device: Mesa Intel(R) HD Graphics 5500 (BDW GT2) (0x1616) Version: 21.3.8 Accelerated: yes Video memory: 3072MB Unified memory: yes Preferred profile: core (0x1) Max core profile version: 4.6 Max compat profile version: 4.6 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.2 OpenGL vendor string: Intel OpenGL renderer string: Mesa Intel(R) HD Graphics 5500 (BDW GT2) OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.3.8 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 21.3.8 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.3.8 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

BSPWM

picom version

vgit-e3c19

Configuration:

###########################################################
#                   picom-jonaburg-git                    #
###########################################################
# jonaburg's picom must be run with --experimental-backend flag
# https://github.com/jonaburg/picom/blob/next/picom.sample.conf

#################################
#
# GLX
#
#################################
backend = "glx";

glx-no-stencil = true;

# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes, but is known to break things on some drivers (LLVMpipe).
# Recommended if it works.
glx-no-rebind-pixmap = true;

#################################
#
# Shadows
#
#################################
shadow = false;
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners) deprecated
#shadow-ignore-shaped = true;
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
detect-rounded-corners = true;
# The blur radius for shadows. (default 12)
shadow-radius = 2;
# The left offset for shadows. (default -15)
shadow-offset-x = 5;
# The top offset for shadows. (default -15)
shadow-offset-y = 5;
# The translucency for shadows. (default .75)
shadow-opacity = 0.5;

# Set if you want different colour shadows
# shadow-red = 0.0;
# shadow-green = 0.0;
# shadow-blue = 0.0;

#Crop shadow of a window fully on a particular Xinerama screen to the screen.
xinerama-shadow-crop = true;

# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches
# (most applications are fine, only apps that do weird things with xshapes or argb are affected).
# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher.
shadow-exclude = [
    "! name~=''",
    "window_type *= 'normal' && ! name ~= ''",
    "_GTK_FRAME_EXTENTS@:c",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    "class_g ?= 'Polybar'",
    "window_type = 'dock'",
];

#################################
#
# Opacity
#
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
inactive-opacity = 1;

# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
active-opacity = 1;

# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
frame-opacity = 1;

# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
inactive-opacity-override = false;

# Dim inactive windows. (0.0 - 1.0)
#inactive-dim = 0.0;
# Do not let dimness adjust based on window opacity.
# inactive-dim-fixed = true;

detect-client-opacity = false;
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
# This prevents opacity being ignored for some apps.

opacity-rule = [
    #"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    #"30:class_g = 'URxvt'",
    #"85:class_g = 'dolphin'",
    "90:class_g = 'Sublime_text'",
    "95:class_g = 'code-oss'",
    "95:class_g = 'Atom'",
    "85:class_g = 'Pcmanfm'",
    "80:class_g = 'Nitrogen'",
    "80:class_g = 'UXTerm'",
    "80:class_g = 'XTerm'",
    "100:class_g = 'VirtualBox Machine'",
    #"100:class_g = 'mpv'",
    #"100:class_g = 'gl'",
];

#################################
#
# Blur
#
#################################
#blur-method = "dual_kawase";
# default 3
blur-strength = 1;
blur-background = false;
#blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
# Blur background of opaque windows with transparent frames as well.
blur-background-frame = false;
# Do not let blur radius adjust based on window opacity.
blur-background-fixed = true;
#blur-kern = "3x3box";
blur-background-exclude = [
    "window_type = 'menu'",
    "window_type = 'popup_menu'",
    "window_type = 'dropdown_menu'",
    "window_type = 'fullscreen'",
    "window_type = 'desktop'",
    "_GTK_FRAME_EXTENTS@:c",
];

#################################
#
# Fading
#
#################################
# Fade windows during opacity changes.
fading = true;
# The time between steps in a fade in milliseconds. (default 10).
fade-delta = 5;
# Opacity change between steps while fading in. (default 0.028).
fade-in-step = 0.02;
# Opacity change between steps while fading out. (default 0.03).
fade-out-step = 0.05;
# Fade windows in/out when opening/closing
no-fading-openclose = false;
fade-exclude = [ ];

#################################
#
# Rounded Corners
#
#################################
# how rounded are the corners/borders (default: 4)
#corner-radius = 8;
rounded-corners-exclude = [
    "class_g ?= 'Xonotic'",
    "class_g ?= 'xonotic-sdl'",
    "class_g ?= 'polybar'",
    "class_g ?= 'Polybar'",
    "name = 'Polybar tray window'",
    "n:w:*tray*",
    "n:e:Notification",
    "class_g ?= 'tray'",
    #"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    #"class_g ?= 'i3-frame'"
];
round-borders = 1;
#round-borders-exclude = [
#  "class_g = 'TelegramDesktop'",
#];

#################################
#
# Vsync
#
#################################
vsync = true;
#vsync = "opengl-mswc";

# Specify refresh rate of the screen.
# If not specified or 0, compton will try detecting this with X RandR extension.
#refresh-rate = 60;

#xrender-sync-fence = true;
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing.
# Reported to have no effect, though.
dbe = true;

#################################
#
# Animations (jonaburg/picom)
# 
#################################
# Requires: https://github.com/jonaburg/picom
# default 150
transition-length = 200
transition-pow-x = 0.1
transition-pow-y = 0.1
transition-pow-w = 0.1
transition-pow-h = 0.1
size-transition = true

# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
# Usually more reliable but depends on a EWMH-compliant WM.
#use-ewmh-active-win = true;
# Try to detect WM windows and mark them as active.
#mark-wmwin-focused = true;
# Mark all non-WM but override-redirect windows active (e.g. menus).
#mark-ovredir-focused = true;

#use-damage = true;

invert-color-include = [ ];
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [
    "class_g *?= 'Virtualbox'",
    "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'",
    #"class_g = 'mpv'",
    #"class_g = 'dolphin'",
    #"class_g = 'Nitrogen'"
];

unredir-if-possible = false;

# in ms
unredir-if-possible-delay = 0;

unredir-if-possible-exclude = [

];
#################################
#
# Window Type Settings
#
#################################

wintypes:
{
    tooltip =       { full-shadow = true; fade = true; opacity = 1; focus = true; };
    menu =          { full-shadow = true; opacity = 1 };
    dock =          { };
    dropdown_menu = { full-shadow = true; };
    popup_menu =    { full-shadow = true; };
    fullscreen =    { full-shadow = true; fade = true; focus = true; };
    toolbar =       { full-shadow = true;  };
    utility =       { full-shadow = true;  };
    splash =        { full-shadow = true;  };
    dialog =        { full-shadow = true;  };
    normal =        { full-shadow = true;  };
    notify =        { full-shadow = true;  };
    combo =         { full-shadow = true;  };
    dnd =           { full-shadow = true;  };
    unknown =       { full-shadow = true;  };
};

# Window type settings
# 
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: 
#     "unknown", "desktop", "dock", "toolbar", "menu", "utility", 
#     "splash", "dialog", "normal", "dropdown_menu", "popup_menu", 
#     "tooltip", "notification", "combo", and "dnd".
# 
# Following per window-type options are available: ::
# 
#   fade, shadow:::
#     Controls window-type-specific shadow and fade settings.
# 
#   opacity:::
#     Controls default opacity of the window type.
# 
#   focus:::
#     Controls whether the window of this type is to be always considered focused. 
#     (By default, all window types except "normal" and "dialog" has this on.)
# 
#   full-shadow:::
#     Controls whether shadow is drawn under the parts of the window that you 
#     normally won't be able to see. Useful when the window has parts of it 
#     transparent, and you want shadows in those areas.
# 
#   redir-ignore:::
#     Controls whether this type of windows should cause screen to become 
#     redirected again after been unredirected. If you have unredir-if-possible
#     set, and doesn't want certain window to cause unnecessary screen redirection, 
#     you can set this to `true`.
#

Steps of reproduction

  1. enable shadows
  2. open a full screen window on the left monitor
  3. see their shadows from the next monitor

Expected behavior

no shadows appearing in the next monitor

Current Behavior

shadows appearing in the next monitor

Stack trace

Steps of reproduction 2

  1. have borders enabled in the window manager
  2. slowly move a floating window

Expected behavior

it simply moves the windows, smoothly

Current Behavior

the border bugs out when moving

Other details

A video of the border bugging out.

I have tried toggling basically every setting in the .config, nothing worked. It happens only in this fork, on normal Picom it's completey normal (both, the shadow bug and this border one)

https://user-images.githubusercontent.com/39961645/164345259-79158a58-5f0d-4b9a-a936-f7f57a268e4a.mp4