kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=09627036c0e5101869f67b38c6a6f0f2b5c59ca6

commit 09627036c0e5101869f67b38c6a6f0f2b5c59ca6
Author: Kim Woelders <k...@woelders.dk>
Date:   Fri Mar 5 08:24:42 2021 +0100

    Allow Winop border in matches.cfg
    
    There should be no particular reason not to.
    
    Also issue warning about reference to non-existing border.
---
 src/ewin-ops.c    |  4 ++--
 src/windowmatch.c | 12 ++++++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/ewin-ops.c b/src/ewin-ops.c
index ddf77751..4c67abdf 100644
--- a/src/ewin-ops.c
+++ b/src/ewin-ops.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various 
contributors
- * Copyright (C) 2004-2020 Kim Woelders
+ * Copyright (C) 2004-2021 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
@@ -43,7 +43,7 @@
 #include "xwin.h"
 
 static const WinOp  winops[] = {
-   {"border", 2, 1, 0, EWIN_OP_BORDER},
+   {"border", 2, 1, 1, EWIN_OP_BORDER},
    {"title", 2, 1, 1, EWIN_OP_TITLE},
 
    {"focusclick", 0, 1, 1, EWIN_OP_FOCUS_CLICK},       /* Place before "focus" 
*/
diff --git a/src/windowmatch.c b/src/windowmatch.c
index 3aa84485..4875fe3c 100644
--- a/src/windowmatch.c
+++ b/src/windowmatch.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various 
contributors
- * Copyright (C) 2005-2020 Kim Woelders
+ * Copyright (C) 2005-2021 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
@@ -242,7 +242,10 @@ WindowMatchConfigLoad(FILE * fs)
                break;
             wm->border = BorderFind(s2);
             if (!wm->border)
-               break;
+              {
+                 Eprintf("%s: No such border: '%s'\n", __func__, s2);
+                 break;
+              }
             wm->op = MATCH_OP_BORDER;
             break;
 
@@ -372,6 +375,7 @@ WindowMatchDecode(const char *line)
        wm->border = BorderFind(args);
        if (!wm->border)
          {
+            Eprintf("%s: No such border: '%s'\n", __func__, args);
             err = 1;
             goto done;
          }
@@ -648,6 +652,10 @@ WindowMatchEwinOpsAction(EWin * ewin, int op, const char 
*args)
        /* We should not get here */
        return;
 
+     case EWIN_OP_BORDER:
+       EwinBorderSetInitially(ewin, args);
+       break;
+
      case EWIN_OP_TITLE:
        EFREE_DUP(EwinGetIcccmName(ewin), args);
        break;

-- 


Reply via email to