imgui: GLFW Mouse Passthrough Broken in Docking Branch

Version/Branch of Dear ImGui:

Version: git commit 31d033c9d8d64fb9047cdcd731890f1fb5f85db2 Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp Operating System: Windows

My Issue/Question:

GLFW mouse passthrough does not appear work when lines 73-77 of imgui_impl_glfw.cpp exist. I would submit this in a PR, but I’m hesitant as comments on those lines seem to suggest its for some support reasons, so by removing them I might be messing something else up.

Standalone, minimal, complete and verifiable example:

glfwSetWindowAttrib(Window, GLFW_MOUSE_PASSTHROUGH, GLFW_TRUE);

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 26 (11 by maintainers)

Most upvoted comments

If imgui is working properly then please report GLFW issues at https://github.com/glfw/glfw/

Okay, I’m not really sure what’s going on with #4701 either…

But anyway, the exact issue is that GLFW 3.4’s mouse passthrough simply does not work (enabling it does nothing). Deleting lines 73-77 of imgui_impl_glfw.cpp fixes this however, though I’m not sure if that’s a good solution.

So @rokups, it’s not a feature of ImGui that’s not working, it’s that ImGui is blocking a feature of GLFW from working somehow.

I misread, my bad.

What qualifies as specific instructions?

If you want I could record a video outlining the exact issue, though I do feel that my previous comments explain the issue pretty well - if you could tell me what it is exactly that you don’t understand I might be able to explain whatever it is.

Because, if so, based on the header file for GLFW I’m using GLFW 3.4.

/*************************************************************************
 * GLFW 3.4 - www.glfw.org
 * A library for OpenGL, window and input
 *------------------------------------------------------------------------
 * Copyright (c) 2002-2006 Marcus Geelnard
 * Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.org>
 *
 * This software is provided 'as-is', without any express or implied
 * warranty. In no event will the authors be held liable for any damages
 * arising from the use of this software.
 *
 * Permission is granted to anyone to use this software for any purpose,
 * including commercial applications, and to alter it and redistribute it
 * freely, subject to the following restrictions:
 *
 * 1. The origin of this software must not be misrepresented; you must not
 *    claim that you wrote the original software. If you use this software
 *    in a product, an acknowledgment in the product documentation would
 *    be appreciated but is not required.
 *
 * 2. Altered source versions must be plainly marked as such, and must not
 *    be misrepresented as being the original software.
 *
 * 3. This notice may not be removed or altered from any source
 *    distribution.
 *
 *************************************************************************/

This problem only exists in the docking branch (as of commit 31d033c9d8d64fb9047cdcd731890f1fb5f85db2) and can be bypassed by commenting out lines 73-77 of imgui_impl_glfw.cpp.