Commit Graph

73009 Commits

Author SHA1 Message Date
António Fernandes
dc4540fae9 listbase: Don't start rubberband on ::drag-end
GtkGestrureDrag::drag-end can be emitted when the pointer has just
crossed the drag threshold and we have not started the rubberband yet.
This happens if another gesture has claimed the event sequence earlier
in the current event propagation chain.

In such situation, our ::drag-end calls gtk_list_base_drag_update(), 
which proceeds to start the rubberband. That's obviously wrong.
Additionally, it also tries to get modifiers from an event it we are 
already denied,  which obviously fails with criticals:

`gdk_event_get_modifier_state: assertion 'GDK_IS_EVENT (event)' failed`

Thus, if there is no rubberband when we receive ::drag-end, do nothing.
2022-06-04 17:30:10 +00:00
Matthias Clasen
31da5f7e2a Merge branch 'expand-builtin-icontheme' into 'main'
Add more directories to the builtin hicolor index

Closes #4960

See merge request GNOME/gtk!4786
2022-06-04 10:44:48 +00:00
Matthias Clasen
48228efe42 Merge branch 'wip/carlosg/activation-roundtrip-fix' into 'main'
gdk/wayland: Check the GdkSurface wl_surface before using it for activation

Closes gnome-control-center#1862

See merge request GNOME/gtk!4789
2022-06-02 21:24:10 +00:00
Carlos Garnacho
4b41d4f78c gdk/wayland: Check the GdkSurface wl_surface before using it for activation
Double check the GdkSurface has a wl_surface before using it as the activation
token source, since we cannot use NULL surfaces here.

Fixes: https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1862
2022-06-02 23:08:40 +02:00
Carlos Garnacho
fb68600d88 gdk/wayland: Dispatch GdkAppLaunchContext activation token in its own queue
Use a separate queue to dispatch the token object exclusively, just like we
do on the GdkSurface activation paths.
2022-06-02 23:08:40 +02:00
Matthias Clasen
0e6a3ab397 Merge branch 'ebassi/a11y-text-extents' into 'main'
a11y: Implement atspi.Text.GetCharacterExtents for GtkTextView

See merge request GNOME/gtk!4754
2022-06-02 17:13:53 +00:00
Carlos Garnacho
e895f7dd70 a11y: Transform GetCharacterExtents coords to native surface ones
These coordinates are "window"-relative, so transform textview coordinates
to the coordinate system of the GtkNative containing it.
2022-06-02 14:35:53 +02:00
Matthias Clasen
dae892d8f6 Add more directories to the builtin hicolor index
We haven't had any scalable directories in this list.
Add some. Since we seem to have settled on including
just actions and status as subdirectories for each
size, add scalable/actions and scalable/status.

Fixes: #4960
2022-06-02 06:38:12 -04:00
Matthias Clasen
ad5c3168a9 Merge branch 'wip/chergert/GTK_DEBUG_TEXT_DIR' into 'main'
main: add GTK_DEBUG_TEXT_DIR environment variable

See merge request GNOME/gtk!4768
2022-06-01 18:54:54 +00:00
Christian Hergert
8f1db27b6b gtkmain: add support for GTK_DEBUG=invert-text-dir
This allows inverting the default text-direction in an application for
debugging, testing, and QA purposes. IDEs such as Builder may automate this
to encourage more application developers to test with a text-direction
different than their own.
2022-06-01 11:26:44 -07:00
Matthias Clasen
56a1cbe217 Merge branch 'wip/chergert/fix-lookup-with-interfaces' into 'main'
builderparser: fix <lookup/> with interface types

See merge request GNOME/gtk!4782
2022-06-01 00:13:44 +00:00
Christian Hergert
63e9e7e899 builderparser: fix <lookup/> with interface types
If we have a <lookup name="foo" type="SomeInterface"> a runtime warning
would be emitted and the expression would fail to be created. This is
because the interfaces will likely be a GObject as well, meaning we check
the object type branch instead of the interface.

Instead, we need to use the fundamental type like other parts of the
expression system use.
2022-05-31 15:58:21 -07:00
Matthias Clasen
480a933546 Merge branch 'matthiasc/for-main' into 'main'
shortcutcontroller: Fix a typo

