15bab017a1
Fix a bug causing argb32 application icons to appear garbled Remap keysyms to keycodes after 'MappingNotify' (fix keybindings with non-qwerty keyboard layouts) Do not change workspaces when using NextWindow / PrevWindow buttons in toolbar Fix a race condition between copying the default config files to ~/.fluxbox/ and executing 'fluxbox-update_configs'
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
$OpenBSD: patch-src_main_cc,v 1.1 2011/09/13 09:31:48 dcoppa Exp $
|
|
|
|
Fix a race condition between copying the default config files
|
|
to ~/.fluxbox/ and executing 'fluxbox-update_configs'
|
|
(upstream git commit f9df3ffedafe4ee36a74949958527ecc0c23c841)
|
|
|
|
--- src/main.cc.orig Thu Feb 24 17:00:37 2011
|
|
+++ src/main.cc Tue Sep 13 10:23:38 2011
|
|
@@ -52,6 +52,10 @@
|
|
#include <string.h>
|
|
#endif
|
|
|
|
+#ifdef HAVE_UNISTD_H
|
|
+ #include <unistd.h>
|
|
+#endif
|
|
+
|
|
#ifdef HAVE_SYS_STAT_H
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
@@ -365,13 +369,19 @@ void setupConfigFiles(const std::string& dirname, cons
|
|
}
|
|
}
|
|
|
|
+ bool sync_fs = false;
|
|
+
|
|
// copy default files if needed
|
|
for (size_t i = 0; i < nr_of_cfiles; ++i) {
|
|
if (cfiles[i].create_file) {
|
|
FbTk::FileUtil::copyFile(cfiles[i].default_name, cfiles[i].filename.c_str());
|
|
+ sync_fs = true;
|
|
}
|
|
}
|
|
|
|
+ if (sync_fs) {
|
|
+ sync();
|
|
+ }
|
|
}
|
|
|
|
|
|
@@ -408,6 +418,7 @@ void updateConfigFilesIfNeeded(const std::string& rc_f
|
|
<< commandargs
|
|
<< "' failed." << endl;
|
|
}
|
|
+ sync();
|
|
}
|
|
}
|
|
|