Notification bubles are transparent for mouse clicks - How its done?

Asked by Jirka Daněk

A programming question.
I have spent quite a few hours searching notify-osd code, but still it is unclear to me how you archieve that click-through behaviour.
The bubble window does have set few event masks on mouse (in bubble.c). I know it need it to know that mouse is hoovering above it and the bubble should go blurry. But how you pass the mouse events to underlying windows than?

Question information

English Edit question
Notify OSD Edit question
No assignee Edit question
Solved by:
Jirka Daněk
Last query:
Last reply:
Revision history for this message
Jirka Daněk (juraad) said :

I think I got It! IMHO its the update_input_shape (window, 1, 1); method, that sets the input shape to 1x1 pixel square in the corner of every bubble. That is why notify-osd has to do mouse polling.

It is a shame QT4 cannot do just that. There is only setMask(), which (optionally) clips mouse, but _always_ clips visibility :(

BTW, I found it in revision 1, much easier to navigate than current sources ;-)