Skip to contentSkip to conversation

Ui 20171117 patches

GIT PULL Applied Gerd Hoffmann 2 participants 7 messages Nov 17, 2017

lore
Share & tools
lore
#0 lore raw

The following changes since commit 1fa0f627d03cd0d0755924247cafeb42969016bf:

Update version for v2.11.0-rc1 release (2017-11-14 18:37:49 +0000)

are available in the git repository at:

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

for you to fetch changes up to bcf43cdc178ffbd06d0533b6c54e92640817c9c7:

sdl2: Fix broken display updating after the window is hidden (2017-11-16 09:57:47 +0100)

----------------------------------------------------------------
sdl2 fixes for 2.11

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

Jindrich Makovicka (5):
sdl2: Do not quit the emulator when an auxilliary window is closed
sdl2: Use the same pointer show/hide logic for absolute and relative
mode
sdl2: Fix dead keyboard after fullsceen
sdl2: Do not leave grab when fullscreen
sdl2: Fix broken display updating after the window is hidden

 ui/sdl2.c | 51 ++++++++++++++++++++++++++++-----------------------
 1 file changed, 28 insertions(+), 23 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

[Qemu-devel] [PULL 2/5] sdl2: Use the same pointer show/hide logic for absolute and relative mode

From: Jindrich Makovicka <[email protected]>

Also use a proper enum parameter for SDL_ShowCursor

Message-Id: <[email protected]>

---
 ui/sdl2.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
ui/sdl2.c +13 -11
index 05729af971..d0f16f60f4 100644
@@ -169,10 +169,10 @@ static void sdl_hide_cursor(void)
         return;
     }
 
-    if (qemu_input_is_absolute()) {
-        SDL_ShowCursor(1);
-        SDL_SetCursor(sdl_cursor_hidden);
-    } else {
+    SDL_ShowCursor(SDL_DISABLE);
+    SDL_SetCursor(sdl_cursor_hidden);
+
+    if (!qemu_input_is_absolute()) {
         SDL_SetRelativeMouseMode(SDL_TRUE);
     }
 }
@@ -185,14 +185,16 @@ static void sdl_show_cursor(void)
 
     if (!qemu_input_is_absolute()) {
         SDL_SetRelativeMouseMode(SDL_FALSE);
-        SDL_ShowCursor(1);
-        if (guest_cursor &&
-            (gui_grab || qemu_input_is_absolute() || absolute_enabled)) {
-            SDL_SetCursor(guest_sprite);
-        } else {
-            SDL_SetCursor(sdl_cursor_normal);
-        }
     }
+
+    if (guest_cursor &&
+        (gui_grab || qemu_input_is_absolute() || absolute_enabled)) {
+        SDL_SetCursor(guest_sprite);
+    } else {
+        SDL_SetCursor(sdl_cursor_normal);
+    }
+
+    SDL_ShowCursor(SDL_ENABLE);
 }
 
 static void sdl_grab_start(struct sdl2_console *scon)
Signature · 1 line
2.9.3
#2 lore raw

[Qemu-devel] [PULL 3/5] sdl2: Fix dead keyboard after fullsceen

In reply to Gerd Hoffmann

From: Jindrich Makovicka <[email protected]>

Message-Id: <[email protected]>

---
 ui/sdl2.c | 1 +
 1 file changed, 1 insertion(+)
ui/sdl2.c +1 -0
index d0f16f60f4..cf05214f97 100644
@@ -442,6 +442,7 @@ static void handle_keyup(SDL_Event *ev)
             sdl2_reset_keys(scon);
             return;
         }
