From 793b8d519ec2ad1c37c6d5337c1af3e59854ef39 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 2 Jun 2014 01:15:16 +0000 Subject: [PATCH] Ensure that wxPreviewCanvas always gets idle event. Use wxWS_EX_PROCESS_IDLE flag to ensure that the print preview receives idle events even when wxIDLE_PROCESS_SPECIFIED global idle mode is used. Closes #15104. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76652 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/prntbase.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 0fed83a137..0009241506 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -855,6 +855,10 @@ wxPreviewCanvas::wxPreviewCanvas(wxPrintPreviewBase *preview, wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, const wxString& name): wxScrolledWindow(parent, wxID_ANY, pos, size, style | wxFULL_REPAINT_ON_RESIZE, name) { + // As we rely on getting idle events, do this to ensure that we do receive + // them even when using wxIDLE_PROCESS_SPECIFIED global idle mode. + SetExtraStyle(wxWS_EX_PROCESS_IDLE); + m_printPreview = preview; #ifdef __WXMAC__ // The app workspace colour is always white, but we should have