Dropdown menus not appearing in rev 3202

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Re: Dropdown menus not appearing in rev 3202

Postby Czarek » Sat Dec 23, 2017 12:35 am

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?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: Dropdown menus not appearing in rev 3202

Postby callum » Sat Dec 23, 2017 12:43 am

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.
callum
Expert
 
Posts: 323
Joined: Mon Feb 23, 2015 6:19 pm

Re: Dropdown menus not appearing in rev 3202

Postby callum » Tue Jan 02, 2018 8:20 pm

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
callum
Expert
 
Posts: 323
Joined: Mon Feb 23, 2015 6:19 pm

Re: Dropdown menus not appearing in rev 3202

Postby callum » Wed Jan 03, 2018 11:22 pm

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.
callum
Expert
 
Posts: 323
Joined: Mon Feb 23, 2015 6:19 pm

Previous

Return to Support Forum

Who is online

Users browsing this forum: TakashiHSD and 42 guests