Add ASAN build configuration, based on debug with ASAN
enabled. This might help finding crashes like in
https://github.com/OpenVPN/openvpn-gui/issues/548
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Since we use Visual Studio as generator, CMAKE_BUILD_TYPE doesn't make
sense, since configuration (release/debug) is specified on build step,
not configure step.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
There is no point in localizing "OpenVPN GUI"
tray icon tooltip. Remove it from resources and
replace with PACKAGE_NAME define.
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Switches to vcpkg-caching instead of directory caching.
While here, don't explicitely export VCPKG_ROOT.
run-vcpkg already takes care of that.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
- The policy setting is checked when GUI is started. Any change
in policy will be effective only after restarting the GUI.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
- Only "hot" user input -- i.e, freshly typed password starting
from an empty string, with keyboard focus still in the edit
box -- can be revealed.
In particular, prefilled passwod (from cached value) cannot be
revealed.
- Once keyboard focus moves out of the password edit box, the inpit has
to be deleted for the reveal feature to get re-enabled.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Commit 2b1e586
"Replace Sleep by a Wait function that pumps messages"
replaced Sleep() with a wait function which also processes messages.
However WM_MANAGEMENT message in some cases requires actual delay to be
processed. To achieve that, bring back original Sleep().
Signed-off-by: Lev Stipakov <lev@openvpn.net>
- commit f8a243fbe introduced removing the tray icon during
the wait for exit to avoid further user interaction. This
is done in StopAllOpenVPN(). However, this function is also
reused for processing WM_OVPN_STOPALL message received from
a second instance via --comamnd disconnect_all. In this case
the tray icon should not be removed as we are not exiting.
Fixes issue #607
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Modal dialogs opened within the connection thread may
hang around if the connection restarts. Intercept the state
change message and call EndDialog when that happens.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
During the wait for threads to exit, we no longer sleep, but
continue pumping messages. Disable the tray icon during this
period to not allow user interaction with the main menu.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
- The wait function optionally calls IsDialogMessage() if a dialog
handle is specified. For other customizations the caller can
install a WH_MSGFILTER hook. The hook will get called with
nCode = MSGF_OVPN_WAIT and lParam = &msg.
- Use this in place of Sleep in main.c, scripts.c and PLAP dll.
Fixes#576
Signed-off-by: Selva Nair <selva.nair@gmail.com>
For all dialogs in a thread, set its status window in the same
thread as the owner.
Also set the owner of message boxes appropriately instead of
using NULL. This has the side effect of some of the modal message
popups blocking access to the status Window until dismissed.
Next:
Replace Sleep by a wait that pumps messages.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
- Automatic scroll sometimes does not appear to work as expected.
Add an explicit command to scroll to current selection.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
- WM_CLOSE is sent if the process is terminated from task manager
or by taskkill etc. Waiting for user confirmation in such cases
leads to abnormal termination of process leaving behind openvpn.exe,
active connections state not saved to the registry etc.
CloseApplication() now gets a second argument ask_user.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
- Also call Kill the IDT_STOP_TIMER in StatusDialogFunc. Though timers
will get destroyed during Window destruction an explicit KillTimer
in case still running is the "right" thing to do.
Signed-off-by: Selva Nair <selva.nair@gmail.com>