transparent JDialog becomes opaque when dragging to second screen (ubuntu 14.04 with Cinnamon, java 1.8.0_74-b02)
<p>I created transparent JDialog which unfortunately does not work with two screens. When its dragged to other screen it becomes opaque. The code is below, just run it and drag label to other screen.</p>

<pre><code>public class TransparentFrame{

public static void main(String[] args) {
    JDialog dialog = createDialog();
    SwingUtilities.invokeLater(() -&gt; dialog.setVisible(true));
}


private static JDialog createDialog() {
    JDialog dialog = new JDialog();

    JLabel label = new JLabel("drag me to the other screen");
    label.addMouseMotionListener(new MouseMotionAdapter() {
        @Override
        public void mouseDragged(MouseEvent e) {
            SwingUtilities.invokeLater(() -&gt; dialog.setLocation(e.getLocationOnScreen()));
        }
    });
    label.setOpaque(false);
    dialog.getContentPane().add(label);

    dialog.setUndecorated(true);
    dialog.getRootPane().setWindowDecorationStyle(JRootPane.NONE);

    dialog.setBackground(new Color(0, 0, 0, 0));
    dialog.getContentPane().setBackground(new Color(0, 0, 0, 0));

    dialog.pack();
    return dialog;
}
</code></pre>

<p>}</p>

<p>Does anybody know how to fix it?</p>

<p>Environment: Ubuntu 14.04 with Cinnamon, java 1.8.0_74-b02</p>