提交 c53980b6 编写于 作者: A anthony

7149062: [macosx] dock menu don't show available frames

Summary: Inherit from either NSWindow for normal windows or NSPanel for utility windows
Reviewed-by: skovatch, swingler
上级 2ff01035
...@@ -304,8 +304,8 @@ AWT_ASSERT_APPKIT_THREAD; ...@@ -304,8 +304,8 @@ AWT_ASSERT_APPKIT_THREAD;
-(void) deliverJavaMouseEvent: (NSEvent *) event { -(void) deliverJavaMouseEvent: (NSEvent *) event {
BOOL isEnabled = YES; BOOL isEnabled = YES;
NSWindow* window = [self window]; NSWindow* window = [self window];
if ([window isKindOfClass: [AWTWindow class]]) { if ([window isKindOfClass: [AWTWindow_Panel class]] || [window isKindOfClass: [AWTWindow_Normal class]]) {
isEnabled = [(AWTWindow*)window isEnabled]; isEnabled = [(AWTWindow*)[window delegate] isEnabled];
} }
if (!isEnabled) { if (!isEnabled) {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
@class AWTView; @class AWTView;
@interface AWTWindow : NSPanel <NSWindowDelegate> { @interface AWTWindow : NSObject <NSWindowDelegate> {
@private @private
JNFWeakJObjectWrapper *javaPlatformWindow; JNFWeakJObjectWrapper *javaPlatformWindow;
CMenuBar *javaMenuBar; CMenuBar *javaMenuBar;
...@@ -45,6 +45,9 @@ ...@@ -45,6 +45,9 @@
BOOL isEnabled; BOOL isEnabled;
} }
// An instance of either AWTWindow_Normal or AWTWindow_Panel
@property (nonatomic, retain) NSWindow *nsWindow;
@property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow; @property (nonatomic, retain) JNFWeakJObjectWrapper *javaPlatformWindow;
@property (nonatomic, retain) CMenuBar *javaMenuBar; @property (nonatomic, retain) CMenuBar *javaMenuBar;
@property (nonatomic) NSSize javaMinSize; @property (nonatomic) NSSize javaMinSize;
...@@ -57,8 +60,28 @@ ...@@ -57,8 +60,28 @@
frameRect:(NSRect)frameRect frameRect:(NSRect)frameRect
contentView:(NSView *)contentView; contentView:(NSView *)contentView;
- (void) adjustGrowBoxWindow;
- (BOOL) isTopmostWindowUnderMouse; - (BOOL) isTopmostWindowUnderMouse;
// NSWindow overrides delegate methods
- (BOOL) canBecomeKeyWindow;
- (BOOL) canBecomeMainWindow;
- (BOOL) worksWhenModal;
- (void)sendEvent:(NSEvent *)event;
@end
@interface AWTWindow_Normal : NSWindow
- (id) initWithDelegate:(AWTWindow *)delegate
frameRect:(NSRect)rect
styleMask:(NSUInteger)styleMask
contentView:(NSView *)view;
@end
@interface AWTWindow_Panel : NSPanel
- (id) initWithDelegate:(AWTWindow *)delegate
frameRect:(NSRect)rect
styleMask:(NSUInteger)styleMask
contentView:(NSView *)view;
@end @end
#endif _AWTWINDOW_H #endif _AWTWINDOW_H
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册