xwm: debug what kind decoration is drawn

Knowing the kind of decoration drawn will help track down issues with
unexpected decorations.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 5 years ago
parent e1246a80c3
commit 98ab770ab8
  1. 9
      xwayland/window-manager.c

@ -1226,8 +1226,7 @@ weston_wm_window_draw_decoration(struct weston_wm_window *window)
{
cairo_t *cr;
int width, height;
wm_printf(window->wm, "XWM: draw decoration, win %d\n", window->id);
const char *how;
weston_wm_window_get_frame_size(window, &width, &height);
@ -1235,11 +1234,14 @@ weston_wm_window_draw_decoration(struct weston_wm_window *window)
cr = cairo_create(window->cairo_surface);
if (window->fullscreen) {
how = "fullscreen";
/* nothing */
} else if (window->decorate) {
how = "decorate";
frame_set_title(window->frame, window->name);
frame_repaint(window->frame, cr);
} else {
how = "shadow";
cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
cairo_set_source_rgba(cr, 0, 0, 0, 0);
cairo_paint(cr);
@ -1248,6 +1250,9 @@ weston_wm_window_draw_decoration(struct weston_wm_window *window)
2, 2, width + 8, height + 8, 64, 64);
}
wm_printf(window->wm, "XWM: draw decoration, win %d, %s\n",
window->id, how);
cairo_destroy(cr);
cairo_surface_flush(window->cairo_surface);
xcb_flush(window->wm->conn);

Loading…
Cancel
Save