+        sdl2_reset_keys(scon);
         gui_keysym = 0;
     }
     if (!gui_keysym) {
Signature · 1 line
2.9.3
#3 lore raw

[Qemu-devel] [PULL 4/5] sdl2: Do not leave grab when fullscreen

In reply to Gerd Hoffmann

From: Jindrich Makovicka <[email protected]>

Prevents displaying of a doubled mouse pointer when moving the pointer to the screen edges when fullscreen.

Message-Id: <[email protected]>

---
 ui/sdl2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
ui/sdl2.c +3 -2
index cf05214f97..8360054094 100644
@@ -471,8 +471,9 @@ static void handle_mousemotion(SDL_Event *ev)
         SDL_GetWindowSize(scon->real_window, &scr_w, &scr_h);
         max_x = scr_w - 1;
         max_y = scr_h - 1;
-        if (gui_grab && (ev->motion.x == 0 || ev->motion.y == 0 ||
-                         ev->motion.x == max_x || ev->motion.y == max_y)) {
+        if (gui_grab && !gui_fullscreen
+            && (ev->motion.x == 0 || ev->motion.y == 0 ||
+                ev->motion.x == max_x || ev->motion.y == max_y)) {
             sdl_grab_end(scon);
         }
         if (!gui_grab &&
Signature · 1 line
2.9.3
#4 lore raw

[Qemu-devel] [PULL 5/5] sdl2: Fix broken display updating after the window is hidden

In reply to Gerd Hoffmann

From: Jindrich Makovicka <[email protected]>

With SDL 2.0.6, calling SDL_ShowWindow during SDL_WINDOWEVENT_HIDDEN blocks all subsequent display updates.

Instead of trying to override the change, just update the scon->hidden flag.

Message-Id: <[email protected]>

This is a partial revert of d3f3a0f453ea590be529079ae214c200bb5ecc1a, which in turn is a workaround for a SDL bug. The bug is fixed in 2.0.6, see https://bugzilla.libsdl.org/show_bug.cgi?id=3410

---
 ui/sdl2.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
ui/sdl2.c +2 -6
index 8360054094..8718cf36b5 100644
@@ -581,14 +581,10 @@ static void handle_windowevent(SDL_Event *ev)
         }
         break;
     case SDL_WINDOWEVENT_SHOWN:
-        if (scon->hidden) {
-            SDL_HideWindow(scon->real_window);
-        }
+        scon->hidden = false;
         break;
     case SDL_WINDOWEVENT_HIDDEN:
-        if (!scon->hidden) {
-            SDL_ShowWindow(scon->real_window);
-        }
+        scon->hidden = true;
         break;
     }
 }
Signature · 1 line
2.9.3
#5 lore raw

[Qemu-devel] [PULL 1/5] sdl2: Do not quit the emulator when an auxilliary window is closed

In reply to Gerd Hoffmann

From: Jindrich Makovicka <[email protected]>

Message-Id: <[email protected]>

---
 ui/sdl2.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
ui/sdl2.c +8 -3
index 53dd447fd2..05729af971 100644
@@ -566,9 +566,14 @@ static void handle_windowevent(SDL_Event *ev)
         update_displaychangelistener(&scon->dcl, 500);
         break;
     case SDL_WINDOWEVENT_CLOSE:
-        if (!no_quit) {
-            no_shutdown = 0;
-            qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
+        if (qemu_console_is_graphic(scon->dcl.con)) {
+            if (!no_quit) {
+                no_shutdown = 0;
+                qemu_system_shutdown_request(SHUTDOWN_CAUSE_HOST_UI);
+            }
+        } else {
+            SDL_HideWindow(scon->real_window);
+            scon->hidden = true;
         }
         break;
     case SDL_WINDOWEVENT_SHOWN:
Signature · 1 line
2.9.3
#6 lore raw
In reply to Gerd Hoffmann
Quoted 8 lines · Gerd Hoffmann

The following changes since commit 1fa0f627d03cd0d0755924247cafeb42969016bf:

Update version for v2.11.0-rc1 release (2017-11-14 18:37:49 +0000)

are available in the git repository at:

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

Quoted 8 lines

for you to fetch changes up to bcf43cdc178ffbd06d0533b6c54e92640817c9c7:

sdl2: Fix broken display updating after the window is hidden (2017-11-16 09:57:47 +0100)

----------------------------------------------------------------
sdl2 fixes for 2.11

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

Applied, thanks.

-- PMM