diff -urNp grx249.orig/include/grx20.h grx249/include/grx20.h
--- grx249.orig/include/grx20.h	2012-07-08 14:40:56 +0000
+++ grx249/include/grx20.h	2012-07-11 12:31:35 +0000
@@ -1446,8 +1446,9 @@ void GrMoveCursor(GrCursor *cursor,int x
 #define GR_M_KEYPRESS       0x080               /* other event flag bits */
 #define GR_M_POLL           0x100
 #define GR_M_NOPAINT        0x200
+#define GR_SIZE_CHANGED     0x400
 #define GR_COMMAND          0x1000
-#define GR_M_EVENT          (GR_M_MOTION | GR_M_KEYPRESS | GR_M_BUTTON_CHANGE | GR_COMMAND)
+#define GR_M_EVENT          (GR_M_MOTION | GR_M_KEYPRESS | GR_M_BUTTON_CHANGE | GR_SIZE_CHANGED | GR_COMMAND)
 
 #define GR_KB_RIGHTSHIFT    0x01                /* Keybd states: right shift key depressed */
 #define GR_KB_LEFTSHIFT     0x02                /* left shift key depressed */
@@ -1464,6 +1465,8 @@ void GrMoveCursor(GrCursor *cursor,int x
 #define GR_M_CUR_LINE       2                   /* line attached to the cursor */
 #define GR_M_CUR_BOX        3                   /* rectangular box dragged by the cursor */
 
+extern int GrSizeChangesContext;		/* GR_SIZE_CHANGE event Resizes Context */
+
 #define GR_M_QUEUE_SIZE     128                 /* default queue size */
 
 typedef struct _GR_mouseEvent {                 /* mouse event buffer structure */
diff -urNp grx249.orig/src/mouse/input.h grx249/src/mouse/input.h
--- grx249.orig/src/mouse/input.h	2012-07-07 14:29:18 +0000
+++ grx249/src/mouse/input.h	2012-07-11 12:31:35 +0000
@@ -67,6 +67,15 @@
 	EV.buttons  = 0;                                                    \
 } while(0)
 
+#define fill_size_ev(EV,NEWX,NEWY) do {                                     \
+	EV.flags    = GR_SIZE_CHANGED;                                      \
+	EV.x        = NEWX;                                                 \
+	EV.y        = NEWY;                                                 \
+	EV.key      = 0;                                                    \
+	EV.kbstat   = 0;                                                    \
+	EV.buttons  = 0;                                                    \
+} while(0)
+
 #define fill_cmd_ev(EV,CMD,KBSTAT) do {                                     \
 	EV.flags    = GR_COMMAND | (MOUINFO->moved ? GR_M_MOTION : 0);      \
 	EV.x        = MOUINFO->xpos;                                        \
diff -urNp grx249.orig/src/mouse/w32inp.c grx249/src/mouse/w32inp.c
--- grx249.orig/src/mouse/w32inp.c	2012-07-07 14:29:18 +0000
+++ grx249/src/mouse/w32inp.c	2012-07-11 12:31:35 +0000
@@ -274,6 +274,22 @@ static int DequeueW32Event(GrMouseEvent
 	kbd_lastmod = evaux.kbstat;
 	return 1;
 
+    case WM_SIZE:
+        if(GrSizeChangesContext) {
+	    GrCurrentContext ()->gc_xmax = LOWORD (evaux.lParam)-1;
+	    GrCurrentContext ()->gc_ymax = HIWORD (evaux.lParam)-1;
+	    GrCurrentContext ()->gc_xcliphi = LOWORD (evaux.lParam)-1;
+	    GrCurrentContext ()->gc_ycliphi = HIWORD (evaux.lParam)-1;
+	    GrScreenContext ()->gc_xmax = LOWORD (evaux.lParam)-1;
+	    GrScreenContext ()->gc_ymax = HIWORD (evaux.lParam)-1;
+	    GrScreenContext ()->gc_xcliphi = LOWORD (evaux.lParam)-1;
+	    GrScreenContext ()->gc_ycliphi = HIWORD (evaux.lParam)-1;
+	    fill_size_ev ((*ev), LOWORD (evaux.lParam), HIWORD (evaux.lParam));
+	    return 1;
+	}
+	else
+	    return -1;
+
     case WM_COMMAND:
         fill_cmd_ev((*ev), evaux.wParam, evaux.kbstat);
         return 1;
diff -urNp grx249.orig/src/mouse/xwininp.c grx249/src/mouse/xwininp.c
--- grx249.orig/src/mouse/xwininp.c	2012-07-07 14:29:18 +0000
+++ grx249/src/mouse/xwininp.c	2012-07-11 12:31:35 +0000
@@ -655,6 +655,26 @@ void _GrUpdateInputs(void)
 	  _XGrModifierKey (keysym, xev.type);
 	}
 	break;
+	
+      case ConfigureNotify:
+        if(GrSizeChangesContext) {
+	  GrCurrentContext ()->gc_xmax = xev.xconfigure.width -1;
+	  GrCurrentContext ()->gc_ymax = xev.xconfigure.height -1;
+	  GrCurrentContext ()->gc_xcliphi = xev.xconfigure.width -1;
+	  GrCurrentContext ()->gc_ycliphi = xev.xconfigure.height -1;
+	  GrScreenContext ()->gc_xmax = xev.xconfigure.width -1;
+	  GrScreenContext ()->gc_ymax = xev.xconfigure.height -1;
+	  GrScreenContext ()->gc_xcliphi = xev.xconfigure.width -1;
+	  GrScreenContext ()->gc_ycliphi = xev.xconfigure.height -1;
+	  fill_size_ev(
+			ev,
+			xev.xconfigure.width,
+			xev.xconfigure.height
+			);
+	  enqueue_event(ev);
+	}
+	break;
+	
       }
     }
   }
diff -urNp grx249.orig/src/setup/context.c grx249/src/setup/context.c
--- grx249.orig/src/setup/context.c	2002-04-29 23:54:20 +0000
+++ grx249/src/setup/context.c	2012-07-11 12:31:35 +0000
@@ -27,6 +27,8 @@
 #define  MYCONTEXT      1
 #define  MYFRAME        2
 
+int GrSizeChangesContext = 0;  /* GR_SIZE_CHANGE event Resizes Context */
+
 GrContext *GrCreateFrameContext(GrFrameMode md,int w,int h,char far *memory[4],GrContext *where)
 {
 	GrFrameDriver *fd = _GrFindRAMframeDriver(md);
diff -urNp grx249.orig/src/vdrivers/vd_win32.c grx249/src/vdrivers/vd_win32.c
--- grx249.orig/src/vdrivers/vd_win32.c	2012-07-07 14:29:18 +0000
+++ grx249/src/vdrivers/vd_win32.c	2012-07-11 12:31:35 +0000
@@ -614,6 +614,7 @@ static LRESULT CALLBACK WndProc(HWND hWn
 	EnqueueW32Event(uMsg, wParam, lParam, kbstat);
 	return 0;
 
+    case WM_SIZE:
     case WM_COMMAND:
     case WM_CHAR:
     case WM_KEYDOWN:
@@ -691,7 +692,6 @@ static LRESULT CALLBACK WndProc(HWND hWn
     case WM_WINDOWPOSCHANGED:
     case WM_GETDLGCODE:
     case WM_MOVE:
-    case WM_SIZE:
     case WM_SETCURSOR:
     case WM_HELP:
     case WM_KEYUP:
diff -urNp grx249.orig/src/vdrivers/vd_xwin.c grx249/src/vdrivers/vd_xwin.c
--- grx249.orig/src/vdrivers/vd_xwin.c	2012-07-07 14:34:06 +0000
+++ grx249/src/vdrivers/vd_xwin.c	2012-07-11 12:31:35 +0000
@@ -214,9 +214,9 @@ static int setmode(GrVideoMode *mp,int n
       window_name = name;
       icon_name = name;
 
-      hints.min_width = mp->width;
+      hints.min_width = 1;
       hints.max_width = mp->width;
-      hints.min_height = mp->height;
+      hints.min_height = 1;
       hints.max_height = mp->height;
       hints.flags = PMaxSize | PMinSize;
 
@@ -426,7 +426,7 @@ static int init(char *options)
   mask |= CWBackPixel;
   attr.border_pixel = 0L;
   mask |= CWBorderPixel;
-  attr.event_mask = (StructureNotifyMask
+  attr.event_mask = (  StructureNotifyMask
                      | KeyPressMask
                      | KeyReleaseMask
                      | ButtonPressMask
diff -urNp grx249.orig/test/mousetst.c grx249/test/mousetst.c
--- grx249.orig/test/mousetst.c	2012-07-07 14:32:26 +0000
+++ grx249/test/mousetst.c	2012-07-11 12:31:35 +0000
@@ -22,6 +22,17 @@
 #include <ctype.h>
 #include "test.h"
 
+void initscreen(GrColor bgc)
+{
+    GrClearScreen(bgc);
+    GrTextXY(
+	10,(GrMaxY() - 20),
+	"Commands: 'N' -- next mouse mode, 'Q' -- exit",
+	GrWhite(),
+	bgc
+    );
+}
+
 TESTFUNC(mousetest)
 {
 	GrMouseEvent evt;
@@ -35,20 +46,16 @@ TESTFUNC(mousetest)
 	    GrMouseInit();
 	    GrMouseSetColors(GrAllocColor(255,0,0),GrBlack());
 	    GrMouseDisplayCursor();
-	    GrClearScreen(bgc);
+	    GrSizeChangesContext = 1;
 	    ii = 0;
 	    mode = GR_M_CUR_NORMAL;
-	    GrTextXY(
-		10,(GrScreenY() - 20),
-		"Commands: 'N' -- next mouse mode, 'Q' -- exit",
-		GrWhite(),
-		bgc
-	    );
+	    initscreen(bgc);
 	    for( ; ; ) {
 		char msg[200];
-		drawing(ii,ii,(GrSizeX() - 20),(GrSizeY() - 20),((fgc ^ bgc) | GrXOR),GrNOCOLOR);
 		GrMouseGetEventT(GR_M_EVENT,&evt,0L);
-		if(evt.flags & (GR_M_KEYPRESS | GR_M_BUTTON_CHANGE | testmotion)) {
+		if(evt.flags & GR_SIZE_CHANGED)
+		    initscreen(bgc);
+		if(evt.flags & (GR_M_KEYPRESS | GR_M_BUTTON_CHANGE | GR_SIZE_CHANGED | testmotion)) {
 		    strcpy(msg,"Got event(s): ");
 #                   define mend (&msg[strlen(msg)])
 		    if(evt.flags & GR_M_MOTION)      strcpy( mend,"[moved] ");
@@ -63,6 +70,7 @@ TESTFUNC(mousetest)
 		    if(evt.flags & GR_M_P4_UP)       strcpy( mend,"[p4 up] ");
 		    if(evt.flags & GR_M_P5_UP)       strcpy( mend,"[p5 up] ");
 		    if(evt.flags & GR_M_KEYPRESS)    sprintf(mend,"[key (0x%03x)] ",evt.key);
+		    if(evt.flags & GR_SIZE_CHANGED)  sprintf(mend,"[size] ");
 		    sprintf(mend,"at X=%d, Y=%d, ",evt.x,evt.y);
 		    sprintf(mend,
 			"buttons=%c%c%c, ",
@@ -72,7 +80,7 @@ TESTFUNC(mousetest)
 		    );
 		    sprintf(mend,"deltaT=%ld (ms)",evt.dtime);
 		    strcpy (mend,"                         ");
-		    GrTextXY(10,(GrScreenY() - 40),msg,GrWhite(),bgc);
+		    GrTextXY(10,(GrMaxY() - 40),msg,GrWhite(),bgc);
 		    testmotion = evt.buttons ? GR_M_MOTION : 0;
 		}
 		if(evt.flags & GR_M_KEYPRESS) {
@@ -96,6 +104,7 @@ TESTFUNC(mousetest)
 		    }
 		    GrMouseDisplayCursor();
 		}
+		drawing(ii,ii,(GrSizeX() - 20),(GrSizeY() - 40),((fgc ^ bgc) | GrXOR),GrNOCOLOR);
 		if((ii += 7) > 20) ii -= 20;
 	    }
 	    GrMouseUnInit();
diff -urNp grx249.orig/test/winclip.c grx249/test/winclip.c
--- grx249.orig/test/winclip.c	2001-01-30 05:15:48 +0000
+++ grx249/test/winclip.c	2012-07-11 12:31:35 +0000
@@ -21,36 +21,57 @@
 
 TESTFUNC(winclip)
 {
+    int oldx = 0;
+    int oldy = 0;
+    GrColor c1 = GrAllocColor(200,100,100);
+    GrColor c2 = GrAllocColor(100,200,200);
+    GrColor c3 = GrAllocColor(200,200,0);
+    GrColor c4 = GrAllocColor(0,100,200);
+    GrContext *w1 = GrCreateSubContext(0,0,1,1,NULL,NULL); /* just to create */
+    GrContext *w2 = GrCreateSubContext(0,0,1,1,NULL,NULL);
+    GrContext *w3 = GrCreateSubContext(0,0,1,1,NULL,NULL);
+    GrContext *w4 = GrCreateSubContext(0,0,1,1,NULL,NULL);
+
+    GrSizeChangesContext = 1;
+
+    while(!GrKeyPressed()) {
 	int  x = GrSizeX();
 	int  y = GrSizeY();
-	int  ww = (x / 2) - 10;
-	int  wh = (y / 2) - 10;
-	GrColor c;
-	GrContext *w1 = GrCreateSubContext(5,5,ww+4,wh+4,NULL,NULL);
-	GrContext *w2 = GrCreateSubContext(15+ww,5,ww+ww+14,wh+4,NULL,NULL);
-	GrContext *w3 = GrCreateSubContext(5,15+wh,ww+4,wh+wh+14,NULL,NULL);
-	GrContext *w4 = GrCreateSubContext(15+ww,15+wh,ww+ww+14,wh+wh+14,NULL,NULL);
-
-	GrSetContext(w1);
-	c = GrAllocColor(200,100,100);
-	drawing(0,0,ww,wh,c,GrBlack());
-	GrBox(0,0,ww-1,wh-1,c);
-
-	GrSetContext(w2);
-	c = GrAllocColor(100,200,200);
-	drawing(-ww/4,ww/3,ww,wh,c,GrBlack());
-	GrBox(0,0,ww-1,wh-1,c);
-
-	GrSetContext(w3);
-	c = GrAllocColor(200,200,0);
-	drawing(ww/2,-wh/2,ww,wh,c,GrBlack());
-	GrBox(0,0,ww-1,wh-1,c);
-
-	GrSetContext(w4);
-	c = GrAllocColor(0,100,200);
-	drawing(-ww/2,-wh/2,ww*2,wh*2,c,GrBlack());
-	GrBox(0,0,ww-1,wh-1,c);
 
-	GrKeyRead();
+	if (!((x == oldx) && (y == oldy))) {
+	    int  ww = (x / 2) - 10;
+	    int  wh = (y / 2) - 10;
+
+	    GrClearScreen(GrBlack());
+
+	    GrResizeSubContext(w1,5,5,ww+4,wh+4); /* gives actual size */
+	    GrSetContext(w1);
+	    drawing(0,0,ww,wh,c1,GrBlack());
+	    GrBox(0,0,ww-1,wh-1,c1);
+
+	    GrResizeSubContext(w2,15+ww,5,ww+ww+14,wh+4);
+	    GrSetContext(w2);
+	    drawing(-ww/4,ww/3,ww,wh,c2,GrBlack());
+	    GrBox(0,0,ww-1,wh-1,c2);
+
+	    GrResizeSubContext(w3,5,15+wh,ww+4,wh+wh+14);
+	    GrSetContext(w3);
+	    drawing(ww/2,-wh/2,ww,wh,c3,GrBlack());
+	    GrBox(0,0,ww-1,wh-1,c3);
+
+	    GrResizeSubContext(w4,15+ww,15+wh,ww+ww+14,wh+wh+14);
+	    GrSetContext(w4);
+	    drawing(-ww/2,-wh/2,ww*2,wh*2,c4,GrBlack());
+	    GrBox(0,0,ww-1,wh-1,c4);
+
+	    GrSetContext(NULL);
+
+	    oldx = x; oldy = y;
+	}
+
+	GrSleep(50);
+    }
+
+    GrKeyRead();
 }
 
