summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
AgeCommit message (Collapse)AuthorFilesLines
2019-05-29tdf#124694 gtk2 GtkFixed takes the max size of all its children...Caolán McNamara1-1/+18
as its preferred size, causing it to not clip its child, but try and grow instead to match Change-Id: Ibea269d475a4b35a43b6cab2ab432a830d8ff1ff Reviewed-on: https://gerrit.libreoffice.org/73168 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-27tdf#125271 under wayland without gtksink, try waylandsinkCaolán McNamara2-0/+2
and if there is no videosink then give up Change-Id: I6b60e7be1e77dbf5c4c277ccf47a4d121f3cd6a5 Reviewed-on: https://gerrit.libreoffice.org/72871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-15Move FindFocusedEditableText from gtk* into vclJan-Marek Glogowski1-46/+1
Now that it will be used by four VCL plugins, move its code into the common VCL library. The none-XAccessibility, none-UNO version used on Windows needs much more work to function with various widgets (including some API refactoring IMHO). (see ImplHandleSalSurroundingTextRequest and friends). Change-Id: I0fdf72336a66fc578b18b1edc8f8627d5dfdc57f Reviewed-on: https://gerrit.libreoffice.org/72364 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-09tdf#124400 a11y: add accessible IDSamuel Thibault1-0/+12
Such ID is not meant to be presented to the user, but to be an ID which is stable over application development. Typically, this is the gtkbuilder ID. Such an ID can then be used to identify a given well-known accessible object independently from the current locale, user-visible labelling, or dialog structure. This can then be used for tailored screen reading (e.g. automatically announcing the content of a well-known object), or for automatic regression testing (to check the behavior of well-known objects). Uniqueness within the window is thus desirable when returning a non-empty string. This adds XAccessibleXContext2 to augment XAccessibleXContext with getAccessibleId(). The VCL implementation just takes Window::get_id(), i.e. the gtkbuilder id, which is enough for most use cases for now. atk_object_wrapper_new then passes it to atk_object_set_accessible_id() for AT-SPI technologies to pick it up. Change-Id: Iea0ad08d036e539dbcfec1a9be026c8da8d17357 Reviewed-on: https://gerrit.libreoffice.org/71743 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-05-02Use hasElements to check Sequence emptiness in [v-x]*Arkadiy Illarionov3-5/+5
Similar to clang-tidy readability-container-size-empty Change-Id: I71e7af4ac3043d8d40922e99f8a4798f0993294c Reviewed-on: https://gerrit.libreoffice.org/71603 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-29speed up gtk menu construction at startupNoel Grandin1-6/+19
Change-Id: Ia28b1f0281485691e3b4188d23947014c1eff385 Reviewed-on: https://gerrit.libreoffice.org/71465 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-26Fix typosAndrea Gelmini1-1/+1
Change-Id: I81d85cb8ae8b0075929beb01e8991d895b94d0c4 Reviewed-on: https://gerrit.libreoffice.org/71314 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2019-04-19optimise find/insert patternNoel Grandin1-2/+1
if we're doing a find/insert on a set or a map, it is better to just do a conditional insert/emplace operation than triggering two lookups. Change-Id: I80da5097f5a89fe30fa348ce5b6e747c34287a8d Reviewed-on: https://gerrit.libreoffice.org/70937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15Related: tdf#97822 vcl opengl gtk2: fix missing slider widgetMiklos Vajna1-65/+57
This had the same problem as the list node widget, fixed in commit fb9c7e31f888a301fecb5257635e12ce7b907d14 (tdf#97822 vcl opengl gtk2: fix missing list node widget, 2019-04-12). Render output was missing in the GL / SAL_GTK_USE_PIXMAPPAINT=1 case. Change-Id: I24252c697523214a93f715759e242d47352c8341 Reviewed-on: https://gerrit.libreoffice.org/70760 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-04-15loplugin:sequentialassign in vclNoel Grandin3-16/+7
Change-Id: I530b81b3258a6e1c1456da53bfe1285f14aee712 Reviewed-on: https://gerrit.libreoffice.org/70734 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-13tdf#97822 vcl opengl gtk2: fix missing list node widgetMiklos Vajna1-9/+19
OpenGL just sets GtkSalGraphics::bNeedPixmapPaint to true, and the problem is specific to that flag (can be also enabled via SAL_GTK_USE_PIXMAPPAINT=1). Most other widgets are painted correctly in the GL case as they pass around a drawable explicitly; do the same for ControlType::ListNode as well in the GL case. The non-GL case still needs to go via the pixmap render macros to have correct position, leave that unchanged. Change-Id: Ia82a6772e357b434d706e58664be3a8427e91669 Reviewed-on: https://gerrit.libreoffice.org/70669 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-12prefer vector::data to &vector[0]Caolán McNamara1-2/+2
probably missed loads more Change-Id: I53c9fe188055ef925fed54500e64b837cd56a1e7 Reviewed-on: https://gerrit.libreoffice.org/70676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-29GTK use SalYieldMutex lock argumentsJan-Marek Glogowski1-8/+6
The acquire and release functions already provide arguments to release and re-acquire the lock, so use these. Also moves the n-1 lock handling from release into acquire. This way release doesn't need any special handling, which acquire already does. Change-Id: If2fc92beb8e3ea1f5c078da4d8dde3ce9c774c6f Reviewed-on: https://gerrit.libreoffice.org/69574 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-03-28mapped tooltip before attempting to show a menu is a problemCaolán McNamara2-12/+18
under wayland, see https://gitlab.gnome.org/GNOME/gtk/issues/1785 Change-Id: I542fb9e81b49144508d5403b2d5ad68a10ed8afe Reviewed-on: https://gerrit.libreoffice.org/69897 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-27return by unique_ptr from NWGetPixmapFromScreenNoel Grandin1-14/+13
Change-Id: I26cde2c0a6b605f0d638bb252e0809ac6dece26a Reviewed-on: https://gerrit.libreoffice.org/69785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-24weld SvxSearchDialogCaolán McNamara2-5/+9
I have to use the other way to specify an a11y role, both are implemented in the vcl parser, but in my gtk3-3.24.7 the role tag crashes the gtk parser, while the other route works fine. The CONTENT_FLOWS_TO accessibility relation is another additional complexity over the norm Change-Id: Ia096bcbe9f00f9944e4e4d5ad9bb1a52d19c7b3f Reviewed-on: https://gerrit.libreoffice.org/69569 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-23factor out the adding to an atk relation set codeCaolán McNamara1-19/+24
Change-Id: Ie81cfaab1fac15648fc8ba89391bdedd5c1e6c90 Reviewed-on: https://gerrit.libreoffice.org/69590 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-20Resolves: tdf#119996 remove support for GNOME Shell application menuArkadiy Illarionov1-156/+1
Change-Id: If107a43f34eb13b215d2ebf285fbe3f8d1848b88 Reviewed-on: https://gerrit.libreoffice.org/69362 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-08make it possible to use FileDefinitionWidgetDraw in more backendsTomaž Vajngerl1-0/+2
Change-Id: I8871eb49e11d8c72c469230967c3c979091a0f9b Reviewed-on: https://gerrit.libreoffice.org/68898 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-03-06remove some unnecessary typedef struct... sugarNoel Grandin2-4/+4
Change-Id: I1576282b0a0a3af8ae14c04725d9c4900073f2c4 Reviewed-on: https://gerrit.libreoffice.org/68758 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27convert more Start timer methods from sal_uLong->sal_uInt64Noel Grandin1-1/+1
Change-Id: I1ed43bab00a5bc456032410ccf32b3fd64cc970c Reviewed-on: https://gerrit.libreoffice.org/68419 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-26sal_uIntPtr->sal_uInt32 inSalClipRegion::BeginSetClipRegionNoel Grandin2-2/+2
sal_uInt32 seems reasonable given that this is the number of rectanges in an image. And then convert all of the other BeginSetClipRegion methods to use sal_uInt32 too. Change-Id: I85a712ec823662ac30f3859051e2b974fb99775e Reviewed-on: https://gerrit.libreoffice.org/68343 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11Resolves: tdf#123080 don't require wayland at runtimeCaolán McNamara1-1/+1
if it existed at buildtime Change-Id: I8a3285b7ee3b0556605b0c3d4b1fef222eb62d1a Reviewed-on: https://gerrit.libreoffice.org/67691 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-11new loplugin writeonlyvarsNoel Grandin1-6/+0
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11loplugin:indentation in vclNoel Grandin3-6/+6
Change-Id: Idd7166833764fdf1d9c42a050490572a8b330199 Reviewed-on: https://gerrit.libreoffice.org/67610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08o3tl::make_unique -> std::make_unique in tools..xmloffGabor Kelemen1-3/+2
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26 Reviewed-on: https://gerrit.libreoffice.org/67474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-01tdf#84431 set default format for chart image exportMartin van Zijl1-0/+4
Change-Id: I0b07bfe6e2dd8227c6a291252cd2fa8c48412866 Reviewed-on: https://gerrit.libreoffice.org/64581 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-01-27tdf#122990: return if no mpMenuBarContainerWidget in ApplyPersonaJulien Nabet1-0/+2
Related to patches for tdf#122241 Change-Id: I0ce46a3a362855aaa6c11f375d20c2212f1cb20b Reviewed-on: https://gerrit.libreoffice.org/66973 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-23Related: tdf#122241 improve applying persona for additional menubarsCaolán McNamara1-0/+2
Change-Id: Ic968b022e3b37a9329ca29708f53b36f0e7b2ce9 Reviewed-on: https://gerrit.libreoffice.org/66797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-22Resolves: tdf#122241 support persona header in native gtk3 menubarCaolán McNamara1-0/+73
Change-Id: Ia4485ec4c342c86f40e8e0bb7e5e1af1a47bb9b9 Reviewed-on: https://gerrit.libreoffice.org/66725 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-20GSourceFunc return gbooleanCaolán McNamara3-7/+7
Change-Id: I9872b27450e9b50d8bef33abc267a763d7d516cb Reviewed-on: https://gerrit.libreoffice.org/66632 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-13Avoid index for single getToken call, simplifyMatteo Casalin1-4/+1
Change-Id: Idd80e80845aba8dbab7144502f175ff6bafa9b18 Reviewed-on: https://gerrit.libreoffice.org/66230 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-01-09Resolves: tdf#122353 silence useless selection-changed event attemptsCaolán McNamara1-1/+7
Change-Id: Ie84fb12e6561d93832159779d233102a34b1c78c Reviewed-on: https://gerrit.libreoffice.org/66042 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen2-0/+2
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-19Resolves: tdf#121555 sometime crash on menu hierarchy changeCaolán McNamara1-3/+11
seems menubar gets set to dirty due to some menu activity that needs a refresh, but then the hierarchy changes and as its already dirty the maUpdateMenuBarIdle doesn't get launched the placement of the mbMenuBar test inside the loop through parents shows some confusion as to what which mbMenuBar might be met, the one belonging to this, or that of the parent being traversed, but it does seem to be the one belonging to this. Change-Id: I0b9dceadf64f7adf18eb1aa2dbda9bbfbcb66e0a Reviewed-on: https://gerrit.libreoffice.org/65452 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-16SalGtk{File,}Picker.hxx: Add missing includesMichael Weghorn2-0/+3
Since 'XComponentContext' and 'DECL_STATIC_LINK' are used, add the corresponding includes. Otherwise a successful build depends on the header being included after other headers that make sure that compilation still works. An error could be provoked e.g. by moving the '#include <gtk/fpicker/SalGtkFilePicker.hxx>' in 'vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx' above all other existing includes. Change-Id: Ib23f8b714fb971238eab28a8d4d02414a0b13812 Reviewed-on: https://gerrit.libreoffice.org/65208 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2018-12-15tdf#116290 allow menubar to shrink past its minimum sizeCaolán McNamara1-1/+14
with a scrolledwindow with a horizontal external policy which doesn't show a scrollbar, but allows the scrolledwindow to shrink past its child size Change-Id: Ia73fc819a16bef49008e7e41bcc2d523c28268b0 Reviewed-on: https://gerrit.libreoffice.org/65171 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-13Resolves: tdf#122016 crash accessing deleted GtkSalMenuCaolán McNamara1-0/+5
Change-Id: Ib6527e17110b55251fea9f0701d0e02f6fa5a9fe Reviewed-on: https://gerrit.libreoffice.org/65092 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-12use std::<some_container>::swap, instead of copy and clearNoel Grandin1-2/+2
Change-Id: If49c33e271426ff5c2d0c6cc4010670f797bdd38 Reviewed-on: https://gerrit.libreoffice.org/65001 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann1-1/+1
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-04tdf#121855 like osx case don't search near-infinite calc grid for focusCaolán McNamara1-0/+7
Change-Id: Ie6bccd2781fbbdc5f4d5dc2eb6903191aafe8265 Reviewed-on: https://gerrit.libreoffice.org/64519 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-29Rename Mac OS X to official name macOS in comments and documentationBartosz Kosiorek1-2/+2
Change-Id: I651b7f202fa52ff5f5357a11aa72c43eb7dc7f95 Reviewed-on: https://gerrit.libreoffice.org/64102 Tested-by: Jenkins Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-11-29remove unnecessary "if (!empty()" checks before loopsNoel Grandin1-2/+2
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27vcl: fix gtk debug codeThorsten Behrens1-9/+9
Change-Id: I940e1ae01ec384069cf2704fdc81b7561e9f8d63 Reviewed-on: https://gerrit.libreoffice.org/64094 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-11-23weld SfxMacroTabPageCaolán McNamara1-1/+1
Change-Id: I167dd233c8af64e31f0e266bac5cf5b9c4658ca6 Reviewed-on: https://gerrit.libreoffice.org/63893 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-23improve function local staticsNoel Grandin1-3/+1
simplify the initialisaion and make them thread-safe i.e. initialise them using the runtime's local static locking. Thanks to mike kaganski for pointing out the nice lambda approach that makes this feasible. Change-Id: I76391189a6d0a3d7eed2d0d88d28dfa6541eaff7 Reviewed-on: https://gerrit.libreoffice.org/63645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-20coverity#1441469 silence Dereference null return valueCaolán McNamara1-1/+1
and coverity#1441468 Uninitialized pointer field coverity#1441470 Uninitialized pointer field coverity#1441467 Unchecked return value Change-Id: I485fb0b5a83838a3c4913a74b5ea3ae70b4f6bd1 Reviewed-on: https://gerrit.libreoffice.org/63663 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-15vcl: ATK: remove the hyper_link_get_object implementationMichael Stahl1-10/+3
This calls the same function as hyper_link_get_uri: getAccessibleActionObject(), which is documented to return an URL string, not an "object". Since IA2 it even *does* return an URL string, and none of the 3 implementations return an XAccessible, and there is no obvious other method to call, so just remove the non-working implementation so it doesn't print misleading exception warnings. Change-Id: Ia32aef56439a8455698011ac636be264244656b3
2018-11-08Resolves: tdf#119790 for gtk3 save and restore typed name on changing filterCaolán McNamara1-0/+9
Change-Id: I17c3d154144b13ce401b0e4afe84c91a2fe98d8e Reviewed-on: https://gerrit.libreoffice.org/63075 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>