consistant use of ofWindowModestead of int type