JBR-3344 "Exit Full Screen" action doesn't work, the only way is mouse click on window's native "green" button.

Restored JBR-1931 fix partially reverted by JBR-1718

(cherry picked from commit c0be778e20)
This commit is contained in:
Alexey Ushakov
2021-06-07 20:54:10 +03:00
committed by jbrbot
parent cacb09924d
commit 53622442f6

View File

@@ -431,4 +431,19 @@ public class Application {
((CPlatformWindow)platformWindow).toggleFullScreen();
}
public void requestEnterFullScreen(final Window window) {
final Object peer = AWTAccessor.getComponentAccessor().getPeer(window);
if (!(peer instanceof LWWindowPeer)) return;
Object platformWindow = ((LWWindowPeer) peer).getPlatformWindow();
if (!(platformWindow instanceof CPlatformWindow)) return;
((CPlatformWindow)platformWindow).enterFullScreenMode();
}
public void requestLeaveFullScreen(final Window window) {
final Object peer = AWTAccessor.getComponentAccessor().getPeer(window);
if (!(peer instanceof LWWindowPeer)) return;
Object platformWindow = ((LWWindowPeer) peer).getPlatformWindow();
if (!(platformWindow instanceof CPlatformWindow)) return;
((CPlatformWindow)platformWindow).exitFullScreenMode();
}
}