On Sat, Feb 7, 2009 at 9:30 PM, Danny Baumann <[email protected]> wrote: > Hi, > >> > Attached are some revised patched. They add the modifierhandler.cpp >> > and modifierhandler.h files. >> > >> > Danny suggested that the modHandler object did not belong in the >> > PrivateScreen class (and have a getter in CompScreen). I evaluated the >> > code and do not think this makes sense because modHandler depends the >> > CompScreen *screen variable to be initialized and also uses some of >> > it's internal methods. > > While it's debatable whether putting the ModifierHandler instance inside > or outside the screen class makes more sense (you already mentioned my > personal opinion on that matter), your two arguments for putting it > inside the class are no problem at all: > - Instantiating ModifierHandler after CompScreen makes sure the order of > initialization is correct.
Ok, I've done that. I was worried about having it outside CompScreen because it depends on it, but I have just initialized it like CompScreen is initialized, after CompScreen has been initialized and that seems to make sense. Personally, I don't see the point of having another top-level object outside of CompScreen; isn't CompScreen supposed to be the parent of all objects? > - Surely ModifierHandler calls some CompScreen methods, but so does any > plugin around there. CompScreen is the central object of compiz++, after > all. Yeah. While I have made it a separate object, I disagree on purely design grounds, see above. > > Regards, > > Danny > Another added bonus of this patch is that it doesn't change stuff in plugin.cpp that I had for debugging purposes. Can we backport the error detection and file-not-found stuff from master into compiz++? I haven't the time to update the vpswitch plugin to account for this, however it is just a matter of find and replacing screen->modHandler () with modHandler ;-) Regards, Sam > _______________________________________________ > Dev mailing list > [email protected] > http://lists.compiz-fusion.org/mailman/listinfo/dev > -- Sam Spilsbury _______________________________________________ Dev mailing list [email protected] http://lists.compiz-fusion.org/mailman/listinfo/dev
