Based on some code I found on internet, I modified it to be on tray, so that as long as it stays there, windows will not get locked. Hope it will be useful for someone.