gpt4 book ai didi

c++ - 在 CEF 客户端中拖动时的图像预览

转载 作者:搜寻专家 更新时间:2023-10-31 02:10:24 25 4
gpt4 key购买 nike

我在虚幻引擎中使用 cefclient。当您在普通的 chrome 浏览器中拖动任何图像时,它会提供图像预览。 enter image description here

但是,当我尝试在 cefclient 中做同样的事情时,它没有工作。所以我尝试下载 cefclient可执行文件并执行相同的操作。但它发出如下警报..

enter image description here

有人知道如何解决这个问题吗?

最佳答案

下载 CEF/cefclient 源并找到给定的文本:

  // Forbid dragging of URLs and files.
if ((mask & DRAG_OPERATION_LINK) && !dragData->IsFragment()) {
test_runner::Alert(browser, "cefclient blocks dragging of URLs and files");
return true;
}

正在搜索 "chromiumembedded DRAG_OPERATION_LINK"给你这个评论:

The drag is blocked in cefclient\browser\client_handler.cc ClientHandler::OnDragEnter():
// Forbid dragging of link URLs.
if (mask & DRAG_OPERATION_LINK)
return true;
Howevever, it appears that this check is wrong in current CEF versions since |mask| is DRAG_OPERATION_COPY | DRAG_OPERATION_LINK | DRAG_OPERATION_MOVE when dragging both links and fragments.
The check should be fixed to properly differentiate between links and fragments.
For your purposes you can remove this check and all dragging operations will work in cefclient.

https://bitbucket.org/chromiumembedded/cef/issues/1885/drag-and-drop-of-selected-text-in-input#comment-27661218

关于c++ - 在 CEF 客户端中拖动时的图像预览,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45347447/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com