mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-07-31 04:01:51 -07:00
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...
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user