summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-08-12 12:45:42 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-08-12 12:45:42 +0300
commitfa4c4d3167a504cdf55d5140de71960335124436 (patch)
treebc73c58dda7cf3eba286607b244867ea0674b6a6
parent6252b077a865d28a49d1fb111932f7d59074e54c (diff)
VoiceService: correct frame visibility
-rw-r--r--plugins/VoiceService/res/resource.rc2
-rw-r--r--plugins/VoiceService/src/frame.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/plugins/VoiceService/res/resource.rc b/plugins/VoiceService/res/resource.rc
index d64f495a9a..4d9963652f 100644
--- a/plugins/VoiceService/res/resource.rc
+++ b/plugins/VoiceService/res/resource.rc
@@ -27,7 +27,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
IDD_CALLS DIALOGEX 0, 0, 195, 225
-STYLE DS_FIXEDSYS | WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN
+STYLE DS_FIXEDSYS | WS_CHILD | WS_CLIPCHILDREN
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
diff --git a/plugins/VoiceService/src/frame.cpp b/plugins/VoiceService/src/frame.cpp
index acbad61551..2fbc1ca592 100644
--- a/plugins/VoiceService/src/frame.cpp
+++ b/plugins/VoiceService/src/frame.cpp
@@ -100,8 +100,8 @@ void ShowFrame(int id, HWND hwnd, int show)
return;
}
- BOOL bIsVisible = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS) & F_VISIBLE;
- if ((bIsVisible && show == SW_SHOW) || (!bIsVisible && show == SW_HIDE))
+ BOOL bIsVisible = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, frame_id)) & F_VISIBLE;
+ if ((bIsVisible && show == SW_HIDE) || (!bIsVisible && show == SW_SHOW))
CallService(MS_CLIST_FRAMES_SHFRAME, id, 0);
}
@@ -724,10 +724,14 @@ void InitFrames()
Frame.cbSize = sizeof(CLISTFrame);
Frame.szName.w = TranslateT("Voice Calls");
Frame.hWnd = hwnd_frame;
+ Frame.height = ICON_SIZE;
Frame.align = alBottom;
Frame.Flags = F_NOBORDER | F_LOCKED | F_UNICODE;
Frame.hIcon = g_plugin.getIcon(IDI_MAIN, true);
frame_id = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&Frame, 0);
+
+ int flags = CallService(MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, frame_id), 0);
+ CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_FLAGS, frame_id), flags & ~F_VISIBLE);
}
}