Printscreen on gtk_menu



Hi,
I would like to know why we can't press printscreen key inside gtk_menu or popup.


On label, textbox, or window container, the printscreen key opens gnome-screenshot but not on gtk_menu.


First I thought that it was because menu gtk/gtkmenu.c::gtk_menu_key_press() didn't return FALSE but with some test, I didn't work when I put a return FALSE;

I've also added some debugging message in gtkmenushell.c and gtkwindow.c but without success to understand how it works.

It seems like a printscreen key don't send any signals to the window normally. But when the focus it's on a menu, the printscreen is handle by the menu.

Is this a limitation of gdk, gtk+ or is it a problem with global key binding?


Also, I've check for gnome-setting-deamon and the gst_keybindings_manager. It looks like only root windows have global key binding filter. Does this means that the keybindings is send only to main window and not for popup window (menu)?
Is this the reason why printscreen key doesn't work in menu?

Would a call with the parameter "null" works?

gdk_window_add_filter (null, (GdkFilterFunc) keybindings_filter, manager);



Reference:

http://svn.gnome.org/viewvc/gnome-settings-daemon/trunk/plugins/keybindings/gsd-keybindings-manager.c?revision=309&view=markup (see
gsd_keybindings_manager_start)

http://library.gnome.org/devel/gdk/unstable/gdk-Windows.html#gdk-window-add-filter


--
Yan Morin
Consultant en Logiciel Libre de Progysm
progysm gmail com
http://progysm.no-ip.org/

begin:vcard
fn:Yan Morin
n:Morin;Yan
org:Progysm
adr;quoted-printable:;;2737, rue des Ormes;Mont-Laurier;Qu=C3=A9bec;J9L 3G7;Canada
email;internet:progysm gmail com
title:Consultant en Logiciel Libre
tel;work:819-440-4700
tel;fax:819-440-4700
note;quoted-printable:Consultation pour les Logiciels Libres=0D=0A=
	Programmation Web=0D=0A=
	Programmation XUL, Java, C++=0D=0A=
	Scripting Linux=0D=0A=
	Support technique Linux=0D=0A=
	Formation Web/Linux/Programmation
url:http://progysm.no-ip.org/
version:2.1
end:vcard



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]