Commit 09be9d0d authored by Stephane Lussier's avatar Stephane Lussier Committed by Alexandre Julliard

Now the service thread is no more in charge of erasing the background

of the Window. Service thread is doing the invalidation part, and the application thread is doing the erasing part. All this has been implemented using WM_SYNCPAINT message.
parent 90c0ccef
......@@ -303,6 +303,14 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
return 0;
}
case WM_SYNCPAINT:
if (wndPtr->hrgnUpdate)
{
RedrawWindow ( wndPtr->hwndSelf, 0, wndPtr->hrgnUpdate,
RDW_ERASENOW | RDW_ERASE | RDW_FRAME | RDW_ALLCHILDREN );
}
return 0;
case WM_SETREDRAW:
DEFWND_SetRedraw( wndPtr, wParam );
return 0;
......
......@@ -629,18 +629,29 @@ WORD X11DRV_EVENT_XStateToKeyState( int state )
static void EVENT_Expose( HWND hWnd, XExposeEvent *event )
{
RECT rect;
int offx = 0,offy = 0;
WND *pWnd = WIN_FindWndPtr(hWnd);
/* Make position relative to client area instead of window */
rect.left = event->x - (pWnd? (pWnd->rectClient.left - pWnd->rectWindow.left) : 0);
rect.top = event->y - (pWnd? (pWnd->rectClient.top - pWnd->rectWindow.top) : 0);
offx = (pWnd? (pWnd->rectClient.left - pWnd->rectWindow.left) : 0);
offy = (pWnd? (pWnd->rectClient.top - pWnd->rectWindow.top) : 0);
rect.left = event->x - offx;
rect.top = event->y - offy;
rect.right = rect.left + event->width;
rect.bottom = rect.top + event->height;
WIN_ReleaseWndPtr(pWnd);
Callout.RedrawWindow( hWnd, &rect, 0,
RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN | RDW_ERASE |
(event->count ? 0 : RDW_ERASENOW) );
RDW_INVALIDATE | RDW_FRAME | RDW_ALLCHILDREN | RDW_ERASE );
/* FIXME: We should use SendNotifyMessage here, but this function is not
implemented correctly, so for now we used SendMessage */
/*SendNotifyMessageA(hWnd,WM_SYNCPAINT, 0, 0);*/
if (event->count == 0)
SendMessageA(hWnd,WM_SYNCPAINT, 0, 0);
}
......@@ -653,19 +664,29 @@ static void EVENT_Expose( HWND hWnd, XExposeEvent *event )
static void EVENT_GraphicsExpose( HWND hWnd, XGraphicsExposeEvent *event )
{
RECT rect;
int offx = 0,offy = 0;
WND *pWnd = WIN_FindWndPtr(hWnd);
/* Make position relative to client area instead of window */
rect.left = event->x - (pWnd? (pWnd->rectClient.left - pWnd->rectWindow.left) : 0);
rect.top = event->y - (pWnd? (pWnd->rectClient.top - pWnd->rectWindow.top) : 0);
offx = (pWnd? (pWnd->rectClient.left - pWnd->rectWindow.left) : 0);
offy = (pWnd? (pWnd->rectClient.top - pWnd->rectWindow.top) : 0);
rect.left = event->x - offx;
rect.top = event->y - offy;
rect.right = rect.left + event->width;
rect.bottom = rect.top + event->height;
WIN_ReleaseWndPtr(pWnd);
Callout.RedrawWindow( hWnd, &rect, 0,
RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_ERASE |
(event->count ? 0 : RDW_ERASENOW) );
RDW_INVALIDATE | RDW_ALLCHILDREN | RDW_ERASE );
/* FIXME: We should use SendNotifyMessage here, but this function is not
implemented correctly, so for now we used SendMessage */
/*SendNotifyMessageA(hWnd,WM_SYNCPAINT, 0, 0);*/
if (event->count == 0)
SendMessageA(hWnd,WM_SYNCPAINT, 0, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment