diff options
author | Karsten Schoelzel <kuser@gmx.de> | 2007-09-10 11:03:29 +0200 |
---|---|---|
committer | Karsten Schoelzel <kuser@gmx.de> | 2007-09-10 11:03:29 +0200 |
commit | df9292b3d2ccb071af89b4576ebddc5f97db71ab (patch) | |
tree | f08c616430400f3d96aa120825da4e27eac8c004 /tests | |
parent | 0ddfabc605c890cda31fe7104cedaa6b6684ed25 (diff) | |
download | xmonad-df9292b3d2ccb071af89b4576ebddc5f97db71ab.tar.gz xmonad-df9292b3d2ccb071af89b4576ebddc5f97db71ab.tar.xz xmonad-df9292b3d2ccb071af89b4576ebddc5f97db71ab.zip |
Fix float behaviour, add shiftWin.
First, if float is called with window which is on a hidden workspace,
then the window will remain on that hidden workspace.
Now the focus should change more as expected:
float w
darcs-hash:20070910090329-eb3a1-ae150bf783b36fb4811e92d81b4917066c8733b7.gz
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Properties.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs index e11b448..3207f95 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -167,6 +167,9 @@ prop_swap_right_I (n :: NonNegative Int) (x :: T) = prop_shift_I (n :: NonNegative Int) (x :: T) = n `tagMember` x ==> invariant $ shift (fromIntegral n) x +prop_shift_win_I (n :: NonNegative Int) (w :: Char) (x :: T) = + n `tagMember` x && w `member` x ==> invariant $ shiftWin (fromIntegral n) w x + -- --------------------------------------------------------------------- -- 'new' @@ -493,6 +496,23 @@ prop_shift_reversible i (x :: T) = y = swapMaster x n = tag (workspace $ current y) +-- --------------------------------------------------------------------- +-- shiftWin + +-- shiftWin on current window is the same as shift +prop_shift_win_focus i (x :: T) = + i `tagMember` x ==> case peek x of + Nothing -> True + Just w -> shiftWin i w x == shift i x + +-- shiftWin leaves the current screen as it is, if neither i is the tag +-- of the current workspace nor w on the current workspace +prop_shift_win_fix_current i w (x :: T) = + i `tagMember` x && w `member` x && i /= n && findIndex w x /= Just n + ==> (current $ x) == (current $ shiftWin i w x) + where + n = tag (workspace $ current x) + ------------------------------------------------------------------------ -- some properties for layouts: @@ -611,6 +631,9 @@ main = do ,("shift: invariant" , mytest prop_shift_I) ,("shift is reversible" , mytest prop_shift_reversible) + ,("shiftWin: invariant" , mytest prop_shift_win_I) + ,("shiftWin is shift on focus" , mytest prop_shift_win_focus) + ,("shiftWin fix current" , mytest prop_shift_win_fix_current) {- ,("tile 1 window fullsize", mytest prop_tile_fullscreen) |