Skip to content

Commit

Permalink
Disable capturing the mouse in IMGUI code.
Browse files Browse the repository at this point in the history
We'll need to go back and find a proper solution (especially if we have 
drag-and-drop issues), but this works as a semi-permanent fix.
  • Loading branch information
Web-eWorks authored and impaktor committed Oct 28, 2018
1 parent 2af5223 commit 1f9a451
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrib/imgui/examples/imgui_impl_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,11 @@ static void ImGui_ImplSDL2_UpdateMousePosAndButtons()
io.MouseDown[2] = g_MousePressed[2] || (mouse_buttons & SDL_BUTTON(SDL_BUTTON_MIDDLE)) != 0;
g_MousePressed[0] = g_MousePressed[1] = g_MousePressed[2] = false;

#if SDL_HAS_CAPTURE_MOUSE && !defined(__EMSCRIPTEN__)
// Using this code-path causes several issues in Pioneer - when capturing the
// mouse, the mouse snaps back to the center of the window, and there are some
// issues with the WM's decoration extents being calculated into the window's
// size on the Cinammon DE.
#if 0 //SDL_HAS_CAPTURE_MOUSE && !defined(__EMSCRIPTEN__)
SDL_Window* focused_window = SDL_GetKeyboardFocus();
if (g_Window == focused_window)
{
Expand Down

0 comments on commit 1f9a451

Please sign in to comment.