Commit Graph

52057 Commits

Author SHA1 Message Date
Carlos Garnacho
02a02fac56 gdk/wayland: Mark matched settings from the portal as valid
Commit e6209de962 added some checks on TranslationEntry.valid in
order to figure out whether using the new font settings or the
old g-s-d ones. However that's only set in the non-sandboxed case.

This makes sandboxed applications fallback to the old (and also
non-existing with modern g-s-d) settings, possibly resulting in
ugly defaults being picked.

Fix this by also marking TranslationEntry elements as valid when
using the settings portal, precisely those entries that we are able
to read and match with our own table.
2021-01-14 16:09:27 +01:00
Carlos Garnacho
7ab4c9a68b Merge branch 'fix-tablet-3.24' into 'gtk-3-24'
Wayland: Fix segfault when receiving tablet/touch events for surfaces that have already been destroyed client-side

See merge request GNOME/gtk!2809
2021-01-10 13:18:15 +00:00
wisp3rwind
19a740e277 Wayland: ignore touch/tablet events on destroyed surfaces
When destroying a wl_surface (e.g. when a window or menu is closed), the
surface may continue to exist in the compositor slightly longer than on
the client side. In that case, the surface can still receive input
events, which need to be ignored gracefully.
In particular, this prevents segfaulting on wl_surface_get_user_data()
in that situation.

Reported in
https://gitlab.gnome.org/GNOME/gtk/-/issues/3296

The same issue for pointers/keyboards was reported in
https://bugzilla.gnome.org/show_bug.cgi?id=693338

and fixed with in
bfd7137ffb
3625f17857
a8fc099a72
2021-01-10 12:00:28 +01:00
Carlos Garnacho
cae5e60113 Merge branch 'avoid-pointer-reset' into 'gtk-3-24'
wayland: avoid set_cursor() when unchanged or invisible

See merge request GNOME/gtk!2822
2021-01-06 19:53:30 +00:00
Matthias Clasen
c87b21351c Merge branch 'workaround-win32-intel-blit' into 'gtk-3-24'
gdkglcontext-win32.c: Workaround Intel glBlitFramebuffer() issues

See merge request GNOME/gtk!2996
2021-01-06 16:13:02 +00:00
Matthias Clasen
f25a5f21fc Merge branch 'gtk-3-24' into 'gtk-3-24'
fix touchscreen events processing in broadway.js

See merge request GNOME/gtk!2972
2021-01-06 16:10:08 +00:00
Fran Dieguez
bda6c5ec2b Update Galician translation 2021-01-04 23:07:05 +00:00
Fabio Tomat
51cef47835 Update Friulian translation 2020-12-31 10:24:55 +00:00
Chun-wei Fan
f8b7bd6dd6 Fix 'make dist' again
The autotools pattern rules can be off-putting...
2020-12-28 22:11:08 +08:00
Źmicier Turok
72b047b084 Update Belarusian translation 2020-12-27 07:29:47 +00:00
Źmicier Turok
72eb09f8e8 Update Belarusian translation 2020-12-27 07:27:34 +00:00
Chun-wei Fan
7647208fba Try again to fix 'make dist'
It turns out that we must put Directory.Build.props in win32/vs10 and let
automake copy it over to win32/vs15/... so do that, and only dist the copy
in win32/vs15.
2020-12-24 18:10:16 +08:00
Chun-wei Fan
8f325b475b win32/Makefile-newvs.am: Fix 'make dist'
We need to account for the lack of Directory.Build.props in win32/vs10...
2020-12-24 17:05:10 +08:00
Chun-wei Fan
ac7dd63b02 Visual Studio projects: Support arm64/aarch64 builds better
Update the NMake Makefiles used for generating the various sources be able to
cope with an ARM64 build environment, and update the project files, in
particular for Visual Studio 2017 (VisualStudioVersion 15.0) so that we can
pull in the system .lib's that were somehow excluded from the default list
on ARM64 builds.

Also, add a custom Directory.Build.props in win32/vs15 so that we do not
try to build with the Windows 8.1 SDK by defualt, which is not ready for ARM64
builds, but instead uses the appropriate Windows 10 SDK that supports this.

Update the README.win32 file to give people instructions on how ARM64 builds
can be carried out.
2020-12-24 16:27:58 +08:00
Chun-wei Fan
a7b93d62d5 Visual Studio Projects: Improve search for Harfbuzz headers
Look in the include/harfbuzz directory that is under the pre-defined prefix
directory, as Pango 1.44.x and later pulled in HarfBuzz headers for all builds
2020-12-24 13:57:28 +08:00
Chun-wei Fan
985e17772b Visual Studio projects: Do not hardcode gdbus-codegen path
Instead, use the $(GDBUS_CODEGEN) NMake Makefile variable, so that it may be
overridden if needed
2020-12-24 13:48:36 +08:00
Danial Behzadi
856fb75413 Update Persian translation 2020-12-23 15:23:18 +00:00
Emmanuele Bassi
138f104fa4 Merge branch '324.c89' into 'gtk-3-24'
Fix gtk-3-24 builds on older C89-esque compilers

See merge request GNOME/gtk!2995
2020-12-23 13:45:28 +00:00
Chun-wei Fan
79e512ab0b gdkglcontext-win32.c: Workaround Intel glBlitFramebuffer() issues
Intel OpenGL drivers have an issue where the results of a series of
glBlitFramebuffer() can delay updating the display, when we use GDK_GL=always,
which is manifested when attempting to enter text in text boxes.

This attempts to work around this issue by requiring a glFlush() call and a
retry to the same glBlitFramebuffer() calls to avoid delays in keystrokes when
using GDK_GL=always and when not using libANGLE OpenGL/ES emulation, when an
Intel OpenGL driver is being used.

Special thanks to Lukas K. for the analysis and coming up with a workaround,
which this patch builds upon.

Fixes issue 3487
2020-12-23 19:01:31 +08:00
Chun-wei Fan
91343251b9 gtk/fallback-c89.c: Add fallback for fmin()
fmin() is a function that is introduced with C99/C++11, so check for the
presence of it and provide a simple implementation for it if it does not
exist.

Also update the config.h.win32.in template accordingly, since this
function is provided on Visual Studio 2013 or later.
2020-12-23 12:52:19 +08:00
Chun-wei Fan
ecd6b0b9a4 gtk/gtkscrolledwindow.c: Declare variables at top-of-block
This way, the code can be built on C89-esque compilers.
2020-12-23 11:24:34 +08:00
Chun-wei Fan
de6498f18c Visual Studio: Use G_ENABLE_DEBUG for all builds
This way, we can enable the built binaries to print out diagnostic
messages as needed by the values we set via the envvar GDK_DEBUG.

The release configs of the Visual Studio project files follow the
settings of Meson's `debugoptimized` build settings.
2020-12-23 10:46:58 +08:00
Matthias Clasen
f89aeecc4f Merge branch 'cursor-aspect-ratio-gtk3' into 'gtk-3-24'
Cursor aspect ratio fixes for gtk 3

See merge request GNOME/gtk!2965
2020-12-21 19:26:39 +00:00
sicklylife
eec24a0982 Update Japanese translation 2020-12-20 08:02:07 +00:00
sicklylife
a4ab1cfebe Update Japanese translation 2020-12-20 07:57:27 +00:00
Maxim Zakharov
ba845fa7b2 fix touchscreen events processing in broadway.js
Makes event listeners active explicitly if supported; corrects
handling for deleted surfaces preventing javascript errors in
accessing deleted objects; makes event identifiers unique for
broadwayd when executing in Chrome on Android.

Partially fixes #1493
2020-12-18 12:22:47 +11:00
Sebastian Keller
2a89189f1a textview: Use correct aspect ratio when invaldiating cursor
The size of the cursor depends on either the gtk-cursor-aspect-ratio
GtkSetting or as of the previous commit on the GtkSetting or the
cursor-aspect-ratio style property. GtkTextView was only considering the
style property.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/3441
2020-12-16 20:49:39 +01:00
Sebastian Keller
0165cce645 stylecontext: Add style property fallback for gtk-cursor-aspect-ratio
The gtk-cursor-aspect-ratio GtkSetting was only recently introduced and
replaced the cursor-aspect-ratio style property. This was causing old
configurations that used CSS to modify this property to no longer apply.
This commit introduces a fallback from the GtkSetting to the style
property if the value of the setting is unchanged.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/3441
2020-12-16 20:49:39 +01:00
Sebastian Keller
6c5489ab25 settings: Support loading float values from keyfiles
The gtk-cursor-aspect-ratio property got added as a float property.
However there is no parser for float values from keyfiles which meant
that it could not be changed from settings.ini.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3441
2020-12-16 20:49:39 +01:00
Emmanuele Bassi
b933d57632 Merge branch 'pixbuf-from-surface-leak' into 'gtk-3-24'
gdkpixbuf-drawable: Free the pixbuf on Cairo error

See merge request GNOME/gtk!2952
2020-12-14 15:40:12 +00:00
Adrien Plazas
c4f8eb7ec9 gdkpixbuf-drawable: Free the pixbuf on Cairo error
This avoids leaking the pixbuf.
2020-12-14 16:18:45 +01:00
Jordi Mas
7208c97c7d Update Catalan translation 2020-12-10 16:06:18 +01:00
Matthias Clasen
69e7ab649c Merge branch 'fix-gtk-nautilus-typo' into 'gtk-3-24'
[Gtk3] GtkNativeDialog: Fix a typo in the docs

