gtk4.git
3 years agoMerge branch 'gtk_assisten_set_current_page-no-pages-guard' into 'main'
Matthias Clasen [Wed, 9 Feb 2022 19:19:24 +0000 (19:19 +0000)]
Merge branch 'gtk_assisten_set_current_page-no-pages-guard' into 'main'

Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all

See merge request GNOME/gtk!4464

3 years agoDon't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are...
Sebastian Dröge [Wed, 9 Feb 2022 15:50:13 +0000 (17:50 +0200)]
Don't dereference a `NULL` page in `gtk_assistant_set_current_page()` if there are no pages at all

3 years agoMerge branch 'bilelmoussaoui/g-i' into 'main'
Matthias Clasen [Wed, 9 Feb 2022 13:43:50 +0000 (13:43 +0000)]
Merge branch 'bilelmoussaoui/g-i' into 'main'

gdk: mark gdk_device_get_device_tool as nullable

See merge request GNOME/gtk!4463

3 years agoMerge branch 'revert-misdeprecation' into 'main'
Matthias Clasen [Wed, 9 Feb 2022 13:13:35 +0000 (13:13 +0000)]
Merge branch 'revert-misdeprecation' into 'main'

Revert "Deprecate GdkDevice:source"

See merge request GNOME/gtk!4462

3 years agogdk: mark gdk_device_get_device_tool as nullable
Bilal Elmoussaoui [Wed, 9 Feb 2022 13:09:47 +0000 (13:09 +0000)]
gdk: mark gdk_device_get_device_tool as nullable

3 years agoRevert "Deprecate GdkDevice:source"
Matthias Clasen [Wed, 9 Feb 2022 12:55:28 +0000 (07:55 -0500)]
Revert "Deprecate GdkDevice:source"

This reverts commit fd9e0dd13a117637db0d265be85952a71ef128b8.

3 years agoMerge branch 'win32-fix-ctrl-shift-gtk4' into 'main'
Luca Bacci [Wed, 9 Feb 2022 10:08:52 +0000 (10:08 +0000)]
Merge branch 'win32-fix-ctrl-shift-gtk4' into 'main'

gdkkeys-win32: Also ignore Ctrl + Shift (etc.)

See merge request GNOME/gtk!4460

3 years agogdkkeys-win32: Also ignore Ctrl + Shift (etc.)
Philip Zander [Tue, 8 Feb 2022 19:33:42 +0000 (20:33 +0100)]
gdkkeys-win32: Also ignore Ctrl + Shift (etc.)

Some Windows keymaps have bogus mappings for the Ctrl modifier. !4423 attempted
to fix this by ignoring the Ctrl layer, but that was not enough. We also need to
ignore combinations of Ctrl with other modifiers, i.e. Ctrl + Shift. For example,
Ctrl + Shift + 6 is mapped to the character 0x1E on a US keyboard (but it should
be treated as Ctrl + ^). Basically, always ignore Ctrl unless it is used in
conjunction with Alt, i.e. as part of AltGr.

Related issue: #4667

3 years agoMerge branch 'bilelmoussaoui/macos-gdk-display' into 'main'
Christian Hergert [Wed, 9 Feb 2022 00:30:04 +0000 (00:30 +0000)]
Merge branch 'bilelmoussaoui/macos-gdk-display' into 'main'

macos: Don't set NULL as a display name

See merge request GNOME/gtk!4453

3 years agomacos: Don't set NULL as a display name
Bilal Elmoussaoui [Tue, 8 Feb 2022 12:38:33 +0000 (13:38 +0100)]
macos: Don't set NULL as a display name

Other GDK backends ensure there is always a default name set.
Fixes https://github.com/gtk-rs/gtk4-rs/issues/868

3 years agoMerge branch 'wip/otte/for-main' into 'main'
Benjamin Otte [Tue, 8 Feb 2022 02:08:26 +0000 (02:08 +0000)]
Merge branch 'wip/otte/for-main' into 'main'

gltexture: Only use glGetFramebufferParameter() when available

Closes #4678

See merge request GNOME/gtk!4449

3 years agorgba: Fix GDK_RGBA() macro to work with alpha
Benjamin Otte [Sun, 6 Feb 2022 19:01:49 +0000 (20:01 +0100)]
rgba: Fix GDK_RGBA() macro to work with alpha

Previously we dividied by an integer, so alpha was either 0.0 or 1.0.

