]> git.sur5r.net Git - i3/i3/commitdiff
Move font-height-calculation to the end of init_xcb()
authorAxel Wagner <mail@merovius.de>
Sat, 7 Aug 2010 00:22:20 +0000 (02:22 +0200)
committerAxel Wagner <mail@merovius.de>
Sat, 7 Aug 2010 00:22:20 +0000 (02:22 +0200)
i3bar/src/xcb.c

index 055775fb171b63bc2679d68cd67f9317013288e2..bdb1b5f5d6c4e182c8b7cb7f8e674e6e90400fb9 100644 (file)
@@ -222,15 +222,6 @@ void init_xcb(char *fontname) {
                                       1,
                                       strlen(fontname),
                                       fontname);
-    /* FIXME: push this to the end of init_xcb() */
-    xcb_list_fonts_with_info_reply_t *reply;
-    reply = xcb_list_fonts_with_info_reply(xcb_connection,
-                                           cookie,
-                                           NULL);
-    font_height = reply->font_ascent + reply->font_descent;
-    FREE(reply);
-
-    printf("Calculated Font-height: %d\n", font_height);
 
     /* The varios Watchers to communicate with xcb */
     xcb_io = malloc(sizeof(ev_io));
@@ -247,6 +238,16 @@ void init_xcb(char *fontname) {
 
     /* Now we get the atoms and save them in a nice data-structure */
     get_atoms();
+
+    /* Now we calculate the font-height */
+    xcb_list_fonts_with_info_reply_t *reply;
+    reply = xcb_list_fonts_with_info_reply(xcb_connection,
+                                           cookie,
+                                           NULL);
+    font_height = reply->font_ascent + reply->font_descent;
+    FREE(reply);
+
+    printf("Calculated Font-height: %d\n", font_height);
 }
 
 /*