bugGNUstep - Bugs: bug #5871, Mouse cursor not always...


You are not allowed to post comments on this tracker with your current authentification level.

bug #5871: Mouse cursor not always updated/reset

Submitted by:  None
Submitted on:  Sat Oct 11 14:38:39 2003  
Category: Gui/AppKitSeverity: 2 - Minor
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Mon Feb 19 17:11:06 2007, comment #13:

The last fix resolved this issue.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue May 30 19:36:49 2006, comment #12:

You're right, there's no reason to duplicate all that code. :) I've changed it in the attached patch so that [NSWindow invalidateCursorRectsForView:] calls [NSView discardCursorRects]. The reason for not doing it the other way around is that according to apple's docs, invalidateCursorRectsForView should invalidate the cursor rect and automatically (or whenever the window becomes key) calls [NSWindow resetCursorRects], while [NSView discardCursorRects] should simply discard, but not be reset until another piece of code specifically invalidates or resets the rects again.

M. Trache <postaer>
Mon May 29 22:46:18 2006, comment #11:

Wouldn't it be easier if we change the code in [NSView discardCursorRects] to call [NSWindow invalidateCursorRectsForView:] instead of duplicating most of the code?
I am not sure, how this would affect the different faked mouse events that get send for cursor rectangles. That's why I did not dare to change the code myself :-)

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Mon May 29 19:21:01 2006, comment #10:

Hi, I just noticed that the cursor still does not reset when selecting text in a textfield and then dragging far enough to cause it so scroll, so that the cursor ends up outside of the textfield. I'm attaching a fix for it.

M. Trache <postaer>
Sat May 27 22:01:42 2006, comment #9:

I did apply your full patch.
Thank you very much for it!!!

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Wed May 24 21:12:30 2006, comment #8:

In XGServerWindow, the description for _DPSsetcursor:: states that it should change the cursor on every X window owned by the application, yet I noticed that the windowmaps map table also contains the root window. I didn't know whether that is by design or not, so that extra bit of code in the patch just skips the root window so that the cursor is changed only on the application's actual windows.

With regards to the changes in NSCursor, when the NSCursor is explicitly set on mouseEntered: (with setOnMouseEntered:), it does not get pushed onto the cursor stack and therefore, whenever the mouse leaves the cursor rectangle, the cursor does not change back. The extra bit of code basically changes the cursor back to the default cursor, just for that particular situation. Admittedly, it's a bit of a hack, but I wasn't really sure how else to deal with that.. The bug is particularly visible in emacs.app (emacs-on-aqua.sourceforge.net) whenever the mouse cursor is moved off the text area, and the cursor remains an IBeam cursor. Hope this helps.

M. Trache <postaer>
Tue May 23 23:12:59 2006, comment #7:

This patch looks very promissing to me. It would be great to resolve this rather old bug with it.

I think, I do understand what the code in NSView and NSWindow tries to do, but what is the other code (NSCursor and XGServerWindow) for? If I cannot figure this out, I might submit your patch without these bits.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue May 16 23:58:29 2006, comment #6:

Hello, I've been using this simple patch (attached) which seems to resolve the problem, and it also takes care of updating the cursor as well if a view is moved underneath a cursor, etc.

M. Trache <postaer>
 Spam posted by an anonymous
Mon Feb 14 20:52:59 2005, comment #5:

The preliminary result of my investigation into this subbject is that we need to send another round of _checkCursorRectangles:forEvent: when the window closes with an event that lies outside the window. That way cursor rects would notice that they have to switch back the cursor, if they did currently change it.
I am not sure, how this would work together with the second aspect of this bug, when a view moves (for example gets scrolled inside a suoer view). Perhaps we even need to go further and check on each discard of a cursor rect if the cursor was inside and reset the cursor than. Maybe a similar check is needed if the the mouse cursor is inside a cursor rect, when it gets created?

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Thu Jan 13 14:19:08 2005, comment #4:

This can also happen when views move around, as in bug #6214.

Alexander Malmberg <alexm>
Project Member
Fri Oct 17 14:29:01 2003, comment #3:

I see similar problems a lot. I.e. when/after renaming a file in GWorkspace - the cursor keeps the "vertical line" look.
I've also seen this in TalkSoup and other apps as well.

- Martin

Thu Oct 16 22:32:36 2003, comment #2:

I can reproduce it here using the key equivalent for close alt-w

matt rice <ratmice>
Project Member
Thu Oct 16 22:19:58 2003, comment #1:

How do you close the window without moving the mouse? I've tried things like hiding the app, but I can't replicate the problem.

Adam Fedor <fedor>
Project Administrator
Sat Oct 11 14:38:39 2003, original submission:

When i have an open GNUStep window with a textfield and the mousecursor is in this textfield it looks like a vertical line instead of a pointer.
When i close the window without moving the mouse cursor, the cursor isn't updated/reset to the default look, but stays a vertical line.



Attached Files
file #10085:  cursor-update-3.diff added by postaer (1kB - text/plain)
file #10073:  cursor-update-2.diff added by postaer (1017B - text/plain)
file #9985:  cursor-update.diff added by postaer (4kB - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Feb 19 17:11:06 2007FredKieferStatusIn Progress=>Fixed
      Open/ClosedIn Test=>Closed
    Tue May 30 19:36:49 2006postaerAttached File-=>Added cursor-update-3.diff, #10085
    Mon May 29 22:46:18 2006FredKieferStatusFixed=>In Progress
    Mon May 29 19:21:01 2006postaerAttached File-=>Added cursor-update-2.diff, #10073
    Sat May 27 22:01:42 2006FredKieferStatusIn Progress=>Fixed
      Open/ClosedOpen=>In Test
    Tue May 23 23:12:59 2006FredKieferSeverity1 - Wish=>2 - Minor
      StatusNone=>In Progress
      Assigned tofedor=>FredKiefer
    Tue May 16 23:58:29 2006postaerAttached File-=>Added cursor-update.diff, #9985
    Thu Jan 13 14:19:08 2005alexmSummaryMouse cursor not updated/reset when closing window=>Mouse cursor not always updated/reset
    Thu Oct 16 22:19:58 2003fedorSeverity3 - Normal=>(Error - Not Found)
      Assigned toNone=>NA

    Back to the top

    Powered by Savane 3.1-cleanup