Behavior of mouse shift-left-click and ctrl-left-click

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.

Behavior of mouse shift-left-click and ctrl-left-click

Postby HarmlessDave » Mon May 03, 2021 4:10 pm

Windows 32-bit 87.1.12+g03f9336+chromium-87.0.4280.88

Normal rendering not off-screen.

In CEFClient, shift-click navigates in the same window (vs. Google Chrome starting a new instance) while control-click opens a new window. How would I change shift-click to open a new window like ctrl-click does? I can't find where the default mouse click event handling is implemented or see what I would change. Or is this not exposed to clients?
HarmlessDave
Expert
 
Posts: 308
Joined: Fri Jul 11, 2014 2:02 pm

Re: Behavior of mouse shift-left-click and ctrl-left-click

Postby magreenblatt » Mon May 03, 2021 4:40 pm

One is likely routed to OnBeforePopup and the other to OnOpenURLFromTab.
magreenblatt
Site Admin
 
Posts: 10858
Joined: Fri May 29, 2009 6:57 pm

Re: Behavior of mouse shift-left-click and ctrl-left-click

Postby HarmlessDave » Mon May 03, 2021 5:41 pm

Thanks. It looks like the CEFClient code for ClientHandler::OnOpenURLFromTab is what forces Ctrl-Left-Click and Middle-Click to open in a new window.

For Shift-Left-Click the target_disposition is WOD_NEW_WINDOW in my test so I can handle that the same as Ctrl-Left and Middle clicks.
HarmlessDave
Expert
 
Posts: 308
Joined: Fri Jul 11, 2014 2:02 pm


Return to Support Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 18 guests