mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 22:10:58 +00:00
NSOpenGLView: fix resising when loaded from nibs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29956 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
951bca9ec0
commit
7352243ba7
2 changed files with 33 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2010-03-14 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSOpenGLView.m:
|
||||||
|
Add an -initWithCoder: implementation which subscribes to
|
||||||
|
the frame change notifications like -init.
|
||||||
|
Without this addition, NSOpenGLViews loaded from nibs
|
||||||
|
weren't resizing properly.
|
||||||
|
|
||||||
|
Note: it should also probably set a pixel format, but I
|
||||||
|
didn't add that because it was causing an error.
|
||||||
|
|
||||||
2010-03-15 Fred Kiefer <FredKiefer@gmx.de>
|
2010-03-15 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/GSXibLoader.m: New file with basic XIB format
|
* Source/GSXibLoader.m: New file with basic XIB format
|
||||||
|
|
|
@ -249,6 +249,28 @@ static NSOpenGLPixelFormatAttribute attrs[] =
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) initWithCoder: (NSCoder *)aCoder
|
||||||
|
{
|
||||||
|
self = [super initWithCoder: aCoder];
|
||||||
|
|
||||||
|
// FIXME: Should set a pixel format like -init does
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
addObserver: self
|
||||||
|
selector: @selector(_frameChanged:)
|
||||||
|
name: NSViewGlobalFrameDidChangeNotification
|
||||||
|
object: self];
|
||||||
|
|
||||||
|
[self setPostsFrameChangedNotifications: YES];
|
||||||
|
[[NSNotificationCenter defaultCenter]
|
||||||
|
addObserver: self
|
||||||
|
selector: @selector(_frameChanged:)
|
||||||
|
name: NSViewFrameDidChangeNotification
|
||||||
|
object: self];
|
||||||
|
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue