Open Sethur opened 1 year ago
@rasband Can you reproduce this? There is a chance that this is JVM dependent, I only tried it with two different Azul builds. Would be nice if this could get fixed...
I am not able to reproduce the problem with repainting the plot not matching the requested size but I do see a lot of flickering on Windows 11 and Azul 1.8.0_345.
@rasband That is strange, I just did fresh download of the current windows Java bundle of ImageJ v1.54d from imagej.nih.gov, which comes bundled with some (hopefully recommended) JVM 1.8.0_345, and I can easily reproduce the problem.
Drag&drop-resizing any profile plot from the bottom right corner quickly (it seemed like it mostly works if you move the mouse very slowly), i.e. clicking the bottom right corner, holding the left button, and then moving diagonally outwards and back inwards, will often cause repainting glitches, i.e. the window will snap back to some previous size although the mouse pointer is somewhere else (while still holding the button). The glitches happen both when enlarging the current plot or when shrinking it. Releasing the mouse button in a "broken" state (i.e. the window is not at the size that it should be) will then finally produce windows like this (for failed shrinking):
or this (for failed enlarging):
Could this be an OS issue?
What OS are you using? I'm using Windows 11 Home running on a Parallels virtual machine on an M1 (arm64) MacBook Air.
@rasband I am on Windows 10 Version 10.0.19044.2728 (21H2)
I will try to reproduce this on a different OS.
Time permitting I will also try to have a look into the plot repainting/resizing section of the code, maybe the strong flickering upon resizing can be improved along the line.
I'm on Windows 10 Version 10.0.19045 Build 19045 with latest ImageJ 1.54e46 and seeing the same weird behavior @Sethur had with it snapping back to previous sizes randomly when you resize too fast. After poking around I have figured out a couple things:
@Sethur If you want to see if this stuff improved the behavior for you also, you can look at my fork here but I don't think I want to do a Pull Request yet until I test it a bit more.
@justinjconroy Thanks for you efforts, I had wanted to look into this myself but could not find the time until now. I'll definitely test your changes.
@justinjconroy Did your tests work out?
OS: Windows 10 x64 Version:
Description When resizing profile plots on the bottom right corner without previously activating the window, the targeted window size is often not reach during the repainting of the plot. It often happens, that the plot snaps back to its original size, or, when moving back and forth between a larger and a smaller size, snaps back to the larger size.
Here is a GIF showcasing the issue:
Steps for Reproduction