On Fri, 17 Feb 2012, BALATON Zoltan escribió: > On Thu, 16 Feb 2012, Rodolfo García Peñas wrote: > >The function setDoubleClick has an extern that don't needs and > >comments about the function. Because the variable > >WINGsConfiguration.doubleClickDelay can be accesed without > >problems, we can remove the externs. About the comments, in the > >file window.c, we can find > > > >event->xbutton.button == WINGsConfiguration.mouseWheelUp > > > >accessing directly to the configuration structure. > > > >We can add some functions like setConfiguration, getConfiguration > >to WINGs, but is not needed. > > If the P in WINGsP.h stands for Private then no files outside of > WINGs should include it. If WINGsConfiguration is an internal > structure of WINGs then only accessor methods should be used outside > of WINGs. (On the other hand if it's intended to be made public then > it should have been declared in WINGs.h.) > > Of course it also works if you just include the WINGsP.h and access > the structure directly but it breaks the intended separation between > WINGs and Window Maker code. WPrefs also uses this variable in > MouseSettings.c and double.c so adding accessor methods is probably > the cleaner way to solve this.
Hi, I did two patches to solve this WINGsP.h access. I will send them in a new mails. I did the same for doubleClickDelay() in defaults.c:setModifierKeyLabels(), is the third patch. This problem is present in moveres.c and geomview.c, but here is more difficult to do. First, we should change some lines using macros defined at WINGsP.h to the macro value directly, and "move these functions from WINGsP.h to WINGs.h"??: geomview.c:39:3:W_RegisterUserWidget geomview.c:46:2:W_CreateTopView geomview.c:55:3:W_DestroyView geomview.c:72:2:W_ResizeView geomview.c:111:2:W_DrawRelief What should we do? Cheers, kix > About mouseWheelUp/mouseWheelDown, they are only used in window.c in > Window Maker but since it is only defined in WINGs they should not > be accessed directly either. Also there seems to be no way of > setting these configuration items other than editing the config > file, so most probably they are set to Button4/Button5 anyway. The > other buttons are not configurable and are hard coded as Button1/2/3 > (but their actions can be set elsewhere). One soulution might be to > just remove these configuration items and hard code mouse wheel to > be Button4 and Button5 or maybe change them to be a compile time > option via a #define instead. > > Regards, > BALATON Zoltan -- ||// //\\// Rodolfo "kix" Garcia ||\\// //\\ http://www.kix.es/ -- To unsubscribe, send mail to [email protected].
