Determine If in Kiosk Mode

Typically the HMI my company designs are to stay in kiosk mode, but I for instances where the rest of the computer needs to be accessed (particularly during commissioning), so I have a button to toggle between kiosk and windowed mode, and it's symbol changes from enter/exit full screen depending on the mode it is in.

Currently use the height of the window to see if it's client or full screen, but that only works if the project is opened on a specific screen size that we can't always chose that. Is there a property that I can use to check if the client is in windowed mode or kiosk mode? Or a less hardware-specific way?

Hello,

Install Perspective Workstation in your HMIs. Then, trigger the kiosk mode through
system.perspective.workstation.toKiosk. For your purposes, just store the kiosk mode status in a session property. Write True when triggering toKiosk, False when triggering system.perspective.workstation.toWindowed..

Regards

Workstation is installed on all the official HMIs, and they're set to open in kiosk mode. For those devices it's easy to track the mode it's in since it always starts in kiosk mode.

The issue arises when someone wants to open the program outside of the official HMI (an exec wanting to remote connect and pull up a stats page on a laptop for example). They might not want it originally opening in kiosk mode, the button will have the wrong graphic on it on startup, and if the pixel density of his laptop doesn't match the HMI, my height method doesn't work either.

I realize this is a very minor issue, but it does bug me a little when I run the program and the full screen button is wrong because my resolution isn't the same as the HMI screens.

How about forcing those people to start in kiosk mode? Just by putting that toKiosk script on an onStartup event. In this way, you may not loose track of the window status.

Well, I wanted to avoid forcing the user to use a mode they didn't want to, but it seems like it's either that or have a button that sometimes has an incorrect graphic on it.

I think I'll make a feature request to add that functionality in future versions. It is odd that perspective is able to keep track of the mode in order to toggle kiosk/windows, but doesn't provide it anywhere we can access.

As a workaround, if you have all your HMIs or users in an specific VLAN you could evaluate the IP addresses for deciding whether to start in kiosk or not.