i3-input: Do not use a non-loaded font

We must call load_font before any font-related calls like
predict_text_width
next
Quentin Glidic 2012-08-25 23:44:13 +02:00 committed by Michael Stapelberg
parent b8ac9591a2
commit af15087b99
1 changed files with 3 additions and 3 deletions

View File

@ -353,9 +353,6 @@ int main(int argc, char *argv[]) {
sockfd = ipc_connect(socket_path);
if (prompt != NULL)
prompt_offset = predict_text_width(prompt);
int screens;
conn = xcb_connect(NULL, &screens);
if (!conn || xcb_connection_has_error(conn))
@ -369,6 +366,9 @@ int main(int argc, char *argv[]) {
font = load_font(pattern, true);
set_font(&font);
if (prompt != NULL)
prompt_offset = predict_text_width(prompt);
/* Open an input window */
win = xcb_generate_id(conn);
xcb_create_window(