* [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows
@ 2026-08-04 9:08 dongwon.kim
2026-08-04 9:08 ` [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group dongwon.kim
2026-09-15 9:53 ` [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows Marc-André Lureau
0 siblings, 2 replies; 6+ messages in thread
From: dongwon.kim @ 2026-08-04 9:08 UTC (permalink / raw)
To: qemu-devel
From: Dongwon Kim <dongwon.kim@intel.com>
Currently, the fullscreen toggle hotkey (Ctrl+Alt+f by default) only
functions for the main QEMU window. When a Virtual Console (VC) is
detached into its own separate window (untabified), it loses this
capability.
Implement a toggle helper, gd_win_fullscreen, and connect it to
the 'f' accelerator when a detached window is created in
gd_menu_untabify. This allows individual detached windows to be
toggled fullscreen independently.
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
ui/gtk.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 43 insertions(+), 3 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index a723c8215d..3c9720a330 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1556,6 +1556,42 @@ static gboolean gd_win_grab(void *opaque)
return TRUE;
}
+static void gd_win_fullscreen(void *opaque)
+{
+ VirtualConsole *vc = opaque;
+ GtkDisplayState *s = vc->s;
+ GdkWindow *window;
+ GdkWindowState state;
+
+ if (!vc->window || !gtk_widget_get_realized(vc->window)) {
+ return;
+ }
+
+ window = gtk_widget_get_window(vc->window);
+ if (!window) {
+ return;
+ }
+
+ state = gdk_window_get_state(window);
+
+ if (state & GDK_WINDOW_STATE_FULLSCREEN) {
+ gtk_window_unfullscreen(GTK_WINDOW(vc->window));
+
+ if (vc->type == GD_VC_GFX) {
+ if (!s->free_scale) {
+ vc->gfx.scale_x = 1.0;
+ vc->gfx.scale_y = 1.0;
+ }
+ gd_update_windowsize(vc);
+ }
+ } else {
+ if (vc->type == GD_VC_GFX) {
+ gtk_widget_set_size_request(vc->gfx.drawing_area, -1, -1);
+ }
+ gtk_window_fullscreen(GTK_WINDOW(vc->window));
+ }
+}
+
static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
{
GtkDisplayState *s = opaque;
@@ -1590,9 +1626,13 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
GtkAccelGroup *ag = gtk_accel_group_new();
gtk_window_add_accel_group(GTK_WINDOW(vc->window), ag);
- GClosure *cb = g_cclosure_new_swap(G_CALLBACK(gd_win_grab),
- vc, NULL);
- gtk_accel_group_connect(ag, GDK_KEY_g, HOTKEY_MODIFIERS, 0, cb);
+ GClosure *cb_grab = g_cclosure_new_swap(G_CALLBACK(gd_win_grab),
+ vc, NULL);
+ gtk_accel_group_connect(ag, GDK_KEY_g, HOTKEY_MODIFIERS, 0, cb_grab);
+ GClosure *cb_fullscreen = g_cclosure_new_swap(
+ G_CALLBACK(gd_win_fullscreen),
+ vc, NULL);
+ gtk_accel_group_connect(ag, GDK_KEY_f, HOTKEY_MODIFIERS, 0, cb_fullscreen);
}
gd_rebuild_vc_menu(s);
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group
2026-08-04 9:08 [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows dongwon.kim
@ 2026-08-04 9:08 ` dongwon.kim
2026-09-15 10:36 ` Marc-André Lureau
2026-09-15 9:53 ` [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows Marc-André Lureau
1 sibling, 1 reply; 6+ messages in thread
From: dongwon.kim @ 2026-08-04 9:08 UTC (permalink / raw)
To: qemu-devel
From: Dongwon Kim <dongwon.kim@intel.com>
The "Grab Input" shortcut key currently fails to trigger when the
window is in fullscreen mode because the menubar is hidden, which
disables GtkAccelMap-based shortcuts associated with it.
To ensure the accelerator remains active in fullscreen, connect it
directly to s->accel_group and explicitly set the hotkey display on
the menu item label.
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
ui/gtk.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index 3c9720a330..2f83c557d8 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1878,6 +1878,12 @@ static void gd_menu_grab_input(GtkMenuItem *item, void *opaque)
gd_update_cursor(vc);
}
+static void gd_accel_grab_input(void *opaque)
+{
+ GtkDisplayState *s = opaque;
+ gtk_menu_item_activate(GTK_MENU_ITEM(s->grab_item));
+}
+
static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2,
gpointer data)
{
@@ -2557,6 +2563,7 @@ static void gd_create_menu_view(GtkDisplayState *s, DisplayOptions *opts)
{
GtkWidget *view_menu;
GtkWidget *separator;
+ GtkWidget *child;
QemuConsole *con;
bool zoom_to_fit = false;
int vc, i;
@@ -2615,12 +2622,15 @@ static void gd_create_menu_view(GtkDisplayState *s, DisplayOptions *opts)
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), s->grab_on_hover_item);
s->grab_item = gtk_check_menu_item_new_with_mnemonic(_("_Grab Input"));
- gtk_menu_item_set_accel_path(GTK_MENU_ITEM(s->grab_item),
- "<QEMU>/View/Grab Input");
- gtk_accel_map_add_entry("<QEMU>/View/Grab Input", GDK_KEY_g,
- HOTKEY_MODIFIERS);
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), s->grab_item);
-
+ gtk_accel_group_connect(s->accel_group, GDK_KEY_g, HOTKEY_MODIFIERS, 0,
+ g_cclosure_new_swap(G_CALLBACK(gd_accel_grab_input),
+ s, NULL));
+ child = gtk_bin_get_child(GTK_BIN(s->grab_item));
+ if (GTK_IS_ACCEL_LABEL(child)) {
+ gtk_accel_label_set_accel(GTK_ACCEL_LABEL(child),
+ GDK_KEY_g, HOTKEY_MODIFIERS);
+ }
separator = gtk_separator_menu_item_new();
gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), separator);
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows
2026-08-04 9:08 [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows dongwon.kim
2026-08-04 9:08 ` [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group dongwon.kim
@ 2026-09-15 9:53 ` Marc-André Lureau
2026-09-15 18:07 ` Kim, Dongwon
1 sibling, 1 reply; 6+ messages in thread
From: Marc-André Lureau @ 2026-09-15 9:53 UTC (permalink / raw)
To: dongwon.kim; +Cc: qemu-devel
Hi
On Mon, Sep 14, 2026 at 10:50 PM <dongwon.kim@intel.com> wrote:
>
> From: Dongwon Kim <dongwon.kim@intel.com>
>
> Currently, the fullscreen toggle hotkey (Ctrl+Alt+f by default) only
> functions for the main QEMU window. When a Virtual Console (VC) is
> detached into its own separate window (untabified), it loses this
> capability.
>
> Implement a toggle helper, gd_win_fullscreen, and connect it to
> the 'f' accelerator when a detached window is created in
> gd_menu_untabify. This allows individual detached windows to be
> toggled fullscreen independently.
>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> ---
> ui/gtk.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 43 insertions(+), 3 deletions(-)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index a723c8215d..3c9720a330 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1556,6 +1556,42 @@ static gboolean gd_win_grab(void *opaque)
> return TRUE;
> }
>
> +static void gd_win_fullscreen(void *opaque)
> +{
> + VirtualConsole *vc = opaque;
> + GtkDisplayState *s = vc->s;
> + GdkWindow *window;
> + GdkWindowState state;
> +
> + if (!vc->window || !gtk_widget_get_realized(vc->window)) {
> + return;
> + }
> +
> + window = gtk_widget_get_window(vc->window);
> + if (!window) {
> + return;
> + }
> +
> + state = gdk_window_get_state(window);
> +
> + if (state & GDK_WINDOW_STATE_FULLSCREEN) {
> + gtk_window_unfullscreen(GTK_WINDOW(vc->window));
> +
> + if (vc->type == GD_VC_GFX) {
> + if (!s->free_scale) {
> + vc->gfx.scale_x = 1.0;
> + vc->gfx.scale_y = 1.0;
gd_menu_full_screen restores it to gfx.preferred_scale
> + }
> + gd_update_windowsize(vc);
> + }
> + } else {
> + if (vc->type == GD_VC_GFX) {
> + gtk_widget_set_size_request(vc->gfx.drawing_area, -1, -1);
> + }
> + gtk_window_fullscreen(GTK_WINDOW(vc->window));
> + }
> +}
For consistency with gd_menu_full_screen() it should call gd_update_cursor
> +
> static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
> {
> GtkDisplayState *s = opaque;
> @@ -1590,9 +1626,13 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
> GtkAccelGroup *ag = gtk_accel_group_new();
> gtk_window_add_accel_group(GTK_WINDOW(vc->window), ag);
>
> - GClosure *cb = g_cclosure_new_swap(G_CALLBACK(gd_win_grab),
> - vc, NULL);
> - gtk_accel_group_connect(ag, GDK_KEY_g, HOTKEY_MODIFIERS, 0, cb);
> + GClosure *cb_grab = g_cclosure_new_swap(G_CALLBACK(gd_win_grab),
> + vc, NULL);
> + gtk_accel_group_connect(ag, GDK_KEY_g, HOTKEY_MODIFIERS, 0, cb_grab);
You also hook grab, this should be mentionned in the commit message.
btw, it would be nice to remove the stderr printf there..
Why not add the zoom keys while at it?
thanks
> + GClosure *cb_fullscreen = g_cclosure_new_swap(
> + G_CALLBACK(gd_win_fullscreen),
> + vc, NULL);
> + gtk_accel_group_connect(ag, GDK_KEY_f, HOTKEY_MODIFIERS, 0, cb_fullscreen);
> }
>
> gd_rebuild_vc_menu(s);
> --
> 2.43.0
>
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group
2026-08-04 9:08 ` [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group dongwon.kim
@ 2026-09-15 10:36 ` Marc-André Lureau
2026-09-15 18:53 ` Kim, Dongwon
0 siblings, 1 reply; 6+ messages in thread
From: Marc-André Lureau @ 2026-09-15 10:36 UTC (permalink / raw)
To: dongwon.kim; +Cc: qemu-devel
Hi
On Mon, Sep 14, 2026 at 10:51 PM <dongwon.kim@intel.com> wrote:
>
> From: Dongwon Kim <dongwon.kim@intel.com>
>
> The "Grab Input" shortcut key currently fails to trigger when the
> window is in fullscreen mode because the menubar is hidden, which
> disables GtkAccelMap-based shortcuts associated with it.
>
> To ensure the accelerator remains active in fullscreen, connect it
> directly to s->accel_group and explicitly set the hotkey display on
> the menu item label.
>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> ---
> ui/gtk.c | 20 +++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 3c9720a330..2f83c557d8 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1878,6 +1878,12 @@ static void gd_menu_grab_input(GtkMenuItem *item, void *opaque)
> gd_update_cursor(vc);
> }
>
> +static void gd_accel_grab_input(void *opaque)
> +{
https://docs.gtk.org/gtk3/method.AccelGroup.connect.html
The signature used for the closure is that of GtkAccelGroupActivate.
This means that other key events could potentially be triggered. It
should return true (handled).
> + GtkDisplayState *s = opaque;
> + gtk_menu_item_activate(GTK_MENU_ITEM(s->grab_item));
> +}
> +
> static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2,
> gpointer data)
> {
> @@ -2557,6 +2563,7 @@ static void gd_create_menu_view(GtkDisplayState *s, DisplayOptions *opts)
> {
> GtkWidget *view_menu;
> GtkWidget *separator;
> + GtkWidget *child;
> QemuConsole *con;
> bool zoom_to_fit = false;
> int vc, i;
> @@ -2615,12 +2622,15 @@ static void gd_create_menu_view(GtkDisplayState *s, DisplayOptions *opts)
> gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), s->grab_on_hover_item);
>
> s->grab_item = gtk_check_menu_item_new_with_mnemonic(_("_Grab Input"));
> - gtk_menu_item_set_accel_path(GTK_MENU_ITEM(s->grab_item),
> - "<QEMU>/View/Grab Input");
> - gtk_accel_map_add_entry("<QEMU>/View/Grab Input", GDK_KEY_g,
> - HOTKEY_MODIFIERS);
> gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), s->grab_item);
> -
> + gtk_accel_group_connect(s->accel_group, GDK_KEY_g, HOTKEY_MODIFIERS, 0,
> + g_cclosure_new_swap(G_CALLBACK(gd_accel_grab_input),
> + s, NULL));
> + child = gtk_bin_get_child(GTK_BIN(s->grab_item));
> + if (GTK_IS_ACCEL_LABEL(child)) {
> + gtk_accel_label_set_accel(GTK_ACCEL_LABEL(child),
> + GDK_KEY_g, HOTKEY_MODIFIERS);
> + }
> separator = gtk_separator_menu_item_new();
> gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), separator);
>
> --
> 2.43.0
>
>
--
Marc-André Lureau
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows
2026-09-15 9:53 ` [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows Marc-André Lureau
@ 2026-09-15 18:07 ` Kim, Dongwon
0 siblings, 0 replies; 6+ messages in thread
From: Kim, Dongwon @ 2026-09-15 18:07 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel@nongnu.org
Hi Marc-André,
> Subject: Re: [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached
> windows
>
> Hi
>
> On Mon, Sep 14, 2026 at 10:50 PM <dongwon.kim@intel.com> wrote:
> >
> > From: Dongwon Kim <dongwon.kim@intel.com>
> >
> > Currently, the fullscreen toggle hotkey (Ctrl+Alt+f by default) only
> > functions for the main QEMU window. When a Virtual Console (VC) is
> > detached into its own separate window (untabified), it loses this
> > capability.
> >
> > Implement a toggle helper, gd_win_fullscreen, and connect it to the
> > 'f' accelerator when a detached window is created in gd_menu_untabify.
> > This allows individual detached windows to be toggled fullscreen
> > independently.
> >
> > Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> > ---
> > ui/gtk.c | 46 +++++++++++++++++++++++++++++++++++++++++++---
> > 1 file changed, 43 insertions(+), 3 deletions(-)
> >
> > diff --git a/ui/gtk.c b/ui/gtk.c
> > index a723c8215d..3c9720a330 100644
> > --- a/ui/gtk.c
> > +++ b/ui/gtk.c
> > @@ -1556,6 +1556,42 @@ static gboolean gd_win_grab(void *opaque)
> > return TRUE;
> > }
> >
> > +static void gd_win_fullscreen(void *opaque) {
> > + VirtualConsole *vc = opaque;
> > + GtkDisplayState *s = vc->s;
> > + GdkWindow *window;
> > + GdkWindowState state;
> > +
> > + if (!vc->window || !gtk_widget_get_realized(vc->window)) {
> > + return;
> > + }
> > +
> > + window = gtk_widget_get_window(vc->window);
> > + if (!window) {
> > + return;
> > + }
> > +
> > + state = gdk_window_get_state(window);
> > +
> > + if (state & GDK_WINDOW_STATE_FULLSCREEN) {
> > + gtk_window_unfullscreen(GTK_WINDOW(vc->window));
> > +
> > + if (vc->type == GD_VC_GFX) {
> > + if (!s->free_scale) {
> > + vc->gfx.scale_x = 1.0;
> > + vc->gfx.scale_y = 1.0;
>
> gd_menu_full_screen restores it to gfx.preferred_scale
I will change this. This was based on what was done in menu_full_screen a while ago.
I didn't notice it was changed there. In addition to that, I will take out check on free_scale
as well.
>
> > + }
> > + gd_update_windowsize(vc);
> > + }
> > + } else {
> > + if (vc->type == GD_VC_GFX) {
> > + gtk_widget_set_size_request(vc->gfx.drawing_area, -1, -1);
> > + }
> > + gtk_window_fullscreen(GTK_WINDOW(vc->window));
> > + }
> > +}
>
> For consistency with gd_menu_full_screen() it should call gd_update_cursor
Yes
>
> > +
> > static void gd_menu_untabify(GtkMenuItem *item, void *opaque) {
> > GtkDisplayState *s = opaque;
> > @@ -1590,9 +1626,13 @@ static void gd_menu_untabify(GtkMenuItem
> *item, void *opaque)
> > GtkAccelGroup *ag = gtk_accel_group_new();
> > gtk_window_add_accel_group(GTK_WINDOW(vc->window), ag);
> >
> > - GClosure *cb = g_cclosure_new_swap(G_CALLBACK(gd_win_grab),
> > - vc, NULL);
> > - gtk_accel_group_connect(ag, GDK_KEY_g, HOTKEY_MODIFIERS, 0,
> cb);
> > + GClosure *cb_grab =
> g_cclosure_new_swap(G_CALLBACK(gd_win_grab),
> > + vc, NULL);
> > + gtk_accel_group_connect(ag, GDK_KEY_g, HOTKEY_MODIFIERS,
> > + 0, cb_grab);
>
> You also hook grab, this should be mentionned in the commit message.
>
> btw, it would be nice to remove the stderr printf there..
Yes, I will remove it.
>
> Why not add the zoom keys while at it?
Yes, we can enable other hotkeys. I am going to add zoom in/out/reset keys.
I think it's better to create a new commit with all these major changes included
rather than going with v2.
Thanks,
DW
>
> thanks
>
> > + GClosure *cb_fullscreen = g_cclosure_new_swap(
> > + G_CALLBACK(gd_win_fullscreen),
> > + vc, NULL);
> > + gtk_accel_group_connect(ag, GDK_KEY_f, HOTKEY_MODIFIERS,
> > + 0, cb_fullscreen);
> > }
> >
> > gd_rebuild_vc_menu(s);
> > --
> > 2.43.0
> >
> >
>
>
> --
> Marc-André Lureau
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group
2026-09-15 10:36 ` Marc-André Lureau
@ 2026-09-15 18:53 ` Kim, Dongwon
0 siblings, 0 replies; 6+ messages in thread
From: Kim, Dongwon @ 2026-09-15 18:53 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel@nongnu.org
Hi Marc-André,
> Subject: Re: [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group
>
> Hi
>
> On Mon, Sep 14, 2026 at 10:51 PM <dongwon.kim@intel.com> wrote:
> >
> > From: Dongwon Kim <dongwon.kim@intel.com>
> >
> > The "Grab Input" shortcut key currently fails to trigger when the
> > window is in fullscreen mode because the menubar is hidden, which
> > disables GtkAccelMap-based shortcuts associated with it.
> >
> > To ensure the accelerator remains active in fullscreen, connect it
> > directly to s->accel_group and explicitly set the hotkey display on
> > the menu item label.
> >
> > Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> > Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> > ---
> > ui/gtk.c | 20 +++++++++++++++-----
> > 1 file changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/ui/gtk.c b/ui/gtk.c
> > index 3c9720a330..2f83c557d8 100644
> > --- a/ui/gtk.c
> > +++ b/ui/gtk.c
> > @@ -1878,6 +1878,12 @@ static void gd_menu_grab_input(GtkMenuItem
> *item, void *opaque)
> > gd_update_cursor(vc);
> > }
> >
> > +static void gd_accel_grab_input(void *opaque) {
>
> https://docs.gtk.org/gtk3/method.AccelGroup.connect.html
> The signature used for the closure is that of GtkAccelGroupActivate.
>
> This means that other key events could potentially be triggered. It should
> return true (handled).
Yeah This will be updated in v2.
Thanks,
DW
>
>
> > + GtkDisplayState *s = opaque;
> > + gtk_menu_item_activate(GTK_MENU_ITEM(s->grab_item));
> > +}
> > +
> > static void gd_change_page(GtkNotebook *nb, gpointer arg1, guint arg2,
> > gpointer data) { @@ -2557,6 +2563,7 @@
> > static void gd_create_menu_view(GtkDisplayState *s, DisplayOptions
> > *opts) {
> > GtkWidget *view_menu;
> > GtkWidget *separator;
> > + GtkWidget *child;
> > QemuConsole *con;
> > bool zoom_to_fit = false;
> > int vc, i;
> > @@ -2615,12 +2622,15 @@ static void
> gd_create_menu_view(GtkDisplayState *s, DisplayOptions *opts)
> > gtk_menu_shell_append(GTK_MENU_SHELL(view_menu),
> > s->grab_on_hover_item);
> >
> > s->grab_item = gtk_check_menu_item_new_with_mnemonic(_("_Grab
> Input"));
> > - gtk_menu_item_set_accel_path(GTK_MENU_ITEM(s->grab_item),
> > - "<QEMU>/View/Grab Input");
> > - gtk_accel_map_add_entry("<QEMU>/View/Grab Input", GDK_KEY_g,
> > - HOTKEY_MODIFIERS);
> > gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), s->grab_item);
> > -
> > + gtk_accel_group_connect(s->accel_group, GDK_KEY_g,
> HOTKEY_MODIFIERS, 0,
> > + g_cclosure_new_swap(G_CALLBACK(gd_accel_grab_input),
> > + s, NULL));
> > + child = gtk_bin_get_child(GTK_BIN(s->grab_item));
> > + if (GTK_IS_ACCEL_LABEL(child)) {
> > + gtk_accel_label_set_accel(GTK_ACCEL_LABEL(child),
> > + GDK_KEY_g, HOTKEY_MODIFIERS);
> > + }
> > separator = gtk_separator_menu_item_new();
> > gtk_menu_shell_append(GTK_MENU_SHELL(view_menu), separator);
> >
> > --
> > 2.43.0
> >
> >
>
>
> --
> Marc-André Lureau
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-15 18:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 9:08 [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows dongwon.kim
2026-08-04 9:08 ` [PATCH 2/2] ui/gtk: register "Grab Input" shortcut to accel_group dongwon.kim
2026-09-15 10:36 ` Marc-André Lureau
2026-09-15 18:53 ` Kim, Dongwon
2026-09-15 9:53 ` [PATCH 1/2] ui/gtk: enable fullscreen hotkey for detached windows Marc-André Lureau
2026-09-15 18:07 ` Kim, Dongwon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.