soreau / pixdecor

Pixdecor plugin
MIT License
15 stars 3 forks source link

Shadow remains after window move with keys #21

Open AlexJakeGreen opened 1 month ago

AlexJakeGreen commented 1 month ago

If a window is moved using keybindings (e.g. Meta+Right), the shadow remains on old place.

IMG_1502

soreau commented 1 month ago

It looks like something isn't being damaged enough but this would not be the responsibility of the decoration plugin, it should be fixed in whatever plugin you have configured to use i.e. Meta+Right. By default, it would be grid plugin. However it might not happen with other decoration plugins because they do not render shadows. Are you using the shadow plugin to render shadows or pixdecor with 'rounded corners' option?

AlexJakeGreen commented 1 month ago

I do not use shadow plugin. Here are the settings:

[core]
plugins = alpha autostart command expo fast-switcher grid move oswitch place resize switcher vswitch
 window-rules wm-actions scale scale-title-filter foreign-toplevel kbdd pixdecor

[pixdecor]
always_decorate = none
animate = false
bg_color = \#1C1F21FF
bg_text_color = \#B3B3B3FF
border_size = 1
csd_titlebar_height = 32
effect_color = \#E01C24FF
effect_type = none
enable_shade = true
fg_color = \#31363BFF
fg_text_color = \#FFFFFFFF
icons_path = /home/alex/.config/wayfire/icons/window-%s.png
ignore_views = none
maximized_borders = true
maximized_shadows = false
overlay_engine = rounded_corners
rounded_corner_radius = 8
shade_duration = 1000ms sigmoid
shade_modifier = <ctrl> <super> 
shade_toggle = 
shadow_color = \#00000040
shadow_radius = 0
title_font = Noto Sans, 16
title_text_align = 1
titlebar = true

[grid]
duration = 300ms circle
restore = <super> KEY_DOWN | <super> KEY_KP0
slot_b = <super> KEY_KP2
slot_bl = <super> KEY_KP1
slot_br = <super> KEY_KP3
slot_c = <super> KEY_UP | <super> KEY_KP5
slot_l = <super> KEY_LEFT | <super> KEY_KP4
slot_r = <super> KEY_RIGHT | <super> KEY_KP6
slot_t = <super> KEY_KP8
slot_tl = <super> KEY_KP7
slot_tr = <super> KEY_KP9
type = none
soreau commented 1 month ago

In your config, you have shadow_radius = 0, which means there are no shadows. Also in your screenshot, the window appears as if maybe it was wobbling or some other transform that make the lines not parallel to the edges of the shot. I am not able to reproduce this problem, so I feel like I'm missing something.

AlexJakeGreen commented 1 month ago

I used a phone, because an attempt to make a screenshot erases the artifact

soreau commented 1 month ago

Actually, when I set shadow_radius to a non-zero value, I can reproduce the problem. I'll look into it.

AlexJakeGreen commented 1 month ago

I think it was late when I tested with different shadow size, and set it to zero late night, and today just copied a part of config without recheking again. sorry. The shadow must be greater than zero. This is how I found it is shadow, not a border.

soreau commented 1 month ago

Does this wayfire patch help? It seems to fix the issue here.

AlexJakeGreen commented 1 month ago

Yes, the patch helps. The issue has gone after the patch applied. Thanks

soreau commented 1 month ago

I cannot say this patch will make it upstream. I am currently trying to find a way to fix it in pixdecor. I will leave this issue open until it has been resolved fully.

soreau commented 1 month ago

I was able to fix the problem in pixdecor, thanks for the report. This issue should close automatically when track-wlroots-0.18 is merged, so it will work without the wayfire/grid patch.