Skip to content

Commit d2e3466

Browse files
committed
Removed old fullscreen handling cruft.
1 parent a5183e5 commit d2e3466

10 files changed

+2
-218
lines changed

modules/javafx.graphics/src/main/native-glass/mac/GlassFullscreenWindow.h

-37
This file was deleted.

modules/javafx.graphics/src/main/native-glass/mac/GlassFullscreenWindow.m

-85
This file was deleted.

modules/javafx.graphics/src/main/native-glass/mac/GlassView.h

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#import <jni.h>
2828

2929
#import "GlassHostView.h"
30-
#import "GlassFullscreenWindow.h"
3130
#import "GlassViewDelegate.h"
3231

3332
// main GlassView protocol

modules/javafx.graphics/src/main/native-glass/mac/GlassView3D.m

-6
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,6 @@ - (BOOL)performKeyEquivalent:(NSEvent *)theEvent
465465
KEYLOG("performKeyEquivalent");
466466
[GlassApplication registerKeyEvent:theEvent];
467467

468-
// Crash if the FS window is released while performing a key equivalent
469-
// Local copy of the id keeps the retain/release calls balanced.
470-
id fsWindow = [self->_delegate->fullscreenWindow retain];
471-
472468
// RT-37093, RT-37399 Command-EQUALS and Command-DOT needs special casing on Mac
473469
// as it is passed through as two calls to performKeyEquivalent, which in turn
474470
// create extra KeyEvents.
@@ -498,12 +494,10 @@ - (BOOL)performKeyEquivalent:(NSEvent *)theEvent
498494
(*env)->DeleteLocalRef(env, jKeyChars);
499495

500496
GLASS_CHECK_EXCEPTION(env);
501-
[fsWindow release];
502497
return YES;
503498
}
504499
}
505500
[self->_delegate sendJavaKeyEvent:theEvent isDown:YES];
506-
[fsWindow release];
507501
return NO; // return NO to allow system-default processing of Cmd+Q, etc.
508502
}
509503

modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.h

-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#import <jni.h>
2828

2929
#import "GlassHostView.h"
30-
#import "GlassFullscreenWindow.h"
3130
#import "GlassDragSource.h"
3231
#import "GlassDraggingSource.h"
3332
#import "GlassAccessible.h"
@@ -72,8 +71,6 @@ typedef enum GestureMaskType {
7271

7372
@public
7473
jobject jView;
75-
// not nil when we create a new FS window ourselves
76-
GlassFullscreenWindow *fullscreenWindow;
7774
}
7875

7976
- (id)initWithView:(NSView*)view withJview:(jobject)jview;

modules/javafx.graphics/src/main/native-glass/mac/GlassViewDelegate.m

-37
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,6 @@ - (void)dealloc
193193
[self->parentWindow release];
194194
self->parentWindow = nil;
195195

196-
[self->fullscreenWindow release];
197-
self->fullscreenWindow = nil;
198-
199196
[self->nativeFullScreenModeWindow release];
200197
self->nativeFullScreenModeWindow = nil;
201198

@@ -1263,40 +1260,6 @@ - (void)exitFullscreenWithAnimate:(BOOL)animate
12631260
[GlassApplication enterFullScreenExitingLoop];
12641261
return;
12651262
}
1266-
1267-
[self->fullscreenWindow toggleFullScreen:self->fullscreenWindow];
1268-
1269-
NSRect frame = [self->parentHost bounds];
1270-
frame.origin = [self->fullscreenWindow point];
1271-
[self->fullscreenWindow setFrame:frame display:YES animate:animate];
1272-
1273-
[self->fullscreenWindow disableFlushWindow];
1274-
{
1275-
[self->nsView retain];
1276-
{
1277-
[self->nsView removeFromSuperviewWithoutNeedingDisplay];
1278-
[self->parentHost addSubview:self->nsView];
1279-
}
1280-
[self->nsView release];
1281-
1282-
[self->parentWindow setInitialFirstResponder:self->nsView];
1283-
[self->parentWindow makeFirstResponder:self->nsView];
1284-
1285-
if ([[self->parentWindow delegate] isKindOfClass:[GlassWindow class]])
1286-
{
1287-
GlassWindow *window = (GlassWindow*)[self->parentWindow delegate];
1288-
[window setFullscreenWindow: nil];
1289-
}
1290-
}
1291-
[self->fullscreenWindow enableFlushWindow];
1292-
[self->parentWindow enableFlushWindow];
1293-
1294-
[self->fullscreenWindow orderOut:nil];
1295-
[self->fullscreenWindow close];
1296-
self->fullscreenWindow = nil;
1297-
1298-
// It was retained upon entering the FS mode
1299-
[self->nsView release];
13001263
}
13011264
@catch (NSException *e)
13021265
{

modules/javafx.graphics/src/main/native-glass/mac/GlassWindow+Java.m

+2-7
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,9 @@ - (id)_initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle
160160
return self;
161161
}
162162

