aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar staticfox2016-08-10 08:00:25 -0400
committerGravatar staticfox2016-08-10 08:00:25 -0400
commit9c9098af22dea7914ea1bfc96bb5e956c3f03db0 (patch)
tree156a1a8ac3c41eb2e79d76a4658e53cb998f3b39 /src
parentKviIrcView_events: Trailing tab (diff)
downloadKVIrc-9c9098af22dea7914ea1bfc96bb5e956c3f03db0.tar.gz
KVIrc-9c9098af22dea7914ea1bfc96bb5e956c3f03db0.tar.bz2
KVIrc-9c9098af22dea7914ea1bfc96bb5e956c3f03db0.zip
IPCSentinel: Fix launching on windows twice on irc url click
2 issues were happening 1) ::FindWindow() was searching for the incorrect class name, the class name of the window is Qt5QWindowIcon not QWidget (I'm guessing Qt changed it at some point or something) 2) We were not setting our window title, thus making it impossible to find the window at all. Fixes #1885
Diffstat (limited to 'src')
-rw-r--r--src/kvirc/kernel/KviIpcSentinel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/kvirc/kernel/KviIpcSentinel.cpp b/src/kvirc/kernel/KviIpcSentinel.cpp
index d78053d1b..dc9d7a737 100644
--- a/src/kvirc/kernel/KviIpcSentinel.cpp
+++ b/src/kvirc/kernel/KviIpcSentinel.cpp
@@ -37,13 +37,13 @@
static HWND kvi_win_findIpcSentinel()
{
- HWND hWnd = ::FindWindow("QWidget", "[Non-Commercial] - kvirc4_ipc_sentinel");
+ HWND hWnd = ::FindWindow("Qt5QWindowIcon", "[Non-Commercial] - kvirc4_ipc_sentinel");
if(hWnd)
return hWnd;
- hWnd = ::FindWindow("QWidget", "[Freeware] - kvirc4_ipc_sentinel");
+ hWnd = ::FindWindow("Qt5QWindowIcon", "[Freeware] - kvirc4_ipc_sentinel");
if(hWnd)
return hWnd;
- hWnd = ::FindWindow("QWidget", "kvirc4_ipc_sentinel");
+ hWnd = ::FindWindow("Qt5QWindowIcon", "kvirc4_ipc_sentinel");
return hWnd;
}
@@ -218,6 +218,7 @@ KviIpcSentinel::KviIpcSentinel()
setObjectName("kvirc4_ipc_sentinel");
#if defined(COMPILE_ON_WINDOWS) || defined(COMPILE_ON_MINGW)
setWindowFlags(Qt::FramelessWindowHint);
+ setWindowTitle("kvirc4_ipc_sentinel");
#else
#if defined(COMPILE_X11_SUPPORT) && defined(COMPILE_QX11INFO_SUPPORT)
kvi_ipcLoadAtoms();