Commit Graph

53248 Commits

Author SHA1 Message Date
Yaron Shahrabani
782615ec68 Update Hebrew translation 2024-01-02 21:55:09 +00:00
Anders Jonsson
a64d3df749 Update Swedish translation 2023-12-29 23:29:54 +00:00
Yaron Shahrabani
bf84ee045a Update Hebrew translation 2023-12-28 12:17:42 +00:00
John Ralls
345bfb494a Use consistent coordinates in get_toplevel_from_ns_event.
[NSView frame] returns a rectangle in the superview's coordinates, and the
superview of an NSWindow's content view (which is the only NSView that
GdkQuartz instantiates) is an undocumented NSThemeFrame. While it happens
to have the same origin as the content view and the same size as the
window's frame this isn't documented and so could change without notice.
Convert the window frame coordinates to the view's coordinate system to
ensure consistency.

Use the view's bounds instead of its frame: The bounds rectangle is in the
view's coordinate system. Use the parent NSWindow's frame instead of the
private NSThemeFrame's. This ensures that all coordinate comparisons have
the same reference.

Finally, the macOS coordinate systems origin is at the bottom left, so the
title bar is between the content view's height and the window's height,
not in negative y in the view's coordinates. Adjust the y comparisons
accordingly.

Fixes #6297
2023-12-25 11:10:12 -08:00
Yosef Or Boczko
26336c401a Update Hebrew translation 2023-12-23 21:10:05 +00:00
Matthias Clasen
d6bec14774 Merge branch 'gtk-3-24-emoji-15.1' into 'gtk-3-24'
[GTK3] emoji: Update data to CLDR v44

See merge request GNOME/gtk!6687
2023-12-22 15:59:56 +00:00
Jeremy Bícha
4ef9fb7357 emoji: Update data to CLDR v44
Based on emojibase v15.3.0

Contains the changes in Unicode 15.1

https://unicode.org/versions/Unicode15.1.0/
https://cldr.unicode.org/index/downloads/cldr-44
https://github.com/milesj/emojibase/blob/emojibase-data%4015.3.0/packages/data/CHANGELOG.md
(cherry picked from commit 76a1f1714d)
(cherry picked from commit e42befb76b)
2023-12-22 10:40:22 -05:00
Jeremy Bícha
5a8a0814f7 emoji: Update data to CLDR v43
Based on emojibase v15.2.0

Contains the changes in Unicode 15.0

https://unicode.org/versions/Unicode15.0.0/
https://cldr.unicode.org/index/downloads/cldr-43
https://github.com/milesj/emojibase/blob/emojibase-data%4015.2.0/packages/data/CHANGELOG.md
(cherry picked from commit bf35836350)
(cherry picked from commit f947f23687)
2023-12-22 10:40:22 -05:00
sudip
4e2e544924 add hi-ja-et-fi-nb-th for gtkemojichooser
(cherry picked from commit 49fbbfb6cc)
(cherry picked from commit 322d9e5c3f)
2023-12-22 10:40:22 -05:00
sudip
9a3a67765a add bengali language bn.data for gtkemojichooser
(cherry picked from commit 16806294e3)
(cherry picked from commit 4b2145475e)
2023-12-22 10:40:22 -05:00
Kévin Commaille
a8feb1528d emoji: Add more locales
Based on the locales that are at least 85% translated in Damned Lies:
https://l10n.gnome.org/releases/gnome-41/
Limited by the locales available in emojibase

Closes #4568

(cherry picked from commit d8c79e91a2)
2023-12-22 10:40:22 -05:00
Kévin Commaille
f0469035e1 emoji: Update data to CLDR v40
Based on emojibase-data v7.0.1
Contains the changes in Unicode 14.0

https://unicode.org/versions/Unicode14.0.0/
https://cldr.unicode.org/index/downloads/cldr-40
https://github.com/milesj/emojibase/blob/b85382524c/packages/data/CHANGELOG.md
(cherry picked from commit 7f5a249056)
2023-12-22 10:40:22 -05:00
Kévin Commaille
20e75366f7 emoji: Fix the convert-emoji program
The annotation field has been renamed to label in emojibase-data

https://github.com/milesj/emojibase/blob/b85382524c/packages/data/CHANGELOG.md
(cherry picked from commit 70ce353a58)
2023-12-22 10:40:22 -05:00
Matthias Clasen
ab860da1b9 Merge branch 'gtk3-wayland-suspended' into 'gtk-3-24'
[gtk3/wayland] Expose XDG-shell suspended state via the visibility state

See merge request GNOME/gtk!6630
2023-12-21 12:24:36 +00:00
Carlos Garnacho
e3ecd22a68 Merge branch 'touch-accuracy' into 'gtk-3-24'
gtkgesture: Preserve accuracy when translating events

See merge request GNOME/gtk!6668
2023-12-20 15:28:37 +00:00
Guido Günther
d89447d68e gtkgesture: Preserve accuracy when translating events
gtk_widget_translate_coordinates() uses int argument and thus cuts off
any decimal parts. This can leads to reduces accuracy when e.g.
measuring the distance of a drag.

GTK4 is not affected as the translations is done differently.
2023-12-20 14:30:20 +00:00
Matthias Clasen
1b38fcad64 Post-release version bump 2023-12-19 13:27:28 -05:00
Matthias Clasen
9ce32d5d7d 3.24.39 3.24.39 2023-12-19 13:19:35 -05:00
Matthias Clasen
6d6a0c183c Merge branch 'gtk3-tooltip-fix-x11-positioning' into 'gtk-3-24'
GtkTooltip: Fix tooltip positioning on X11

See merge request GNOME/gtk!6442
2023-12-19 16:25:13 +00:00
Emmanuele Bassi
306e0fe850 Merge branch 'gtk-3-24-fix-filechooser-with-webdav' into 'gtk-3-24'
pathbar: Handle webdav where is the root is a path (backport to 3.24)

See merge request GNOME/gtk!6601
2023-12-19 14:38:15 +00:00
Olivier Crête
d5bace3779 pathbar: Handle webdav where is the root is a path
Our webdav server has a root which is davs://mynextcloud/remote.php/webdav
When once creates a GFile out of or out of a subdirectory, and one call
g_file_get_parent(), it recurses too far up and try to query
davs://mynextcloud/remote.php which fails, resulting in a broken pathbar.

To fix that, before querying the metadata of each element of the path,
I query the "enclosing mount", then use it's root to compare the GFile
against.

This is a backport of !5830 to 3.24
2023-12-19 09:21:20 -05:00
velsinki
bb1d5e7de7 GtkTooltip: Fix tooltip positioning on X11
On X11, gdk_window_move_to_rect() uses the position of the window to
calculate how it should be moved. However, any pending resizes that will
be executed on show() are not taken into account, resulting in
incorrectly positioned tooltips in case a tooltip window is re-used
often. This is not solved by gtk_widget_realize(), as this will do
nothing if the window is already realized.

Let's add a call to the private gtk_window_move_resize() function, so
that the size is always recalculated before the window is sent to
gdk_window_move_to_rect().

This exact fix was also needed in GtkMenu (7298e73c), with similar
reasoning.

Fixes #2142
Fixes #2227
2023-12-19 14:14:11 +01:00
Matthias Clasen
6104130af2 Merge branch 'dialog-portal-cherry-pick' into 'gtk-3-24'
[gtk3] Cherry-pick gtkfilechoosernativeportal fixes from gtk4

See merge request GNOME/gtk!6612
2023-12-19 01:13:40 +00:00
Matthias Clasen
432ed07105 Merge branch 'work/zzag/avoid-scaling-cairo-surface-twic3' into 'gtk-3-24'
wayland: Fix wl_buffer size for custom cursors

See merge request GNOME/gtk!6637
2023-12-19 01:11:15 +00:00
Luca Bacci
e331fec11c Merge branch 'wormnest/silence-kblayout-warning' into 'gtk-3-24'
gdkkeys-win32c: change registry key not found g_warning to g_debug

