From a2ac55f54d4c63c2fe7495d03e646ffd447d17ac Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 11 Feb 2005 23:00:31 +0000 Subject: [PATCH] Make wxTLW::Raise() actually bring the window to the top and give it the WM's focus (if supported). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/toplevel.h | 2 ++ include/wx/gtk1/toplevel.h | 2 ++ src/gtk/toplevel.cpp | 9 +++++++++ src/gtk1/toplevel.cpp | 9 +++++++++ 4 files changed, 22 insertions(+) diff --git a/include/wx/gtk/toplevel.h b/include/wx/gtk/toplevel.h index 0e6dce8801..d4464c2ec9 100644 --- a/include/wx/gtk/toplevel.h +++ b/include/wx/gtk/toplevel.h @@ -64,6 +64,8 @@ public: virtual bool Show(bool show = TRUE); + virtual void Raise(); + virtual bool IsActive(); virtual void SetTitle( const wxString &title ); diff --git a/include/wx/gtk1/toplevel.h b/include/wx/gtk1/toplevel.h index 0e6dce8801..d4464c2ec9 100644 --- a/include/wx/gtk1/toplevel.h +++ b/include/wx/gtk1/toplevel.h @@ -64,6 +64,8 @@ public: virtual bool Show(bool show = TRUE); + virtual void Raise(); + virtual bool IsActive(); virtual void SetTitle( const wxString &title ); diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index c5cbc54a40..fb7300af9d 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -742,6 +742,15 @@ bool wxTopLevelWindowGTK::Show( bool show ) return wxWindow::Show( show ); } +void wxTopLevelWindowGTK::Raise() +{ +#ifdef __WXGTK20__ + gtk_window_present( GTK_WINDOW( m_widget ) ); +#else + wxWindow::Raise(); +#endif +} + void wxTopLevelWindowGTK::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) ) { wxFAIL_MSG( wxT("DoMoveWindow called for wxTopLevelWindowGTK") ); diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index c5cbc54a40..fb7300af9d 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -742,6 +742,15 @@ bool wxTopLevelWindowGTK::Show( bool show ) return wxWindow::Show( show ); } +void wxTopLevelWindowGTK::Raise() +{ +#ifdef __WXGTK20__ + gtk_window_present( GTK_WINDOW( m_widget ) ); +#else + wxWindow::Raise(); +#endif +} + void wxTopLevelWindowGTK::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) ) { wxFAIL_MSG( wxT("DoMoveWindow called for wxTopLevelWindowGTK") ); -- 2.45.2