From c635a39e7c75a5bb3988ed067650911f5721822c Mon Sep 17 00:00:00 2001 From: Simon Gaiser Date: Wed, 23 Jul 2025 12:51:16 +0200 Subject: [PATCH 1/2] vmside: Use correct format string instead of casting part 2 Fix format strings missed in "vmside: Use correct format string instead of casting" (829a7d511d03), too. --- gui-agent/vmside.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gui-agent/vmside.c b/gui-agent/vmside.c index e1d015af..579a3ecd 100644 --- a/gui-agent/vmside.c +++ b/gui-agent/vmside.c @@ -1328,7 +1328,7 @@ static void process_xevent_message(Ghandles * g, XClientMessageEvent * ev) return; } if (act_type != g->xembed_info) { - fprintf(stderr, "window 0x%x havn't proper _XEMBED_INFO property, assuming defaults (workaround for buggy applications)\n", (unsigned int)w); + fprintf(stderr, "window 0x%lx havn't proper _XEMBED_INFO property, assuming defaults (workaround for buggy applications)\n", w); } if (act_type == g->xembed_info && nitems == 2) { mapwindow = ((int*)data)[1] & XEMBED_MAPPED; @@ -1534,21 +1534,17 @@ static int send_full_window_info(Ghandles *g, XID w, struct window_data *wd) if (children_list) XFree(children_list); if (parent != g->root_win) { - fprintf(stderr, "Window 0x%x has parent 0x%x, which isn't root 0x%x.\n" + fprintf(stderr, "Window 0x%lx has parent 0x%lx, which isn't root 0x%lx.\n" " Presumably window has been reparented at some point.\n" " Skipping it.\n", - (unsigned int)window_to_query, - (unsigned int)parent, - (unsigned int)g->root_win); + window_to_query, parent, g->root_win); return 0; } if (root != g->root_win) { - fprintf(stderr, "Window 0x%x has root 0x%x, which isn't expected root 0x%x.\n" + fprintf(stderr, "Window 0x%lx has root 0x%lx, which isn't expected root 0x%lx.\n" " This is rather strange and probably indicates a bug somewhere.\n" " Skipping it.\n", - (unsigned int)window_to_query, - (unsigned int)root, - (unsigned int)g->root_win); + window_to_query, root, g->root_win); return 0; } if (!XGetTransientForHint(g->display, w, &transient)) From 131f362b20ae51f55a5491f084fb12f605bcd5a1 Mon Sep 17 00:00:00 2001 From: Simon Gaiser Date: Wed, 23 Jul 2025 13:36:33 +0200 Subject: [PATCH 2/2] xf86-video-dummy: codestyle: avoid unnecessary indent Fix codestyle of "Don't try to send grants for not realized windows" (0fc7bb112a9f). --- xf86-video-dummy/src/dummy_driver.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/xf86-video-dummy/src/dummy_driver.c b/xf86-video-dummy/src/dummy_driver.c index 5c0a5728..10c3d758 100644 --- a/xf86-video-dummy/src/dummy_driver.c +++ b/xf86-video-dummy/src/dummy_driver.c @@ -1093,18 +1093,20 @@ qubes_destroy_pixmap(PixmapPtr pixmap) { static void sendRealizedNotify(WindowPtr win, Bool unrealized) { - if (agentClient) { - xQVEWindowRealizedEvent e = {}; - e.type = QVE->eventBase + QVEWindowRealized; - - if (unrealized) { - e.detail |= QVEWindowRealizedDetailUnrealized; - } + if (!agentClient) { + return; + } - e.window = win->drawable.id; + xQVEWindowRealizedEvent e = {}; + e.type = QVE->eventBase + QVEWindowRealized; - WriteEventsToClient(agentClient, 1, (xEvent *)&e); + if (unrealized) { + e.detail |= QVEWindowRealizedDetailUnrealized; } + + e.window = win->drawable.id; + + WriteEventsToClient(agentClient, 1, (xEvent *)&e); } static Bool