wayland: fix window initialization
This commit is contained in:
parent
e8b1ef9b25
commit
d6c387613d
1 changed files with 4 additions and 0 deletions
|
|
@ -140,6 +140,9 @@ pub fn initWindow(
|
||||||
// Setup surface
|
// Setup surface
|
||||||
wl.surface = c.wl_compositor_create_surface(wl.interfaces.wl_compositor) orelse return error.UnableToCreateSurface;
|
wl.surface = c.wl_compositor_create_surface(wl.interfaces.wl_compositor) orelse return error.UnableToCreateSurface;
|
||||||
wl.surface_descriptor = .{ .display = wl.display, .surface = wl.surface };
|
wl.surface_descriptor = .{ .display = wl.display, .surface = wl.surface };
|
||||||
|
core_window.surface_descriptor = .{ .next_in_chain = .{
|
||||||
|
.from_wayland_surface = &wl.surface_descriptor,
|
||||||
|
} };
|
||||||
|
|
||||||
// Setup opaque region
|
// Setup opaque region
|
||||||
{
|
{
|
||||||
|
|
@ -203,6 +206,7 @@ pub fn initWindow(
|
||||||
_ = libwaylandclient.wl_display_roundtrip(wl.display);
|
_ = libwaylandclient.wl_display_roundtrip(wl.display);
|
||||||
|
|
||||||
core.windows.setValue(window_id, core_window);
|
core.windows.setValue(window_id, core_window);
|
||||||
|
try core.initWindow(window_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// pub fn deinit(
|
// pub fn deinit(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue