Disable browser on OSX (standard rendering)

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

Disable browser on OSX (standard rendering)

Postby joaoneves » Mon Feb 17, 2020 10:22 am

Hi,

I'm using standard rendering and I need to disable the browser (ie. prevent keyboard/mouse input). On windows I can call EnableWindow on the browser child window, but on OSX I don't know how and what to do.
Any suggestions?
joaoneves
Newbie
 
Posts: 7
Joined: Fri Nov 29, 2019 5:45 am

Re: Disable browser on OSX (standard rendering)

Postby magreenblatt » Mon Feb 17, 2020 10:37 am

You can try setting acceptsFirstMouse and acceptsTouchEvents to NO on the top-level NSView.
magreenblatt
Site Admin
 
Posts: 9836
Joined: Fri May 29, 2009 6:57 pm

Re: Disable browser on OSX (standard rendering)

Postby joaoneves » Mon Feb 17, 2020 1:29 pm

Tried your suggestion but it does not work
joaoneves
Newbie
 
Posts: 7
Joined: Fri Nov 29, 2019 5:45 am

Re: Disable browser on OSX (standard rendering)

Postby magreenblatt » Mon Feb 17, 2020 1:42 pm

You can also try overlaying a transparent NSView on top of the browser NSView that does not forward events to the underlying NSView.
magreenblatt
Site Admin
 
Posts: 9836
Joined: Fri May 29, 2009 6:57 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 3 guests