Commit Graph

193 Commits

Author SHA1 Message Date
Matthias Clasen
b482b7d8af Bump the pango dependency
We soon want to rely on the list model apis in
pango 1.45. This commit also fixes a mixup where
using pango as a submodule would break the build
when pangoft2 is required.
2020-05-30 15:47:56 +02:00
Matthias Clasen
821a458393 Revert "Bump the pango dependency"
This reverts commit 98df0be43d.

It broke the win32 build.
2020-05-30 08:55:21 -04:00
Matthias Clasen
a39d708859 meson: Cosmetics
Treat the display backend list like other lists in the summary.
2020-05-29 15:40:34 -04:00
Matthias Clasen
98df0be43d Bump the pango dependency
We soon want to rely on the list model apis in
pango 1.45. This commit also fixes a mixup where
using pango as a submodule would break the build
when pangoft2 is required.
2020-05-29 10:53:39 -04:00
Carlos Garnacho
98f376a19e gtksearchengine: Add tracker3 search engine
Make this dependency optional at build time, and prefer it over
the old tracker <= 2.x implementation.
2020-05-19 22:05:07 +02:00
Matthias Clasen
15f7d2a27d 3.98.4 2020-05-18 16:38:11 -04:00
Benjamin Otte
14bf58ec5d x11: Remove XDamage dependency
It's not used.
2020-05-17 02:14:58 +02:00
Jan Tojnar
6d9db8610e
build: clean up .pc generation
Path concatenation is much nicer than the unwieldy format method.
Since paths returned by get_option are relative to prefix, they will be joined as before.

As a bonus, this fixes weird platforms like NixOS that actually pass absolute includedir under a different prefix.
2020-04-29 07:42:53 +02:00
Matthias Clasen
af7537ac79 3.98.3 2020-04-21 00:32:23 -04:00
Timm Bäder
dda7a850da meson: Use summary()
Instead of doing our own. Bumps the dependency to 0.53 though.
2020-04-17 15:21:00 +02:00
Timm Bäder
b8ef164c2b meson: Trivial formattting 2020-04-17 15:21:00 +02:00
Matthias Clasen
6870159c1d build: Prepare library versioning
Set version and soversion separately for the library.
When we do the 4.0 release, we will set:

gtk_soversion = '1'
gtk_library_version = '1.0.0'

See https://gitlab.gnome.org/GNOME/gtk/-/issues/1963
2020-04-14 09:15:31 -04:00
Jonas Ådahl
5425edff82 wayland: Move popups with xdg_popup.reposition
The third version of xdg-shell introduces support for explicit popup
repositioning. If available, make use of this to implement popup
repositioning.

Note that this does *NOT* include atomic parent-child state
synchronization. For that,
https://gitlab.freedesktop.org/wayland/wayland-protocols/issues/13 will
be needed.

This currently uses my own fork of wayland-protocols which adds meson
support, so that we can use it as a subproject. Eventually when
wayland-protocols' meson support lands upstream, we should change it to
point there.

Silence some meson warnings while at it to make CI happy.

This also bumps the glib requirement, since g_warning_once() is used.
2020-04-08 23:32:47 +02:00
Matthias Clasen
baeae71d12 Merge branch 'cross-postinstall' into 'master'
meson: Don't execute post-install.py if cross compiling

