Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:GA
gnome-shell
gnome-shell-864872-unlock-by-mouse-motion.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File gnome-shell-864872-unlock-by-mouse-motion.patch of Package gnome-shell
diff -Npur gnome-shell-3.10.3/js/ui/screenShield.js gnome-shell-3.10.3-new/js/ui/screenShield.js --- gnome-shell-3.10.3/js/ui/screenShield.js 2014-01-16 01:37:52.000000000 +0800 +++ gnome-shell-3.10.3-new/js/ui/screenShield.js 2014-02-28 09:10:33.928618465 +0800 @@ -464,6 +464,8 @@ const ScreenShield = new Lang.Class({ this.actor = Main.layoutManager.screenShieldGroup; this._lockScreenState = MessageTray.State.HIDDEN; + this._last_x = -1; + this._last_y = -1; this._lockScreenGroup = new St.Widget({ x_expand: true, y_expand: true, reactive: true, @@ -473,6 +475,8 @@ const ScreenShield = new Lang.Class({ }); this._lockScreenGroup.connect('key-press-event', Lang.bind(this, this._onLockScreenKeyPress)); + this._lockScreenGroup.connect('motion-event', + Lang.bind(this, this._onLockScreenMotion)); this._lockScreenGroup.connect('scroll-event', Lang.bind(this, this._onLockScreenScroll)); Main.ctrlAltTabManager.addGroup(this._lockScreenGroup, _("Lock"), 'changes-prevent-symbolic'); @@ -688,6 +692,25 @@ const ScreenShield = new Lang.Class({ return true; }, + _onLockScreenMotion: function(actor, event) { + if (this._lockScreenState != MessageTray.State.SHOWN) + return false; + let [X, Y] = event.get_coords(); + + if (this._last_x == -1) + this._last_x = X; + if (this._last_y == -1) + this._last_y = Y; + + let min_distance = 10 + let distance = Math.max(Math.abs(this._last_x - X), + Math.abs(this._last_y - Y)); + + if (distance >= 10) + this._liftShield(true, 0); + return true; + }, + _onLockScreenScroll: function(actor, event) { if (this._lockScreenState != MessageTray.State.SHOWN) return false; @@ -1007,6 +1030,8 @@ const ScreenShield = new Lang.Class({ return; this._ensureLockScreen(); + this._last_x = -1; + this._last_y = -1; this._lockDialogGroup.scale_x = 1; this._lockDialogGroup.scale_y = 1;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor