Add clicktofocus back, we'll see if it crashes. If it does, we'll revert

this commit.
This commit is contained in:
speediegq 2022-08-26 19:04:54 +02:00
parent 89bfa5d651
commit 24d06241c2
4 changed files with 5 additions and 4 deletions

View file

@ -51,6 +51,7 @@
- speedwm.mousemfact: 1
- speedwm.mfact: 0.50
- speedwm.startontag: 1
- speedwm.clicktofocus: 0
- speedwm.enablegaps: 1
- speedwm.smartgaps: 0
- speedwm.smartgapsize: 0

View file

@ -184,7 +184,7 @@ static char *scratchpadcmd[] = {"s", TERMINAL, "-t", "scratchpa
static int warpcursor = 1; /* Warp cursor when switching client/monitor */
static int pertag = 1; /* Use different mfact and layout for each layout */
static int wmclass = 1; /* Enable (1) workaround for when a class cannot be grabbed */
static int focusontouch = 1; /* Focus when the users' mouse touches a window (1) */
static int clicktofocus = 0; /* Click to focus, or focus when the mouse moves to another window */
/* Full screen options */
static int movefullscreenmon = 1; /* Move fullscreen windows to another monitor */

View file

@ -1773,6 +1773,7 @@ drawbars(void)
void
enternotify(XEvent *e)
{
if (!clicktofocus) {
Client *c;
Monitor *m;
XCrossingEvent *ev = &e->xcrossing;
@ -1786,7 +1787,6 @@ enternotify(XEvent *e)
selmon = m;
} else if (!c || c == selmon->sel)
return;
if (focusontouch) {
focus(c);
}
}
@ -3501,7 +3501,7 @@ restack(Monitor *m)
XSync(dpy, False);
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
if (warpcursor && focusontouch)
if (warpcursor)
{
if (m == selmon && (m->tagset[m->seltags] & m->sel->tags) && selmon->lt[selmon->sellt] != &layouts[2])
warp(m->sel);

View file

@ -152,7 +152,7 @@ ResourcePref resources[] = {
{ "deckcount", INTEGER, &deckcount },
{ "defaultlayout", INTEGER, &defaultlayout },
{ "wmclass", INTEGER, &wmclass },
{ "focusontouch", INTEGER, &focusontouch },
{ "clicktofocus", INTEGER, &clicktofocus },
{ "roundedcorners", INTEGER, &roundedcorners },
{ "cornerradius", INTEGER, &cornerradius },
{ "underline", INTEGER, &underline },