diff --git a/src/OS/Window/X11.hs b/src/OS/Window/X11.hs
--- a/src/OS/Window/X11.hs
+++ b/src/OS/Window/X11.hs
@@ -6,6 +6,7 @@
 ) where
 
 import Codec.Picture
+import Control.Applicative
 import Data.Bits
 import Data.ByteString (ByteString)
 import Data.ByteString qualified as BS
@@ -21,7 +22,7 @@
 import Graphics.X11.Xlib.Extras
 
 data Window = Window X11.Window Display
-    deriving (Eq, Ord)
+    deriving (Eq, Ord, Show)
 
 findByName ::
     -- | substring which must appear in the window title
@@ -32,9 +33,10 @@
     Just (w, _) <- do
         nET_CLIENT_LIST <- internAtom d "_NET_CLIENT_LIST" True
         Just ids <- getWindowProperty32 d nET_CLIENT_LIST (defaultRootWindow d)
-        find ((name `T.isInfixOf`) . snd) <$> for ids \(fromIntegral -> i) -> do
+        ws <- for ids \(fromIntegral -> i) -> do
             Just cs <- getWindowProperty8 d wM_NAME i
             pure (i, decodeLatin1 . BS.pack $ map fromIntegral cs)
+        pure $ find ((name ==) . snd) ws <|> find ((name `T.isInfixOf`) . snd) ws
     pure $ Window w d
 
 setTitle :: Window -> Text -> IO ()
diff --git a/window-utils.cabal b/window-utils.cabal
--- a/window-utils.cabal
+++ b/window-utils.cabal
@@ -1,6 +1,6 @@
 cabal-version:      3.0
 name:               window-utils
-version:            0.1.0.0
+version:            0.2.0.0
 license:            BSD-3-Clause
 author:             George Thomas
 maintainer:         georgefsthomas@gmail.com
