X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8704bf74fba8523e2e174bd5a8195b5202009cd0..68ca12fef650ce4622e05ba4eb21a7aa23849107:/src/motif/mdi/lib/XsMotifWindow.C?ds=inline diff --git a/src/motif/mdi/lib/XsMotifWindow.C b/src/motif/mdi/lib/XsMotifWindow.C index f1a2a4d2c3..7f9e45a4a0 100644 --- a/src/motif/mdi/lib/XsMotifWindow.C +++ b/src/motif/mdi/lib/XsMotifWindow.C @@ -7,7 +7,7 @@ XsMotifWindow.C History - 03-Mar-96 1.0; Scott W. Sadler (sws@iti-oh.com) + 03-Mar-96 1.0; Scott W. Sadler (ssadler@cisco.com) Created */ @@ -375,6 +375,9 @@ void _XsMotifCorner::_expose (XEvent*) { Dimension w, h; + if (_topShadowGC == 0) // JACS + return; + // Get the size of the corner XtVaGetValues (_base, XmNwidth, &w, XmNheight, &h, NULL); @@ -612,6 +615,8 @@ const char *_XsMotifSide::className ( ) const void _XsMotifSide::_expose (XEvent *event) { + if (_topShadowGC == 0) // JACS + return; // Clear out the window first @@ -847,6 +852,9 @@ const char *_XsMotifButton::className ( ) const void _XsMotifButton::_expose (XEvent *event) { + if (_topShadowGC == 0) // JACS + return; + Dimension w, h; // Get the size of the button @@ -1152,6 +1160,8 @@ void _XsMotifTitle::_redraw ( ) void _XsMotifTitle::_expose (XEvent *event) { + if (_topShadowGC == 0) // JACS + return; // Clear out the window first @@ -1646,6 +1656,9 @@ void _XsMotifIcon::_input (XEvent *event) void _XsMotifIcon::_expose (XEvent *) { + if (_topShadowGC == 0) // JACS + return; + Dimension iconHeight; Dimension iconWidth; @@ -2880,12 +2893,6 @@ void XsMotifWindow::restore ( ) setPosition (_savedX, _savedY); setSize (_savedWidth, _savedHeight); - - _maximized = False; - -// Redraw the maximize button - - _buttons[_XsMotifButton::Maximize]->redraw ( ); } } @@ -2972,6 +2979,17 @@ void XsMotifWindow::setSize (Dimension w, Dimension h) if (_minimized == False) XtVaSetValues (_base, XmNwidth, w, XmNheight, h, NULL); + +// If window was maximized, change the window state back to normal + + if (_maximized == True) + { + _maximized = False; + +// Redraw the maximize button + + _buttons[_XsMotifButton::Maximize]->redraw ( ); + } } else XsMDIWindow::setSize (w, h); // Cache the points