Skip to content

Commit

Permalink
clapper-gtk: extra-menu-button: Drop popover focus on unmap
Browse files Browse the repository at this point in the history
Fixes #496
  • Loading branch information
Rafostar committed Jan 18, 2025
1 parent 4472d87 commit fe30ba2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/clapper-gtk/clapper-gtk-extra-menu-button.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,8 @@ popover_map_cb (GtkWidget *widget, ClapperGtkExtraMenuButton *self)

GST_TRACE_OBJECT (self, "Popover map");

gtk_widget_set_can_focus (widget, TRUE);

if (G_UNLIKELY (self->player == NULL))
return;

Expand Down Expand Up @@ -608,6 +610,11 @@ popover_unmap_cb (GtkWidget *widget, ClapperGtkExtraMenuButton *self)

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))
return;

Expand Down

0 comments on commit fe30ba2

Please sign in to comment.