How are menus and tooltips captured?

Asked by Andrew on 2011-12-29

Hi, I was using Shutter and was wondering (from a code point of view) how menus and tooltips are actually captured?

If you could give me a quick explanation and even some pointers to the actual code I would really appreciate it, I was just curious :)

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Shutter Edit question
Assignee:
No assignee Edit question
Solved by:
Mario Kemper (Romario)
Solved:
2012-01-06
Last query:
2012-01-06
Last reply:
2012-01-06

The code is pretty simple:
http://bazaar.launchpad.net/~mario-kemper/shutter/devel/view/head:/share/shutter/resources/modules/Shutter/Screenshot/Window.pm#L1035

Basically it is about finding the active (y-stacking) xwindow. Additionally we check the type_hint to see if it is a tooltip:
http://developer.gnome.org/gtk/2.24/GtkWindow.html#gtk-window-get-type-hint

Is this information sufficient or would you like to know more about this?

Andrew (and471) said : #2

That is fine, thank you for taking the time to answer :)