Advertisement

Double UnmapNotify events

Started by January 17, 2002 10:50 AM
0 comments, last by Airhead Zoom 23 years ago
Hey people, I''ve been working on a window manager to teach myself the ins & outs of Xlib. (I''m a newbie to this whole X programming) The strange thing is, when I do an XSelectInput on the root window with the SubstructureNotify flag, I somehow get double UnmapNotify messages/events (without matching MapNotify events, that is). They aren''t ''fake'' (send_event is False) so I don''t understand. How can a window be unmapped multiple times? When I don''t specify SubstructureNotify, but in stead I do XSelectInput on windows when they''re created I /don''t/ get double UnmapNotify messages. I hope someone can clarify this. --- Allow me to clear my head for once... Stop polluting the air!
---Allow me to clear my head for once...Stop polluting the air!
It may not help much, but this is what my book says:

xmap, xunmap

When Generated
--------------
The X server generates MapNotify and UnmapNotify events when a windows changes state from unmapped to mapped or vice versa.

Select With
-----------
To receive these events on a single window, use StructureNotifyMask in the call to XSelectInput for the window. To receive these events for all children of a particular parent, specify the parent window ID and use SubstructureNotifyMask.

(XLib Programming Manual, V1, R4, P549)

So.......why the heck you would be getting UNMAP notify events when you -create- a window, is beyond me, but if you''re using SubstructureNotify, not StructureNotify, you''re probably getting the events off the child windows of your main window.

Incidentally, I''m curious, what''s involved in writing a window manager? I''ve never bothered to look it up. It is just a big hihg level window you have to deal with, or are there complicated things to do with colormaps you have to deal with...?

later.

This topic is closed to new replies.

Advertisement