Check-in [1e65c19fdf]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fix for obscure crashes on app tear down (hopefully)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1e65c19fdfa9c39c118395cf221302d7f82a7b79
User & Date: chw 2016-12-06 22:17:53
Context
2016-12-06
22:36
small changes in cleanup in [undroidwish] build scripts check-in: cfd9b0719d user: chw tags: trunk
22:17
fix for obscure crashes on app tear down (hopefully) check-in: 1e65c19fdf user: chw tags: trunk
14:17
more improvements in NFC support check-in: 0be3a22a72 user: chw tags: trunk
Changes

Changes to jni/sdl2tk/sdl/SdlTkX.c.

617
618
619
620
621
622
623

624
625
626
627
628
629
630
....
1332
1333
1334
1335
1336
1337
1338

1339
1340
1341
1342
1343
1344
1345
....
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
	ckfree((char *) _p);
    }

    xlib_grab = NULL;
    Tcl_ConditionNotify(&xlib_cond);
    SdlTkUnlock(display);


    ckfree((char *) display);

    return 0;
}

void
XConfigureWindow(Display *display, Window w, unsigned int value_mask,
................................................................................
{
    _Window *_w = (_Window *) w;
    _Window *wdec = ((_w->parent != NULL) && (_w->parent->dec != NULL)) ?
			_w->parent : NULL;
    XEvent event;
    int hadFocus = 0, doNotify;


    if (_w->display == NULL) {
	return;
    }
#ifndef ANDROID
    if (_w->gl_rend) {
	SDL_DestroyRenderer(_w->gl_rend);
	_w->gl_rend = NULL;
................................................................................
{
    Display *display = event->xany.display;
    _XSQEvent *qevent;
    int trigger = 0;

    EVLOG("QueueEvent %d %p", event->xany.type, (void *) event->xany.window);

    if ((display != NULL) && (display->screens == NULL)) {
	return;
    }

    Tcl_MutexLock((Tcl_Mutex *) &display->qlock);

    /* Grab an unused event from the list */
    qevent = display->qfree;







>







 







>







 







|







617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
....
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
....
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
	ckfree((char *) _p);
    }

    xlib_grab = NULL;
    Tcl_ConditionNotify(&xlib_cond);
    SdlTkUnlock(display);

    memset(display, 0, sizeof (Display));
    ckfree((char *) display);

    return 0;
}

void
XConfigureWindow(Display *display, Window w, unsigned int value_mask,
................................................................................
{
    _Window *_w = (_Window *) w;
    _Window *wdec = ((_w->parent != NULL) && (_w->parent->dec != NULL)) ?
			_w->parent : NULL;
    XEvent event;
    int hadFocus = 0, doNotify;

    _w->tkwin = NULL;
    if (_w->display == NULL) {
	return;
    }
#ifndef ANDROID
    if (_w->gl_rend) {
	SDL_DestroyRenderer(_w->gl_rend);
	_w->gl_rend = NULL;
................................................................................
{
    Display *display = event->xany.display;
    _XSQEvent *qevent;
    int trigger = 0;

    EVLOG("QueueEvent %d %p", event->xany.type, (void *) event->xany.window);

    if ((display == NULL) || (display->screens == NULL)) {
	return;
    }

    Tcl_MutexLock((Tcl_Mutex *) &display->qlock);

    /* Grab an unused event from the list */
    qevent = display->qfree;