Skip to content

Commit 52de670

Browse files
useruser
authored andcommitted
remove feature not needed
1 parent 063f80b commit 52de670

1 file changed

Lines changed: 3 additions & 23 deletions

File tree

src/worm.nim

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -502,18 +502,8 @@ proc handleUnmapNotify(self: var Wm; ev: XUnmapEvent): void =
502502
self.updateClientList
503503
discard self.dpy.XSetInputFocus(self.root, RevertToPointerRoot, CurrentTime)
504504
self.focused.reset # TODO: focus last window
505-
if self.clients.len == 0: return
506-
var lcot = -1
507-
for i, c in self.clients:
508-
if c.tags == self.tags: lcot = i
509-
if lcot == -1: return
510-
self.focused = some uint lcot
511-
discard self.dpy.XSetInputFocus(self.clients[self.focused.get].window, RevertToPointerRoot, CurrentTime)
512-
discard self.dpy.XRaiseWindow self.clients[self.focused.get].frame.window
513-
discard self.dpy.XSetWindowBorder(self.clients[self.focused.get].frame.window,
514-
self.config.borderActivePixel)
515505
for i, locClient in self.clients:
516-
if uint(i) != self.focused.get: discard self.dpy.XSetWindowBorder(locClient.frame.window,
506+
discard self.dpy.XSetWindowBorder(locClient.frame.window,
517507
self.config.borderInactivePixel)
518508
if self.layout == lyTiling: self.tileWindows
519509

@@ -526,21 +516,11 @@ proc handleDestroyNotify(self: var Wm; ev: XDestroyWindowEvent): void =
526516
self.updateClientList
527517
discard self.dpy.XSetInputFocus(self.root, RevertToPointerRoot, CurrentTime)
528518
self.focused.reset # TODO: focus last window
529-
if self.clients.len == 0: return
530-
var lcot = -1
531-
for i, c in self.clients:
532-
if c.tags == self.tags: lcot = i
533-
if lcot == -1: return
534-
self.focused = some uint lcot
535-
discard self.dpy.XSetInputFocus(self.clients[self.focused.get].window, RevertToPointerRoot, CurrentTime)
536-
discard self.dpy.XRaiseWindow self.clients[self.focused.get].frame.window
537-
discard self.dpy.XSetWindowBorder(self.clients[self.focused.get].frame.window,
538-
self.config.borderActivePixel)
539519
for i, locClient in self.clients:
540-
if uint(i) != self.focused.get: discard self.dpy.XSetWindowBorder(locClient.frame.window,
520+
discard self.dpy.XSetWindowBorder(locClient.frame.window,
541521
self.config.borderInactivePixel)
542522
if self.layout == lyTiling: self.tileWindows
543-
523+
544524
proc handleClientMessage(self: var Wm; ev: XClientMessageEvent): void =
545525
if ev.messageType == self.netAtoms[NetWMState]:
546526
let clientOpt = self.findClient do (client: Client) ->

0 commit comments

Comments
 (0)