mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user