From ced9db65950e402d7ddc663225b888e8482b8c57 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Wed, 25 Jan 2012 01:37:16 +0000 Subject: [PATCH] hw/xwin: Ignore WM_DISPLAYCHANGE messages with 0 bpp Ignore WM_DISPLAYCHANGE messages which indicate bpp is changing to 0. That has no defined meaning I can find, but some graphics card drivers appear to generate it on suspend/resume or screensaver activate/deactivate. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY --- hw/xwin/winwndproc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/xwin/winwndproc.c b/hw/xwin/winwndproc.c index ae284b7ad..88b506891 100644 --- a/hw/xwin/winwndproc.c +++ b/hw/xwin/winwndproc.c @@ -182,6 +182,10 @@ winWindowProc (HWND hwnd, UINT message, "new height: %d new bpp: %d\n", LOWORD (lParam), HIWORD (lParam), wParam); + /* 0 bpp has no defined meaning, ignore this message */ + if (wParam == 0) + break; + /* * Check for a disruptive change in depth. * We can only display a message for a disruptive depth change,