Commit Graph

73722 Commits

Author SHA1 Message Date
Luca Bacci
5844ecf381 Merge branch 'include-hicolor-index-theme-as-resource-rebased' into 'main'
Include hicolor index.theme as a resource (rebased)

Closes #5303

See merge request GNOME/gtk!5361
2022-12-20 21:52:17 -05:00
Benjamin Otte
afaeadcf67 Merge branch 'cherry-pick-ae097d96' into 'gtk-4-8'
listbase: Cancel rubberband if not handling drag

See merge request GNOME/gtk!5363
2022-12-21 02:41:07 +00:00
Benjamin Otte
14823c6bd6 Merge branch 'wip/antoniof/listbase-rubberband-better-fix' into 'main'
listbase: Cancel rubberband if not handling drag

See merge request GNOME/gtk!4831

(cherry picked from commit ae097d9674)

efbd2289 listbase: Cancel rubberband if not handling drag
2022-12-20 20:19:15 -05:00
Aleksandr Melman
a2d95db723 Update Russian translation 2022-12-20 09:21:34 +00:00
Matthias Clasen
ecbfccfc55 Merge branch 'cherry-pick-1f001a8f' into 'gtk-4-8'
Merge branch 'wip/corey/listbase-focus' into 'main'

See merge request GNOME/gtk!5338
2022-12-15 17:10:33 +00:00
Matthias Clasen
ef6f9cd7c6 Merge branch 'cherry-pick-e8f70be2' into 'gtk-4-8'
Merge branch 'wip/otte/for-5422' into 'main'

See merge request GNOME/gtk!5331
2022-12-15 16:27:57 +00:00
Benjamin Otte
9df10fa96f Merge branch 'wip/corey/listbase-focus' into 'main'
listbase: Use set_focus_child properly

Closes #5433 and #5432

See merge request GNOME/gtk!5169

(cherry picked from commit 1f001a8f6a)

7081bfc6 listbase: Split scroll_to_item for reuse
93e591fd listbase: Use set_focus_child properly
2022-12-14 22:21:54 -05:00
Matthias Clasen
779f8063d3 Merge branch 'x11-fixes-backports-4-8' into 'gtk-4-8'
Assorted x11 fix backports

See merge request GNOME/gtk!5333
2022-12-15 00:25:25 +00:00
Matthias Clasen
24508e07f0 Merge branch 'update-ci-image-4-8' into 'gtk-4-8'
text: Prevent unexpected notify::direction emissions

See merge request GNOME/gtk!5334
2022-12-15 00:24:54 +00:00
Matthias Clasen
dcc0da218a Getting desperate 2022-12-14 15:25:15 -05:00
Matthias Clasen
70cb06abcd ci: Another fixup 2022-12-14 14:29:47 -05:00
Matthias Clasen
1f40e88153 ci: Add /home/user/.local/bin to PATH 2022-12-14 13:51:42 -05:00
Matthias Clasen
93df6447fa Install meson 0.64 in ci jobs 2022-12-14 12:49:54 -05:00
Matthias Clasen
1e60aa122a ci: Try to defeat the caching
Drop subprojects/glib from the caching, since it
fails to update.
2022-12-14 12:49:54 -05:00
Emmanuele Bassi
cee282a282 vulkan: Add missing enumeration
Check for VK_ERROR_COMPRESSION_EXHAUSTED_EXT.
2022-12-14 12:48:32 -05:00
Matthias Clasen
19aa79d511 Don't emit ::notify from a getter
GdkX11Keymap ddetermines the direction of the
keymap on demand, and was emitting notify::direction
2022-12-14 11:28:19 -05:00
Matthias Clasen
55d8469fde mountoperation: Add a mnemonic to a button
This is a good practice, even if this is a rarely
used dialog.
2022-12-14 11:28:19 -05:00
Matthias Clasen
8d4a14e082 mountoperation: Don't use a treeview
Port the process list from GtkTreeView
to GtkListView, and fix a number of broken
things along the way.
2022-12-14 11:28:19 -05:00
Matthias Clasen
3ab28f8f8e testmountoperation: Test process dialog
Without this, it is hard to trigger the
dialog. Event with this, we have to force
GtkMountOperation to use its own dialog.
2022-12-14 11:28:19 -05:00
Matthias Clasen
55dd442955 mountoperation: Survive on Wayland
The code was assuming it is dealing with an
X11 display, and trigger assertions. Fix that
to make it work at least as well as it does
on Windows.
2022-12-14 11:28:19 -05:00
Matthias Clasen
9f4baac5a2 text: Prevent unexpected notify::direction emissions
Calling gdk_device_get_direction can trigger a
notify::direction emissions, since the X11 backend
determines the direction on demand. Prevent that by
forcing the direction to be determined ahead of time.