See merge request GNOME/gtk!4778
2022-05-30 21:05:34 +00:00
Matthias Clasen
2623c396cb shortcutcontroller: Fix a typo 2022-05-30 16:27:03 -04:00
Pablo Correa Gómez
826fdc4a80
glcontext: Improve documentation on get_use_es api 2022-05-30 20:48:47 +02:00
Carlos Garnacho
3b088281ca Merge branch 'gesture-click-unpaired-release-nullable-sequence' into 'main'
Mark sequence parameter in GtkGestureClick::unpaired-release signal as nullable

See merge request GNOME/gtk!4777
2022-05-30 09:55:29 +00:00
Sebastian Dröge
e61aecd67e Mark sequence parameter in GtkGestureClick::unpaired-release signal as nullable 2022-05-30 11:33:59 +03:00
Aurimas Černius
bd68339390 Updated Lithuanian translation 2022-05-29 23:05:31 +03:00
Matthias Clasen
491d1f67c7 Merge branch 'fix-tests-with-recent-glib' into 'main'
Avoid g_log_set_writer_func in tests

See merge request GNOME/gtk!4772
2022-05-28 15:34:13 +00:00
Matthias Clasen
73dc741a82 Avoid g_log_set_writer_func in tests
It is not usable anymore since GLib 2.72.
2022-05-28 10:43:26 -04:00
Luming Zh
38ec040fce Update Chinese (China) translation 2022-05-28 01:52:42 +00:00
Matthias Clasen
6bb1873183 Merge branch 'headerbar-demo-upgrade' into 'main'
Make our demos more likable

See merge request GNOME/gtk!4769
2022-05-27 22:18:26 +00:00
Matthias Clasen
5ba5693efd Make our demos more likable
Nobody likes Facebook.
Everybody loves the Eagles.
2022-05-27 17:34:55 -04:00
Matthias Clasen
797cc2e91b Merge branch 'wayland-cursor-scale2' into 'main'
wayland: scale cursors to the right size

See merge request GNOME/gtk!4766
2022-05-27 16:47:38 +00:00
Matthias Clasen
5507b3f8c1 wayland: scale cursors to the right size
When loading cursors at scale, we expect the
cursor images to have a size of scale * size.
If we don't find such images, load them at their
unscaled size and scale them up ourselves.

Without this, cursors will appear in unexpected
sizes depending on scales and themes.

Related: #4746
2022-05-27 12:26:45 -04:00
Matthias Clasen
f9a3f13702 Merge branch 'main' into 'main'
GtkIMContextSimple: array bounds was not correctly checked

Closes #4771

See merge request GNOME/gtk!4748
2022-05-27 14:24:54 +00:00
Matthias Clasen
b4c72ac508 Merge branch 'use-flathub-link' into 'main'
Make the formatted link more neutral

See merge request GNOME/gtk!4765
2022-05-27 14:10:47 +00:00
Matthias Clasen
bcad305136 Make the formatted link more neutral
There have been complaints about company names in
our demos. Lets use something else.

Part of: #4716
2022-05-27 08:43:06 -04:00
Matthias Clasen
00d45c6743 Merge branch 'update-initial-layout' into 'main'
vulkan: Set initial layout to undefined

See merge request GNOME/gtk!4706
2022-05-27 12:26:24 +00:00
Matthias Clasen
38b393ff5d Merge branch 'update-command-buffer-freeing' into 'main'
vulkan: Don't attempt to free 0 command buffers

See merge request GNOME/gtk!4705
2022-05-27 12:25:48 +00:00
Matthias Clasen
23f92ca1c2 Merge branch 'wayland-cursor-scale' into 'main'
wayland: Sanity check cursor image size

Closes #4746

See merge request GNOME/gtk!4761
2022-05-27 10:58:12 +00:00
Matthias Clasen
34a9bc4632 wayland: Make cursors have the right size
The Wayland protocol requires that width and height
of cursor surfaces is an integer multiple of the
surface scale. Make it so.

Fixes: #4746
2022-05-26 22:29:37 -04:00
Matthias Clasen
d603164ec2 wayland: Sanity check cursor image size
On Wayland it is a protocol violation to upload buffers with
dimensions that are not an integer multiple of the buffer scale.

Until recently, Mutter did not enforce this. When it started
doing so, some users started seeing crashes in GTK apps because the
cursor theme ended up with e.g. a 15x16 pixel image at scale of 2.

