mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 11:51:27 +00:00
wayland backend:re-attach surface on ExposeRect
This commit is contained in:
parent
e7ab056264
commit
1d74e36258
2 changed files with 6 additions and 12 deletions
|
@ -214,18 +214,14 @@ create_shm_buffer(struct window *window)
|
|||
NSWarnMLog(@"...cairo initial window error status: %s\n",
|
||||
cairo_status_to_string(cairo_surface_status(_surface)));
|
||||
}
|
||||
|
||||
window->buffer_needs_attach = YES;
|
||||
if (window->configured) {
|
||||
if(window->buffer_needs_attach) {
|
||||
window->buffer_needs_attach = NO;
|
||||
wl_surface_attach(window->surface, window->buffer, 0, 0);
|
||||
}
|
||||
wl_surface_damage(window->surface, 0, 0, width, height);
|
||||
wl_surface_damage(window->surface, 0, 0, 1000, 1000);
|
||||
wl_surface_commit(window->surface);
|
||||
//wl_display_dispatch_pending(window->wlconfig->display);
|
||||
//wl_display_flush(window->wlconfig->display);
|
||||
} else {
|
||||
window->buffer_needs_attach = YES;
|
||||
wl_display_dispatch_pending(window->wlconfig->display);
|
||||
wl_display_flush(window->wlconfig->display);
|
||||
}
|
||||
|
||||
NSDebugLog(@"[CairoSurface handleExposeRect end]");
|
||||
|
|
|
@ -1164,8 +1164,6 @@ int NSToWayland(struct window *window, int ns_y)
|
|||
xdg_wm_base_get_xdg_surface(wlconfig->wm_base, window->surface);
|
||||
window->toplevel = xdg_surface_get_toplevel(window->xdg_surface);
|
||||
|
||||
xdg_surface_add_listener(window->xdg_surface,
|
||||
&xdg_surface_listener, window);
|
||||
xdg_surface_add_listener(window->xdg_surface,
|
||||
&xdg_surface_listener, window);
|
||||
|
||||
|
|
Loading…
Reference in a new issue