Commit Graph

50961 Commits

Author SHA1 Message Date
Matthias Clasen
a7c5f26d24 Merge branch 'wip/carlosg/tablet-cursors-hidpi' into 'gtk-3-24'
gdk/wayland: Listen to wl_surface events on tablet cursors

See merge request GNOME/gtk!759
2019-04-18 16:55:54 +00:00
Carlos Garnacho
e9757b9afc gdk/wayland: Listen to wl_surface events on tablet cursors
And update the surface accordingly (eg. scale on hidpi). The mechanism
that did that for wl_pointer has been made generic so it can be shared
with tablets too.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1675
2019-04-18 18:05:19 +02:00
Jonas Ådahl
ceeb55eac2 Merge branch 'wayland-hotspot-3' into 'gtk-3-24'
wayland: Avoid using uninitialized memory

See merge request GNOME/gtk!758
2019-04-18 14:54:02 +00:00
Matthias Clasen
ac739b2a72 wayland: Avoid using uninitialized memory
_gdk_wayland_cursor_get_buffer was not initializing
its out variables in the 'not found' case. This
was showing up in protocol traces as garbage hotspots
being sent to the compositor.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1328
2019-04-18 10:40:09 -04:00
Chun-wei Fan
983e82b750 state-record.c: Include header for write()/close()
Avoid an "implicit declaration of ..." warning/error for using
close()/write().
2019-04-18 15:06:54 +08:00
Rico Tzschichholz
0fcfa1f266 meson: Add missing files to gtk3-demo to fix build 2019-04-17 17:47:12 +02:00
Matthias Clasen
ec1e8fb20f widget-factory: Update copyright line
Update the years to 2019, and use some better typography.
2019-04-16 19:57:46 -04:00
Matthias Clasen
849b7faac8 widget-factory: Add an Inspector menu item
Just because we can.
2019-04-16 19:56:37 -04:00
Olivier Fourdan
1f64689c31 wayland: Add support for xdg-output
Previously, the GDK backend for Wayland would deduce the logical size
of the monitors from the wl_output size and scale.

With the addition of fractional scaling which advertises a larger scale
value and then scale down the client surface, the computed logical size
of the monitors in GDK would be wrong and confuse applications which
insist on using the monitor size and position (like Firefox).

The xdg-output protocol aims at describing outputs in a way which is more
in line with the concept of an output on desktop oriented systems by
presenting the outputs using their logical size and position appropriately
transformed.

Add support for the optional xdg-output protocol so that the size and
position of the monitors as reported by GDK is correct even when using
fractional scaling.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/1828
2019-04-16 16:14:24 +02:00
Timm Bäder
81c8efc863 imcontextwayland: (Hopefully) fix if expression
Backport from master: f9a5a474f0
2019-04-16 00:12:24 +02:00
Carlos Garnacho
b819fcac74 Merge branch 'event_window' into 'gtk-3-24'
gdk/wayland: Use event window to calculate coordinatess for show_window_menu()

See merge request GNOME/gtk!749
2019-04-15 17:11:05 +00:00
Robert Mader
df6ea75a04 gdk/wayland: Use event window to calculate coordinatess for show_window_menu()
The previously used window always was the xdg_toplevel window.
2019-04-14 12:26:45 +02:00
Christoph Reiter
77c1424582 meson: add tools tests 2019-04-13 13:11:23 +02:00
Christoph Reiter
014320bfb0 meson: add a11y test 2019-04-13 12:49:27 +02:00
Christoph Reiter
0f957ca4f7 meson: underscorify immodule name when using it as a macro name
This resulted in -DINCLUDE_IM_ti-et getting passed to gcc resulting in
lots of warnings. Use underscorify() so we get the correct -DINCLUDE_IM_ti_et instead.
2019-04-12 20:59:14 +02:00
Nirbheek Chauhan
6bdc1137f2 Merge branch 'fix-meson-on-macos' into 'gtk-3-24'
meson: Fix build on macOS