See merge request GNOME/gtk!6671
2023-12-18 17:17:29 +00:00
Jacob Boerema
99a816c361 gdkkeys-win32c: change registry key not found g_warning to g_debug
On Windows with certain keyboard layout combinations you can get a
benign terminal warning like this:
Could not open registry key 'SYSTEM\CurrentControlSet\Control\Keyboard
Layouts\D0010413'
When using a lot of plug-ins, like GIMP does, this warning can show up
a lot of times.
The code after this warning, still has another last check, that, when it
fails, will show a warning.

We change the first g_warning to a g_debug statement, to reduce the
amount of warning messages.

Closes #5109
2023-12-18 11:35:43 -05:00
Emilio Cobos Álvarez
58039edf69 [gtk3/wayland] Expose XDG-shell suspended state via visibility events.
This allows Wayland compositors to tell GTK applications whether a
window is effectively invisible.
2023-12-18 12:15:16 +01:00
Emilio Cobos Álvarez
1f0f7820cb [gtk3/wayland] Only request v2 of xdg_wm_base.
This fixes potential runtime crashes in some somewhat unlikely
configurations, like a modern compositor but gtk built against an old
wayland protocols version.

We only need v2 for the tiling fixes, so request that.
2023-12-18 12:13:22 +01:00
Luca Bacci
6ff6bf7af2 Merge branch 'wormnest/fix-ci-msys2-failure' into 'gtk-3-24'
test-msys2-meson: fix pipeline failure on GTK3

See merge request GNOME/gtk!6673
2023-12-18 09:59:45 +00:00
Jacob Boerema
4882268a20 test-msys2-meson: fix pipeline failure on GTK3
On GTK3 the msys2-mingw64-meson job is failing due to error:
mingw-w64-x86_64-pkg-config and mingw-w64-x86_64-pkgconf are in
 conflict. Remove mingw-w64-x86_64-pkgconf? [Y/n]

To fix this we change required package pkg-config to pkgconf, which
is what the GTK4 branch also uses.
2023-12-16 11:18:56 -05:00
Matthias Clasen
c70612ba1d Merge branch 'offscreen-window-fixes-for-gimp-3' into 'gtk-3-24'
Offscreen window fixes for GIMP3

See merge request GNOME/gtk!6665
2023-12-14 11:56:49 +00:00
Vlad Zahorodnii
c5d24e3d94 wayland: Fix wl_buffer size for custom cursors
cairo_image_surface_get_width() and cairo_image_surface_get_height()
return the image size that's in the device pixels.

On the other hand, _gdk_wayland_display_create_shm_surface() takes a
surface size in the logical pixels.

Given that _gdk_wayland_display_get_cursor_for_surface() provides the
desired surface size in device pixels, a much bigger shm surface is
created, which then breaks damage tracking code in
gdk_wayland_device_update_window_cursor().

Fixes #6242
2023-12-14 11:13:14 +02:00
Luca Bacci
e1d664da63 GtkMenu: Fix positioning when attached to offscreen windows
In order to do that, we have to make gdk_window_is_impl_offscreen ()
accessible from GTK via GdkPrivateVTable.
2023-12-13 12:34:41 +01:00
Luca Bacci
6982415c9f gdk_display_get_monitor_at_window: Check for offscreen windows
And get the embedder before continuing, as the backend-specific
get_monitor_at_window () only knows about its own windows.

In order to check for offscreen windows, we introduce a new function
gdk_window_is_impl_offscreen (). Unlike gdk_window_is_offscreen (),
it doesn't rely on the window_type field, but actually checks whether
GDK_WINDOW_IMPL_GET_CLASS (window->impl) is GdkOffscreenWindow.

See previous commit for informations.
2023-12-13 12:27:32 +01:00
Luca Bacci
0c72ce94ea GdkWindow: check for same impl class in set_transient_for ()
Checking for offscreen windows with gdk_window_is_offscreen ()
is not enough in this case. What we want here is that the impl
classes match, as backends are meant to know only about their
windows. Instead gdk_window_is_offscreen () checks whether the
GdkWindow.window_type field is GDK_WINDOW_OFFSCREEN.

