desktop: Avoid sending the dimensions for the first output 05/27905/4
authorMarius Vlad <marius.vlad@collabora.com>
Mon, 15 Aug 2022 16:45:53 +0000 (19:45 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Wed, 14 Sep 2022 16:35:17 +0000 (16:35 +0000)
Rather than sending the first available output we have in the system,
use explicitly the output that we specified in the configuration for
that particular appid. If we didn't do that, we would first send the
dimension for the first output, after which we send the dimensions for
the correct output, resulting in a few configure exchanges between the
client and the compositor.

This fixes that by using the correct output from the beginning.

Bug-AGL: SPEC-4520
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: If796f1ce8ba069d4fd2c73a7bdfd42e94c9e0418

src/desktop.c

index 36fe6f2..1cda129 100644 (file)
@@ -223,7 +223,10 @@ desktop_surface_added(struct weston_desktop_surface *dsurface, void *userdata)
 
        if (output && ivi->shell_client.ready) {
                struct ivi_output *ivi_output = to_ivi_output(output);
-               desktop_surface_added_configure(surface, ivi_output);
+               if (active_output)
+                       desktop_surface_added_configure(surface, active_output);
+               else
+                       desktop_surface_added_configure(surface, ivi_output);
        }
        /*
         * We delay creating "normal" desktop surfaces until later, to