diff --git a/src/backend/wayland/wl_framebuf.c b/src/backend/wayland/wl_framebuf.c index 7d63940..3dd8945 100644 --- a/src/backend/wayland/wl_framebuf.c +++ b/src/backend/wayland/wl_framebuf.c @@ -812,13 +812,16 @@ wl_frame_paint(struct WFrameWindow *fwin) wlr_scene_node_set_enabled(&rb_fb->scene_buf->node, show_resizebar); } - /* Always commit the parent frame buffer — it holds the resizebar - * pixels (when unshaded) and/or the titlebar fallback (when the - * titlebar child is too narrow). The buffer is cleared to transparent - * at the top of this function so unused areas won't obscure anything. */ + /* Commit the parent frame buffer when it has visible content: + * resizebar pixels (unshaded) or titlebar fallback (when the titlebar + * child buffer is too narrow and we drew into the parent instead). */ if (fb->scene_buf) { - wlr_scene_buffer_set_buffer_with_damage(fb->scene_buf, &fb->base, NULL); - wlr_scene_node_set_enabled(&fb->scene_buf->node, true); + if (show_resizebar || !fwin->titlebar || !frame_buf_find(fwin->titlebar->window)) { + wlr_scene_buffer_set_buffer_with_damage(fb->scene_buf, &fb->base, NULL); + wlr_scene_node_set_enabled(&fb->scene_buf->node, true); + } else { + wlr_scene_node_set_enabled(&fb->scene_buf->node, false); + } } if (wl_state.output) diff --git a/src/backend/wayland/wl_stubs.c b/src/backend/wayland/wl_stubs.c index 7fedbfe..4ef69f6 100644 --- a/src/backend/wayland/wl_stubs.c +++ b/src/backend/wayland/wl_stubs.c @@ -329,7 +329,11 @@ void wl_noop_client_send_event(WNativeWindow win, void *d) { (void)win; (void)d; void wl_noop_window_get_colormap(WNativeWindow win, unsigned long *c) { (void)win; (void)c; } WNativeWindow wl_noop_pointer_query_window(WNativeWindow root) { (void)root; return WNATIVE_NONE; } void wl_noop_dialog_paint_icon(unsigned long d, void *b, void *p, WScreen *s, - int x, int y, int w, int h) { (void)d;(void)b;(void)p;(void)s;(void)x;(void)y;(void)w;(void)h; }const char *wl_noop_keysym_to_string(unsigned long ks) { (void)ks; return ""; }int wl_noop_window_get_command(WNativeWindow win, char ***a, int *c) { (void)win; (void)a; *c=0; return 0; } + int x, int y, int w, int h) { (void)d;(void)b;(void)p;(void)s;(void)x;(void)y;(void)w;(void)h; }const char *wl_noop_keysym_to_string(unsigned long ks) { + static char buf[64]; + xkb_keysym_get_name((xkb_keysym_t)ks, buf, sizeof(buf)); + return buf; +}int wl_noop_window_get_command(WNativeWindow win, char ***a, int *c) { (void)win; (void)a; *c=0; return 0; } int wl_noop_netwm_process_client_message(WMEvent *e) { (void)e; return 0; } int wl_noop_xdnd_process_client_message(WMEvent *e) { (void)e; return 0; } void wl_noop_xdnd_process_selection(WMEvent *e) { (void)e; }