[Qemu-devel] [PATCH] ui/cocoa.m: Fix console selection keys

John Arbuckle posted 1 patch 6 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171005190449.15591-1-programmingkidx@gmail.com
Test checkpatch passed
Test docker passed
Test s390x passed
ui/cocoa.m | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] ui/cocoa.m: Fix console selection keys
Posted by John Arbuckle 6 years, 6 months ago
Fix console selection keys so that the right console is selected. 

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
 ui/cocoa.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 93e56d0518..2794f60b27 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -631,7 +631,7 @@ - (void) handleEvent:(NSEvent *)event
 
                     // enable graphic console
                     case Q_KEY_CODE_1 ... Q_KEY_CODE_9: // '1' to '9' keys
-                        console_select(keycode - 11);
+                        console_select(keycode - Q_KEY_CODE_1);
                         break;
                 }
 
-- 
2.13.5 (Apple Git-94)


Re: [Qemu-devel] [PATCH] ui/cocoa.m: Fix console selection keys
Posted by Peter Maydell 6 years, 5 months ago
On 5 October 2017 at 20:04, John Arbuckle <programmingkidx@gmail.com> wrote:
> Fix console selection keys so that the right console is selected.
>
> Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
> ---
>  ui/cocoa.m | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ui/cocoa.m b/ui/cocoa.m
> index 93e56d0518..2794f60b27 100644
> --- a/ui/cocoa.m
> +++ b/ui/cocoa.m
> @@ -631,7 +631,7 @@ - (void) handleEvent:(NSEvent *)event
>
>                      // enable graphic console
>                      case Q_KEY_CODE_1 ... Q_KEY_CODE_9: // '1' to '9' keys
> -                        console_select(keycode - 11);
> +                        console_select(keycode - Q_KEY_CODE_1);
>                          break;
>                  }

Applied to master, thanks.

-- PMM