171 Commits

Author SHA1 Message Date
Clément Bœsch
6291639b24 Remove a lot of static declarations
A lot of functions are also moved in the process.
2011-02-23 22:37:42 +01:00
Clément Bœsch
6a0eedb63c Make a bunch of stuff static 2011-02-23 22:37:13 +01:00
Philippe Pepiot
d0bb69150a Clean thread/spawn/signal usage in wmfs
- Don't create 2 thread
- Don't create status thread when conf.status_timing == 0
- Don't launch status script if still running
- Remove double fork() hack in spawn()
- Wait childs properly
- mutex on conf.status_pid and sig_chld variable, thread-safe and
  signal-safe
- Set exiting variable volatile, signal-safe
- Use sigaction instead of signal

TODO: set mutex for exiting variable because this is not thread-safe
2011-01-20 11:32:29 +01:00
Clément Bœsch
a5432919ca Remove pointless if before calling free.
The free() function frees the memory space pointed to by ptr, which must
have been returned by a previous call to malloc(), calloc() or
realloc().  Otherwise, or if free(ptr) has already been called before,
undefined behavior occurs.  If ptr is NULL, no operation is performed.
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

                                          -- man malloc(3)
2011-01-12 20:17:57 +01:00
Raphael Khaiat
8ea76e1167 Fix reload function (problem due to a bad merge), thanks to Erus 2011-01-10 21:45:11 +01:00
Raphael Khaiat
2273ccc5d5 Let wmfs reload now with the same argument that it was launched with 2011-01-08 18:20:27 +01:00
Martin Duquesnoy
18e97d3e1e Wmfs: Use pthread instead of setitimer 2011-01-08 15:47:19 +01:00
Martin Duquesnoy
9de133dac7 Merge branch 'master' of git.wmfs.info:wmfs 2011-01-08 15:21:59 +01:00
Philippe Pepiot
0a2c1f9d13 Use sigaction instead of signal.
SIGCHLD and SIGALRM are now exclusives (one mask other)
2011-01-04 03:02:29 +01:00
Philippe Pepiot
c817b7277b Disable status script timer on reload (instead of ignoring signal) 2011-01-04 01:24:51 +01:00
Philippe Pepiot
99e85cbfc2 Use setitimer instead of alarm 2011-01-04 01:10:27 +01:00
bacardi55@gmail.com
b4fb75806a Merge branch 'master' into bacardi55 2010-12-19 13:14:30 +01:00
Philippe Pepiot
dbe7588c0a Ignore SIGALRM before restart
If new wmfs process receive SIGALRM before set the handler, wmfs quits
Bug found by Erus
2010-12-18 14:58:29 +01:00
Engil Hramn
dae3019185 Fix some error in the manpage and in the information printed by the binary 2010-12-09 17:09:47 +01:00
Raphael Khaiat
3f461810d2 Add engil's patch 2010-12-09 16:01:19 +01:00
Raphael Khaiat
0a708c8dda Merge branch 'master' into bacardi55
Conflicts:
	src/config.c
2010-12-07 19:16:32 +01:00
Philippe Pepiot
ce3813608c Status script not spawned if still running 2010-12-07 01:34:22 +01:00
Philippe Pepiot
6c332c9ea5 Oops. Fix signal not handled at all 2010-12-07 01:19:28 +01:00
Philippe Pepiot
87575a019d Use SIGALRM instead of pthread for status script 2010-12-07 00:28:12 +01:00
Philippe Pepiot
6882cfb986 Only one handler for signals 2010-12-07 00:12:54 +01:00
Philippe Pepiot
c8a74878a1 Remove double fork for spawn and kill status with SIGTERM 2010-12-03 16:59:07 +01:00
Raphael Khaiat
f6206d65b1 Merge branch 'master' into bacardi55
Conflicts:
	src/wmfs.c
2010-11-30 00:38:27 +01:00
Philippe Pepiot
3459ed0b20 Define optarg and optind (was breaking compilation on NetBSD) 2010-11-29 21:17:04 +01:00
Raphael Khaiat
bc31510d64 Merge branch master in bacardi55 2010-11-19 23:41:56 +01:00
Philippe Pepiot
daeffb324e Fix possibles segfaults, dead assignment and other division by zero.
Thanks to clang build report
2010-11-19 19:55:57 +01:00
Philippe Pepiot
d75746bcf4 s/strcpy/strncpy and fix somes unused variables 2010-11-19 17:36:37 +01:00
Philippe Pepiot
82b17ea02f Improve allocating system and integrate parser
emalloc remplaced with xcalloc/xmalloc/xrealloc
and easy wrappers for strings zmalloc/zcalloc/zrealloc
 - exit on fail
 - prevent size_t overflow

Integrate parser in src/
2010-11-19 16:42:14 +01:00
Raphael Khaiat
546366b282 Merge master in bacardi55 branch 2010-11-18 19:48:18 +01:00
Raphael Khaiat
20c99826ce Merge branch 'master' into bacardi55
Conflicts:
	src/wmfs.c
2010-11-18 19:47:36 +01:00
Philippe Pepiot
c2664e8e85 wmfs compile with -W -Wall -Wextra (TODO: fix types !!) 2010-11-17 02:27:15 +01:00
Philippe Pepiot
14f12edf25 Remove non ansi comments 2010-11-17 01:30:12 +01:00
Philippe Pepiot
3d6f8da805 Declare func_list const 2010-11-17 01:24:57 +01:00
Raphael Khaiat
8d71b8c2a8 Reload wmfs with exact same argument as it has been launched instead of
just reloading the good wmfsrc (idea from ksh.)
2010-11-16 23:18:18 +01:00
Raphael Khaiat
31899139e4 Revert "Reload wmfs with exact same argument as it has been launched instead of"
This reverts commit 61a1e18a598402397478748357d9c447e5c545f6.
2010-11-16 23:13:47 +01:00
Raphael Khaiat
61a1e18a59 Reload wmfs with exact same argument as it has been launched instead of
just reloading the good wmfsrc (idea from ksh.)
2010-11-16 23:01:18 +01:00
Raphael Khaiat
2d9baf78c5 Starting wmfs with an alternate wmfs was possible with wmfs -C
otherWmfsrc but only $HOME/.config/wmfsrc was read when reloading wmfs.
Now, if you start wmfs with -C and a different file, this file will be
reloaded.
2010-11-16 01:09:35 +01:00
Philippe Pepiot
7db51713e5 Build System: remove cmake
Cmake is bloat and wmfs doesn't need a complex build system
So now wmfs compile with a Makefile using gmake and pkg-config
compilation options can be customised through confix.mk (dwm like)

Remove doxygen config files (wmfs code doesn't use it, and nobody use
doxygen with wmfs)
Replace wmfsrc.in by wmfsrc (change @WMFS_TERM@ and use shell choice
urxvt || xterm || ...)
Remove generation of Changelog file (we can git log > Changelog before
creating a dist package)
Remove README from install process (this file don't need to be included in dist
package)

What's next before merging into master ?
- provide a BSD Makefile
- discuss if we use or not pkg-config (we can document common places
  to include directory and libs in config.mk)
- compile out of tree
2010-11-09 12:15:11 +01:00
Philippe Pepiot
5aeeae4198 Parse: when syntax error, fallback to default config, fixes #45 2010-08-31 00:55:51 +02:00
Martin Duquesnoy
a496d77f9e Conf: Add [rules] section. (Feature #34 requested by markand CHACHA) clients option, autofree and automax option are DEPRECATED but works for some revision. 2010-08-10 02:40:06 +02:00
Martin Duquesnoy
2292ab97d1 Systray: Fix systray at reloading or for manage already running tray icon 2010-07-31 14:28:04 +02:00
Martin Duquesnoy
e6fc0a4976 Event: Remove send_client_message function 2010-07-26 11:32:26 +02:00
Martin Duquesnoy
374abb0e26 Update improvement 2010-07-26 11:20:20 +02:00
Martin Duquesnoy
4cf2b8bf8f Status: Fix text drawing with systray shift 2010-07-23 12:31:08 +02:00
Martin Duquesnoy
1094861b49 Ewmh: Fix panels crash and type_dock management 2010-07-22 23:57:31 +02:00
Martin Duquesnoy
fdb1d2c748 Systray: Fix BadWindow (because of unmap event) and segfault at pressing button 2010-07-22 22:07:26 +02:00
Martin Duquesnoy
908978cca1 !! Implementation of System tray !! 2010-07-22 20:12:27 +02:00
Martin Duquesnoy
f8115d686d Tag/Clients: Add client_ignore tag option (~Feature #6 requested by Elpinoutoufou) 2010-04-20 18:10:42 +02:00
Philippe Pepiot
0e8ffff152 Kill status script in quit() 2010-04-20 03:43:28 +02:00
Philippe Pepiot
52dba6418e fix posible issue with statusbar when reloading wmfs
spawn() now return the child pid
2010-04-20 03:32:22 +02:00
Philippe Pepiot
c7824780fa Fix wait for sleep() when exit 2010-04-15 20:37:34 +02:00