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

Re: Window events problems



Hi Michael,

	Thanks for the info. I'm using this focus type currently. When
the user press a key (F2) I set the focus on the popup by doing that but
the problem is when the popup has not the focus and I want to set the
focus when the user uses the mouse by clicking into the window.

Thanks again


El Wed, 31 Dec 2008 08:15:13 -0600
Michael Cronenworth <mike cchtml com> escribió:

> -------- 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]