suzdraws / mintty

Automatically exported from code.google.com/p/mintty
0 stars 0 forks source link

Cursor hidden when typing #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open Mintty, click it to make it the active window
2. Move the mouse cursor outside the mintty window
3. Type - text will come up at the mintty prompt
4. The cursor will disappear
5. Move the cursor.

What is the expected output?

The cursor should not disappear if it is outside the mintty window.

Alternatively, if it must disappear, it should reappear immediately when I 
move the cursor.

What do you see instead?
The cursor remains hidden until it reenters the mintty window.

What version of the product are you using? On what operating system?
Mintty 0.5.7 on Windows 7 with 

CYGWIN_NT-6.1 1.7.1(0.218/5/3) 2009-12-07 11:48

Please provide any additional information below.

I've had a look at the source code, tracking it to winmain.c.

The mouse is hidden on line 654, regardless of whether it is inside or 
outside mintty.

The mouse is made to reappear on mouse click, mouse move or mouse release 
events. But these events don't make it to the mintty event loop unless the 
mouse is inside the window.

Original issue reported on code.google.com by mistermo...@gmail.com on 3 Feb 2010 at 3:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I've attached a patch that fixes the problem for me - before hiding the cursor, 
it 
checks to see that the cursor is inside the window.

If it is outside the window, nothing happens.

Tested, with all four edge cases. The mouse reappears when you move it beyond 
each 
edge.

Original comment by mistermo...@gmail.com on 3 Feb 2010 at 5:03

Attachments:

GoogleCodeExporter commented 9 years ago
Strange. Mouse pointer state in Windows is window-specific, i.e. mintty's 
pointer 
hiding should not have an effect while the pointer is over another window 
(including 
the desktop). In other words, I can't reproduce this.

Are you running Windows in a virtual machine or via VNC or some such?

Original comment by andy.koppe on 3 Feb 2010 at 6:34

GoogleCodeExporter commented 9 years ago
Ok. Weird. I'm running it bare-metal, on a Celeron laptop.

I've just done some more testing:

The cursor does not disappear when you type in mintty while the mouse is over:
- the desktop
- process explorer
- windows explorer
- internet explorer
- steam

The cursor DOES disappear when you type in mintty while the mouse is over:
- the windows 7 taskbar
- google chrome

Interestingly, when you type while the mouse is over the desktop, and then you 
move 
the mouse into the taskbar, the cursor goes invisible.

Thanks for the quick response!

Original comment by mistermo...@gmail.com on 3 Feb 2010 at 6:57

GoogleCodeExporter commented 9 years ago
Thanks. A couple more stabs at trying to reproduce this: have you got any 
utilities 
running that might have an effect here, e.g. for focus-follows-mouse? What 
desktop 
theme and mouse pointer scheme are you using? 

In any case though, the workaround seems easy enough and I can't see it doing 
any harm.

Original comment by andy.koppe on 3 Feb 2010 at 7:44

GoogleCodeExporter commented 9 years ago
I've restarted my computer, and now I can't reproduce the problem either. :-/

I could reliably reproduce it this morning, and I remember my mouse 
disappearing 
outside MinTTY a lot over the last couple of months.

If this happens again, I'll try and close programs one by one, and see if one 
of them 
is causing this behaviour.

Thanks for your help with this issue! :)

PS: I don't run any focus-follows-mouse software. I'm using the default 
"Windows Aero 
(system scheme) pointer scheme.

Original comment by mistermo...@gmail.com on 3 Feb 2010 at 9:08

GoogleCodeExporter commented 9 years ago
Weird. Perhaps a dodgy mouse driver or display driver. I applied a fix anyway, 
using 
the WindowFromPoint function to take overlapping windows into account. r728 on 
trunk.

Original comment by andy.koppe on 3 Feb 2010 at 7:16

GoogleCodeExporter commented 9 years ago

Original comment by andy.koppe on 13 Feb 2010 at 4:19