190 Commits

Author SHA1 Message Date
Philippe Pepiot
0400fb5454 Wait childs in main loop, fixes #142 Signed-off-by: Philippe Pepiot <phil@philpep.org> 2011-11-01 14:02:46 +01:00
Martin Duquesnoy
b42c42245a Wmfs: Fix warnings 2011-08-03 06:17:07 +02:00
Martin Duquesnoy
bbf11ac274 Wmfs: Fix help line 2011-07-29 17:51:39 +02:00
Martin Duquesnoy
9c3130a17c BarWindow/Event: Make barwindows linked to improve render with expose event 2011-07-29 11:53:22 +02:00
Martin Duquesnoy
58f6f674ca WMFS: Use SLIST from sys/queue.h instead homemade linked list 2011-07-29 10:54:08 +02:00
Martin Duquesnoy
5d80ec8538 Barwin: Remove useless check and fix wmfsrc 2011-07-28 09:54:23 +02:00
Martin Duquesnoy
7e33c322ff Wmfs: Remove unused var 2011-07-28 09:35:17 +02:00
Martin Duquesnoy
6ed013fc7c Wmfs: Remove update_status and option 2011-07-28 00:10:36 +02:00
Martin Duquesnoy
4e33bc9bf7 Status: Remove status management (status_path, status_timing, threading), use loop in status script now (see scripts/status.sh) 2011-07-28 00:08:43 +02:00
Martin Duquesnoy
b47c4457f2 ViWMFS(rip)/Conf: Remove viWMFS, add cfactor_enable_split option and code cosmetic 2011-06-26 16:36:36 +02:00
Martin Duquesnoy
5d208730cd Wmfs: Make Xft font optional #1 2011-06-12 17:10:10 +02:00
Martin Duquesnoy
be2c983004 Wmfs: Use stdbool.h for bool type 2011-06-10 18:51:05 +02:00
Martin Duquesnoy
a06e0daa5a Event: Handle xrandr with event_handle 2011-06-05 16:37:00 +02:00
Martin Duquesnoy
860a1a2c11 Event: Handle xrandr correctly 2011-06-05 16:19:47 +02:00
Martin Duquesnoy
ff888494f2 Getinfo: Remove getinfo 2011-06-05 14:16:43 +02:00
Martin Duquesnoy
73a0d7ed01 Event: Replace event big switch by array of function pointer to handle events 2011-06-05 12:22:18 +02:00
Martin Duquesnoy
d9cc60a205 Wmfs: Replace _WMFS_ISFREE by _WMFS_FLAGS for clients win prop 2011-06-04 12:51:58 +02:00
Martin Duquesnoy
57ab723f5d All: Remove split layout (will make a split mode instead) and replace all tag struct bool by flags 2011-06-01 23:10:14 +02:00
Philippe Pepiot
e57a6c5e62 build system: add setlocalversion
Version is built from git commit id, for example wmfs-ga33ec04-dirty
-> 'g', this is a git repo
-> a33ec04 is the beginning of the commit id (sha1)
-> dirty mean that there is uncommitted changes

wmfs users gives their 'wmfs -v' and developers can easily identify wmfs
version.

Move status.sh to scripts/ with setlocalversion

Signed-off-by: Philippe Pepiot <phil@philpep.org>
2011-04-16 20:52:28 +02:00
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