mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-30 16:02:00 +02:00
Reveal controls only with touch or pen
This commit is contained in:
@@ -742,8 +742,18 @@ class ClapperWidget extends Gtk.Grid
|
|||||||
_onReleased(gesture, nPress, x, y)
|
_onReleased(gesture, nPress, x, y)
|
||||||
{
|
{
|
||||||
/* Reveal if touch was not a swipe or was already revealed */
|
/* Reveal if touch was not a swipe or was already revealed */
|
||||||
if(!this.isSwipePerformed || this.revealerBottom.child_revealed)
|
if(!this.isSwipePerformed || this.revealerBottom.child_revealed) {
|
||||||
this.revealControls();
|
const { source } = gesture.get_device();
|
||||||
|
|
||||||
|
switch(source) {
|
||||||
|
case Gdk.InputSource.PEN:
|
||||||
|
case Gdk.InputSource.TOUCHSCREEN:
|
||||||
|
this.revealControls();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onDragUpdate(gesture, offsetX, offsetY)
|
_onDragUpdate(gesture, offsetX, offsetY)
|
||||||
|
Reference in New Issue
Block a user