From d3dc38f869dcc8a49906b8b1947ed4611fcf95a7 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 18 Apr 2014 17:42:03 -0700 Subject: [PATCH] GUAC-324: Speed up animation, show menu when Ctrl-Alt-Shift is pressed. --- guacamole/src/main/webapp/scripts/client-ui.js | 18 ++++-------------- guacamole/src/main/webapp/styles/client.css | 8 ++++---- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/guacamole/src/main/webapp/scripts/client-ui.js b/guacamole/src/main/webapp/scripts/client-ui.js index a7792dca2..167a893eb 100644 --- a/guacamole/src/main/webapp/scripts/client-ui.js +++ b/guacamole/src/main/webapp/scripts/client-ui.js @@ -1270,21 +1270,11 @@ GuacUI.Client.attach = function(guac) { guac.sendKeyEvent(0, keysym); - // If lifting up on shift, toggle keyboard if rest of gesture + // If lifting up on shift, toggle menu visibility if rest of gesture // conditions satisfied - if (show_keyboard_gesture_possible && keysym === 0xFFE1) { - if (keyboard.pressed[0xFFE3] && keyboard.pressed[0xFFE9]) { - - // If in INTERACTIVE mode, switch to OSK - if (GuacUI.StateManager.getState() === GuacUI.Client.states.INTERACTIVE) - GuacUI.StateManager.setState(GuacUI.Client.states.OSK); - - // If in OSK mode, switch to INTERACTIVE - else if (GuacUI.StateManager.getState() === GuacUI.Client.states.OSK) - GuacUI.StateManager.setState(GuacUI.Client.states.INTERACTIVE); - - } - } + if (show_keyboard_gesture_possible && keysym === 0xFFE1 + && keyboard.pressed[0xFFE3] && keyboard.pressed[0xFFE9]) + GuacUI.Client.showMenu(!GuacUI.Client.isMenuShown()); // Detect if no keys are pressed var reset_gesture = true; diff --git a/guacamole/src/main/webapp/styles/client.css b/guacamole/src/main/webapp/styles/client.css index 3a14c93c1..4f3504348 100644 --- a/guacamole/src/main/webapp/styles/client.css +++ b/guacamole/src/main/webapp/styles/client.css @@ -553,19 +553,19 @@ p.hint { #menu.closed { animation-name: hide-menu; animation-timing-function: linear; - animation-duration: 0.125s; + animation-duration: 0.03125s; -webkit-animation-name: hide-menu; -webkit-animation-timing-function: linear; - -webkit-animation-duration: 0.125s; + -webkit-animation-duration: 0.03125s; left: -320px; } #menu.open { animation-name: show-menu; animation-timing-function: linear; - animation-duration: 0.125s; + animation-duration: 0.03125s; -webkit-animation-name: show-menu; -webkit-animation-timing-function: linear; - -webkit-animation-duration: 0.125s; + -webkit-animation-duration: 0.03125s; left: 0px; }