comparison win/dw.c @ 1229:437b045a3b07

Fixed a (shift) tab focus change regression on Windows for spinbuttons/comboboxes. There were 2 versions of this code, one in _wndproc and one in _colorwndproc. The _colorwndproc version handled spinbuttons and comboboxes correctly, but due to an earlier key press fix, both versions were getting called... the incorrect one first causing focus to be given to the wrong control. Removed the extra complete version from _wndproc allowing _colorwnd proc to work.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 11 Oct 2011 23:37:21 +0000
parents 10f5b8645975
children 4a7a9f102a5f
comparison
equal deleted inserted replaced
1228:f0746937f2c6 1229:437b045a3b07
1991 ShowWindow(mybox->items[0].hwnd, SW_HIDE); 1991 ShowWindow(mybox->items[0].hwnd, SW_HIDE);
1992 _do_resize(mybox,LOWORD(mp2),HIWORD(mp2)); 1992 _do_resize(mybox,LOWORD(mp2),HIWORD(mp2));
1993 ShowWindow(mybox->items[0].hwnd, SW_SHOW); 1993 ShowWindow(mybox->items[0].hwnd, SW_SHOW);
1994 return 0; 1994 return 0;
1995 } 1995 }
1996 }
1997 }
1998 break;
1999 case WM_CHAR:
2000 if ( LOWORD( mp1 ) == '\t' )
2001 {
2002 if ( GetAsyncKeyState( VK_SHIFT ) & 0x8000 )
2003 _shift_focus_back( hWnd );
2004 else
2005 _shift_focus( hWnd );
2006 return TRUE;
2007 }
2008 else if( LOWORD( mp1 ) == '\r' )
2009 {
2010 ColorInfo *cinfo = (ColorInfo *)GetWindowLongPtr( hWnd, GWLP_USERDATA );
2011 if ( cinfo && cinfo->clickdefault )
2012 {
2013 _click_default( cinfo->clickdefault );
2014 } 1996 }
2015 } 1997 }
2016 break; 1998 break;
2017 case WM_USER: 1999 case WM_USER:
2018 windowfunc = (void *)mp1; 2000 windowfunc = (void *)mp1;