3 years agogltexture: Only use glGetFramebufferParameter() when available
Benjamin Otte [Tue, 8 Feb 2022 00:32:44 +0000 (01:32 +0100)]
gltexture: Only use glGetFramebufferParameter() when available

Fixes #4678

3 years agoMerge branch 'wip/jimmac/selected_text' into 'main'
Matthias Clasen [Tue, 8 Feb 2022 00:15:45 +0000 (00:15 +0000)]
Merge branch 'wip/jimmac/selected_text' into 'main'

style: legible text selections

Closes #4664

See merge request GNOME/gtk!4433

3 years agoMerge branch 'antoniof-main-patch-89408' into 'main'
Matthias Clasen [Mon, 7 Feb 2022 23:57:46 +0000 (23:57 +0000)]
Merge branch 'antoniof-main-patch-89408' into 'main'

columnviewcolumn: Define autocleanup function

See merge request GNOME/gtk!4440

3 years agoMerge branch 'more-noexecstack' into 'main'
Matthias Clasen [Mon, 7 Feb 2022 23:57:26 +0000 (23:57 +0000)]
Merge branch 'more-noexecstack' into 'main'

demos: Make our stack noexec

See merge request GNOME/gtk!4439

3 years agoMerge branch 'wip/chergert/macos-fixes' into 'main'
Matthias Clasen [Mon, 7 Feb 2022 23:56:40 +0000 (23:56 +0000)]
Merge branch 'wip/chergert/macos-fixes' into 'main'

various macOS fixes

See merge request GNOME/gtk!4424

3 years agoMerge branch 'mg/gdk-macos-gdkdisplaylinksource' into 'main'
Matthias Clasen [Mon, 7 Feb 2022 23:54:55 +0000 (23:54 +0000)]
Merge branch 'mg/gdk-macos-gdkdisplaylinksource' into 'main'

Include `gdk-private.h` to fix error about `g_source_set_static_name`

See merge request GNOME/gtk!4443

3 years agoMerge branch 'mg/implicit-declaration-free' into 'main'
Matthias Clasen [Mon, 7 Feb 2022 23:53:36 +0000 (23:53 +0000)]
Merge branch 'mg/implicit-declaration-free' into 'main'

gdkjpeg: include `stdlib.h` necessary for `free`

See merge request GNOME/gtk!4445

3 years agoUpdate Slovenian translation
Matej Urbančič [Mon, 7 Feb 2022 19:39:08 +0000 (19:39 +0000)]
Update Slovenian translation

3 years agoUpdate Slovenian translation
Matej Urbančič [Mon, 7 Feb 2022 19:30:34 +0000 (19:30 +0000)]
Update Slovenian translation

3 years agoMerge branch 'drop-target-get-formats-transfer-none' into 'main'
Emmanuele Bassi [Mon, 7 Feb 2022 15:17:39 +0000 (15:17 +0000)]
Merge branch 'drop-target-get-formats-transfer-none' into 'main'

Mark `gtk_drop_target_get_formats()` return value as `transfer none`

See merge request GNOME/gtk!4446

3 years agoMark `gtk_drop_target_get_formats()` return value as `transfer none`
Sebastian Dröge [Mon, 7 Feb 2022 14:23:01 +0000 (16:23 +0200)]
Mark `gtk_drop_target_get_formats()` return value as `transfer none`

It was wrongly inferred as `transfer full` by gobject-introspection.

3 years agogdkjpeg: include `stdlib.h` necessary for `free`
Mosè Giordano [Sun, 6 Feb 2022 15:41:33 +0000 (15:41 +0000)]
gdkjpeg: include `stdlib.h` necessary for `free`

`free` is defined in `stdlib.h`, see for example
<https://pubs.opengroup.org/onlinepubs/009604499/functions/free.html>.  Without
this include compilation can fail with the following error:

```
../gdk/loaders/gdkjpeg.c: In function ‘gdk_save_jpeg’:
../gdk/loaders/gdkjpeg.c:264:7: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
       free (data);
       ^
../gdk/loaders/gdkjpeg.c:264:7: warning: incompatible implicit declaration of built-in function ‘free’
../gdk/loaders/gdkjpeg.c:264:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
../gdk/loaders/gdkjpeg.c:302:67: error: ‘free’ undeclared (first use in this function)
   return g_bytes_new_with_free_func (data, size, (GDestroyNotify) free, NULL);
                                                                   ^
../gdk/loaders/gdkjpeg.c:302:67: note: each undeclared identifier is reported only once for each function it appears in
../gdk/loaders/gdkjpeg.c:303:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
```