Add a small sanity check for this case.
2022-05-26 22:29:37 -04:00
Matthias Clasen
a033e838b2 Merge branch 'TTMaZa-LGPL-vs-GPL' into 'main'
GDK is LGPL-2.1-or-later not GPL-2.1-or-later, right?

See merge request GNOME/gtk!4755
2022-05-26 12:23:56 +00:00
Matthias Clasen
511a2f4d03 Merge branch 'wip/chergert/fix-sysprof-wrapper' into 'main'
build: fix sysprof default options

See merge request GNOME/gtk!4759
2022-05-26 11:43:56 +00:00
Matthias Clasen
c089912a52 Merge branch 'wip/otte/for-main' into 'main'
x11: Always update shadow size

Closes #4136

See merge request GNOME/gtk!4758
2022-05-26 10:03:39 +00:00
Christian Hergert
2694d81d63 build: fix sysprof default options
Sysprof just recently cleaned up it's meson_options.txt and this makes
the tracking of the master branch match the new values.
2022-05-25 22:52:34 -07:00
Benjamin Otte
213490099b x11: Always update shadow size
Not updating shadow size unconditionally would lead to shadow size not
being set on map, which would lead mutter to think that we are a Window
without extents and then become confused when we suddenly set some.

Make sure that doesn't happen by always having shadows set on map, just
like GTK3.

Fixes #4136
2022-05-26 04:38:29 +02:00
Emmanuele Bassi
166af48904 Merge branch 'fix-stack-page-at-spi-parent' into 'main'
a11y: Realize GtkStackPage parent context before trying to get a ref

Closes #4944

See merge request GNOME/gtk!4757
2022-05-25 14:29:41 +00:00
Sebastian Keller
6e3dbc42a8 a11y: Realize GtkStackPage parent context before trying to get a ref
If a context is not realized, calling gtk_at_spi_context_to_ref() will
return a null ref, because its path has not been initialized yet. This
was already done for all other cases in get_parent_context_ref(), but
was missing for the GtkStackPage case.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4944
2022-05-25 14:56:05 +02:00
Matthias Clasen
36fbbfc5c7 Merge branch 'pkgconfig' into 'main'
Meson: Simplify pkgconfig file generator

See merge request GNOME/gtk!4756
2022-05-24 16:46:18 +00:00
Luca Bacci
9bfc89e23d Merge branch 'remove-emulated-scroll-events' into 'main'
Drop pointer_emulated discrete scroll events

See merge request GNOME/gtk!4694
2022-05-24 15:26:24 +00:00
Xavier Claessens
802bf41999 Meson: Simplify pkgconfig file generator
Meson knows all private dependencies itself when passing the library as
first positional argument, no need to specify them manually. Also
simplify backend specific files by simply requiring gtk4, just like
unix-print already did.

This should fix generated gtk4-uninstalled.pc, see Meson bug report:
https://github.com/mesonbuild/meson/issues/10415
2022-05-24 10:30:58 -04:00
Manuel Zabelt
93636d4c5a Update docs/reference/gdk/gdk4-x11.toml.in 2022-05-24 13:37:43 +00:00
Manuel Zabelt
88f761f2c8 GDK is LGPL-2.1-or-later not GPL-2.1-or-later, right? 2022-05-24 13:36:07 +00:00
Luca Bacci
7752467847 Drop pointer_emulated discrete scroll events
GTK4 has had smooth scroll events since the beginning, so we
prefer not to emit emulated discrete scroll events at all
2022-05-24 12:30:49 +00:00
Luca Bacci
8514457d0f Wayland: Only send smooth scroll events for tablet tools 2022-05-24 12:30:49 +00:00
Luca Bacci
c0d79aa1ef Merge branch 'scroll-surface-unit-dpi-scale' into 'main'
DirectManipulation: Account for DPI scale

See merge request GNOME/gtk!4749
2022-05-24 12:19:39 +00:00
Luca Bacci
8a6d6fe6b1 DirectManipulation: Account for DPI scale 2022-05-24 11:37:06 +02:00
Emmanuele Bassi
7750a2c423 a11y: Implement atspi.Text.GetCharacterExtents for GtkTextView
Retrieve the location of a given offset in window-relative coordinate
space.
2022-05-23 15:54:13 +01:00