Merge pull request #5784 from RosettaCommons/roccomoretti/interactive_fix_shrink_residue_bug
[Foldit] Fix bug with shrink_marked_residues_with_animation.
In ligand design puzzles, I'm seeing an odd crash related to shrink_marked_residues_with_animation(), which is being called by the tool activation in setup_for_puzzle().
Best I can tell, this is related to having the display pose being out of step with the Geometry. (The actual crash happens in Conformation::residue(), which is being called from GUIPoseProxy::has_mainchain().
This is a somewhat quick fix, in that we should be able to handle the shrink_marked_residues_with_animation() prior to the tool activation/switch.
RELEASE NOTES: Fix crash on puzzle loading.
Merge pull request #5783 from RosettaCommons/roccomoretti/interactive_fix_hbond_crash
[Foldit] Fix issue with crashes in hbond scoring.
One of the more regular crashes we're getting now in ligand design puzzles is a crash in ligand scoring, related to vector normalization.
Tracing through where it's used downstream, I think we should be okay with returning a zero vector in these rare cases.
RELEASE NOTES: Fix some crashes in scoring related to hydrogen bonds
Merge pull request #5795 from RosettaCommons/roccomoretti/interactive_linux_close
[Foldit] Fix how Linux reacts to the window close button.
Right now, the Foldit linux client is unceremoniously killed when you click the main (OS-generated) "window close" button. (Skipping any "save options" code, and often resulting in a segfault on exit.) The reason for this is that the "official" GLUT specification (apparently) does not have any mechanism for detecting this event and responding properly with cleanup. However, most Linuxes use OpenGLUT or FreeGLUT, which have an extension which is able to handle this (same API for both).
This PR adjusts the GLUTWrapper implementation to recognize when we're compiling with OpenGLUT/FreeGLUT, and use that mechanism. This requires a bit of a rework for the on_close functionality, because unlike the Windows or Mac equivalents, the program is getting closed when that box is triggered on Linux, with no mechanism to cancel it.
I also adjusted things such that the on_close functionality goes through the same handle_exit() mechanism the rest of the exit button in-game go through. The one exception is when the button is clicked prior to the login screen coming up, where handle_exit() causes crashes due to uninitialized variables, in which case we use the current approach. (You can still get crashes when closing prior to the login screen coming up due to multithreading issues, but those are crashes we already have in the released client.)
RELEASE NOTES: Fix how we handle the close window button for Linux clients.
Merge pull request #5808 from RosettaCommons/roccomoretti/fix_collagen_disulfide
[Foldit] Fix Collagen EduMode puzzle for disulfides.
Apparently you should be able to make disulfides in the Collagen puzzle. (Re)enable that.
RELEASE NOTES: Fix disulfide display in the Collagen Education Mode puzzle.
Merge pull request #5815 from RosettaCommons/roccomoretti/interactive_menu_to_front
[Foldit] Bring panels to top and on screen when toggled.
Add `toggle_to_top()` functionality for panels which will bring the specific panel to the top (over other items) and will make sure the panel is on screen.
There's a slight rework of Widget::ensure_on_screen(), to make sure we don't cut off the top of panels (and thus remove the title bar handle) when the screen is too short.
RELEASE NOTES: Make sure panels are on-screen and visible when they appear.