diff options
author | gwern0 <gwern0@gmail.com> | 2007-10-19 03:00:13 +0200 |
---|---|---|
committer | gwern0 <gwern0@gmail.com> | 2007-10-19 03:00:13 +0200 |
commit | 4179e88562b1bac351431dc256f2c4c8b641c556 (patch) | |
tree | 77d04cb51447faaf25a6651be90e334e75809355 | |
parent | c6daa2a62afab0101a2eba82c38346c4a85ded0d (diff) | |
download | XMonadContrib-4179e88562b1bac351431dc256f2c4c8b641c556.tar.gz XMonadContrib-4179e88562b1bac351431dc256f2c4c8b641c556.tar.xz XMonadContrib-4179e88562b1bac351431dc256f2c4c8b641c556.zip |
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
-rw-r--r-- | XSelection.hs | 4 |
1 files 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 |