X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3aba082d50ed54fdde8993f0a1754cc93d2429ea..c0ac3149bfac1e37fb6eb1a7388603020d319676:/src/x11/window.cpp?ds=sidebyside diff --git a/src/x11/window.cpp b/src/x11/window.cpp index f10becfa7f..7515a92546 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -805,9 +805,11 @@ void wxWindowX11::DoScreenToClient(int *x, int *y) const Window thisWindow = (Window) m_clientWindow; Window childWindow; - int xx = *x; - int yy = *y; - XTranslateCoordinates(display, rootWindow, thisWindow, xx, yy, x, y, &childWindow); + int xx = x ? *x : 0; + int yy = y ? *y : 0; + XTranslateCoordinates(display, rootWindow, thisWindow, + xx, yy, x ? x : &xx, y ? y : &yy, + &childWindow); } void wxWindowX11::DoClientToScreen(int *x, int *y) const @@ -817,9 +819,11 @@ void wxWindowX11::DoClientToScreen(int *x, int *y) const Window thisWindow = (Window) m_clientWindow; Window childWindow; - int xx = *x; - int yy = *y; - XTranslateCoordinates(display, thisWindow, rootWindow, xx, yy, x, y, &childWindow); + int xx = x ? *x : 0; + int yy = y ? *y : 0; + XTranslateCoordinates(display, thisWindow, rootWindow, + xx, yy, x ? x : &xx, y ? y : &yy, + &childWindow); }