Re: [PATCH 1/1] ui/cocoa: Add option to disable left command and hide cursor on click

2021-12-31 Thread Alexander Orzechowski
On 12/31/21 12:42, Carwyn Ellis wrote: When switching between guest and host on a Mac using command-tab the command key is sent to the guest which can trigger functionality in the guest OS. Specifying left-command-key=off disables forwarding this key to the guest. Defaults to enabled. When swi

Re: [PATCH 1/1] ui/cocoa: Add option to disable left command and hide cursor on click

2021-12-31 Thread Alexander Orzechowski
On 12/31/21 12:42, Carwyn Ellis wrote: When switching between guest and host on a Mac using command-tab the command key is sent to the guest which can trigger functionality in the guest OS. Specifying left-command-key=off disables forwarding this key to the guest. Defaults to enabled. When swi

[PATCH v2 2/3] ui: Revert: "fix incorrect pointer position on highdpi with gtk"

2021-12-21 Thread Alexander Orzechowski
. Signed-off-by: Alexander Orzechowski --- ui/gtk.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 824334ff3d..b7f296fac7 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -836,7 +836,7 @@ static gboolean gd_motion_event(GtkWidget *widget

[PATCH v2 1/3] ui: Use allocated size instead of window size

2021-12-21 Thread Alexander Orzechowski
In these cases, we only care about the size of the virtual console itself. Previously, these calculations were made using the size of the entire window, which would include the size of the virtual console plus all the ui elements around it. Signed-off-by: Alexander Orzechowski Reviewed-by: Marc

[PATCH v2 3/3] ui: Fix gtk/gl when the scaled virtual console does not fit the window

2021-12-21 Thread Alexander Orzechowski
gtk/gl was incorrectly always rendering as if the 'Zoom to Fit' was always checked even if it wasn't. This is now using logic closer to what is being used for the existing cairo code paths. Signed-off-by: Alexander Orzechowski --- ui/gtk-gl-area.c | 34 +++

[PATCH v2 0/3] UI fixups

2021-12-21 Thread Alexander Orzechowski
t to colour the bike shed - Fixed incorrect rendering when gtk/gl is using scanout_mode Alexander Orzechowski (3): ui: Use allocated size instead of window size ui: Revert: "fix incorrect pointer position on highdpi with gtk" ui: Fix gtk/gl when the scaled virtual console does not f

Re: [PATCH 2/4] ui: Remove unnecessary checks

2021-12-21 Thread Alexander Orzechowski
On 12/21/21 02:40, Marc-André Lureau wrote: Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski wrote: These conditionals should never be false as scale_x and scale_y should scale the fbw and fbh variables such that the ww and wh variables always have a greater

Re: [PATCH 4/4] ui: Fix gtk/gl when the scaled virtual console does not fit the window

2021-12-21 Thread Alexander Orzechowski
On 12/21/21 02:48, Marc-André Lureau wrote: Hi On Sun, Dec 19, 2021 at 6:32 AM Alexander Orzechowski wrote: gtk/gl was incorrectly always rendering as if the 'Zoom to Fit' was always checked even if it wasn't. This is now using logic closer to what is bei

[PATCH 3/4] ui: Revert: "fix incorrect pointer position on highdpi with gtk"

2021-12-18 Thread Alexander Orzechowski
. Signed-off-by: Alexander Orzechowski --- ui/gtk.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index f2d74b253d..c41601f24d 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -826,7 +826,7 @@ static gboolean gd_motion_event(GtkWidget *widget

[PATCH 1/4] ui: Use allocated size instead of window size

2021-12-18 Thread Alexander Orzechowski
In these cases, we only care about the size of the virtual console itself. Previously, these calculations were made using the size of the entire window, which would include the size of the virtual console plus all the ui elements around it. Signed-off-by: Alexander Orzechowski --- ui/gtk.c | 26

[PATCH 4/4] ui: Fix gtk/gl when the scaled virtual console does not fit the window

2021-12-18 Thread Alexander Orzechowski
gtk/gl was incorrectly always rendering as if the 'Zoom to Fit' was always checked even if it wasn't. This is now using logic closer to what is being used for the existing cairo code paths. Signed-off-by: Alexander Orzechowski --- ui/gtk-gl-area.c | 34 +++

[PATCH 2/4] ui: Remove unnecessary checks

2021-12-18 Thread Alexander Orzechowski
These conditionals should never be false as scale_x and scale_y should scale the fbw and fbh variables such that the ww and wh variables always have a greater magnitude. Signed-off-by: Alexander Orzechowski --- ui/gtk.c | 27 ++- 1 file changed, 6 insertions(+), 21

[PATCH 0/4] UI fixups

2021-12-18 Thread Alexander Orzechowski
bit. Also just from looking around a little bit in ui/gtk-egl.c the code seems super broken regarding the virtual console rendering in the correct place. I'm unable to test those code paths so I haven't touched it for now. Alexander Orzechowski (4): ui: Use allocated size instead of w

[PATCH 1/2] ui: fix incorrect scaling on highdpi with gtk/opengl

2021-11-21 Thread Alexander Orzechowski
Signed-off-by: Alexander Orzechowski --- ui/gtk-gl-area.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c index 461da7712f..d3565698ae 100644 --- a/ui/gtk-gl-area.c +++ b/ui/gtk-gl-area.c @@ -41,15 +41,16 @@ void gd_gl_area_draw

[PATCH 0/2] Fix trivial errors with highdpi/wayland

2021-11-21 Thread Alexander Orzechowski
fixes the --usbdevice tablet option as before if the pointer would click in the incorrect spot of the virtual machine then was expected. Alexander Orzechowski (2): ui: fix incorrect scaling on highdpi with gtk/opengl ui: fix incorrect pointer position on highdpi with gtk ui/gtk-gl-area.c

[PATCH 2/2] ui: fix incorrect pointer position on highdpi with gtk

2021-11-21 Thread Alexander Orzechowski
Signed-off-by: Alexander Orzechowski --- ui/gtk.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index d2892ea6b4..b2670142b5 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -838,10 +838,11 @@ static gboolean gd_motion_event(GtkWidget *widget