On 2013-09-03 02:00:22 -0600 Fred Kiefer <[email protected]> wrote:
>
> Thank you this great example for the problem. I think this is related to
> the colour panel issue you already demonstrated. In both cases the
> cursor gets set too often when switching windows.
> At the moment I am to ill to look into this or rather my head is to
> dizzy to think hard enough to solve this. Maybe on the next weekend?
>
OK, today I did more tests and I found some interesting information and
one solution for this problem. First apply the attached patch, this only
add some NSLog messages at NSWindow. Then run the test app with
--GNU-Debug=NSCursor. As you can see, sometimes when NSWindow
print the message "Mouse exited", NSCursor don't print the
corresponding message "mouseExited:". This is because there isn't a
cursor associated with that tracking rectangle. Even when, obviously,
there one cursor (the I-beam).
But obviously we should pop the current cursor. So one solution is write:
[[NSCursor currentCursor] mouseExited: theEvent];
when mouse exited (NSWindow line 4065). But I don't know if this can
cause problems.
Germán.
<change.patch>
Index: Source/NSWindow.m
===================================================================
--- Source/NSWindow.m (revisión: 37078)
+++ Source/NSWindow.m (copia de trabajo)
@@ -4058,10 +4058,22 @@
if ([theEvent trackingNumber]) // It's a mouse entered
{
+ NSLog(@"NSWindow Mouse Entered");
[c mouseEntered: theEvent];
}
else // it is a mouse exited
{
+ NSLog(@"NSWindow Mouse Exited");
+
+ if (c)
+ {
+ NSLog(@"NSWindow: there is a cursor");
+ }
+ else
+ {
+ NSLog(@"NSWindow: there isn't a cursor");
+ }
+
[c mouseExited: theEvent];
}
}
_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev