From cfcac9fb9d4d06281a303a564d96a2ddadadc262 Mon Sep 17 00:00:00 2001 From: "Shawn M. Chapla" Date: Wed, 23 Sep 2020 22:26:50 -0400 Subject: [PATCH] Add all accel groups when enabling window mods Previously, enabling window modifiers would only add accel groups that had presumably been disabled to the window in question. This was fragile and caused bad behavior in cases when the criteria for whether or not an accel group should be enabled changed between the time the groups were disabled and re-enabled, potentially leading to certain groups never being re-added. There is no harm in adding accel groups that are already added to a window, so this change simply eliminates the unnecessary check. Signed-off-by: Shawn M. Chapla --- src/virt-viewer-window.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c index 7b6a24b..2a9939a 100644 --- a/src/virt-viewer-window.c +++ b/src/virt-viewer-window.c @@ -896,9 +896,6 @@ virt_viewer_window_enable_modifiers(VirtViewerWindow *self) /* This allows global accelerators like Ctrl+Q == Quit */ for (accels = priv->accel_list ; accels ; accels = accels->next) { - if (virt_viewer_app_get_enable_accel(priv->app) && - priv->accel_group == accels->data) - continue; gtk_window_add_accel_group(GTK_WINDOW(priv->window), accels->data); }