mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Grab player focus only when controls are not visible
This commit is contained in:
@@ -294,7 +294,7 @@ var App = GObject.registerClass({
|
||||
isInhibited = (this.inhibitCookie > 0);
|
||||
}
|
||||
else {
|
||||
if(!this.inhibitCookie)
|
||||
//if(!this.inhibitCookie)
|
||||
return;
|
||||
|
||||
/* Uninhibit seems to be broken as of GTK 3.99.2
|
||||
|
@@ -200,6 +200,10 @@ class ClapperRevealerBottom extends CustomRevealer
|
||||
let isChange = super.set_visible(isVisible);
|
||||
if(!isChange) return;
|
||||
|
||||
let parent = this.get_parent();
|
||||
let playerWidget = parent.get_first_child();
|
||||
if(!playerWidget) return;
|
||||
|
||||
if(isVisible) {
|
||||
let box = this.get_first_child();
|
||||
if(!box) return;
|
||||
@@ -212,15 +216,12 @@ class ClapperRevealerBottom extends CustomRevealer
|
||||
togglePlayButton.grab_focus();
|
||||
debug('focus moved to toggle play button');
|
||||
}
|
||||
playerWidget.set_can_focus(false);
|
||||
}
|
||||
else {
|
||||
let parent = this.get_parent();
|
||||
let playerWidget = parent.get_first_child();
|
||||
|
||||
if(playerWidget) {
|
||||
playerWidget.grab_focus();
|
||||
debug('focus moved to player widget');
|
||||
}
|
||||
playerWidget.set_can_focus(true);
|
||||
playerWidget.grab_focus();
|
||||
debug('focus moved to player widget');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user