Skip to content

Commit 0fd50aa

Browse files
committed
More generic instance for DecorationWidget GenericWidget.
1 parent 0815b0b commit 0fd50aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: XMonad/Layout/DecorationEx/Widgets.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ data GenericWidget cmd =
148148
-- | Generic widget type specialized for 'StandardCommand'
149149
type StandardWidget = GenericWidget StandardCommand
150150

151-
instance DecorationWidget (GenericWidget StandardCommand) where
151+
instance (Default cmd, Read cmd, Show cmd, WindowCommand cmd) => DecorationWidget (GenericWidget cmd) where
152152

153-
type WidgetCommand (GenericWidget StandardCommand) = StandardCommand
153+
type WidgetCommand (GenericWidget cmd) = cmd
154154

155-
widgetCommand TitleWidget _ = FocusWindow
155+
widgetCommand TitleWidget _ = def
156156
widgetCommand w 1 = swCommand w
157-
widgetCommand _ _ = FocusWindow
157+
widgetCommand _ _ = def
158158

159159
isShrinkable TitleWidget = True
160160
isShrinkable _ = False

0 commit comments

Comments
 (0)