UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    2019: Time to make Unity8 great again?

    Scheduled Pinned Locked Moved Lomiri (was Unity8)
    18 Posts 6 Posters 7.2k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      fossMan
      last edited by fossMan

      Thanks @alan_g.
      What exactly is the "mirclient API", is that an abstraction or a specific set of files? Could you give a small example e.g a line of code showing dependence on that API, and perhaps how a Wayland extension could replace it?

      alan_gA 1 Reply Last reply Reply Quote 0
      • alan_gA Offline
        alan_g @fossMan
        last edited by alan_g

        @fossMan said in 2019: Time to make Unity8 great again?:

        What exactly is the "mirclient API", is that an abstraction or a specific set of files? Could you give a small example e.g a line of code showing dependence on that API, and perhaps how a Wayland extension could replace it?

        The mirclient API is the API provided by libmirclient.so. It is the API through which Mir proposed to support "Convergent" application toolkits. There are various bits of UBports relying on this API that need rework to Wayland (so learning to do that will remain useful after this exercise).

        Here's some mirclient API code:

                    Surface surface{mir_connection_create_render_surface_sync(DecorationProvider::connection, width, height)};
        
                    auto const buffer_stream =
                        mir_render_surface_get_buffer_stream(surface, width, height, mir_pixel_format_xrgb_8888);
        
                    auto window = WindowSpec::for_gloss(DecorationProvider::connection, width, height)
                        .set_fullscreen_on_output(output_id)
                        .set_event_handler(&handle_event_for_background, this)
                        .add_surface(surface, width, height, 0, 0)
                        .set_name(wallpaper_name).create_window();
        

        and some equivalent Wayland code:

                ctx.surface = wl_compositor_create_surface(globals.compositor);
        ...
                ctx.shell_surface = wl_shell_get_shell_surface(globals.shell, ctx.surface);
                wl_shell_surface_set_fullscreen(
                    ctx.shell_surface,
                    WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
                    0,
                    ctx.output.output);
        ...
                auto const shm_pool = make_scoped(
                    make_shm_pool(globals.shm, stride * height, &ctx.content_area),
                    &wl_shm_pool_destroy);
        
                ctx.buffer = wl_shm_pool_create_buffer(
                        shm_pool.get(),
                        0,
                        width, height, stride,
                        WL_SHM_FORMAT_ARGB8888);
        

        https://github.com/MirServer/mir/pull/669/files#diff-ea35a63c157fb0d09e5713c6ee0b1dbe

        F 1 Reply Last reply Reply Quote 2
        • F Offline
          fossMan @alan_g
          last edited by fossMan

          @alan_g said in 2019: Time to make Unity8 great again?:

          The mirclient API is the API provided by libmirclient.so.

          Thanks for the example. Is there any way to download an example of a libmirclient.so file without installing anything? The closest I got was a mention on this Ubuntu package

          EDIT: or perhaps there is some documentation of the libmirclient API in order to understand better exactly what parts of the code is addressing the API?

          alan_gA 1 Reply Last reply Reply Quote 0
          • alan_gA Offline
            alan_g @fossMan
            last edited by

            @fossMan https://mir-server.io/doc/group__mir__toolkit.html

            1 Reply Last reply Reply Quote 1
            • F Offline
              fossMan
              last edited by

              I would like to look at these issues but can't spare the focus time until start of June.

              alan_gA 1 Reply Last reply Reply Quote 0
              • alan_gA Offline
                alan_g @fossMan
                last edited by

                @fossMan said in 2019: Time to make Unity8 great again?:

                I would like to look at these issues but can't spare the focus time until start of June.

                I imagine there will still be issues left for you when you have the time. 8-)

                dobeyD 1 Reply Last reply Reply Quote 2
                • dobeyD Offline
                  dobey @alan_g
                  last edited by

                  @alan_g I see in the Mir 1.4.0 release discourse mention of the layer-shell extension. If I understand correctly how this extension works, we should be able to use it for re-implementing the trusted overlays, no?

                  If we could do that, and get it done soon, that would be a huge step forward in being able to use unity8 on wayland.

                  alan_gA 1 Reply Last reply Reply Quote 1
                  • alan_gA Offline
                    alan_g @dobey
                    last edited by

                    @dobey said in 2019: Time to make Unity8 great again?:

                    @alan_g I see in the Mir 1.4.0 release discourse mention of the layer-shell extension. If I understand correctly how this extension works, we should be able to use it for re-implementing the trusted overlays, no?

                    I agree we should map out Wayland protocols that can help replace mirclient functionality. But in this specific case, I don't think layer-shell addresses the same concerns as trusted prompts, so I don't immediately see how you imagine using it.

                    I'll have a closer look at this idea after the holiday weekend to see what I've missed.

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      GizmoChicken @alan_g
                      last edited by

                      @alan_g said in 2019: Time to make Unity8 great again?:

                      2019: Time to make Unity8 great again?

                      Given recent progress, how about 2020Q1: Time to make Unity8 great again?

                      alan_gA 1 Reply Last reply Reply Quote 0
                      • alan_gA Offline
                        alan_g @GizmoChicken
                        last edited by

                        @GizmoChicken said in 2019: Time to make Unity8 great again?:

                        Given recent progress, how about 2020Q1: Time to make Unity8 great again?

                        I like it! Maybe we can just rename this thread?

                        1 Reply Last reply Reply Quote 1

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post