qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/2] Ui 20200515 patches
@ 2020-05-15  8:21 Gerd Hoffmann
  2020-05-15  8:21 ` [PULL 1/2] ui: improve -show-cursor deprecation message Gerd Hoffmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2020-05-15  8:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Gerd Hoffmann

The following changes since commit d5c75ec500d96f1d93447f990cd5a4ef5ba27fae:

  Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2020-05-08-1' into staging (2020-05-12 17:00:10 +0100)

are available in the Git repository at:

  git://git.kraxel.org/qemu tags/ui-20200515-pull-request

for you to fetch changes up to 32ec9839d89d2b814ada20b041b25feae23596bc:

  ui/sdl2: fix segment fault caused by null pointer dereference (2020-05-14 14:26:42 +0200)

----------------------------------------------------------------
ui: sdl bugfix, -show-cursor deprecation message

----------------------------------------------------------------

Changbin Du (1):
  ui/sdl2: fix segment fault caused by null pointer dereference

Gerd Hoffmann (1):
  ui: improve -show-cursor deprecation message

 softmmu/vl.c |  6 ++++--
 ui/sdl2.c    | 12 ++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

-- 
2.18.4



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

* [PULL 1/2] ui: improve -show-cursor deprecation message
  2020-05-15  8:21 [PULL 0/2] Ui 20200515 patches Gerd Hoffmann
@ 2020-05-15  8:21 ` Gerd Hoffmann
  2020-05-15  8:21 ` [PULL 2/2] ui/sdl2: fix segment fault caused by null pointer dereference Gerd Hoffmann
  2020-05-15 12:42 ` [PULL 0/2] Ui 20200515 patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2020-05-15  8:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Gerd Hoffmann

Specifically explain what users should do in case they don't use
-display yet and depend on the qemu picking the ui for them.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200407093617.10058-1-kraxel@redhat.com
---
 softmmu/vl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index afd2615fb325..63eeb6ae1bdb 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -3531,8 +3531,10 @@ void qemu_init(int argc, char **argv, char **envp)
                 no_shutdown = 1;
                 break;
             case QEMU_OPTION_show_cursor:
-                warn_report("The -show-cursor option is deprecated, "
-                            "use -display {sdl,gtk},show-cursor=on instead");
+                warn_report("The -show-cursor option is deprecated. Please "
+                            "add show-cursor=on to your -display options.");
+                warn_report("When using the default display you can use "
+                            "-display default,show-cursor=on");
                 dpy.has_show_cursor = true;
                 dpy.show_cursor = true;
                 break;
-- 
2.18.4



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

* [PULL 2/2] ui/sdl2: fix segment fault caused by null pointer dereference
  2020-05-15  8:21 [PULL 0/2] Ui 20200515 patches Gerd Hoffmann
  2020-05-15  8:21 ` [PULL 1/2] ui: improve -show-cursor deprecation message Gerd Hoffmann
@ 2020-05-15  8:21 ` Gerd Hoffmann
  2020-05-15 12:42 ` [PULL 0/2] Ui 20200515 patches Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2020-05-15  8:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Gerd Hoffmann, Changbin Du

From: Changbin Du <changbin.du@gmail.com>

I found SDL_GetWindowFromID() sometimes return NULL when I start qemu via
ssh forwarding even the window has been crated already. I am not sure
whether this is a bug of SDL, but we'd better check it carefully.

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Message-id: 20200427132412.17909-1-changbin.du@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/sdl2.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 3c9424eb42c3..61c7956da334 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -332,6 +332,10 @@ static void handle_keydown(SDL_Event *ev)
     int gui_key_modifier_pressed = get_mod_state();
     int gui_keysym = 0;
 
+    if (!scon) {
+        return;
+    }
+
     if (!scon->ignore_hotkeys && gui_key_modifier_pressed && !ev->key.repeat) {
         switch (ev->key.keysym.scancode) {
         case SDL_SCANCODE_2:
@@ -412,6 +416,10 @@ static void handle_keyup(SDL_Event *ev)
 {
     struct sdl2_console *scon = get_scon_from_window(ev->key.windowID);
 
+    if (!scon) {
+        return;
+    }
+
     scon->ignore_hotkeys = false;
     sdl2_process_key(scon, &ev->key);
 }
@@ -421,6 +429,10 @@ static void handle_textinput(SDL_Event *ev)
     struct sdl2_console *scon = get_scon_from_window(ev->text.windowID);
     QemuConsole *con = scon ? scon->dcl.con : NULL;
 
+    if (!con) {
+        return;
+    }
+
     if (qemu_console_is_graphic(con)) {
         return;
     }
-- 
2.18.4



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

* Re: [PULL 0/2] Ui 20200515 patches
  2020-05-15  8:21 [PULL 0/2] Ui 20200515 patches Gerd Hoffmann
  2020-05-15  8:21 ` [PULL 1/2] ui: improve -show-cursor deprecation message Gerd Hoffmann
  2020-05-15  8:21 ` [PULL 2/2] ui/sdl2: fix segment fault caused by null pointer dereference Gerd Hoffmann
@ 2020-05-15 12:42 ` Peter Maydell
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2020-05-15 12:42 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: Paolo Bonzini, QEMU Developers

On Fri, 15 May 2020 at 09:22, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> The following changes since commit d5c75ec500d96f1d93447f990cd5a4ef5ba27fae:
>
>   Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2020-05-08-1' into staging (2020-05-12 17:00:10 +0100)
>
> are available in the Git repository at:
>
>   git://git.kraxel.org/qemu tags/ui-20200515-pull-request
>
> for you to fetch changes up to 32ec9839d89d2b814ada20b041b25feae23596bc:
>
>   ui/sdl2: fix segment fault caused by null pointer dereference (2020-05-14 14:26:42 +0200)
>
> ----------------------------------------------------------------
> ui: sdl bugfix, -show-cursor deprecation message
>


Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1
for any user-visible changes.

-- PMM


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

end of thread, other threads:[~2020-05-15 12:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-15  8:21 [PULL 0/2] Ui 20200515 patches Gerd Hoffmann
2020-05-15  8:21 ` [PULL 1/2] ui: improve -show-cursor deprecation message Gerd Hoffmann
2020-05-15  8:21 ` [PULL 2/2] ui/sdl2: fix segment fault caused by null pointer dereference Gerd Hoffmann
2020-05-15 12:42 ` [PULL 0/2] Ui 20200515 patches Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).