The VisibilityNotify function was using elements out fo the XEvent union that belong to the XExposeEvent event type. These fields are not valid for XVisibilityEvents and contain garbage values.

Remove the code that accessed these fields.  The XExposeEvent already has its own function containing the exact same code.
This commit is contained in:
David Sundstrom 2011-11-02 13:36:11 -05:00
parent c5b9667825
commit aa761c7a33

View File

@ -106,31 +106,7 @@ boolean xf_event_Expose(xfInfo* xfi, XEvent* event, boolean app)
boolean xf_event_VisibilityNotify(xfInfo* xfi, XEvent* event, boolean app)
{
int x, y;
int w, h;
x = event->xexpose.x;
y = event->xexpose.y;
w = event->xexpose.width;
h = event->xexpose.height;
xfi->unobscured = event->xvisibility.state == VisibilityUnobscured;
if (app)
{
xfWindow* xfw;
rdpWindow* window;
rdpRail* rail = ((rdpContext*) xfi->context)->rail;
window = window_list_get_by_extra_id(rail->list, (void*) event->xvisibility.window);
if (window != NULL)
{
xfw = (xfWindow*) window->extra;
xf_UpdateWindowArea(xfi, xfw, x, y, w, h);
}
}
return True;
}