Skip to content

Fix shadowless context menus

Vlad Zahorodnii requested to merge work/context-menu-shadow into master

QtWayland doesn't attach a null buffer to a wl_surface to unmap it, instead it destroys the wl_surface. This is not wrong, but it breaks a lot of assumptions about the way how the qpa manages window system resources.

With this change, KWindowShadow will start using heuristics to keep track of window system resources and when needed, re-create shadow objects. We need to use heuristics because there is nothing in public API that we can use.

It's worth noting that QtWayland provides a private API that you could use to get notified when the wl_surface object has been destroyed. But we should use private APIs only if there is no other way around. In this particular case, we have one (QEvent::Expose and QEvent::Hide).

Merge request reports

Loading