-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swc does not support subsurfaces #25
Comments
I made commit that fixes this issue. It is in pull request #24. But |
This is more than four years old and probably a different cause, but I'm still getting segfault when running mpv. In attachment is backtrace output, segfault occurs in |
I'm not sure, the lack of debug symbols in the backtrace makes it difficult to tell? Perhaps the error happened earlier on, but was not caught due to lack of error checking in Perhaps you could add some printf debugging there to figure out what's going on? I will see if I can reproduce (normally I use SHM mpv output, which works for me). |
I managed to reproduce the mpv issue. It is the same issue I fixed 5 years ago in vo_opengl mpv-player/mpv@618361c that has resurfaced in vo_gpu. The following diff to mpv should fix it. I'll open a pull request. diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c
index 650072c73c..8239f2101a 100644
--- a/video/out/opengl/context_wayland.c
+++ b/video/out/opengl/context_wayland.c
@@ -45,7 +45,8 @@ static void resize(struct ra_ctx *ctx)
const int32_t height = wl->scaling*mp_rect_h(wl->geometry);
wl_surface_set_buffer_scale(wl->surface, wl->scaling);
- wl_egl_window_resize(p->egl_window, width, height, 0, 0);
+ if (p->egl_window)
+ wl_egl_window_resize(p->egl_window, width, height, 0, 0);
wl->vo->dwidth = width;
wl->vo->dheight = height; |
Thanks! That indeed fixes the problem. |
I don't have a full picture, but I did look at this a while ago and have some WIP changes that maybe you could start from. Let me see if they still apply, and then I'll push a branch. I'd also be quite happy to get firefox to work, and having someone else interested in helping out might be enough motivation to finally get it done :) |
👍 for subsurfaces. I think this is one of the main features stopping me from using velox as my daily. Any info you can give on what is needed from swc for this would be great - I can contribute any code that would be helpful. I'm still learning the wayland protocol but will have to lookup subsurfaces. |
Thanks for your interest. To get the necessary background, read through https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_subsurface. Basically, a subsurface is just a regular surface that should be moved, hidden, and shown relative to a parent surface, and the surface and all its subsurfaces are adjacent in the z-order. There is some additional complexity in that a subsurface has two modes, synced, and desynced. In desynced mode, commits behave just like it were a normal surface. In synced mode, a commit to the subsurface stages its state which only gets applied upon a commit to the parent surface. The main difficulties that came up when I looked at this were dealing with a tree of surfaces, since the compositor currently uses a linear list. It might be possible to keep the invariant that any subsurfaces come immediately after the surface in the compositor's surface list. |
On command:
Writes:
I tried to gdb it and figured out that
mpv
requires thatwl_keyboard_send_keymap
must me called beforewl_keyboard_send_modifiers
. Because it savesstate
atwl_keyboard_send_keymap
and uses it atwl_keyboard_send_modifiers
.On Weston
mpv
works fine.The text was updated successfully, but these errors were encountered: