On Fri, 7 Mar 2008 00:44:09 +0100
Jesús Guerrero <[EMAIL PROTECTED]> wrote:
Conditionals patch revised and attached.
Is it valid? Does it lack something?
My idea is to shorten the list of available patches as much as we can by
including those that are evidently clean, useful and harmless upstream.
That way, we can ease the process for the rest of the patches.
--
Jesús Guerrero <[EMAIL PROTECTED]>
diff -U5 -r fvwm/ChangeLog fvwm/ChangeLog
--- fvwm/ChangeLog 2008-03-04 01:09:54.000000000 +0100
+++ fvwm/ChangeLog 2008-03-07 01:33:47.000000000 +0100
@@ -1,5 +1,13 @@
+2008-03-07 Jesús Guerrero <i92guboj(at)terra(dot)es>
+
+ * fvwm/contitionals.c (CreateConditionMask):
+ add some conditional masks: HasTitle, HasBorders,
+ TitleAtBottom, TitleAtTop, TitleAtLeft, TitleAtRight
+ * doc/fvwm/conditionals.xml
+ documentation for the new conditions
+
2008-02-29 Viktor Griph <griph(at)dd(dot)chalmers(dot)se>
* fvwm/add_window.c (setup_frame_window):
fix core dump with ARGB detection code
fix compilation without XRender
diff -U5 -r fvwm/doc/fvwm/conditionals.xml fvwm/doc/fvwm/conditionals.xml
--- fvwm/doc/fvwm/conditionals.xml 2007-08-07 00:24:03.000000000 +0200
+++ fvwm/doc/fvwm/conditionals.xml 2008-03-07 01:33:06.000000000 +0100
@@ -187,11 +187,17 @@
<emphasis remap='I'>StickyAcrossPages</emphasis>,
<emphasis remap='I'>StickyIcon</emphasis>,
<emphasis remap='I'>StickyAcrossDesksIcon</emphasis>,
<emphasis remap='I'>StickyAcrossPagesIcon</emphasis>,
<emphasis remap='I'>Transient</emphasis>,
-<emphasis remap='I'>Visible</emphasis>.</para>
+<emphasis remap='I'>Visible</emphasis>,
+<emphasis remap='I'>HasTitle</emphasis>,
+<emphasis remap='I'>HasBorders</emphasis>,
+<emphasis remap='I'>TitleAtBottom</emphasis>,
+<emphasis remap='I'>TitleAtTop</emphasis>,
+<emphasis remap='I'>TitleAtLeft</emphasis>,
+<emphasis remap='I'>TitleAtRight</emphasis>.</para>
<para>The
<emphasis remap='I'>AcceptsFocus</emphasis>
condition excludes all windows that do not want the input focus
(the application has set the "Input hints" for the window to
@@ -454,10 +460,23 @@
<emphasis remap='I'>Visible</emphasis>
condition matches only windows that are at least partially
visible on the current viewport and not completely overlapped by
other windows.</para>
+<para>The
+<emphasis remap='I'>HasTitle</emphasis>
+condition matches only windows that have a title bar.</para>
+
+<para>The
+<emphasis remap='I'>HasBorders</emphasis>
+condition matches only windows that have borders.</para>
+
+<para>The
+<emphasis remap='I'>TitleAtBottom</emphasis>, <emphasis remap='I'>TitleAtTop</emphasis>, <emphasis remap='I'>TitleAtLeft</emphasis>, <emphasis remap='I'>TitleAtRight</emphasis>,
+conditions matches respectively only windows that have a title
+bar, and have it on the specified location.</para>
+
</section>
</section>
diff -U5 -r fvwm/fvwm/conditional.c fvwm/fvwm/conditional.c
--- fvwm/fvwm/conditional.c 2007-10-06 11:17:09.000000000 +0200
+++ fvwm/fvwm/conditional.c 2008-03-07 01:10:54.000000000 +0100
@@ -598,10 +598,40 @@
else if (StrEquals(cond,"HasHandles"))
{
SET_HAS_HANDLES(mask, on);
SETM_HAS_HANDLES(mask, 1);
}
+ else if (StrEquals(cond, "HasTitle"))
+ {
+ SET_HAS_TITLE(mask, on);
+ SETM_HAS_TITLE(mask, 1);
+ }
+ else if (StrEquals(cond, "HasBorders"))
+ {
+ SET_HAS_NO_BORDER(mask, !on);
+ SETM_HAS_NO_BORDER(mask, 1);
+ }
+ else if (StrEquals(cond, "TitleAtBottom"))
+ {
+ SET_TITLE_DIR(mask, DIR_S);
+ SETM_TITLE_DIR(mask, 1);
+ }
+ else if (StrEquals(cond, "TitleAtTop"))
+ {
+ SET_TITLE_DIR(mask, DIR_N);
+ SETM_TITLE_DIR(mask, 1);
+ }
+ else if (StrEquals(cond, "TitleAtLeft"))
+ {
+ SET_TITLE_DIR(mask, DIR_W);
+ SETM_TITLE_DIR(mask, 1);
+ }
+ else if (StrEquals(cond, "TitleAtRight"))
+ {
+ SET_TITLE_DIR(mask, DIR_E);
+ SETM_TITLE_DIR(mask, 1);
+ }
else if (StrEquals(cond,"Iconifiable"))
{
SET_IS_UNICONIFIABLE(mask, !on);
SETM_IS_UNICONIFIABLE(mask, 1);
}
diff -U5 -r fvwm/NEWS fvwm/NEWS
--- fvwm/NEWS 2008-03-04 01:09:54.000000000 +0100
+++ fvwm/NEWS 2008-03-07 01:50:47.000000000 +0100
@@ -3,10 +3,15 @@
-------------------------------------------------------------------
Changes in beta release 2.5.26 (not released yet)
+* New features:
+
+ - Added new condition masks: HasTitle, HasBorders,
+ TitleAtBottom, TitleAtTop, TitleAtLeft, TitleAtRight
+
* Bug fixes:
- Fix crash in ARGB visual detection code
- Fix compilation without XRender support