From f7b6602f106cca5599662dac05251574ac415b47 Mon Sep 17 00:00:00 2001 From: Ilari Liusvaara Date: Wed, 3 Apr 2013 18:37:15 +0300 Subject: [PATCH] Actually fix the statuspane/movie-editor flicker --- include/platform/wxwidgets/window_status.hpp | 1 + src/platform/wxwidgets/editor-movie.cpp | 7 +++++++ src/platform/wxwidgets/status.cpp | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/include/platform/wxwidgets/window_status.hpp b/include/platform/wxwidgets/window_status.hpp index cb63790a..dc74efda 100644 --- a/include/platform/wxwidgets/window_status.hpp +++ b/include/platform/wxwidgets/window_status.hpp @@ -16,6 +16,7 @@ public: bool AcceptsFocus () const; void on_focus(wxFocusEvent& e); void on_paint(wxPaintEvent& e); + void on_erase(wxEraseEvent& e); bool dirty; wxWindow* parent; wxWindow* tfocuswin; diff --git a/src/platform/wxwidgets/editor-movie.cpp b/src/platform/wxwidgets/editor-movie.cpp index 63762ae6..4eec8706 100644 --- a/src/platform/wxwidgets/editor-movie.cpp +++ b/src/platform/wxwidgets/editor-movie.cpp @@ -353,6 +353,7 @@ private: void signal_repaint(); void on_scroll(wxScrollEvent& e); void on_paint(wxPaintEvent& e); + void on_erase(wxEraseEvent& e); void on_mouse(wxMouseEvent& e); void on_popup_menu(wxCommandEvent& e); private: @@ -465,6 +466,7 @@ wxeditor_movie::_moviepanel::_moviepanel(wxeditor_movie* v) { m = v; Connect(wxEVT_PAINT, wxPaintEventHandler(_moviepanel::on_paint), NULL, this); + Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(_moviepanel::on_erase), NULL, this); new_width = 0; new_height = 0; moviepos = 0; @@ -1265,6 +1267,11 @@ void wxeditor_movie::_moviepanel::on_scroll(wxScrollEvent& e) signal_repaint(); } +void wxeditor_movie::_moviepanel::on_erase(wxEraseEvent& e) +{ + //Blank. +} + void wxeditor_movie::_moviepanel::on_paint(wxPaintEvent& e) { auto size = fb.get_pixels(); diff --git a/src/platform/wxwidgets/status.cpp b/src/platform/wxwidgets/status.cpp index 550bcedc..339b9e35 100644 --- a/src/platform/wxwidgets/status.cpp +++ b/src/platform/wxwidgets/status.cpp @@ -30,11 +30,17 @@ wxwin_status::panel::panel(wxWindow* _parent, wxWindow* focuswin, unsigned lines auto s = statusvars.get_pixels(); SetMinSize(wxSize(s.first, s.second)); this->Connect(wxEVT_PAINT, wxPaintEventHandler(wxwin_status::panel::on_paint), NULL, this); + this->Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler(panel::on_erase), NULL, this); this->Connect(wxEVT_SET_FOCUS, wxFocusEventHandler(wxwin_status::panel::on_focus), NULL, this); watch_flag = 0; previous_size = 0; } +void wxwin_status::panel::on_erase(wxEraseEvent& e) +{ + //Blank. +} + bool wxwin_status::panel::AcceptsFocus () const { return false;