3 years agoInclude `gdk-private.h` to fix error about `g_source_set_static_name`
Mosè Giordano [Sat, 5 Feb 2022 21:51:40 +0000 (21:51 +0000)]
Include `gdk-private.h` to fix error about `g_source_set_static_name`

Without this change we get the following error:

```
[1/13] Compiling C object gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o
ninja: job failed: /opt/bin/aarch64-apple-darwin20-libgfortran5-cxx11/aarch64-apple-darwin20-clang -Igdk/macos/libgdk-macos.a.p -Igdk/macos -I../gdk/macos -I. -I.. -Igdk -I../gdk -Isubprojects/pango/pango -I../subprojects/pango/pango -Isubprojects/pango -I../subprojects/pango -I/workspace/destdir/include/gdk-pixbuf-2.0 -I/workspace/destdir/include -I/workspace/destdir/include/glib-2.0 -I/workspace/destdir/lib/glib-2.0/include -I/workspace/destdir/lib/libffi-3.2.1/include -I/workspace/destdir/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/workspace/destdir/include/cairo -I/workspace/destdir/include/pixman-1 -I/workspace/destdir/include/freetype2 -I/workspace/destdir/include/fribidi -I/workspace/destdir/include/harfbuzz -I/workspace/destdir/include/graphene-1.0 -I/workspace/destdir/lib/graphene-1.0/include -I/workspace/destdir/include/gio-unix-2.0 -fcolor-diagnostics -Wall -Winvalid-pch -std=gnu99 -O2 -g -DG_LOG_USE_STRUCTURED=1 -DGLIB_DISABLE_DEPRECATION_WARNINGS '-DGTK_VERSION="4.6.0"' -D_GNU_SOURCE -DG_ENABLE_DEBUG -DGTK_COMPILATION '-DG_LOG_DOMAIN="Gdk"' -xobjective-c -fno-strict-aliasing -Wno-c++11-extensions -Wno-missing-include-dirs -Wno-typedef-redefinition -Wformat=2 -Wformat-nonliteral -Wformat-security -Wignored-qualifiers -Wimplicit-function-declaration -Wmisleading-indentation -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wshadow -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wuninitialized -Wunused -Werror=address -Werror=array-bounds -Werror=empty-body -Werror=implicit -Werror=implicit-fallthrough -Werror=init-self -Werror=int-to-pointer-cast -Werror=main -Werror=missing-braces -Werror=missing-declarations -Werror=missing-prototypes -Werror=nonnull -Werror=pointer-to-int-cast -Werror=redundant-decls -Werror=return-type -Werror=sequence-point -Werror=trigraphs -Werror=vla -Werror=write-strings -Wnull-dereference -fvisibility=hidden -MD -MQ gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o -MF gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o.d -o gdk/macos/libgdk-macos.a.p/gdkdisplaylinksource.c.o -c ../gdk/macos/gdkdisplaylinksource.c
../gdk/macos/gdkdisplaylinksource.c:201:3: error: implicit declaration of function 'g_source_set_static_name' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
  g_source_set_static_name (source, "[gdk] quartz frame clock");
  ^
1 error generated.
ninja: subcommand failed
```

3 years agomacos: fallback to conversion on WCG colorspace
Christian Hergert [Sat, 5 Feb 2022 20:42:57 +0000 (12:42 -0800)]
macos: fallback to conversion on WCG colorspace

We don't want to risk having something really weird come out if we have a
WCG colorspace, so instead only do the performance hack on systems where
the output is likely reasonable.

We will want to eventually just be drawing in the appropriate colorspace,
but that is not available yet.

3 years agoUpdate Basque translation
Asier Sarasua Garmendia [Sat, 5 Feb 2022 11:21:02 +0000 (11:21 +0000)]
Update Basque translation

3 years agomacos: handle sizing changes when switching monitors
Christian Hergert [Fri, 4 Feb 2022 20:29:57 +0000 (12:29 -0800)]
macos: handle sizing changes when switching monitors

This should make sure that our scales are updated as well as
ensuring we repaint the whole surface.

3 years agoMerge branch 'wip/hadess/inspector-search-by-pointer-gtk4' into 'main'
Benjamin Otte [Fri, 4 Feb 2022 18:07:28 +0000 (18:07 +0000)]
Merge branch 'wip/hadess/inspector-search-by-pointer-gtk4' into 'main'

