# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1304470733 0 # Node ID 0345e37d6c86c28b4cc7354b02f705822d862d3c # Parent c8490b0d8577c571b92d2ae99b50fa91f060f34e Removed some code that captured the mouse pointer and set focus in the render widget on Windows. diff -r c8490b0d8577 -r 0345e37d6c86 win/dw.c --- a/win/dw.c Tue May 03 01:58:08 2011 +0000 +++ b/win/dw.c Wed May 04 00:58:53 2011 +0000 @@ -67,7 +67,6 @@ HPEN _hPen[THREAD_LIMIT]; HBRUSH _hBrush[THREAD_LIMIT]; char *_clipboard_contents[THREAD_LIMIT]; -int _PointerOnWnd[THREAD_LIMIT]; BYTE _red[] = { 0x00, 0xbb, 0x00, 0xaa, 0x00, 0xbb, 0x00, 0xaa, 0x77, 0xff, 0x00, 0xee, 0x00, 0xff, 0x00, 0xff, 0xaa, 0x00 }; @@ -2554,10 +2553,6 @@ BOOL CALLBACK _rendwndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2) { - RECT wndRect; - POINTS points; - POINT point; - int threadid = dw_thread_id(); BOOL rcode = TRUE; switch( msg ) @@ -2567,39 +2562,8 @@ case WM_RBUTTONDOWN: SetFocus(hWnd); rcode = _wndproc(hWnd, msg, mp1, mp2); -#ifndef SCROLLBOX_DEBUG -_dw_log( "_renderproc: button down: %d\n", rcode ); -#endif break; case WM_MOUSEMOVE: - if ( threadid < 0 || threadid >= THREAD_LIMIT ) - threadid = 0; - /* - * Set the mouse capture and focus on the renderbox - * when the mouse moves into the window. - */ - points = MAKEPOINTS(mp2); /* get the mouse point */ - point.x = points.x; - point.y = points.y; - SetCapture( hWnd ); /* Capture the mouse input */ - - GetWindowRect( hWnd, &wndRect ); - ClientToScreen( hWnd, &point ); - - if ( PtInRect( &wndRect, point ) ) - { // Test if the pointer is on the window - - if ( _PointerOnWnd[threadid] == 0 ) - { - SetFocus(hWnd); - _PointerOnWnd[threadid] = 1; - } - } - else - { - ReleaseCapture(); - _PointerOnWnd[threadid] = 0; - } /* call our standard Windows procedure */ rcode = _wndproc(hWnd, msg, mp1, mp2); break; @@ -2607,9 +2571,6 @@ case WM_MBUTTONUP: case WM_RBUTTONUP: rcode = _wndproc(hWnd, msg, mp1, mp2); -#ifndef SCROLLBOX_DEBUG -_dw_log( "_renderproc: button up: %d\n", rcode ); -#endif break; case WM_PAINT: case WM_SIZE: @@ -2619,7 +2580,6 @@ rcode = _wndproc(hWnd, msg, mp1, mp2); break; default: -// rcode = DefWindowProc(hWnd, msg, mp1, mp2); break; } /* only call the default Windows process if the user hasn't handled the message themselves */ @@ -3805,7 +3765,6 @@ _hPen[z] = CreatePen(PS_SOLID, 1, _foreground[z]); _hBrush[z] = CreateSolidBrush(_foreground[z]); _clipboard_contents[z] = NULL; - _PointerOnWnd[z] = 0; } /* Initialize Security for named events and memory */