Skip to content

Commit b1fa8c5

Browse files
Fixed bugs that prevented build on Linux
1 parent 70179e0 commit b1fa8c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backends/imgui_impl_sdl2.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ static void ImGui_ImplSDL2_CreateWindow(ImGuiViewport* viewport)
888888
SDL_Window *parent_window = parent_viewport_data->Window;
889889

890890
#ifdef __linux__
891-
parent_ptr = sdl_mouse_window;
891+
parent_ptr = parent_window;
892892
#else
893893
if (parent_window != nullptr)
894894
{
@@ -1049,8 +1049,8 @@ static void ImGui_ImplSDL2_SetWindowPos(ImGuiViewport* viewport, ImVec2 pos)
10491049
#elif defined __linux__
10501050
if(vd->ChildWindow != nullptr)
10511051
{
1052-
pos_x = viewport->Pos.x - main_viewport->Pos.x;
1053-
pos_y = viewport->Pos.y - main_viewport->Pos.y;
1052+
pos_x = viewport->Pos.x - parent_viewport->Pos.x;
1053+
pos_y = viewport->Pos.y - parent_viewport->Pos.y;
10541054

10551055
if(vd->ChildWindow)
10561056
{

0 commit comments

Comments
 (0)