X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa755cf187ebfb1c0b9ef4952053c91a3277a7ae..99646f7ee4afb3d7d929e1d396e56de8c1aed622:/src/gtk1/frame.cpp diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index 6ec8172194..8816caaa2b 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -252,7 +252,7 @@ gtk_frame_realized_callback( GtkWidget * WXUNUSED(widget), wxFrame *win ) if (g_isIdle) wxapp_install_idle_handler(); - if ((win->m_miniEdge > 0) || (win->HasFlag(wxSIMPLE_BORDER))) + if ((win->m_miniEdge > 0) || (win->HasFlag(wxSIMPLE_BORDER)) || (win->HasFlag(wxNO_BORDER))) { /* This is a mini-frame or a borderless frame. */ gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 ); @@ -411,6 +411,7 @@ bool wxFrame::Create( wxWindow *parent, wxTopLevelWindows.Append( this ); m_needParent = FALSE; + m_fsIsShowing = FALSE; if (!PreCreation( parent, pos, size ) || !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) @@ -424,6 +425,9 @@ bool wxFrame::Create( wxWindow *parent, m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame; GtkWindowType win_type = GTK_WINDOW_TOPLEVEL; + + if (style & wxFRAME_TOOL_WINDOW) + win_type = GTK_WINDOW_POPUP; m_widget = gtk_window_new( win_type ); @@ -512,6 +516,48 @@ wxFrame::~wxFrame() } } +bool wxFrame::ShowFullScreen(bool show, long style ) +{ + if (show == m_fsIsShowing) return FALSE; // return what? + + m_fsIsShowing = show; + + if (show) + { + m_fsSaveStyle = m_windowStyle; + m_fsSaveFlag = style; + GetPosition( &m_fsSaveFrame.x, &m_fsSaveFrame.y ); + GetSize( &m_fsSaveFrame.width, &m_fsSaveFrame.height ); + + gtk_widget_hide( m_widget ); + gtk_widget_unrealize( m_widget ); + + m_windowStyle = wxSIMPLE_BORDER; + + int x; + int y; + wxDisplaySize( &x, &y ); + SetSize( 0, 0, x, y ); + + gtk_widget_realize( m_widget ); + gtk_widget_show( m_widget ); + } + else + { + gtk_widget_hide( m_widget ); + gtk_widget_unrealize( m_widget ); + + m_windowStyle = m_fsSaveStyle; + + SetSize( m_fsSaveFrame.x, m_fsSaveFrame.y, m_fsSaveFrame.width, m_fsSaveFrame.height ); + + gtk_widget_realize( m_widget ); + gtk_widget_show( m_widget ); + } + + return TRUE; +} + // ---------------------------------------------------------------------------- // overridden wxWindow methods // ----------------------------------------------------------------------------