Compare commits

...

3 Commits

Author SHA1 Message Date
c251f568a9 Make ZRCola window always-on-top while composing
Microsoft Remote Desktop introduced a bug in Windows 10 Falls Update
(1709 release) keeping Remote Desktop window always-on-top. This
prevents ZRCola window to pop-up on Win+F5.

This patch addresses this issue by temporarily making ZRCola window
always-on-top when called by Win+F5/F6, and restoring it back to normal
when finished by F5/F6 or dismissed by Esc.
2019-03-12 20:51:44 +01:00
8c2dd29f39 Upgrade to latest WinStd library
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-12 20:50:35 +01:00
360f42868d Trigger per-user setup on logon 2019-03-12 20:50:35 +01:00
7 changed files with 10 additions and 6 deletions

@ -1 +1 @@
Subproject commit 06230f6ebd386a0e8f559d3857634dfa83cb73e3
Subproject commit 320f7e9ee5b96610579639a8096b29158b8b2efd

View File

@ -90,7 +90,7 @@ public:
protected:
#ifdef __WXMSW__
winstd::win_handle m_running; ///< Global Win32 event to determine if another instance of ZRCola is already running
winstd::win_handle<NULL> m_running; ///< Global Win32 event to determine if another instance of ZRCola is already running
#endif
};

View File

@ -324,6 +324,7 @@ void wxZRColaFrame::OnSendAbort(wxCommandEvent& event)
{
if (m_hWndSource) {
// Return focus to the source window.
::SetWindowPos(m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
if (m_wasIconised) Iconize();
::SetActiveWindow(m_hWndSource);
::SetForegroundWindow(m_hWndSource);
@ -608,6 +609,7 @@ void wxZRColaFrame::DoSend(const wxString& str)
}
// Return focus to the source window and send the input.
::SetWindowPos(m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
if (m_wasIconised) Iconize();
::SetActiveWindow(m_hWndSource);
::SetForegroundWindow(m_hWndSource);
@ -629,6 +631,7 @@ void wxZRColaFrame::DoCopyAndReturn(const wxString& str)
}
// Return focus to the source window.
::SetWindowPos(m_hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
if (m_wasIconised) Iconize();
::SetActiveWindow(m_hWndSource);
::SetForegroundWindow(m_hWndSource);
@ -697,6 +700,7 @@ WXLRESULT wxZRColaFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM
Show(true);
Iconize(false);
Raise();
::SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
::SetActiveWindow(m_hWnd);
//} else if (wxAppBarIsDocked(m_state)) {
// // ZRCola window is currently docked.

View File

@ -56,7 +56,7 @@ void ZRCola::DBSource::character_bank::build_related()
ZRCola::DBSource::character_bank::build_related_worker::build_related_worker(_In_ const character_bank *cb, _In_ iterator from, _In_ iterator to) :
win_handle((HANDLE)_beginthreadex(NULL, 0, process, this, CREATE_SUSPENDED, NULL)),
win_handle<INVALID_HANDLE_VALUE>((HANDLE)_beginthreadex(NULL, 0, process, this, CREATE_SUSPENDED, NULL)),
m_heap(HeapCreate(0, 0, 0)),
m_cb(cb),
m_from(from),

View File

@ -269,14 +269,14 @@ namespace ZRCola {
void build_related();
protected:
class build_related_worker : public winstd::win_handle
class build_related_worker : public winstd::win_handle<INVALID_HANDLE_VALUE>
{
public:
build_related_worker(_In_ const character_bank *cb, _In_ iterator from, _In_ iterator to);
inline void join()
{
if (m_h)
if (m_h != invalid)
WaitForSingleObject(m_h, INFINITE);
}

Binary file not shown.

@ -1 +1 @@
Subproject commit 51a82c242fe35b6cc1444cb6c61e8004704c13c8
Subproject commit f47faea71bd5f0dec9b549a6ebd6f5a711b805c8