Do not get ancestor on key release if unneeded

This commit is contained in:
Rafał Dzięgiel
2021-04-21 18:14:13 +02:00
parent ee78ffb1e4
commit 6f39b3939a

View File

@@ -631,14 +631,14 @@ class ClapperPlayer extends GstClapper.Clapper
/* Also happens after using controls navigation for selected keys */
_onWidgetKeyReleased(controller, keyval, keycode, state)
{
const clapperWidget = this.widget.get_ancestor(Gtk.Grid);
let value, root;
/* Ignore releases that did not trigger keypress
* e.g. left "Super" key */
* e.g. while holding left "Super" key */
if(!this.keyPressCount)
return;
const clapperWidget = this.widget.get_ancestor(Gtk.Grid);
let value, root;
this.keyPressCount = 0;
switch(keyval) {