See merge request GNOME/gtk!735
2019-04-12 06:12:29 +00:00
Chun-wei Fan
a4410e9c01 meson.build: Clean up previous commit
Don't hardcode things, and move only deduce `current` for non-Visual
Studio builds, as it is only used there.
2019-04-12 14:01:31 +08:00
James Westman
9d9b023166 meson: Fix build on macOS
Previously, Meson failed to run on macOS. This was because a value that should
have been an array of strings was instead a single string.
2019-04-12 00:30:23 -05:00
Chun-wei Fan
f5408e5061 meson.build: Fix Visual Studio builds
Commits a04fef4 and cc7f9c4 inadvertedly broke Visual Studio builds as
it caused the following to show up when configuring:

gdk\meson.build:281:0: ERROR: Invalid Shared library version "vs9.2404.4". Must be of the form X.Y.Z where all three are numbers. Y and Z are optional.

Since we do not set a library version that mingles with the minor and
micro versions, along with libtool current for any Visual Studio builds,
just set those versions as 3 on Visual Studio builds, and things should
work the way they did before.
2019-04-12 11:29:52 +08:00
Aurimas Černius
1373bf1d76 Updated Lithuanian translation 2019-04-11 22:49:59 +03:00
Christoph Reiter
cc7f9c44e4 meson: Also add a library version for libgailutil
See a04fef4b9e
2019-04-11 21:21:50 +02:00
Emmanuele Bassi
ce86b411f8 meson: Update versions
GTK 3.24.8 was just released.
2019-04-11 19:34:06 +01:00
Emmanuele Bassi
a04fef4b9e meson: Preserve compatibility with Autotools build
The Meson build is missing the libtool versioning of the shared
libraries.
2019-04-11 19:33:25 +01:00
Chris Williams
3246d6a738 gdkframeclockidle: Don't permanently skew frame time
Since commit 3b2f9395, the frame time may be set into the future, so
only ensure monotonicity, and don't store the offset. This prevents the
frame time from becoming out of sync with g_get_monotonic_time().

Fixes #1612
2019-04-11 13:25:18 -04:00
Matthias Clasen
bcb9babc5f Merge branch 'gtk-3-24-meson' into 'gtk-3-24'
GTK 3 meson port

See merge request GNOME/gtk!716
2019-04-11 16:34:47 +00:00
Chun-wei Fan
e96c6c40f8 testsuite/gtk/builder.c: Export the needed symbols
Those symbols need to be properly exported for Visual Studio builds for
things to work properly.  Fixes the test on Visual Studio builds.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
9f1b954fff README.win32: Add instructions on Meson builds
This adds a set of instructions, notes and known issues for the
Meson builds on Windows, especially Visual Studio.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
651715b8e8 meson: Fix building with builtin immodules
We also need to ensure that we pass in -DINCLUDE_IM_xxxx when building
the GTK DLL/.so, in addition to building the respective (static)
immodules, so that we did really link in the immodules into the final
GTK DLL/.so.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
b6b15508d5 meson/MSVC: Copy xxx-3.lib to xxx-3.0.lib upon post-install
This ensures that current Visual Studio project files and NMake
Makefiles (which do not use pkg-config files) do not break with the
Meson-built GTK-3.x libraries.
2019-04-11 16:46:22 +02:00
Christoph Reiter
5aba13f62d autotools: dist gen-c-array.py and gen-rc.py 2019-04-11 16:46:22 +02:00
Christoph Reiter
749a58ab26 meson: simplify builtin_immodules build option
Make it a yes/no/auto combo. "yes" means all modules are built into libgtk,
"no" that none are and "auto" uses the platform defaults, yes on win32,
no otherwise.

If we need more we can always extend it later.
2019-04-11 16:46:22 +02:00
Christoph Reiter
3462fcf9a0 meson: Follow gnome conventions for build option names 2019-04-11 16:46:22 +02:00
Chun-wei Fan
0432b22e02 meson.build: Output DLL names similar to the MSVC projects
This makes the DLL names match those that are produced by the Visual
Studio projects by default.

