From b9e416f189a3e8605fad03fd5aa8ff12de2b3052 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 16 Oct 2014 23:16:18 -0700 Subject: [PATCH] GUAC-842: Hide mouse when it leaves the display. Reshow the mouse during down/up/move if not using local (hardware) cursor. --- guacamole/src/main/webapp/scripts/client-ui.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/client-ui.js b/guacamole/src/main/webapp/scripts/client-ui.js index 5fc30fadf..25c3d0db5 100644 --- a/guacamole/src/main/webapp/scripts/client-ui.js +++ b/guacamole/src/main/webapp/scripts/client-ui.js @@ -1574,8 +1574,7 @@ GuacUI.Client.attach = function(guac) { mouse.onmousedown = mouse.onmouseup = mouse.onmousemove = function(mouseState) { // Hide software cursor if local cursor is in use - if (GuacUI.Client.local_cursor) - guac.getDisplay().showCursor(false); + guac.getDisplay().showCursor(!GuacUI.Client.local_cursor); // Scale event by current scale var scaledState = new Guacamole.Mouse.State( @@ -1592,6 +1591,11 @@ GuacUI.Client.attach = function(guac) { }; + // Hide software cursor when mouse leaves display + mouse.onmouseout = function() { + guac.getDisplay().showCursor(false); + }; + // Hide any existing status notifications GuacUI.Client.hideStatus();