(svn r210) -Fix: Console key closes window in front
authorsignde
Sun, 12 Sep 2004 10:23:35 +0000
changeset 209 fd1ec5041eeb
parent 208 f3998d4089f0
child 210 6d715f410a2f
(svn r210) -Fix: Console key closes window in front
-Fix: Console events were processed in wrong window
-Fix: Console unresponsive when you activated another window
console.c
--- a/console.c	Sat Sep 11 22:10:31 2004 +0000
+++ b/console.c	Sun Sep 12 10:23:35 2004 +0000
@@ -63,10 +63,12 @@
 
 static void IConsoleWndProc(Window *w, WindowEvent *e)
 {
+	// only do window events with the console
+	w = FindWindowById(WC_CONSOLE, 0);
+
 	switch(e->event) {
 
 	case WE_PAINT:
-
 		GfxFillRect(w->left,w->top,w->width,w->height-1,0);
 		{
 		int i=_iconsole_scroll;
@@ -252,7 +254,7 @@
 		_iconsole_mode=ICONSOLE_OPENED;
 		} else
 	if (_iconsole_mode==ICONSOLE_OPENED) {
-		DeleteWindow(_iconsole_win);
+		DeleteWindowById(WC_CONSOLE,0);
 		_iconsole_win=NULL;
 		_iconsole_mode=ICONSOLE_CLOSED;
 		}