mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-17 20:50:42 +01:00
Windows: Fix rendering of background color and resize corner (issue #1161).
git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1547@1551 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
f17fd1ca81
commit
b18102df04
@ -505,7 +505,7 @@ LRESULT CALLBACK CefBrowserHostImpl::WndProc(HWND hwnd, UINT message,
|
||||
return 0;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
case WM_DWMCOMPOSITIONCHANGED:
|
||||
// Message sent to top-level windows when composition has been enabled or
|
||||
|
@ -86,6 +86,12 @@ patches = [
|
||||
'name': 'screen_mac',
|
||||
'path': '../ui/gfx/',
|
||||
},
|
||||
{
|
||||
# Fix rendering of background color and resize corner on Windows.
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=1161
|
||||
'name': 'web_contents_1161',
|
||||
'path': '../content/browser/web_contents/',
|
||||
},
|
||||
{
|
||||
# http://code.google.com/p/chromiumembedded/issues/detail?id=364
|
||||
'name': 'spi_webcore_364',
|
||||
|
42
patch/patches/web_contents_1161.patch
Normal file
42
patch/patches/web_contents_1161.patch
Normal file
@ -0,0 +1,42 @@
|
||||
Index: web_contents_view_win.cc
|
||||
===================================================================
|
||||
--- web_contents_view_win.cc (revision 226504)
|
||||
+++ web_contents_view_win.cc (working copy)
|
||||
@@ -299,6 +299,15 @@
|
||||
rvh->GetDelegate()->Close(rvh);
|
||||
}
|
||||
|
||||
+void WebContentsViewWin::OnNCPaint(HRGN update_region) {
|
||||
+ // Do nothing. This suppresses the resize corner that Windows would
|
||||
+ // otherwise draw for us.
|
||||
+}
|
||||
+
|
||||
+LRESULT WebContentsViewWin::OnEraseBkgnd(HDC dc) {
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
LRESULT WebContentsViewWin::OnCreate(
|
||||
UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled) {
|
||||
hwnd_to_wcv_map.insert(std::make_pair(hwnd(), this));
|
||||
Index: web_contents_view_win.h
|
||||
===================================================================
|
||||
--- web_contents_view_win.h (revision 226504)
|
||||
+++ web_contents_view_win.h (working copy)
|
||||
@@ -36,6 +36,8 @@
|
||||
virtual ~WebContentsViewWin();
|
||||
|
||||
BEGIN_MSG_MAP_EX(WebContentsViewWin)
|
||||
+ MSG_WM_NCPAINT(OnNCPaint)
|
||||
+ MSG_WM_ERASEBKGND(OnEraseBkgnd)
|
||||
MESSAGE_HANDLER(WM_CREATE, OnCreate)
|
||||
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
|
||||
MESSAGE_HANDLER(WM_WINDOWPOSCHANGED, OnWindowPosChanged)
|
||||
@@ -102,6 +104,8 @@
|
||||
void EndDragging();
|
||||
void CloseTab();
|
||||
|
||||
+ void OnNCPaint(HRGN update_region);
|
||||
+ LRESULT OnEraseBkgnd(HDC dc);
|
||||
LRESULT OnCreate(
|
||||
UINT message, WPARAM wparam, LPARAM lparam, BOOL& handled);
|
||||
LRESULT OnDestroy(
|
@ -563,7 +563,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
if (hwnd) {
|
||||
// Dont erase the background if the browser window has been loaded
|
||||
// (this avoids flashing)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user