163-
- (NSWindow*)_getCurrentWindow
164-
{
165-
return self->fullscreenWindow ? self->fullscreenWindow : self->nsWindow;
166-
}
167-
168163
- (void)_ungrabFocus
169164
{
170-
NSWindow *window = [self _getCurrentWindow];
165+
NSWindow *window = self->nsWindow;
171166

172167
if (s_grabWindow != window) {
173168
return;
@@ -207,7 +202,7 @@ - (void)_checkUngrab
207202

208203
- (void)_grabFocus
209204
{
210-
NSWindow *window = [self _getCurrentWindow];
205+
NSWindow *window = self->nsWindow;
211206

212207
if (s_grabWindow == window) {
213208
return;

modules/javafx.graphics/src/main/native-glass/mac/GlassWindow+Overrides.m

-10
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ - (void)dealloc
6262

6363
- (void)windowDidBecomeKey:(NSNotification *)notification
6464
{
65-
if (self->fullscreenWindow)
66-
{
67-
return;
68-
}
69-
7065
GET_MAIN_JENV;
7166
if (!self->isEnabled)
7267
{
@@ -86,11 +81,6 @@ - (void)windowDidBecomeKey:(NSNotification *)notification
8681

8782
- (void)windowDidResignKey:(NSNotification *)notification
8883
{
89-
if (self->fullscreenWindow)
90-
{
91-
return;
92-
}
93-
9484
[self _ungrabFocus];
9585

9686
GET_MAIN_JENV;

modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.h

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
NSScreen *currentScreen;
4444
GlassMenubar *menubar;
4545
NSRect preZoomedRect;
46-
NSWindow *fullscreenWindow;
4746

4847
BOOL isFocusable;
4948
BOOL isEnabled;

modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.m

-31
Original file line numberDiff line numberDiff line change
@@ -271,35 +271,6 @@ - (id)accessibilityAttributeValue:(NSString *)attribute
271271

272272
@implementation GlassWindow
273273

274-
- (void)setFullscreenWindow:(NSWindow*)fsWindow
275-
{
276-
if (self->fullscreenWindow == fsWindow) {
277-
return;
278-
}
279-
280-
[self _ungrabFocus];
281-
282-
NSWindow *from, *to;
283-
from = self->fullscreenWindow ? self->fullscreenWindow : self->nsWindow;
284-
to = fsWindow ? fsWindow : self->nsWindow;
285-
286-
NSArray * children = [from childWindows];
287-
for (NSUInteger i=0; i<[children count]; i++)
288-
{
289-
NSWindow *child = (NSWindow*)[children objectAtIndex:i];
290-
if ([[child delegate] isKindOfClass: [GlassWindow class]]) {
291-
[from removeChildWindow: child];
292-
[to addChildWindow:child ordered:NSWindowAbove];
293-
}
294-
}
295-
296-
self->fullscreenWindow = fsWindow;
297-
298-
GET_MAIN_JENV;
299-
(*env)->CallVoidMethod(env, self->jWindow, jWindowNotifyDelegatePtr, ptr_to_jlong(fsWindow));
300-
GLASS_CHECK_EXCEPTION(env);
301-
}
302-
303274
- (void)close
304275
{
305276
[self _ungrabFocus];
@@ -483,8 +454,6 @@ static jlong _createWindowCommonDo(JNIEnv *env, jobject jWindow, jlong jOwnerPtr
483454
[window->nsWindow setOpaque:YES];
484455
}
485456

486-
window->fullscreenWindow = nil;
487-
488457
window->isSizeAssigned = NO;
489458
window->isLocationAssigned = NO;
490459

0 commit comments

Comments
 (0)