Re: [PATCH] Enable to send F10 key to the guest OS.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2008/05/23 11:51, Hiroyuki Kaguchi wrote:
> The F10 key is assigned as the accelerator of the menu bar in the OS(Windows or
> Linux).
> On this account it is necessary to send the F10 key to the guest OS.
> However, with the existing specifications of virt-viewer, the F10 key is
> assigned to the accelerator
> of the menu bar of virt-viewer and we cannot send the F10 key to the guest OS.
> So, I change virt-viewer to be able to send F10 key to the guest OS when
> virt-viewer grabs the keyboard.

I forgot to attach the patch.
I attach it.

Thanks,
Hiroyuki Kaguchi
diff -r 5299a3aaebb5 src/main.c
--- a/src/main.c	Sun Apr 27 23:41:26 2008 -0400
+++ b/src/main.c	Wed May 21 17:35:09 2008 +0900
@@ -116,6 +116,8 @@ static void viewer_grab(GtkWidget *vnc, 
 	for (i = 0 ; i < LAST_MENU; i++) {
 		gtk_label_set_text_with_mnemonic(GTK_LABEL(menuItems[i].label), menuItems[i].grabbed_text);
 	}
+
+	gtk_settings_set_string_property(gtk_settings_get_default(), "gtk-menu-bar-accel", "", "");
 }
 
 static void viewer_ungrab(GtkWidget *vnc, GtkWidget *window)
@@ -127,6 +129,8 @@ static void viewer_ungrab(GtkWidget *vnc
 	for (i = 0 ; i < LAST_MENU; i++) {
 		gtk_label_set_text_with_mnemonic(GTK_LABEL(menuItems[i].label), menuItems[i].ungrabbed_text);
 	}
+
+	gtk_settings_set_string_property(gtk_settings_get_default(), "gtk-menu-bar-accel", "F10", "");
 }
 
 static void viewer_shutdown(GtkWidget *src G_GNUC_UNUSED, void *dummy G_GNUC_UNUSED, GtkWidget *vnc)
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux