wxMiniFrame works again.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2002-01-27 19:54:13 +00:00
parent 31f3405236
commit 2c990ec083
4 changed files with 30 additions and 6 deletions

View File

@ -164,6 +164,13 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
if (win->m_isDragging) return TRUE;
GtkPizza *pizza = GTK_PIZZA(widget);
if (gdk_event->window != pizza->bin_window) return TRUE;
GdkFont *font = wxSMALL_FONT->GetInternalFont(1.0);
int height = font->ascent + font->descent+1;
if (gdk_event->y > height) return TRUE;
gdk_window_raise( win->m_widget->window );
gdk_pointer_grab( widget->window, FALSE,
@ -303,7 +310,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
style = style | wxCAPTION | wxFRAME_FLOAT_ON_PARENT;
style = style | wxCAPTION;
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
m_miniTitle = 13;
@ -317,6 +324,11 @@ 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)))
{

View File

@ -381,7 +381,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
m_widget = gtk_window_new( win_type );
if (m_parent && (GTK_IS_WINDOW(m_parent->m_widget)) &&
(HasFlag(wxFRAME_FLOAT_ON_PARENT) || (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)))
(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG))
{
gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
}

View File

@ -164,6 +164,13 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
if (win->m_isDragging) return TRUE;
GtkPizza *pizza = GTK_PIZZA(widget);
if (gdk_event->window != pizza->bin_window) return TRUE;
GdkFont *font = wxSMALL_FONT->GetInternalFont(1.0);
int height = font->ascent + font->descent+1;
if (gdk_event->y > height) return TRUE;
gdk_window_raise( win->m_widget->window );
gdk_pointer_grab( widget->window, FALSE,
@ -303,7 +310,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
style = style | wxCAPTION | wxFRAME_FLOAT_ON_PARENT;
style = style | wxCAPTION;
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
m_miniTitle = 13;
@ -317,6 +324,11 @@ 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)))
{

View File

@ -381,7 +381,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
m_widget = gtk_window_new( win_type );
if (m_parent && (GTK_IS_WINDOW(m_parent->m_widget)) &&
(HasFlag(wxFRAME_FLOAT_ON_PARENT) || (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)))
(GetExtraStyle() & wxTOPLEVEL_EX_DIALOG))
{
gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );
}