avoid GCC warnings about breaking strict aliasing rules

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2008-02-02 21:52:26 +00:00
parent 7f85af8223
commit e8769ed11c
4 changed files with 32 additions and 29 deletions

View File

@@ -392,17 +392,18 @@ static gboolean property_notify_event(
Atom type;
int format;
gulong nitems, bytes_after;
long* data = NULL;
guchar* data;
Status status = XGetWindowProperty(
gdk_x11_drawable_get_xdisplay(event->window),
gdk_x11_drawable_get_xid(event->window),
xproperty,
0, 4, false, XA_CARDINAL,
&type, &format, &nitems, &bytes_after, (guchar**)&data);
&type, &format, &nitems, &bytes_after, &data);
if (status == Success && data && nitems == 4)
{
long* p = (long*)data;
const wxSize decorSize =
wxSize(int(data[0] + data[1]), int(data[2] + data[3]));
wxSize(int(p[0] + p[1]), int(p[2] + p[3]));
if (win->m_decorSize != decorSize)
{
const wxSize diff = decorSize - win->m_decorSize;