CEF3 right click context menu position is not correct

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.

CEF3 right click context menu position is not correct

Postby yong018wu » Thu Nov 02, 2017 4:16 am

hi Expert,
I have two monitors, both are high definition monitor. And I set dpi aware manually to PROCESS_PER_MONITOR_DPI_AWARE, then the right click context menu position is far away from the browser if the browser is on the second monitor.
I know that CefEnableHighDPISupport() only set PROCESS_SYSTEM_DPI_AWARE from the cef source code, the context menu shows at right position no matter where's the browser.

CefClient does not work either.

Here is my code:
typedef HRESULT(__stdcall *SetProcessDPIAwareFunc)(PROCESS_DPI_AWARENESS);
HMODULE hUser32 = LoadLibrary(L"Shcore.dll");

if (hUser32)
{
SetProcessDPIAwareFunc setDPIAware = (SetProcessDPIAwareFunc)GetProcAddress(hUser32, "SetProcessDpiAwareness");

if (setDPIAware)
{
setDPIAware(PROCESS_PER_MONITOR_DPI_AWARE);
}
FreeLibrary(hUser32);
}

Thanks
yong018wu
Techie
 
Posts: 17
Joined: Wed Nov 01, 2017 1:17 am

Re: CEF3 right click context menu position is not correct

Postby Panneerselvam » Fri Nov 03, 2017 8:55 am

We do have the same issue with 3163 branch when per monitor display is enabled.
Panneerselvam
Techie
 
Posts: 15
Joined: Thu May 29, 2014 3:36 am

Re: CEF3 right click context menu position is not correct

Postby magreenblatt » Fri Nov 03, 2017 12:51 pm

Per-monitor is not supported by Chromium. You can follow https://crbug.com/624991.
magreenblatt
Site Admin
 
Posts: 12406
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3 right click context menu position is not correct

Postby yong018wu » Mon Dec 04, 2017 9:04 pm

From the last post in https://bugs.chromium.org/p/chromium/issues/detail?id=426656#c101, per monitor DPI aware is supported by chrome

+++

Comment 101 by robliao@chromium.org, Nov 30 (4 days ago)

Labels: Restrict-AddIssueComment-EditIssue
Hello everyone! Thanks for your feedback.

Chrome has been per-monitor DPI aware since http://crrev.com/23364eecc5d1bb1770f8c2 ... 0154e3eac7.

Implementing per-monitor DPI is very tricky, and it's not surprising that there may be some issues floating around within Chrome or third-party extensions.

If you do encounter issues, please create a new issue for that. This issue is intended to track the overall progress of per-monitor DPI awareness.
yong018wu
Techie
 
Posts: 17
Joined: Wed Nov 01, 2017 1:17 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 37 guests