开发者

Xlib getting events of a child window

I am writing a simple window manager using xlib. The code reparents client windows into a window slightly larger than the client window called frame window. I am trying to implement a click to focus policy. I am getting开发者_如何学运维 buttonpress events when the mouse button is pressed in the frame window and am able to raise the frame window on buttonpress. However, I am not getting any events when the mouse button is pressed in the client window. The idea is to trap this event and raise the frame window even when the mouse button is pressed in the client window.


You have to XGrabButton() on the child window. Your next problem will be that when the button is pressed the child window loses focus; you probably want to keep your own idea of the "focus window" and not change it on detail=NotifyGrab events. See metacity source code for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