From 69d6264c797f5250de1c625f80a50e5449a2fecf Mon Sep 17 00:00:00 2001 From: hugh-unicenta Date: Fri, 10 Nov 2023 12:15:50 +0000 Subject: [PATCH] UOCL-251 work around added --- .../com/unicenta/pos/forms/JRootKiosk.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/unicenta/pos/forms/JRootKiosk.java b/src/main/java/com/unicenta/pos/forms/JRootKiosk.java index 433e262..eae7c31 100644 --- a/src/main/java/com/unicenta/pos/forms/JRootKiosk.java +++ b/src/main/java/com/unicenta/pos/forms/JRootKiosk.java @@ -64,6 +64,10 @@ public class JRootKiosk extends javax.swing.JFrame implements AppMessage { * @throws java.io.IOException */ public void initFrame(AppProperties props) throws IOException { + + String osName = System.getProperty("os.name").toLowerCase(); + boolean isWindows = osName.startsWith("windows"); + boolean isMac = osName.startsWith("mac"); m_OS = new OSValidator(); m_props = props; @@ -84,21 +88,23 @@ public class JRootKiosk extends javax.swing.JFrame implements AppMessage { setTitle(AppLocal.APP_NAME + " - " + AppLocal.APP_VERSION); Dimension d = Toolkit.getDefaultToolkit().getScreenSize(); - setBounds(0, 0, d.width, d.height); + if (isMac) { + setBounds(0, 25, d.width, d.height - 25); + } + else { + setBounds(0, 0, d.width, d.height); + } /* * 4 Sep 17 JG * 2 Dec 17 - Mod' Thanks Hayk Sokolov! * Change here for Linux/Ubuntu full screen * Thanks to Hans Lengerke for solution -*/ - String osName = System.getProperty("os.name").toLowerCase(); - boolean isWindows = osName.startsWith("windows"); +*/ - GraphicsDevice device = GraphicsEnvironment - .getLocalGraphicsEnvironment().getDefaultScreenDevice(); + GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); - if (device.isFullScreenSupported() && !isWindows) { + if (device.isFullScreenSupported() && !isWindows && !isMac) { setResizable(true); addFocusListener(new FocusListener() {