fixes for #890 (deadlock on pause/resume with pyjnius/pygame)#892
fixes for #890 (deadlock on pause/resume with pyjnius/pygame)#892JonAnCla wants to merge 1 commit intokivy:masterfrom
Conversation
|
Looks good I think, but I'm just making sure I understand the change. |
|
@hottwaj the layout listener is duplicate for PyGame so you actually do not need to add it back in. It just needs to be removed from android.pyx This fix here #911 Works on both the pygame and the sdl2 backend. |
|
Hey @akshayaurora, that does look like it will solve the deadlock issue as it avoids a callback to python from the java thread (I haven't tested) that could be called when the app is paused. It looks like your method does more work on each call to get_keyboard_height(), whereas the layout listener i moved into Java code in dbccfe6 is reactive - it only does work when the global layout changes I assumed that the "reactive"-ness property was why the code in android.pyx was set up with the LayoutListener logic in the first place, though I don't know how often get_keyboard_height() is called and whether performance is actually an issue In summary, as long as the deadlock issue is solved and performance is not affected I'm happy with either solution! Cheers & thanks for taking a look at this. |
Moved java LayoutListener logic out of 'android' package into pygame bootstrap
This avoids deadlock due to LayoutListener locking python thread with pyjnius when app onPause/onResume occurs