In the case of child windows in offscreen windows, the window
type is GDK_WINDOW_CHILD, even though their impl is still
GdkOffscreenWindow.

So actually check whether GDK_WINDOW_IMPL_GET_CLASS (window)
matches GDK_WINDOW_IMPL_GET_CLASS (parent).

We may also consider getting the toplevels from child windows,
as transient-for relationships are really about toplevels, but
child windows doesn't seem to cause problems in practice.
2023-12-13 12:23:43 +01:00
Matthias Clasen
9b9560c76a Merge branch 'gtk-3-24-cursor-fallback' into 'gtk-3-24'
Fall back to the 'default' cursor

See merge request GNOME/gtk!6649
2023-12-09 04:32:17 +00:00
Emilio Cobos Álvarez
32d87ac907 [gtk3] Cherry-pick gtkfilechoosernativeportal fixes from gtk4
This was basically done copying the gtk4 version and keeping the changes
that weren't gtk4 specific.

Fixes #6224 (the chooser doesn't close but we don't crash or such)
2023-12-08 13:53:34 +01:00
Matthias Clasen
44f7cb1c55 wayland: Avoid more legacy cursor names
Set the cursor from a standard name instead of relying on the X11
cursor font derived enum values.
2023-12-08 14:09:48 +04:00
Matthias Clasen
262be35f43 Fall back to the 'default' cursor
The Adwaita cursor theme is moving to shipping just standard cursor
names, so we should fall back to 'default' instead of 'left_ptr' if
a named cursor can't be found.

Fixes: #6259
2023-12-08 12:56:29 +04:00
Yaron Shahrabani
cde309d9fa Update Hebrew translation 2023-12-02 22:12:02 +00:00
Yaron Shahrabani
a2e0359578 Update Hebrew translation 2023-12-01 21:04:44 +00:00
Arjan Molenaar
f7e9fd076d macos: Implement delegate method to silence secure-restore message
Fix process injection vulnerability on macOS.

See https://sector7.computest.nl/post/2022-08-process-injection-breaking-all-macos-security-layers-with-a-single-vulnerability/.
2023-11-30 17:47:32 +01:00
Matthias Clasen
459a13e837 Merge branch 'gtk3-wayland-tiled' into 'gtk-3-24'
[gtk3] Support tiled windows from xdg-shell.

See merge request GNOME/gtk!6629
2023-11-29 12:50:31 +00:00
Matthias Clasen
3020890e86 Merge branch 'cursor-size-tweak' into 'gtk-3-24'
[gtk3] Don't fall back directly to 1 for mismatched cursor sizes.

See merge request GNOME/gtk!5481
2023-11-29 12:44:17 +00:00
Emilio Cobos Álvarez
b54b154dc0 [gtk3] Support tiled windows from xdg-shell.
This makes wayland windows tileable in non-mutter compositors.
2023-11-29 05:03:41 +01:00
Matthias Clasen
a074f1fe72 Fix a minor issue in the file portal test
get_data can be called multiple times, so we must not clear
the data the first time we get called.
2023-11-27 19:12:53 -05:00
Matthias Clasen
0bffedf5b8 Merge branch 'wayland-cursor-fix-3-24' into 'gtk-3-24'
wayland: Be more careful when loading cursors

See merge request GNOME/gtk!6623
2023-11-27 21:28:37 +00:00
Matthias Clasen
2b5a6963e4 wayland: Be more careful when loading cursors
Make sure we don't access the cursor_images array out of bounds.

Related: #6234
2023-11-27 14:53:51 -05:00
Matthias Clasen
7e1e11e280 Merge branch 'dialog-close-fix' into 'gtk-3-24'
[gtk3] GtkFileChooserNative: Fix portal close.

See merge request GNOME/gtk!6611
2023-11-25 17:18:27 +00:00
Emilio Cobos Álvarez
307dde7f6c [gtk3] GtkFileChooserNative: Fix portal close.
This makes closing a portal file chooser work.

Fixes the GTK3 bits of #6225.
2023-11-25 03:32:47 +01:00