mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +02:00
Prevent hiding OSD when menu popover is open
This commit is contained in:
@@ -209,12 +209,13 @@ class ClapperHeaderBarPopover extends Gtk.PopoverMenu
|
||||
menu_model: model,
|
||||
});
|
||||
|
||||
this.connect('map', this._onMap.bind(this));
|
||||
this.connect('closed', this._onClosed.bind(this));
|
||||
}
|
||||
|
||||
_onClosed()
|
||||
_onMap()
|
||||
{
|
||||
const { child } = this.get_root();
|
||||
const { child } = this.root;
|
||||
|
||||
if(
|
||||
!child
|
||||
@@ -223,6 +224,24 @@ class ClapperHeaderBarPopover extends Gtk.PopoverMenu
|
||||
)
|
||||
return;
|
||||
|
||||
child.revealControls();
|
||||
child.isPopoverOpen = true;
|
||||
}
|
||||
|
||||
_onClosed()
|
||||
{
|
||||
const { child } = this.root;
|
||||
|
||||
if(
|
||||
!child
|
||||
|| !child.player
|
||||
|| !child.player.widget
|
||||
)
|
||||
return;
|
||||
|
||||
child.revealControls();
|
||||
child.isPopoverOpen = false;
|
||||
|
||||
child.player.widget.grab_focus();
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user