Commit Graph

298 Commits

Author SHA1 Message Date
Spencer Janssen
1276edc861 StackSet.view: ignore invalid indices 2007-05-08 14:39:51 +00:00
Neil Mitchell
27f1f50071 Change the swap function so its Haskell 98, by using list-comps instead of pattern-guards. 2007-05-08 12:31:58 +00:00
Don Stewart
9f4fd822b6 Arbitrary instance for StackSet must set random focus on each workspace
When focus was separated from the stack order on each workspace, we
forgot to update the Arbitrary instance to set random focus. As spotted
by David R, this then invalidates 4 of our QC properties. In particular,
the property involving where focus goes after a random transient
(annoying behaviour) appeared to be correct, but wasn't, due to
inadequate coverage.

This patch sets focus to a random window on each workspace. As a result,
we now catch the focus/raise/delete issue people have been complaining
about.

Lesson: make sure your QuickCheck generators are doing what you think
they are.
2007-05-08 05:11:26 +00:00
David Roundy
ab27c7d48d make quickcheck tests friendlier to read. 2007-05-05 17:54:15 +00:00
Jason Creighton
ab0f3be0af make Properties.hs exit with failure on test failure 2007-05-05 17:43:57 +00:00
Don Stewart
7a56422491 since we just ignore type errors, no need to derive Show 2007-05-04 09:41:43 +00:00
Don Stewart
0928bb484a Constrain layout messages to be members of a Message class
Using Typeables as the only constraint on layout messages is a bit
scary, as a user can send arbitrary values to layoutMsg, whether they
make sense or not: there's basically no type feedback on the values you
supply to layoutMsg.

Folloing Simon Marlow's dynamically extensible exceptions paper, we use
an existential type, and a Message type class, to constrain valid
arguments to layoutMsg to be valid members of Message.

That is, a user writes some data type for messages their layout
algorithm accepts:

  data MyLayoutEvent = Zoom
                     | Explode
                     | Flaming3DGlassEffect
                     deriving (Typeable)

and they then add this to the set of valid message types:

  instance Message MyLayoutEvent

Done. We also reimplement the dynamic type check while we're here, to
just directly use 'cast', rather than expose a raw fromDynamic/toDyn.

With this, I'm much happier about out dynamically extensible layout
event subsystem.
2007-05-04 08:16:49 +00:00
Spencer Janssen
72e7bed426 Handle empty layout lists 2007-05-04 04:56:44 +00:00
Don Stewart
d0ef78e5c3 refactoring, style, comments on new layout code 2007-05-04 02:36:18 +00:00
Jason Creighton
b5ed587f2e use anyKey constant instead of magic number 2007-05-04 01:50:43 +00:00
Jason Creighton
7a89f431b1 added mirrorLayout to mirror arbitrary layouts 2007-05-04 01:46:53 +00:00
Spencer Janssen
a5e0e2458d Fix layout switching order 2007-05-03 23:56:32 +00:00
Spencer Janssen
9d3d2f8503 More Config.hs bugs 2007-05-03 23:46:07 +00:00
Spencer Janssen
204c90b072 Revert accidental change to Config.hs 2007-05-03 23:31:48 +00:00
Spencer Janssen
bedc069143 Add -fglasgow-exts for pattern guards. Properties.hs doesn't complain anymore 2007-05-03 21:42:21 +00:00
Spencer Janssen
5b7c6c8631 Avoid the unsafe pattern match, in case Config.hs has no layouts 2007-05-03 21:40:07 +00:00
David Roundy
ea1134db26 add support for extensible layouts. 2007-05-03 14:47:50 +00:00
Don Stewart
f0df95da72 comments. and stop tracing events to stderr 2007-05-03 07:58:21 +00:00
Don Stewart
f5e8b2b6a8 -Wall police 2007-05-03 07:49:37 +00:00
Don Stewart
08ce2a5efa elaborate documentation in Config.hs 2007-05-03 07:48:43 +00:00
Spencer Janssen
b63e8c029e Use updated refreshKeyboardMapping. Requires latest X11-extras 2007-05-03 03:20:40 +00:00
Jason Creighton
fa271e00ce run QC tests in addition to LOC test 2007-05-03 00:32:02 +00:00
Spencer Janssen
3416eceb5d Add 'mod-n': refreshes current layout 2007-05-03 00:22:52 +00:00
Spencer Janssen
833d5ae357 Fix tests after StackSet changes 2007-05-02 20:16:22 +00:00
Spencer Janssen
1dff21001c First steps to adding floating layer 2007-05-02 19:59:17 +00:00
Don Stewart
0c569a64e1 update motivational text using xmonad.org 2007-05-02 06:18:59 +00:00
Spencer Janssen
c0266c0cb8 Sort dependencies in installation order 2007-05-01 20:42:49 +00:00
Spencer Janssen
56a4164a90 Recommend X11-extras 0.1 2007-05-01 20:41:21 +00:00
Don Stewart
fdc73b4cb1 elaborate description in .cabal 2007-05-01 03:54:14 +00:00
Don Stewart
121e20d342 use -fasm by default. Much faster 2007-05-01 03:12:20 +00:00
Don Stewart
af7c76d3fe check we never generate invalid stack sets 2007-04-30 06:59:46 +00:00
Spencer Janssen
3586379ecc Make border width configurable 2007-04-30 16:35:15 +00:00
Spencer Janssen
08e514b28f Add Config.hs-boot, remove defaultLayoutDesc from XConf 2007-04-30 16:26:47 +00:00
Spencer Janssen
ecbff364c9 Comment only 2007-04-30 16:16:35 +00:00
Spencer Janssen
1e83de8cde Comment only 2007-04-30 16:15:11 +00:00
Don Stewart
4d9fa8bc98 view n . shift n . view i . shift i) x == x --> shift + view is invertible 2007-04-30 06:29:01 +00:00
Don Stewart
17f70344ec add rotate all and view idempotency tests 2007-04-30 05:57:51 +00:00
Don Stewart
14773f6300 push is idempotent 2007-04-30 05:43:45 +00:00
Don Stewart
89182406a8 add two properties relating to empty window managers 2007-04-30 05:10:16 +00:00
Don Stewart
0d7969be18 new QC property: opening a window only affects the current screen 2007-04-30 05:01:33 +00:00
Spencer Janssen
5d086df912 Add XConf for values that don't change. 2007-04-30 05:47:15 +00:00
Spencer Janssen
5c1982cc35 Control.Arrow is suspicious, add an explicit import 2007-04-30 05:36:23 +00:00
Jason Creighton
bdbca84bcd configurable border colors
This also fixes a bug where xmonad was assuming a 24-bit display, and just
using, eg, 0xff0000 as an index into a colormap without querying the X server
to determine the proper pixel value for "red".
2007-04-30 04:38:59 +00:00
Don Stewart
8097060259 a bit more precise about building non-empty stacksets for one test 2007-04-30 03:57:29 +00:00
Don Stewart
df7d1d95fa remove redundant call to 'delete' in 'shift' 2007-04-30 03:11:51 +00:00
Don Stewart
8265cae8a8 clean 'delete' a little 2007-04-30 02:53:19 +00:00
Don Stewart
a07f0778ad shrink 'swap' 2007-04-30 02:48:13 +00:00
Don Stewart
9fafa995c7 shrink 'rotate' a little 2007-04-30 02:45:25 +00:00
Don Stewart
966da43176 move size into Properties.hs 2007-04-30 02:17:58 +00:00
Don Stewart
a839238483 don't need 'size' operation on StackSet 2007-04-30 01:59:27 +00:00