mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 07:42:23 +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);
|
isInhibited = (this.inhibitCookie > 0);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!this.inhibitCookie)
|
//if(!this.inhibitCookie)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Uninhibit seems to be broken as of GTK 3.99.2
|
/* 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);
|
let isChange = super.set_visible(isVisible);
|
||||||
if(!isChange) return;
|
if(!isChange) return;
|
||||||
|
|
||||||
|
let parent = this.get_parent();
|
||||||
|
let playerWidget = parent.get_first_child();
|
||||||
|
if(!playerWidget) return;
|
||||||
|
|
||||||
if(isVisible) {
|
if(isVisible) {
|
||||||
let box = this.get_first_child();
|
let box = this.get_first_child();
|
||||||
if(!box) return;
|
if(!box) return;
|
||||||
@@ -212,15 +216,12 @@ class ClapperRevealerBottom extends CustomRevealer
|
|||||||
togglePlayButton.grab_focus();
|
togglePlayButton.grab_focus();
|
||||||
debug('focus moved to toggle play button');
|
debug('focus moved to toggle play button');
|
||||||
}
|
}
|
||||||
|
playerWidget.set_can_focus(false);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
let parent = this.get_parent();
|
playerWidget.set_can_focus(true);
|
||||||
let playerWidget = parent.get_first_child();
|
playerWidget.grab_focus();
|
||||||
|
debug('focus moved to player widget');
|
||||||
if(playerWidget) {
|
|
||||||
playerWidget.grab_focus();
|
|
||||||
debug('focus moved to player widget');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user