Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ツールバーの表示ON/OFFを行うとちらつく現象への対策 #533

Merged
merged 2 commits into from
Oct 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions sakura_core/window/CEditWnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,7 @@ void CEditWnd::EndLayoutBars( BOOL bAdjust/* = TRUE*/ )
RECT rc;
m_cSplitterWnd.DoSplit( -1, -1 );
::GetClientRect( GetHwnd(), &rc );
::SendMessage( GetHwnd(), WM_SIZE, 0, 0 ); // ツールバーの表示ON/OFFを行うとちらつきが発生する事への対策
::SendMessage( GetHwnd(), WM_SIZE, m_nWinSizeType, MAKELONG( rc.right - rc.left, rc.bottom - rc.top ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

問題が発生するときの m_nWinSizeType の値は何になっていますか?
(https://docs.microsoft.com/en-us/windows/desktop/winmsg/wm-size の wParam)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m_nWinSizeType の値は 0 になっている事を確認しました。

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

これたぶん、前回の WM_SIZE で送られてきた wParam のキャッシュだと思います。

最近のwindowsのサイズ変更シーケンスは複雑なので、
ここのキャッシュに意味があるかどうか結構微妙だと思っとります。
SIZE_RESTORED(=0) の決め打ちで指定してやってもいいような気がします。

::RedrawWindow( GetHwnd(), NULL, NULL, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW ); // ステータスバーに必要?

Expand Down