Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-08 Thread Jindřich Makovička
Hi Gerd, I will try to respin the patch set during the weekend. Regards, Jindrich On Wed, Nov 8, 2017 at 11:10 AM Gerd Hoffmann wrote: > On Sun, Nov 05, 2017 at 09:10:45AM -0500, Cole Robinson wrote: > > On 11/02/2017 01:12 PM, Jindřich Makovička wrote: > > > This fixes the following case: > >

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-08 Thread Gerd Hoffmann
On Sun, Nov 05, 2017 at 09:10:45AM -0500, Cole Robinson wrote: > On 11/02/2017 01:12 PM, Jindřich Makovička wrote: > > This fixes the following case: > > > > 1) Ctrl-Alt-2 for console is pressed > > 2) console pops up and gets focus > > 3) console receives the Ctrl-Alt-2 keypress event > > 4) cons

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-05 Thread Cole Robinson
On 11/02/2017 01:12 PM, Jindřich Makovička wrote: > This fixes the following case: > > 1) Ctrl-Alt-2 for console is pressed > 2) console pops up and gets focus > 3) console receives the Ctrl-Alt-2 keypress event > 4) console closes > 5) focus returns to the main window > 6) main window gets the ke

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Gerd Hoffmann
On Fri, 2017-11-03 at 12:10 +, Peter Maydell wrote: > On 3 November 2017 at 12:07, Gerd Hoffmann wrote: > >   Hi, > > > > > I don't think we have the same grab semantics exactly on all > > > UI frontends either, so I dunno that that "doesn't grab on > > > tablet" > > > is true either. > > >

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Peter Maydell
On 3 November 2017 at 12:07, Gerd Hoffmann wrote: > Hi, > >> I don't think we have the same grab semantics exactly on all >> UI frontends either, so I dunno that that "doesn't grab on tablet" >> is true either. > > Well, there are pointer grabs and keyboard grabs. > > Pointer grabs happen in rel

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Gerd Hoffmann
Hi, > I don't think we have the same grab semantics exactly on all > UI frontends either, so I dunno that that "doesn't grab on tablet" > is true either. Well, there are pointer grabs and keyboard grabs. Pointer grabs happen in relative mouse mode only, and I'm pretty sure we are consistent he

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Peter Maydell
On 3 November 2017 at 11:01, Gerd Hoffmann wrote: > Hi, > >> There's a patch in-flight to switch cocoa to ctrl-alt-g. >> (If you think that's a bad idea it would be useful to reply >> to that patch.) > > I personally don't mind much. I rarely use it. With a tablet added to > the guest (which I

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Gerd Hoffmann
Hi, > There's a patch in-flight to switch cocoa to ctrl-alt-g. > (If you think that's a bad idea it would be useful to reply > to that patch.) I personally don't mind much. I rarely use it. With a tablet added to the guest (which I expect most people do these days) mouse grabs don't happen an

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Daniel P. Berrange
On Fri, Nov 03, 2017 at 10:41:35AM +, Peter Maydell wrote: > On 3 November 2017 at 10:35, Gerd Hoffmann wrote: > > On Fri, 2017-11-03 at 09:37 +, Peter Maydell wrote: > >> Also I think it would be nice to have written up what the > >> "expected" set of hotkeys for UI frontends are, so we c

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Peter Maydell
On 3 November 2017 at 10:35, Gerd Hoffmann wrote: > On Fri, 2017-11-03 at 09:37 +, Peter Maydell wrote: >> Also I think it would be nice to have written up what the >> "expected" set of hotkeys for UI frontends are, so we can >> be consistent. I think SDL and gtk are different about what >> th

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Gerd Hoffmann
On Fri, 2017-11-03 at 09:37 +, Peter Maydell wrote: > On 3 November 2017 at 09:26, Gerd Hoffmann wrote: > > Ignoring autorepeat events (as the patch does, but which the commit > > message doesn't mention) makes sense.  But I still fail to see why > > we > > should limit hotkeys to the main win

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Peter Maydell
On 3 November 2017 at 09:26, Gerd Hoffmann wrote: > Ignoring autorepeat events (as the patch does, but which the commit > message doesn't mention) makes sense. But I still fail to see why we > should limit hotkeys to the main window. Is there documentation about how the input subsystem wants to

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-03 Thread Gerd Hoffmann
On Thu, 2017-11-02 at 17:12 +, Jindřich Makovička wrote: > This fixes the following case: > > 1) Ctrl-Alt-2 for console is pressed > 2) console pops up and gets focus > 3) console receives the Ctrl-Alt-2 keypress event Hmm, doesn't reproduce here. Also: why should the same event be delivered

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-02 Thread Jindřich Makovička
This fixes the following case: 1) Ctrl-Alt-2 for console is pressed 2) console pops up and gets focus 3) console receives the Ctrl-Alt-2 keypress event 4) console closes 5) focus returns to the main window 6) main window gets the keypress event 7) goto 2 until the key is released, with 50% chance

Re: [Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-11-01 Thread Gerd Hoffmann
Why? > --- >  ui/sdl2.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/ui/sdl2.c b/ui/sdl2.c > index 685e4fabec..fa54353430 100644 > --- a/ui/sdl2.c > +++ b/ui/sdl2.c > @@ -349,7 +349,7 @@ static void handle_keydown(SDL_Event *ev) >  } >  gui_key_modifier_pressed

[Qemu-devel] [PATCH 4/7] sdl2: Only accept the hotkeys on the main window

2017-10-23 Thread Jindrich Makovicka
--- ui/sdl2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index 685e4fabec..fa54353430 100644 --- a/ui/sdl2.c +++ b/ui/sdl2.c @@ -349,7 +349,7 @@ static void handle_keydown(SDL_Event *ev) } gui_key_modifier_pressed = mod_state; -if (gui