]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus-launch-x11: print a window ID portably
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 7 Oct 2016 18:44:11 +0000 (19:44 +0100)
committerSimon McVittie <smcv@debian.org>
Thu, 13 Oct 2016 21:44:12 +0000 (22:44 +0100)
On LP64 platforms, a Window is unsigned long.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
tools/dbus-launch-x11.c

index e8b29f8820b22195d1bb915ce2fe9a2a955b49d7..c4b97904dd7be5f5fd07910036462ed8d132add8 100644 (file)
@@ -367,7 +367,8 @@ set_address_in_x11(char *address, pid_t pid)
   wid = XCreateWindow (xdisplay, RootWindow (xdisplay, 0), -20, -20, 10, 10,
                        0, CopyFromParent, InputOnly, CopyFromParent,
                        0, NULL);
-  verbose ("Created window %d\n", wid);
+  /* The type of a Window varies, so cast it to something reasonable */
+  verbose ("Created window %lu\n", (unsigned long) wid);
 
   /* Save the property in the window */
   XChangeProperty (xdisplay, wid, address_atom, XA_STRING, 8, PropModeReplace,