inspector: Search by pointer address

See merge request GNOME/gtk!4442

3 years agomacos: assume monitor colorspace when drawing
Christian Hergert [Fri, 4 Feb 2022 17:46:10 +0000 (09:46 -0800)]
macos: assume monitor colorspace when drawing

When using software rendering w/ cairo, assume we're drawing in
the best-monitor's colorspace rather than RGB to avoid colorspace
conversions on every frame.

3 years agomacos: add API to get monitor colorspace
Christian Hergert [Fri, 4 Feb 2022 17:45:55 +0000 (09:45 -0800)]
macos: add API to get monitor colorspace

3 years agoinspector: Search by pointer address
Bastien Nocera [Fri, 4 Feb 2022 17:39:56 +0000 (18:39 +0100)]
inspector: Search by pointer address

Useful to find a widget that corresponds to a pointer address in gdb.

3 years agomacos: precalculate clip regions as CGRect
Christian Hergert [Fri, 4 Feb 2022 17:31:37 +0000 (09:31 -0800)]
macos: precalculate clip regions as CGRect

We can make our drawRect do less work if we precalculate the clip
and damage regions upfront by intersecting them with the bounds.

3 years agocolumnviewcolumn: Define autocleanup function
António Fernandes [Fri, 4 Feb 2022 11:13:46 +0000 (11:13 +0000)]
columnviewcolumn: Define autocleanup function

3 years agomacos: fix unmaximize opacity around edges of window
Christian Hergert [Fri, 4 Feb 2022 03:21:59 +0000 (19:21 -0800)]
macos: fix unmaximize opacity around edges of window

3 years agomacos: use CGContext to draw cairo surfaces
Christian Hergert [Fri, 4 Feb 2022 02:31:09 +0000 (18:31 -0800)]
macos: use CGContext to draw cairo surfaces

Instead of relying on cairo_t to perform drawing from our backing
image surface to the Core Graphics context, we can convert the
cairo_image_surface_t into a CGImageRef without having to copy
data if we are certain of the alignment of the image up front.

Without this, there are many situations, based on the size of the
window that could cause cairo to take a slow path and malloc/copy
the data to ensure that alignment.

The previous commit titled "macos: align image surface rowstride to
16-bytes" ensures that this invariant is true so that our drawing
code can assume we can reference the framebuffer from the
cairo_image_surface_t using a CGDataProvider.

Since GdkMacosCairoContext and GdkMacosCairoSubview are coordinating,
we can also setup the transformation/scale early when drawing the
cairo_image_surface_t instead of when copying it to Core Graphics.

Furthermore, the CGImageRef is created with an RGB colorspace so
that we are not performing colorspace conversion to the output
device. We don't get color matching between displays, but we don't
expect that anyway, particularly with the software renderer.

3 years agomacos: align image surface rowstride to 16-bytes
Christian Hergert [Fri, 4 Feb 2022 02:21:43 +0000 (18:21 -0800)]
macos: align image surface rowstride to 16-bytes

When creating a cairo_image_surface_t we want both the framebuffer pointer
and each row to be aligned to 16-bytes so that Core Graphics will use more
optimal paths.

However, cairo_image_surface_create() will not guarantee that the rowstride
is aligned to 16-bytes so we must do that ourselves.

3 years agomacos: avoid unnecessarily destroying cairo_t
Christian Hergert [Thu, 3 Feb 2022 21:01:46 +0000 (13:01 -0800)]
macos: avoid unnecessarily destroying cairo_t

This avoids destroying a cairo_t when we are within the frame as it
otherwise causes the surface to unnecessarily flush.

3 years agomacos: cleanup window surface when destroying context
Christian Hergert [Thu, 3 Feb 2022 21:28:56 +0000 (13:28 -0800)]
macos: cleanup window surface when destroying context

Make sure we release the cairo_surface_t for the window when
disposing the GdkMacosCairoContext.

3 years agomacos: be more careful about freezing/thawing surfaces
Christian Hergert [Wed, 2 Feb 2022 00:06:08 +0000 (16:06 -0800)]
macos: be more careful about freezing/thawing surfaces

We need to avoid conflating the managing of frame callbacks from
the freeze/thaw mechanics and ensure we don't perform extra thaw
requests at the wrong time.

3 years agomacos: check for destroyed surfaces in vfuncs
Christian Hergert [Mon, 31 Jan 2022 21:02:58 +0000 (13:02 -0800)]
macos: check for destroyed surfaces in vfuncs

