Commit Graph

53395 Commits

Author SHA1 Message Date
correctmost
0b874d13a7 updateiconcache: Fix path leak 2025-01-12 00:08:42 -05:00
Matthias Clasen
360fb0fe78 Merge branch 'fix-enter-leave-signals-in-controller-motion' into 'gtk-3-24'
gtk3: Fix enter and leave signals in EventControllerMotion

See merge request GNOME/gtk!8055
2025-01-04 14:58:55 +00:00
Sergio Costas
e71a817fff gtk3: Fix enter and leave signals in EventControllerMotion
The Gtk.EventMotionController implementation in Gtk3 doesn't
emit the enter or leave signals when the mouse cursor enters
or leaves the associated widget.

After doing several tests, I discovered that the
gtk_event_controller_handle_event() method never receives any
of the events from the Gtk core, although they are generated
inside the core and enter-notify-event and leave-notify-event
signals are correctly emited.

This patch fixes it by adding the missing
gtk_widget_real_XXXXX_event handlers for enter and leave
event notifications.

Fix #7225
2025-01-04 12:41:08 +01:00
Matthias Clasen
222eb83904 Merge branch 'macos-stuck-ui' into 'gtk-3-24'
Keep the UI from getting stuck in Gtk3 on macOS.

See merge request GNOME/gtk!8047
2025-01-02 14:32:46 +00:00
John Ralls
41bd9e4290 [quartz] GdkQuartzNSWindow: Pad only the content_rect width.
On Quartz the drawing region must be padded out to a multiple of 4 px
on regular displays and 8 px on Retina ones. Failing to do so used to
cause smearing on multi-monitor mixed-DPI systems but that seems to
have been fixed. There remains a visible flicker in animations.

