From 46aa0c9e7bae4b77eb140be94672a7df0f83b60c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 7 Aug 2012 10:12:09 +0000 Subject: [PATCH] Make the modal print preview window behave like a modal dialog. It's unexpected for a modal dialog window to show up in the taskbar as app's another window. It also shouldn't be possible to minimize a modal window, because it's very confusing when a window is unresponsive without a clear reason, because the modal child is hidden in the taskbar. Set wxFRAME_NO_TASKBAR and remove wxMINIMIZE_BOX to fix this. Do it only for wxPreviewFrame_AppModal. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/prntbase.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 4aebfb1b51..d78cc04595 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -1705,6 +1705,13 @@ void wxPreviewFrame::InitializeWithModality(wxPreviewFrameModalityKind kind) break; } + if ( m_modalityKind != wxPreviewFrame_NonModal ) + { + // Behave like modal dialogs, don't show in taskbar. This implies + // removing the minimize box, because minimizing windows without + // taskbar entry is confusing. + SetWindowStyle(GetWindowStyle() & ~wxMINIMIZE_BOX | wxFRAME_NO_TASKBAR); + } Layout(); -- 2.45.2