X11Window: fix the behavior of setVisible

An obvious bug crept in setVisible where setVisible(true) twice would
end up hiding the window.

BUG=angleproject:1145

Change-Id: Iea8ca3de4ab8c05e6da66fb04c8d377824547b41
Reviewed-on: https://chromium-review.googlesource.com/324090
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez 2016-01-26 14:29:20 -05:00
Родитель b3844843dd
Коммит 5c8966911d
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -349,7 +349,12 @@ bool X11Window::resize(int width, int height)
void X11Window::setVisible(bool isVisible)
{
if (mVisible != isVisible)
if (mVisible == isVisible)
{
return;
}
if (isVisible)
{
XMapWindow(mDisplay, mWindow);