3d Mouse focus

55 views
Skip to first unread message

Jonathan Borthwick

unread,
Apr 27, 2015, 8:36:44 PM4/27/15
to cefs...@googlegroups.com
I don't know if anyone has noticed this, but a 3D mouse will lose focus when you minimize your browser then maximize it. Clicking on the 3d mouse button for telling the browser to give it focus seems to put the 3D mouse into a strange state of just allowing zoom in and out of a 3D map. So initially, 3D mouse is fine until you refresh the page or minimize and maximizeI'm using the google earth plugin for now, however I will need to move on to Cesium when google disables the google earth plugin in December.

I have have a custom web app that uses the google earth plugin and the 3d mouse works great until you refresh the page or minimize and then maximize the browser window. This behavior exists in google chrome as well btw!

I am using 3DConnexion's  hardware http://www.3dconnexion.com/
I'm not a great C++ coder, but I think CEFSharp needs to expose human interface devices so I can debug what's going on. I've been looking into somehow using RawInput too https://msdn.microsoft.com/en-us/library/windows/desktop/ms645536(v=vs.85).aspx
SO far, the best that I have been able to achieve is to alter CefSharp.Core\ManagedCefBrowserAdapter.h on the line to do with minimizing by simply commenting out this in the void resize(int width, int height ) function:

SetWindowPos(browserHwnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOMOVE | SWP_NOACTIVATE);


Obviously that doesn't fix the refresh page issue.

Any thoughts on how to deal with 3D mouse appropriately. Its going to get more an more popular.



Jonathan Borthwick

unread,
Apr 27, 2015, 8:47:14 PM4/27/15
to cefs...@googlegroups.com

Alex Maitland

unread,
Apr 27, 2015, 9:18:01 PM4/27/15
to cefs...@googlegroups.com
Have you searched the `Chromium` issue tracker to see if anyone else has a problem? If not it's probably worth raising there, sooner the better as it's likely to take a while to resolve.

I take it your using the `WinForms` version from the code you've referenced, generally a good idea to explicitly specify version and flavor.

Your unlikely to be able to debug this directly with `CefSharp`. Being the `CEF` wrapper that it is, you'll likely find it easier to build `CEF` from source and use the `cefclient` example as your test bed.

Jonathan Borthwick

unread,
Apr 28, 2015, 12:40:09 AM4/28/15
to cefs...@googlegroups.com
I found the issue, but it's unresolved.
Question; how easy is it to integrate chromium fixes into heavily altered cef sharp projects? Is it a matter if adding a dll?
--
You received this message because you are subscribed to a topic in the Google Groups "CefSharp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cefsharp/A3CTS_RRH1A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.
To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp.
For more options, visit https://groups.google.com/d/optout.

Alex Maitland

unread,
Apr 28, 2015, 4:06:43 AM4/28/15
to cefs...@googlegroups.com
Can you clarify heavily altered cefsharp project?

You'd have to build `cef` from source, thankfully it's mostly automated via scripting. `CEF` makes a few alterations to chromium, so it has some hooks which you can use to apply your own patches (I've never tried it though).

Once you've got a working build, then you need to repackage for use with `cefsharp` aka `cef-binary` project

https://github.com/cefsharp/cef-binary

Then you can build `CefSharp` from source (you can use the build script to generate nuget packages for local consumption).

It's a big undertaking overall, likely 4+ hours of wall time for a single architecture (x86 or x64). If you only build one then you'll need to remove the other architecture from the `cef-binary/cefsharp` build scripts.
To unsubscribe from this group and all its topics, send an email to cefsharp+unsubscribe@googlegroups.com.

Jonathan Borthwick

unread,
Apr 28, 2015, 1:41:27 PM4/28/15
to cefs...@googlegroups.com
I'm not sure how to use the cefsharp binary for this. I did retrieved it. What do I do with it? Originally I just got a CEFSharp visual studio project from https://github.com/cefsharp/CefSharp.git
I have a build from a branch and my customizations consist of some commented out code in the winforms example that displays 3 briowser tabs, some custom graphics and a custom windows forms that displays an options screen. I'm not a great C++ coder so I am unsure of the correct approach to take to integrate really deep level patches and adjustments to Chromium itself. I cant imagine what id need to be doing for 4 hours. Can you provide a bulleted list of steps?

To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.

To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "CefSharp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cefsharp/A3CTS_RRH1A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.

Alex Maitland

unread,
Apr 28, 2015, 4:44:01 PM4/28/15
to cefs...@googlegroups.com
Read https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding for background

If your still not put off then read https://github.com/cefsharp/cef-binary/wiki/Building-Cef-from-source

If you can make it through building from source then there's repackaging for use with `CefSharp`.
See https://github.com/cefsharp/cef-binary/wiki

You'll have to use your own compiled version instead of the `cebuilds.com` precompiled ones.
To unsubscribe from this group and all its topics, send an email to cefsharp+unsubscribe@googlegroups.com.

To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp.
For more options, visit https://groups.google.com/d/optout.

Jonathan Borthwick

unread,
May 1, 2015, 4:03:08 PM5/1/15
to cefs...@googlegroups.com
I just found that Chromium source code has fixed this issue. When is it likely to see this possible fix make its way into CEFSharp?


On Monday, April 27, 2015 at 5:36:44 PM UTC-7, Jonathan Borthwick wrote:

Alex Maitland

unread,
May 1, 2015, 4:26:54 PM5/1/15
to cefs...@googlegroups.com
Have they only applied the fix to `master`? `CEF` releases are based on every second branch, so `45` will be the next branch after `43`.

`45` is due for release end of June, from there it takes 2-3 months for an official `CEF` release. So we're talking 5-6 months practically.

If they apply the fix to the `2257` branch then possibly 2-3 months.

If you need the fix sooner, then building from source or repackaging a bleeding edge build from `cefbuilds.com` are your two options.

Jonathan Borthwick

unread,
May 13, 2015, 4:17:14 PM5/13/15
to cefs...@googlegroups.com
I have a custom CEF build now with the 3D mouse fix applied. How do I make a CEFSharp using my custom CEF?
I can't find a guide on that. I can find out how to build CEF and how to get CEFSharp which uses Nuget, but I am having trouble with the process of packaging a custom CEF build into CEFSharp.
Cheers,
Jonathan

Alex Maitland

unread,
May 13, 2015, 6:54:12 PM5/13/15
to cefs...@googlegroups.com
Have you repackaged `CEF` into the `cef-binary` nuget packages yet?

Basic steps are on the wiki, just copy your custom version instead of downloading
https://github.com/cefsharp/cef-binary/wiki

`CefSharp` it's self just uses the `nuget` packages, so you perform `nuget upgrade`.

You can specify a folder as a package source
https://docs.nuget.org/release-notes/nuget-2.1#specify-%E2%80%98packages%E2%80%99-folder-location

You'll likely have to change `CefSharp` as the `API` will more than likely have changed.

Bill Tutt

unread,
May 19, 2015, 3:01:54 PM5/19/15
to cefs...@googlegroups.com
I looked, the gamepad fixes appear to be in Chrome 44 tree builds, but not the latest 43 tree that got promoted to stable, or the latest 43 branch available in Chromium's GIT server.

Fyi,
Bill
Reply all
Reply to author
Forward
0 new messages