SL-9774 [Render] dragging active Second Life session to second monitor zooms in making viewer unusable
parent
6ce18422de
commit
eaeb8605d0
|
|
@ -167,6 +167,9 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification
|
||||
object:[self window]];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(windowDidChangeScreen:) name:NSWindowDidChangeScreenNotification
|
||||
object:[self window]];
|
||||
|
||||
|
||||
NSRect wnd_rect = [[self window] frame];
|
||||
|
|
@ -206,6 +209,11 @@ attributedStringInfo getSegments(NSAttributedString *str)
|
|||
mModifiers = [NSEvent modifierFlags];
|
||||
}
|
||||
|
||||
-(void)windowDidChangeScreen:(NSNotification *)notification;
|
||||
{
|
||||
callWindowDidChangeScreen();
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
|
|
|
|||
|
|
@ -180,6 +180,11 @@ BOOL LLWindowCallbacks::handleDPIChanged(LLWindow *window, F32 ui_scale_factor,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL LLWindowCallbacks::handleWindowDidChangeScreen(LLWindow *window)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void LLWindowCallbacks::handlePingWatchdog(LLWindow *window, const char * msg)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ public:
|
|||
virtual BOOL handleTimerEvent(LLWindow *window);
|
||||
virtual BOOL handleDeviceChange(LLWindow *window);
|
||||
virtual BOOL handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
|
||||
virtual BOOL handleWindowDidChangeScreen(LLWindow *window);
|
||||
|
||||
enum DragNDropAction {
|
||||
DNDA_START_TRACKING = 0,// Start tracking an incoming drag
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ void callWindowFocus();
|
|||
void callWindowUnfocus();
|
||||
void callWindowHide();
|
||||
void callWindowUnhide();
|
||||
void callWindowDidChangeScreen();
|
||||
void callDeltaUpdate(float *delta, unsigned int mask);
|
||||
void callMiddleMouseDown(float *pos, unsigned int mask);
|
||||
void callMiddleMouseUp(float *pos, unsigned int mask);
|
||||
|
|
|
|||
|
|
@ -400,6 +400,14 @@ void callWindowUnhide()
|
|||
}
|
||||
}
|
||||
|
||||
void callWindowDidChangeScreen()
|
||||
{
|
||||
if ( gWindowImplementation && gWindowImplementation->getCallbacks() )
|
||||
{
|
||||
gWindowImplementation->getCallbacks()->handleWindowDidChangeScreen(gWindowImplementation);
|
||||
}
|
||||
}
|
||||
|
||||
void callDeltaUpdate(float *delta, MASK mask)
|
||||
{
|
||||
gWindowImplementation->updateMouseDeltas(delta);
|
||||
|
|
|
|||
|
|
@ -1607,6 +1607,14 @@ BOOL LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32
|
|||
}
|
||||
}
|
||||
|
||||
BOOL LLViewerWindow::handleWindowDidChangeScreen(LLWindow *window)
|
||||
{
|
||||
LLCoordScreen window_rect;
|
||||
mWindow->getSize(&window_rect);
|
||||
reshape(window_rect.mX, window_rect.mY);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLViewerWindow::handlePingWatchdog(LLWindow *window, const char * msg)
|
||||
{
|
||||
LLAppViewer::instance()->pingMainloopTimeout(msg);
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ public:
|
|||
/*virtual*/ BOOL handleTimerEvent(LLWindow *window);
|
||||
/*virtual*/ BOOL handleDeviceChange(LLWindow *window);
|
||||
/*virtual*/ BOOL handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
|
||||
/*virtual*/ BOOL handleWindowDidChangeScreen(LLWindow *window);
|
||||
|
||||
/*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg);
|
||||
/*virtual*/ void handlePauseWatchdog(LLWindow *window);
|
||||
|
|
|
|||
Loading…
Reference in New Issue