Modified WM hints handling which should be much better now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-05-05 21:16:16 +00:00
parent 08fc17448a
commit aa64626e23
7 changed files with 82 additions and 49 deletions

View File

@@ -191,26 +191,36 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win )
/* 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_ALL;
long func = (long) GDK_FUNC_ALL;
long decor = (long) 0;
long func = (long) GDK_FUNC_MOVE|GDK_FUNC_CLOSE;
if ((win->m_windowStyle & wxCAPTION) == 0)
if ((win->m_windowStyle & wxCAPTION) != 0)
decor |= GDK_DECOR_TITLE;
if ((win->m_windowStyle & wxSYSTEM_MENU) == 0)
decor |= GDK_DECOR_MENU;
if ((win->m_windowStyle & wxMINIMIZE_BOX) == 0)
if ((win->m_windowStyle & wxSYSTEM_MENU) != 0)
{
decor |= GDK_DECOR_MENU;
func |= GDK_FUNC_CLOSE;
}
if ((win->m_windowStyle & wxMINIMIZE_BOX) != 0)
{
func |= GDK_FUNC_MINIMIZE;
decor |= GDK_DECOR_MINIMIZE;
decor |= GDK_DECOR_BORDER;
}
if ((win->m_windowStyle & wxMAXIMIZE_BOX) == 0)
if ((win->m_windowStyle & wxMAXIMIZE_BOX) != 0)
{
func |= GDK_FUNC_MAXIMIZE;
decor |= GDK_DECOR_MAXIMIZE;
decor |= GDK_DECOR_BORDER;
}
if ((win->m_windowStyle & wxRESIZE_BORDER) == 0)
func |= GDK_FUNC_RESIZE;
if ((win->m_windowStyle & wxRESIZE_BORDER) != 0)
{
func |= GDK_FUNC_RESIZE;
decor |= GDK_DECOR_RESIZEH;
decor |= GDK_DECOR_BORDER;
}
gdk_window_set_decorations( win->m_widget->window, (GdkWMDecoration)decor);
gdk_window_set_functions( win->m_widget->window, (GdkWMFunction)func);