codic12 / worm

A dynamic, tag-based window manager written in Nim
MIT License
711 stars 24 forks source link

The minimize-active-hovered-path makes the wm crash #80

Closed Syndrizzle closed 2 years ago

Syndrizzle commented 2 years ago

If I run wormc minimize-active-hovered-path ~/.config/worm/icons/minimize-hover.png which is a 20x20 png file, it just crashes the window manager. However the ,minimize hovered inactive one, and everything of close and maximize is working, only this one is making the wm crash.

codic12 commented 2 years ago

Thanks for bringing this up! Looks like I accidentally used Nim's fat string type (which includes length etc, is heap allocated I believe) in an array instead of cstring which the X API uses, which of course causes a memory error. not sure why that happened since I just copy pasted the same template code for all of the button setters, but it's fixed now ;)

I'll release a v0.3.1 to fix this issue.