Re: Window events problems



-------- Original Message --------
Subject: Window events problems
From: Perriman <chuchiperriman gmail com>
To: gtk-app-devel-list gnome org
Date: 12/30/2008 07:21 PM


Can you help me?


I found that in order to properly attach to "key-press-event" or "button-press-event" in a GTK_WINDOW_POPUP type window I have to attach focus to the window with a handful of function calls...

    gtk_window_present( GTK_WINDOW( popupWindow ) );
    gtk_widget_grab_focus( popupWindow );
    gtk_grab_add( popupWindow );
    gtk_widget_grab_focus( widget );

Then I can catch key and button presses inside the window. Otherwise it still thinks the GTK_WINDOW_TOPLEVEL has focus and receives keys/buttons.



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