summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2019-12-04 15:00:43 +0200
committerPekka Paalanen <pekka.paalanen@collabora.com>2019-12-12 13:15:52 +0200
commit98ab770ab87ce8cfe240a864f382d2553244d782 (patch)
treeeea505d3a446ae7e1d7ec49d158b6782491da5d7
parente1246a80c31bed9347981a110a9b4460f36c8631 (diff)
downloadweston-98ab770ab87ce8cfe240a864f382d2553244d782.tar.gz
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>
-rw-r--r--xwayland/window-manager.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 8da5fde0..6a646fe9 100644
--- a/xwayland/window-manager.c
+++ b/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);