Can't grab keyboard



Hi:

I am trying to grab the keyboard using the command gdk_grab_keyboard() and am passing (GtkWidget *)->window, FALSE, GDK_CURRENT_TIME as paramaters. The function is executed just before gtk_main(). But I am unable to grab the keyboard. Am I doing something wrong here.

The reason I am doing this because, we are trying to convert some Xlib based legacy software into Gtk/Gdk based. As a first step we are developing the GUI part first. On this note, I also would like to find out how easy (or hard) it is to integrate Xlib based command into Gtk/Gdk (like the following):

Dispay *display;  display variable in Xlib apps.

XGetInputFocus(...); To get the current input focus window

XSendEvent;

Thanks.

-Dinesh
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





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