X11 callbacks must be extern C
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -243,6 +243,7 @@ wxApp::~wxApp()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if !wxUSE_NANOX
|
#if !wxUSE_NANOX
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// X11 predicate function for exposure compression
|
// X11 predicate function for exposure compression
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
@@ -253,7 +254,8 @@ struct wxExposeInfo
|
|||||||
Bool found_non_matching;
|
Bool found_non_matching;
|
||||||
};
|
};
|
||||||
|
|
||||||
static Bool expose_predicate (Display *display, XEvent *xevent, XPointer arg)
|
extern "C"
|
||||||
|
Bool wxX11ExposePredicate (Display *display, XEvent *xevent, XPointer arg)
|
||||||
{
|
{
|
||||||
wxExposeInfo *info = (wxExposeInfo*) arg;
|
wxExposeInfo *info = (wxExposeInfo*) arg;
|
||||||
|
|
||||||
@@ -274,8 +276,8 @@ static Bool expose_predicate (Display *display, XEvent *xevent, XPointer arg)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// wxUSE_NANOX
|
#endif // wxUSE_NANOX
|
||||||
|
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// Processes an X event, returning true if the event was processed.
|
// Processes an X event, returning true if the event was processed.
|
||||||
@@ -322,7 +324,7 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
wxExposeInfo info;
|
wxExposeInfo info;
|
||||||
info.window = event->xexpose.window;
|
info.window = event->xexpose.window;
|
||||||
info.found_non_matching = false;
|
info.found_non_matching = false;
|
||||||
while (XCheckIfEvent( wxGlobalDisplay(), &tmp_event, expose_predicate, (XPointer) &info ))
|
while (XCheckIfEvent( wxGlobalDisplay(), &tmp_event, wxX11ExposePredicate, (XPointer) &info ))
|
||||||
{
|
{
|
||||||
// Don't worry about optimizing redrawing the border etc.
|
// Don't worry about optimizing redrawing the border etc.
|
||||||
}
|
}
|
||||||
@@ -341,7 +343,7 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
|
|||||||
wxExposeInfo info;
|
wxExposeInfo info;
|
||||||
info.window = event->xexpose.window;
|
info.window = event->xexpose.window;
|
||||||
info.found_non_matching = false;
|
info.found_non_matching = false;
|
||||||
while (XCheckIfEvent( wxGlobalDisplay(), &tmp_event, expose_predicate, (XPointer) &info ))
|
while (XCheckIfEvent( wxGlobalDisplay(), &tmp_event, wxX11ExposePredicate, (XPointer) &info ))
|
||||||
{
|
{
|
||||||
win->GetUpdateRegion().Union( tmp_event.xexpose.x, tmp_event.xexpose.y,
|
win->GetUpdateRegion().Union( tmp_event.xexpose.x, tmp_event.xexpose.y,
|
||||||
tmp_event.xexpose.width, tmp_event.xexpose.height );
|
tmp_event.xexpose.width, tmp_event.xexpose.height );
|
||||||
|
Reference in New Issue
Block a user