Hello everyone,
we talked for a short time on Discord. As promised I file a short issue here.
Platform:
- Arch linux
- Cosmic dm
- DAW: Bitwig Studio 6, installed from flatpak. A 30 day trial is available.
- AMD x86_x64
My small synth project which is creating an embedded gui using baseview could be found by the DAW,
could always load the plugin and play sounds. It is based on clack. But when opening the GUI window it stayed black.
By reading the logs of the DAW (which is stored in a hidden folder in the home directory) I could trace down the
location: on_frame() was not called.
In commit 13ccd15 in file
'src/platform/x11/visibility_tree.rs' at line 306 I added:
let is_ancestor = ancestry.own_window_id().is_some_and(|id| id != current_window);
let finally_mapped = mapped || is_ancestor;
// All checks succeeded, now register the current window info and fetch info from the parent.
ancestry.push(Ancestor { id: current_window, mapped: finally_mapped.into() });
Here is what probably happened:
Wayland-native plugin hosts (?) probably create XEmbed container windows via XWayland (and never truly map them to X11)? This is just a guess. The window content then is composited by the Wayland compositor instead of X11.
In this case treating an unmapped parent window as “invisible” would permanently block “on_frame()” calls. And unmapped parent windows should be impossible in native X11. For parent windows (not our own window), we force “mapped=true” even if X11 (XWayland) reports that the window is “UNMAPPED.” If the host later hides its window, we receive “UnmapNotify” events via the “SubstructureNotify” mask registered above, which correctly sets “own_window_is_viewable” to “false” then.
I know, this is “hack-like”, but made my synth work as plugin in that situation.
Maybe this patch helps to understand XWayland issues or point to an exception of some DAW's. At my system this patch made baseview work perfectly in my dm and BitwigStudio. I'm not sure if this is a bug of my systems configuration or baseview. But I wanted to share this observation in case it's helpful.
Hello everyone,
we talked for a short time on Discord. As promised I file a short issue here.
Platform:
My small synth project which is creating an embedded gui using baseview could be found by the DAW,
could always load the plugin and play sounds. It is based on clack. But when opening the GUI window it stayed black.
By reading the logs of the DAW (which is stored in a hidden folder in the home directory) I could trace down the
location: on_frame() was not called.
In commit 13ccd15 in file
'src/platform/x11/visibility_tree.rs' at line 306 I added:
Here is what probably happened:
Wayland-native plugin hosts (?) probably create XEmbed container windows via XWayland (and never truly map them to X11)? This is just a guess. The window content then is composited by the Wayland compositor instead of X11.
In this case treating an unmapped parent window as “invisible” would permanently block “on_frame()” calls. And unmapped parent windows should be impossible in native X11. For parent windows (not our own window), we force “mapped=true” even if X11 (XWayland) reports that the window is “UNMAPPED.” If the host later hides its window, we receive “UnmapNotify” events via the “SubstructureNotify” mask registered above, which correctly sets “own_window_is_viewable” to “false” then.
I know, this is “hack-like”, but made my synth work as plugin in that situation.
Maybe this patch helps to understand XWayland issues or point to an exception of some DAW's. At my system this patch made baseview work perfectly in my dm and BitwigStudio. I'm not sure if this is a bug of my systems configuration or baseview. But I wanted to share this observation in case it's helpful.