From: sungmin ha Date: Mon, 13 Jul 2015 05:47:43 +0000 (+0900) Subject: display: fixed for problem of white screen on windows X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~299 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1001082c0ed66888a26cc49ee41e0c8f9ad9b84e;p=sdk%2Femulator%2Fqemu.git display: fixed for problem of white screen on windows If the emulator received native event (erase background), emulator screen is changed to white screen. Change-Id: I8d4f67c0ba91056d6dce99018f5c623f554e4b5a Signed-off-by: sungmin ha --- diff --git a/tizen/src/display/qt5_supplement.cpp b/tizen/src/display/qt5_supplement.cpp index 824a1da7fa..d64f4ad4fe 100644 --- a/tizen/src/display/qt5_supplement.cpp +++ b/tizen/src/display/qt5_supplement.cpp @@ -80,6 +80,28 @@ public: int priority; }; +#ifdef CONFIG_WIN32 +class EventFilter : public QAbstractNativeEventFilter +{ +public: + virtual bool nativeEventFilter(const QByteArray &eventType, void *message, long *res) Q_DECL_OVERRIDE; +}; + +EventFilter *eventFilter = NULL; + +bool EventFilter::nativeEventFilter(const QByteArray &eventType, void *message, long *res) +{ + if (eventType == "windows_generic_MSG") { + MSG *msg = static_cast(message); + if (msg->message == WM_ERASEBKGND) { + qt5_graphic_hw_invalidate(); + } + } + + return false; +} +#endif + void qt5_gui_init(void) { QCoreApplication::setApplicationName("Tizen Emulator"); @@ -271,6 +293,9 @@ void qt5_destroy() mruInfo.sync(); /* clean up */ +#ifdef CONFIG_WIN32 + delete eventFilter; +#endif qt5App->flush(); mainwindow->closeController(); @@ -314,6 +339,11 @@ void qt5_early_prepare(bool isOnscreen) qInstallMessageHandler(qMessageOutput); qDebug() << "* Qt plugin library path:" << QCoreApplication::libraryPaths(); + +#ifdef CONFIG_WIN32 + eventFilter = new EventFilter(); + qt5App->installNativeEventFilter(eventFilter); +#endif } void qt5_prepare(void)