On Thu, 1 Apr 2021 15:18:21 GMT, Sergey Bylokhov <s...@openjdk.org> wrote:

> Can you check that it will work in the "new" tabbed mode on big sur as well?

Could you suggest any working test scenario? My simple test (below) just hangs 
even with OGL:

import java.awt.FlowLayout;
import java.util.Objects;
import javax.swing.*;
import javax.swing.border.EmptyBorder;

public class TestWindowInsets
  extends JDialog
{

    public TestWindowInsets()
    {
        JComponent contentPane = (JComponent) getContentPane();
        contentPane.setBorder(new EmptyBorder(50, 50, 50, 50));
        JButton b = new JButton("Test");
        b.addActionListener(e -> toggle());
        add(b);
        JButton c = new JButton("Win");
        c.addActionListener(e -> win());
        add(c);

        setLayout(new FlowLayout());
        setSize(800, 600);

        setVisible(true);

    }

    void toggle()
    {
        SwingUtilities.invokeLater(() -> {
            JRootPane rp = getRootPane();
            String name = "apple.awt.fullWindowContent";
            Object value = rp.getClientProperty(name);
            if (Objects.equals(value, "true")) {
                value = "false";
            } else {
                value = "true";
            }
            rp.putClientProperty(name, value);
        });
    }

    void win()
    {
        SwingUtilities.invokeLater(TestWindowInsets::new);
    }

    public static void main(String[] args)
    {
        SwingUtilities.invokeLater(TestWindowInsets::new);
    }
}

-------------

PR: https://git.openjdk.java.net/jdk/pull/3308

Reply via email to