mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Backends: OSX: build fix. Amend 32f9dfc
This commit is contained in:
parent
22b36bef9e
commit
0c2650e833
1 changed files with 2 additions and 0 deletions
|
|
@ -80,6 +80,7 @@ struct ImGui_ImplOSX_Data
|
||||||
KeyEventResponder* KeyEventResponder;
|
KeyEventResponder* KeyEventResponder;
|
||||||
NSTextInputContext* InputContext;
|
NSTextInputContext* InputContext;
|
||||||
id Monitor;
|
id Monitor;
|
||||||
|
NSWindow* Window;
|
||||||
|
|
||||||
ImGui_ImplOSX_Data() { memset(this, 0, sizeof(*this)); }
|
ImGui_ImplOSX_Data() { memset(this, 0, sizeof(*this)); }
|
||||||
};
|
};
|
||||||
|
|
@ -402,6 +403,7 @@ bool ImGui_ImplOSX_Init(NSView* view)
|
||||||
//io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
|
//io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
|
||||||
|
|
||||||
bd->Observer = [ImGuiObserver new];
|
bd->Observer = [ImGuiObserver new];
|
||||||
|
bd->Window = view.window ?: NSApp.orderedWindows.firstObject;
|
||||||
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
|
ImGuiViewport* main_viewport = ImGui::GetMainViewport();
|
||||||
main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window;
|
main_viewport->PlatformHandle = main_viewport->PlatformHandleRaw = (__bridge_retained void*)bd->Window;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue