compositor-wayland: Make sure border fields are set before wayland_compositor_create_output and document some function dependencies.
This commit is contained in:
committed by
Kristian Høgsberg
parent
01a9f1b992
commit
b9b87125f0
@@ -237,11 +237,6 @@ create_border(struct wayland_compositor *c)
|
|||||||
0, GL_BGRA_EXT, GL_UNSIGNED_BYTE,
|
0, GL_BGRA_EXT, GL_UNSIGNED_BYTE,
|
||||||
pixman_image_get_data(image));
|
pixman_image_get_data(image));
|
||||||
|
|
||||||
c->border.top = 25;
|
|
||||||
c->border.bottom = 50;
|
|
||||||
c->border.left = 25;
|
|
||||||
c->border.right = 25;
|
|
||||||
|
|
||||||
pixman_image_unref(image);
|
pixman_image_unref(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -843,12 +838,20 @@ wayland_compositor_create(struct wl_display *display,
|
|||||||
c->base.destroy = wayland_destroy;
|
c->base.destroy = wayland_destroy;
|
||||||
c->base.restore = wayland_restore;
|
c->base.restore = wayland_restore;
|
||||||
|
|
||||||
|
c->border.top = 25;
|
||||||
|
c->border.bottom = 50;
|
||||||
|
c->border.left = 25;
|
||||||
|
c->border.right = 25;
|
||||||
|
|
||||||
|
/* requires border fields */
|
||||||
if (wayland_compositor_create_output(c, width, height) < 0)
|
if (wayland_compositor_create_output(c, width, height) < 0)
|
||||||
goto err_display;
|
goto err_display;
|
||||||
|
|
||||||
|
/* requires wayland_compositor_create_output */
|
||||||
if (gles2_renderer_init(&c->base) < 0)
|
if (gles2_renderer_init(&c->base) < 0)
|
||||||
goto err_display;
|
goto err_display;
|
||||||
|
|
||||||
|
/* requires gles2_renderer_init */
|
||||||
create_border(c);
|
create_border(c);
|
||||||
|
|
||||||
loop = wl_display_get_event_loop(c->base.wl_display);
|
loop = wl_display_get_event_loop(c->base.wl_display);
|
||||||
|
|||||||
Reference in New Issue
Block a user