https://bugs.documentfoundation.org/show_bug.cgi?id=103571
--- Comment #13 from Michael Meeks <[email protected]> ---
Interesting trace - quite possibly we get 'screenParametersChanged' called when
windows are minimized / maximised etc.
If OSX is broadcasting that to every app window when we minimize one of them,
and then we go on to re-draw the entire window; and then we broadcast this:
CallCallback( SalEvent::DisplayChanged, nullptr );
to every window as well - we end up with an N^2 re-render of each window =)
which seems a little OTT.
Quite possibly:
void AquaSalFrame::screenParametersChanged()
{
UpdateFrameGeometry();
if( mpGraphics )
mpGraphics->updateResolution();
CallCallback( SalEvent::DisplayChanged, nullptr );
}
should check to see whether the frame geometry actually changed and only emit
the event if that is the case.
Having said that 'DisplayChanged' - is really an event that should only get
emitted when the physical display and/or monitor size changes - like plugging
in a remote display etc.
Have we emitted that in error much more frequently than we should:
osx/salinst.cxx- [[NSNotificationCenter defaultCenter] addObserver: NSApp
osx/salinst.cxx: selector:
@selector(screenParametersChanged:)
osx/salinst.cxx- name:
NSApplicationDidChangeScreenParametersNotification
osx/salinst.cxx- object: nil ];
I imagine we don't need to do:
osx/vclnsapp.mm:-(void)screenParametersChanged: (NSNotification*) pNotification
osx/vclnsapp.mm-{
osx/vclnsapp.mm- (void)pNotification;
osx/vclnsapp.mm- SolarMutexGuard aGuard;
osx/vclnsapp.mm-
osx/vclnsapp.mm- SalData* pSalData = GetSalData();
osx/vclnsapp.mm- std::list< AquaSalFrame* >::iterator it;
osx/vclnsapp.mm- for( it = pSalData->maFrames.begin(); it !=
pSalData->maFrames.end(); ++it )
osx/vclnsapp.mm- {
osx/vclnsapp.mm: (*it)->screenParametersChanged();
osx/vclnsapp.mm- }
For every frame - if we are also then going to re-broadcast this to every frame
higher up the stack.
Of course. Just based on some quick code-reading, I have no Mac to hack or test
this on.
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs