Closed awused closed 1 month ago
After updating to the newest git head the logs are now verbose instead of debug, but they're still wrong.
i think i observed the same behavior a while ago. i guess this function should be called only when there is some motion, not each frame or how often it's called now.
After adding some debug lines manually, the problem is that monitors->count
is 0 in win_find_monitor
. Obviously I have monitors attached, so there's something else wrong.
x_update_monitors_async
is only called to set ps->monitors
when ps->o.crop_shadow_to_monitor
is set, so these logs and checks will always fail when users haven't set that, making them useless. It seems like a bug that any code is using ps->monitors
without checking ps->o.crop_shadow_to_monitor
.
https://github.com/yshui/picom/blob/797e60f618755c6ba142a31e9dc494eb62409391/src/picom.c#L2353 https://github.com/yshui/picom/blob/797e60f618755c6ba142a31e9dc494eb62409391/src/event.c#L833
I don't see why this is a problem? monitor information is only used to crop shadow, so if you turn it off it is not needed.
Oh, this made me realise if someone uses monitor information for animations, they would also need to enable crop-shadow-to-monitor
:thinking:
I should either document this, or enable this automatically if such animations exist.
It's also spamming logs with nonsense and it's pretty clear the function can never return anything besides -1 without crop_shadow_to_monitor
.
@awused verbose log level already prints a ton of logs, this doesn't really make any difference.
It's not just that they're a lot of logs, it's that they're actually wrong logs. Though if the monitors will always be fetched then that shouldn't be a problem any more.
Platform
Fedora 40 amd 64
GPU, drivers, and screen setup
Environment
i3 with gaps, so relatively few of these windows even touch the edge of a monitor and are mostly firmly inside one of them.
picom version
vgit-7094d
Diagnostics
``` [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Type specifier is deprecated. Type "c" specified on target "I3_FLOATING_WINDOW" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Type specifier is deprecated. Type "a" specified on target "_NET_WM_STATE" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Format specifier is deprecated. Format "32" specified on target "_NET_WM_STATE" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Type specifier is deprecated. Type "a" specified on target "_NET_WM_STATE" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Format specifier is deprecated. Format "32" specified on target "_NET_WM_STATE" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Type specifier is deprecated. Type "c" specified on target "_GTK_FRAME_EXTENTS" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Type specifier is deprecated. Type "c" specified on target "_GTK_FRAME_EXTENTS" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Type specifier is deprecated. Type "a" specified on target "_NET_WM_STATE" will be ignored, you can remove it. [ 08/03/2024 10:17:27.429 c2_parse_target WARN ] Format specifier is deprecated. Format "32" specified on target "_NET_WM_STATE" will be ignored, you can remove it. **Version:** vgit-7094d ### Extensions: * Shape: Yes * RandR: Yes * Present: Present ### Misc: * Use Overlay: No * Config file specified: None * Config file used: /home/desuwa/.config/picom.conf ### Drivers (inaccurate): NVIDIA [ 08/03/2024 10:17:27.446 egl_init WARN ] The egl backend is still experimental, use with care. ### Backend: egl * Driver vendors: * EGL: NVIDIA * GL: NVIDIA Corporation * GL renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2 ### Backend: glx * Driver vendors: * GLX: NVIDIA Corporation * GL: NVIDIA Corporation * GL renderer: NVIDIA GeForce RTX 4090/PCIe/SSE2 ```Configuration:
Configuration file
``` backend = "glx"; vsync = true; shadow = true; #no-dock-shadow = true; #no-dnd-shadow = true; shadow-radius = 10; shadow-offset-x = -5; shadow-offset-y = 0; shadow-opacity = 0.8; shadow-red = 0.11; shadow-green = 0.12; shadow-blue = 0.13; shadow-exclude = [ "name = 'Notification'", "_GTK_FRAME_EXTENTS@:c", "class_g = 'i3-frame'", "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'", "_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'", "!I3_FLOATING_WINDOW@:c" ]; shadow-ignore-shaped = true; #alpha-step = 0.06; blur-background = false; blur-background-fixed = true; blur-kern = "7x7box"; blur-background-exclude = [ "class_g = 'i3-frame'", "window_type = 'dock'", "window_type = 'desktop'", "_GTK_FRAME_EXTENTS@:c" ]; # Duplicating the _NET_WM_STATE entries because compton cannot deal with atom arrays :-/ opacity-rule = [ "0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" ]; fading = false; fade-delta = 7; fade-in-step = 0.05; fade-out-step = 0.05; fade-exclude = []; mark-wmwin-focused = true; mark-ovredir-focused = true; use-ewmh-active-win = true; detect-rounded-corners = true; detect-client-opacity = true; # refresh-rate = 0; dbe = false; glx-no-stencil = true; glx-copy-from-front = false; use-damage = true; # sw-opti = false; unredir-if-possible = false; focus-exclude = []; detect-transient = true; detect-client-leader = true; invert-color-include = []; xrender-sync-fence = true; wintypes: { tooltip = { fade = true; shadow = false; opacity = 1.00; focus = true; }; }; use_realtime_scheduling = false; ```Steps of reproduction
Expected behavior
[ 08/03/2024 10:11:47.728 win_find_monitor DEBUG ] Window <id> <title> <geometry> is not entirely on any monitor
Should only log for windows that aren't entirely on any monitorCurrent Behavior
[ 08/03/2024 10:11:47.728 win_find_monitor DEBUG ] Window <id> <title> <geometry> is not entirely on any monitor
logs for every single window, even those floating in the center of a monitor not near any edge.I haven't manually confirmed every single window I have open, but every single window I have gone to manually confirm was being logged.
Other details
Monitor geometries:
HDMI-0 connected 2560x1440+3200+0 (normal left inverted right x axis y axis) 610mm x 350mm DP-0 connected primary 3840x2160+2560+1440 (normal left inverted right x axis y axis) 700mm x 410mm DP-2 connected 2560x1440+6400+2160 (normal left inverted right x axis y axis) 609mm x 355mm DP-4 connected 2560x1440+0+2160 (normal left inverted right x axis y axis) 609mm x 355mm
Notably, here's the firefox window at the time
[ 08/03/2024 10:11:47.728 win_find_monitor DEBUG ] Window 0x00444257 (New Issue · yshui/picom — Mozilla Firefox), 2717x1573+3440x1830, is not entirely on any monitor
was logged. It's not even maximized or touching the edge of the monitor.