xserver/hw
Roland Scheidegger 67a8c659f2 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>
2010-03-15 08:37:53 -07:00
..
dmx dmx: fix OsAbort()-related build error in examples/xinput.c 2010-03-03 19:59:18 -08:00
kdrive os: Prevent core dump from being truncated. 2010-02-17 23:20:52 -08:00
vfb dix: move config_init into the DDX. 2010-02-15 09:15:18 +10:00
xfree86 hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions 2010-03-15 08:37:53 -07:00
xnest dix: move config_init into the DDX. 2010-02-15 09:15:18 +10:00
xquartz Merge remote branch 'jeremyhu/master' 2010-03-15 08:26:58 -07:00
xwin xfree86: Reorder InputClass option priorities 2010-02-15 15:27:42 +10:00
Makefile.am Remove xgl. 2008-06-12 16:00:50 -04:00