Bug 23034 - FixesHideCursor is broken in X server git
Summary: FixesHideCursor is broken in X server git
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-29 23:55 UTC by Peter Hutterer
Modified: 2009-08-02 19:45 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
GTK test program displaying an animated cursor. (3.22 KB, text/plain)
2009-07-29 23:55 UTC, Peter Hutterer
no flags Details
Simple X program calling XFixesHide/ShowCursor (763 bytes, text/plain)
2009-07-29 23:56 UTC, Peter Hutterer
no flags Details
0001-xfixes-backup-the-DisplayCursor-CloseScreen-proc-bef.patch (2.57 KB, patch)
2009-07-30 23:06 UTC, Peter Hutterer
no flags Details | Splinter Review

Description Peter Hutterer 2009-07-29 23:55:19 UTC
Created attachment 28183 [details]
GTK test program displaying an animated cursor.

Three broken cases identified, possibly linked to the same cause. Test
programs are attached. Busycursor is a gtk program that displays an animated
cursor (in the default Fedora GNOME theme anyway), hidecursor just calls
XFixesHideCursor/XFixesShowCursor until cancelled.

Test case 1:
1. run busycursor, click button, leave cursor in busycursor window
2. open terminal, run hidecursor while cursor is still in busycursor
3. ctrl+c hidecursor until exit
4. ctrl+c busycursor

Server crashes, but it seems to happen in different cases. Looks like some
cursor reference is still around after the cursor got freed.

Test case 2:
1. repeat steps 1 - 3 from above

The cursor is now animated everywhere, not just in the window.

Test case 3:
1. run busycursor, click button, move cursor outside of busycursor window
2. run hidecursor, ctrl+c hidecursor

Moving the cursor back into the busycursor window won't display a cursor at
all.
Comment 1 Peter Hutterer 2009-07-29 23:56:57 UTC
Created attachment 28184 [details]
Simple X program calling XFixesHide/ShowCursor
Comment 2 Peter Hutterer 2009-07-30 23:06:44 UTC
Created attachment 28214 [details] [review]
0001-xfixes-backup-the-DisplayCursor-CloseScreen-proc-bef.patch

The screen's DisplayCursor func is wrapped as
AnimCurDisplayCursor -> CursorDisplayCursor -> miPointerDisplayCursor.

Calling CursorDisplayCursor while an animated cursor was currently displayed
would remove AnimCurDisplayCursor from the wrap stack. Thus, the next call
to ChangeToCursor wouldn't update the animated cursor state. The block
handler for animated cursors would then continuously overwrite the actual
cursor, leaving an animated cursor everywhere on the screen.
Comment 3 Peter Hutterer 2009-08-02 19:45:49 UTC
pushed as 664ac92d8bbe956dd6fd80fac5dc3161028803b2


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.