From d1217112a496ce0b3349ac93d7c5d6b2a5837f54 Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 21 Aug 2014 08:11:27 +1000 Subject: [PATCH] Fix frame window logic bug and compile bug --- src/gwin/gwin_frame.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gwin/gwin_frame.c b/src/gwin/gwin_frame.c index 63df3be2..8cb74a7d 100644 --- a/src/gwin/gwin_frame.c +++ b/src/gwin/gwin_frame.c @@ -96,7 +96,7 @@ static void forceFrameRedraw(GWidgetObject *gw) { gw->g.flags &= ~(GWIN_FRAME_CLOSE_PRESSED|GWIN_FRAME_MAX_PRESSED|GWIN_FRAME_MIN_PRESSED); forceFrameRedraw(gw); _gwinSendEvent(&gw->g, GEVENT_GWIN_CLOSE); - gwinDestroy(&gw->g); + _gwinDestroy(&gw->g, REDRAW_INSESSION); return; } if ((gw->g.flags & GWIN_FRAME_MAX_PRESSED)) { @@ -128,6 +128,7 @@ static void forceFrameRedraw(GWidgetObject *gw) { // Close is released - destroy the window. This is tricky as we already have the drawing lock. gw->g.flags &= ~(GWIN_FRAME_CLOSE_PRESSED|GWIN_FRAME_MAX_PRESSED|GWIN_FRAME_MIN_PRESSED); forceFrameRedraw(gw); + _gwinSendEvent(&gw->g, GEVENT_GWIN_CLOSE); _gwinDestroy(&gw->g, REDRAW_INSESSION); return; } @@ -308,7 +309,7 @@ void gwinFrameDraw_Std(GWidgetObject *gw, void *param) { for(y = gw->g.y+BORDER_T, ih = gi->height; y < my; y += ih) { if (ih > my - y) ih = my - y; - for(x = gw->g.x+BORDER_L; iw = gi->width; x < mx; x += iw) { + for(x = gw->g.x+BORDER_L, iw = gi->width; x < mx; x += iw) { if (iw > mx - x) iw = mx - x; gdispGImageDraw(gw->g.display, gi, x, y, ih, iw, 0, 0);