diff --git a/gtk-strut.cabal b/gtk-strut.cabal
--- a/gtk-strut.cabal
+++ b/gtk-strut.cabal
@@ -2,10 +2,10 @@
 --
 -- see: https://github.com/sol/hpack
 --
--- hash: fe4485dfb03709a5eca48ff263f4c8d94171ddf58082c04fd8f0aad138ca6048
+-- hash: 534fe253fbfcca345ba3575a2e1353dea97e5a6c2a07867f3dcd9ae1a8363ace
 
 name:           gtk-strut
-version:        0.1.0.0
+version:        0.1.1.0
 synopsis:       Libary for creating strut windows with gi-gtk
 description:    Please see the README on Github at <https://github.com/IvanMalison/gtk-strut#readme>
 category:       System
diff --git a/src/Graphics/UI/GIGtkStrut.hs b/src/Graphics/UI/GIGtkStrut.hs
--- a/src/Graphics/UI/GIGtkStrut.hs
+++ b/src/Graphics/UI/GIGtkStrut.hs
@@ -1,6 +1,5 @@
 module Graphics.UI.GIGtkStrut where
 
-
 import           Control.Monad
 import           Control.Monad.IO.Class
 import           Control.Monad.Trans.Class
@@ -40,7 +39,13 @@
   }
 
 buildStrutWindow :: MonadIO m => StrutConfig -> m Gtk.Window
-buildStrutWindow StrutConfig
+buildStrutWindow config = do
+  window <- Gtk.windowNew Gtk.WindowTypeToplevel
+  setupStrutWindow config window
+  return window
+
+setupStrutWindow :: MonadIO m => StrutConfig -> Gtk.Window -> m ()
+setupStrutWindow StrutConfig
               { strutWidth = widthSize
               , strutHeight = heightSize
               , strutXPadding = xpadding
@@ -49,7 +54,7 @@
               , strutPosition = position
               , strutAlignment = alignment
               , strutDisplayName = displayName
-              } = do
+              } window = do
   Just display <- maybe Gdk.displayGetDefault Gdk.displayOpen displayName
   Just monitor <- maybe (Gdk.displayGetPrimaryMonitor display)
                   (Gdk.displayGetMonitor display) monitorNumber
@@ -62,7 +67,6 @@
   screenHeight <- maximum <$> mapM getFullY allGeometries
   screen <- Gdk.displayGetDefaultScreen display
 
-  window <- Gtk.windowNew Gtk.WindowTypeToplevel
   Gtk.windowSetTypeHint window Gdk.WindowTypeHintDock
   geometry <- Gdk.newZeroGeometry
 
@@ -139,9 +143,7 @@
           gdkWindow <- MaybeT $ Gtk.widgetGetWindow window
           lift $ setStrut gdkWindow ewmhSettings
 
-  Gtk.onWidgetRealize window setStrutProperties
-
-  return window
+  void $ Gtk.onWidgetRealize window setStrutProperties
 
 allHints =
   [ Gdk.WindowHintsMinSize
