summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTomas Janousek <tomi@nomi.cz>2019-10-28 14:08:36 +0100
committerTomas Janousek <tomi@nomi.cz>2020-02-22 18:12:43 +0000
commit8403251f2bff2d803f2e4f3d55b363673570c3c7 (patch)
tree58022a803959988d6cac9d095b497ea917998d7d
parentf0eb83eb8234add5a4248a6084ebd57953b29c2d (diff)
downloadxmobar-8403251f2bff2d803f2e4f3d55b363673570c3c7.tar.gz
xmobar-8403251f2bff2d803f2e4f3d55b363673570c3c7.tar.bz2
Silence some warnings
src/Xmobar/X11/Draw.hs:51:11-12: warning: [-Wunused-matches] Defined but not used: ‘wr’ | 51 | drawInWin wr@(Rectangle _ _ wid ht) ~[left,center,right] = do | ^^ src/Xmobar/App/EventLoop.hs:50:1-36: warning: [-Wunused-imports] The import of ‘Xmobar.X11.Events’ is redundant | 50 | import Xmobar.X11.Events(nextEvent') | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-rw-r--r--src/Xmobar/App/EventLoop.hs3
-rw-r--r--src/Xmobar/X11/Draw.hs2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/Xmobar/App/EventLoop.hs b/src/Xmobar/App/EventLoop.hs
index 678db2d..3fab3e5 100644
--- a/src/Xmobar/App/EventLoop.hs
+++ b/src/Xmobar/App/EventLoop.hs
@@ -47,7 +47,10 @@ import Xmobar.X11.Text
import Xmobar.X11.Draw
import Xmobar.X11.Bitmap as Bitmap
import Xmobar.X11.Types
+
+#ifndef THREADED_RUNTIME
import Xmobar.X11.Events(nextEvent')
+#endif
#ifdef XFT
import Graphics.X11.Xft
diff --git a/src/Xmobar/X11/Draw.hs b/src/Xmobar/X11/Draw.hs
index e9be1fe..23003b3 100644
--- a/src/Xmobar/X11/Draw.hs
+++ b/src/Xmobar/X11/Draw.hs
@@ -62,6 +62,8 @@ drawInWin wr@(Rectangle _ _ wid ht) ~[left,center,right] = do
(defaultDepthOfScreen (defaultScreenOfDisplay d))
#if XFT
when (alpha c /= 255) (liftIO $ drawBackground d p (bgColor c) (alpha c) wr)
+#else
+ _ <- return wr
#endif
withColors d [bgColor c, borderColor c] $ \[bgcolor, bdcolor] -> do
gc <- liftIO $ createGC d w