This is an automated email generated because a ref change occurred in the
git repository for project wmaker-crm.git.
The branch, master has been updated
via b27b44db7246fbb2111051962a8f67b2ef47d63b (commit)
from c6f029c94674b7e87f70ec2ea387c63fab00d6a5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b27b44db7246fbb2111051962a8f67b2ef47d63b
Author: David Maciejak <
david.m...@gmail.com>
Date: Tue, 3 Mar 2026 20:45:16 -0500
URL: <
https://repo.or.cz/wmaker-crm.git/b27b44db7246fbb2>
wmaker: filter inotify events only to expected config files
This patch is checking if the notification wmaker is receiving
from the Defaults directory is coming from a proper expected config file.
Until now, using vim for example to open any of the files,
for example WMRootMenu would reload the configs, even before saving
the file.
You would see in the logs:
warning: Inotify: Reading config files in defaults database.
because vim by default is creating a .swp file in that same directory.
---
src/event.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/src/event.c b/src/event.c
index d23cbe3f224e..a541a96247a6 100644
--- a/src/event.c
+++ b/src/event.c
@@ -357,10 +357,28 @@ static void handle_inotify_events(void)
wPreferences.flags.noupdates = 1;
}
- if ((pevent->mask & IN_MODIFY) && oneShotFlag == 0) {
- wwarning(_("Inotify: Reading config files in defaults database."));
- wDefaultsCheckDomains(NULL);
- oneShotFlag = 1;
+ /* Only react when a known config file inside the Defaults directory is affected */
+ if (pevent->len > 0) {
+ char *fname = pevent->name;
+ const char *allowed[] = { "WMRootMenu", "WMWindowAttributes",
+ "WindowMaker", "WMState", "WMGLOBAL", NULL };
+ int i, matched = 0;
+
+ for (i = 0; allowed[i]; i++) {
+ if (strcmp(fname, allowed[i]) == 0) {
+ matched = 1;
+ break;
+ }
+ }
+
+ if (matched) {
+ /* react to events that indicate a file was created/moved/written */
+ if ((pevent->mask & (IN_MODIFY | IN_CLOSE_WRITE | IN_MOVED_TO | IN_CREATE)) && oneShotFlag == 0) {
+ wwarning(_("Inotify: Reading config files in defaults database."));
+ wDefaultsCheckDomains(NULL);
+ oneShotFlag = 1;
+ }
+ }
}
/* move to next event in the buffer */
-----------------------------------------------------------------------
Summary of changes:
src/event.c | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
repo.or.cz automatic notification. Contact project admin
crm...@gmail.com
if you want to unsubscribe, or site admin
ad...@repo.or.cz if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")