Mac Fullscreen fix for MAINT-3288 and MAINT-3135
parent
1a456c2e41
commit
ddd6b8f91b
|
|
@ -42,6 +42,7 @@
|
|||
unsigned int mMarkedTextLength;
|
||||
bool mMarkedTextAllowed;
|
||||
bool mSimulatedRightClick;
|
||||
bool mOldResize;
|
||||
}
|
||||
- (id) initWithSamples:(NSUInteger)samples;
|
||||
- (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync;
|
||||
|
|
@ -49,6 +50,8 @@
|
|||
|
||||
- (void)commitCurrentPreedit;
|
||||
|
||||
- (void) setOldResize:(bool)oldresize;
|
||||
|
||||
// rebuildContext
|
||||
// Destroys and recreates a context with the view's internal format set via setPixelFormat;
|
||||
// Use this in event of needing to rebuild a context for whatever reason, without needing to assign a new pixel format.
|
||||
|
|
|
|||
|
|
@ -94,8 +94,11 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
// Force a high quality update after live resizing
|
||||
- (void) viewDidEndLiveResize
|
||||
{
|
||||
NSSize size = [self frame].size;
|
||||
callResize(size.width, size.height);
|
||||
if (mOldResize) //Maint-3135
|
||||
{
|
||||
NSSize size = [self frame].size;
|
||||
callResize(size.width, size.height);
|
||||
}
|
||||
}
|
||||
|
||||
- (unsigned long)getVramSize
|
||||
|
|
@ -124,10 +127,18 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
object:[self window]];
|
||||
}
|
||||
|
||||
- (void)setOldResize:(bool)oldresize
|
||||
{
|
||||
mOldResize = oldresize;
|
||||
}
|
||||
|
||||
- (void)windowResized:(NSNotification *)notification;
|
||||
{
|
||||
//NSSize size = [self frame].size;
|
||||
//callResize(size.width, size.height);
|
||||
if (!mOldResize) //Maint-3288
|
||||
{
|
||||
NSSize size = [self frame].size;
|
||||
callResize(size.width, size.height);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
|
|
@ -204,6 +215,8 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
[glContext setValues:(const GLint*)0 forParameter:NSOpenGLCPSwapInterval];
|
||||
}
|
||||
|
||||
mOldResize = false;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ public:
|
|||
virtual void swapBuffers() = 0;
|
||||
virtual void bringToFront() = 0;
|
||||
virtual void focusClient() { }; // this may not have meaning or be required on other platforms, therefore, it's not abstract
|
||||
|
||||
virtual void setOldResize(bool oldresize) { };
|
||||
// handy coordinate space conversion routines
|
||||
// NB: screen to window and vice verse won't work on width/height coordinate pairs,
|
||||
// as the conversion must take into account left AND right border widths, etc.
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ void showNSCursor();
|
|||
void hideNSCursorTillMove(bool hide);
|
||||
void requestUserAttention();
|
||||
long showAlert(std::string title, std::string text, int type);
|
||||
void setResizeMode(bool oldresize, void* glview);
|
||||
|
||||
NSWindowRef createNSWindow(int x, int y, int width, int height);
|
||||
|
||||
|
|
|
|||
|
|
@ -222,6 +222,11 @@ GLViewRef createOpenGLView(NSWindowRef window, unsigned int samples, bool vsync)
|
|||
return glview;
|
||||
}
|
||||
|
||||
void setResizeMode(bool oldresize, void* glview)
|
||||
{
|
||||
[(LLOpenGLView *)glview setOldResize:oldresize];
|
||||
}
|
||||
|
||||
void glSwapBuffers(void* context)
|
||||
{
|
||||
[(NSOpenGLContext*)context flushBuffer];
|
||||
|
|
|
|||
|
|
@ -152,7 +152,10 @@ protected:
|
|||
BOOL resetDisplayResolution();
|
||||
|
||||
BOOL shouldPostQuit() { return mPostQuit; }
|
||||
|
||||
|
||||
//Satisfy MAINT-3135 and MAINT-3288 with a flag.
|
||||
/*virtual */ void setOldResize(bool oldresize) {setResizeMode(oldresize, mGLView); }
|
||||
|
||||
|
||||
protected:
|
||||
//
|
||||
|
|
|
|||
|
|
@ -3190,6 +3190,13 @@ bool LLAppViewer::initWindow()
|
|||
|
||||
LLNotificationsUI::LLNotificationManager::getInstance();
|
||||
|
||||
|
||||
#ifdef LL_DARWIN
|
||||
//Satisfy both MAINT-3135 (OSX 10.6 and earlier) MAINT-3288 (OSX 10.7 and later)
|
||||
if (getOSInfo().mMajorVer == 10 && getOSInfo().mMinorVer < 7)
|
||||
gViewerWindow->getWindow()->setOldResize(true);
|
||||
#endif
|
||||
|
||||
if (gSavedSettings.getBOOL("WindowMaximized"))
|
||||
{
|
||||
gViewerWindow->getWindow()->maximize();
|
||||
|
|
|
|||
Loading…
Reference in New Issue