From fbba2f4fec59ad6acd1e17b2cfd42748043abb12 Mon Sep 17 00:00:00 2001 From: speedie Date: Fri, 6 Jan 2023 23:28:48 +0100 Subject: [PATCH] fix crashing and remove useless option which caused the crashing --- docs/example.Xresources | 3 --- options.h | 1 - speedwm.c | 5 +---- xresources.h | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/example.Xresources b/docs/example.Xresources index 0e1f81b..9524433 100644 --- a/docs/example.Xresources +++ b/docs/example.Xresources @@ -193,9 +193,6 @@ speedwm.color.selectedtitle: 0 ! Color the selected title (0/1) !! Powerline options speedwm.bar.powerline.tag.shape: 0 ! Shape of the tag powerlines (0: >, 1: /) -!! Focus options -speedwm.focus.spawned: 1 ! Focus the newly spawned window or keep focus (0/1) - !! Fullscreen options speedwm.fullscreen.hidebar: 1 ! Hide the bar when a client is fullscreened (0/1) speedwm.fullscreen.lockfullscreen: 1 ! Lock the fullscreen (0/1) diff --git a/options.h b/options.h index 997b86d..efd3e7b 100644 --- a/options.h +++ b/options.h @@ -50,7 +50,6 @@ static int swallowfloating = 1; /* Swallow floating windows b static int centerfloating = 1; /* Center floating windows by default */ static int startontag = 1; /* Start on a tag or not? */ static int floatscratchpad = 0; /* Float the scratchpad window on hide (1/0) */ -static int focusspawn = 1; /* Automatically focus the next spawned window. If warp is enabled, this is useless and will be disabled. (1/0) */ /* Client properties */ static int autofocus = 1; /* Allow clients to automatically be focused when they request it. This comes with the side effect of potentially being annoying */ diff --git a/speedwm.c b/speedwm.c index 37bf844..6b7ed38 100644 --- a/speedwm.c +++ b/speedwm.c @@ -3413,10 +3413,7 @@ manage(Window w, XWindowAttributes *wa) if (term) swallow(term, c); arrange(c->mon); - if (focusspawn) - focus(c); - else - focus(NULL); + focus(NULL); } void diff --git a/xresources.h b/xresources.h index fdd4d26..fd4a5e4 100644 --- a/xresources.h +++ b/xresources.h @@ -162,7 +162,6 @@ ResourcePref resources[] = { { "mouse.cfact", INTEGER, &mousecfact }, { "mouse.warpcursor", INTEGER, &warpcursor }, { "mouse.clicktofocus", INTEGER, &clicktofocus }, - { "focus.spawned", INTEGER, &focusspawn }, { "client.floatscratchpad", INTEGER, &floatscratchpad }, { "client.autofocus", INTEGER, &autofocus }, { "client.automove", INTEGER, &automove },