xserver/hw
Roland Scheidegger 2ad8aae749 hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions
The problem is that the xf86_use_hw_cursor(_argb) functions may get this
correctly now, some drivers will replace these generic versions with their
own functions. It is pretty insane to expect them to do reference counting
of the cursor (as an example, look at driver/xf86-video-vmware to see how
that looks like as a workaround). There are even places in xserver itself
which replace these two functions.
The segfaults if no reference counting is done are caused because the
reference count of the cursor reached zero, hence the cursor was freed,
however xf86CursorEnableDisableFBAccess() brought it back to life from
the dead (from the SavedCursor).
This patch hence adds reference counting in xf86CursorSetCursor. As per Michel
Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen.
In theory with this it should be possible to remove the reference
counting in the UseHwCursor functions I think, though it should also be
safe to keep them.

Signed-off-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 67a8c659f2)
2010-03-25 19:31:37 +01:00
..
dmx dmx: Correctly compute DMXGetScreenAttributes reply length 2009-11-03 13:19:47 +10:00
kdrive Xfake: Nuke -Wl,-undefined=InitExtensions from LDFLAGS 2009-12-24 07:54:46 -08:00
vfb input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7 2009-06-18 14:41:47 +10:00
xfree86 hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions 2010-03-25 19:31:37 +01:00
xnest Xnest: set the default pointer accel to the host's values (#10013) 2009-09-09 10:47:08 +10:00
xquartz XQuartz: Constrain the pointer to the updated display bounds on display reconfigure. 2010-03-22 00:15:54 -07:00
xwin Xming: Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion() 2009-11-19 16:33:52 +10:00
Makefile.am Remove xgl. 2008-06-12 16:00:50 -04:00