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


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

bug #5871: Mouse cursor not always updated/reset

Submitted by:  None
Submitted on:  Sat 11 Oct 2003 02:38:39 PM UTC  
Category:  Gui/AppKit Severity:  2 - Minor
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  Fred Kiefer <FredKiefer>
Open/Closed:  Closed

( Jump to the original submission)

Mon 19 Feb 2007 05:11:06 PM UTC, comment #13:

The last fix resolved this issue.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Tue 30 May 2006 07:36:49 PM UTC, 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 29 May 2006 10:46:18 PM UTC, 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 29 May 2006 07:21:01 PM UTC, 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 27 May 2006 10:01:42 PM UTC, comment #9:

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

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Wed 24 May 2006 09:12:30 PM UTC, 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 23 May 2006 11:12:59 PM UTC, 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 16 May 2006 11:58:29 PM UTC, 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 anonymous
Mon 14 Feb 2005 08:52:59 PM UTC, 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 13 Jan 2005 02:19:08 PM UTC, comment #4:

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

Alexander Malmberg <alexm>
Project Member
Fri 17 Oct 2003 02:29:01 PM UTC, 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 16 Oct 2003 10:32:36 PM UTC, comment #2:

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

matt rice <ratmice>
Project Member
Thu 16 Oct 2003 10:19:58 PM UTC, 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 11 Oct 2003 02:38:39 PM UTC, 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 (1KiB - text/plain)
file #10073:  cursor-update-2.diff added by postaer (1017B - text/plain)
file #9985:  cursor-update.diff added by postaer (4KiB - text/plain)


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.




    Follow 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-02-19 FredKiefer StatusIn Progress => Fixed
        Open/ClosedIn Test => Closed
    2006-05-30 postaer Attached File- => Added cursor-update-3.diff, #10085
    2006-05-29 FredKiefer StatusFixed => In Progress
    2006-05-29 postaer Attached File- => Added cursor-update-2.diff, #10073
    2006-05-27 FredKiefer StatusIn Progress => Fixed
        Open/ClosedOpen => In Test
    2006-05-23 FredKiefer Severity1 - Wish => 2 - Minor
        StatusNone => In Progress
        Assigned tofedor => FredKiefer
    2006-05-16 postaer Attached File- => Added cursor-update.diff, #9985
    2005-01-13 alexm SummaryMouse cursor not updated/reset when closing window => Mouse cursor not always updated/reset
    2003-10-16 fedor Severity3 - Normal => (Error - Not Found)
        Assigned toNone => NA

    Back to the top

    Powered by Savane 3.4