Jump to content


Photo

Mouse Enter Event Happens Even When Minimized


  • This topic is locked This topic is locked
17 replies to this topic

#1 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 14 January 2010 - 01:34 AM

I haven't tested this in other gm versions, and I haven't tested on other OS's.

This problem exists using GM8 with Windows 7.

Let's say you make a button, and it plays a sound when you hover over it or when you leave it (mouse enter, mouse leave).

When you minimize your game, it acts as if the window is still there and will play the sounds when your cursor goes in and out of where the button would normally be if it was not minimized.

I've tried the built-in mouse functions, and I've tried building the events manually, and yet it still happens.
It seems as though the only way to stop it from happening is to "freeze the game when form loses focus". Which is great for minimizing, but not great while it is not minimized. In other words, this is not an option for me.

There are no functions to test if the window is minimized or not.
Using window_mouse_get_x() window_mouse_get_y() window_views_mouse_get_x() window_views_mouse_get_y() makes no difference in this situation either.

I am going to test in Vista, and other gm versions soon, although I have never witnessed this problem in the past.
At last resort, I'll use a task bar or window handle dll to solve the problem.

Anybody have any thoughts on this?

EDIT #1: Changed the title because not only does it play sounds, but also everything handled in the mouse enter, mouse leave leave events.
EDIT #2: Tried a couple different System Tray dll's, and even when minimized to tray, this still happens. Might need a dll that has a check if minimized.
EDIT #3: Still happens in GM7 on Windows 7... testing on Vista next.
EDIT #4: Tested GM8 on Vista, and this still happens. I conclude that this is in fact a bug in the Game Maker program. This should not behave this way.

Edited by AtomicUs5000, 14 January 2010 - 03:42 AM.

  • 0

#2 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 14 January 2010 - 03:14 AM

So, I find this to be a bug.
Is there a place to report this?

Also, does anybody know of an effective work-around for this problem?

I'm sure it has been reported before. I am also surprised that I had never noticed this before.

Edited by AtomicUs5000, 14 January 2010 - 03:15 AM.

  • 0

#3 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 14 January 2010 - 05:07 AM

I found this dll useful in a workaround to fix this bug:
http://gmc.yoyogames...pic=309819&st=0

However, I still find this to be quite a problem and should be something that is addressed in GM.
  • 0

#4 van0014

van0014

    GMC Member

  • GMC Member
  • 301 posts
  • Version:GM8.1

Posted 14 January 2010 - 06:06 AM

You are correct, this is a big problem; in any program that can be minimized and has mouse_enter events there will be issues. I am sure someone will find it very annoying. I do not think there would currently be any solution without a DLL. GM's window handling functions are limited. I hope you can work something out eventually, without a DLL. It is not a big issue if you need one, though. You can make them so noone knows it is being used, if thats the problem. Just put it in the temp directory and include the file in the .GMK file. Good luck!
  • 0

Proud user of GM 8.1


#5 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 14 January 2010 - 06:42 AM

You are correct, this is a big problem; in any program that can be minimized and has mouse_enter events there will be issues. I am sure someone will find it very annoying. I do not think there would currently be any solution without a DLL. GM's window handling functions are limited. I hope you can work something out eventually, without a DLL. It is not a big issue if you need one, though. You can make them so noone knows it is being used, if thats the problem. Just put it in the temp directory and include the file in the .GMK file. Good luck!

Thanks.
I just found an extension actually, so that will work out well for me.
I had no problem with the dll's but I would have had to open them up and change some things because having it load into the temporary directory was not working (one dll was calling on a second one).

I still can't get over that I didn't notice this during GM7 and I am surprised that there are no posts about this matter after all this time has gone by. That could explain why nothing was done about it, lol.
I think another option to "pause the game when minimized" near "when form loses focus" would be in order here.