Padding the GdkWindow width as well as the content frame and cairo
surface causes the frame clock to get frozen if multiple calls to
gtk_window_resize use the same size because
gdk_window_move_resize_internal sees a difference between the window
size and the requested size (the latter isn't padded out) and freezes updates. GdkQuartzNSWindow
windowDidResize is supposed to thaw them, but because the padded-out
width set for the frame doesn't change the window isn't resized and
the frame clock is never thawed.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/7188
2024-12-25 20:29:19 -08:00
John Ralls
c79539dc8c [quartz] GdkQuartzNSWindow: Extract func synthesize_configure_event.
To reduce duplicated code.
2024-12-25 20:27:56 -08:00
Matthias Clasen
5f76eb2dd0 Merge branch 'ebassi/issue-7143' into 'gtk-3-24'
testsuite: Replace XPM file

See merge request GNOME/gtk!8034
2024-12-19 22:13:09 +00:00
Emmanuele Bassi
15b938b427 Merge branch 'ebassi/fix-sl-po' into 'gtk-3-24'
Fix malformed translation file

See merge request GNOME/gtk!8035
2024-12-19 18:28:26 +00:00
Emmanuele Bassi
e742df985a Fix malformed translation file
The new hooks in place on gitlab.gnome.org use polib, which is stricter
than whatever the old hooks used.
2024-12-19 18:11:01 +00:00
Emmanuele Bassi
0fcc63649e testsuite: Replace XPM file
The XPM loader in GdkPixbuf is optional, so we should avoid using it.

See: #7143
2024-12-19 18:06:47 +00:00
Matthias Clasen
30f02d8981 Merge branch 'gtk-3-24' into 'gtk-3-24'
meson: fix glib max and min version constants

See merge request GNOME/gtk!8018
2024-12-12 13:03:36 +00:00
Bardia Moshiri
7fad209c71 meson: fix glib max and min version constants
these constants were wrong the whole time and they were ignored entirely

Signed-off-by: Bardia Moshiri <bardia@furilabs.com>
2024-12-12 01:59:24 -05:00
Matthias Clasen
6a59d61edd Merge branch 'wip/gtk-3-24-emoji-16' into 'gtk-3-24'
[gtk3] emoji: Update data to CLDR v46

See merge request GNOME/gtk!7992
2024-12-06 23:58:57 +00:00
Matthias Clasen
65df8d197d accelgroup: Fix a doc comment
The escaping madness with gtk-doc is different.

Lets see if this works.
2024-12-06 17:15:46 -05:00
Jeremy Bícha
a97513bd8d emoji: Update data to CLDR v46
Based on emojibase commit 04b7926

Contains the changes in Unicode 16.0

https://unicode.org/versions/Unicode16.0.0/
https://cldr.unicode.org/index/downloads/cldr-46
04b79264e4
2024-12-05 09:24:54 -05:00
Matthias Clasen
42783156bd Merge branch 'semantically-appropriate-spinbox-button-icons' into 'gtk-3-24'
Use semantically appropriate spinbox button icons

See merge request GNOME/gtk!7954
2024-11-21 19:20:51 +00:00
Nate Graham
3adefdb319 Use semantically appropriate spinbox button icons 2024-11-21 19:20:51 +00:00
Sveinn í Felli
6bb28fca79 Update Icelandic translation 2024-11-15 15:37:59 +00:00
Sveinn í Felli
eb5dc7aa70 Update Icelandic translation 2024-11-15 15:32:22 +00:00
Марко Костић
4f5e492d0f Update Serbian translation 2024-11-07 17:57:05 +00:00
Danial Behzadi
5d78d828ef Update fa.po 2024-11-04 10:02:42 +00:00
Matthias Clasen
d50e6742e6 Merge branch 'clear-settings-portal-gtk-3-24' into 'gtk-3-24'
wayland: Clear settings_portal when going to fallback with no portal settings

See merge request GNOME/gtk!7757
2024-09-29 13:25:24 +00:00
Matthias Clasen
c3c7f3b5f4 Merge branch 'default-cursor-size-gtk-3-24' into 'gtk-3-24'
wayland: Use the same default cursor size as gsettings schema

See merge request GNOME/gtk!7755
2024-09-28 14:33:34 +00:00
Ilya Fedin
5b5a32d445 wayland: Use the same default cursor size as gsettings schema
Fixes: #7043
2024-09-28 16:50:45 +04:00
Ilya Fedin
eed43d6468 wayland: Clear settings_portal when going to fallback with no portal settings
All other code paths with goto fallback clear it, this makes the behavior consistent with them
2024-09-28 16:42:31 +04:00
Matthias Clasen
31ecba29ed Merge branch 'really-fix-fonts-on-plasma-in-flatpak' into 'gtk-3-24'
wayland: Improve font setting fallback for real

See merge request GNOME/gtk!7748
2024-09-27 11:37:36 +00:00
Ilya Fedin
e82f5ac4d2 wayland: Improve font setting fallback for real
dfea8c31d9 added a check for portal settings array length but what it really checks is the amount of dbus out arguments.

This commit makes it do what gtk4 does: really check array length.

Fixes: #3838
2024-09-27 15:19:07 +04:00
Matthias Clasen
aba0314fe7 Merge branch 'cm/fix-submenu-leak' into 'gtk-3-24'
menuitem: Fix leak in _gtk_menu_item_popup_submenu

See merge request GNOME/gtk!7716
2024-09-17 05:38:41 +00:00
correctmost
3d737519f1 menuitem: Fix leak in _gtk_menu_item_popup_submenu
Previously, the PopupInfo data would leak if the timer was
cleared before the gtk_menu_item_popup_timeout callback ran.

Fixes #1715
2024-09-16 14:55:25 -04:00
Rūdolfs Mazurs
0dcb88bff2 Update Latvian translation 2024-09-11 19:55:48 +00:00
Alexander Shopov
d3a1ddb1f3 Update Bulgarian translation 2024-09-07 23:23:08 +00:00
Matthias Clasen
4c92ca1857 Merge branch 'gtk3-remove-warning-export-handle' into 'gtk-3-24'
Remove warning "Couldn't export handle, unsupported windowing system"

See merge request GNOME/gtk!7694
2024-09-06 12:39:18 +00:00
Hannes Müller
9191dfe2e2 Remove warning "Couldn't export handle, unsupported windowing system"
For GDK_WINDOWING_BROADWAY, GDK_WINDOWING_WIN32 and GDK_WINDOWING_QUARTZ
links open correctly. For example, for GDK_WINDOWING_WIN32 this happens
via gspawn-win32-helper.exe / gspawn-win32-helper-console.exe. If these
helpers are missing, a corresponding error message is displayed, see
e.g. gtk3-demo.exe => Links. So there are already other error messages
if something goes wrong. For gtk4 the behavior also occurs without
warning. In my view this warning is more confusing than helpful.
2024-09-06 13:06:02 +02:00
Balázs Meskó
40fbad6157 Update Hungarian translation 2024-08-30 14:40:08 +00:00
Matthias Clasen
354bc34eb1 Merge branch 'fix-gvfs-dnd-portal-gtk3' into 'gtk-3-24'
selection: Fix portal retrieval of GVFS files (for DnD into Firefox)

See merge request GNOME/gtk!7646
2024-08-24 17:57:32 +00:00
Matthijs Velsink
7d1b9bf280 selection: Fix portal retrieval of GVFS files
When drag-and-dropping a file from Nautilus to for example Firefox, this
does not work if the file is from a GVFS mounted source. The retrieved
URI with `g_file_get_uri()` still contains the protocol.

Instead, we can use `g_filename_to_uri()`, which resolves to the local
`file://...` URI instead.

A similar fix was applied to GTK4 on the sending side in commit
ea056d26.
2024-08-24 17:45:46 +02:00
Matthias Clasen
f22e5b0b23 Avoid criticals on headless systems
If we don't have a monitor, don't try to use it.
This avoids pointless critical warnings on headless systems.
2024-08-22 11:20:17 -04:00
Matthias Clasen
a9044bf00a Merge branch 'wayland-monitor-fix-for-3-24wq' into 'gtk-3-24'
Try to fix monitor geometry on sway

See merge request GNOME/gtk!7626
2024-08-18 21:16:33 +00:00
Matthias Clasen
1cf0520454 Try to fix monitor geometry on sway
The Wayland protocols around outputs are truly a disaster.

This is a backport of 854e40c60c0d32 from main in the hope
of getting monitor geometry to work across compositors.

Fixes: #6939
2024-08-17 21:48:37 -04:00
Matthias Clasen
8e6cc9b5c9 Merge branch 'work/gtk-3-24' into 'gtk-3-24'
gesture: set widget x and y if coordinate translation between widgets fails

See merge request GNOME/gtk!7513
2024-08-16 17:35:00 +00:00
Scrambled 777
ea50be567e Update Hindi translation 2024-08-13 18:42:05 +00:00
Scrambled 777
0521e38bcc Update Hindi translation 2024-08-13 18:39:28 +00:00
Matthias Clasen
82213003aa Merge branch 'michaelweghorn/gtk3_message_dialog_a11y_name' into 'gtk-3-24'
[gtk3] a11y: Use non-empty message dialog title as a11y name

See merge request GNOME/gtk!7587
2024-08-09 23:25:28 +00:00
Michael Weghorn
939737c3e7 a11y: Use non-empty message dialog title as a11y name
If a `GtkMessageDialog` has a non-empty title set, use
that for the accessible name instead of a generic name
indicating the type of the message dialog, as the
window title is generally more informative, if set.
It also better matches the information presented
visually on screen (in the window title, task switchers,...)
and is in line with the handling for non-message-dialog
windows.

This can easily be tested with the "Dialogs and
Message Boxes" sample from gtk3-demo when setting
a title for the message dialog in there like this:

    diff --git a/demos/gtk-demo/dialog.c b/demos/gtk-demo/dialog.c
    index 0eb1c62397..53fb7f8b0e 100644
    --- a/demos/gtk-demo/dialog.c
    +++ b/demos/gtk-demo/dialog.c
    @@ -25,6 +25,8 @@ message_dialog_clicked (GtkButton *button,
                                        "number of times:");
       gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
                                                 "%d", i);
    +  gtk_window_set_title (GTK_WINDOW (dialog), "Some informative title");
    +
       gtk_dialog_run (GTK_DIALOG (dialog));
       gtk_widget_destroy (dialog);
       i++;
