[weston,2/2] xwm: dump properties of type WINDOW

Submitted by Fabien Lahoudere on May 4, 2018, 10:53 a.m.

Details

Message ID 1525431235-10721-3-git-send-email-fabien.lahoudere@collabora.com
State Accepted
Commit e0e39b66edff8a86d1e03c102ec9027da79a33cf
Headers show
Series "xwm: Dump properties." ( rev: 1 ) in Wayland

Not browsing as part of any series.

Commit Message

Fabien Lahoudere May 4, 2018, 10:53 a.m.
From: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

Very useful for TRANSIENT_FOR property debugging.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
---
 xwayland/window-manager.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 061ce17..2b3defb 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -446,6 +446,7 @@  dump_property(struct weston_wm *wm,
 	int32_t *incr_value;
 	const char *text_value, *name;
 	xcb_atom_t *atom_value;
+	xcb_window_t *window_value;
 	int width, len;
 	uint32_t i;
 
@@ -488,6 +489,9 @@  dump_property(struct weston_wm *wm,
 		wm_log_continue("\n");
 	} else if (reply->type == XCB_ATOM_CARDINAL) {
 		dump_cardinal_array(reply);
+	} else if (reply->type == XCB_ATOM_WINDOW && reply->format == 32) {
+		window_value = xcb_get_property_value(reply);
+		wm_log_continue("win %u\n", *window_value);
 	} else {
 		wm_log_continue("huh?\n");
 	}