From ceb86bed13b967d562f336c6359c0d4932c5036e Mon Sep 17 00:00:00 2001 From: speedie Date: Sat, 3 Jun 2023 23:10:27 +0200 Subject: [PATCH] move opening display to readstdin(), so .Xresources can be read if protocol is set to wayland but wayland isn't actually used --- libs/argv.c | 6 ++++++ spmenu.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/argv.c b/libs/argv.c index f71e1c1..071da18 100644 --- a/libs/argv.c +++ b/libs/argv.c @@ -64,6 +64,12 @@ void readargs(int argc, char *argv[]) { } } + if (protocol) { + if (connect_display(&state)) { + protocol = 0; + } + } + // init/read xrdb if (xresources && !protocol) { #if USEXRESOURCES diff --git a/spmenu.c b/spmenu.c index 28f8c9d..e0c1846 100644 --- a/spmenu.c +++ b/spmenu.c @@ -472,12 +472,6 @@ void handle(void) { eventloop_x11(); // function is a loop which checks X11 events and calls other functions accordingly #if USEWAYLAND } else { - if (connect_display(&state)) { - protocol = 0; - handle(); - return; - } - loadhistory(); store_image_vars();