clapper-gtk: extra-menu-button: Drop popover focus on unmap

Fixes #496
This commit is contained in:
Rafał Dzięgiel
2025-01-18 18:31:03 +01:00
parent 4472d87f8b
commit fe30ba24fa

View File

@@ -574,6 +574,8 @@ popover_map_cb (GtkWidget *widget, ClapperGtkExtraMenuButton *self)
GST_TRACE_OBJECT (self, "Popover map"); GST_TRACE_OBJECT (self, "Popover map");
gtk_widget_set_can_focus (widget, TRUE);
if (G_UNLIKELY (self->player == NULL)) if (G_UNLIKELY (self->player == NULL))
return; return;
@@ -608,6 +610,11 @@ popover_unmap_cb (GtkWidget *widget, ClapperGtkExtraMenuButton *self)
GST_TRACE_OBJECT (self, "Popover unmap"); GST_TRACE_OBJECT (self, "Popover unmap");
/* Drop focus after popover is closed. Fixes issue
* with keyboard shortcuts not working when closed
* while within submenu */
gtk_widget_set_can_focus (widget, FALSE);
if (G_UNLIKELY (self->player == NULL)) if (G_UNLIKELY (self->player == NULL))
return; return;