mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-14 01:15:59 +01:00
wayland backend: fix xdg-shell for weston
- xdg toplevel configure can be called with 0 width/height, in that case we are free to do as we like (so do nothing) - need a display roundtrip after everything is setup but before we start attaching buffers to the surface
This commit is contained in:
parent
3377e5e4f2
commit
e2e149784b
1 changed files with 5 additions and 1 deletions
|
@ -183,8 +183,10 @@ static void xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *x
|
||||||
struct wlr_wl_backend_output *output = data;
|
struct wlr_wl_backend_output *output = data;
|
||||||
assert(output && output->xdg_toplevel == xdg_toplevel);
|
assert(output && output->xdg_toplevel == xdg_toplevel);
|
||||||
|
|
||||||
|
if (width == 0 && height == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// loop over states for maximized etc?
|
// loop over states for maximized etc?
|
||||||
|
|
||||||
wl_egl_window_resize(output->egl_window, width, height, 0, 0);
|
wl_egl_window_resize(output->egl_window, width, height, 0, 0);
|
||||||
output->wlr_output.width = width;
|
output->wlr_output.width = width;
|
||||||
output->wlr_output.height = height;
|
output->wlr_output.height = height;
|
||||||
|
@ -261,6 +263,8 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) {
|
||||||
wlr_output->width, wlr_output->height);
|
wlr_output->width, wlr_output->height);
|
||||||
output->egl_surface = wlr_egl_create_surface(&backend->egl, output->egl_window);
|
output->egl_surface = wlr_egl_create_surface(&backend->egl, output->egl_window);
|
||||||
|
|
||||||
|
wl_display_roundtrip(output->backend->remote_display);
|
||||||
|
|
||||||
// start rendering loop per callbacks by rendering first frame
|
// start rendering loop per callbacks by rendering first frame
|
||||||
if (!eglMakeCurrent(output->backend->egl.display,
|
if (!eglMakeCurrent(output->backend->egl.display,
|
||||||
output->egl_surface, output->egl_surface,
|
output->egl_surface, output->egl_surface,
|
||||||
|
|
Loading…
Reference in a new issue