3 years agomacos: be more defensive about freezing updates
Christian Hergert [Sun, 30 Jan 2022 01:07:02 +0000 (17:07 -0800)]
macos: be more defensive about freezing updates

We only need to freeze the updates if we weren't in the queue already.
That should be the case, but just better to be defensive here.

3 years agomacos: push to head of awaiting frames
Christian Hergert [Sun, 30 Jan 2022 01:05:48 +0000 (17:05 -0800)]
macos: push to head of awaiting frames

Always add to the head of awaiting frames as the list is processed
in the opposite direction.

3 years agomacos: remove popup surface from parent
Christian Hergert [Sun, 30 Jan 2022 01:04:50 +0000 (17:04 -0800)]
macos: remove popup surface from parent

3 years agomacos: handle NULL frame-clock when thawing
Christian Hergert [Sun, 30 Jan 2022 00:19:57 +0000 (16:19 -0800)]
macos: handle NULL frame-clock when thawing

3 years agodemos: Make our stack noexec
Jan Alexander Steffens (heftig) [Thu, 3 Feb 2022 19:14:36 +0000 (19:14 +0000)]
demos: Make our stack noexec

This is similar to https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4330
and https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4334, which fixed
the main library but missed the demos.

3 years agoMerge branch 'zbrown/its-a-filename' into 'main'
Emmanuele Bassi [Wed, 2 Feb 2022 23:11:44 +0000 (23:11 +0000)]
Merge branch 'zbrown/its-a-filename' into 'main'

cssprovider: from_path takes a path

See merge request GNOME/gtk!4436

3 years agocssprovider: from_path takes a path
Zander Brown [Wed, 2 Feb 2022 22:47:39 +0000 (22:47 +0000)]
cssprovider: from_path takes a path

Annotate it as such so that bindings can expose that appropriately

Related: https://github.com/gtk-rs/gtk4-rs/issues/861

3 years agoMerge branch 'fix-app-launch-context-docs' into 'main'
Emmanuele Bassi [Tue, 1 Feb 2022 20:34:41 +0000 (20:34 +0000)]
Merge branch 'fix-app-launch-context-docs' into 'main'

gdkapplaunchcontext: Fix docs a bit

See merge request GNOME/gtk!4434

3 years agogdkapplaunchcontext: Fix docs a bit
Phaedrus Leeds [Tue, 1 Feb 2022 18:55:54 +0000 (10:55 -0800)]
gdkapplaunchcontext: Fix docs a bit

The set_screen() and set_display() methods no longer exist.

3 years agostyle: legible text selections
Jakub Steiner [Tue, 1 Feb 2022 16:12:52 +0000 (17:12 +0100)]
style: legible text selections

- follow adwaita styling

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4664

3 years agoMerge branch 'win32-keys-ignore-ctrl-gtk4' into 'main'
Luca Bacci [Tue, 1 Feb 2022 15:33:01 +0000 (15:33 +0000)]
Merge branch 'win32-keys-ignore-ctrl-gtk4' into 'main'

gdkkeys-win32: Ignore CTRL bit for key translation

Closes #4667

See merge request GNOME/gtk!4431

3 years agoMerge branch '4602-fix-kerning-of-gl-rendered-glyphs' into 'main'
Emmanuele Bassi [Tue, 1 Feb 2022 14:31:47 +0000 (14:31 +0000)]
Merge branch '4602-fix-kerning-of-gl-rendered-glyphs' into 'main'

Fix kerning of GL rendered glyphs

Closes #4602

See merge request GNOME/gtk!4429

3 years agogdkkeys-win32: Ignore CTRL bit for key translation
Philip Zander [Sat, 29 Jan 2022 21:36:40 +0000 (22:36 +0100)]
gdkkeys-win32: Ignore CTRL bit for key translation

