ataranto / CefSharp

.Net binding for the Chromium Embedded Framework
Other
62 stars 34 forks source link

Title for Popup window #19

Open apn99 opened 12 years ago

apn99 commented 12 years ago

Titles are not shown , when opening a link in the pop up window. Do you have know about this issue or am I missing something?. The title in popup window is working in the chromium cefclient...Also noticed that the pop up window icon is not same as Web view window icon. currently popup icon shows some default icon.

apn99 commented 12 years ago

Here is the fix I made in the clientAdapter.cpp file in the eventhandler OnTitleChange. Please let me know,if the fix looks OK for displaying popup titles. void ClientAdapter::OnTitleChange(CefRefPtr browser, const CefString& title) { HWND lHwnd = browser->GetWindowHandle(); if(_browserHwnd == lHwnd) { _browserControl->Title = toClr(title); } else { SetWindowText(lHwnd, std::wstring(title).c_str()); } }

ataranto commented 11 years ago

actually it looks like ClientAdapter::OnTitleChange() always updates the title of the parent window, regardless of which popup window's title actually changed. will investigate.