summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_gui.h2
-rw-r--r--src/mir_core/src/ui_utils.cpp13
2 files changed, 11 insertions, 4 deletions
diff --git a/include/m_gui.h b/include/m_gui.h
index dfeabe7dd0..698ee81ba6 100644
--- a/include/m_gui.h
+++ b/include/m_gui.h
@@ -602,7 +602,7 @@ protected:
virtual LRESULT CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam) override;
virtual void OnInit() override;
- int m_iPosition;
+ int m_iPosition, m_iCount;
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp
index c5f69082d8..20b2a34140 100644
--- a/src/mir_core/src/ui_utils.cpp
+++ b/src/mir_core/src/ui_utils.cpp
@@ -2575,7 +2575,8 @@ void CCtrlPages::OnDestroy()
CSplitter::CSplitter(CDlgBase *wnd, int idCtrl)
: CCtrlBase(wnd, idCtrl),
- m_iPosition(0)
+ m_iPosition(0),
+ m_iCount(0)
{
}
@@ -2587,13 +2588,12 @@ void CSplitter::OnInit()
LRESULT CSplitter::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
- RECT rc;
-
switch (msg) {
case WM_NCHITTEST:
return HTCLIENT;
case WM_SETCURSOR:
+ RECT rc;
GetClientRect(m_hwnd, &rc);
SetCursor(rc.right > rc.bottom ? g_hCursorNS : g_hCursorWE);
return TRUE;
@@ -2618,11 +2618,18 @@ LRESULT CSplitter::CustomWndProc(UINT msg, WPARAM wParam, LPARAM lParam)
}
OnChange(this);
+
+ if (m_iCount == 3) {
+ m_iCount = 0;
+ PostMessage(m_parentWnd->GetHwnd(), WM_SIZE, 0, 0);
+ }
+ else m_iCount++;
}
return 0;
case WM_LBUTTONUP:
ReleaseCapture();
+ PostMessage(m_parentWnd->GetHwnd(), WM_SIZE, 0, 0);
return 0;
}