Fixed mini-frame problems.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -253,36 +253,45 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
|||||||
position in "realize" */
|
position in "realize" */
|
||||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||||
|
|
||||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
if (win->m_miniEdge > 0)
|
||||||
recognized by other WM as well. not tested. */
|
{
|
||||||
long decor = (long) GDK_DECOR_BORDER;
|
/* This is a mini-frame. */
|
||||||
long func = (long) GDK_FUNC_MOVE;
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 );
|
||||||
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* All this is for Motif Window Manager "hints" and is supposed to be
|
||||||
|
recognized by other WM as well. Not tested. */
|
||||||
|
long decor = (long) GDK_DECOR_BORDER;
|
||||||
|
long func = (long) GDK_FUNC_MOVE;
|
||||||
|
|
||||||
if ((win->GetWindowStyle() & wxCAPTION) != 0)
|
if ((win->GetWindowStyle() & wxCAPTION) != 0)
|
||||||
decor |= GDK_DECOR_TITLE;
|
decor |= GDK_DECOR_TITLE;
|
||||||
if ((win->GetWindowStyle() & wxSYSTEM_MENU) != 0)
|
if ((win->GetWindowStyle() & wxSYSTEM_MENU) != 0)
|
||||||
{
|
{
|
||||||
decor |= GDK_DECOR_MENU;
|
decor |= GDK_DECOR_MENU;
|
||||||
func |= GDK_FUNC_CLOSE;
|
func |= GDK_FUNC_CLOSE;
|
||||||
}
|
}
|
||||||
if ((win->GetWindowStyle() & wxMINIMIZE_BOX) != 0)
|
if ((win->GetWindowStyle() & wxMINIMIZE_BOX) != 0)
|
||||||
{
|
{
|
||||||
func |= GDK_FUNC_MINIMIZE;
|
func |= GDK_FUNC_MINIMIZE;
|
||||||
decor |= GDK_DECOR_MINIMIZE;
|
decor |= GDK_DECOR_MINIMIZE;
|
||||||
}
|
}
|
||||||
if ((win->GetWindowStyle() & wxMAXIMIZE_BOX) != 0)
|
if ((win->GetWindowStyle() & wxMAXIMIZE_BOX) != 0)
|
||||||
{
|
{
|
||||||
func |= GDK_FUNC_MAXIMIZE;
|
func |= GDK_FUNC_MAXIMIZE;
|
||||||
decor |= GDK_DECOR_MAXIMIZE;
|
decor |= GDK_DECOR_MAXIMIZE;
|
||||||
}
|
}
|
||||||
if ((win->GetWindowStyle() & wxRESIZE_BORDER) != 0)
|
if ((win->GetWindowStyle() & wxRESIZE_BORDER) != 0)
|
||||||
{
|
{
|
||||||
func |= GDK_FUNC_RESIZE;
|
func |= GDK_FUNC_RESIZE;
|
||||||
decor |= GDK_DECOR_RESIZEH;
|
decor |= GDK_DECOR_RESIZEH;
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
||||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
||||||
|
}
|
||||||
|
|
||||||
/* GTK's shrinking/growing policy */
|
/* GTK's shrinking/growing policy */
|
||||||
if ((win->GetWindowStyle() & wxRESIZE_BORDER) == 0)
|
if ((win->GetWindowStyle() & wxRESIZE_BORDER) == 0)
|
||||||
|
@@ -303,7 +303,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
style = style | wxSIMPLE_BORDER;
|
// style = style | wxSIMPLE_BORDER;
|
||||||
style = style | wxCAPTION;
|
style = style | wxCAPTION;
|
||||||
|
|
||||||
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
||||||
|
@@ -253,36 +253,45 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
|
|||||||
position in "realize" */
|
position in "realize" */
|
||||||
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
gtk_widget_set_uposition( widget, win->m_x, win->m_y );
|
||||||
|
|
||||||
/* all this is for Motif Window Manager "hints" and is supposed to be
|
if (win->m_miniEdge > 0)
|
||||||
recognized by other WM as well. not tested. */
|
{
|
||||||
long decor = (long) GDK_DECOR_BORDER;
|
/* This is a mini-frame. */
|
||||||
long func = (long) GDK_FUNC_MOVE;
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)0 );
|
||||||
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)0 );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* All this is for Motif Window Manager "hints" and is supposed to be
|
||||||
|
recognized by other WM as well. Not tested. */
|
||||||
|
long decor = (long) GDK_DECOR_BORDER;
|
||||||
|
long func = (long) GDK_FUNC_MOVE;
|
||||||
|
|
||||||
if ((win->GetWindowStyle() & wxCAPTION) != 0)
|
if ((win->GetWindowStyle() & wxCAPTION) != 0)
|
||||||
decor |= GDK_DECOR_TITLE;
|
decor |= GDK_DECOR_TITLE;
|
||||||
if ((win->GetWindowStyle() & wxSYSTEM_MENU) != 0)
|
if ((win->GetWindowStyle() & wxSYSTEM_MENU) != 0)
|
||||||
{
|
{
|
||||||
decor |= GDK_DECOR_MENU;
|
decor |= GDK_DECOR_MENU;
|
||||||
func |= GDK_FUNC_CLOSE;
|
func |= GDK_FUNC_CLOSE;
|
||||||
}
|
}
|
||||||
if ((win->GetWindowStyle() & wxMINIMIZE_BOX) != 0)
|
if ((win->GetWindowStyle() & wxMINIMIZE_BOX) != 0)
|
||||||
{
|
{
|
||||||
func |= GDK_FUNC_MINIMIZE;
|
func |= GDK_FUNC_MINIMIZE;
|
||||||
decor |= GDK_DECOR_MINIMIZE;
|
decor |= GDK_DECOR_MINIMIZE;
|
||||||
}
|
}
|
||||||
if ((win->GetWindowStyle() & wxMAXIMIZE_BOX) != 0)
|
if ((win->GetWindowStyle() & wxMAXIMIZE_BOX) != 0)
|
||||||
{
|
{
|
||||||
func |= GDK_FUNC_MAXIMIZE;
|
func |= GDK_FUNC_MAXIMIZE;
|
||||||
decor |= GDK_DECOR_MAXIMIZE;
|
decor |= GDK_DECOR_MAXIMIZE;
|
||||||
}
|
}
|
||||||
if ((win->GetWindowStyle() & wxRESIZE_BORDER) != 0)
|
if ((win->GetWindowStyle() & wxRESIZE_BORDER) != 0)
|
||||||
{
|
{
|
||||||
func |= GDK_FUNC_RESIZE;
|
func |= GDK_FUNC_RESIZE;
|
||||||
decor |= GDK_DECOR_RESIZEH;
|
decor |= GDK_DECOR_RESIZEH;
|
||||||
}
|
}
|
||||||
|
|
||||||
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
|
||||||
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);
|
||||||
|
}
|
||||||
|
|
||||||
/* GTK's shrinking/growing policy */
|
/* GTK's shrinking/growing policy */
|
||||||
if ((win->GetWindowStyle() & wxRESIZE_BORDER) == 0)
|
if ((win->GetWindowStyle() & wxRESIZE_BORDER) == 0)
|
||||||
|
@@ -303,7 +303,7 @@ bool wxMiniFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title
|
|||||||
const wxPoint &pos, const wxSize &size,
|
const wxPoint &pos, const wxSize &size,
|
||||||
long style, const wxString &name )
|
long style, const wxString &name )
|
||||||
{
|
{
|
||||||
style = style | wxSIMPLE_BORDER;
|
// style = style | wxSIMPLE_BORDER;
|
||||||
style = style | wxCAPTION;
|
style = style | wxCAPTION;
|
||||||
|
|
||||||
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
if ((style & wxCAPTION) || (style & wxTINY_CAPTION_HORIZ) || (style & wxTINY_CAPTION_VERT))
|
||||||
|
Reference in New Issue
Block a user