Closed scrouthtv closed 3 years ago
I just tried again:
(It only ends because I manually C-c)
I am running Arch Linux with xorg-server 1.20.10-3
and xcb-proto 1.14.1-3
. My WM is i3-gaps 4.19.1-1
.
If I close the window, both UnmapNotify and DestroyNotify are sent, however, no error is sent (which closes the example in your case).
Sorry about the formatting.
Here is also an example of how to listen to key
Now I remember. I've encountered this before. On some (well behaved) DEs the UnmapNotify and DestroyNotify is not sent just the connection is closed, unless you add WM_DELETE_WINDOW to WM_PROTOCOLS property. Could you mention this in comment in the DestoyNotifyEvent, please?
sure thing. You're using stock ubuntu (so I can mention your DE as an example for closing = killing the X conection)?
I also have an example for drawing coming up which you can consider adding, I just have to add comments for everything.
Here it is. I think I'm done
I also added some text drawing in there.
Thank you for bearing with me
No worries, I am a perfectionist myself ;)
I think it should all be in there. Regarding the shapes example, I messed up a bit and will be opening a new PR soon (in case you're interested).
Just added an missing "\n" and merged. Thank you.
Also I'm interested in the shapes example. I myself like to learn from examples, so I think the more examples, the better. ;)
Hint: git rebase -i
is useful to trim/modify branches.
Hello,
first, I think that the default examples are very helpful and well documented.
However, if you run the create-window example and close the window, the underlying Go Program keeps running.
I think this is a good use case for the
DestroyNotifyEvent
and demonstrating how reading it / reading events in general works.So I added these simple lines to the demo.