gtk4.git
3 years agoUpdate Georgian translation
Zurab Kargareteli [Sat, 20 Aug 2022 07:37:42 +0000 (07:37 +0000)]
Update Georgian translation

3 years agoMerge branch 'fix-emojichooser-keynav' into 'main'
Matthias Clasen [Fri, 19 Aug 2022 20:12:51 +0000 (20:12 +0000)]
Merge branch 'fix-emojichooser-keynav' into 'main'

emojichooser: Fix arrow keynav

Closes #5076

See merge request GNOME/gtk!4967

3 years agoemojichooser: Fix arrow keynav
Matthias Clasen [Fri, 19 Aug 2022 19:55:10 +0000 (15:55 -0400)]
emojichooser: Fix arrow keynav

When some of the Emoji have been filtered out by
a search term, arrow keynav would behave oddly and
get stuck in invisible sections. Fix this by ignoring
any filtered out children when moving between
sections for arrow keynav.

Fixes: #5076
3 years agoMerge branch 'mingw' into 'main'
Matthias Clasen [Fri, 19 Aug 2022 11:06:10 +0000 (11:06 +0000)]
Merge branch 'mingw' into 'main'

Cross-building with mingw & fixes

See merge request GNOME/gtk!4341

3 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Fri, 19 Aug 2022 01:08:59 +0000 (01:08 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

gdk: Plug a memleak

Closes #5110

See merge request GNOME/gtk!4964

3 years agogdk: Plug a memleak
Benjamin Otte [Fri, 19 Aug 2022 00:38:11 +0000 (02:38 +0200)]
gdk: Plug a memleak

Free GdkIOPipe struct when freeing it
Don't just free all its members.

Fixes #5110

3 years agoMerge branch 'treeview-search-focus' into 'main'
Matthias Clasen [Thu, 18 Aug 2022 23:51:02 +0000 (23:51 +0000)]
Merge branch 'treeview-search-focus' into 'main'

treeview: Always call grab_focus_without_selecting on search entry

Closes #4551

See merge request GNOME/gtk!4961

3 years agoMerge branch 'remove-msys2-ci-subproject-workaround' into 'main'
Luca Bacci [Thu, 18 Aug 2022 18:40:05 +0000 (18:40 +0000)]
Merge branch 'remove-msys2-ci-subproject-workaround' into 'main'

CI: remove workaround for some subproject builds failing on Windows

See merge request GNOME/gtk!4923

3 years agoMerge branch 'wip/carlosg/im-fixes' into 'main'
Matthias Clasen [Thu, 18 Aug 2022 17:58:26 +0000 (17:58 +0000)]
Merge branch 'wip/carlosg/im-fixes' into 'main'

gtkimcontextwayland: Refactor handling of client updates

Closes #5106 and #5105

See merge request GNOME/gtk!4962

3 years agogtkimcontextwayland: Refactor handling of client updates
Carlos Garnacho [Wed, 17 Aug 2022 22:58:38 +0000 (00:58 +0200)]
gtkimcontextwayland: Refactor handling of client updates

Currently, the wayland IM context sends zwp_text_input_v3.commit from
a number of places, and some of them with partial data. In order to
make client state updates "atomic" and complete, make the communication
happen over an unified notify_im_change() function that happens on
a narrower set of circumstances:

  - The GtkIMContext is reset
  - The GtkIMContext is just focused
  - The gesture to invoke the OSK is triggered
  - The IM context is reacting to changes coming from the compositor

Notably, setting the cursor location or the surrounding text do not try
to commit state on their own, and now will be flushed with the corresponding
IM update or reset. But also, these requests won't be prevented from
happening individually on serial mismatch, instead it will be the whole
state commit which is held off.

With these changes in place, all client-side updates are notified
atomically to the compositor under a single .commit request.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5106
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5105
3 years agogtktextview: Shuffle the places doing IM reset
Carlos Garnacho [Wed, 17 Aug 2022 22:58:14 +0000 (00:58 +0200)]
gtktextview: Shuffle the places doing IM reset

During text widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.

Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.

Also, fix a bug during GtkEventControllerKey::im-update where the condition
on cursor position editability to reset the IM context was inverted.

3 years agotreeview: Always call grab_focus_without_selecting on search entry
Mat [Thu, 18 Aug 2022 15:03:04 +0000 (18:03 +0300)]
treeview: Always call grab_focus_without_selecting on search entry

The search text entry is always a GtkText widget, not GtkEntry. If a
custom search entry is set, this part of the code is never reached.

Fixes #4551

3 years agoci: add fedora-mingw64 job
Marc-André Lureau [Thu, 6 Jan 2022 12:01:40 +0000 (16:01 +0400)]
ci: add fedora-mingw64 job

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agobuild-sys: fix linker warning on win32
Marc-André Lureau [Thu, 18 Aug 2022 07:44:32 +0000 (11:44 +0400)]
build-sys: fix linker warning on win32

[196/296] Linking target testsuite/gtk/builder.exe
/usr/lib/gcc/x86_64-w64-mingw32/11.2.1/../../../../x86_64-w64-mingw32/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
3 years agogtktext: Shuffle the places doing IM reset
Carlos Garnacho [Wed, 17 Aug 2022 22:55:30 +0000 (00:55 +0200)]
gtktext: Shuffle the places doing IM reset

During text widget manipulation (inserting or deleting text via keyboard)
the IM context is reset somewhat early, before the actual change took place.
This makes IM lag behind in terms of surrounding text and cursor position.

Shuffle these IM reset calls so that they happen after the changes, and
ensure that the IM is actually reset, since that is currently toggled on
a pretty narrow set of circumstances.

3 years agoMerge branch 'wip/smcv/rej' into 'main'
Matthias Clasen [Tue, 16 Aug 2022 12:28:46 +0000 (12:28 +0000)]
Merge branch 'wip/smcv/rej' into 'main'

demos: Remove detritus from a patch not applying cleanly

See merge request GNOME/gtk!4957

3 years agodemos: Remove detritus from a patch not applying cleanly
Simon McVittie [Tue, 16 Aug 2022 07:32:45 +0000 (08:32 +0100)]
demos: Remove detritus from a patch not applying cleanly

I assume this was committed by mistake. It isn't used, and some
packaging systems will automatically remove it during `clean`.

Signed-off-by: Simon McVittie <smcv@debian.org>
3 years agoUpdate Catalan translation
Jordi Mas [Mon, 15 Aug 2022 21:57:15 +0000 (23:57 +0200)]
Update Catalan translation

3 years agoMerge branch 'overshoot-win32-fix' into 'main'
Luca Bacci [Mon, 15 Aug 2022 21:33:19 +0000 (21:33 +0000)]
Merge branch 'overshoot-win32-fix' into 'main'

GdkWin32: Support high resolution scroll wheel events

See merge request GNOME/gtk!4950

3 years agoMerge branch 'gtktreeview-adjustment' into 'main'
Matthias Clasen [Sun, 14 Aug 2022 22:40:32 +0000 (22:40 +0000)]
Merge branch 'gtktreeview-adjustment' into 'main'

treeview: Do not set top row adjustment value while animating

Closes #4550

See merge request GNOME/gtk!4940

3 years agoMerge branch 'treeview-widget-coords' into 'main'
Matthias Clasen [Sun, 14 Aug 2022 22:39:21 +0000 (22:39 +0000)]
Merge branch 'treeview-widget-coords' into 'main'

treeview: Use widget coordinates where required

See merge request GNOME/gtk!4939

3 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Sun, 14 Aug 2022 21:19:48 +0000 (21:19 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

listitemwidget: Actually unref the listitems

Closes #5102

See merge request GNOME/gtk!4955

3 years agolistitemwidget: Actually unref the listitems
Benjamin Otte [Sun, 14 Aug 2022 20:55:27 +0000 (22:55 +0200)]
listitemwidget: Actually unref the listitems

Fixes #5102

3 years agoGdkWin32: Support high resolution scroll wheel events
Ricardo Maia Louro [Sun, 14 Aug 2022 17:27:03 +0000 (18:27 +0100)]
GdkWin32: Support high resolution scroll wheel events

3 years agoUpdate Polish translation
Piotr Drąg [Sun, 14 Aug 2022 13:24:39 +0000 (15:24 +0200)]
Update Polish translation

3 years agoMerge branch 'fix-gears-leak' into 'main'
Matthias Clasen [Sat, 13 Aug 2022 21:42:35 +0000 (21:42 +0000)]
Merge branch 'fix-gears-leak' into 'main'

gtk4-demo: Fix a memory leak

See merge request GNOME/gtk!4954

3 years agogtk4-demo: Fix a memory leak
Matthias Clasen [Sat, 13 Aug 2022 21:27:40 +0000 (17:27 -0400)]
gtk4-demo: Fix a memory leak

The gears demo was leaking its vertices.

3 years agoMerge branch 'wayland-cursor-texture-leak' into 'main'
Matthias Clasen [Sat, 13 Aug 2022 17:35:56 +0000 (17:35 +0000)]
Merge branch 'wayland-cursor-texture-leak' into 'main'

wayland: Avoid leaking cursor textures

See merge request GNOME/gtk!4953

3 years agowayland: Avoid leaking cursor textures
Matthias Clasen [Sat, 13 Aug 2022 17:19:49 +0000 (13:19 -0400)]
wayland: Avoid leaking cursor textures

When we fall back to the default cursor and load it
from a resource, we need to free the texture.

3 years agoMerge branch 'inscription-leak-fixes' into 'main'
Matthias Clasen [Sat, 13 Aug 2022 00:49:33 +0000 (00:49 +0000)]
Merge branch 'inscription-leak-fixes' into 'main'

inscription: Plug a memory leak

See merge request GNOME/gtk!4952

3 years agoinscription: Plug a memory leak
Matthias Clasen [Sat, 13 Aug 2022 00:02:58 +0000 (20:02 -0400)]
inscription: Plug a memory leak

PangoFontMetrics also need to be freed.

3 years agoinscription: Plug a memory leak
Matthias Clasen [Sat, 13 Aug 2022 00:01:34 +0000 (20:01 -0400)]
inscription: Plug a memory leak

PangoLayoutIter needs to be freed.

3 years agoMerge branch 'fix-cups-backend-leak' into 'main'
Matthias Clasen [Fri, 12 Aug 2022 23:00:44 +0000 (23:00 +0000)]
Merge branch 'fix-cups-backend-leak' into 'main'

Add more valgrind suppressions

See merge request GNOME/gtk!4951

3 years agocups printbackend: Plug memory leaks
Matthias Clasen [Fri, 12 Aug 2022 22:44:25 +0000 (18:44 -0400)]
cups printbackend: Plug memory leaks

This loop has many early exits, and all of them
need to free this info object that gets allocated
at the beginning.

3 years agoAdd more valgrind suppressions
Matthias Clasen [Fri, 12 Aug 2022 16:43:26 +0000 (12:43 -0400)]
Add more valgrind suppressions

This gets all GQuark functions out of the logs.

3 years agoMerge branch 'fix-a11y-leak' into 'main'
Matthias Clasen [Fri, 12 Aug 2022 16:17:48 +0000 (16:17 +0000)]
Merge branch 'fix-a11y-leak' into 'main'

a11y: Fix a memory leak

See merge request GNOME/gtk!4949

3 years agoa11y: Fix a memory leak
Matthias Clasen [Fri, 12 Aug 2022 16:01:42 +0000 (12:01 -0400)]
a11y: Fix a memory leak

We need to free the queued context list in dispose
if we didn't get to register the contexts, and we also
need to free the list properly when we do get to
register them.

This showed up in valgrind as leaked GList structs.

3 years agoUpdate Croatian translation
Goran Vidović [Fri, 12 Aug 2022 14:33:14 +0000 (14:33 +0000)]
Update Croatian translation

3 years agoUpdate Croatian translation
Goran Vidović [Fri, 12 Aug 2022 14:25:29 +0000 (14:25 +0000)]
Update Croatian translation

3 years agoUpdate Croatian translation
Goran Vidović [Fri, 12 Aug 2022 14:22:10 +0000 (14:22 +0000)]
Update Croatian translation

3 years agoUpdate Georgian translation
Zurab Kargareteli [Fri, 12 Aug 2022 03:32:05 +0000 (03:32 +0000)]
Update Georgian translation

3 years agoMerge branch 'fix-leak' into 'main'
Matthias Clasen [Fri, 12 Aug 2022 00:09:15 +0000 (00:09 +0000)]
Merge branch 'fix-leak' into 'main'

gtk/css: data_url_path fix leak in error path

See merge request GNOME/gtk!4947

3 years agogtk/css: data_url_path fix leak in error path
Pablo Correa Gómez [Thu, 11 Aug 2022 23:33:39 +0000 (01:33 +0200)]
gtk/css: data_url_path fix leak in error path

Fixes 7900032f3067166502978413ed2447c68dc83771

3 years ago4.7.2
Matthias Clasen [Wed, 10 Aug 2022 18:27:54 +0000 (14:27 -0400)]
4.7.2

3 years agoMerge branch 'improve-css-test' into 'main'
Matthias Clasen [Thu, 11 Aug 2022 11:58:04 +0000 (11:58 +0000)]
Merge branch 'improve-css-test' into 'main'

css: Propagate charset conversion errors

See merge request GNOME/gtk!4943

3 years agotests: Check the error first
Matthias Clasen [Thu, 11 Aug 2022 11:18:39 +0000 (07:18 -0400)]
tests: Check the error first

The error contains useful information when
things fail, so check it first to get useful
output in case of failure.

3 years agocss: Propagate charset conversion errors
Matthias Clasen [Thu, 11 Aug 2022 11:17:55 +0000 (07:17 -0400)]
css: Propagate charset conversion errors

Lets not throw away informtation that
helps to figure out why things fail.

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Wed, 10 Aug 2022 17:57:55 +0000 (17:57 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

jpeg loader: Limit memory consumption

See merge request GNOME/gtk!4942

3 years agojpeg loader: Limit memory consumption
Matthias Clasen [Wed, 10 Aug 2022 17:25:17 +0000 (13:25 -0400)]
jpeg loader: Limit memory consumption

This will prevent stupid oom situations with pathological
jpeg files, without affecting our ability to load reasonable
images.

3 years agoMerge branch 'jx/hi-res-scrolling' into 'main'
Matthias Clasen [Wed, 10 Aug 2022 16:51:55 +0000 (16:51 +0000)]
Merge branch 'jx/hi-res-scrolling' into 'main'

High-resolution scroll wheel support

See merge request GNOME/gtk!3839

3 years agoci: Disable -Werror on wayland submodule
Carlos Garnacho [Wed, 10 Aug 2022 14:35:28 +0000 (16:35 +0200)]
ci: Disable -Werror on wayland submodule

CI is mostly interested in GTK not introducing compiler warnings, other
submodules like Wayland might have their own and that shouldn't hinder
CI testing of GTK.

Disable -Werror for the wayland submodule, and let it be fixed independently
at some point.

3 years agogtkeventcontrollerscroll: Always accumulate discrete deltas
José Expósito [Mon, 20 Sep 2021 18:00:04 +0000 (20:00 +0200)]
gtkeventcontrollerscroll: Always accumulate discrete deltas

When GTK_EVENT_CONTROLLER_SCROLL_DISCRETE is set, accumulate deltas also
for mouse scroll so a high-resolution mouse wheel click behaves in the
in the same manner as a low-resolution mouse wheel click.

3 years agogdk/x11: Handle high-resolution scroll events
José Expósito [Mon, 20 Sep 2021 18:00:04 +0000 (20:00 +0200)]
gdk/x11: Handle high-resolution scroll events

3 years agogdk/wayland: Handle high-resolution scroll events
José Expósito [Mon, 20 Sep 2021 17:59:58 +0000 (19:59 +0200)]
gdk/wayland: Handle high-resolution scroll events

Starting with the Wayland protocol wl_pointer >= 8, discrete axis
events have been deprecated in favour of high-resolution scroll event.

Add a listener for high-resolution scroll events and, for backwards
compatibility, handle discrete events as discrete*120.

3 years agogdk/wayland: Calculate discrete scroll direction in its helper
José Expósito [Mon, 20 Sep 2021 17:59:52 +0000 (19:59 +0200)]
gdk/wayland: Calculate discrete scroll direction in its helper

Refactor, no functional changes.

3 years agogdk/events: Set discrete scroll deltas in its constructor
José Expósito [Mon, 20 Sep 2021 17:59:45 +0000 (19:59 +0200)]
gdk/events: Set discrete scroll deltas in its constructor

Instead of calculating the discrete scroll deltas in
GtkEventControllerScroll, move that code to the event constructor and
access the precalculated values using gdk_scroll_event_get_deltas.

Refactor, no functional changes.

3 years agogdk/events: Add constructor for high-resolution scroll events
José Expósito [Mon, 20 Sep 2021 17:59:35 +0000 (19:59 +0200)]
gdk/events: Add constructor for high-resolution scroll events

Starting with Linux Kernel v5.0 two new axes are available for
mice that support high-resolution wheel scrolling: REL_WHEEL_HI_RES and
REL_HWHEEL_HI_RES.

Both axes send data in fractions of 120 where each multiple of 120
amounts to one logical scroll event. Fractions of 120 indicate a wheel
movement less than one detent.

The 120 magic number is a copy of the Windows API, so this new
constructor can be used both in Linux >= 5.0 and Windows >= Vista.

3 years agobuild: Update Wayland to >= 1.21.0
José Expósito [Mon, 18 Jul 2022 17:04:10 +0000 (19:04 +0200)]
build: Update Wayland to >= 1.21.0

3 years agoUpdate Catalan translation
Jordi Mas [Wed, 10 Aug 2022 12:27:44 +0000 (14:27 +0200)]
Update Catalan translation

3 years agoMerge branch 'rounded-clip-node-new-transfer-full' into 'main'
Emmanuele Bassi [Wed, 10 Aug 2022 09:23:02 +0000 (09:23 +0000)]
Merge branch 'rounded-clip-node-new-transfer-full' into 'main'

Mark gsk_rounded_clip_node_new() return value as (transfer full)

See merge request GNOME/gtk!4941

3 years agoMark gsk_rounded_clip_node_new() return value as (transfer full)
Sebastian Dröge [Wed, 10 Aug 2022 08:07:51 +0000 (11:07 +0300)]
Mark gsk_rounded_clip_node_new() return value as (transfer full)

Like all the other constructors for nodes already do. Without this,
newly created rounded clip nodes are leaked in bindings.

3 years agotreeview: Do not set top row adjustment value while animating
Mat [Wed, 10 Aug 2022 05:26:02 +0000 (08:26 +0300)]
treeview: Do not set top row adjustment value while animating

gtk_tree_view_top_row_to_dy, which is called from GtkTreeView's
size_allocate function, changes the adjustment value. Since this
conflicts with the animation when changing the active row, bail
out until the animation is finished.

Fixes #4550

3 years agotreeview: Use widget coordinates where required
Mat [Wed, 10 Aug 2022 01:09:48 +0000 (04:09 +0300)]
treeview: Use widget coordinates where required

When a GtkTreeView scrolled horizontally, it was not possible to
select rows outside the initial area due to an erroneous comparison
between widget and bin window coordinates.

Original change to widget coordinates occurred in commit
a0de570e47228094f430fcade4e6f56eb75bd8f5

3 years agoMerge branch 'gbsneto/paned-focus-infloop' into 'main'
Carlos Garnacho [Tue, 9 Aug 2022 18:26:48 +0000 (18:26 +0000)]
Merge branch 'gbsneto/paned-focus-infloop' into 'main'

paned: Protect against NULL variable

Closes #5094

See merge request GNOME/gtk!4938

3 years agoMerge branch 'wip/carlosg/fix-crossing-on-unmap' into 'main'
Matthias Clasen [Tue, 9 Aug 2022 18:15:41 +0000 (18:15 +0000)]
Merge branch 'wip/carlosg/fix-crossing-on-unmap' into 'main'

gtkwindow: Use pointer-oriented function to deal with crossing events

Closes #5094

See merge request GNOME/gtk!4937

3 years agogtkwindow: Use pointer-oriented function to deal with crossing events
Carlos Garnacho [Tue, 9 Aug 2022 16:49:35 +0000 (18:49 +0200)]
gtkwindow: Use pointer-oriented function to deal with crossing events

Commit adba0b97 fixed missed pointer crossings by using a helper function that
was already present and looked like did everything that was needed. However
this function was oriented to keyboard focus and it also did update the related
widget state. Doing these changes on pointer-based crossing was misuse, and
could cause weird interactions with keyboard focus management.

Fix this by using gtkmain.c gtk_synthesize_crossing_event() that is in fact
oriented to pointers.

Fixes: adba0b97 (gtkwindow: Synthesize pointer crossing events on state changes)
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5094
3 years agopaned: Warn if child is not actually a child
Georges Basile Stavracas Neto [Tue, 9 Aug 2022 17:20:25 +0000 (14:20 -0300)]
paned: Warn if child is not actually a child

This will at least allow us to debug this in the future.

3 years agogtkmain: Pass coordinates when synthesizing pointer events
Carlos Garnacho [Tue, 9 Aug 2022 16:47:14 +0000 (18:47 +0200)]
gtkmain: Pass coordinates when synthesizing pointer events

Instead of passing an event and figuring out coordinates from it, pass
directly the toplevel coordinates so that we can use this outside event
handling.

All callers have been updated to pass the coordinates, in practical effects
they were already based on the GtkNative.

3 years agopaned: Protect against NULL variable
Georges Basile Stavracas Neto [Tue, 9 Aug 2022 16:11:01 +0000 (13:11 -0300)]
paned: Protect against NULL variable

The inner loop in gtk_paned_set_focus_child() tries to find the
topmost GtkPaned, however, if the `w` variable ends up becoming
NULL after bubbling up the entire GtkWidget hierarchy, this loop
never breaks.

Check for NULL in this loop.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/5094

3 years agoUpdate Indonesian translation
Kukuh Syafaat [Tue, 9 Aug 2022 02:12:09 +0000 (02:12 +0000)]
Update Indonesian translation

3 years agoUpdate Occitan translation
Quentin PAGÈS [Mon, 8 Aug 2022 20:49:35 +0000 (20:49 +0000)]
Update Occitan translation

3 years agoMerge branch 'wip/exalm/multiplier' into 'main'
Carlos Garnacho [Mon, 8 Aug 2022 12:00:15 +0000 (12:00 +0000)]
Merge branch 'wip/exalm/multiplier' into 'main'

scrolledwindow: Lower the scroll multiplier

See merge request GNOME/gtk!4933

3 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 8 Aug 2022 10:42:06 +0000 (12:42 +0200)]
Updated Spanish translation

3 years agoscrolledwindow: Lower the scroll multiplier
Alexander Mikhaylenko [Sun, 7 Aug 2022 20:03:51 +0000 (00:03 +0400)]
scrolledwindow: Lower the scroll multiplier

c68247f63ba1db8849eb1679e53a64f7f2633973 introduced a scroll multiplier,
intended to be significantly lower than the GTK 4.6 behavior but higher
than 1. However, it was _higher_ than 4.6, since 4.6 also had a permanent
1/10 multiplier in GDK, so the cited multiplier values were really 6.4 and
9.7.

3 years agoMerge branch 'build-fix-glib-2.66' into 'main'
Matthias Clasen [Sun, 7 Aug 2022 19:09:04 +0000 (19:09 +0000)]
Merge branch 'build-fix-glib-2.66' into 'main'

build: fix for use with glib 2.66.0 (2nd try)

See merge request GNOME/gtk!4932

3 years agoMerge branch 'wip/carlosg/scroll-overshoot' into 'main'
Matthias Clasen [Sun, 7 Aug 2022 19:01:25 +0000 (19:01 +0000)]
Merge branch 'wip/carlosg/scroll-overshoot' into 'main'

gtk/scrolledwindow: Check for overshoot setting up kinetic scroll helpers

Closes #4784

See merge request GNOME/gtk!4909

3 years agoApply 1 suggestion(s) to 1 file(s)
Emmanuele Bassi [Sun, 7 Aug 2022 18:54:19 +0000 (18:54 +0000)]
Apply 1 suggestion(s) to 1 file(s)

3 years agogtk/scrolledwindow: Check for overshoot setting up kinetic scroll helpers
Carlos Garnacho [Fri, 29 Jul 2022 18:34:55 +0000 (20:34 +0200)]
gtk/scrolledwindow: Check for overshoot setting up kinetic scroll helpers

We may have situations where velocity is 0/0, but are overshooting. Places where
this happens are mouse wheels, and continuous scroll that ended up still before
finish. In this situation we also want to run the animation for overshoot, so
check for the corresponding axes to also set up the kinetic scroll helper.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4784
3 years agoMerge branch 'wip/carlosg/fixes' into 'main'
Matthias Clasen [Sun, 7 Aug 2022 18:06:28 +0000 (18:06 +0000)]
Merge branch 'wip/carlosg/fixes' into 'main'

Some fixes

Closes #2877 and #5003

See merge request GNOME/gtk!4929

3 years agoMerge branch 'clipboard-seg2' into 'main'
Emmanuele Bassi [Sun, 7 Aug 2022 16:21:40 +0000 (16:21 +0000)]
Merge branch 'clipboard-seg2' into 'main'

x11: Don't assume valid type

See merge request GNOME/gtk!4912

3 years agogtkscrolledwindow: Add fixed multiplier to scroll events in surface units
Carlos Garnacho [Fri, 5 Aug 2022 15:13:28 +0000 (17:13 +0200)]
gtkscrolledwindow: Add fixed multiplier to scroll events in surface units

The expected configurability is not going to arrive yet from compositors, and
it is precipitate for GTK to gain any configurability. We do know a factor of 1
feels way too slow, and we do know a factor of page_size * pow (2 / 3) feels way
way too fast.

With the previous multiplier, gtk4-demo at its default size had a vertical textview
factor of 64.332901, and maximized on a 1920x1080 screen a factor of 97.585365.
Pick a magic multiplier that is both significantly below these values and above 1,
and stick to it.

Future work will add the configurability of smooth scroll events where it belongs.
At that point this commit may be reverted so we don't pile up on magic numbers again.

Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/4793

3 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sun, 7 Aug 2022 09:49:00 +0000 (09:49 +0000)]
Update Basque translation

3 years agoUpdate Portuguese translation
Hugo Carvalho [Sat, 6 Aug 2022 23:01:57 +0000 (23:01 +0000)]
Update Portuguese translation

3 years agoUpdate Persian translation
Danial Behzadi [Sat, 6 Aug 2022 22:43:23 +0000 (22:43 +0000)]
Update Persian translation

3 years agobuild: fix for use with glib 2.66.0
Hannes Müller [Fri, 5 Aug 2022 11:35:06 +0000 (13:35 +0200)]
build: fix for use with glib 2.66.0

Add missing #define g_memdup2() for gdksurface-broadway.c in case of enabled
broadway-backend as used otherwise.

Copy static would_drop() replacement for g_log_writer_default_would_drop()
from gtk-builder-tool.c to gtk-reftest.c

3 years agoUpdate Russian translation
Aleksandr Melman [Sat, 6 Aug 2022 14:44:53 +0000 (14:44 +0000)]
Update Russian translation

3 years agogtkwindow: Synthesize pointer crossing events on state changes
Carlos Garnacho [Fri, 5 Aug 2022 14:39:56 +0000 (16:39 +0200)]
gtkwindow: Synthesize pointer crossing events on state changes

When widgets go mapped/unmapped, we repick but don't generate crossing
events. Since there could be stateful controllers that use those in
the previously picked widget (e.g. GtkEventControllerMotion), skipping
those breaks their state.

Ensure to send the relevant crossing events on every situation that
changes the pointer focus, so these controllers get a fair opportunity
to undo their state.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2877
3 years agogdk/wayland: Drop surface checks on wl_pointer.leave handling
Carlos Garnacho [Fri, 5 Aug 2022 16:33:50 +0000 (18:33 +0200)]
gdk/wayland: Drop surface checks on wl_pointer.leave handling

Even though the argument is non-nullable, GTK sometimes incurs in that
by itself by destroying the surface while the event is in flight. This
is the case of popping down a GtkDropdown. When this happens we simply
ignore the crossing event, but we should let it through instead, the
compositor did not send it in vain and we possibly still have pointer
state to undo.

Drop the surface checks, so that the event is propagated along GTK.

3 years agogtkeventcontroller: Fix internal enum documentation
Carlos Garnacho [Fri, 5 Aug 2022 14:38:56 +0000 (16:38 +0200)]
gtkeventcontroller: Fix internal enum documentation

Copy and paste typo.

3 years agogtkgesturerotate: Filter touchpad holds events
Carlos Garnacho [Fri, 5 Aug 2022 08:53:22 +0000 (10:53 +0200)]
gtkgesturerotate: Filter touchpad holds events

Since the pinch touchpad gestures already have begin/update/end phases,
this gesture has no actual use for these events.

3 years agogtkgesturerotate: Filter touchpad holds events
Carlos Garnacho [Fri, 5 Aug 2022 08:50:45 +0000 (10:50 +0200)]
gtkgesturerotate: Filter touchpad holds events

Since the pinch touchpad gestures already have begin/update/end phases,
this gesture has no actual use for these events.

3 years agogdkevent: Give touchpad hold events a sequence
Carlos Garnacho [Fri, 5 Aug 2022 09:35:28 +0000 (11:35 +0200)]
gdkevent: Give touchpad hold events a sequence

Following what was done for pinch/swipe events, give hold gestures their
own distinct sequence as well. Without this it was NULL, which was already
distinct to other touchpad gestures.

3 years agogtkgesture: Do not coalesce hold events with other touchpad gestures
Carlos Garnacho [Fri, 5 Aug 2022 09:24:58 +0000 (11:24 +0200)]
gtkgesture: Do not coalesce hold events with other touchpad gestures

This delaying of the cancel event was made to avoid intermediate cancellation
for >=2fg hold gestures followed by pinch/swipe gestures, and it worked as
long as everything was considered to have the same sequence.

Since each pinch/swipe pointer gesture now gets its own sequence, this no
longer applies, nor works. This results in zoom/rotate/swipe gestures being
stuck since the sequence for the touchpad events changes mid-gesture.

Sticking to this pattern of giving touchpad gestures their own sequence,
these hold events cannot be assumed to coalesce with other touchpad gestures,
it is better to let it propagate altogether so that both the hold gesture
and the incoming gesture trigger coherent begin and end/cancel phases.

In the worst case, this results in "::begin, ::cancel, ::begin , ..." before
triggering a touchpad gesture, but the extra begin/cancel ought to be a safe
no-op in widgets.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5003
3 years agoMerge branch 'ebassi/textbuffer-private-api' into 'main'
Matthias Clasen [Fri, 5 Aug 2022 12:01:27 +0000 (12:01 +0000)]
Merge branch 'ebassi/textbuffer-private-api' into 'main'

Move private function out of the AT-SPI a11y backend

See merge request GNOME/gtk!4924

3 years agoRe-enable the TextBuffer wrap-mode serialization test
Emmanuele Bassi [Thu, 4 Aug 2022 22:39:54 +0000 (23:39 +0100)]
Re-enable the TextBuffer wrap-mode serialization test

The private serialization function is now available on all platforms.

3 years agoMove private function out of the AT-SPI a11y backend
Emmanuele Bassi [Thu, 4 Aug 2022 22:34:41 +0000 (23:34 +0100)]
Move private function out of the AT-SPI a11y backend

The textbuffer test is calling into a function defined by the AT-SPI
accessibility backend. As of commit 4ddf1b70 we only build and run the
test on Linux, but the function in question isn't really
accessibility-related: it's just a serialization function.

3 years agoCI: remove workaround for some subproject builds failing on Windows
Christoph Reiter [Thu, 4 Aug 2022 20:21:37 +0000 (22:21 +0200)]
CI: remove workaround for some subproject builds failing on Windows

In some cases subproject builds under MSYS2 failed, see
https://gitlab.gnome.org/GNOME/gtk/-/issues/2243
https://gitlab.gnome.org/GNOME/gtk/-/issues/3002
https://gitlab.gnome.org/GNOME/gtk/-/issues/5053

These manual pango/glib build instructions were added to work around
the problem by avoiding the subprojects.

https://gitlab.gnome.org/GNOME/gtk/-/issues/5053 uncovered the bug in
binutils, which is now fixed in master there and was also backported
into MSYS2 which we use in CI.

So we can just remove the workaround again now.

3 years agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 4 Aug 2022 14:33:50 +0000 (14:33 +0000)]
Update Ukrainian translation

3 years agoMerge branch 'cleanup-ffmpeg' into 'main'
Matthias Clasen [Thu, 4 Aug 2022 10:49:45 +0000 (10:49 +0000)]
Merge branch 'cleanup-ffmpeg' into 'main'

ffmpeg: add audio playback through avdevice

See merge request GNOME/gtk!4852

3 years agoffmpeg: add audio playback through avdevice
Stephan Vedder [Thu, 4 Aug 2022 10:49:44 +0000 (10:49 +0000)]
ffmpeg: add audio playback through avdevice