Page 2 of 2

Re: Dropdown menus not appearing in rev 3202

PostPosted: Sat Dec 23, 2017 12:35 am
by Czarek
callum wrote:They do work in cefclient with offscreen rendering disabled so the problem is in my code.


What do you mean by this sentence? Are you testing cefclient with the --off-screen-rendering-enabled flag?

Re: Dropdown menus not appearing in rev 3202

PostPosted: Sat Dec 23, 2017 12:43 am
by callum
Yes running cefclient with the offscreen rendering flag turned on renders the page correctly and my app does not.

That must mean the issue is in my code although after editing the cefclient code to look more like mine, it still works correctly and mine does not so I expect it's something very minor or very silly somewhere else.

Making progress with a standalone (single c++) test that links against a standard version of CEF.

Re: Dropdown menus not appearing in rev 3202

PostPosted: Tue Jan 02, 2018 8:20 pm
by callum
So good news and bad news - I made a "boiled down" example, mostly taken from my original non-working code and ... it works perfectly. (Debug builds fail to render anything for some reason but that's okay for the moment).

I assume this means some benign but apparently significant difference in my main code base is causing drop down menus not to work. At least I have something to compare it against now.

If anyone is interested, the main source files is here:
https://github.com/callumprentice/cef_o ... gl_win.cpp

and there is a CMake file plus build instructions here: https://github.com/callumprentice/cef_opengl_win

Re: Dropdown menus not appearing in rev 3202

PostPosted: Wed Jan 03, 2018 11:22 pm
by callum
Figured it out finally - my app supports page zooming and the only way I got that to work was by calling CefBrowserHost::SetZoomLevel() repeatedly every frame.

That seemed to be enough to always cause the popup to close immediately after it was opened = maybe zooming caused an invalidate event somewhere?

Removing it and rewriting the onPaint() code made things work perfectly.

Adding it back in with a test so things are only scaled if they need to be (how it should have been in the first place) worked too.