I've looked around here, on the yoyo site, and I can't find anywhere to report a bug. I can't even contact anyone because the contact screen brings you to the FAQ (???)
So, if anyone knows where to submit this issue, please do so. I think this is a big problem for any user (even if they haven't realized it yet).
  • 0

#6 Newly Discovered

Newly Discovered

    Harmonious Genius

  • GMC Member
  • 2475 posts
  • Version:GM8

Posted 14 January 2010 - 09:22 AM

you could freeze the game when it loses focus...it wouldn't fix the issue but would solve it for the most part. (global game settings)
  • 0

poof_sig.png


#7 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 14 January 2010 - 10:53 AM

you could freeze the game when it loses focus...it wouldn't fix the issue but would solve it for the most part. (global game settings)

No that's not going to work for me, I specified that in my initial post:

It seems as though the only way to stop it from happening is to "freeze the game when form loses focus". Which is great for minimizing, but not great while it is not minimized. In other words, this is not an option for me.


The program is actually an application, not a game.
It runs calculations that can take a few minutes as it runs through and analyzes hundreds of lines of text input.
I don't want that process interrupted just because someone clicked outside of the box. In fact, during this time is when people are most likely going to want to do something else on their pc while they wait. Freezing when out of focus would just make the process more painful for the user.
  • 0

#8 xot

xot

    GMC Dismember

  • GMC Elder
  • 4785 posts
  • Version:GM:Studio

Posted 15 January 2010 - 12:02 AM

I've looked around here, on the yoyo site, and I can't find anywhere to report a bug. I can't even contact anyone because the contact screen brings you to the FAQ (???)
So, if anyone knows where to submit this issue, please do so. I think this is a big problem for any user (even if they haven't realized it yet).


Report bugs here:

http://bugs.yoyogames.com/
  • 0
GMLscripts.com, rise from your grave!

If any of my posts contain broken images or links, I can probably supply them for you. PM with a link to the post.

#9 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 17 January 2010 - 08:48 AM

I've looked around here, on the yoyo site, and I can't find anywhere to report a bug. I can't even contact anyone because the contact screen brings you to the FAQ (???)
So, if anyone knows where to submit this issue, please do so. I think this is a big problem for any user (even if they haven't realized it yet).


Report bugs here:

http://bugs.yoyogames.com/

Thank you very much!
  • 0

#10 tomster1996

tomster1996

    GMC Member

  • New Member
  • 312 posts

Posted 17 January 2010 - 04:19 PM

Can't you just do a test on weather the window's visible to prevent this from happening?
  • 0

#11 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 18 January 2010 - 03:04 PM

Can't you just do a test on weather the window's visible to prevent this from happening?

No, even when minimized, the window is still considered "visible"
  • 0

#12 thundybear

thundybear

    GMC Member

  • New Member
  • 390 posts

Posted 19 January 2010 - 03:30 AM

Well, you could build your own custom toolbar on the top...
  • 0
Posted Image
It's a pokemon game that someone actually works on! Features include: trainer battles, wild battles, menu + item system, NPCs, catching pokemon, Pokedex, playable maps and much more! Click the image to visit the Demo page!

Submit sprites here:
http://gmc.yoyogames...pic=453177&st=0

#13 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 20 January 2010 - 02:39 AM

Well, you could build your own custom toolbar on the top...


You would still have to use a dll or extension... not only because this would not solve the problem, but also because there are no minimizing functions built in.
  • 0

#14 Recreate

Recreate

    Furry

  • GMC Member
  • 2992 posts
  • Version:GM:Studio

Posted 20 January 2010 - 06:44 AM

Won't the freeze the game when form loses focus thing freeze the game any time that the game loses focus? That means clicking the desktop or any other windows or buttons other than the game's window, including minimizing. AFAIK.
  • 0

If the post that you are reading was created prior to 2011. For the safety of the general public, It is not to be regarded under any circumstances.
Please don't ask me to join your group at anything.


#15 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 21 January 2010 - 06:46 PM

Won't the freeze the game when form loses focus thing freeze the game any time that the game loses focus? That means clicking the desktop or any other windows or buttons other than the game's window, including minimizing. AFAIK.


Yes. But....

It seems as though the only way to stop it from happening is to "freeze the game when form loses focus". Which is great for minimizing, but not great while it is not minimized. In other words, this is not an option for me.


What I have made needs to continue running.
  • 0

#16 paul23

paul23

    GMC Member

  • Global Moderators
  • 4147 posts
  • Version:GM:Studio

Posted 27 January 2010 - 01:12 AM

hmm a better dll would be one that returned something if the window handle was changed (or simply returned the window handle)..

Maybe search the extension section for that (a script that returns a "window handle")


Also: does the problem also occur for the mouse_leave event?

Edited by paul23, 27 January 2010 - 01:13 AM.

  • 0

#17 Recreate

Recreate

    Furry

  • GMC Member
  • 2992 posts
  • Version:GM:Studio

Posted 27 January 2010 - 07:08 AM

Won't the freeze the game when form loses focus thing freeze the game any time that the game loses focus? That means clicking the desktop or any other windows or buttons other than the game's window, including minimizing. AFAIK.


Yes. But....

It seems as though the only way to stop it from happening is to "freeze the game when form loses focus". Which is great for minimizing, but not great while it is not minimized. In other words, this is not an option for me.


What I have made needs to continue running.



Ah, Use threads? Most of the DLL's I've seen work quite well.
  • 0

If the post that you are reading was created prior to 2011. For the safety of the general public, It is not to be regarded under any circumstances.
Please don't ask me to join your group at anything.


#18 AtomicUs5000

AtomicUs5000

    GMC Member

  • New Member
  • 24 posts

Posted 29 January 2010 - 03:05 AM

Also: does the problem also occur for the mouse_leave event?


Yes, it does.
  • 0