Commit Graph

53346 Commits

Author SHA1 Message Date
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
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
Jason Francis
b8435aab39 wayland: Add support for v2 of xdg_foreign protocol 2024-07-11 18:31:37 +02:00
Matthias Clasen
28d53c1f95 Post-release version bump 2024-07-10 13:46:02 -04:00
Matthias Clasen
788f4de279 3.24.43 2024-07-10 13:03:14 -04:00
Danial Behzadi
cd9174daa2 Mark "%-e %b" as "no-c-format" for xgettext. 2024-07-01 19:31:40 +00:00
Danial Behzadi
56f4274c67 Update Persian translation 2024-07-01 19:06:37 +00:00
Danial Behzadi
aa0a6bbc5c Update Persian translation 2024-07-01 18:59:33 +00:00
Balázs Úr
f3d7fa5583 Update Hungarian translation 2024-06-28 15:27:01 +00:00
Daniel Rusek
626ff485f8 Update Czech translation 2024-06-16 13:18:43 +00:00
Matthias Clasen
e81aad25a1 Merge branch 'gtk3-module-loading-fix' into 'gtk-3-24'
Stop looking for modules in cwd

See merge request GNOME/gtk!7361
2024-06-15 21:58:49 +00:00
Matthias Clasen
3bbf0b6176 Stop looking for modules in cwd
This is just not a good idea. It is surprising, and can be misused.

Fixes: #6786
2024-06-15 14:18:01 -04:00
Luca Bacci
a8a03a4852 Merge branch 'wgl-usage-across-threads-324' into 'gtk-3-24'
3.24: GDK-Win32: Use wrapper functions for calling core wgl* functions (backport from GTK-4.x)

See merge request GNOME/gtk!7284
2024-05-23 15:34:40 +00:00
Luca Bacci
8ae6aee9c2 Merge branch 'gdk3_win32_fix_dnd_move_cursor' into 'gtk-3-24'
gdk3-win32: Fix invisible dnd-move cursor

See merge request GNOME/gtk!7288
2024-05-23 10:16:43 +00:00
g.willems
71de45cb83 win32: Fix invisible dnd-move cursor
The cursor currently disappears while in DnD "move" action.
Fix by assigning a standard arrow cursor.
2024-05-22 20:41:57 +02:00
Chun-wei Fan
a0306f758f GDK-Win32: Add wrapper functions for calling core wgl* functions
This is a backport from the GTK-4.x update, so that we can aim to
support gtkglsink in gst-plugins-good even on Windows, beyond using
just Cairo in gstsink for rendering.

From the commit message in GTK-4.x, in commit 627ee674:

We might be dealing with GL contexts from different threads, which have more
gotchas when we are using libepoxy, so in case the function pointers for
these are invalidated by wglMakeCurrent() calls outside of GTK/GDK, such as
in GstGL, we want to use these functions that are directly linked to
opengl32.dll provided by the system/ICD, by linking to opengl32.lib.

This will ensure that we will indeed call the "correct" wgl* functions that
we need.
2024-05-22 19:26:31 +08:00
Luca Bacci
60a3955ce2 Merge branch 'fix-win32-build-gcc14' into 'gtk-3-24'
gtkprintoperation-win32: fix the build on Windows with GCC 14.1.0

See merge request GNOME/gtk!7259
2024-05-18 10:47:48 +00:00
Christoph Reiter
fcc5219910 gtkprintoperation-win32: fix the build on Windows with GCC 14.1.0
Both cases expect a DLGTEMPLATE but the docs say that DLGTEMPLATEEX
works too, despite it being a different struct, so just cast it.
See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-createdialogindirectw

This avoids two "-Wincompatible-pointer-types" which GCC 14 switched
to being an error by default.
2024-05-16 23:04:27 +02:00
Matthias Clasen
f8018da0d7 3.24.42 2024-05-15 16:52:40 -04:00
Matthias Clasen
f050f24d35 Merge branch 'wip/abono/macos-tracking-area-leak' into 'gtk-3-24'
quartz: Remove trackingArea double reference

See merge request GNOME/gtk!7250
2024-05-14 10:55:06 +00:00
Fabio Lagalla
c07bffa624 quartz: Remove trackingArea double reference
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/6704
2024-05-14 12:30:34 +02:00
Matthias Clasen
8990eb4177 Merge branch 'michaelweghorn/gtk-3-24_port_from_deprecated_focus_event' into 'gtk-3-24'
a11y: Port from deprecated atk_focus_tracker_notify

