scjones@thor.UUCP (Larry Jones) (10/16/90)
I'm in the process of implementing a server over top of another graphics system and I've been using serialNumber as a unique identifier for graphics system resources I create but I just ran into a snag and I'm not sure whether it's a bug or not. When a client creates a pixmap, ProcCreatePixmap in dix/dispatch.c calls the screen's CreatePixmap procedure which assigns a serial number to the newly-created pixmap, but then ProcCreatePixmap assigns it a new serial number which screws up my mapping. The porting layer document says that CreatePixmap is responsible for filling in *all* the fields in the pixmap, so it seems to me that dix shouldn't be mucking about with it. Am I right? ---- Larry Jones UUCP: uunet!sdrc!thor!scjones SDRC scjones@thor.UUCP 2000 Eastman Dr. BIX: ltl Milford, OH 45150-2789 AT&T: (513) 576-2070 You can never really enjoy Sundays because in the back of your mind you know you have to go to school the next day. -- Calvin
keith@EXPO.LCS.MIT.EDU (Keith Packard) (10/17/90)
> I'm in the process of implementing a server over top of another > graphics system and I've been using serialNumber as a unique > identifier for graphics system resources I create serialNumber is used by DIX to tag GCs with the drawable they've been validated against. Whenever a window is reconfigured, it's serialNumber is changed by DIX so that all GCs which currently are validated against it are revalidated to use the new clipping information. This means that serialNumbers can change (at least for windows) without DDX ever finding out. > ProcCreatePixmap in dix/dispatch.c calls > the screen's CreatePixmap procedure which assigns a serial number > to the newly-created pixmap, but then ProcCreatePixmap assigns it > a new serial number which screws up my mapping. Even our ddxen fill in the serialNumber field in the pixmap, so this does look redundant. However, I'd hate to have your DDX code rely on the fact that in the current implementation, serialNumbers for pixmaps never change. The pixmap does contain a devPrivate field which can be used to hook on any device-dependent information; I'm not really sure what else you'd need. For a unique identifier, it seems like you could easily use the pixmap address.