This, currently, however, names the .lib files same as the ones that
are produced for other platforms (i.e. <libname>-3.lib).  This is
actually not that bad as one can just copy those .lib's into
<libname>-3.0.lib when needed and the binaries that link to those .lib's
ultimately link to the same DLLs, so this should not harm binary
compatibility.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
33589f154e meson.build: Fix generating .pc files
It may be so that Cairo is not found using pkg-config files, so we
cannot just use .name() on the Cairo deps directly.

Since we already have a similar mechanism for generating the GDK .pc
files, re-use and share that mechanism.
2019-04-11 16:46:22 +02:00
Chun-wei Fan
d2ef356f1d meson.build: MSVC-Add fallback dep search for HarfBuzz
It seems that Meson 0.50.0 broke dependency search using CMake for
HarfBuzz at least, so we add a workaround for it to look for the
HarfBuzz headers and libraries manually when we couldn't find HarfBuzz
using the pkg-config and CMake method.
2019-04-11 16:46:22 +02:00
Christoph Reiter
c5789127a7 meson: set soversion to 'vs<VSVer>' for MSVC
This should result in <libname>-vs<VSVer>.dll filenames.
2019-04-11 16:46:22 +02:00
Christoph Reiter
28833783cc meson: Various config.h related fixes
Various adjustments to make the config.h output between autotools
and meson more similar by testing on Linux and Windows/MSYS2.

Setting things to 1 instead of true and shifting things around is motivated
by reducing the diff between the generated files.
2019-04-11 16:46:22 +02:00
Christoph Reiter
2d31112a7f CI: disable building with cloudproviders; breaks tests
See #33
2019-04-11 16:46:22 +02:00
Christoph Reiter
52edd6b192 CI: install dbus-x11 for dbus-launch and iso-codes (optional build dep) 2019-04-11 16:46:22 +02:00
Christoph Reiter
940126c427 meson: fix code examples in the gtk docs build
getting_started.xml uses relative paths for including code examples
and for some reason the base path is different with meson than with autotools.

Switch both autotools and meson to generate the file and insert the absolute
source path instead.

This also cleans up the content file list: the expand content files have to
be in the content file list as well, so just append them there.
2019-04-11 16:45:37 +02:00
Christoph Reiter
8cfbf63c5a meson: static immodules: depend on generated headers 2019-04-11 16:45:37 +02:00
Christoph Reiter
068f7f7423 meson: set the soversion to just '0' everywhere
This is what glib did for the meson port, so can't be that wrong.
This also makes the DLL names match the autotools Windows DLLs.
2019-04-11 16:45:37 +02:00
Christoph Reiter
65f2fe828c meson: statically link immodules under mingw by default
To match what the autotools build does right now.
2019-04-11 16:45:37 +02:00
Christoph Reiter
b5a8bd5fe3 meson: Don't depend on meson 0.50
The install arg doesn't add anything here anyway.
2019-04-11 16:45:37 +02:00
Christoph Reiter
2445f46e01 meson: gtk docs: set ENABLE_ON_X11 2019-04-11 16:45:36 +02:00
Christoph Reiter
1d40ba250f meson: only install broadway man pages if it's enabled 2019-04-11 16:45:36 +02:00
Christoph Reiter
e47440def5 meson: Don't make the man pages build depend on the documentation option
Include all meson build files under docs/ and check with get_option() there.
2019-04-11 16:45:36 +02:00
Christoph Reiter
6a37e2d19e CI: Install sassc
In case sassc is installed the build systems will try to regenerate the css
files. This makes sure we test that code path.
2019-04-11 16:45:36 +02:00
Christoph Reiter
7391a078b3 meson: build print backends
This changes the configure option into two states:
auto: build all that can be build (default)
A list of backend names: build them and fail if we can't

"papi" is missing because it's not in Debian and I can't test it.
2019-04-11 16:45:36 +02:00
Christoph Reiter
d52dad2042 autotools: dist all meson related build files 2019-04-11 16:45:36 +02:00