Re: [gtk-vnc-devel] [PATCH][RFC] Update keyboard/pointer grab



Em Qui, 2008-01-24 às 10:06 -0600, Anthony Liguori escreveu:
> This patch updates the keyboard/pointer logic as follows:
> 
> Pointer grab is only enabled if set_pointer_grab(TRUE) is called.  
> Pointer grab is activated when the guest is in relative mouse mode and 
> the user either 1) clicks on the window or 2) presses ctrl-alt.  
> set_pointer_grab(TRUE) does *not* activate grab.
> 
> The same applies to keyboard grab.

I'm happy with this approach.

> If we want to add an additional interface that activates 
> keyboard/pointer grab, I'm certainly happy to do that.  This also fixes 
> what I believe is a bug whereas the first mouse click causes grab to be 
> entered when in absolute mode.

I need an API that explicitly do the grab. In Vinagre, if the user hits
F11 key, it enters in fullscreen mode, and I want to grab the
cursor/keyboard at this point.

Maybe we should make do_*_grab() public?

Also, I think it's necessary to put "gtk_widget_grab_focus (widget);"
inside button_event(), before do the grab, in order to actually grab the
focus to the gtk-vnc widget.

> What do people think of this?
> 
> Regards,
> 
> Anthony Liguori

-- 
Jonh Wendell
www.bani.com.br







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