|
|
|
@ -166,22 +166,20 @@ proc main() =
|
|
|
|
|
var swa: TXSetWindowAttributes
|
|
|
|
|
swa.colormap = XCreateColormap(display, root,
|
|
|
|
|
vi.visual, AllocNone)
|
|
|
|
|
swa.event_mask = ButtonPressMask or ButtonReleaseMask or
|
|
|
|
|
KeyPressMask or KeyReleaseMask or
|
|
|
|
|
swa.event_mask = ButtonPressMask or ButtonReleaseMask or KeyPressMask or
|
|
|
|
|
PointerMotionMask or ExposureMask or ClientMessage
|
|
|
|
|
swa.override_redirect = 1
|
|
|
|
|
swa.save_under = 1
|
|
|
|
|
|
|
|
|
|
var attributes: TXWindowAttributes
|
|
|
|
|
discard XGetWindowAttributes(
|
|
|
|
|
display,
|
|
|
|
|
DefaultRootWindow(display),
|
|
|
|
|
addr attributes)
|
|
|
|
|
|
|
|
|
|
var win = XCreateWindow(
|
|
|
|
|
display, root,
|
|
|
|
|
0, 0, attributes.width.cuint, attributes.height.cuint, 0,
|
|
|
|
|
vi.depth, InputOutput, vi.visual,
|
|
|
|
|
CWColormap or CWEventMask or CWOverrideRedirect or CWSaveUnder, addr swa)
|
|
|
|
|
CWColormap or CWEventMask, addr swa)
|
|
|
|
|
|
|
|
|
|
discard XMapWindow(display, win)
|
|
|
|
|
|
|
|
|
@ -283,8 +281,6 @@ proc main() =
|
|
|
|
|
isEnabled: false,
|
|
|
|
|
radius: 200.0)
|
|
|
|
|
|
|
|
|
|
discard XSetInputFocus(display, win, RevertToParent, CurrentTime);
|
|
|
|
|
|
|
|
|
|
let dt = 1.0 / rate.float
|
|
|
|
|
while not quitting:
|
|
|
|
|
var wa: TXWindowAttributes
|
|
|
|
|