diff --git a/docs/latex/wx/frame.tex b/docs/latex/wx/frame.tex index b775220626..e6ec525ca4 100644 --- a/docs/latex/wx/frame.tex +++ b/docs/latex/wx/frame.tex @@ -38,7 +38,7 @@ application windows. \twocolitem{\windowstyle{wxRESIZE\_BORDER}}{Displays a resizeable border around the window (Unix only).} \twocolitem{\windowstyle{wxFRAME\_FLOAT\_ON\_PARENT}}{Causes the frame to be above the parent window in the z-order and not shown in the taskbar. Without this style, frames are created as top-level windows that may be obscured by -the parent window, and frame titles are shown in the taskbar. Windows only. } +the parent window, and frame titles are shown in the taskbar. Windows and GTK. } \twocolitem{\windowstyle{wxFRAME\_TOOL\_WINDOW}}{Causes a frame with a small titlebar to be created; the frame title does not appear in the taskbar. Windows only. } \end{twocollist} diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index a5e3a916d9..6f7ffa47a8 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -253,9 +253,9 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) position in "realize" */ gtk_widget_set_uposition( widget, win->m_x, win->m_y ); - if (win->m_miniEdge > 0) + if ((win->m_miniEdge > 0) || (win->HasFlag(wxSIMPLE_BORDER))) { - /* This is a mini-frame. */ + /* This is a mini-frame or a borderless frame. */ gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 ); gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 ); } @@ -440,10 +440,12 @@ bool wxFrame::Create( wxWindow *parent, m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame; GtkWindowType win_type = GTK_WINDOW_TOPLEVEL; - if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP; m_widget = gtk_window_new( win_type ); + if ((m_parent) && (HasFlag(wxFRAME_FLOAT_ON_PARENT)) && (GTK_IS_WINDOW(m_parent->m_widget))) + gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) ); + if (!name.IsEmpty()) gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() ); diff --git a/src/gtk/minifram.cpp b/src/gtk/minifram.cpp index 49de6bc095..4a48fe1ecf 100644 --- a/src/gtk/minifram.cpp +++ b/src/gtk/minifram.cpp @@ -303,8 +303,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { -// style = style | wxSIMPLE_BORDER; - style = style | wxCAPTION; + style = style | wxCAPTION | wxFRAME_FLOAT_ON_PARENT; if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)) m_miniTitle = 13; @@ -318,9 +317,6 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title wxFrame::Create( parent, id, title, pos, size, style, name ); - if ((m_parent) && (GTK_IS_WINDOW(m_parent->m_widget))) - gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) ); - if ((style & wxSYSTEM_MENU) && ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))) { diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index a5e3a916d9..6f7ffa47a8 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -253,9 +253,9 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) position in "realize" */ gtk_widget_set_uposition( widget, win->m_x, win->m_y ); - if (win->m_miniEdge > 0) + if ((win->m_miniEdge > 0) || (win->HasFlag(wxSIMPLE_BORDER))) { - /* This is a mini-frame. */ + /* This is a mini-frame or a borderless frame. */ gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 ); gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 ); } @@ -440,10 +440,12 @@ bool wxFrame::Create( wxWindow *parent, m_insertCallback = (wxInsertChildFunction) wxInsertChildInFrame; GtkWindowType win_type = GTK_WINDOW_TOPLEVEL; - if (style & wxSIMPLE_BORDER) win_type = GTK_WINDOW_POPUP; m_widget = gtk_window_new( win_type ); + if ((m_parent) && (HasFlag(wxFRAME_FLOAT_ON_PARENT)) && (GTK_IS_WINDOW(m_parent->m_widget))) + gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) ); + if (!name.IsEmpty()) gtk_window_set_wmclass( GTK_WINDOW(m_widget), name.mb_str(), name.mb_str() ); diff --git a/src/gtk1/minifram.cpp b/src/gtk1/minifram.cpp index 49de6bc095..4a48fe1ecf 100644 --- a/src/gtk1/minifram.cpp +++ b/src/gtk1/minifram.cpp @@ -303,8 +303,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { -// style = style | wxSIMPLE_BORDER; - style = style | wxCAPTION; + style = style | wxCAPTION | wxFRAME_FLOAT_ON_PARENT; if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT)) m_miniTitle = 13; @@ -318,9 +317,6 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title wxFrame::Create( parent, id, title, pos, size, style, name ); - if ((m_parent) && (GTK_IS_WINDOW(m_parent->m_widget))) - gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) ); - if ((style & wxSYSTEM_MENU) && ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))) {