See merge request GNOME/gtk!1636
2020-04-06 23:59:33 +00:00
Martin Storsjö
531766fe64 meson: Don't execute post-install.py if cross compiling 2020-04-05 22:57:22 +03:00
Nirbheek Chauhan
eaef24c527 meson: Fix check for builtype arguments
`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.

For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
2020-04-03 18:41:55 +05:30
Simon McVittie
9df7f0197d supp: Use a single suppressions file for lib, lib64 and multiarch
In addition to the traditional library directory lib and the 64-bit
multilib directory lib64, this will cover Debian-style multiarch
(lib/x86_64-linux-gnu etc.), Arch Linux 32-bit (lib32), x32 and
various others.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-02 09:18:55 +01:00
Matthias Clasen
9f93464ea4 3.98.2 2020-03-31 21:09:30 -04:00
Chun-wei Fan
2f64651a3f meson.build: Fix Visual Studio builds
We need to make the C++ language available before we can access the C++
compiler object...
2020-03-31 12:00:26 +08:00
Matthias Clasen
92b50c5e2a 3.98.1 2020-03-21 21:44:23 -04:00
Matthias Clasen
72f06abd13 Require pango 1.44.4
This lets use use the insert-hyphen attribute
unconditionally.
2020-03-21 00:39:17 -04:00
Timm Bäder
73d8f6a090 build: Add -Wno-typedef-redefinition to build
Clang otherwise complains about this
2020-03-12 08:32:34 +01:00
Benjamin Otte
e356d59a92 build: Add -Wnull-dereference
Sprinkle various g_assert() around the code where gcc cannot figure out
on its own that a variable is not NULL and too much refactoring would be
needed to make it do that.

Also fix usage of g_assert_nonnull(x) to use g_assert(x) because the
first is not marked as G_GNUC_NORETURN because of course GTester
supports not aborting on aborts.
2020-03-05 08:14:37 +01:00
Benjamin Otte
f6b11a5158 build: Add more useful warning flags
I found those on the interwebs and decided they are useful.
2020-03-05 07:56:28 +01:00
Philip Chimento
e123853b8b build: Install Valgrind suppressions files
This is so that other programs linking to GTK can use GTK's suppressions
files when performing their own Valgrind analysis.

Closes: #138
2020-02-23 15:00:37 -08:00
Matthias Clasen
37a9d0620d 3.98.0 2020-02-10 15:32:19 -05:00
Chun-wei Fan
f8d3845b1a meson/MSVC builds: Use -utf-8 where available
This avoids the build from erroring out on C4819 (Unicode handling issue in
Visual Studio compiler), notably when running on Chinese, Japanese and
Korean locales.

Also apply -D_USE_MATH_DEFINES, -FImsvc_recommended_pragmas.h and -utf-8 to
the C++ compiler options as well.
2020-02-03 17:55:09 +08:00
Matthias Clasen
4e58541d52 Make wayland load cursors on demand
Copy just enough of libwayland-cursor to make our own
loading. This lets us drop the dependency on libwayland-cursor,
and changes the startup cost for cursor theme loading
from 25ms to 0.1ms.

At the same time, simplify the handling of scaled cursors -
instead of creating an array of theme objects, just make a
single theme object provide all scaled cursor sizes.
2020-01-24 17:27:45 -05:00
Chun-wei Fan
a9b1d4a389 build: Check for sincosf()
sincosf() is really a GCC-specific function that may more may not be
supported on non-GCC compilers, so we want to check for it, otherwise we
use a fallback implementation, not unlike the one in
demos/gtk-demo/gtkgears.c.
2020-01-08 17:15:29 +08:00
Emmanuele Bassi
3c11c57755 Bump up the required version of Meson
Match the one we're testing on our CI infrastructure.
2019-11-16 18:40:23 +00:00
Matthias Clasen
fa8ce17e1e build: We no longer need freetype 2019-11-01 13:01:54 -04:00
Matthias Clasen
41c52e955d Bump the pango dependency
This lets us avoid freetype uses, and simplifies
some other things as well.
2019-11-01 13:01:54 -04:00
Olivier Fourdan
060a9f072c Bump wayland-protocols requirements
The `name` and `description` events were added to `xdg-output` protocol
in version 2 which is part of wayland-protocols 1.14.

In xdg-output-v1 version 3, the `xdg-output.done` event was deprecated
and the `xdg-output.description` event was made mutable, but that
doesn't change the actual events so we do not actually need to require
that version of xdg-output from wayland-protocols 1.18.

Update the wayland-protocols requirement to the bare minimum version,
which is 1.14.

https://gitlab.gnome.org/GNOME/gtk/issues/2057
2019-07-29 12:03:07 +02:00
Matthias Clasen
4eaf860e86 meson: Rename documentation option to gtk_doc
This name is what most of the stack is using.
Lets follow along, even though it is (imo)
uglier.
2019-07-01 20:16:37 -04:00
Emmanuele Bassi
23e4d05383 build: Do not use add_global_flags()
It's almost always not what you want.
2019-06-24 15:00:21 +01:00
Benjamin Otte
22e0785802 build: Make script interpreter optional
Running the tests needs it though, so it's only optional without tests.
2019-05-30 18:34:51 +02:00
Benjamin Otte
1e0c0c0ba7 rendernodeparser: Parse cairo script
Use cairo-script-interpreter to parse the scripts that generate cairo
nodes.

This requires libcairoscriptinterpreter.so to work properly, but if
it isn't found we disable this (unimportant for normal functioning)
code and just emits a parser warning.
The testsuite requires it however or it will fail.

A new test is included that tests all of this.
2019-05-30 15:32:36 +02:00
Christian Hergert
3a0beeadc5 profiler: port GdkProfiler to sysprof-3
This uses the new sysprof-3 ABI to implement the capture writer. It also
uses the statically linked libsysprof-capture-3.a that is provided with
Sysprof for the capture writing to ensure that we do not leak any symbols
nor depend on any additional libraries.

The GTK_TRACE_FD can be used to pass a FD for tracing into Gtk. Sysprof
uses this when the Gtk instrument is selected for recording.
2019-05-29 19:02:30 -07:00
Christoph Reiter
758830e7c3 meson: allow building man pages without the documentation
The 'documentation' option also guarded the man page build. Instead
if skipping the whole docs subdir skip the specific gtkdoc calls, so that the
man page build still works.

This brings it in line with the gtk3 meson build.
2019-05-25 18:33:01 +02:00
Carlos Garnacho
f3250172a4 gdk/x11: Make XInput2 a mandatory build time dependency for x11
XInput2 is more than a decade old already, and the input improvements
there (and in every other backend really) make it untenable to have
support for X11 core input events dragging things behind.
2019-05-15 01:05:20 +02:00
Matthias Clasen
b01cf6be65 3.96 2019-05-07 03:27:04 +00:00
Emmanuele Bassi
f6594ff073 Update the version of Graphene
We're going to use newly added API soon.
2019-04-29 02:26:31 +02:00
Jonas Ådahl
477ad2505b widget: Add surface relative transform changed callback
Added two new private GtkWidget API:

 * gtk_widget_add_surface_transform_changed_callback()
 * gtk_widget_remove_surface_transform_changed_callback()

The intention is to let the user know when a widget transform relative
to the surface changes. It works by calculating the surface relative
transform during allocation, and notifying the callbacks if it changed
since last time. Each widget adds itself as a listener to its parent
widget, thus will be triggered if a parents surface relative transform
changes.
2019-04-24 14:26:24 +02:00
Benjamin Otte
dff9a5a195 build: Add new gcc error flags
These flags check for code that we don't want to write, so turn them
into error flags.

Variable length arrays should be replaced by malloc() - or explicit
alloca() calls if you know what you're doing.

Implicit fallthrough should be replaced by explicit fallthrough with the
usage of G_GNU_FALLTHROUGH.

This work inspired by Kees Cook's LCA2019 talk:
https://www.youtube.com/watch?v=FY9SbqTO5GQ
http://outflux.net/slides/2019/lca/danger.pdf
2019-04-15 14:40:25 +02:00
Benjamin Otte
0791924bf7 Convert fallthrough comments to G_GNUC_FALLTHROUGH
This way it's very obvious that fallthrough is indeed what we want.

Also bump the glib requirement to 2.59 which introduced
G_GNUC_FALLTHROUGH.
2019-04-15 14:40:25 +02:00
Benjamin Otte
a938c14d11 build: Add gtk-css static library
This library is meant to be the new CSS library that gets used from GDK,
GSK and GTK for string printing and parsing.

As a first step, move GtkCssProviderError into it.

While doing so, split it into GtkCssParserError (for critical problems)
and GtkCssParserWarning (for non-critical problems).
2019-04-12 19:34:28 +02:00
Chun-wei Fan
88086ea91a meson: Only use HarfBuzz fallback when needed
The current Meson releases have broken CMake support, meaning that it is
likely that HarfBuzz could not be located for Visual Studio builds
unless one handcrafts pkg-config files for it, which is both tedious and
error-prone.

Instead, use the existing mechanism for looking for the HarfBuzz headers
and libraries on Visual Studio first when it could not be found via
dependency(), and then use the fallback if it still could not be found.
2019-04-12 18:16:12 +08:00
Matthias Clasen
bcac81eed9 Merge branch 'wip/ebassi/align-test' into 'master'
Remove aligned allocation checks

See merge request GNOME/gtk!596
2019-03-29 22:50:10 +00:00
Benjamin Otte
1944ffe351 Revert "Bump meson req to 0.50"
This reverts commit f0845d98a2.

The commit breaks CI. CI has more power than meson telling things.
2019-03-29 10:19:41 +01:00
Chun-wei Fan
6b08227110 meson.build: Pull in fallback for PangoFT2 only when needed
On some systems PangoFT2 is optional, so we only use the fallback when
it is being required.
2019-03-29 16:50:35 +08:00