OpenVPN / openvpn-gui

OpenVPN GUI is a graphical frontend for OpenVPN running on Windows 7 / 8 / 10. It creates an icon in the notification area from which you can control OpenVPN to start/stop your VPN tunnels, view the log and do other useful things.
Other
1.38k stars 397 forks source link

Login dialog does not have keyboard focus after tray icon doubleclick #655

Open xmedeko opened 9 months ago

xmedeko commented 9 months ago

I start openvpn-gui.exe when on Windows start up. It does not connect automatically, just the icon is in the system tray. When I double click the icon in the tray, OpenVPN log window and then OpenVPN login dialogs popup up. The cursor is blinking in the password field of the OpenVPN login dialog, but when I try to type my password, nothing happens. I have to manually click the mouse in the password field, then I can type password and hit Enter to confirm the dialog.

I would like to have focus in the password field when the login dialog pops up, so I can type password immediately.

selvanair commented 9 months ago

I cannot reproduce this -- I get keyboard focus on the password box. What is the version of the GUI and OS?

I start openvpn-gui.exe when on Windows start up. It does not connect automatically, just the icon is in the system tray.

In case you want the connection to auto-start, select "Enable auto restart of active connections" in the settings menu (need release 2.6.0 or later OR GUI version 11.34+). Then any connection that was active when the GUI is terminated will auto-start the next time.

xmedeko commented 9 months ago

Yes, I have "Enable auto restart of active connections" checked. The use case is shut down computer and restart. The connection has auth-user-pass, do I have to type the password. That's OK. IMO the problem is, that the login dialog itself has not focus. (The password inside the dialog has focus, it has a cursor and the cursor is blinking.) It's enough to click on the login dialog top chrome, and I can type the password. See the screenshot just after I have clicked the tray icon:

obrazek

The close X button in the top right corner is gray, so the dialog has no focus. When it has focus, the X button is black. (And typing on a keyboard goes to the password field.)

selvanair commented 9 months ago
  • Windows 11 Pro
  • OpenVPN v2.6.6
  • OpenVPN GUI v11.44.0.0
  • Lang: cz

Yes, I have "Enable auto restart of active connections" checked. The use case is shut down computer and restart.

Auto-restart should work after shutdown-restart as well. You should not manually disconnect the VPN before closing the GUI or shutdown. Only then the connection will get recorded as a candidate for auto-start.

The connection has auth-user-pass, do I have to type the password. That's OK.

If you do not want to retype the password every time, select the option to save password on the login dialog box.

IMO the problem is, that the login dialog itself has not focus. (The password inside the dialog has focus, it has a cursor and the cursor is blinking.) It's enough to click on the login dialog top chrome, and I can type the password. See the screenshot just after I have clicked the tray icon:

obrazek

The close X button in the top right corner is gray, so the dialog has no focus. When it has focus, the X button is black. (And typing on a keyboard goes to the password field.)

From the screenshot, it looks like the login dialog popup does is not become the active Window. Does this also happen if you right click on the tray icon and select connect instead of double click?

@lstipakov any thoughts?

xmedeko commented 9 months ago

Does this also happen if you right click on the tray icon and select connect instead of double click?

No, when I right click on the tray icon and select connect the dialog has focus, I can type the password. When I double click by left mouse button, the dialog has no focus.