Fix usage of XShapeGetRectangles() in ui::WindowContainsPoint()
commite7c033a233be27e42255428e6708f5d6553a375c
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 23 Apr 2014 02:05:35 +0000 (23 02:05 +0000)
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Wed, 23 Apr 2014 02:05:35 +0000 (23 02:05 +0000)
treea5f1ade7c7ab80eafd83cc3e48bc5a0243b6a82d
parentff717712469a0b72cbcdef195cecf3e6f0f900ed
Fix usage of XShapeGetRectangles() in ui::WindowContainsPoint()

According to the GTK source:
"XShapeGetRectangles returns NULL in two situations:
 * - the server doesn't support the SHAPE extension
 * - the shape is empty"
The spec does not mention anything about returning NULL when the shape is empty. In practice, XShapeGetRectangles() returns NULL on Unity when a window is minimized.

This CL fixes ui::WindowContainsPoint() to take the empty case into account

BUG=None
TEST=None

Review URL: https://codereview.chromium.org/244693004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265497 0039d316-1c4b-4281-b951-d872f2087c98
ui/base/x/x11_util.cc