summaryrefslogtreecommitdiff
path: root/vcl/osx/salnstimer.mm
AgeCommit message (Collapse)Author
2017-10-24loplugin:includeform: vcl (macOS)Stephan Bergmann
Change-Id: I4382a45dcffb32c7c001ee722ac1deccb2b01c2d
2017-09-29tdf#112605 OSX refactor SalAquaTimerJan-Marek Glogowski
Drops all the static calls and variables from SalAquaTimer and moves all timer handling logic inside the class. This also fixes the leak in timerElapsed. Change-Id: Ie7a1a8fffb70b8579ec6876eed10a275d2f06d27 Reviewed-on: https://gerrit.libreoffice.org/42913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-08-22OSX fix updates during resizeJan-Marek Glogowski
While resizing MacOS suspends the NSDefaultRunLoopMode. So in this caae we can't post to the system event loop, but must use timers to restart ourself. Since the timer itself is scheduled on the NSEventTrackingRunLoopMode it' also triggers on resize events. There is still some minor glitch: when resizing too fast some part of LibreOffice isn't painted, while the left mouse button is down. Since there isn't any layouting triggered by the mouse up, there has to be an other inconsistency. Change-Id: I3ccba78bd23ec8526f21e7b93b027f3d3279f901
2017-07-13OSX fix empty message queue handlingJan-Marek Glogowski
For some (unknown) reason [NSApp postEvent: ... atStart: NO] doesn't append the event, if the message queue is empty (AKA [NSApp nextEventMatchingMask .. ] returns nil). Due to nextEventMatchingMask usage, these postEvents have to run in the main thread. Using performSelectorOnMainThread deadlocks, since the calling thread may have locked the Yield mutex, so we simply defer the call using an NSEvent, like the Windows backend. So we have to peek at the queue and if it's empty simply prepend the event using [.. atStart: YES]. In the end this make the vcl_timer unit test pass on OSX. Change-Id: Ib41186425b2f76faa0e9f116f47fdcd60d878099
2017-07-13OSX change to run LO via a single shot timerJan-Marek Glogowski
As all other backends, this runs the LO main loop just via the OSX main loop. Change-Id: Ie7562444951e16ff58edcaf6409f32809314c2fa
2017-07-13Drop special idle handlingJan-Marek Glogowski
Idles are just instant timers, which should most time have a low priority, By dropping most special idle handling we'll just schedule by priority. This also reverts SalYieldResult back to a bool, which just indicates if any event was processed. Change-Id: Ia0b91b06dffb77af066f01838d8f9483523bf67d
2017-07-13Refactor Scheduler global dataJan-Marek Glogowski
Move all Scheduler members of ImplSVData into ImplSchedulerContext and make ImplSchedulerContext a member of ImplSVData. Change-Id: I186bebdfb5701543595848968235b5a56b6598e9
2017-06-30loplugin:oncevarStephan Bergmann
Change-Id: I740ccb3335d602d309422ba26913c4503c6345f0
2015-08-13kill YIELD_GUARD macroNorbert Thiebaud
Change-Id: I81990df584255f4a286cd078bcf15917c00ad504 Reviewed-on: https://gerrit.libreoffice.org/17687 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-03-10Avoid calls on null mpSalTimer on OS XStephan Bergmann
all three addressed places hit frequently now during "make check", likely related to recent changes to timer/idle code? Change-Id: I75963c707807c29db7865b11f9ed532b779765d8
2015-02-04make idle timers actually activate only when idleLuboš Luňák
Without this, they can activate after any call to the event processing, so they may activate in cases such as when updating progressbar while loading a document, or on repeated user input (so things like showing spellchecking get updated when the app is busy redrawing). This change makes idle timers activate only when there's nothing more for the event loop to process. It's a bit of a question if this doesn't break something that happens to expect idle timers to be not-really-idle timers, but oh well. No change for non-X11 platforms, as there's I don't know how to check the event queues. Change-Id: I074a88f2f5eeb4b456a11916a0ec2ad6f54dfbab
2013-12-06Re-organize OS X and iOS code in vcl a bitTor Lillqvist
Now with the ATSUI code gone is a good time for some re-organisation. Get rid of "aqua" in file names and the separate "coretext" folders. CoreText is all we use now for OS X (and has always been so for iOS), so no need for a "coretext" folder, we can keep the CoreText-using code under "quartz". Keep OS X -specific code in "osx". Ditto for headers. Keep "Aqua" as part of class names for now, though. This is also preparation for planned further unification between OS X and iOS code. Change-Id: Ic60bd73fea4ab98183e7c8a09c7d3f66b9a34223