Hi,
WM_MOVE and WM_MOVING call TChromiumCore.NotifyMoveOrResizeStarted which has these code comments :
Code: Select all
///
// Notify the browser that the window hosting it is about to be moved or
// resized. This function is only used on Windows and Linux.
///
If we search for more comments in the code we can read this :
Code: Select all
// Call the parent method to dismiss any existing popups.
Code: Select all
// Notify DesktopWindowTreeHostWin of move events so that screen rectangle
// information is communicated to the renderer process and popups are
// displayed in the correct location.
https://bitbucket.org/chromiumembedded/cef/src/21d714ab6e09eff6a6c103387efa32f54f68b1d1/libcef/browser/native/browser_platform_delegate_native_win.cc?at=master#lines-404
The Lazarus demos resize the browser correctly and the contents are in the right location when the user moves the form. In this case, I think the term "popups" means the options of a SELECT element. The demos must close the options automatically when the browser is moving or resizing and the Lazarus demos do that.
WM_ENTERMENULOOP and WM_EXITMENULOOP are used by the official CEF sample application here :
https://bitbucket.org/chromiumembedded/cef/src/21d714ab6e09eff6a6c103387efa32f54f68b1d1/tests/cefclient/browser/root_window_win.cc?at=master#lines-570
cefclient calls cef_set_osmodal_loop when it receives those messages and it has these code comments :
Code: Select all
///
// Set to true (1) before calling Windows APIs like TrackPopupMenu that enter a
// modal message loop. Set to false (0) after exiting the modal message loop.
///
Delphi handles WM_ENTERMENULOOP in TCustomForm and I assumed that Lazarus forms can also receive that message.
I just did a quick search and Lazarus handles WM_EXITMENULOOP in TWindowProcHelper.DoWindowProc which is called by WindowProc but I haven't investigated long enough to know if WM_ENTERMENULOOP and WM_EXITMENULOOP are intercepted before reaching the forms.