From 4179e88562b1bac351431dc256f2c4c8b641c556 Mon Sep 17 00:00:00 2001 From: gwern0 Date: Fri, 19 Oct 2007 03:00:13 +0200 Subject: XSelection.hs: simplify creation of window While spelunking in the xclip source code, I noticed it had much the same call to createSimpleWindow but with a simpler geometry - just 1x1 pixels, not the odd 200x100 of the original code. It seems to work the same and looks better and less mysterious, so unless arossato had a specific reason for those particular two numbers... darcs-hash:20071019010013-f7719-bc4ab9b863275e7657d0637836ae8786fd9b2654.gz --- XSelection.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/XSelection.hs b/XSelection.hs index 49f2760..45547d7 100644 --- a/XSelection.hs +++ b/XSelection.hs @@ -65,7 +65,7 @@ getSelection = do dpy <- openDisplay "" let dflt = defaultScreen dpy rootw <- rootWindow dpy dflt - win <- createSimpleWindow dpy rootw 0 0 200 100 0 0 0 + win <- createSimpleWindow dpy rootw 0 0 1 1 0 0 0 p <- internAtom dpy "PRIMARY" True ty <- E.catch (E.catch @@ -88,7 +88,7 @@ putSelection text = do dpy <- openDisplay "" let dflt = defaultScreen dpy rootw <- rootWindow dpy dflt - win <- createSimpleWindow dpy rootw 0 0 200 100 0 0 0 + win <- createSimpleWindow dpy rootw 0 0 1 1 0 0 0 p <- internAtom dpy "PRIMARY" True ty <- internAtom dpy "UTF8_STRING" False xSetSelectionOwner dpy p win currentTime -- cgit v1.2.3