Disable mouse events

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.

Disable mouse events

Postby fr3nzy » Mon Nov 06, 2017 9:28 am

I create borderless browser window (CEF 3.3112.1659 on Ubuntu 12.04.5 x64).
Currently i disable keyboard events via SetFocusable(false) on browserView.

My question is, how can I disable mouse events?
fr3nzy
Techie
 
Posts: 13
Joined: Tue Sep 12, 2017 5:47 am

Re: Disable mouse events

Postby magreenblatt » Mon Nov 06, 2017 11:21 am

Do you never want to receive mouse events, or do you just want to stop the window from being activated when it receives mouse events?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Disable mouse events

Postby fr3nzy » Tue Nov 07, 2017 1:19 am

I want, that when the mouse events are disabled, you cannot do anything on the webpage (for example: click on button,...).
Due to restrictions this must be solved in CEF application (not in the webpage itself).
But on the otherside, this disabling should not be permanent, as at a later time I should be able to reenable mouse events.

Edit: I have tried to call SetEnabled(false) on browserView, but this behaves similarly to SetFocusable(false), keyboard events are prevented, but mouse events still happen.
fr3nzy
Techie
 
Posts: 13
Joined: Tue Sep 12, 2017 5:47 am

Re: Disable mouse events

Postby magreenblatt » Mon Nov 13, 2017 3:05 pm

I'm not aware of any simple way to do this on Linux. You could try overlaying a transparent window on top of the CEF window and intercepting all mouse events in that way. Otherwise you will need to modify Chromium to disable the handling of mouse events.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Disable mouse events

Postby fr3nzy » Tue Nov 14, 2017 1:18 am

magreenblatt wrote:I'm not aware of any simple way to do this on Linux. You could try overlaying a transparent window on top of the CEF window and intercepting all mouse events in that way. Otherwise you will need to modify Chromium to disable the handling of mouse events.

Thank you for the response.
fr3nzy
Techie
 
Posts: 13
Joined: Tue Sep 12, 2017 5:47 am


Return to Support Forum

Who is online

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