Currently;
All (State 1,Sticky) Lower
will lower all state 1 windows, regardless of stickiness.
A patch fixing this problem is attached.
/Simon Griph
Index: ChangeLog
===================================================================
RCS file: /home/cvs/fvwm/fvwm/ChangeLog,v
retrieving revision 1.2933
diff -u -r1.2933 ChangeLog
--- ChangeLog 3 Jul 2007 07:27:38 -0000 1.2933
+++ ChangeLog 7 Jul 2007 18:38:48 -0000
@@ -1,3 +1,11 @@
+2007-07-07 Simon Griph <simon(at)griph(dot)se>
+
+ * NEWS:
+ * fvwm/conditional.c (CreateConditionMask):
+ bugfix: Condition separation previously failed when a
+ single comma (no whitespace padding) was used directly
+ after a multi-worded condition.
+
2007-06-21 Renato Caldas <[EMAIL PROTECTED]>
* fvwm/module_list.c (module_kill):
Index: NEWS
===================================================================
RCS file: /home/cvs/fvwm/fvwm/NEWS,v
retrieving revision 1.701
diff -u -r1.701 NEWS
--- NEWS 6 Jul 2007 07:12:46 -0000 1.701
+++ NEWS 7 Jul 2007 18:38:49 -0000
@@ -58,6 +58,9 @@
correctly.
- Fixed a possible crash with modules closing down.
- Fixed broken demo script fvwm_make_browse_menu.sh.
+ - The conditon following a comma separator without whitespace
+ padding was previously ignored if the presiding condition was
+ multi-worded.
-------------------------------------------------------------------
Index: doc/ChangeLog
===================================================================
RCS file: /home/cvs/fvwm/fvwm/doc/ChangeLog,v
retrieving revision 1.3
diff -u -r1.3 ChangeLog
--- doc/ChangeLog 4 Jul 2007 18:33:04 -0000 1.3
+++ doc/ChangeLog 7 Jul 2007 18:38:49 -0000
@@ -1,3 +1,8 @@
+2007-07-07 Simon Griph <simon(at)griph(dot)se>
+
+ * fvwm/conditionals.xml:
+ clarified that comma is the prefered condition separator
+
2007-07-04 Dominik Vogt <dominik(dot)vogt(at)gmx(dot)de>
* Makefile.am:
Index: doc/fvwm/conditionals.xml
===================================================================
RCS file: /home/cvs/fvwm/fvwm/doc/fvwm/conditionals.xml,v
retrieving revision 1.2
diff -u -r1.2 conditionals.xml
--- doc/fvwm/conditionals.xml 16 Jun 2007 12:38:46 -0000 1.2
+++ doc/fvwm/conditionals.xml 7 Jul 2007 18:38:50 -0000
@@ -95,11 +95,12 @@
<para>The
<emphasis remap='I'>conditions</emphasis>
that may be given as an argument to any conditional command are a
-list of keywords separated by commas or whitespace, enclosed in
+list of keywords separated by commas, enclosed in
parentheses. Unless stated otherwise, conditional commands accept
all the conditions listed below. Note that earlier versions of
-fvwm required the conditions to be enclosed in brackets instead of
-parentheses (this is still supported for backward compatibility).</para>
+fvwm required the conditions to be separated by whitespace instead
+of commas and enclosed in brackets instead of parentheses
+(this is still supported for backward compatibility).</para>
<para>In addition, the
<emphasis remap='I'>conditions</emphasis>
Index: fvwm/conditional.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/fvwm/conditional.c,v
retrieving revision 1.119
diff -u -r1.119 conditional.c
--- fvwm/conditional.c 27 Jan 2007 11:33:15 -0000 1.119
+++ fvwm/conditional.c 7 Jul 2007 18:38:51 -0000
@@ -429,8 +429,9 @@
*/
void CreateConditionMask(char *flags, WindowConditionMask *mask)
{
+ char *allocated_condition;
+ char *next_condition;
char *condition;
- char *prev_condition = NULL;
char *tmp;
unsigned int state;
@@ -440,8 +441,8 @@
}
/* Next parse the flags in the string. */
- tmp = flags;
- tmp = GetNextSimpleOption(tmp, &condition);
+ next_condition = GetNextFullOption(flags, &allocated_condition);
+ condition = PeekToken(allocated_condition, &tmp);
while (condition)
{
@@ -494,8 +495,7 @@
(button >= 1 &&
button <= NUMBER_OF_EXTENDED_MOUSE_BUTTONS))
{
- free(condition);
- tmp = GetNextToken (tmp, &condition);
+ tmp = SkipNTokens(tmp, 1);
button_mask = (1<<(button-1));
}
else
@@ -687,16 +687,14 @@
CLEAR_USER_STATES(mask, state);
}
SETM_USER_STATES(mask, state);
- free(condition);
- tmp = GetNextToken(tmp, &condition);
+ tmp = SkipNTokens(tmp, 1);
}
}
else if (StrEquals(condition, "Layer"))
{
if (sscanf(tmp, "%d", &mask->layer))
{
- free(condition);
- tmp = GetNextToken (tmp, &condition);
+ tmp = SkipNTokens(tmp, 1);
if (mask->layer < 0)
{
/* silently ignore invalid layers */
@@ -714,7 +712,7 @@
{
struct name_condition *pp;
struct namelist *p;
- char *condp;
+ char *condp = safestrdup(cond);
pp = (struct name_condition *)
safemalloc(sizeof(struct name_condition));
@@ -722,7 +720,7 @@
pp->namelist = NULL;
pp->next = mask->name_condition;
mask->name_condition = pp;
- for(condp=cond; ; )
+ for (;;)
{
p = (struct namelist *)
safemalloc(sizeof(struct namelist));
@@ -739,20 +737,29 @@
}
*condp++='\0';
}
- condition = NULL; /* so it won't be freed */
}
- if (prev_condition)
+ if (tmp && *tmp)
{
- free(prev_condition);
+ fvwm_msg(OLD, "CreateConditionMask",
+ "Use comma instead of whitespace to "
+ "separate conditions");
}
-
- prev_condition = condition;
- tmp = GetNextSimpleOption(tmp, &condition);
- }
- if (prev_condition)
- {
- free(prev_condition);
+ else
+ {
+ if (allocated_condition)
+ {
+ free(allocated_condition);
+ allocated_condition = NULL;
+ }
+ if (next_condition && *next_condition)
+ {
+ next_condition = GetNextFullOption(
+ next_condition, &allocated_condition);
+ }
+ tmp = allocated_condition;
+ }
+ condition = PeekToken(tmp, &tmp);
}
return;