All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
@ 2016-12-14 14:25 Stefan Hajnoczi
  2016-12-14 14:35 ` Stefan Weil
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Stefan Hajnoczi @ 2016-12-14 14:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Michael S. Tsirkin, Gerd Hoffmann, Stefan Hajnoczi

The "Copy" menu item copies VTE terminal text to the clipboard.  This
only works with VTE terminals, not with graphics consoles.

Disable the menu item when the current notebook page isn't a VTE
terminal.

This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
menu item when the guest display is visible.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 ui/gtk.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Gerd, Michael: if you post Reviewed-by I can merge this directly without
requiring you to send a pull request.  It's a user interface segfault so it
would be nice to resolve it in QEMU 2.8.

diff --git a/ui/gtk.c b/ui/gtk.c
index e816428..a216216 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1581,6 +1581,9 @@ static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2,
                                        TRUE);
     }
     gtk_widget_set_sensitive(s->grab_item, on_vga);
+#ifdef CONFIG_VTE
+    gtk_widget_set_sensitive(s->copy_item, vc->type == GD_VC_VTE);
+#endif
 
     gd_update_windowsize(vc);
     gd_update_cursor(vc);
@@ -2246,6 +2249,11 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
     }
 #endif
 
+#ifdef CONFIG_VTE
+    gtk_widget_set_sensitive(s->copy_item,
+                             gd_vc_find_current(s)->type == GD_VC_VTE);
+#endif
+
     if (full_screen) {
         gtk_menu_item_activate(GTK_MENU_ITEM(s->full_screen_item));
     }
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
  2016-12-14 14:25 [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault Stefan Hajnoczi
@ 2016-12-14 14:35 ` Stefan Weil
  2016-12-14 15:15 ` Gerd Hoffmann
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 25+ messages in thread
From: Stefan Weil @ 2016-12-14 14:35 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel; +Cc: Kevin Wolf, qemu-stable, Michael S. Tsirkin

Am 14.12.2016 um 15:25 schrieb Stefan Hajnoczi:
> The "Copy" menu item copies VTE terminal text to the clipboard.  This
> only works with VTE terminals, not with graphics consoles.
> 
> Disable the menu item when the current notebook page isn't a VTE
> terminal.
> 
> This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
> menu item when the guest display is visible.
> 
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  ui/gtk.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> Gerd, Michael: if you post Reviewed-by I can merge this directly without
> requiring you to send a pull request.  It's a user interface segfault so it
> would be nice to resolve it in QEMU 2.8.
> 

Tested-by: Stefan Weil <sw@weilnetz.de>

CC'ing QEMU-stable because I think that 2.7 needs that fix, too.

Stefan

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
  2016-12-14 14:25 [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault Stefan Hajnoczi
  2016-12-14 14:35 ` Stefan Weil
