fix: send NSView* as the response to getNativeWindowHandle() instead of a null handle (#15521) (#15803)
This commit is contained in:
parent
3ed5a24c72
commit
250a09a43f
6 changed files with 22 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <wrl/client.h>
|
||||
#endif
|
||||
|
||||
#include <tuple>
|
||||
#include <vector>
|
||||
|
||||
#include "atom/browser/api/atom_api_web_contents.h"
|
||||
|
@ -1046,6 +1047,11 @@ gfx::AcceleratedWidget NativeWindowViews::GetAcceleratedWidget() const {
|
|||
return GetNativeWindow()->GetHost()->GetAcceleratedWidget();
|
||||
}
|
||||
|
||||
std::tuple<void*, int> NativeWindowViews::GetNativeWindowHandlePointer() const {
|
||||
gfx::AcceleratedWidget handle = GetAcceleratedWidget();
|
||||
return std::make_tuple(static_cast<void*>(&handle), sizeof(handle));
|
||||
}
|
||||
|
||||
gfx::Rect NativeWindowViews::ContentBoundsToWindowBounds(
|
||||
const gfx::Rect& bounds) const {
|
||||
if (!has_frame())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue