Cygwin/X: Avoid a visual glitch on window move in rootless modes
Handle and ignore WM_ERASEBKGND since we repaint the entire invalidated region anyhow (this avoids a white flickering on window resize) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
b718b2e088
commit
638ca9a7a2
|
@ -453,6 +453,14 @@ winTopLevelWindowProc (HWND hwnd, UINT message,
|
||||||
HandleCustomWM_INITMENU ((unsigned long)hwnd, wParam);
|
HandleCustomWM_INITMENU ((unsigned long)hwnd, wParam);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_ERASEBKGND:
|
||||||
|
/*
|
||||||
|
* Pretend that we did erase the background but we don't care,
|
||||||
|
* since we repaint the entire region anyhow
|
||||||
|
* This avoids some flickering when resizing.
|
||||||
|
*/
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
/* Only paint if our window handle is valid */
|
/* Only paint if our window handle is valid */
|
||||||
if (hwndScreen == NULL)
|
if (hwndScreen == NULL)
|
||||||
|
|
|
@ -783,6 +783,17 @@ winMWExtWMWindowProc (HWND hwnd, UINT message,
|
||||||
SendMessage (hwndScreen, message, wParam, lParam);
|
SendMessage (hwndScreen, message, wParam, lParam);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case WM_ERASEBKGND:
|
||||||
|
#if CYGDEBUG
|
||||||
|
winDebug ("winMWExtWMWindowProc - WM_ERASEBKGND\n");
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
* Pretend that we did erase the background but we don't care,
|
||||||
|
* since we repaint the entire region anyhow
|
||||||
|
* This avoids some flickering when resizing.
|
||||||
|
*/
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
case WM_PAINT:
|
case WM_PAINT:
|
||||||
|
|
||||||
/* BeginPaint gives us an hdc that clips to the invalidated region */
|
/* BeginPaint gives us an hdc that clips to the invalidated region */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user