yshui / picom

A lightweight compositor for X11 with animation support
https://picom.app/
Other
4.17k stars 588 forks source link

Weird borders appear with rounded corners #733

Closed KotonBads closed 2 years ago

KotonBads commented 2 years ago

Platform

Ubuntu 20.04 LTS

GPU, drivers, and screen setup

Intel UHD G1 Whatever is the latest thing in the repos

name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) UHD Graphics (ICL GT1) (0x8a56)
    Version: 21.0.3
    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) UHD Graphics (ICL GT1)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 21.0.3
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.0.3
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.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

Environment

Xfce 4.14

picom version

vgit-a9977

When using rounded corners via corner-radius = x, some apps show a weird border that is way off the edge of the app's window. It mostly happens on gtk apps and xfce4-panel plugins like power manager.

Version: vgit-a9977

Extensions:

Misc:

Drivers (inaccurate):

modesetting

Configuration:

Mostly just the standard config stuff

#Custom Stuff
backend = "glx";
glx-no-stencil = true;
glx-no-rebind-pixmap = true;
vsync = true; 

# Shadow
shadow = false;         # Enabled client-side shadows on windows.
shadow-radius = 2;      # The blur radius for shadows. (default 12)
shadow-offset-x = -5;       # The left offset for shadows. (default -15)
shadow-offset-y = -5;       # The top offset for shadows. (default -15)
# shadow-opacity = 0.7;     # The translucency for shadows. (default .75)
# shadow-red = 0.0;     # Red color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-green = 0.0;       # Green color value of shadow. (0.0 - 1.0, defaults to 0)
# shadow-blue = 0.0;        # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
shadow-exclude = [
 "! name~=''",
 "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'"
];
# shadow-exclude = "n:e:Notification";
shadow-ignore-shaped = true;

# rounded corners
# corner-radius = 10;
rounded-corners-exclude = [
  "window_type = 'desktop'",
  "window_type = 'dock'"
]

# Opacity
opacity-rule = [
 "100:class_g *?= 'Firefox'",
 "100:class_g *?= 'Chrome'",
 "100:class_g *?= 'Chromium'",
 "90:class_g *?= 'kitty'"
];

# active-opacity = 0.95;
# inactive-opacity = 0.95;          # Opacity of inactive windows. (0.1 - 1.0)
frame-opacity = 0;          # Opacity of window titlebars and borders. (0.1 - 1.0)
inactive-opacity-override = false;  # Inactive opacity set by 'inactive-opacity' overrides value of _NET_WM_OPACITY.

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

# Other
#inactive-dim = 0.5;        # Dim inactive windows. (0.0 - 1.0, defaults to 0).
mark-wmwin-focused = true;  # Try to detect WM windows and mark them as active.
mark-ovredir-focused = true;
detect-rounded-corners = true;
detect-client-opacity = true;
# Window type settings
wintypes:
{
  tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
  dock = { shadow = false; clip-shadow-above = true; }
  dnd = { shadow = false; }
  popup_menu = { opacity = 0.9; }
  dropdown_menu = { opacity = 0.9; }
};

##excluded apps
#shadow-exclude = [ "g:si:Conky" ];

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

# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
# blur-background = true;
# Blur background of opaque windows with transparent frames as well.
# blur-background-frame = true;
# Do not let blur radius adjust based on window opacity.
# blur-background-fixed = false;
# blur-background-exclude = [
#    "window_type = 'dock'",
#    "window_type = 'desktop'"
# ];

# blur-kern = "3x3box"

Steps of reproduction

  1. set corner-radius to any value
  2. restart picom

Expected behavior

No weird borders that extend way out of the app's window

Current Behavior

Weird border appears way out of the app's window

https://user-images.githubusercontent.com/66117568/142205424-ab6f7afe-cd2c-4d9e-8e77-d941f8e6c214.mp4

yshui commented 2 years ago

I think this is an interaction between rounded corners and gnome client side rendering. There is not much picom can do, but you can selectively disable rounded corners for gnome windows using rounded-corners-exclude

KotonBads commented 2 years ago

I've solved this problem due (refer to #572), it's just now that there are some weird things appearing on items on hover. Also happens on browsers image

KotonBads commented 2 years ago

sorry I missed the wintype, shadows was enabled for tooltips

peter-pedro commented 2 years ago

I discovered it is due to frame background blur, therefore the following completely eliminates this issue in the most simple way: blur-background-frame = false;

ikinoiky commented 2 years ago

I think this is an interaction between rounded corners and gnome client side rendering. There is not much picom can do, but you can selectively disable rounded corners for gnome windows using rounded-corners-exclude

how if i need include app for corner?