summaryrefslogtreecommitdiff
path: root/vcl/osx
AgeCommit message (Collapse)Author
2023-11-06tdf#155266 force flush after scrollingPatrick Luby
This is the second attempt to force a flush after scrolling. Commit 9c0803edd1f42b2d29115674795c7c674fea1a35 worked on Mac Silicon but not Mac Intel. So, instead of calling [NSApp currentEvent] to determine if scrolling has occurred, mark the AquaSalFrame whenever a scrollwheel or mouse drag event is dispatched so the frame will be flushed in the next AquaSalFrame::Flush() call. Change-Id: I2d0b99d2cd1167e92c7fd89bf53b2f30ab85a165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159003 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-06tdf#155266 revert commit 9c0803edd1f42b2d29115674795c7c674fea1a35Patrick Luby
While commit 9c0803edd1f42b2d29115674795c7c674fea1a35 fixed tdf#155266 on Mac Silicon, it didn't fix that bug on Mac Intel. Change-Id: I4dc9eb3a5da319a0c8f58bcdea5abfc3e4ec4a0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158997 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-06tdf#157518: vcl: add native macOS rendering support for LevelBar controlSarper Akdemir
Uses NSLevelIndicator to render LevelBar control on macOS. Closely follows the existing implementation for ControlType::Progress Change-Id: Ibd38e172b8b6297e6322cfe9d5a1b0a6ef0f0656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158504 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2023-11-03tdf#155266 flush when scrolling or draggingPatrick Luby
Delaying flushing until the dispatch level returns to zero causes scrolling via the scrollwheel or mouse drag to appear laggy and jerky. Change-Id: Ib70e7766435baa765dd0d1d704ba2fac87f7fccc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158853 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-11-03macOS a11y: Drop obsolete TODO to implement spelling error attrMichael Weghorn
Handling for `NSAccessibilityMisspelledTextAttribute` and the newer `NSAccessibilityMarkedMisspelledTextAttribute` [1] has been added in commit db0fa92637a1b2edf26da9917c9dce050ebc8a78 Author: Boris Dušek <me@dusek.me> Date: Sun Aug 11 16:37:48 2013 +0200 fdo#67980 - VoiceOver does not inform about misspelled text and VoiceOver announces misspelled Writer text as such, so drop the obsolete TODO. [1] https://developer.apple.com/documentation/appkit/nsaccessibilitymarkedmisspelledtextattribute Change-Id: Id8ae1ee660e87c06ac7f559b5cdf1b31e22aef90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158840 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-11-01macOS a11y: Don't report (non-)expanded state when not expandableMichael Weghorn
When the a11y object is not expandable, also don't report a true/false value for the expanded state on macOS. Otherwise, the CrossOver screen reader on macOS will explicitly announce "collapsed" for these objects, e.g. when moving focus between paragraphs in Writer (as reported on the a11y mailing list [1]) or between toolbar butons, since `isAccessibilityExpanded` gets called and returns false, so it is assumed that this is an expandable item that is currently not expanded, i.e. it is collapsed. Quoting from the NSAccessibilityProtocol doc [2]: > You can control which accessor methods the assistive app can > use by overriding isAccessibilitySelectorAllowed(_:). > Return true if the assistive app can call the selector; > otherwise, return false." [1] https://listarchives.libreoffice.org/global/accessibility/msg01068.html [2] https://developer.apple.com/documentation/appkit/nsaccessibilityprotocol: Change-Id: Iac9027a598e5793d6bd0da79212d7b07448a4c34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158733 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-29vcl: no raw pointersThorsten Behrens
For ImplJobSetup. Also, check memcmp mem size more properly Change-Id: Idcf20bf1b51bc2508f3d37e018efd18e591a6099 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/26648 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2023-10-28tdf#135586 a11y: Add a new BLOCK_QUOTE a11y roleMichael Weghorn
A block quote role exists in all of WAI-ARIA 1.3 (role "blockquote", [1]), IAccessible2 (`IA2_ROLE_BLOCK_QUOTE`, [2]) and AT-SPI (`ROLE_BLOCK_QUOTE`, [3]). Take over the definition that is the same in WAI-ARIA and IAccessible2: > A section of content that is quoted from another source. The intended use for now is for a Writer paragraph using the "Block Quotation" paragraph style, similar to how the HEADING role is used for paragraphs using a corresponding paragraph style. For gtk3 (ATK) and winaccessibility (IAccessible2), map the new role to the equivalant roles. For macOS and the gtk4 as well as the Qt-based VCL plugins on Linux which currently don't have an equivalent role, fall back to the same role that the PARAGRAPH role is mapped to. This way, the behavior there will remain unchanged once the BLOCK_QUOTE role is used for Writer paragraphs with the corresponding style. In general, treat BLOCK_QUOTE like PARAGRAPH in code applying special handling for the PARAGRAPH role. [1] https://w3c.github.io/aria/#blockquote [2] https://github.com/LinuxA11y/IAccessible2/blob/3d8c7f0b833453f761ded6b12d8be431507bfe0b/api/AccessibleRole.idl#L318 [3] https://gitlab.gnome.org/GNOME/at-spi2-core/-/blob/7cc4cee53ddbd22631fd110f0e5ce045dec2e411/xml/Accessible.xml#L615-616 Change-Id: I248c183a2e7ec5d6f0a89bf3cb4829bbd8588c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158573 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-10-27Various -Werror,-Wvla-cxx-extensionStephan Bergmann
...as enabled by default now in recent Clang 18 trunk Change-Id: I59f9bbdf2ce064f170df01e6d7ec2341884ab5e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158563 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-10-20tdf#157565 show tooltip if any parent window is the key windowPatrick Luby
Commit b69db38a38b09e158e8d46d8b717db85860ca874 caused tooltips to fail to appear if their immediate parent window was not the key window. So, look through the parent window's parent windows and, if any of those windows are the kwy window, show the tooltip. Change-Id: Icf1aed1144fdeac03b4b208de8ed8ee2db8ad4a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158212 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-10-14Add NUMBERSIGN key handler.Gökay Şatır
German keyboard layout has number sign key. Users can print number sign without using modification keys. So this key can be assigned a shortcut. Subscript is assigned to CTRL + NUMBERSIGN. Below PR is used as reference when adding the new key handler: https://gerrit.libreoffice.org/c/core/+/86713 Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I340dc47764e9200d2477f8db740a629f62f48004 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-09-19The name is macOS since 2016Andras Timar
Change-Id: I9f2011e1f9619652b4ed417f135451d8ccfe90bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157033 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2023-09-12attempt to fix macos jenkins hangs - part 3Patrick Luby
oox::xls::WorkbookFragment::finalizeImport() calls AquaSalInstance::DoYield() with bWait set to true. But since unit tests generally have no expected user generated events, we can end up blocking and waiting forever so don't block and wait when running unit tests. Change-Id: I14cfdb88f04b82f49e8c15e554e5c4b4053e77b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156826 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-09-10attempt to fix macos jenkins hangs - part 2Patrick Luby
Commit a1174a5f1e312ebb98c3941d35287a8ffcb368e9 attempts to fix sporadic blocking and waiting when fetching a native event so use the same fix in AquaSalInstance::AnyInput() just to be safe. Change-Id: I1505b6089f11be825bd13e0219a305159dfc324f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156803 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-09-10attempt to fix macos jenkins hangsNoel Grandin
I see sporadic hangs, and the backtrace indicates that the process is locked up inside _nextEventMatchingEventMask. Try an alternative formulation of this method. Change-Id: Id8d7631bb0421cfb3c91a673ea14c0fe458c6f28 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156794 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-09vcl: Organize CoreText font code a bitKhaled Hosny
The code was all over the place with classes split between files or grouped in some files and I couldn’t make a head or tail of it. Move each class to a dedicated source/header file. Change-Id: I35daa05b4684c13339c637819dc30fa47a60cf65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155503 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-08loplugin:redundantfcastStephan Bergmann
Change-Id: I6b19cbd146de479754b9e8833076ed7f077c87f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155443 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-08-02split Point/Size/Rectangle into AbsoluteScreenPixel* typesNoel Grandin
to attempt to make it obvious in code what kind of coordinate system we are dealing with. The idea is that by doing this, the compile-time type checking will flush out inconsistencies between different code. I started with vcl::Window::OutputToAbsoluteScreenPixel and worked outwards from there. Change-Id: Ia967d7a0bb38886695f3a761b85c8b9340ddb1c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154676 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-24tdf#155414 include system "reduce animation" preferencesPatrick Luby
Allow the system's "reduce animation" preferences to disable the Calc animated border when copying a selection of cells. Also, fix failure to stop the animated border when a copy action is performed in a different document by cancelling the animated border. This transferable has lost ownership of the system clipboard so, in essence, the previous copy action that created this transferable has been cancelled. Change-Id: I4da6d557c5dbf653c38a99eb7a16d961843a41d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154752 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-06-26attempted fix for sporadic hang on macosNoel Grandin
Change-Id: I75d624eb98a87cb15f41be02631205cb86d7d270 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-20loplugin:cstylecastStephan Bergmann
Change-Id: I32e3e9bff261f95010582c6e5e2d22abb725f402 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153311 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-06-16tdf#146626 catch IndexOutOfBoundsException when fetching accessible childrenPatrick Luby
com::sun::star::accessibility::XAccessibleContext::getAccessibleChild() can throw an IndexOutOfBoundsException exception even when fetching with an index that is positive and less than the value returned by a call to the accessible context's getAccessibleChildCount() method so put every getAccessibleChild() call in a try/catch block. Note: this is actually expected behavior even though it is rare. For example, accessibility::AccessibleTextHelper_Impl::getAccessibleChild() uses the following code snippet to throw such an exception: if( 0 > i || i >= getAccessibleChildCount() || GetTextForwarder().GetParagraphCount() <= i ) In the case of tdf#146626, getAccessibleChildCount() returns 22 but getAccessibleChild(1) throws such an exception due to the last condition in the above code snippet. Change-Id: If974afb7b9178faa99b91dcd79eb5f169bbfe13e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153160 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-06-13tdf#155376 weakly cache ScAccessibleCellNoel Grandin
the macOS accessibility framework repeatedly queries and enumerates all of the visible cells. Every time this happens we create a new set of ScAccessibleCell, which then live until the application shuts down, which then causes a very slow shutdown. So I fix the problem by caching the ScAccessibleCell so we return the same one for a given cell position. Of course, this begs the question of why the ScAccessibleCell objects are not dying when we create new ones, which means we have some kind of leak or lifecycle problem somewhere, but anyhow, this is a fairly simple and comprehensive fix. Change-Id: Id2765236ac4524f490a51b56268fb8038612fd43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152932 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-12Fix hanging when selecting a column or row in CalcPatrick Luby
When a Calc column is selected, the child count will be at least a million. Constructing that many C++ Calc objects takes several minutes even on a fast Silicon Mac so apply the maximum table cell limit here. Change-Id: I4e3ebf9fdf7367620313e4e10dd0918de9d6bffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152853 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-06-07Partial fix tdf#155376 use NSAccessibilityElement instead of NSViewPatrick Luby
On macOS, accessibility is implemented by creating a native NSView for each C++ accessible element. The problem with using an NSView for each element is that NSViews are very slow to add to or remove from an NSWindow once the number of NSViews is more than a thousand or so. Fortunately, Apple added a protocol that allows adding a native accessible element using the lightweight NSAccessiblityElement class. The topmost NSAccessiblityElement elements are connected to the single SalFrameView in each NSWindow but since NSAccessiblityElements are not NSViews, they are not connected to any of NSWindow's event or draw dispatching. This makes NSAccessiblityElements significantly faster to add to or remove from an NSWindow with no apparent loss in functionality. Note: this change is a subset of the LibreOffice 4.4 code changes that I wrote for NeoOffice. Change-Id: I408108d57217db407512dfa3457fe26d2ab455de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152717 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-06-02reduce memory overhead of AquaA11yWrapperNoel Grandin
we can allocate this internally, which reduces the number of heap allocations we need to do Change-Id: Id5298e70b6816cd65d8285ceea846dc8e9e4b39d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152489 Reviewed-by: Patrick Luby <plubius@neooffice.org> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-05-29Related tdf#tdf155376 fix minor memory leaksPatrick Luby
Change-Id: I9cdc5fb38ffba113e3d069d9d766dbe1a82c492d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152352 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> (cherry picked from commit 7ae89a2ad89c9e7702fbd2b31269ee4c61fe5bcb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152316
2023-05-29Partial fix tdf#146626 Catch uncaught DisposedExceptionPatrick Luby
Fix crash due to an uncaught DisposedException thrown by SwAccessibleParagraph::getTextRange() by using the same try/catch block in -[A11yWrapper accessibilityAttributeValue:] in -[A11yWrapper accessibilityAttributeValue:forParameter]. Change-Id: Ifcaec3eb2d76f32bddc56a1242f6d86f8b90f782 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152361 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> (cherry picked from commit f8cc6f960e8aeb37547d447fed2b2c6e6ddc02e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152317
2023-05-28Use getXWeak in vclMike Kaganski
Change-Id: I665c9dc8c4f9cc4a996d9bf990cbfa33822bd07f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150885 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-23Resolves tdf#145080 - Use accent color for focused cellHeiko Tietze
Accent color added but effectively working only on macOS See inline comments for gtk, qt, and win Change-Id: I1e4a729331735683921f94b27bb2bb02555c0165 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151887 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-05-10tdf#152173 Don't display tooltip windows when mousing over non-key windowsPatrick Luby
Don't display tooltips when mousing over non-key windows even if the application is active as the tooltip window will pull the non-key window in front of the key window. Change-Id: I425b9af09de0272ebee84a218e2e5ae8c200a4e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151646 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-05-04tdf#152173 Don't display tooltip windows when application is inactivePatrick Luby
Starting with macOS 13 Ventura, inactive applications receive mouse move events so when LibreOffice is inactive, a mouse move event causes a tooltip to be displayed. Since the tooltip window is attached to its parent window (to ensure that the tooltip is above the parent window), displaying a tooltip pulls the parent window in front of the windows of all other inactive applications. Change-Id: I35caf480a8afb42694957a4a6c2bec20be591ef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151394 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-04-14add a way to resolve if dark mode (explicit or auto) is activeCaolán McNamara
Change-Id: Ie0d4e0c3cd5d19cf6337ec79d30ae7c877cffd82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150394 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-13Related: tdf#153374 Don't release autoreleased attributeNamesPatrick Luby
Also, return an autoreleased empty array instead of a retained array. Change-Id: I5f494b301dbae859486d6bc4874112b714022b60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150307 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-04-12tdf#154708 Preserve selection for repeating Shift-arrow on Japanese keyboardPatrick Luby
Skip the posting of SalEvent::ExtTextInput and SalEvent::EndExtTextInput events for private use area characters. Change-Id: I6fa5dedacefc5d9dd671f607786deb999f5e4c6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150248 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-03-29tdf#149805 tdf#151677 tdf#152217 tdf#154043 tdf#153458 tdf#153800 Revert ↵Michael Weghorn
"VCL expect ... correct frame size for native menubars" This reverts commit afc828b9833b7a612369e95606ba56d41ef2c369 Date: Sat May 28 23:47:21 2022 +0200 VCL expect correct frame size for native menubars ... and renove the wrong framesize hack in the Qt backend because it caused several regressions and unfortunately the commit also doesn't fix all of the bugs mentioned in its commit message (while some previous patch sets of the change did address more, yet had other issues, s.a. the discussion in the commit's Gerrit change [1]). While e.g. the drag and drop issues reported in tdf#153458 and tdf#153800 could be fixed by translating the event position using `mapToParent()` (as is done in `QtWidget::fillSalAbstractMouseEvent` with the above commit in place), I currently don't see how to address the other issues and the overall direction of the change is not fully clear to me at this point. (There are also other pending changes in the relation change still pending in Gerrit that would presumably need more work/analysis.) After all, it seems the best way forward to revert the commit for now. This also reverts the follow-up commit commit 25da92004038c03c0feedf373e8038e7ee3e0c37 Date: Thu Jul 21 11:33:02 2022 +0200 Make JunitTest_toolkit_unoapi_1 succeed again on macOS that fixed a test failure introduced by the above commit. Luckily, there seem to be no follow-up commits that depend on this and the commits can be reverted cleanly without the need to resolve any conflicts manually. This reverts commit 25da92004038c03c0feedf373e8038e7ee3e0c37. This reverts commit afc828b9833b7a612369e95606ba56d41ef2c369. [1] https://gerrit.libreoffice.org/c/core/+/135082 Change-Id: I4c099ad7de8cbbad10da391ede4770d8c748fbde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149495 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-03-14Related tdf#129547 and tdf#154136: add COLON keyJulien Nabet
Change-Id: I17978dbb100fbfa6f6ddbbbdf96872076bc2a289 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86713 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-11Use a matching dark icon theme on auto picking icon theme from fallbacksCaolán McNamara
explicitly use: breeze/breeze_dark for plasma sukapura/sukapura_dark for macOS colibre/colibre_dark for win originally we only had one dark theme so in a dark theme there was only one option available, but there's now a bunch to choose from. In practice nothing changes here because breeze_dark is the current (as originally only) dark mode fallback for gnome and win/osx name an explicit something"_dark" in their platform specific bits Change-Id: I13fdfe586cec30b5a9770dc80c9bdcc6a57d04a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148650 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2023-03-10Reset dark mode colors in HITheme controls after printingPatrick Luby
In dark mode, after an NSPrintOperation has completed, macOS draws HITheme controls with light mode colors so reset all dark mode colors when an NSWindow gains focus. Change-Id: Ifdbb7d2eff8157ed0d711cf975c2ad1fdcf63495 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148570 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-02-09loplugin:staticaccessStephan Bergmann
Change-Id: I24aa6b773f13b5d9924fbc867090ab9bf8c42045 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146681 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-02-08tdf#153229 use bestMatchFromAppearancesWithNames to take user pref into accountCaolán McNamara
so user's override of system is taken into account for the icon theme. Change-Id: I02a9bf67eb6a3406f0e60bea58387e2e7457c995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146669 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-02-08tdf#153229 add a switch to override honoring system dark modeCaolán McNamara
Change-Id: Iafb6182e05dc65d20d0809476ee58908f7426d39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146597 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-01-26tdf#147342 Notify Skia that the window's backing properties changedPatrick Luby
Change-Id: I4185a240a2ca6df1c92e86ff9950f86234d4ace8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146142 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-01-20tdf#148453 Fix crash by turning off optimization for Objective-C selectorPatrick Luby
The default attributes sequence sometimes crashes when it is released but only when compiler optimization is enabled, so disable optimization for the +[AquaA11yTextAttributesWrapper createAttributedStringForElement] selector. Also, disabling optimization by itself is apparently not enough to stop the crashing. Acquiring the solar mutex during native accessibility calls is also needed. Native accessibility calls are called from native input sources in [NSApp nextEventMatchingMask:untilDate:inMode:dequeue:]. Since AquaSalInstance::DoYield() releases the solar mutex before calling [NSApp nextEventMatchingMask:untilDate:inMode:dequeue:], we need to always acquire the solar mutex during all NSAccessibility selectors (both the old informal protocol and the newer formal protocol) that we implement. Change-Id: I9b715e17e9c5a32b7ce28815e288b2af236c3cc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145742 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-01-17Related: tdf#42437 Skip special press-and-hold handling for action keysPatrick Luby
Pressing and holding action keys such as arrow keys must not be handled like pressing and holding a character key as it will insert unexpected text. Change-Id: I6beaff265e6cae30337b025791692ff67b760ff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145689 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-01-17loplugin:casttovoid ("unnecessary cast to void")Stephan Bergmann
Change-Id: Ic891e3ea72e7946a9088ab77ba561d0f1c9b77e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145673 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-13Related: tdf#152703 Eliminate potential blocking during live resizePatrick Luby
Some events and timers call Application::Reschedule() or Application::Yield() so don't block and wait for events when a window is in live resize. Also, only native events and timers need to be dispatched to redraw the window so skip dispatching user events when a window is in live resize. Lastly, only higher priority tasks need to be fired to redraw the window so skip firing potentially long-running tasks, such as the Writer idle layout timer, when a window is in live resize. Change-Id: I5d449caa432399e836b8e59781e5cc53af718873 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145211 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-01-11rename BitmapEx::GetAlpha to GetAlphaMaskNoel Grandin
to ease the reading of code related to an upcoming patch to convert transparency to alpha, since there is already a GetAlpha in Color. Change-Id: I1af0f8f6dd94acfe4673c8556c7aff6c20da3f7a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145209 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-10tdf#152648 Handle overflow when multiplying rows and columnsPatrick Luby
Change-Id: I1f3b4853fb6e6a66e74e798d6594342c84d5a695 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145245 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-01-09loplugin:fakeboolStephan Bergmann
Change-Id: Idf69f13c3e8ab94ac04d83c9a0d171cddc399a10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145213 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>