From fada5fa044b5ab85c4c55512cb16dbb7104ba7f2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 28 Nov 2023 19:54:43 +0100 Subject: [PATCH] Make wxWebViewChromium::OnSize() private Also make a couple of cosmetic/style fixes. No real changes, just don't leave the event handler public when it doesn't have to be. --- include/wx/webview_chromium.h | 4 ++-- src/common/webview_chromium.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 6036b2dde9..3bf161c81c 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -43,8 +43,6 @@ public: ~wxWebViewChromium(); - void OnSize(wxSizeEvent &event); - void SetPageSource(const wxString& pageSource); void SetPageText(const wxString& pageText); @@ -136,6 +134,8 @@ private: // Common part of all ctors. void Init(); + void OnSize(wxSizeEvent& event); + // Actually create the browser: this can only be done once the window is // created in wxGTK. bool DoCreateBrowser(const wxString& url); diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 6f953a685f..5390283f28 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -490,7 +490,7 @@ bool wxWebViewChromium::Create(wxWindow* parent, return false; #endif - this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); + Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); Bind(wxEVT_IDLE, [](wxIdleEvent&) { CefDoMessageLoopWork(); });