-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Surge window resize does not size/render viewport correctly #5211
Comments
@baconpaul I reckon we need to use |
yeah i thought about that and looked at the code but there was some reason it didn't work. lets keep this open and see if we can. |
so i played with these APIs some this morning and couldn't get them to work. Harumph. Not sure about this one. |
i think i'm just going to have to install cakewalk on my windows box to understand this bug. Sigh. |
This change correctly sets the aspect ratio constrainer for the juce resize handler. In standalone it perfectly preserves it In bitwig mac vst3 it perfectly preserves it In reaper mac the window is embedded and does not obey the content aspect ratio In logic there is no drag to resize So seems it at least makes it 'better or same'. We should test this in the daws showing problems in surge-synthesizer#5211 (which I dont have access to right now) to see if it helps.
@mkruselj I wonder if the above, which improves the situation on mac, would also help windows so we could close this issue? |
This change correctly sets the aspect ratio constrainer for the juce resize handler. In standalone it perfectly preserves it In bitwig mac vst3 it perfectly preserves it In reaper mac the window is embedded and does not obey the content aspect ratio In logic there is no drag to resize So seems it at least makes it 'better or same'. We should test this in the daws showing problems in #5211 (which I dont have access to right now) to see if it helps.
Standalone - works perfectly I have a couple other VST2 only hosts (MuLAB, Reason 11 and Maschine) but we don't have drag-to-resize in VST2 (is there a way to quickly enable it just to test?) I don't have Cakewalk so I will leave that to @j5v to test when he can get around to it. But we are looking pretty good! That said, Valhalla plugins are JUCE too, and they don't have that resizing issue in Reaper, they resize constraining Reaper's window as well. Maybe you could ping schwa on CLAP board and ask what's up about that? 🙂 |
Cakewalk behaviour is now not problematic. I haven't seen the 'missing resize events' problem for a few months, but my usage has been light. When resizing a Surge instance in Cakewalk, I momentarily see old-style region invalidation (white background) when resizing, so it looks like there's more than one effective repaint while different APIs resolve the resize events. I suspect the earlier problem was due to one of these APIs not acting as expected in the stack. [observation, perhaps not related to Surge] for magnification of less than 100%, aspect ratios outside the range 5:2 and 5:6, Cakewalk shrinks the content to fit the window without cropping. For other ratios, it expands the content to fill one dimension and crop the other. |
@j5v So in short, situations like what you showcased in screenshots in opening post are not happening anymore in Cakewalk? |
Vst2 does t have a host resize api so it really is just turn on the juce corner widget which generates the same events as our resize. If you want to do hat set the second argument of setresizable to true in surge synth editor but it will paint a corner booger over surge. I’ll see if. Can figure out what Valhalla does differently yeah. But it seems like the change is the right change and this is fixed? |
Yeah, Valhalla gets the corner booger too in VST2. So I guess that's our answer. |
That said, I suppose we could override the paint method of ResizableBorderComponent? |
We have a zoom menu and keybindings. VST3 CLAP and LV2 support host drag. I don't think we want the component. I'm going to close this I think! |
Bug Description:
When I resize the Surge plugin window, redraw does not size/render viewport correctly, or [speculation] does not respond to the latest event.
This means one or more of:
This happens with or without display scaling (200%, 100%) on Windows.
Selecting Zoom > 100% works fine.
Zoom > 125% has scrollbars and a black margin where Surge is clipped to the right, after multiple resize events.
Zoom > 200% shows all of Surge, without scrollbars, with narrow black margins to the right and bottom about half the width of a scrollbar.
Surge Version
Version: Surge XT 0.9.nightly.1e11513
Build: 2021-09-30 @ 13:46:18 on 'fv-az165-140/pipeline' with 'MSVC-19.16.27045.0' using JUCE 60101
System: Windows 64-bit VST3 on Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Host: Cakewalk by Bandlab
Reproduction Steps:
Open a new Surge instance, or resize an open Surge window.
Expected Behavior:
Surge scales the canvas to suit the resized window, without: scrollbars, clipping, or margins to more than one edge.
Screenshots:
If applicable, add screenshots/GIF/videos to help explain your problem.
Computer Information (please complete the following information):
Additional Information:
Attached images show the result of a mouse resize.
While resizing, scrollbars pop in and out of existence and likely cause extra resize events.
The text was updated successfully, but these errors were encountered: