- XtAddEventHandler((Widget) m_frameShell, StructureNotifyMask,
- False, (XtEventHandler)wxFrameMapProc,
- (XtPointer)m_workArea);
-
- if (x > -1)
- XtVaSetValues((Widget) m_frameShell, XmNx, x, NULL);
- if (y > -1)
- XtVaSetValues((Widget) m_frameShell, XmNy, y, NULL);
- if (width > -1)
- XtVaSetValues((Widget) m_frameShell, XmNwidth, width, NULL);
- if (height > -1)
- XtVaSetValues((Widget) m_frameShell, XmNheight, height, NULL);
-
- m_mainWidget = m_frameWidget;
-
- ChangeFont(FALSE);
-
- // This patch comes from Torsten Liermann lier@lier1.muc.de
- if (XmIsMotifWMRunning( (Widget) m_frameShell ))
- {
- int decor = 0;
- if (style & wxRESIZE_BORDER)
- decor |= MWM_DECOR_RESIZEH;
- if (style & wxSYSTEM_MENU)
- decor |= MWM_DECOR_MENU;
- if ((style & wxCAPTION) ||
- (style & wxTINY_CAPTION_HORIZ) ||
- (style & wxTINY_CAPTION_VERT))
- decor |= MWM_DECOR_TITLE;
- if (style & wxTHICK_FRAME)
- decor |= MWM_DECOR_BORDER;
- if (style & wxTHICK_FRAME)
- decor |= MWM_DECOR_BORDER;
- if (style & wxMINIMIZE_BOX)
- decor |= MWM_DECOR_MINIMIZE;
- if (style & wxMAXIMIZE_BOX)
- decor |= MWM_DECOR_MAXIMIZE;
- XtVaSetValues((Widget) m_frameShell,XmNmwmDecorations,decor,NULL);
- }
- // This allows non-Motif window managers to support at least the
- // no-decorations case.
- else
- {
- if (style == 0)
- XtVaSetValues((Widget) m_frameShell,XmNoverrideRedirect,TRUE,NULL);
- }
- XtRealizeWidget((Widget) m_frameShell);