See merge request GNOME/gtk!7239
2024-05-13 13:21:08 +00:00
Michael Weghorn
5147e95d1d a11y: Port from deprecated atk_focus_tracker_notify
Port `gail_focus_notify` from using the deprecated
`atk_focus_tracker_notify` to notify about the new
focus object. Notify of a state of the focused state
instead, as suggested in the
`atk_focus_tracker_notify` doc [1].

Using the deprecated function e.g. resulted in
the Orca screen reader no longer announcing
initial focus on editable comboboxes in
LibreOffice Writer's toolbars after Orca dropped
support for the deprecated "focus" AT-SPI event
in this commit [2]:

    commit 9e2902dd46c7e583a097e235dfd7e3c50b016383
    Author: Joanmarie Diggs <jdiggs@igalia.com>
    Date:   Wed May 1 12:14:07 2024 +0200

        Remove the on_focus handler for the LibreOffice script

        The "focus:" event was deprecated many years ago. If the expected
        "object:state-changed:focused" event is absent, that bug should
        be fixed.

This commit makes the announcement work again.

It also fixes the scenario described in [3].

[1] https://docs.gtk.org/atk/func.focus_tracker_notify.html
[2] 9e2902dd46
[3] https://gitlab.gnome.org/GNOME/gtk/-/issues/454#note_2099344

Fixes: #454
2024-05-08 12:52:42 +02:00
Matthias Clasen
ebc84a6185 Merge branch 'bump_dep_sysprof_capture' into 'gtk-3-24'
Build option '-Dprofiler=true' fails with latest sysprof-capture

See merge request GNOME/gtk!7225
2024-05-05 15:00:50 +00:00
Nelson Benítez León
0b220ce984 Build option '-Dprofiler=true' fails with latest sysprof-capture
I'm unable to compile gtk+-3 on Fedora 40 with profiler support
"-Dprofiler=true" because it looks for sysprof-capture-3 while
Fedora 40 only provides sysprof-capture-4.

GTK4 for the same build option only looks for sysprof-capture-4.
2024-05-04 17:19:59 +01:00
Rachida SACI
09fe1f263f Update Kabyle translation 2024-05-01 14:59:52 +00:00
Rachida SACI
0a4a84bc06 Update Kabyle translation 2024-05-01 14:57:07 +00:00
Danial Behzadi
6f89d6759e Update fa.po 2024-04-28 11:46:00 +00:00
Matthias Clasen
bb58c8a3fe Merge branch 'fix-gvalue-init-3-24' into 'gtk-3-24'
css: Avoid an uninitialized GValue

See merge request GNOME/gtk!7177
2024-04-24 12:05:13 +00:00
Matthias Clasen
5c3d176c00 css: Avoid an uninitialized GValue
One of the confusing aspects of GOBject. When we say
'an uninitialized GValue', we mean one that is declared
via GValue v = G_VALUE_INIT;

Fixes: #6655
2024-04-24 07:24:27 -04:00
Luca Bacci
0759e84951 Merge branch 'imm-check-valid-unicode' into 'gtk-3-24'
GtkIMContextIME: Avoid committing NULL string

See merge request GNOME/gtk!7167
2024-04-22 13:19:59 +00:00
Luca Bacci
f003609d35 GtkIMContextIME: Avoid committing NULL string
We may get invalid UTF-16 sequences when third party
apps or hooks inject WM_CHAR messages.

Validate the unicode string before committing.

Fixes https://gitlab.com/inkscape/inkscape/-/issues/2088
2024-04-22 14:53:12 +02:00
Danial Behzadi
30d7f33579 Update Persian translation 2024-04-15 16:33:06 +00:00
Matthias Clasen
46fe3224dd Merge branch 'wip/gtk3-uncommitted-ack-configure' into 'gtk-3-24'
wayland: Always commit soon after xdg_surface.ack_configure

See merge request GNOME/gtk!7139
2024-04-14 21:00:56 +00:00
Jonas Ådahl
bdddc3857c wayland: Always commit soon after xdg_surface.ack_configure
It's mandatory to reply to a xdg_surface.configure with a
xdg_surface.ack_configure, as well as a wl_surface.commit to have the
ack_configure to have any effect. We failed to do that if the new
configuration didn't cause any actual anything to change, meaning we'd
just ack_configure, but potentially never commit.

