Commit graph

147 commits

Author SHA1 Message Date
Elias Martenson 61e53b4c06 Added functions IN-MAIN-THREAD-P and PUSH-EVENT 2017-07-18 01:49:04 -05:00
Thomas Atkinson 3d21db8b6c Remove conditionals for non sbcl common lisp implementations (#351)
* Remove other compilers from bytes-to-string

* Remove other compilers from string-to-bytes

* Remove other compilers from utf8-to-string

* Remove other compilers from string-to-utf8

* Remove other compilers from directory-no-deref

* Remove clisp UNIX flavour getting hack

* Remove other compilers from read-line-from-sysfs

* Remove other compilers from execv

* Remove string-to-bytes

As string-to-bytes simply called sb-ext:string-to-octets after
removing other lisp implementations it could be replaced where it is
called with the straight call.

* Remove string-to-utf8

As string-to-utf8 simply called sb-ext:string-to-octet replace all
calls with the function.

* Remove workarounds.lisp

File only contains a workaround for a CLX bug in clisp. Entire file can
be removed.

* Remove non sbcl statements from pathnames.lisp

* Remove non sbcl conditions from manual.lisp

* Make sbcl the only implementation stumpwm will compile on.

* Remove non sbcl conditionals from load-stumpwm.lisp.in

* Remove non sbcl conditionals from make-image.lisp.in

* Remove conditionals from stumpwm.asd

* Remove ecl conditional from primitives.lisp

* Remove call-in-main-thread conditional

The call-in-main-thread conditional was added due to it only being supported on
sbcl. As sbcl is now the only supported lisp implementation we can
remove it as a conditional.

* Remove ccl implmentation of io-channel-ioport

* Remove conditionals from stumpwm.texi.in

* Remove non sbcl ioloop
2017-05-24 23:03:58 -05:00
Javier Olaechea 15ae756ae9 Remove ARGV
use SB-EXT:*POSIX-ARGV* instead
2017-01-27 00:11:55 -05:00
Javier Olaechea 7f6214b4bf Remove MAKE-LOCK
We can use SB-THREAD:MAKE-MUTEX directly
2017-01-26 23:56:58 -05:00
Javier Olaechea 057d8b2b77 Remove WITH-LOCK-HELD
We can use SB-THREAD:WITH-MUTEX directly
2017-01-26 23:53:03 -05:00
Elias Martenson f5549bd295 Unmerge the two versions of CALL-IN-MAIN-THREAD into two separate functions 2016-11-09 10:34:52 +08:00
Elias Martenson a2c8268005 A typo accidentally caused CALL-IN-MAIN-THREAD to be undefined on platforms other than SBCL 2016-11-08 11:17:51 +08:00
Elias Martenson d555eea8b8 If WITH-CALL-IN-MAIN-THREAD is called while already on the main thread, immediately call the function 2016-11-08 11:15:04 +08:00
Elias Martenson 3a703a81c0 Thread-safety improvements to the timer code
Implements the following fixes:

The value :CALL-IN-MAIN-THREAD is added to *FEATURES*, making the code
that checks for this much more clear.

Accesses to *TIMER-LIST* is now thread-safe on most platforms.

When adding a timer on platforms supporting CALL-IN-MAIN-THREAD, the
adding is scheduled in the main thread in order to make the timing more
accurate.

On platforms that supports CALL-IN-MAIN-THREAD, if the call is made in
the main thread itself, the function will be evaluated immediately.
2016-11-08 11:00:49 +08:00
Elias Martenson 92bc2c12c9 Disable pipe support for CCL since it doesn't doesn't support the new-style main loop 2016-11-01 11:08:15 +08:00
Elias Martenson 5c341b0200 Implement IN-CHANNEL-IOPORT for CCL fd streams 2016-10-31 13:13:18 +08:00
Elias Martenson d803a90405 On implementations where OPEN-PIPE is not supported, fall back to using a timer 2016-10-31 10:22:11 +08:00
Elias Martenson 595d679f63 Implement support for ccl, and an unsafe fallback for other implementations 2016-10-28 16:57:06 +08:00
Elias Martenson 0a84f4eef2 Implement CALL-IN-MAIN-THREAD
This function allows a multi-threaded module to perform actions on the main
event handler thread and should be used whenever a different thread
needs to invoke any stumpwm functions.

Currently, only SBCL is supported.
2016-10-28 13:59:21 +08:00
Joram Schrijver 13ff02bf6a Prevent timers from being completely ignored
When no timers were active, the timer channel would report that it
wasn't interested in any events. The ioloop, then, would remove the
timer channel from the list of active channels, causing any timers to be
completely ignored from that point forward.

We fix it by making the timer channel interested in the :LOOP event when
no timers are active, thus preventing the channel from being removed.
2016-09-23 22:17:42 +02:00
Joram Schrijver d0627c6e74 Revert "Fixing timer issue"
This reverts commit 56303adf44.

It does not actually fix the timer issue, it only partially works around
it.
2016-09-23 22:17:42 +02:00
Javier Olaechea 7dcbe81c09 Refactor RUN-EXPIRED-TIMERS 2016-09-16 02:29:29 -05:00
David Bjergaard a3c29b875f Merge branch 'master' of github.com:stumpwm/stumpwm 2016-09-08 17:53:00 -04:00
David Bjergaard 56303adf44 Fixing timer issue 2016-09-08 17:52:54 -04:00
Fredrik Tolf 92897884d0 Removed obsolete lookup-error workarounds. 2016-08-22 05:31:05 +02:00
Fredrik Tolf 8a1794445a Unregister non-builtin I/O channels that cause errors. 2016-08-21 21:23:04 +02:00
Fredrik Tolf 4ea96e4b99 Extract top-level error handling to a generic function.
This also changes so that non-warning, non-serious conditions are
simply ignored, which should be proper beavior.
2016-08-21 21:23:02 +02:00
Fredrik Tolf 9f03c931ea Added a restart to restart with a new I/O loop.
This makes testing of I/O loops easier.
2016-08-06 00:01:39 +02:00
Fredrik Tolf 4fc44761a8 Modularize io-loop implementations. 2016-08-05 18:06:44 +02:00
Fredrik Tolf 319b1bafd8 Use the new I/O loop as the StumpWM top level loop. 2016-08-05 04:13:52 +02:00
Robert A. Uhl 4ddfad03f5 Revert trailing whitespace deletions 2016-07-14 17:48:35 -06:00
Robert A. Uhl 4ea0fb2da5 Add *restart-hook*
It is called during both soft & hard restarts.
2016-07-10 15:37:05 -06:00
Edward Trumbo 373c80c999 Add ~/.stumpwm.d/init.lisp as an init file. 2015-02-04 09:07:11 -05:00
David Bjergaard dc21a1ca6c Fixed Makefile bug for stumpwm-contrib
Also updated manual and docstrings for some functions. Applied a patch
from Diogo F. S. Ramos to handle the case when a user aborts while
eval'ing a lisp form from the input prompt.
2014-11-06 15:16:20 -05:00
David Bjergaard 251ed4df6b Modified module and friends, updated manual
Extended chapter on modules to reflect new system.  Renamed contrib-dir
to module-dir.  Removed set-contrib-dir as an interactive command in
favor of add-to-load-path.
2014-11-03 17:42:55 -05:00
David Bjergaard c337e9ba52 Added initialization of load path every time stumpwm starts (verses once at compile time) 2014-10-13 07:31:35 -04:00
David Bjergaard 7917c355e3 Formatting tweaks, added metadata to stumpwm.asd 2014-09-17 10:16:28 -04:00
Fredrik Tolf 40ea5c329b Fixed the timer functions.
Before this fix, there was a bug in the timer functions which led to
timers being scheduled from within a timer functions being
forgotten. This change fixes that.
2014-09-13 04:09:09 +02:00
Joram Schrijver 84c75e160f Load rc from XDG_CONFIG_HOME instead of ~/.config
According to the XDG Base Directory Specification:

$XDG_CONFIG_HOME defines the base directory relative to which user
specific configuration files should be stored. If $XDG_CONFIG_HOME is
either not set or empty, a default equal to $HOME/.config should be
used.

This was also noted by Github user lipidity at
https://github.com/stumpwm/stumpwm/pull/117#issuecomment-52278942
2014-08-25 11:42:44 +02:00
Joram Schrijver e3f83897a3 Fix incorrect parenthesis, fixes #130 2014-08-14 21:43:25 +02:00
David Bjergaard 6e071c7df4 Fixing issue for .stumpwmrc as well 2014-08-14 11:05:17 -04:00
David Bjergaard 5e64fcb169 Fixing issue with #117 to actually get ~/.config/stumpwm/config correctly 2014-08-14 11:02:05 -04:00
Aaron France f274b44e01 Take config from ~/.config/stumpwm/config after .stumpwmrc 2014-07-31 01:51:26 +02:00
David Bjergaard 1c73e7e83f Supporting hooks for stumptray 2014-02-26 11:04:54 -05:00
Michael Filonenko 6bbf412a1f Add event processing hook for using stumptray (clx-xembed) 2012-07-30 11:37:33 +03:00
Sascha Wilde abe293511c Initialize *data-dir* at startup time 2011-11-19 17:39:02 +00:00
Wesley Dawson d8f75d5b17 Update FSF address 2011-11-13 12:31:20 +00:00
Ben Spencer aad7fd8ba5 Move tile group specific init code out of stumpwm-internal. 2010-10-23 20:49:55 +01:00
Ben Spencer c727853afb Removed obsolete load-contrib export. 2009-11-29 23:27:02 +00:00
Shawn Betts b51118f9c5 fix restart-hard for newer versions of sbcl 2009-07-15 11:15:33 -07:00
Shawn Betts 2aed028cb9 implement intern1 and use it instead of intern 2009-04-24 14:53:24 -07:00
Shawn 2e8d652e59 report the proper key sequence for help in the start up message
it used to be hardcoded for C-t
2008-10-24 10:41:54 -07:00
Shawn 19bdb635ac fix a typo in perform-top-level-error-action 2008-10-18 15:36:56 -07:00
Shawn d37b109d6c in the top level error handler, handle errors and serious-conditions seperate from everything else.
For all other errors, try to recover and then fail just like an unhandled top level error.

in with-restarts-menu, only catch serious-conditions and errors.
2008-10-18 14:35:31 -07:00
Shawn 306a604d37 fix error handlers to catch any kind of condition and handle warnings 2008-09-24 02:54:48 -07:00