I have a browser component within a filedragdroptarget.
When I drag things over the browser component - within the filedragdroptarget - the filedragdroptarget callbacks aren’t triggered
I have a browser component within a filedragdroptarget.
When I drag things over the browser component - within the filedragdroptarget - the filedragdroptarget callbacks aren’t triggered
Is it possible to capture drag events over the web browser component?
Or is it not possible to capture drag events over the web browser component?
Anyone know how to fix this?
I’m going to assume this relates to the fact, as discussed in your javascript thread, that the web browser is not a JUCE component. So, JUCE has no control over the events. It is the same as when you mouse over another application. But, I could be wrong.
The WebBrowserComponent
is a Juce Component.
I have a WebBrowserComponent
within a FileDragDropTarget
.
When I drag things over the browser component - within the FileDragDropTarget
- the FileDragDropTarget
callbacks aren’t triggered.
My question isn’t about a specific web browser as the internals of how the browser component works are irrelevant to me - a black box if you will
To rephrase: How can I stop the WebBrowserComponent
from consuming drag events?
I will say this again, in hopes that you understand it this time. The actual component is NOT a JUCE component. There is a JUCE component that contains an OS provided component. All of your confusion, both here and in the javascript context, comes from not understanding this. It is essentially a different program from your JUCE app.
One of the great things about JUCE is that you have the source code, so you can actually go look at how WebBrowserComponent works.
Also, I hope I am not being rude. It just seems each time I mention this, you just re-ask your question.
I’m aware of how the component works. My question still stands:
Can you stop the WebBrowserComponent
from consuming drag events?
The FileDragAndDropTarget interface has a method isInterestedInFileDrag()
, perhaps that could be of some use here…
If it is possible, it will be both low level and OS dependent. As you would need to somehow access the event handler of another application. seems pretty unlikely.
To be fair, I’m not even able to get the DemoRunner’s Widget Demo’s Drag & Drop tab to work out files dragged from Explorer. Likewise when running the WidgetsDemo as its own project.
To add to that; I’ve tried debugging in VS2019 with run as admin, and then tried running the WidgetsDemo.exe with run as admin, and both ways do not work.
None of the IDropTarget
methods are called from the OS, even though RegisterDragDrop
returns S_OK
.
Edit: Ok, so you have to not run Visual Studio as admin to get the damn thing to work.
Maybe a solution is to put a transparent Component
that’s also a FileDragAndDropTarget
on top of the browser to intercept the drag/drop events?
I think that is the solution. I’m trying to figure out how that’d be done
What have you tried?
@jrlanglois @tobiq Did you manage to draw a component of top of the WebBrowserComponent? I tried to draw an ImageComponent on top of it and doesn’t seem to render. Is this due to the way it renders on screen? Maybe using OpenGL?
I am also trying to add a transparent component on top of it and any suggestions no how to do it are appreciated. Thanks in advance