Can't detect whether mouse is inside the window on Windows

I noticed that using that pre-built Windows DLL Sam Lantinga gave me
the other day that my game is completely unable to detect when the
mouse is outside the window (which the game needs to know in order to
hide the cursor sprite). Can somebody confirm me this? It works
completely fine on Ubuntu.

This is what the game is doing right now:

// Check if the cursor is inside our window
// There’s only one window so we don’t need to check if it’s exactly our
// window (SDL won’t know about stuff from other programs), just if it’s
// NULL or not
SDL_Window *window = SDL_GetMouseFocus();
input.cursor.inside = window != NULL ? 1 : 0;

Can you report this to bugzilla?
http://bugzilla.libsdl.org

Thanks!On Sun, Nov 4, 2012 at 11:04 PM, Sik the hedgehog < sik.the.hedgehog at gmail.com> wrote:

I noticed that using that pre-built Windows DLL Sam Lantinga gave me
the other day that my game is completely unable to detect when the
mouse is outside the window (which the game needs to know in order to
hide the cursor sprite). Can somebody confirm me this? It works
completely fine on Ubuntu.

This is what the game is doing right now:

// Check if the cursor is inside our window
// There’s only one window so we don’t need to check if it’s exactly our
// window (SDL won’t know about stuff from other programs), just if it’s
// NULL or not
SDL_Window *window = SDL_GetMouseFocus();
input.cursor.inside = window != NULL ? 1 : 0;


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Sure, just wanted to make sure it wasn’t just a fluke because of how
rushed this was :stuck_out_tongue:

2012/11/5 Sam Lantinga :> Can you report this to bugzilla?

http://bugzilla.libsdl.org

Thanks!

On Sun, Nov 4, 2012 at 11:04 PM, Sik the hedgehog <@Sik_the_hedgehog> wrote:

I noticed that using that pre-built Windows DLL Sam Lantinga gave me
the other day that my game is completely unable to detect when the
mouse is outside the window (which the game needs to know in order to
hide the cursor sprite). Can somebody confirm me this? It works
completely fine on Ubuntu.

This is what the game is doing right now:

// Check if the cursor is inside our window
// There’s only one window so we don’t need to check if it’s exactly
our
// window (SDL won’t know about stuff from other programs), just if
it’s
// NULL or not
SDL_Window *window = SDL_GetMouseFocus();
input.cursor.inside = window != NULL ? 1 : 0;


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Here’s the bug report:
http://bugzilla.libsdl.org/show_bug.cgi?id=1634

2012/11/5 Sik the hedgehog <@Sik_the_hedgehog>:> Sure, just wanted to make sure it wasn’t just a fluke because of how

rushed this was :stuck_out_tongue:

2012/11/5 Sam Lantinga :

Can you report this to bugzilla?
http://bugzilla.libsdl.org

Thanks!

On Sun, Nov 4, 2012 at 11:04 PM, Sik the hedgehog <@Sik_the_hedgehog> wrote:

I noticed that using that pre-built Windows DLL Sam Lantinga gave me
the other day that my game is completely unable to detect when the
mouse is outside the window (which the game needs to know in order to
hide the cursor sprite). Can somebody confirm me this? It works
completely fine on Ubuntu.

This is what the game is doing right now:

// Check if the cursor is inside our window
// There’s only one window so we don’t need to check if it’s exactly
our
// window (SDL won’t know about stuff from other programs), just if
it’s
// NULL or not
SDL_Window *window = SDL_GetMouseFocus();
input.cursor.inside = window != NULL ? 1 : 0;


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks! :)On Sun, Nov 4, 2012 at 11:13 PM, Sik the hedgehog < sik.the.hedgehog at gmail.com> wrote:

Here’s the bug report:
http://bugzilla.libsdl.org/show_bug.cgi?id=1634

2012/11/5 Sik the hedgehog <sik.the.hedgehog at gmail.com>:

Sure, just wanted to make sure it wasn’t just a fluke because of how
rushed this was :stuck_out_tongue:

2012/11/5 Sam Lantinga <@slouken>:

Can you report this to bugzilla?
http://bugzilla.libsdl.org

Thanks!

On Sun, Nov 4, 2012 at 11:04 PM, Sik the hedgehog <sik.the.hedgehog at gmail.com> wrote:

I noticed that using that pre-built Windows DLL Sam Lantinga gave me
the other day that my game is completely unable to detect when the
mouse is outside the window (which the game needs to know in order to
hide the cursor sprite). Can somebody confirm me this? It works
completely fine on Ubuntu.

This is what the game is doing right now:

// Check if the cursor is inside our window
// There’s only one window so we don’t need to check if it’s exactly
our
// window (SDL won’t know about stuff from other programs), just if
it’s
// NULL or not
SDL_Window *window = SDL_GetMouseFocus();
input.cursor.inside = window != NULL ? 1 : 0;


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org