summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2022-06-11 12:08:16 +0200
committerRay <[email protected]>2022-06-11 12:08:16 +0200
commitb549baa6b76c3f27f1aebcd4cd61333ad1deb960 (patch)
tree0498cffe07a9963c5800e8bed8c461065d106f66 /src
parent4a6e8bb90baee8abd9ec4525725ffac67f51fe63 (diff)
downloadraylib-b549baa6b76c3f27f1aebcd4cd61333ad1deb960.tar.gz
raylib-b549baa6b76c3f27f1aebcd4cd61333ad1deb960.zip
New feature: support MOUSE_PASSTHROUGH #2516
Diffstat (limited to 'src')
-rw-r--r--src/raylib.h1
-rw-r--r--src/rcore.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/raylib.h b/src/raylib.h
index 47218129..951c0da5 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -501,6 +501,7 @@ typedef enum {
FLAG_WINDOW_ALWAYS_RUN = 0x00000100, // Set to allow windows running while minimized
FLAG_WINDOW_TRANSPARENT = 0x00000010, // Set to allow transparent framebuffer
FLAG_WINDOW_HIGHDPI = 0x00002000, // Set to support HighDPI
+ FLAG_WINDOW_MOUSE_PASSTHROUGH = 0x0002000d, // Set to support mouse passthrough, only supported when FLAG_WINDOW_UNDECORATED
FLAG_MSAA_4X_HINT = 0x00000020, // Set to try enabling MSAA 4X
FLAG_INTERLACED_HINT = 0x00010000 // Set to try enabling interlaced video format (for V3D)
} ConfigFlags;
diff --git a/src/rcore.c b/src/rcore.c
index b90cbfd1..44fd96c1 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -4036,6 +4036,10 @@ static bool InitGraphicsDevice(int width, int height)
#endif
}
else glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_FALSE);
+
+ // Mouse passthrough
+ if ((CORE.Window.flags & FLAG_WINDOW_MOUSE_PASSTHROUGH) > 0) glfwWindowHint(GLFW_MOUSE_PASSTHROUGH, GLFW_TRUE);
+ else glfwWindowHint(GLFW_MOUSE_PASSTHROUGH, GLFW_FALSE);
#endif
if (CORE.Window.flags & FLAG_MSAA_4X_HINT)