From dc49874c83c20b17b5b6ea5ab63e638402ba8f1a Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Fri, 29 Jun 2007 23:39:17 +0200 Subject: Move screen details into StackSet darcs-hash:20070629213917-a5988-3ad31d8f028efcec41c9c4805c01c2d42c0009b2.gz --- XMonad.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'XMonad.hs') diff --git a/XMonad.hs b/XMonad.hs index bc54bfd..8eec7b1 100644 --- a/XMonad.hs +++ b/XMonad.hs @@ -15,7 +15,7 @@ ----------------------------------------------------------------------------- module XMonad ( - X, WindowSet, WorkspaceId(..), ScreenId(..), XState(..), XConf(..), Layout(..), + X, WindowSet, WorkspaceId(..), ScreenId(..), ScreenDetail(..), XState(..), XConf(..), Layout(..), Typeable, Message, SomeMessage(..), fromMessage, runLayout, runX, catchX, io, catchIO, withDisplay, withWindowSet, isRoot, spawn, restart, trace, whenJust, whenX, atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW @@ -30,6 +30,8 @@ import System.Posix.Process (executeFile, forkProcess, getProcessStatus, createS import System.Exit import System.Environment import Graphics.X11.Xlib +-- for Read instance +import Graphics.X11.Xlib.Extras () import Data.Typeable import qualified Data.Map as M @@ -39,8 +41,6 @@ import qualified Data.Set as S -- Just the display, width, height and a window list data XState = XState { windowset :: !WindowSet -- ^ workspace list - , xineScreens :: ![Rectangle] -- ^ dimensions of each screen - , statusGaps :: ![(Int,Int,Int,Int)] -- ^ width of status bar on each screen , mapped :: !(S.Set Window) -- ^ the Set of mapped windows , waitingUnmap :: !(M.Map Window Int) -- ^ the number of expected UnmapEvents , layouts :: !(M.Map WorkspaceId (Layout Window, [Layout Window])) } @@ -51,7 +51,7 @@ data XConf = XConf , normalBorder :: !Pixel -- ^ border color of unfocused windows , focusedBorder :: !Pixel } -- ^ border color of the focused window -type WindowSet = StackSet WorkspaceId Window ScreenId +type WindowSet = StackSet WorkspaceId Window ScreenId ScreenDetail -- | Virtual workspace indicies newtype WorkspaceId = W Int deriving (Eq,Ord,Show,Read,Enum,Num,Integral,Real) @@ -59,6 +59,10 @@ newtype WorkspaceId = W Int deriving (Eq,Ord,Show,Read,Enum,Num,Integral,Real) -- | Physical screen indicies newtype ScreenId = S Int deriving (Eq,Ord,Show,Read,Enum,Num,Integral,Real) +data ScreenDetail = SD { screenRect :: !Rectangle + , statusGap :: !(Int,Int,Int,Int) -- ^ width of status bar on the screen + } deriving (Eq,Show, Read) + ------------------------------------------------------------------------ -- | The X monad, a StateT transformer over IO encapsulating the window -- cgit v1.2.3