Some keymaps on Windows contain bogus mappings for Ctrl+key for certain
keys, e.g. Ctrl+Backspace = Delete, or Ctrl+[ = 0x1B. These are never
used on Windows, so we should ignore them.

Fixes #4667

3 years agoFix kerning of GL rendered glyphs
Marek Kasik [Mon, 31 Jan 2022 14:41:18 +0000 (15:41 +0100)]
Fix kerning of GL rendered glyphs

Multiple scaled shifts by 1024 too.

Fixes: #4602
3 years agoUpdate Chinese (China) translation
Boyuan Yang [Mon, 31 Jan 2022 03:51:23 +0000 (03:51 +0000)]
Update Chinese (China) translation

3 years agoUpdate Chinese (China) translation
Boyuan Yang [Mon, 31 Jan 2022 03:46:30 +0000 (03:46 +0000)]
Update Chinese (China) translation

3 years agoUpdate Japanese translation
sicklylife [Sun, 30 Jan 2022 15:26:50 +0000 (15:26 +0000)]
Update Japanese translation

3 years agoUpdate Japanese translation
sicklylife [Sun, 30 Jan 2022 15:15:27 +0000 (15:15 +0000)]
Update Japanese translation

3 years agoUpdate Polish translation
Piotr Drąg [Sat, 29 Jan 2022 13:59:17 +0000 (14:59 +0100)]
Update Polish translation

3 years agoUpdate Russian translation
Aleksandr Melman [Fri, 28 Jan 2022 11:05:57 +0000 (11:05 +0000)]
Update Russian translation

3 years agoMerge branch 'infobar-xml' into 'main'
Emmanuele Bassi [Fri, 28 Jan 2022 10:49:37 +0000 (10:49 +0000)]
Merge branch 'infobar-xml' into 'main'

Escape Builder XML in GtkInfoBar docs

See merge request GNOME/gtk!4421

3 years agoEscape Builder XML in GtkInfoBar docs
Elliott Sales de Andrade [Fri, 28 Jan 2022 10:32:16 +0000 (05:32 -0500)]
Escape Builder XML in GtkInfoBar docs

3 years agoUpdated Spanish translation
Daniel Mustieles [Fri, 28 Jan 2022 10:01:09 +0000 (11:01 +0100)]
Updated Spanish translation

3 years agoMerge branch 'ebassi/manifest-dep-fix' into 'main'
Emmanuele Bassi [Fri, 28 Jan 2022 02:05:59 +0000 (02:05 +0000)]
Merge branch 'ebassi/manifest-dep-fix' into 'main'

flatpak: Add wayland-protocols to the manifests

See merge request GNOME/gtk!4420

3 years agoflatpak: Use "main" branch for wayland
Emmanuele Bassi [Fri, 28 Jan 2022 01:25:04 +0000 (01:25 +0000)]
flatpak: Use "main" branch for wayland

The default branch for wayland has changed, but the "master" branch
is still available with an older version.

3 years agoMerge branch 'tiled-window-bracket-fix' into 'main'
Matthias Clasen [Thu, 27 Jan 2022 17:29:13 +0000 (17:29 +0000)]
Merge branch 'tiled-window-bracket-fix' into 'main'

theme: Drop shadow and border fixes for tiled windows

See merge request GNOME/gtk!4418

3 years agoMerge branch 'wip/baedert/for-master' into 'main'
Matthias Clasen [Thu, 27 Jan 2022 16:27:12 +0000 (16:27 +0000)]
Merge branch 'wip/baedert/for-master' into 'main'

build: Make GCC ignore fallthrough comments

Closes #4663

See merge request GNOME/gtk!4419

3 years agoUpdate Brazilian Portuguese translation
Leônidas Araújo [Thu, 27 Jan 2022 16:25:07 +0000 (16:25 +0000)]
Update Brazilian Portuguese translation

3 years agoUpdate Brazilian Portuguese translation
Matheus Barbosa [Thu, 27 Jan 2022 15:47:53 +0000 (15:47 +0000)]
Update Brazilian Portuguese translation

3 years agogesturesingle: Get rid of a fallthrough comment
Timm Bäder [Thu, 27 Jan 2022 15:06:56 +0000 (16:06 +0100)]
gesturesingle: Get rid of a fallthrough comment

Fixes #4663

3 years agobuild: Make GCC ignore fallthrough comments
Timm Bäder [Thu, 27 Jan 2022 15:05:33 +0000 (16:05 +0100)]
build: Make GCC ignore fallthrough comments

From the GCC manpage:

> Wimplicit-fallthrough=5 doesn't recognize any comments as
> fallthrough comments, only attributes disable
> the warning.

So, check for the =5 version after checking for the simple version. This
way we get -Wfallhrough with clang and -Wfallthrough -Wfallthrough=5
with GCC, which works.

3 years agoUpdate Ukrainian translation
Yuri Chornoivan [Thu, 27 Jan 2022 14:47:37 +0000 (14:47 +0000)]
Update Ukrainian translation

3 years agoMerge branch 'realize-vs-focus-in' into 'main'
Carlos Garnacho [Thu, 27 Jan 2022 14:13:55 +0000 (14:13 +0000)]
Merge branch 'realize-vs-focus-in' into 'main'

gtktext: Make sure input method sees focus in

See merge request GNOME/gtk!4402

3 years agotheme: Fix incorrect border color for tiled windows
Joonas Henriksson [Thu, 27 Jan 2022 04:08:40 +0000 (06:08 +0200)]
theme: Fix incorrect border color for tiled windows

3 years agotheme: Fix drop shadow for tiled windows
Joonas Henriksson [Thu, 27 Jan 2022 03:50:06 +0000 (05:50 +0200)]
theme: Fix drop shadow for tiled windows

Misplaced curly bracket prevented the :backdrop styling from getting
applied. Also fix the indentation while at it.

3 years agoMerge branch 'hold-gestures' into 'main'
Carlos Garnacho [Wed, 26 Jan 2022 23:37:28 +0000 (23:37 +0000)]
Merge branch 'hold-gestures' into 'main'

Add hold gestures

See merge request GNOME/gtk!3454

3 years agoUpdate Galician translation
Fran Dieguez [Wed, 26 Jan 2022 23:36:27 +0000 (23:36 +0000)]
Update Galician translation

3 years agoUpdate Portuguese translation
Hugo Carvalho [Wed, 26 Jan 2022 22:48:02 +0000 (22:48 +0000)]
Update Portuguese translation

3 years agogtkgestureswipe: Don't filter hold events
José Expósito [Mon, 28 Jun 2021 15:51:17 +0000 (17:51 +0200)]
gtkgestureswipe: Don't filter hold events

Part-of: <!3454>

3 years agogtkgesturerotate: Don't filter hold events
José Expósito [Mon, 28 Jun 2021 15:51:13 +0000 (17:51 +0200)]
gtkgesturerotate: Don't filter hold events

Part-of: <!3454>

3 years agogtkgesturezoom: Don't filter hold events
José Expósito [Mon, 28 Jun 2021 15:50:56 +0000 (17:50 +0200)]
gtkgesturezoom: Don't filter hold events

Part-of: <!3454>

3 years agogtkgesture: Handle hold gestures
José Expósito [Mon, 28 Jun 2021 15:49:35 +0000 (17:49 +0200)]
gtkgesture: Handle hold gestures

Hold gestures are used to bring existing gestures on touchpad
semantically closer to touchscreen gestures.

Touchpad gestures observe hold gestures with a matching amount of
fingers and emit their begin and end signals when fingers are detected
or removed on/from the touchpad.

When a hold cancel event is detected, it is required to wait a few
milliseconds until the next event(s) are received to avoid emitting
multiple begin signals.

Part-of: <!3454>

3 years agogtkgesture: Add hold to EVENT_IS_TOUCHPAD_GESTURE
José Expósito [Mon, 28 Jun 2021 06:32:17 +0000 (08:32 +0200)]
gtkgesture: Add hold to EVENT_IS_TOUCHPAD_GESTURE

Part-of: <!3454>

3 years agoscrolledwindow: Stop kinetic scrolling on begin
José Expósito [Wed, 23 Jun 2021 06:09:35 +0000 (08:09 +0200)]
scrolledwindow: Stop kinetic scrolling on begin

Stop kinetic scrolling when a scroll begin signal is sent during the
event capture phase.

Part-of: <!3454>

3 years agokineticscrolling: Add stop function
José Expósito [Tue, 22 Jun 2021 16:44:05 +0000 (18:44 +0200)]
kineticscrolling: Add stop function

Move the logic to stop kinetic scrolling to its own function and allow
to call it from the outside.

Part-of: <!3454>

3 years agogtkeventcontrollerscroll: Handle hold gestures
José Expósito [Mon, 28 Jun 2021 15:48:04 +0000 (17:48 +0200)]
gtkeventcontrollerscroll: Handle hold gestures

Handle hold events:

 - GDK_TOUCHPAD_GESTURE_PHASE_BEGIN: scroll-begin is emitted.
 - GDK_TOUCHPAD_GESTURE_PHASE_END: A hold gesture ends only when all
   fingers are lifted from the touchpad without movement, so
   scroll-end is emitted right away.
 - GDK_TOUCHPAD_GESTURE_PHASE_CANCEL: A hold gesture is cancelled when
   some fingers are lifted/put down or movement is detected. In this
   case, scroll-end is emitted after a small timeout only if
   GDK_SCROLL wasn't detected.

Part-of: <!3454>

3 years agogtkeventcontrollerscroll: Refactor scroll end
José Expósito [Tue, 22 Jun 2021 16:27:14 +0000 (18:27 +0200)]
gtkeventcontrollerscroll: Refactor scroll end

Move the logic to end scrolling to its own function to be able to
reuse it.

Refactor, no functional changes.

Part-of: <!3454>

3 years agogtkeventcontrollerscroll: Refactor scroll begin
José Expósito [Fri, 18 Jun 2021 15:55:47 +0000 (17:55 +0200)]
gtkeventcontrollerscroll: Refactor scroll begin

Move the logic to begin scrolling to its own function to be able to
reuse it.

Refactor, no functional changes.

Part-of: <!3454>

3 years agowayland/pointer-gestures: Receive hold gesture
José Expósito [Sun, 27 Jun 2021 09:49:56 +0000 (11:49 +0200)]
wayland/pointer-gestures: Receive hold gesture

Add the glue code to receive hold gesture events from the compositor,
transform them into GdkEvents and finally enqueue them.

Part-of: <!3454>

3 years agogtkmain: Handle hold events
José Expósito [Sun, 27 Jun 2021 09:49:39 +0000 (11:49 +0200)]
gtkmain: Handle hold events

Part-of: <!3454>

3 years agogdk/events: Add hold GdkEvent
José Expósito [Sun, 27 Jun 2021 09:49:24 +0000 (11:49 +0200)]
gdk/events: Add hold GdkEvent

Allow to create hold events as well as the required functions to get
information about the event: gesture phase, finger count, etc

Part-of: <!3454>

3 years agobuild: Bump wayland-protocols to v1.23
José Expósito [Tue, 25 Jan 2022 17:05:18 +0000 (18:05 +0100)]
build: Bump wayland-protocols to v1.23

Part-of: <!3454>

3 years agoMerge branch 'sri-main-patch-28302' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:37:28 +0000 (19:37 +0000)]
Merge branch 'sri-main-patch-28302' into 'main'

