AliYousuf / hedgewars

Automatically exported from code.google.com/p/hedgewars
GNU General Public License v2.0
0 stars 0 forks source link

Remove quit prompt when switching windows #296

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. In Game
2. Switch application windows
3. Return to hedgewars window

What is the expected output? What do you see instead?
The expected output is for game to continue when i switch back to the hedgewars 
window. Instead the quit prompt is shown.

What version of the product are you using? On what operating system?
Hedgewars .9.16  OS X 10.7.2

Please provide any additional information below.
Yes i know about u did it to release the mouse....whatever. It gets annoying. 
never had mouse problems in previous versions. I always end up accidently 
quitting and ruining games for everyone

Original issue reported on code.google.com by hermes....@gmail.com on 16 Oct 2011 at 11:33

GoogleCodeExporter commented 8 years ago
"Yes i know about u did it to release the mouse....whatever."
-- I just checked, the mouse release code is actually independent of the quit 
prompt.
The prompt can be disabled regardless of it.

Let's see what unC0Rr thinks about it.

Original comment by sheepyluva on 17 Oct 2011 at 1:38

GoogleCodeExporter commented 8 years ago
This affects more than just the OSX version and I find it annoying...when you 
switch it prompts you to quit even in Win7.

It would be nice to see if we can avoid "Capturing" the mouse in the future, or 
provide a "Don't capture mouse" option in the options...because in a netgame 
where you're operating the room sometimes you just have to stop, break mouse 
capture to switch back to room window to say...kick a rude player or something 
like that.

Original comment by Darkamst...@gmail.com on 8 Nov 2011 at 12:53

GoogleCodeExporter commented 8 years ago
The issue is more. How do you indicate when you want the mouse grabbed again.
Doing it when the window is refocused makes it hard to resize and move the 
window.  That's the advantage of using the quit prompt. It is basically the 
only prompt the game has.

Current behaviour is identical to other games that capture mouse like 
minecraft, where unfocusing is equiv to pressing Esc.
The only difference is Hedgewars has less of a menu system.
The advantage is the same (not immediately recapturing mouse on window focus).

Original comment by kyberneticist@gmail.com on 15 Nov 2011 at 5:28

GoogleCodeExporter commented 8 years ago
I think we should probably add an option to bring back a behavior that *doesn't 
capture the mouse*, and leave it off by default. Some of us don't like the 
tradeoff required, and it IS VERY annoying because not only do we have to 
refocus, but we're required to press an extra key now to interact with the 
game. Furthermore the play window should be maximize-able...I don't think it 
would be hard to add an option for starting the play window maximized. We could 
even interlock a behavior where the program doesn't capture the mouse but 
requires maximized play screen. When the mouse moves off the play window 
automatically -Pause- (or in the case of a netgame do nothing) When you mouse 
back over the play window and refocus it by CLICKING (if it's been autopaused 
because you decided to interact with the taskbar on windows or another program) 
Then you can unpause it.

I don't like programs that think they ~must~ box the mouse in. We could easily 
implement "Scroll edges" on the play window to allow navigation around the map 
and avoid boxing the mouse in and requiring a key to break focus. Of course we 
can always provide a choice in the options and set the defaults based on the 
prominent user feelings on that but I think it would be a good feature.

If not an option to stop capturing, at least an option to "Capture on focus" 
instead of prompting to quit. The window losing focus should *not* simulate any 
particular key press...and we should only capture the mouse on focus. (This was 
the old behavior that I was ok with before anyway) 

9/10 if you're focusing a window you're probably going to interact with 
it...and if you can't figure out how to not accidentally focus a window you 
might need to retrain your basic skills anyway.

Original comment by Darkamst...@gmail.com on 15 Nov 2011 at 8:49

GoogleCodeExporter commented 8 years ago
as a trade off, we could re-capture mouse only when the user actually clicks 
the window, but not when focus is gained with other means (like from title bar 
or from alt tab)

opinions?

Original comment by vittorio...@gmail.com on 30 Oct 2012 at 9:54

GoogleCodeExporter commented 8 years ago
This trade off is implemented in r186229af4fc10069b804a45a541f86eaf66b5964

Original comment by vittorio...@gmail.com on 18 Jan 2013 at 3:52