project: Move MacOSPopupFactory

This commit is contained in:
Owain van Brakel
2021-09-12 00:19:06 +02:00
parent 959a7ceb36
commit 69b594fd8b
2 changed files with 10 additions and 44 deletions

View File

@@ -24,11 +24,19 @@
*/
package net.runelite.client.util;
import java.awt.Component;
import javax.swing.Popup;
import javax.swing.PopupFactory;
/**
* Dummy popup factory for Java 8
* Popup factory for Java 11 which forces heavyweight popups. Lightweight popups do not render correctly
* over AWT canvases on OSX.
*/
class MacOSPopupFactory extends PopupFactory
{
}
@Override
protected Popup getPopup(Component owner, Component contents, int x, int y, boolean isHeavyWeightPopup) throws IllegalArgumentException
{
return super.getPopup(owner, contents, x, y, true);
}
}