Fixes: #5311
2022-12-14 11:28:19 -05:00
Carlos Garnacho
0dbf91123d gdk/x11: Clear all data in GdkSurfaceX11 finalization
Currently, the GdkSurfaceX11 implementation relies that the upper
layers hid the surface before destruction, and that no
GdkSurfaceClass.compute_resize happened between them. If these
circumstances happened, there would be a compute_size timeout left
dangling after the surface got destroyed, poking at incorrect data
later on. Something that looks like this was reported in the
recent mutter-x11-frames "SSD frames server":

    mutter-x11-frames:423016): GLib-GObject-WARNING **: 19:41:16.869: invalid unclassed pointer in cast to 'GtkWindow'

    Thread 1 "mutter-x11-fram" received signal SIGTRAP, Trace/breakpoint trap.
    g_logv (log_domain=0x7ffff7f7c4f8 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1433
    1433	../../../glib/gmessages.c: No such file or directory.
    (gdb) bt
    #0  g_logv (log_domain=0x7ffff7f7c4f8 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1433
    #1  0x00007ffff73470ff in g_log (log_domain=log_domain@entry=0x7ffff7f7c4f8 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x7ffff7f84da8 "invalid unclassed pointer in cast to '%s'")
        at ../../../glib/gmessages.c:1471
    #2  0x00007ffff7f72892 in g_type_check_instance_cast (type_instance=type_instance@entry=0x5555558e04b0, iface_type=<optimized out>) at ../../../gobject/gtype.c:4144
    #3  0x00007ffff791e77d in toplevel_compute_size (toplevel=<optimized out>, size=0x7fffffffe170, widget=0x5555558e04b0) at ../../../gtk/gtkwindow.c:4227
    #4  0x00007ffff7f4f3b0 in g_closure_invoke (closure=0x555555898cc0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffdeb0, invocation_hint=invocation_hint@entry=0x7fffffffde30)
        at ../../../gobject/gclosure.c:832
    #5  0x00007ffff7f62076 in signal_emit_unlocked_R
        (node=node@entry=0x55555588feb0, detail=detail@entry=0, instance=instance@entry=0x55555560e990, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffdeb0)
        at ../../../gobject/gsignal.c:3796
    #6  0x00007ffff7f68bf5 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffe050) at ../../../gobject/gsignal.c:3549
    #7  0x00007ffff7f68dbf in <emit signal ??? on instance 0x55555560e990 [GdkX11Toplevel]> (instance=<optimized out>, signal_id=<optimized out>, detail=detail@entry=0) at ../../../gobject/gsignal.c:3606
    #8  0x00007ffff7a8de96 in gdk_toplevel_notify_compute_size (toplevel=<optimized out>, size=size@entry=0x7fffffffe170) at ../../../gdk/gdktoplevel.c:112
    #9  0x00007ffff7a4b15a in compute_toplevel_size (surface=surface@entry=0x55555560e990 [GdkX11Toplevel], update_geometry=update_geometry@entry=1, width=width@entry=0x7fffffffe220, height=height@entry=0x7fffffffe224)
        at ../../../gdk/x11/gdksurface-x11.c:281
    #10 0x00007ffff7a4c3b2 in compute_size_idle (user_data=0x55555560e990) at ../../../gdk/x11/gdksurface-x11.c:356
    #11 0x00007ffff733f67f in g_main_dispatch (context=0x55555563f6e0) at ../../../glib/gmain.c:3444
    #12 g_main_context_dispatch (context=context@entry=0x55555563f6e0) at ../../../glib/gmain.c:4162
    #13 0x00007ffff733fa38 in g_main_context_iterate (context=0x55555563f6e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4238
    #14 0x00007ffff733fcef in g_main_loop_run (loop=loop@entry=0x5555560874a0) at ../../../glib/gmain.c:4438
    #15 0x0000555555557de0 in main (argc=<optimized out>, argv=<optimized out>) at ../src/frames/main.c:68

It perhaps makes sense to warn in these situations, but either way
it sounds like gdk_surface_x11_finalize() could enforce the correct
behavior by ensuring there is no dangling timeouts/data. This commit
does that.
2022-12-14 07:41:03 -05:00
Matthias Clasen
4733352ce3 Don't emit ::notify from a getter
GdkX11Keymap ddetermines the direction of the
keymap on demand, and was emitting notify::direction
2022-12-14 07:36:11 -05:00
Danial Behzadi
aabae92482 Update Persian translation 2022-12-14 12:33:15 +00:00
Matthias Clasen
b2380a21ef mountoperation: Add a mnemonic to a button
This is a good practice, even if this is a rarely
used dialog.
2022-12-14 07:27:27 -05:00
Matthias Clasen
573204987c mountoperation: Don't use a treeview
Port the process list from GtkTreeView
to GtkListView, and fix a number of broken
things along the way.
2022-12-14 07:27:00 -05:00
Matthias Clasen
2f84859847 testmountoperation: Test process dialog
Without this, it is hard to trigger the
dialog. Event with this, we have to force
GtkMountOperation to use its own dialog.
2022-12-14 07:26:54 -05:00
Matthias Clasen
f4abf696f2 mountoperation: Survive on Wayland
The code was assuming it is dealing with an
X11 display, and trigger assertions. Fix that
to make it work at least as well as it does
on Windows.
2022-12-14 07:26:43 -05:00
Corey Berla
dc59b1c588 Merge branch 'wip/otte/for-5422' into 'main'
contentserializer: Serialize to file:// if possible

Closes #5422

See merge request GNOME/gtk!5330

(cherry picked from commit e8f70be2c1)

ea056d26 contentserializer: Serialize to file:// if possible
2022-12-14 07:25:48 -05:00
Matthias Clasen
88c6c55d3a text: Prevent unexpected notify::direction emissions
Calling gdk_device_get_direction can trigger a
notify::direction emissions, since the X11 backend
determines the direction on demand. Prevent that by
forcing the direction to be determined ahead of time.

Fixes: #5311
2022-12-14 07:25:30 -05:00
Matthias Clasen
c7185c65c9 Merge branch 'wip/corey/cherrypick-from-main' into 'gtk-4-8'
Cherrypick into 4.8

See merge request GNOME/gtk!5312
2022-12-09 21:26:30 +00:00
Olga Smirnova
d758ea2e5e Add Interlingue translation 2022-12-09 20:36:05 +00:00
Corey Berla
4a04cf610e atspicontext: Log more helpful warnings when the a11y bus doesn't exist 2022-12-09 08:09:28 -10:00
Corey Berla
9252b88c23 atspicontext: Cache empty atspi bus address
We are caching the bus address as data on the display object when it
exists, but fail to set the data when the bus address doesn't exist.
That causing excessive calls to GetAddress when the accesssbility
bus doesn't exist. Make sure to cache a non-existent accessibility
bus by setting the "" string.
2022-12-09 08:09:24 -10:00
Corey Berla
b2356dbe7b atspicontext: Log failure to connect to a11y
GTK depends on the a11y infrastructure to be in place unless GTK_A11Y is
set to none.  It appears that despite that, users attempt to
get around the a11y requirement without setting GTK_A11Y.
This can cause, amongst other issues, performance problems
with gtk applications.  Log failure to connect to the a11y
bus.
2022-12-09 08:09:05 -10:00
Asier Sarasua Garmendia
5186430d9d Update Basque translation 2022-12-03 09:45:52 +00:00
Benjamin Otte
272e354d57 Merge branch 'cherry-pick-a9c9678e' into 'gtk-4-8'
Merge branch 'workaround-glx-issue' into 'main'

See merge request GNOME/gtk!5287
2022-12-02 17:10:38 +00:00
Benjamin Otte
b17ccd13e6 Merge branch 'workaround-glx-issue' into 'main'
GLX: Add extra glXMakeContextCurrent () call to work around a DRI issue

Closes #4499, #5387, and #5170

See merge request GNOME/gtk!5285

(cherry picked from commit a9c9678e1f)

f788e994 GLX: Add extra glXMakeContextCurrent () call to work around a DRI issue
2022-12-02 11:09:11 -05:00
Nart Tlisha
b061d413e4 Update Abkhazian translation 2022-12-02 10:13:21 +00:00
Matthias Clasen
3ec2526776 Merge branch 'wip/smcv/ci-4-8' into 'gtk-4-8'
[4.8.x] subprojects: Pin GLib to version 2.74.x

See merge request GNOME/gtk!5252
2022-11-25 14:23:22 +00:00
Simon McVittie
e50fbb6c86 subprojects: Pin GLib to version 2.74.x
GLib 2.74.x and GTK 4.8.x both correspond to the GNOME 43 cycle. Keeping
GLib on the 2.74.x branch avoids a CI regression when GLib git main
depends on a newer Meson version than the one GTK's CI installs, which
has happened in 2.75.x as a result of GNOME/glib!3077.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-24 10:25:43 +00:00
Carlos Garnacho
753c6f2435 Merge branch 'wip/carlosg/osk-activation-4-8' into 'gtk-4-8'
gtktext: Claim gesture more selectively [4.8]

See merge request GNOME/gtk!5233
2022-11-18 18:25:59 +00:00
Carlos Garnacho
cc5ba83eba gdksurface: Do not consider GDK_TOUCH_END/CANCEL as popup-dismiss worthy
GDK_TOUCH_END deserves the same treatment than GDK_BUTTON_RELEASE, since it's
subject to the same circumstances (popping up a menu on long press would be
immediately dismissed on release if we handled them there). Ideally, we would
want to match releases that we obtained a press for while grabbed, but as
the popup is also dismissed on GDK_BUTTON_PRESS/GDK_TOUCH_BEGIN, there's no
use for this tracking.

And GDK_TOUCH_CANCEL sounds weird as a reason to dismiss popups, just like
crossing events would.

Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/2512

(cherry-picked from commit 2ff4c77c5500110e2b387a8764ab19a92045ff4e)
2022-11-18 18:36:50 +01:00
Carlos Garnacho
3b940b12f6 gtktext: Claim gesture more selectively
Even though button 1 (or touch down) presses do most often have
an effect in one way or another (starting drag, moving focus,
starting selection, ...), there is one situation that they do
immediately nothing: When clicking on the entry does not move
the text caret around. Dragging might start a selection, but
the entry did not do anything just yet, and an immediate
button/touch release should remain at "did nothing".

And that is precisely the hint that the Wayland IM context's click
gesture takes, clicks that do not scroll nor move the caret around,
having the GtkText not claim the gesture in that situation makes
the IM gesture able to do its thing without in-fighting.

This is typically not a problem when the GtkText is embedded in
another GtkEditable implementation (e.g. GtkEntry), since the
IM gesture is inactive and capturing from the parent widget, so
gets a pass that it otherwise doesn't get when both gestures are
in the same widget. This makes it work regardless of GtkText not
being a child of a composite widget, like NautilusQueryEditor
and AdwRowEntry.

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

(cherry-picked from commit 09b982f0264e42bda3e8471bb25abec5ee742ecc)
2022-11-18 18:36:32 +01:00
Matthias Clasen
205783d9b0 Merge branch 'cherry-pick-4.8' into 'gtk-4-8'
Cherry-pick changes from main for gtk-4-8

See merge request GNOME/gtk!5213
2022-11-17 03:49:51 +00:00
Carlos Garnacho
873c304a94 gdk/wayland: Use serial of the latest implicit grab available
When getting the serial for primary/clipboard selections we used a
function that largely relied on a GdkEvent being passed. We have
another available function that looks up the most recent serial
given the ongoing touch/tablet input as well.

This is the second best, compared to actually knowing the
input/device from the event that was received by the UI an triggered
the clipboard operation, and is already in use in other places
(e.g. window dragging). It is valid for these situations too.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5250
2022-11-12 04:14:47 +02:00
Colin Kinloch
e551a9d1c4 wayland: calculate union of geometry of all monitors for toplevel bounds
Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
2022-11-12 03:38:13 +02:00
Adam Williamson
824ff01eee focus: fall back to old behaviour if we didn't focus anything
8455b9ac74 seems to have introduced a problem where we can wind
up focusing no widget at all if the `while (parent)` loop doesn't
find a widget it can successfully move the focus to. This 'fixes'
that by falling back to doing the previous thing if we make it
all the way through that loop without moving the focus. Thanks to
@coreyberla for a hint to improve the implementation.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-11-12 03:37:52 +02:00
Carlos Garnacho
9b74027dea gdk/wayland: Fix button mask calculation on button events
There's 2 things broken here:
- The mask was calculated on top of the GDK button (i.e. skipping
  4-7 buttons), so GDK_BUTTON4_MASK and GDK_BUTTON5_MASK were not
  assigned. This is now calculated on the (continuous) BTN_ evcodes
  so it is guaranteed that the next 2 physical buttons (i.e.
  back/forward) get these two places in the mask assigned.
- Furthermore, these buttons would be pushed to places in the
  modifier mask that they didn't belong to. It is now checked hard
  that only the first 5 buttons enable a modifier flag.

Overall, this ensures that no event masks with bonkers values are
forwarded, and that no stale implicit grabs are left after additional
buttons are pressed.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5301
2022-11-12 03:37:34 +02:00
Luca Bacci
5b98e171b2 Merge branch 'do-not-block-input-wm-mouse-activate-gtk-4-8' into 'gtk-4-8'
GdkWin32: do not block input in advance from WM_MOUSEACTIVATE

See merge request GNOME/gtk!5207
2022-11-10 08:50:29 +00:00