so if the previous code looked like this:
MirWindowSpec *spec = mir_create_normal_window_spec(connection, width, *height);
mir_window_spec_set_pixel_format(spec, pixel_format);
MirWindow* window = mir_create_window_sync(spec);
EGLSurface eglsurface = eglCreateWindowSurface(egldisplay, eglconfig,
(EGLNativeWindowType)
mir_buffer_stream_get_egl_native_window(mir_window_get_buffer_stream(window)),
NULL);
the new code looks like this (as of date of posting)
MirRenderSurface* rs = mir_connection_create_render_surface_sync(connection,
width, height);
MirBufferStream* bs = mir_render_surface_get_buffer_stream(rs, width, height,
format);
EGLSurface eglsurface = eglCreateWindowSurface(egldisplay, eglconfig,
(EGLNativeWindowType) mir_buffer_stream_get_egl_native_window(bs), NULL);
MirWindowSpec *spec = mir_create_normal_window_spec(connection, width, height);
mir_window_spec_add_render_surface(spec, width, height, 0, 0);
mir_window_spec_set_event_handler(spec,
[] (MirWindow* w, MirEvent* e, void* c)
{ MirRenderSurface* rs = (MirRenderSurface*) c;
if (event == resize) //psuedocode
{
mir_render_surface_set_size(rs, new_width, new_height); //notify
driver of clients choice
auto spec = mir_create_window_spec(connection); //notify server of
clients choice
mir_window_spec_add_render_surface(spec, rs, new_width, new_height,
0, 0);
mir_window_apply_spec(window, spec);
mir_window_spec_release();
}
}
rs);
MirWindow* window = mir_create_window_sync(spec);
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1667014
Title:
If no pixel format is set for a window it hangs when requesting a
buffer
To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1667014/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs