forked from e16/e16
1
0
Fork 0

windowmatches: Enable having spaces in name matches

This commit is contained in:
Kim Woelders 2020-01-06 17:20:30 +01:00
parent 4df8199d60
commit 7836d0cf3e
1 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
/*
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
* Copyright (C) 2005-2019 Kim Woelders
* Copyright (C) 2005-2020 Kim Woelders
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@ -135,11 +135,12 @@ WindowMatchConfigLoad(FILE * fs)
WindowMatch *wm = 0;
char s[FILEPATH_LEN_MAX];
char s2[FILEPATH_LEN_MAX];
char *p2;
int i1;
while (GetLine(s, sizeof(s), fs))
{
i1 = ConfigParseline1(s, s2, NULL, NULL);
i1 = ConfigParseline1(s, s2, &p2, NULL);
switch (i1)
{
case CONFIG_VERSION:
@ -168,19 +169,19 @@ WindowMatchConfigLoad(FILE * fs)
if (!wm)
break;
wm->match = MATCH_TYPE_TITLE;
wm->value = Estrdup(s2);
wm->value = Estrdup(p2);
break;
case WINDOWMATCH_MATCHNAME:
if (!wm)
break;
wm->match = MATCH_TYPE_WM_NAME;
wm->value = Estrdup(s2);
wm->value = Estrdup(p2);
break;
case WINDOWMATCH_MATCHCLASS:
if (!wm)
break;
wm->match = MATCH_TYPE_WM_CLASS;
wm->value = Estrdup(s2);
wm->value = Estrdup(p2);
break;
case WINDOWMATCH_WIDTH: