diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2012-08-25 23:44:13 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2012-08-28 10:58:18 +0200 |
commit | af15087b995f912f68eab21ce7602ea71e79dfd1 (patch) | |
tree | d48ea5b3b20ebe2cfcc531a5104403d89f9f209b /i3-input | |
parent | b8ac9591a295310d5f458ea9d9d01bc972364694 (diff) | |
download | i3-af15087b995f912f68eab21ce7602ea71e79dfd1.tar.gz i3-af15087b995f912f68eab21ce7602ea71e79dfd1.zip |
i3-input: Do not use a non-loaded font
We must call load_font before any font-related calls like
predict_text_width
Diffstat (limited to 'i3-input')
-rw-r--r-- | i3-input/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/i3-input/main.c b/i3-input/main.c index 3172387d..fbc551e6 100644 --- a/i3-input/main.c +++ b/i3-input/main.c @@ -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( |