Mouse Click Event

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

Mouse Click Event

Postby pssgcsim » Wed Jun 12, 2013 3:09 pm

Hi, how can I add some mouse event after mouse wheel clicked ? I did not find it >> http://xilium.bitbucket.org/cefglue/doc/
Thx
User avatar
pssgcsim
Techie
 
Posts: 13
Joined: Sat May 25, 2013 10:56 am

Re: Mouse Click Event

Postby fddima » Wed Jun 12, 2013 3:29 pm

Can you explain more precisely what you want?
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Mouse Click Event

Postby pssgcsim » Wed Jun 12, 2013 3:34 pm

I want to find some method to recognize click of mouse wheel. (Open in new tab)
User avatar
pssgcsim
Techie
 
Posts: 13
Joined: Sat May 25, 2013 10:56 am

Re: Mouse Click Event

Postby fddima » Thu Jun 13, 2013 7:51 am

pssgcsim wrote:I want to find some method to recognize click of mouse wheel. (Open in new tab)

It named middle button (3rd button).
I'm not sure, probably can be helpful CefRenderProcessHandler.OnBeforeNavigation method, now i'm did not see that it contain information about which button clicked, but you may be can handle it for itself and notify renderer about this. Once you detect navigation & middle button clicked, you will cancel navigation and perform this in new tab.
Or you need extend CEF (or get know how it is must be correctly implemented, based on chromium's code).
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am

Re: Mouse Click Event

Postby pssgcsim » Thu Jun 13, 2013 10:30 am

In OnBeforeNavigation gets argumment CefNavigationType but it only says why was navigation started (Click, reload, ...). Can you tell me please how can i handle it some other way ?
User avatar
pssgcsim
Techie
 
Posts: 13
Joined: Sat May 25, 2013 10:56 am

Re: Mouse Click Event

Postby fddima » Thu Jun 13, 2013 11:51 am

pssgcsim wrote:In OnBeforeNavigation gets argumment CefNavigationType but it only says why was navigation started (Click, reload, ...). Can you tell me please how can i handle it some other way ?

You need to handle this method anyway to cancel navigation in current browser. And start new navigation at new tab.

I.e. first dirty solution:
1. Capture current mouse button state (two possible solutions):
1.a) Capture it from browser process and notify renderer about this state.
1.b) Try acquire current state of pressed mouse buttons via platform-specific functions.
2. Cancel navigation if middle button pressed
3. Send message to browser process and open new tab with url.

More accurate solution it is investigate how it is implemented in chrome and provide patch to CEF.
fddima
Master
 
Posts: 788
Joined: Tue Dec 07, 2010 6:10 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 11 guests