2024-08-09 21:02:50 +02:00
Michael Weghorn
13f55cd3e6 a11y: Extract helper function to set GtkMessageDialog a11y name
Extract the existing logic to set an accessible name for the
`GtkMessageDialog` based on the message type from `setup_type`
to a new helper function `update_accessible_name`.

That helper function will be reused and extended in a follow-up
commit.
2024-08-09 21:00:54 +02:00
likai
a1046a13da gesture: set widget x and y if coordinate translation between widgets fails
Bug Description: In a GTK+ application with a menu bar, clicking the
menu item displays a dialog. However, when the user opens this dialog
and drags the parent window's menu bar with the cursor, the dialog
gets moved.
Issue: When _gtk_gesture_update_point calls the _update_widget_coordinates
function, the local variables x and y are not explicitly initialized, leading
to arbitrary values. For instance, in my case, x was 32767 and y was
-145750164 . These values are used in the subsequent call to
gtk_widget_translate_coordinates. In gtk_widget_translate_coordinates,
if ancestor is NULL, the function returns FALSE, and dest_x and dest_y
are not updated. The incorrect values of x and y cause data->widget_x
and data->widget_y to be incorrect, ultimately leading to abnormal
x and y values in the gtk_gesture_drag_update function.

To avoid this, we should set x and y to values clearly outside the widget.

Signed-off-by: Li Kai <likai@kylinos.cn>
2024-08-07 22:13:59 +08:00
Emmanuele Bassi
1d93015e1f Merge branch 'fix-virtual-memory-leak' into 'gtk-3-24'
Ensure the staging_cairo_surface is destroyed before re-assigning it

See merge request GNOME/gtk!7206
2024-08-07 13:21:13 +00:00
Matthias Clasen
8a9a5822b0 Merge branch 'im-multi' into 'gtk-3-24'
immulticontext: Don't have a global_context_id

See merge request GNOME/gtk!7545
2024-08-02 17:20:03 +00:00
Benjamin Otte
39345212e8 immulticontext: Don't have a global_context_id
Context IDs are dependant on the display - both because displays can use
different backends, but also because changing the GtkSetting is a
per-display operation.

So just remove the cache.
If it turns out we need a per-display cache, we can add one to
GtkSettings.

(cherry picked from commit 16d4ce4d0301b7af2a67703e792efdcf27b1d397
 with slight changes to use priv->client_window instead of
 priv->client_widget)
2024-08-02 17:27:16 +02:00
Matthias Clasen
02cec9b8c9 Merge branch 'gtk-gtk-3-24-xdg-foreign-v2' into 'gtk-3-24'
wayland: Add support for v2 of xdg_foreign protocol

See merge request GNOME/gtk!7440
2024-07-14 19:52:37 +00:00