|
@ -416,6 +416,8 @@ when isMainModule: |
|
|
start = ev.xButton |
|
|
start = ev.xButton |
|
|
|
|
|
|
|
|
elif (ev.theType == MapNotify) and (ev.xmap.override_redirect == 0): |
|
|
elif (ev.theType == MapNotify) and (ev.xmap.override_redirect == 0): |
|
|
|
|
|
var ignore = false |
|
|
|
|
|
|
|
|
let rootAttrs = getAttributes(display, root.addr) |
|
|
let rootAttrs = getAttributes(display, root.addr) |
|
|
if rootAttrs.isSome: |
|
|
if rootAttrs.isSome: |
|
|
let struts = display.calculateStruts |
|
|
let struts = display.calculateStruts |
|
@ -425,6 +427,15 @@ when isMainModule: |
|
|
let winAttrs : Option[TXWindowAttributes] = getAttributes(display, ev.xcreatewindow.window.addr) |
|
|
let winAttrs : Option[TXWindowAttributes] = getAttributes(display, ev.xcreatewindow.window.addr) |
|
|
|
|
|
|
|
|
if winAttrs.isSome and winAttrs.get.override_redirect == 0: |
|
|
if winAttrs.isSome and winAttrs.get.override_redirect == 0: |
|
|
|
|
|
let props = toSeq(getProperties(display, ev.xmap.window)) |
|
|
|
|
|
for prop in props: |
|
|
|
|
|
if prop.isSome and prop.get.kind == pkCardinal: |
|
|
|
|
|
if prop.get.name.startsWith("_NET_WM_STRUT"): |
|
|
|
|
|
# Ignore struts |
|
|
|
|
|
ignore = true |
|
|
|
|
|
break |
|
|
|
|
|
|
|
|
|
|
|
if not ignore: |
|
|
discard XMoveResizeWindow(display, |
|
|
discard XMoveResizeWindow(display, |
|
|
ev.xmap.window, |
|
|
ev.xmap.window, |
|
|
struts.bottom.cint, struts.top.cint, |
|
|
struts.bottom.cint, struts.top.cint, |
|
|