@ 2016-12-14 15:15 ` Gerd Hoffmann
  2016-12-14 22:49 ` Michael S. Tsirkin
  2016-12-15  4:35 ` [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode Michael S. Tsirkin
  3 siblings, 0 replies; 25+ messages in thread
From: Gerd Hoffmann @ 2016-12-14 15:15 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Kevin Wolf, Michael S. Tsirkin

On Mi, 2016-12-14 at 14:25 +0000, Stefan Hajnoczi wrote:
> The "Copy" menu item copies VTE terminal text to the clipboard.  This
> only works with VTE terminals, not with graphics consoles.
> 
> Disable the menu item when the current notebook page isn't a VTE
> terminal.
> 
> This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
> menu item when the guest display is visible.

Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>

> 
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  ui/gtk.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> Gerd, Michael: if you post Reviewed-by I can merge this directly without
> requiring you to send a pull request.  It's a user interface segfault so it
> would be nice to resolve it in QEMU 2.8.
> 
> diff --git a/ui/gtk.c b/ui/gtk.c
> index e816428..a216216 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1581,6 +1581,9 @@ static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2,
>                                         TRUE);
>      }
>      gtk_widget_set_sensitive(s->grab_item, on_vga);
> +#ifdef CONFIG_VTE
> +    gtk_widget_set_sensitive(s->copy_item, vc->type == GD_VC_VTE);
> +#endif
>  
>      gd_update_windowsize(vc);
>      gd_update_cursor(vc);
> @@ -2246,6 +2249,11 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
>      }
>  #endif
>  
> +#ifdef CONFIG_VTE
> +    gtk_widget_set_sensitive(s->copy_item,
> +                             gd_vc_find_current(s)->type == GD_VC_VTE);
> +#endif
> +
>      if (full_screen) {
>          gtk_menu_item_activate(GTK_MENU_ITEM(s->full_screen_item));
>      }

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
  2016-12-14 14:25 [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault Stefan Hajnoczi
  2016-12-14 14:35 ` Stefan Weil
  2016-12-14 15:15 ` Gerd Hoffmann
@ 2016-12-14 22:49 ` Michael S. Tsirkin
  2016-12-15  7:34   ` Stefan Hajnoczi
                     ` (2 more replies)
  2016-12-15  4:35 ` [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode Michael S. Tsirkin
  3 siblings, 3 replies; 25+ messages in thread
From: Michael S. Tsirkin @ 2016-12-14 22:49 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Kevin Wolf, Gerd Hoffmann

On Wed, Dec 14, 2016 at 02:25:18PM +0000, Stefan Hajnoczi wrote:
> The "Copy" menu item copies VTE terminal text to the clipboard.  This
> only works with VTE terminals, not with graphics consoles.
> 
> Disable the menu item when the current notebook page isn't a VTE
> terminal.
> 
> This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
> menu item when the guest display is visible.
> 
> Reported-by: Kevin Wolf <kwolf@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

I don't think it's 2.8 personally, patch just disables an
illegal action. Similar to the hotplug crash fix I
have queued. Just document this as a known issue.



BTW - any idea how to make paste work?



> ---
>  ui/gtk.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> Gerd, Michael: if you post Reviewed-by I can merge this directly without
> requiring you to send a pull request.  It's a user interface segfault so it
> would be nice to resolve it in QEMU 2.8.
> 
> diff --git a/ui/gtk.c b/ui/gtk.c
> index e816428..a216216 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1581,6 +1581,9 @@ static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2,
>                                         TRUE);
>      }
>      gtk_widget_set_sensitive(s->grab_item, on_vga);
> +#ifdef CONFIG_VTE
> +    gtk_widget_set_sensitive(s->copy_item, vc->type == GD_VC_VTE);
> +#endif
>  
>      gd_update_windowsize(vc);
>      gd_update_cursor(vc);
> @@ -2246,6 +2249,11 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover)
>      }
>  #endif
>  
> +#ifdef CONFIG_VTE
> +    gtk_widget_set_sensitive(s->copy_item,
> +                             gd_vc_find_current(s)->type == GD_VC_VTE);
> +#endif
> +
>      if (full_screen) {
>          gtk_menu_item_activate(GTK_MENU_ITEM(s->full_screen_item));
>      }
> -- 
> 2.9.3

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-14 14:25 [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault Stefan Hajnoczi
                   ` (2 preceding siblings ...)
  2016-12-14 22:49 ` Michael S. Tsirkin
@ 2016-12-15  4:35 ` Michael S. Tsirkin
  2016-12-15  7:50   ` Stefan Hajnoczi
  3 siblings, 1 reply; 25+ messages in thread
From: Michael S. Tsirkin @ 2016-12-15  4:35 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel, Kevin Wolf, Gerd Hoffmann

The problem always reproduces for me:
- start qemu with -sdl
- wait for guest to boot
- click anywhere within guest screen
- message "press ctrl+alt to exit capture" appears on screen,
  but pressing that immediately restarts capture again

Note:
- had to exit to another VT and kill qemu
- why was I able to do that?
  should not ctrl-alt-Fn be captured too?

-- 
MST

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
  2016-12-14 22:49 ` Michael S. Tsirkin
