diff --git a/clapper_src/player.js b/clapper_src/player.js index c58136a0..2538355a 100644 --- a/clapper_src/player.js +++ b/clapper_src/player.js @@ -297,8 +297,11 @@ class ClapperPlayer extends PlayerBase this._hideCursorTimeout = null; if(this.cursorInPlayer) { + const clapperWidget = this.widget.get_ancestor(Gtk.Grid); const blankCursor = Gdk.Cursor.new_from_name('none', null); + this.widget.set_cursor(blankCursor); + clapperWidget.revealerTop.set_cursor(blankCursor); } return GLib.SOURCE_REMOVE; @@ -594,11 +597,12 @@ class ClapperPlayer extends PlayerBase Math.abs(this.posX - posX) >= 0.5 || Math.abs(this.posY - posY) >= 0.5 ) { - const defaultCursor = Gdk.Cursor.new_from_name('default', null); - this.widget.set_cursor(defaultCursor); - this._setHideCursorTimeout(); - const clapperWidget = this.widget.get_ancestor(Gtk.Grid); + const defaultCursor = Gdk.Cursor.new_from_name('default', null); + + this.widget.set_cursor(defaultCursor); + clapperWidget.revealerTop.set_cursor(defaultCursor); + this._setHideCursorTimeout(); if(clapperWidget.floatingMode && !clapperWidget.fullscreenMode) { clapperWidget.revealerBottom.set_can_focus(false); diff --git a/clapper_src/widget.js b/clapper_src/widget.js index 50e6938a..d42258fd 100644 --- a/clapper_src/widget.js +++ b/clapper_src/widget.js @@ -58,6 +58,20 @@ class ClapperWidget extends Gtk.Grid const motionController = new Gtk.EventControllerMotion(); motionController.connect('leave', this._onLeave.bind(this)); this.add_controller(motionController); + + const topClickGesture = new Gtk.GestureClick(); + topClickGesture.set_button(0); + topClickGesture.connect('pressed', this.player._onWidgetPressed.bind(this.player)); + this.revealerTop.add_controller(topClickGesture); + + const topMotionController = new Gtk.EventControllerMotion(); + topMotionController.connect('motion', this.player._onWidgetMotion.bind(this.player)); + this.revealerTop.add_controller(topMotionController); + + const topScrollController = new Gtk.EventControllerScroll(); + topScrollController.set_flags(Gtk.EventControllerScrollFlags.BOTH_AXES); + topScrollController.connect('scroll', this.player._onScroll.bind(this.player)); + this.revealerTop.add_controller(topScrollController); } revealControls(isReveal)