X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0492c5a094d1baac126331385d66d2f66aa5db52..3e4efd7cb97cb2b3d33f34d3516b6f2efdaa3bfa:/src/motif/frame.cpp diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index d024c6db91..264204fb1b 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #if XmVersion > 1000 #include #endif @@ -57,10 +56,6 @@ void wxFrameFocusProc(Widget workArea, XtPointer clientData, static void wxFrameMapProc(Widget frameShell, XtPointer clientData, XCrossingEvent * event); -// From wxWindow -extern void wxCanvasRepaintProc (Widget, XtPointer, XmDrawingAreaCallbackStruct * cbs); -extern void wxCanvasInputEvent (Widget drawingArea, XtPointer data, XmDrawingAreaCallbackStruct * cbs); - extern wxList wxModelessWindows; extern wxList wxPendingDelete; @@ -194,10 +189,10 @@ bool wxFrame::Create(wxWindow *parent, XmNbottomAttachment, XmATTACH_FORM, // XmNresizePolicy, XmRESIZE_ANY, NULL); - - XtAddCallback ((Widget) m_clientArea, XmNexposeCallback, (XtCallbackProc) wxCanvasRepaintProc, (XtPointer) this); - XtAddCallback ((Widget) m_clientArea, XmNinputCallback, (XtCallbackProc) wxCanvasInputEvent, (XtPointer) this); + XtAddEventHandler((Widget) m_clientArea, ExposureMask,FALSE, + wxUniversalRepaintProc, (XtPointer) this); + XtVaSetValues((Widget) m_frameWidget, XmNworkWindow, (Widget) m_workArea, NULL); @@ -294,12 +289,13 @@ bool wxFrame::Create(wxWindow *parent, wxFrame::~wxFrame() { + if (m_clientArea) + XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE, + wxUniversalRepaintProc, (XtPointer) this); + if (GetMainWidget()) Show(FALSE); - XtRemoveCallback ((Widget) m_clientArea, XmNexposeCallback, (XtCallbackProc) wxCanvasRepaintProc, (XtPointer) this); - XtRemoveCallback ((Widget) m_clientArea, XmNinputCallback, (XtCallbackProc) wxCanvasInputEvent, (XtPointer) this); - if (m_frameMenuBar) { m_frameMenuBar->DestroyMenuBar(); @@ -416,7 +412,7 @@ void wxFrame::GetClientSize(int *x, int *y) const // Set the client size (i.e. leave the calculation of borders etc. // to wxWindows) -void wxFrame::SetClientSize(int width, int height) +void wxFrame::DoSetClientSize(int width, int height) { // Calculate how large the new main window should be // by finding the difference between the client area and the @@ -484,7 +480,7 @@ void wxFrame::GetPosition(int *x, int *y) const if (y) *y = yy; } -void wxFrame::SetSize(int x, int y, int width, int height, int sizeFlags) +void wxFrame::DoSetSize(int x, int y, int width, int height, int sizeFlags) { if (x > -1) XtVaSetValues((Widget) m_frameShell, XmNx, x, NULL);