From 7cee4f76216597fafeddb725f93b1ac7fd7685f0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 5 Feb 2012 14:18:22 +0000 Subject: [PATCH] No changes, just implement Raise() in wxTopLevelWindow in wxMSW. Get rid of two identical implementations in wxFrame and wxDialog and only override this function once in wxTopLevelWindow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/dialog.h | 2 -- include/wx/msw/frame.h | 1 - include/wx/msw/toplevel.h | 1 + src/msw/dialog.cpp | 5 ----- src/msw/frame.cpp | 5 ----- src/msw/toplevel.cpp | 5 +++++ 6 files changed, 6 insertions(+), 13 deletions(-) diff --git a/include/wx/msw/dialog.h b/include/wx/msw/dialog.h index 32ff8acd0d..8e799611ff 100644 --- a/include/wx/msw/dialog.h +++ b/include/wx/msw/dialog.h @@ -92,8 +92,6 @@ public: // override some base class virtuals virtual bool Show(bool show = true); - virtual void Raise(); - #if wxUSE_DIALOG_SIZEGRIP virtual void SetWindowStyleFlag(long style); #endif // wxUSE_DIALOG_SIZEGRIP diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 177bbb65b4..2ea3ed670f 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -42,7 +42,6 @@ public: // implement base class pure virtuals virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); - virtual void Raise(); // implementation only from now on // ------------------------------- diff --git a/include/wx/msw/toplevel.h b/include/wx/msw/toplevel.h index ec937af348..e0a7453b68 100644 --- a/include/wx/msw/toplevel.h +++ b/include/wx/msw/toplevel.h @@ -60,6 +60,7 @@ public: virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); virtual bool Show(bool show = true); + virtual void Raise(); virtual void ShowWithoutActivating(); virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL); diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 3e54725e3a..89d294e760 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -194,11 +194,6 @@ bool wxDialog::Show(bool show) return true; } -void wxDialog::Raise() -{ - ::SetForegroundWindow(GetHwnd()); -} - // show dialog modally int wxDialog::ShowModal() { diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 6fb620f448..40babb6805 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -239,11 +239,6 @@ void wxFrame::DoGetClientSize(int *x, int *y) const // wxFrame: various geometry-related functions // ---------------------------------------------------------------------------- -void wxFrame::Raise() -{ - ::SetForegroundWindow(GetHwnd()); -} - // generate an artificial resize event void wxFrame::SendSizeEvent(int flags) { diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 7adf8c6925..51972423ad 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -727,6 +727,11 @@ bool wxTopLevelWindowMSW::Show(bool show) return true; } +void wxTopLevelWindowMSW::Raise() +{ + ::SetForegroundWindow(GetHwnd()); +} + // ---------------------------------------------------------------------------- // wxTopLevelWindowMSW maximize/minimize // ---------------------------------------------------------------------------- -- 2.45.2