gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Last cursor issue (I hope)


From: Germán Arias
Subject: Last cursor issue (I hope)
Date: Sat, 14 Sep 2013 01:01:44 -0600
User-agent: GNUMail (Version 1.2.0)

I only can reproduce this problem with in-window menu. So, here
the steps to reproduce this problem:

1) Set NSWindow95InterfaceStyle for Ink.
2) Launch Ink and moves the mouse where the TextView will be
    displayed (before it appears on the screen).
3) Move the mouse out of textview, the I-beam is stuck.

This occurs because NSEvent objects, retain the GSTrackingRect
objects. So sometimes, when NSWindow needs update the cursor,
the GSTrackingRect provided by the NSEvent object has been
discarded. So NSWindow update the cursor to a rectangle that there
isn't present at window.

The most easy solution I found for this problem, is check the retain
count of the GSTrackingRect object. If this value is higher than one,
mean this rectangle exist somewhere and not only at NSEvent object.
Googling, many people don't recommend the use of method
-retainCount. But I tested this and works for me. This is the hack that
I added at line 4061 in NWindow.m:

if ([r retainCount] > 1)
  {
    [c mouseEntered: theEvent];
  }

What you think about this?

Germán.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]