Focus Events under XWindows

Started by
0 comments, last by shamen 24 years, 1 month ago
Another question: I have successfully created an x window, handled its keyboard/mouse events/resizing etc but whenever the window loses focus, then regains focus, sometimes (more often than not) the keyboard freezes and the OpenGL content of my window freezes. I can ''gain control'' again by moving the window around the screen and magically things start to work again. However this is not very ideal. I imagine i am missing an event for the focus. Plus i guess i must do something when i receive this event to get everything going smoothly again. Any suggestions as to what i must do? Thanks.
Advertisement
Unless you have backing-store turned on in your X server, you''ll have to redraw the window when you regain focus. You should redraw for _any_ exposure event, really. I dunno about the keyboard locking up, but it might be that your window manager doesn''t really give your program focus again until you actually _click_ in/on the window. A lot of window managers don''t have focus-follows-mouse or sloppy-focus turned on by default...

This topic is closed to new replies.

Advertisement