On Mon, Aug 23, 2010 at 12:54:34AM -0700, Keith Packard wrote: > On Mon, 23 Aug 2010 13:29:50 +1000, Peter Hutterer <[email protected]> > wrote: > > If the master does not have a button class, recalculating the number of > > buttons required for this master dereferences a NULL pointer. Guard against > > this, if the master pointer doesn't have a button class, it doesn't need to > > update it's number of buttons. > > Don't you still need to send the event though?
No, the event is only sent when the number of buttons on the master changes. If it doesn't change (i.e. because the master stays on "no button class") then there's no need for the event. Note that this isn't the usual DeviceChangedEvent path that's triggered when the master updates itself from the slave. This path is triggered when a slave disappears and the master may need to re-adjust the number of buttons. If the number of buttons stay the same, no event is needed. Cheers, Peter _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
