+static void popup_coords(char *format, int a, int b, gboolean hide)
+{
+ XSetWindowAttributes attrib;
+ static Window coords = None;
+
+ if (coords == None) {
+ attrib.override_redirect = TRUE;
+ coords = XCreateWindow(ob_display, ob_root,
+ 0, 0, 1, 1, 0, render_depth, InputOutput,
+ render_visual, CWOverrideRedirect, &attrib);
+ g_assert(coords != None);
+ }
+
+ if (hide)
+ XUnmapWindow(ob_display, coords);
+ else {
+ Size s;
+ char *text;
+
+ text = g_strdup_printf(format, a, b);
+ framerender_size_popup_label(text, &s);
+ XMoveResizeWindow(ob_display, coords,
+ 10, 10, s.width, s.height);
+ framerender_popup_label(coords, &s, text);
+ g_free(text);
+
+ XMapWindow(ob_display, coords);
+ }
+}
+