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
Touch seeded packages, which is subscribed to mir in Ubuntu.
https://bugs.launchpad.net/bugs/1667014

Title:
  If no pixel format is set for a window it hangs when requesting a
  buffer

Status in Mir:
  Invalid
Status in mir package in Ubuntu:
  New

Bug description:
  If no pixel format is set when creating a window the request for a
  buffer hangs.

  An example would be to comment out setting the pixel format in eglapp.c then 
running any egl client demo.
  http://paste.ubuntu.com/24047858/

To manage notifications about this bug go to:
https://bugs.launchpad.net/mir/+bug/1667014/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to