See merge request GNOME/gtk!2930
2020-12-08 03:21:26 +00:00
Phaedrus Leeds
59dfeaceff GtkNativeDialog: Fix a typo in the docs 2020-12-07 17:17:39 -08:00
Matthias Clasen
de8329b3ce 3.24.24 2020-12-05 19:49:26 -05:00
Emmanuele Bassi
4d410489c5 Merge branch 'notebookpage_child' into 'gtk-3-24'
gtknotebookpageaccessible: do not fallback to child accessible for extents

See merge request GNOME/gtk!2924
2020-12-05 00:03:57 +00:00
Samuel Thibault
4ffe5a4954 gtknotebookpageaccessible: do not fallback to child accessible for extents
When the notebook page does not have a label, it should not fallback to
asking its child accessible for extent, since the child might be asking
exactly the converse when it is a socket, thus getting in an infinite
loop. When the page does not have a label, is does not really make sense to
give it an extent anyway.

Fixes atk#18
2020-12-05 00:34:32 +01:00
Carlos Garnacho
850a086adb Merge branch 'wip/exalm/accumulate-scrolling-backport' into 'gtk-3-24'
scrolledwindow: Accumulate velocity with kinetic scrolling

See merge request GNOME/gtk!2818
2020-12-01 13:14:40 +00:00
Kjartan Maraas
76b7f2704c Update Norwegian Bokmål translation 2020-11-30 14:02:18 +00:00
Daniel Șerbănescu
b8af685a43 Update Romanian translation 2020-11-20 09:27:14 +00:00
Milo Casagrande
50c4fbff72 Update Italian translation 2020-11-16 08:50:42 +00:00
Matthias Clasen
0bbe4150a8 Merge branch 'button-fill-var-removal-gtk3' into 'gtk-3-24'
Adwaita: Stop using $button_fill (for gtk-3-24)

See merge request GNOME/gtk!2829
2020-11-15 13:45:57 +00:00
nana-4
6da446c1be Adwaita: Stop using $button_fill
The $button_fill hack for button.circular is pretty awkward and is
currently broken. Instead of relying on it, allow the button() mixin to
have an additional background-image optionally.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3354
2020-11-14 13:21:25 +09:00
Jordi Mas
8f44694d2c Update Catalan translation 2020-11-13 20:24:15 +01:00
wisp3rwind
cf7f7df10c wayland: avoid set_cursor() when unchanged or invisible
In pointer_surface_update_scale(), only rescale the cursor surface when
the scale has actually changed and the cursor is on at least one output.

fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3350

Right now, this issue is not completely understood, so it might also
involve some questionable handling of cursor surface by sway/wlroots.

However, irrespective of that issue, this patch avoids unnecessary calls to the
compositor, and there should be no drawback: Whenever the pointer enters
a new output, pointer_surface_update_scale() will be called again, such
that correct scaling of the cursor is still ensured.

There is a slight difference: When the cursor leaves the last output,
previously the image was reset to scale factor 1. Now, it keeps whatever
was last. That might be more sensible than the previous behaviour,
assuming that it's likely that when the cursor enter an output again, it
has the same scaling. Alternatively, if one cares about resource usage
at this level, it might make more sense to destroy the surface then
rescaling to 1.
2020-11-13 16:20:02 +01:00
Chris Lord
1d62a010ef scrolledwindow: Accumulate velocity with kinetic scrolling
Accumulate existing velocity when decelerating from a swipe if the swipe
velocity is above a certain fraction of that existing velocity.
2020-11-12 18:56:14 +05:00
Jakub Steiner
46cf2849d2 Merge branch 'wip/jimmac/sass-fixes-and-render-css' into 'gtk-3-24'
Adwaita: !global vars no longer in sass

See merge request GNOME/gtk!2815
2020-11-12 12:26:16 +00:00
Jakub Steiner
811c7f2266 Adwaita: !global vars no longer in sass
- render changes from dab79f5d77
2020-11-12 13:05:45 +01:00
Jakub Steiner
a84b41abfd Merge branch 'treeview-header-button-border-css' into 'gtk-3-24'
Highlight treeview header button border with more contrasting color on hover

See merge request GNOME/gtk!2467
2020-11-12 09:23:06 +00:00
crvi
dab79f5d77 Adwaita: Make treeview header button borders more visible
The existing treeview header button border in GTK3 is close to
invisible. The preferred way to find the border for a treeview column
is to hover the mouse near the beginning of the header button text
expecting the default cursor to switch to 'col-resize' cursor. This
works only when all column headers in the view are left aligned. After
adding a few numeric columns to the view, whose headers are right
aligned, it becomes really hard to find the location of the border
between a left aligned and right aligned column header.

This change addresses the issue by using high contrast colors for
borders of treeview header button - in line with the colors used in
Adwaita theme in GTK4.

See merge request GNOME/gtk!2467
2020-11-12 01:37:03 +05:30