Fix this by requesting a 'after-paint' frame clock phase, while setting
the pending commit state to true. If we were already to paint, the new
requested phase would happen anyway, but to avoid double
wl_surface.commit when also using eglSwapBuffers*(), also avoid
performing the commit if we know the swap buffers will happen.
2024-04-14 21:24:19 +02:00
Ekaterine Papava
e6c6552160 Update Georgian translation 2024-04-12 13:49:04 +00:00
Danial Behzadi
bb34e4672e Update Persian translation 2024-04-07 14:49:00 +00:00
Athmane MOKRAOUI
5fc8c808d2 Add Kabyle translation 2024-04-07 11:21:45 +00:00
Athmane MOKRAOUI
3a691b8f75 Add Kabyle translation 2024-04-07 10:24:54 +00:00
Yaron Shahrabani
a7817b5b50 Update Hebrew translation 2024-04-07 05:13:32 +00:00
Matthias Clasen
6a2989866f Merge branch 'sync-dnd-cursors' into 'gtk-3-24'
wayland: Guarantee dnd-move as a cursor name

See merge request GNOME/gtk!7102
2024-04-04 09:09:22 +00:00
Matthias Clasen
1c8ec31162 Sync drag cursors with GTK4
Use the same cursors during dnd as we do in GTK 4.
2024-04-04 10:31:39 +02:00
Matthias Clasen
0844a88558 wayland: Guarantee dnd-move as a cursor name
We need to go back to using this, since move is widely abused
and thus can't change its image to one thats appropriate for dnd.
2024-04-04 10:31:08 +02:00
Matthias Clasen
140e32da63 Merge branch 'fix-glarea-transparency' into 'gtk-3-24'
Revert 7237f5d0eb

See merge request GNOME/gtk!7079
2024-03-29 06:48:11 +00:00
Matthias Clasen
6754765a5a Revert 7237f5d0eb
This commit was identified as the cause for a GLArea transparency
regression. Bring the required code back.

Fixes: #6359
2024-03-28 07:58:37 +01:00
Carlos Garnacho
85d62e90e9 Merge branch 'tracker3-backport' into 'gtk-3-24'
Backport tracker3 performance improvements

See merge request GNOME/gtk!7051
2024-03-25 17:37:00 +00:00
Carlos Garnacho
e9f2daa445
searchengine: Do not fight filechooser search mode sorting
Provide the hits in an order that is more easily consumed by the
filechooser, and less jarring when populating.
2024-03-18 02:02:04 +01:00
Carlos Garnacho
b62a280e0c
searchengine: Bail out on the first character
Again on massive filesystems, the very first character
is likely to bring a likewise massive amount of search
results that we need to maybe query info for, then create
icons and widgets for. While it's impressive we can do
that, it's also expensive and likely pointless, for the
first character.

Typing a second character is however very likely to
considerably reduce the amount of items to categorize and
show. So start actually searching from there.

Testing on a filesystem with 1434099 files indexed, trying 5
semi-random 1 character searches (n, h, t, i, o) returns on
average 168K items (min. 78771, max. 331471), trying 5
semi-random 2 character searches (no, he, th, in, on)
returns on average 34K items (min. 11133, max. 94961),
which is a more approachable set.

Doing this is enough that typing on a filechooser search
entry feels completely fluid.
2024-03-18 02:02:03 +01:00
Carlos Garnacho
4baa0b47e2
searchengine: Ensure some GFileInfo fields
The search provider should make it sure there are some
specific GFileInfo fields set. Fix the mimetype extraction
from the query, and use that to fill in the missing gaps
the best we can.
2024-03-18 02:02:03 +01:00
Carlos Garnacho
f550bd6391
searchengine: Populate filesystem model in an idle
When starting a search over a very populated filesystem, it
is possible that typing the first chars will return a too
high number of results. Even though iterating through the
cursor is in itself very fast, extracting the GIO information
from those many files at once is not going to be as fast.

In order to increase interactivity (i.e. not make things
possibly sluggish) iterate the cursor in an idle function
and add search results to the filechooser model little by little.

If the user keeps typing (as it is likely will happen), there
will be better chances to cancel and proceed to the next
query timely. If not, the results will be there soon enough.
2024-03-18 02:02:01 +01:00