i3-input: Do not use a non-loaded font
We must call load_font before any font-related calls like predict_text_width
This commit is contained in:
parent
b8ac9591a2
commit
af15087b99
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue