mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-01 03:30:06 +00:00
Viewport: Coupling non-main viewport to one window. Viewport name derived from the window. Added ImGuiConfigFlags_PlatformNoTaskBar, off by default (aka re-established task-bars by default for now). (#1542)
This commit is contained in:
parent
aa3fe81c87
commit
4d46383100
12 changed files with 55 additions and 30 deletions
|
|
@ -291,15 +291,18 @@ static void ImGui_ImplWin32_CreateViewport(ImGuiViewport* viewport)
|
|||
ImGuiPlatformDataWin32* data = IM_NEW(ImGuiPlatformDataWin32)();
|
||||
viewport->PlatformUserData = data;
|
||||
|
||||
if (viewport->Flags & ImGuiViewportFlags_NoDecoration)
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
bool no_decoration = (viewport->Flags & ImGuiViewportFlags_NoDecoration) != 0;
|
||||
bool no_task_bar = (io.ConfigFlags & ImGuiConfigFlags_PlatformNoTaskBar) != 0;
|
||||
if (no_decoration)
|
||||
{
|
||||
data->DwStyle = WS_POPUP;
|
||||
data->DwExStyle = 0;
|
||||
data->DwExStyle = no_task_bar ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW;
|
||||
}
|
||||
else
|
||||
{
|
||||
data->DwStyle = WS_OVERLAPPEDWINDOW;
|
||||
data->DwExStyle = WS_EX_TOOLWINDOW;
|
||||
data->DwExStyle = no_task_bar ? WS_EX_TOOLWINDOW : WS_EX_APPWINDOW;
|
||||
}
|
||||
|
||||
// Create window
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue