uilayout: declare variable x

(integrated from master branch change c5d6438 by Todd Whiteman <toddw@activestate.com>)