Skip to content
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

Tearouts don't tear back in since change to JUCE 8 #7805

Closed
mkruselj opened this issue Sep 28, 2024 · 5 comments · Fixed by #7869
Closed

Tearouts don't tear back in since change to JUCE 8 #7805

mkruselj opened this issue Sep 28, 2024 · 5 comments · Fixed by #7869
Labels
Bug Report Item submitted using the Bug Report template UX Issues related to user experience (UX) - mouse, touch, keyboard, MIDI inputs, etc. Windows Windows related issues

Comments

@mkruselj
Copy link
Collaborator

Steps to reproduce:

  1. Open any overlay
  2. Tear it out
  3. Click the yellow _ to bring it back to the main UI

Result:

The window is just hidden, it does not reappear in the main UI. Clicking the button to open the overlay doesn't do it the first time, you need to click another time to open the overlay again, but then it opens already torn out. It never rejoined the main UI.

@baconpaul says he can't reproduce on Mac, so this might be a Windows-only shenanigan.

@mkruselj mkruselj added Windows Windows related issues UX Issues related to user experience (UX) - mouse, touch, keyboard, MIDI inputs, etc. Bug Report Item submitted using the Bug Report template labels Sep 28, 2024
@mkruselj mkruselj added this to the Surge XT 1.4.0 milestone Sep 28, 2024
@baconpaul
Copy link
Collaborator

The problem is the new change to look at headers

    for (const auto& [control, kind] : { std::tuple (getMinimiseButton(), WindowControlKind::minimise),
                                         std::tuple (getMaximiseButton(), WindowControlKind::maximise),
                                         std::tuple (getCloseButton(),    WindowControlKind::close) })
    {
        if (control != nullptr && control->contains (control->getLocalPoint (this, pt)))
           return kind;
    }

that code around line 304 of juce_DocumentWindow.cpp means we don't get a custon minimize callback

I'll report it on the forum. And worst case I can comment out those lines in our fork.

@baconpaul
Copy link
Collaborator

Which then dives into line 3825 of juce_Windowing_windows.cpp

                    const auto localPoint = getLocalPointFromScreenLParam (lParam).toFloat();
                    const auto kind = component.findControlAtPoint (localPoint);

                    using Kind = Component::WindowControlKind;
                    switch (kind)
                    {
                        case Kind::caption:         return HTCAPTION;
                        case Kind::minimise:        return HTMINBUTTON;
                        case Kind::maximise:        return HTMAXBUTTON;
                        case Kind::close:           return HTCLOSE;
                        case Kind::sizeTop:         return HTTOP;
                        case Kind::sizeLeft:        return HTLEFT;
                        case Kind::sizeRight:       return HTRIGHT;
                        case Kind::sizeBottom:      return HTBOTTOM;

just sticking it here since this windows box is logged onto github but not the forum so i have to switch machines to write this up

baconpaul added a commit to baconpaul/surge that referenced this issue Sep 30, 2024
This temporarily fixes the lack of tearin in JUCE 8 due to the
issue described in surge-synthesizer#7805. In an ideal world a future juce would
fix this bug and we will revert this change before 1.4
baconpaul added a commit that referenced this issue Sep 30, 2024
This temporarily fixes the lack of tearin in JUCE 8 due to the
issue described in #7805. In an ideal world a future juce would
fix this bug and we will revert this change before 1.4
@Andreya-Autumn
Copy link
Collaborator

Reuk reports in the above forum thread that this is fixed btw!

@baconpaul
Copy link
Collaborator

Yup we need to pull up to 803 and re-test

baconpaul added a commit to baconpaul/surge that referenced this issue Nov 28, 2024
Closes surge-synthesizer#7805
Improevs arm64ec vst3 support in the folder
Backs down some no-longer-compatible riscv branches in JUCE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Item submitted using the Bug Report template UX Issues related to user experience (UX) - mouse, touch, keyboard, MIDI inputs, etc. Windows Windows related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants