wl: factor out cairo context creation and set line width