@ 2016-12-15  7:34   ` Stefan Hajnoczi
  2016-12-15  7:48   ` Stefan Hajnoczi
  2016-12-15  8:47   ` Kevin Wolf
  2 siblings, 0 replies; 25+ messages in thread
From: Stefan Hajnoczi @ 2016-12-15  7:34 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Stefan Hajnoczi, Kevin Wolf, qemu-devel, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 1025 bytes --]

On Thu, Dec 15, 2016 at 12:49:06AM +0200, Michael S. Tsirkin wrote:
> On Wed, Dec 14, 2016 at 02:25:18PM +0000, Stefan Hajnoczi wrote:
> > The "Copy" menu item copies VTE terminal text to the clipboard.  This
> > only works with VTE terminals, not with graphics consoles.
> > 
> > Disable the menu item when the current notebook page isn't a VTE
> > terminal.
> > 
> > This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
> > menu item when the guest display is visible.
> > 
> > Reported-by: Kevin Wolf <kwolf@redhat.com>
> > Cc: Michael S. Tsirkin <mst@redhat.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> I don't think it's 2.8 personally, patch just disables an
> illegal action. Similar to the hotplug crash fix I
> have queued. Just document this as a known issue.
> 
> 
> 
> BTW - any idea how to make paste work?

Maybe Gerd has a recommendation.  I have never touched GTK or VTE before
this patch.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
  2016-12-14 22:49 ` Michael S. Tsirkin
  2016-12-15  7:34   ` Stefan Hajnoczi
@ 2016-12-15  7:48   ` Stefan Hajnoczi
  2016-12-15  8:47   ` Kevin Wolf
  2 siblings, 0 replies; 25+ messages in thread
From: Stefan Hajnoczi @ 2016-12-15  7:48 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Stefan Hajnoczi, Kevin Wolf, qemu-devel, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

On Thu, Dec 15, 2016 at 12:49:06AM +0200, Michael S. Tsirkin wrote:
> On Wed, Dec 14, 2016 at 02:25:18PM +0000, Stefan Hajnoczi wrote:
> > The "Copy" menu item copies VTE terminal text to the clipboard.  This
> > only works with VTE terminals, not with graphics consoles.
> > 
> > Disable the menu item when the current notebook page isn't a VTE
> > terminal.
> > 
> > This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
> > menu item when the guest display is visible.
> > 
> > Reported-by: Kevin Wolf <kwolf@redhat.com>
> > Cc: Michael S. Tsirkin <mst@redhat.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> I don't think it's 2.8 personally, patch just disables an
> illegal action. Similar to the hotplug crash fix I
> have queued. Just document this as a known issue.

I mistakenly thought this bug was introduced in QEMU 2.8, but now that I
look back at git log I realize it already existed.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15  4:35 ` [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode Michael S. Tsirkin
@ 2016-12-15  7:50   ` Stefan Hajnoczi
  2016-12-15  9:17     ` Gerd Hoffmann
  0 siblings, 1 reply; 25+ messages in thread
From: Stefan Hajnoczi @ 2016-12-15  7:50 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Stefan Hajnoczi, Kevin Wolf, qemu-devel, Gerd Hoffmann, Cole Robinson

[-- Attachment #1: Type: text/plain, Size: 689 bytes --]

On Thu, Dec 15, 2016 at 06:35:39AM +0200, Michael S. Tsirkin wrote:
> The problem always reproduces for me:
> - start qemu with -sdl
> - wait for guest to boot
> - click anywhere within guest screen
> - message "press ctrl+alt to exit capture" appears on screen,
>   but pressing that immediately restarts capture again
> 
> Note:
> - had to exit to another VT and kill qemu
> - why was I able to do that?
>   should not ctrl-alt-Fn be captured too?

Sounds related to:

commit 56f289f383a871e871f944c7226920b35794efe6
Author: Cole Robinson <crobinso@redhat.com>
Date:   Fri May 6 14:03:06 2016 -0400

    ui: sdl2: Release grab before opening console window

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
  2016-12-14 22:49 ` Michael S. Tsirkin
  2016-12-15  7:34   ` Stefan Hajnoczi
  2016-12-15  7:48   ` Stefan Hajnoczi
@ 2016-12-15  8:47   ` Kevin Wolf
  2016-12-15  9:50     ` Stefan Hajnoczi
  2 siblings, 1 reply; 25+ messages in thread
From: Kevin Wolf @ 2016-12-15  8:47 UTC (permalink / raw)
  To: Michael S. Tsirkin; +Cc: Stefan Hajnoczi, qemu-devel, Gerd Hoffmann

Am 14.12.2016 um 23:49 hat Michael S. Tsirkin geschrieben:
> On Wed, Dec 14, 2016 at 02:25:18PM +0000, Stefan Hajnoczi wrote:
> > The "Copy" menu item copies VTE terminal text to the clipboard.  This
> > only works with VTE terminals, not with graphics consoles.
> > 
> > Disable the menu item when the current notebook page isn't a VTE
> > terminal.
> > 
> > This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
> > menu item when the guest display is visible.
> > 
> > Reported-by: Kevin Wolf <kwolf@redhat.com>
> > Cc: Michael S. Tsirkin <mst@redhat.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> 
> I don't think it's 2.8 personally, patch just disables an
> illegal action. Similar to the hotplug crash fix I
> have queued. Just document this as a known issue.

This is an immediate crash for selecting a menu entry in the default
view (which means killing a VM accidentally), we know the patch to fix
it, and it is really small. Why would we not merge something like this?
Are we making intentionally shitty releases these days?

I don't know your hotplug problem, but if it's a crash that isn't a
real corner case, that suggests that it should have been fixed. I mean,
fixing bugs is exactly what the freeze is for.

Kevin

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15  7:50   ` Stefan Hajnoczi
@ 2016-12-15  9:17     ` Gerd Hoffmann
  2016-12-15 14:55       ` Michael S. Tsirkin
  2016-12-15 15:07       ` Michael S. Tsirkin
  0 siblings, 2 replies; 25+ messages in thread
From: Gerd Hoffmann @ 2016-12-15  9:17 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: Michael S. Tsirkin, Stefan Hajnoczi, Kevin Wolf, qemu-devel,
	Cole Robinson

On Do, 2016-12-15 at 07:50 +0000, Stefan Hajnoczi wrote:
> On Thu, Dec 15, 2016 at 06:35:39AM +0200, Michael S. Tsirkin wrote:
> > The problem always reproduces for me:
> > - start qemu with -sdl
> > - wait for guest to boot
> > - click anywhere within guest screen
> > - message "press ctrl+alt to exit capture" appears on screen,
> >   but pressing that immediately restarts capture again
> > 
> > Note:
> > - had to exit to another VT and kill qemu
> > - why was I able to do that?
> >   should not ctrl-alt-Fn be captured too?
> 
> Sounds related to:
> 
> commit 56f289f383a871e871f944c7226920b35794efe6
> Author: Cole Robinson <crobinso@redhat.com>
> Date:   Fri May 6 14:03:06 2016 -0400
> 
>     ui: sdl2: Release grab before opening console window
> 
> Stefan

Doesn't look related to me, also this is in the v2.7 release already.
There are no SDL updates in 2.8.  Hmm.  /me looks a bit puzzled.

What is the known-good setup?

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault
  2016-12-15  8:47   ` Kevin Wolf
@ 2016-12-15  9:50     ` Stefan Hajnoczi
  0 siblings, 0 replies; 25+ messages in thread
From: Stefan Hajnoczi @ 2016-12-15  9:50 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Michael S. Tsirkin, qemu-devel, Stefan Hajnoczi, Gerd Hoffmann

[-- Attachment #1: Type: text/plain, Size: 2412 bytes --]

On Thu, Dec 15, 2016 at 09:47:38AM +0100, Kevin Wolf wrote:
> Am 14.12.2016 um 23:49 hat Michael S. Tsirkin geschrieben:
> > On Wed, Dec 14, 2016 at 02:25:18PM +0000, Stefan Hajnoczi wrote:
> > > The "Copy" menu item copies VTE terminal text to the clipboard.  This
> > > only works with VTE terminals, not with graphics consoles.
> > > 
> > > Disable the menu item when the current notebook page isn't a VTE
> > > terminal.
> > > 
> > > This patch fixes a segfault.  Reproducer: Start QEMU and click the Copy
> > > menu item when the guest display is visible.
> > > 
> > > Reported-by: Kevin Wolf <kwolf@redhat.com>
> > > Cc: Michael S. Tsirkin <mst@redhat.com>
> > > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > 
> > I don't think it's 2.8 personally, patch just disables an
> > illegal action. Similar to the hotplug crash fix I
> > have queued. Just document this as a known issue.
> 
> This is an immediate crash for selecting a menu entry in the default
> view (which means killing a VM accidentally), we know the patch to fix
> it, and it is really small. Why would we not merge something like this?
> Are we making intentionally shitty releases these days?
> 
> I don't know your hotplug problem, but if it's a crash that isn't a
> real corner case, that suggests that it should have been fixed. I mean,
> fixing bugs is exactly what the freeze is for.

A lot of patches are queued waiting for the 2.9 development cycle,
including bug fixes.  The reason these bug fixes aren't merged for 2.8
is because they are not release blockers and they risk introducing new
regressions.

A line must be drawn somewhere since we cannot keep delaying the release
another week while possibly introducing new regressions.

I have asked everyone, including Michael, to send only clear release
blockers (i.e. regressions, build failures, critical bugs) even if they
wanted to include more bug fixes.  I can understand that he's now
wondering why I merged this patch in -rc4.

Is this patch a regression fix?  No
Is it a build fix? No
Is it a critical bug?  Probably not since no one noticed it in 2.7.

I merged it because I misinterpreted git log output and thought it was a
regression :).

In any case, we've reached the point where nothing more goes into the
tree so that QEMU 2.8.0 can be released.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15  9:17     ` Gerd Hoffmann
@ 2016-12-15 14:55       ` Michael S. Tsirkin
  2016-12-15 16:17         ` Gerd Hoffmann
  2016-12-15 15:07       ` Michael S. Tsirkin
  1 sibling, 1 reply; 25+ messages in thread
From: Michael S. Tsirkin @ 2016-12-15 14:55 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

On Thu, Dec 15, 2016 at 10:17:59AM +0100, Gerd Hoffmann wrote:
> On Do, 2016-12-15 at 07:50 +0000, Stefan Hajnoczi wrote:
> > On Thu, Dec 15, 2016 at 06:35:39AM +0200, Michael S. Tsirkin wrote:
> > > The problem always reproduces for me:
> > > - start qemu with -sdl
> > > - wait for guest to boot
> > > - click anywhere within guest screen
> > > - message "press ctrl+alt to exit capture" appears on screen,
> > >   but pressing that immediately restarts capture again
> > > 
> > > Note:
> > > - had to exit to another VT and kill qemu
> > > - why was I able to do that?
> > >   should not ctrl-alt-Fn be captured too?
> > 
> > Sounds related to:
> > 
> > commit 56f289f383a871e871f944c7226920b35794efe6
> > Author: Cole Robinson <crobinso@redhat.com>
> > Date:   Fri May 6 14:03:06 2016 -0400
> > 
> >     ui: sdl2: Release grab before opening console window
> > 
> > Stefan
> 
> Doesn't look related to me, also this is in the v2.7 release already.
> There are no SDL updates in 2.8.  Hmm.  /me looks a bit puzzled.
> 
> What is the known-good setup?
> 
> cheers,
>   Gerd


Testing it now.

BTW I note that on f23, build of 2.7 fails since it uses
deprecated APIs from gtk. Easy to work around with --disable-werror,
but I wonder whether we should add --disable-werror in release tarballs
generally.

-- 
MST

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15  9:17     ` Gerd Hoffmann
  2016-12-15 14:55       ` Michael S. Tsirkin
@ 2016-12-15 15:07       ` Michael S. Tsirkin
  2016-12-15 16:25         ` Gerd Hoffmann
  1 sibling, 1 reply; 25+ messages in thread
From: Michael S. Tsirkin @ 2016-12-15 15:07 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

On Thu, Dec 15, 2016 at 10:17:59AM +0100, Gerd Hoffmann wrote:
> On Do, 2016-12-15 at 07:50 +0000, Stefan Hajnoczi wrote:
> > On Thu, Dec 15, 2016 at 06:35:39AM +0200, Michael S. Tsirkin wrote:
> > > The problem always reproduces for me:
> > > - start qemu with -sdl
> > > - wait for guest to boot
> > > - click anywhere within guest screen
> > > - message "press ctrl+alt to exit capture" appears on screen,
> > >   but pressing that immediately restarts capture again
> > > 
> > > Note:
> > > - had to exit to another VT and kill qemu
> > > - why was I able to do that?
> > >   should not ctrl-alt-Fn be captured too?
> > 
> > Sounds related to:
> > 
> > commit 56f289f383a871e871f944c7226920b35794efe6
> > Author: Cole Robinson <crobinso@redhat.com>
> > Date:   Fri May 6 14:03:06 2016 -0400
> > 
> >     ui: sdl2: Release grab before opening console window
> > 
> > Stefan
> 
> Doesn't look related to me, also this is in the v2.7 release already.
> There are no SDL updates in 2.8.  Hmm.  /me looks a bit puzzled.
> 
> What is the known-good setup?
> 
> cheers,
>   Gerd



2.7 has the same bug (requires --disable-werror to build).
2.6 works fine (requires --with-sdlabi=2.0 to build).

I only tested --target-list=x86_64-softmmu .

I'd say SDL is mostly useless with this bug.

Do we fix this or disable SDL altogether?

-- 
MST

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 14:55       ` Michael S. Tsirkin
@ 2016-12-15 16:17         ` Gerd Hoffmann
  0 siblings, 0 replies; 25+ messages in thread
From: Gerd Hoffmann @ 2016-12-15 16:17 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

  Hi,

> BTW I note that on f23, build of 2.7 fails since it uses
> deprecated APIs from gtk. Easy to work around with --disable-werror,
> but I wonder whether we should add --disable-werror in release tarballs
> generally.

That is the case already.  configure checks you are building from a git
tree or not, and only for git tree builds werror is enabled by default.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 15:07       ` Michael S. Tsirkin
@ 2016-12-15 16:25         ` Gerd Hoffmann
  2016-12-15 19:15           ` Michael S. Tsirkin
  2016-12-15 22:30           ` Michael S. Tsirkin
  0 siblings, 2 replies; 25+ messages in thread
From: Gerd Hoffmann @ 2016-12-15 16:25 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

  Hi,

> > > > The problem always reproduces for me:
> > > > - start qemu with -sdl
> > > > - wait for guest to boot
> > > > - click anywhere within guest screen
> > > > - message "press ctrl+alt to exit capture" appears on screen,
> > > >   but pressing that immediately restarts capture again

[ 2.6 good, 2.7, 2.8 bad ]

> I'd say SDL is mostly useless with this bug.
> 
> Do we fix this or disable SDL altogether?

Well, it can't be *that* bad, otherwise it would not went unnoticed for
a whole release cycle.

It doesn't reproduce here.  There must be some other factor which is
needed to trigger this.  What desktop you are using?  gnome?  kde?
something else?  Xorg or wayland?

Can you try to bisect it?

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 16:25         ` Gerd Hoffmann
@ 2016-12-15 19:15           ` Michael S. Tsirkin
  2016-12-15 19:19             ` Michael S. Tsirkin
  2016-12-15 22:30           ` Michael S. Tsirkin
  1 sibling, 1 reply; 25+ messages in thread
From: Michael S. Tsirkin @ 2016-12-15 19:15 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

On Thu, Dec 15, 2016 at 05:25:50PM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> > > > > The problem always reproduces for me:
> > > > > - start qemu with -sdl
> > > > > - wait for guest to boot
> > > > > - click anywhere within guest screen
> > > > > - message "press ctrl+alt to exit capture" appears on screen,
> > > > >   but pressing that immediately restarts capture again
> 
> [ 2.6 good, 2.7, 2.8 bad ]
> 
> > I'd say SDL is mostly useless with this bug.
> > 
> > Do we fix this or disable SDL altogether?
> 
> Well, it can't be *that* bad, otherwise it would not went unnoticed for
> a whole release cycle.

That's what I'm saying, maybe no one uses SDL anymore.

> It doesn't reproduce here.

Are you on Fedora 25 too?

> There must be some other factor which is
> needed to trigger this.  What desktop you are using?  gnome?  kde?
> something else?

XFCE

>  Xorg or wayland?

Xorg

> Can you try to bisect it?
> 
> cheers,
>   Gerd


Trying to.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 19:15           ` Michael S. Tsirkin
@ 2016-12-15 19:19             ` Michael S. Tsirkin
  2016-12-16  8:26               ` Thomas Huth
  2016-12-16  9:48               ` Gerd Hoffmann
  0 siblings, 2 replies; 25+ messages in thread
From: Michael S. Tsirkin @ 2016-12-15 19:19 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

On Thu, Dec 15, 2016 at 09:15:27PM +0200, Michael S. Tsirkin wrote:
> On Thu, Dec 15, 2016 at 05:25:50PM +0100, Gerd Hoffmann wrote:
> >   Hi,
> > 
> > > > > > The problem always reproduces for me:
> > > > > > - start qemu with -sdl
> > > > > > - wait for guest to boot
> > > > > > - click anywhere within guest screen
> > > > > > - message "press ctrl+alt to exit capture" appears on screen,
> > > > > >   but pressing that immediately restarts capture again
> > 
> > [ 2.6 good, 2.7, 2.8 bad ]
> > 
> > > I'd say SDL is mostly useless with this bug.
> > > 
> > > Do we fix this or disable SDL altogether?
> > 
> > Well, it can't be *that* bad, otherwise it would not went unnoticed for
> > a whole release cycle.
> 
> That's what I'm saying, maybe no one uses SDL anymore.
> 
> > It doesn't reproduce here.
> 
> Are you on Fedora 25 too?
> 
> > There must be some other factor which is
> > needed to trigger this.  What desktop you are using?  gnome?  kde?
> > something else?
> 
> XFCE
> 
> >  Xorg or wayland?
> 
> Xorg
> 
> > Can you try to bisect it?
> > 
> > cheers,
> >   Gerd
> 
> 
> Trying to.


One strange thing - I only see it when guest is in graphical mode.
If guest is in text mode it works ok.
Command line:

./x86_64-softmmu/qemu-system-x86_64 -enable-kvm -m 1000 -cpu host -smp 2
/home/mst/images/f20-x64.qcow2 -netdev user,id=foo -redir tcp:8022::22
-device virtio-net,netdev=foo -kernel /boot/vmlinuz-${release} -initrd
/boot/initramfs-${release}.img -append 'root=/dev/sda3 ro
vconsole.font=latarcyrheb-sun16  rhgb noquiet LANG=en_US.UTF-8
console=tty0 console=ttyS0,9600n8,9600n8' -sdl

so nothing special.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 16:25         ` Gerd Hoffmann
  2016-12-15 19:15           ` Michael S. Tsirkin
@ 2016-12-15 22:30           ` Michael S. Tsirkin
  2016-12-16  9:27             ` Kevin Wolf
  2016-12-16  9:36             ` Gerd Hoffmann
  1 sibling, 2 replies; 25+ messages in thread
From: Michael S. Tsirkin @ 2016-12-15 22:30 UTC (permalink / raw)
  To: Gerd Hoffmann
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

On Thu, Dec 15, 2016 at 05:25:50PM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> > > > > The problem always reproduces for me:
> > > > > - start qemu with -sdl
> > > > > - wait for guest to boot
> > > > > - click anywhere within guest screen
> > > > > - message "press ctrl+alt to exit capture" appears on screen,
> > > > >   but pressing that immediately restarts capture again
> 
> [ 2.6 good, 2.7, 2.8 bad ]
> 
> > I'd say SDL is mostly useless with this bug.
> > 
> > Do we fix this or disable SDL altogether?
> 
> Well, it can't be *that* bad, otherwise it would not went unnoticed for
> a whole release cycle.
> 
> It doesn't reproduce here.  There must be some other factor which is
> needed to trigger this.  What desktop you are using?  gnome?  kde?
> something else?  Xorg or wayland?
> 
> Can you try to bisect it?
> 
> cheers,
>   Gerd


Looks like 2.6 does not work either :( Gerd, are you using F25?
Steps
- launch fedora guest with kvm, default pc graphics and SDL ui
- wait until graphical login prompt starts
- click within window

afterwards, clicking Ctrl-Alt exits and immediately restarts grab.



-- 
MST

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 19:19             ` Michael S. Tsirkin
@ 2016-12-16  8:26               ` Thomas Huth
  2016-12-16  8:45                 ` Liviu Ionescu
  2016-12-16  9:00                 ` Kevin Wolf
  2016-12-16  9:48               ` Gerd Hoffmann
  1 sibling, 2 replies; 25+ messages in thread
From: Thomas Huth @ 2016-12-16  8:26 UTC (permalink / raw)
  To: Michael S. Tsirkin, Gerd Hoffmann
  Cc: Kevin Wolf, Stefan Hajnoczi, qemu-devel, Stefan Hajnoczi, Cole Robinson

On 15.12.2016 20:19, Michael S. Tsirkin wrote:
> On Thu, Dec 15, 2016 at 09:15:27PM +0200, Michael S. Tsirkin wrote:
>> On Thu, Dec 15, 2016 at 05:25:50PM +0100, Gerd Hoffmann wrote:
>>>   Hi,
>>>
>>>>>>> The problem always reproduces for me:
>>>>>>> - start qemu with -sdl
>>>>>>> - wait for guest to boot
>>>>>>> - click anywhere within guest screen
>>>>>>> - message "press ctrl+alt to exit capture" appears on screen,
>>>>>>>   but pressing that immediately restarts capture again
>>>
>>> [ 2.6 good, 2.7, 2.8 bad ]
>>>
>>>> I'd say SDL is mostly useless with this bug.
>>>>
>>>> Do we fix this or disable SDL altogether?
>>>
>>> Well, it can't be *that* bad, otherwise it would not went unnoticed for
>>> a whole release cycle.
>>
>> That's what I'm saying, maybe no one uses SDL anymore.

It's maybe not as common as the GTK interface, but as far as I know
people still use the SDL interface. For example here:

 https://bugs.launchpad.net/qemu/+bug/922076

... so I would recommend to keep the SDL code in QEMU.

 Thomas

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-16  8:26               ` Thomas Huth
@ 2016-12-16  8:45                 ` Liviu Ionescu
  2016-12-16  9:00                 ` Kevin Wolf
  1 sibling, 0 replies; 25+ messages in thread
From: Liviu Ionescu @ 2016-12-16  8:45 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Michael S. Tsirkin, Gerd Hoffmann, Kevin Wolf, Stefan Hajnoczi,
	qemu-devel, Stefan Hajnoczi, Cole Robinson


> On 16 Dec 2016, at 10:26, Thomas Huth <thuth@redhat.com> wrote:
> 
> ... so I would recommend to keep the SDL code in QEMU.

SDL 1.2 is largely deprecated now, when I upgraded to macOS 10.12 I suddenly started to have various problems. so I decided to upgrade GNU ARM Eclipse to SDL 2. 

if all graphic calls are performed on the main thread, SDL2 is fine. if not, it crashes.


regards,

Liviu

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-16  8:26               ` Thomas Huth
  2016-12-16  8:45                 ` Liviu Ionescu
@ 2016-12-16  9:00                 ` Kevin Wolf
  2016-12-16  9:21                   ` Howard Spoelstra
  1 sibling, 1 reply; 25+ messages in thread
From: Kevin Wolf @ 2016-12-16  9:00 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Michael S. Tsirkin, Gerd Hoffmann, Stefan Hajnoczi, qemu-devel,
	Stefan Hajnoczi, Cole Robinson

Am 16.12.2016 um 09:26 hat Thomas Huth geschrieben:
> On 15.12.2016 20:19, Michael S. Tsirkin wrote:
> > On Thu, Dec 15, 2016 at 09:15:27PM +0200, Michael S. Tsirkin wrote:
> >> On Thu, Dec 15, 2016 at 05:25:50PM +0100, Gerd Hoffmann wrote:
> >>>> Do we fix this or disable SDL altogether?
> >>>
> >>> Well, it can't be *that* bad, otherwise it would not went unnoticed for
> >>> a whole release cycle.
> >>
> >> That's what I'm saying, maybe no one uses SDL anymore.
> 
> It's maybe not as common as the GTK interface, but as far as I know
> people still use the SDL interface. For example here:
> 
>  https://bugs.launchpad.net/qemu/+bug/922076
> 
> ... so I would recommend to keep the SDL code in QEMU.

When I actualy use qemu rather than just doing a quick test, I generally
prefer SDL, too, because the GTK frontend still grabs some keys like F10
for itself instead of passing them to the guest. And using HMP for
something as simple as that - no, thanks.

Kevin

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-16  9:00                 ` Kevin Wolf
@ 2016-12-16  9:21                   ` Howard Spoelstra
  0 siblings, 0 replies; 25+ messages in thread
From: Howard Spoelstra @ 2016-12-16  9:21 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: Thomas Huth, Michael S. Tsirkin, Stefan Hajnoczi,
	qemu-devel qemu-devel, Gerd Hoffmann, Stefan Hajnoczi,
	Cole Robinson

On Fri, Dec 16, 2016 at 10:00 AM, Kevin Wolf <kwolf@redhat.com> wrote:
> Am 16.12.2016 um 09:26 hat Thomas Huth geschrieben:
>> On 15.12.2016 20:19, Michael S. Tsirkin wrote:
>> > On Thu, Dec 15, 2016 at 09:15:27PM +0200, Michael S. Tsirkin wrote:
>> >> On Thu, Dec 15, 2016 at 05:25:50PM +0100, Gerd Hoffmann wrote:
>> >>>> Do we fix this or disable SDL altogether?
>> >>>
>> >>> Well, it can't be *that* bad, otherwise it would not went unnoticed for
>> >>> a whole release cycle.
>> >>
>> >> That's what I'm saying, maybe no one uses SDL anymore.
>>
>> It's maybe not as common as the GTK interface, but as far as I know
>> people still use the SDL interface. For example here:
>>
>>  https://bugs.launchpad.net/qemu/+bug/922076
>>
>> ... so I would recommend to keep the SDL code in QEMU.
>
> When I actualy use qemu rather than just doing a quick test, I generally
> prefer SDL, too, because the GTK frontend still grabs some keys like F10
> for itself instead of passing them to the guest. And using HMP for
> something as simple as that - no, thanks.
>
> Kevin
>

I'd like to also point to the recent status report by Stefan Weil
concerning UI support in Windows builds:
http://lists.nongnu.org/archive/html/qemu-devel/2016-12/msg01383.html

At least for PPC Mac OS/OSX guests only the SDL1.2 UI is somewhat
usable, GTK2/3, SDL2 and VNC are all problematic.

Best,
Howard

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 22:30           ` Michael S. Tsirkin
@ 2016-12-16  9:27             ` Kevin Wolf
  2016-12-16  9:36             ` Gerd Hoffmann
  1 sibling, 0 replies; 25+ messages in thread
From: Kevin Wolf @ 2016-12-16  9:27 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Gerd Hoffmann, Stefan Hajnoczi, Stefan Hajnoczi, qemu-devel,
	Cole Robinson

Am 15.12.2016 um 23:30 hat Michael S. Tsirkin geschrieben:
> On Thu, Dec 15, 2016 at 05:25:50PM +0100, Gerd Hoffmann wrote:
> >   Hi,
> > 
> > > > > > The problem always reproduces for me:
> > > > > > - start qemu with -sdl
> > > > > > - wait for guest to boot
> > > > > > - click anywhere within guest screen
> > > > > > - message "press ctrl+alt to exit capture" appears on screen,
> > > > > >   but pressing that immediately restarts capture again
> > 
> > [ 2.6 good, 2.7, 2.8 bad ]
> > 
> > > I'd say SDL is mostly useless with this bug.
> > > 
> > > Do we fix this or disable SDL altogether?
> > 
> > Well, it can't be *that* bad, otherwise it would not went unnoticed for
> > a whole release cycle.
> > 
> > It doesn't reproduce here.  There must be some other factor which is
> > needed to trigger this.  What desktop you are using?  gnome?  kde?
> > something else?  Xorg or wayland?
> > 
> > Can you try to bisect it?
> 
> Looks like 2.6 does not work either :( Gerd, are you using F25?
> Steps
> - launch fedora guest with kvm, default pc graphics and SDL ui
> - wait until graphical login prompt starts
> - click within window
> 
> afterwards, clicking Ctrl-Alt exits and immediately restarts grab.

I'm seeing two different behaviours depending on the guest:

The first is the traditional behaviour where you click in the window, it
grabs and you control the guest's mouse cursor, and here ctrl+alt works
fine to ungrab.

The second one is much like with the tablet in that it shared the mouse
cursor between host and guest. In this one, when I ungrab with ctrl+alt,
it automatically grabs again as soon as I move the mouse cursor (i.e. it
is actually ungrabbed if I only use the keyboard). But as the mouse
cursor is shared with the host, I can simply move it out of the VM
window and then the capture ends, so that's fine.

So for me that's exactly what I want it to do (RHEL 7 host with qemu.git
master). Is what you got the second behaviour, but without the shared
mouse cursor?

Kevin

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 22:30           ` Michael S. Tsirkin
  2016-12-16  9:27             ` Kevin Wolf
@ 2016-12-16  9:36             ` Gerd Hoffmann
  1 sibling, 0 replies; 25+ messages in thread
From: Gerd Hoffmann @ 2016-12-16  9:36 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

> > [ 2.6 good, 2.7, 2.8 bad ]

> > It doesn't reproduce here.  There must be some other factor which is
> > needed to trigger this.  What desktop you are using?  gnome?  kde?
> > something else?  Xorg or wayland?
> > 
> > Can you try to bisect it?
> > 
> > cheers,
> >   Gerd
> 
> 
> Looks like 2.6 does not work either :(

That is in line with my assumption that there must be something else
needed in addition to trigger it.  Maybe it happens on F25 only and F24
used to work fine for you?

> Gerd, are you using F25?

RHEL-7 with gnome here.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode
  2016-12-15 19:19             ` Michael S. Tsirkin
  2016-12-16  8:26               ` Thomas Huth
@ 2016-12-16  9:48               ` Gerd Hoffmann
  1 sibling, 0 replies; 25+ messages in thread
From: Gerd Hoffmann @ 2016-12-16  9:48 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: Stefan Hajnoczi, Stefan Hajnoczi, Kevin Wolf, qemu-devel, Cole Robinson

  Hi,

> One strange thing - I only see it when guest is in graphical mode.
> If guest is in text mode it works ok.

grabbing works slightly different depending on whenever the mouse is in
absolute or relative mode, which is probably the reason for that.

With absolute mouse mode being active (using vmmouse or usb-tablet or
virtio-tablet) SDL grabs the keyboard if the mouse is within the qemu
window, and ungrabs if the mouse leaves the window.  Ungrab keyboard via
Ctrl-Alt still works for me, until you wiggle the mouse next time.  But
that is good enough to send specific keys to the host, i.e. just
pressing the window key sends it to the guest, and I see the gnome
window overview in the guest.  Pressing Ctrl-Alt, then the window key
shows the host gnome window overview.

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2016-12-16  9:49 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 14:25 [Qemu-devel] [PATCH for-2.8] ui/gtk: fix "Copy" menu item segfault Stefan Hajnoczi
2016-12-14 14:35 ` Stefan Weil
2016-12-14 15:15 ` Gerd Hoffmann
2016-12-14 22:49 ` Michael S. Tsirkin
2016-12-15  7:34   ` Stefan Hajnoczi
2016-12-15  7:48   ` Stefan Hajnoczi
2016-12-15  8:47   ` Kevin Wolf
2016-12-15  9:50     ` Stefan Hajnoczi
2016-12-15  4:35 ` [Qemu-devel] regression in 2.8: unable to exit screen grab in SDL mode Michael S. Tsirkin
2016-12-15  7:50   ` Stefan Hajnoczi
2016-12-15  9:17     ` Gerd Hoffmann
2016-12-15 14:55       ` Michael S. Tsirkin
2016-12-15 16:17         ` Gerd Hoffmann
2016-12-15 15:07       ` Michael S. Tsirkin
2016-12-15 16:25         ` Gerd Hoffmann
2016-12-15 19:15           ` Michael S. Tsirkin
2016-12-15 19:19             ` Michael S. Tsirkin
2016-12-16  8:26               ` Thomas Huth
2016-12-16  8:45                 ` Liviu Ionescu
2016-12-16  9:00                 ` Kevin Wolf
2016-12-16  9:21                   ` Howard Spoelstra
2016-12-16  9:48               ` Gerd Hoffmann
2016-12-15 22:30           ` Michael S. Tsirkin
2016-12-16  9:27             ` Kevin Wolf
2016-12-16  9:36             ` Gerd Hoffmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.