[gtk-vnc] examples: always enable scaling and resizing
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] examples: always enable scaling and resizing
- Date: Tue, 30 Mar 2021 13:52:27 +0000 (UTC)
commit a3b07f7728391a6c45a8c2bc9cde0c2c66a219c5
Author: Daniel P. Berrangé <dan berrange com>
Date: Tue Mar 23 14:07:33 2021 +0000
examples: always enable scaling and resizing
These are both features that are generally expected to be used.
Also protecting the use of scaling behind an is_composited
check is wrong on Wayland. Any modern platform can cope with
scaling these days.
Signed-off-by: Daniel P. Berrangé <berrange redhat com>
examples/gvncviewer.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/examples/gvncviewer.c b/examples/gvncviewer.c
index 66263f8..88d8461 100644
--- a/examples/gvncviewer.c
+++ b/examples/gvncviewer.c
@@ -788,7 +788,10 @@ int main(int argc, char **argv)
scaling = gtk_check_menu_item_new_with_mnemonic("Scaled display");
smoothing = gtk_check_menu_item_new_with_mnemonic("Smooth scaling");
resize = gtk_check_menu_item_new_with_mnemonic("Allow resizing");
+
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(scaling), TRUE);
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(smoothing), TRUE);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(resize), TRUE);
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), fullscreen);
gtk_menu_shell_append(GTK_MENU_SHELL(submenu), scaling);
@@ -874,10 +877,8 @@ int main(int argc, char **argv)
vnc_display_set_pointer_grab(VNC_DISPLAY(vnc), TRUE);
vnc_display_set_pointer_local(VNC_DISPLAY(vnc), TRUE);
- if (!gtk_widget_is_composited(window)) {
- vnc_display_set_scaling(VNC_DISPLAY(vnc), TRUE);
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(scaling), TRUE);
- }
+ vnc_display_set_scaling(VNC_DISPLAY(vnc), TRUE);
+ vnc_display_set_allow_resize(VNC_DISPLAY(vnc), TRUE);
g_signal_connect(window, "delete-event",
G_CALLBACK(gtk_main_quit), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]