summaryrefslogtreecommitdiff
path: root/vcl/unx
AgeCommit message (Collapse)Author
2021-06-30tdf#143113 fix crash in dndCaolán McNamara
Change-Id: Ifab741494e4cc6e51ca4cd89b57c3600d80dca44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118163 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gtk4: add some more known working dialogsCaolán McNamara
Change-Id: Ie6794832ac1c836b25761240dc4e563d896c36f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118128 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gtk[3|4] add a catch-all AnyInput for under X tooCaolán McNamara
which is needed for gtk4, enable it for gtk3 as well, if that turns out to be a problem for some reason then that's easily fixed Change-Id: Ie3a1875d7930f4db4ff03d085bae07f1646f6e36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118127 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gtk[3|4] AnyInput wasn't doing anything useful under waylandCaolán McNamara
which is going to be the case for all backends under gtk4 at least detect if there is evidence that the VCL_INPUT_ANY condition is true to curtail the idle spellchecking (etc) writer loop in favor of user interaction Change-Id: Id1cefd720a921e3a0d1d403769c544c15c6360e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118126 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gtk3: match VCL_INPUT_ANY with or without TIMER if there's pending gdk eventsCaolán McNamara
Change-Id: Ia3ab9993569a5eac8a1811c0187c4256dce72d50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118125 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29Related: tdf#143088 listen to DefaultWindow for Settings changedCaolán McNamara
having multiple Application::EventListener are expensive while a Window::EventListener is cheap and in this document there are thousands of comments so having thousands of EventListeners is problematic. under gtk with start center open use gnome-tweaks to toggle in/out of a dark theme and the branding logo should continue to switch dark/light variants Change-Id: I64fd12e4bcb8e4fd131effe94e6882e54cfcaf19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118083 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-29gdk_events_pending->gdk_display_has_pendingCaolán McNamara
the latter at least still exists, if mostly private, in GTK4 Change-Id: I0c008b505823d3f2b1ea332a9602399b77fd29c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118050 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28No need to Stop() a Timer before Start()Jan-Marek Glogowski
Start() resets a timer per default, otherwise check IsActive(). Also add a debug name to it. Change-Id: I1588161bb3fead42c3b26282dfa05d149aa94c52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118020 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-06-28gtk4: protect signal_selected with SolarMutexCaolán McNamara
Change-Id: Ie296e3f64607bfc00dbedb204f09be97b143892e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118003 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28drop some unneeded ifdefsCaolán McNamara
Change-Id: I3e323ed5afb2245b28e42992e2ff00a153a8873c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117998 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: gtk_grab_add/gtk_grab_remove doesn't exist in gtk4Caolán McNamara
in the public api anyway, fudge this for now Change-Id: I44fff4e1dffb390664234ace7337c8ffaff6df90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117997 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: add key-pressed/key-released supportCaolán McNamara
Change-Id: If06e8ce0d351a4761622d3824add29ebe9383210 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117995 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: implement focus in/out for IMHandlerCaolán McNamara
Change-Id: Id8183b18622a26c0b61c3165b364ecc1d3e3e5bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117994 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28gtk4: adapt to GtkCellRendererClass changesCaolán McNamara
Change-Id: Id5b52f9a3502cecfe693dadea6642dbed3a18aa2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117960 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-28use the standard macros to generate custom_cell_renderer_get_typeCaolán McNamara
Change-Id: Ie0c15c0d97616d1b5a6afcdc72cba7247e22d999 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-28split out customcellrenderer codeCaolán McNamara
Change-Id: Ia2803f6eab14ee7aeb697fb039f4e6dbdefa25e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117958 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-27gtk4: restore original parent if there was oneCaolán McNamara
Change-Id: Ia3d8da14f545deace3024823b4cf8453937e3f82 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-27rename CustomCellRendererSurface to shorter CustomCellRendererCaolán McNamara
Change-Id: I8fa2d75d0c24f4e211136c929b8fd6f8466eb311 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-27Silence UBSan dynamic-type-mismatch for VclPtr member in GObjectStephan Bergmann
...that wasn't properly initialized (in an --enable-dbgutil build; see also <https://gerrit.libreoffice.org/c/core/+/117878> "There appears to be no reason for (DBG_UTIL-only) ~VclPtr to be virtual", but even when VclPtr has no vtable, it arguably is to properly con- and destruct CustomCellRendererSurface::device). For example, in Writer clicking on the "Styles" icon in the side bar: > vcl/unx/gtk3/gtkinst.cxx:15144:10: runtime error: member call on address 0x625001b42668 which does not point to an object of type 'VclPtr<VirtualDevice>' > 0x625001b42668: note: object has invalid vptr > 50 62 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 8a f0 00 30 60 00 00 80 f8 19 02 > ^~~~~~~~~~~~~~~~~~~~~~~ > invalid vptr > #0 in (anonymous namespace)::ensure_device((anonymous namespace)::CustomCellRendererSurface*, weld::Widget*) at vcl/unx/gtk3/gtkinst.cxx:15144:10 Change-Id: Ic6ab75668e5b3ecca6d1e5743ed1907c8cbdb143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117915 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-26gtk4: reenable calc format page dialogCaolán McNamara
Change-Id: Ie47c2b6be6e83f01a0c095484b65b1604db0cefe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117911 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-25gtk4: reenable calc format cells dialogCaolán McNamara
Change-Id: I512339745cb8f0e34068c38b88f1f53953ed8f06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117907 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-25gtk3: gtk_menu_attach_to_widget to the final pWidgetCaolán McNamara
probably doesn't make a difference in practice Change-Id: I3a015a1585aa2a7d100acd8e6edbfa30d4549ffe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117883 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-25gtk4: detect context menu triggerCaolán McNamara
Change-Id: Id86015c3b7f48b97acd0094838f51eade5f7569d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117881 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-25gtk4 dnd into external appsCaolán McNamara
It's always hard to bootstrap dnd because so much of it has to work before any of it works. Typically dnd and cnp are strongly related so getting cnp working first is the way to go before trying dnd. Change-Id: I645f56dc5f8cb0e3a31e0ff8bbaab610366b6312 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117798 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-25gtk4: split out clipboard_content headerCaolán McNamara
Change-Id: I1b820c1cef2cc76a5fc748574c36ebdd4b28eef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-25gtk4: use css-cursors where it seems to fitCaolán McNamara
see: https://drafts.csswg.org/css-ui-3/#cursor and: https://bugzilla.gnome.org/show_bug.cgi?id=652085 Change-Id: I990b807b685283e12785c90c90cd0f8e658b062e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: track underlying surface state for maximized/minimizedCaolán McNamara
Change-Id: Ia62d12f367555b409cb2a6ed491f65dca34baed3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117784 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: start with initial window state of all unset bitsCaolán McNamara
Change-Id: I36fd31253a61308b2cf84d48d3e963af6c49118f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117783 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: finish dnd targetCaolán McNamara
we want to work with a GdkDrop not GtkDropTargetAsync to get the behaviour we expect Change-Id: If1f0904fec3a0bfd6dfba770db6c11774e4d23a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117774 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: gdk_drop_get_actions is a better matchCaolán McNamara
Change-Id: I3442f3498f83da8d4eef3004b79925099dd1306d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117772 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: unhighlight the parent like gtk3Caolán McNamara
Change-Id: I47a7a6f8e42d9032a9acfdda9376ef05e30e3e73 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117771 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk[3|4] set what widget to highlight during dndCaolán McNamara
Change-Id: Iba808b2f11615a25463c2739e6347f3cc2a91bc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117770 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: merge some common dnd and cnp blocksCaolán McNamara
Change-Id: I195eb7ae3fda492a36423f57139550cb7fef9b2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117765 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24drop text_transfer_result and merge dnd and paste logicCaolán McNamara
Change-Id: Ia91e961d2d94bbd4baeb81647438a4026a4fce60 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117764 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: reuse read_block_async_completed from dnd for cnpCaolán McNamara
Change-Id: I1acfa4c48ee59fd79b4a4b32afa732feef6348c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117761 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: simplify dnd "drop" signalCaolán McNamara
Change-Id: I2d4714194516c6b8270fa96c8c5a6b75d2d10b86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117760 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: unref stream when done with itCaolán McNamara
Change-Id: I3cb11918f0e85fcbc9557dc0211bc10f819f9064 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117749 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24gtk4: get dnd drop into LibreOffice from another app workingCaolán McNamara
Change-Id: I9519af009b479e51a3da556f26f3950c4930d618 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117611 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-24rename read_paste_result to read_transfer_resultCaolán McNamara
we'll reuse what worked for clipboard for dnd Change-Id: If8accc2d236253a734f48929e231bcecbb00741f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117744 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21gtk4: some initial dnd effortCaolán McNamara
Change-Id: I964afbf30c75b6d8e0c31ce7fcb536814acf05b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117599 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21gtk4: reenable some more working dialogsCaolán McNamara
Change-Id: I373b9260287b229f4f3092b4c27199c2a55ea23d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117597 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21give folderpicker an optional parentCaolán McNamara
so, like a file picker, it can make its parent modal while its operating. Otherwise its possible to interact with the parent dialog in undesirable ways, e.g. file, export as, export as epub, the folder picker of 'media directory' Change-Id: Ib61f8e630e176b6d81e80798fd0d282d16e8c086 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117582 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21bundle the FolderPicker instantiations behind a single callCaolán McNamara
in prep to add parent support Change-Id: I2aa4b9343f895ae866f600dd3260b7fdc4e1efec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117579 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-21gtk4: set file dialog explicitly modalCaolán McNamara
Change-Id: I88427abcde6c88b08c013a2502c0c25a84b970c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-18Workaround only for GCC 10Stephan Bergmann
Change-Id: I7425dfd674149b33e069bf20c1ff6a4ca622db20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117453 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2021-06-18gtk4: implement removing an entry from MenuButton menuCaolán McNamara
and enable a bunch of now working dialogs Change-Id: I42d6731cf4535e4a4867d4177590939a1cc395f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117468 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-18move the explanatory image outside the RadioButtonCaolán McNamara
Change-Id: I90425bec7418a26959241b670f63a5f4a4bb0fa4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117460 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-06-18Fix typoAndrea Gelmini
Change-Id: Ibcbd13ccc4e257e8b1777bd362279211d4a2a0db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117471 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-18gtk4: use state-flags-changed for gtk4 GtkMenuButton toggle alsoCaolán McNamara
Change-Id: Ib953d9d01482bedff62f11a18e69268e34099dc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117438 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>