Skip to content

Commit 5b15eeb

Browse files
committed
only accept gestures when ImGui doesn't want input
1 parent bd88f8e commit 5b15eeb

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,11 @@ if(portable-file-dialogs_ADDED)
178178
target_include_directories(portable-file-dialogs INTERFACE "${portable-file-dialogs_SOURCE_DIR}")
179179
endif()
180180

181-
# set(HELLOIMGUI_USE_GLFW_METAL ON) set(HELLOIMGUI_USE_GLFW_OPENGL3 ON) set(HELLOIMGUI_USE_SDL_OPENGL3 ON)
181+
# set(HELLOIMGUI_USE_GLFW_METAL ON)
182+
183+
# set(HELLOIMGUI_USE_GLFW_OPENGL3 ON)
184+
185+
# set(HELLOIMGUI_USE_SDL_OPENGL3 ON)
182186
CPMAddPackage("gh:pthom/hello_imgui#8abe2c98dbf99e3a098eb5548b0a079c9f4c8a8f")
183187
if(hello_imgui_ADDED)
184188
message(STATUS "hello_imgui library added")

src/app.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,10 @@ void SampleViewer::draw_editor()
958958

959959
bool SampleViewer::process_event(void *e)
960960
{
961-
#ifdef HELLOIMGUI_USE_SDL_OPENGL3
961+
#ifdef HELLOIMGUI_USE_SDL
962+
if (ImGui::GetIO().WantCaptureMouse)
963+
return false;
964+
962965
static bool sPinch = false;
963966
SDL_Event *event = static_cast<SDL_Event *>(e);
964967
switch (event->type)

0 commit comments

Comments
 (0)