Update docs/reference/gtk/migrating-3to4.md

See merge request GNOME/gtk!4404

3 years agoMerge branch 'rafaelff-hig' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:35:21 +0000 (19:35 +0000)]
Merge branch 'rafaelff-hig' into 'main'

buildertool: use curly apostrophe

See merge request GNOME/gtk!4414

3 years agoMerge branch 'wip/carlosg/touchpad-gesture-fixes' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:32:33 +0000 (19:32 +0000)]
Merge branch 'wip/carlosg/touchpad-gesture-fixes' into 'main'

Touchpad gesture fixes

See merge request GNOME/gtk!4417

3 years agoMerge branch 'antoniof-main-patch-39484' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:29:08 +0000 (19:29 +0000)]
Merge branch 'antoniof-main-patch-39484' into 'main'

gtkbitset: Define autocleanup function

See merge request GNOME/gtk!4416

3 years agoMerge branch 'bilelmoussaoui/g-i' into 'main'
Matthias Clasen [Wed, 26 Jan 2022 19:19:42 +0000 (19:19 +0000)]
Merge branch 'bilelmoussaoui/g-i' into 'main'

g-i: mark GtkSnapshot to_(node|paintable) as nullable

See merge request GNOME/gtk!4413

3 years agogtk/gesture: Fix point info lookup on touchpad events
Carlos Garnacho [Wed, 26 Jan 2022 15:02:00 +0000 (16:02 +0100)]
gtk/gesture: Fix point info lookup on touchpad events

Since the addition of GdkEventSequence in touchpad events, these
are now stored in the gesture using that sequence. This bit of touchpad
gesture handling was however missing to be updated, still looking up
the special NULL sequence.

Use the last sequence here, which will be the one coming from touchpad
gesture events.

3 years agogtk/main: Do not use touchpad event sequence for pointer focus lookup
Carlos Garnacho [Wed, 26 Jan 2022 14:59:36 +0000 (15:59 +0100)]
gtk/main: Do not use touchpad event sequence for pointer focus lookup

Despite touchpad gestures having a sequence, these must use the logical
pointer focus. Avoid using the sequence for GtkPointerFocus lookups with
those events, in order to ensure those events make it all the way to the
intended target.

This is fallout from adding GdkEventSequence information to touchpad
gestures.