|
@ -403,20 +403,18 @@ when isMainModule: |
|
|
|
|
|
|
|
|
let winAttrs : Option[TXWindowAttributes] = getAttributes(display, ev.xKey.subWindow.addr) |
|
|
let winAttrs : Option[TXWindowAttributes] = getAttributes(display, ev.xKey.subWindow.addr) |
|
|
|
|
|
|
|
|
let depth = winAttrs.get.borderWidth.cuint |
|
|
let borderWidth = winAttrs.get.borderWidth.cuint |
|
|
let borderWidth = winAttrs.get.depth.cuint |
|
|
|
|
|
|
|
|
|
|
|
discard XMoveResizeWindow(display, |
|
|
discard XMoveResizeWindow(display, |
|
|
ev.xKey.subWindow, |
|
|
ev.xKey.subWindow, |
|
|
0, struts.top.cint, |
|
|
struts.bottom.cint, struts.top.cint, |
|
|
screenWidth.cuint, screenHeight.cuint - struts.bottom.cuint - borderWidth.cuint) |
|
|
screenWidth.cuint, screenHeight.cuint - struts.top.cuint - struts.bottom.cuint) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif (ev.theType == ButtonPress) and (ev.xButton.subWindow != None): |
|
|
elif (ev.theType == ButtonPress) and (ev.xButton.subWindow != None): |
|
|
discard XGetWindowAttributes(display, ev.xButton.subWindow, attr.addr) |
|
|
discard XGetWindowAttributes(display, ev.xButton.subWindow, attr.addr) |
|
|
start = ev.xButton |
|
|
start = ev.xButton |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif (ev.theType == MapNotify) and (ev.xmap.overrideRedirect == 0): |
|
|
elif (ev.theType == MapNotify) and (ev.xmap.overrideRedirect == 0): |
|
|
let rootAttrs = getAttributes(display, root.addr) |
|
|
let rootAttrs = getAttributes(display, root.addr) |
|
|
if rootAttrs.isSome: |
|
|
if rootAttrs.isSome: |
|
@ -424,13 +422,12 @@ when isMainModule: |
|
|
let screenHeight = rootAttrs.get.height |
|
|
let screenHeight = rootAttrs.get.height |
|
|
let screenWidth = rootAttrs.get.width |
|
|
let screenWidth = rootAttrs.get.width |
|
|
|
|
|
|
|
|
let winAttrs : Option[TXWindowAttributes] = getAttributes(display, ev.xmap.window.addr) |
|
|
let winAttrs : Option[TXWindowAttributes] = getAttributes(display, ev.xcreatewindow.window.addr) |
|
|
|
|
|
|
|
|
if winAttrs.isSome and winAttrs.get.overrideRedirect == 0: |
|
|
|
|
|
discard XMoveResizeWindow(display, |
|
|
discard XMoveResizeWindow(display, |
|
|
ev.xmap.window, |
|
|
ev.xmap.window, |
|
|
0, struts.top.cint, |
|
|
struts.bottom.cint, struts.top.cint, |
|
|
screenWidth.cuint, screenHeight.cuint) |
|
|
screenWidth.cuint, screenHeight.cuint - struts.top.cuint - struts.bottom.cuint) |
|
|
|
|
|
|
|
|
discard display.XSetInputFocus(ev.xmap.window, RevertToPointerRoot, CurrentTime) |
|
|
discard display.XSetInputFocus(ev.xmap.window, RevertToPointerRoot, CurrentTime) |
|
|
|
|
|
|
|
|