When GtkApplication starts listening to the screensaver's D-Bus
status, the screensaver-active property is not initialised and
applications making use of the property are out of sync until the
first state change. Any application starting when the screensaver is
active will think it's inactive.
To fix this, we set the property when we first start monitoring the
screensaver.
See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1091
While it’s true that you can pass the results of
`gtk_file_chooser_get_filename()` straight to `open()` or `fopen()` on
Linux, you can’t do so on Windows as it expects the filename to be in
the ANSI codepage. Using the GLib wrappers `g_open()`/`g_fopen()`
instead means that the appropriate UTF-8 → UTF-16 → `wopen()`/`wfopen()`
conversions are done.
Spotted by Fabian Keßler in
https://gitlab.gnome.org/GNOME/glib/-/issues/2212.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
When a plug is embedded in a socket, we need to also plug the at-spi
tree, so that screen readers can find the at-spi content of the plugged
widgets.
This change does this plugging automatically: on the plug widget, an
additional _XEMBED_AT_SPI_PATH property is set to provide the at-spi path
(just like we have _XEMBED_INFO for other X11 information), and when
embedding it, the socket reads it, and makes it as its only child.
Since GtkPlugAccessible can not inherit both from AtkPlug (a child of
AtkObject) and from GtkContainerAccessible (a child of AtkObject), we
actually make GtkPlugAccessible a child of an AtkPlug, and that's what
will be embedded (in at-spi terms) into an AtkSocket.
Similarly, GtkSocketAccessible can not inherit both from AtkSocket and
GtkContainerAccessible, so we make it a parent of the AtkSocket that
embeds the AtkPlug.
This change depends on atk 2.35.1 which implements the at-spi technical
details.
This separates out atk-bridge-2.0 dependency, which is not part of atk,
but of at-spi2-atk.
This implementation is based on gtk_text_view_scroll_to_iter() and
thus shares its limitations for the sake of simplicity.
A single offset is opportunistically picked to build the iterator
needed for gtk_text_view_scroll_to_iter(). That means that substrings
spanning over multiple lines or larger than the current window might
not be displayed optimally after scrolling.
Partially closes#1625, the toPoint() variant has been discarded.
_gtk_settings_get_style_cascade() checks for the given GtkSettings to be
non-NULL, but does so after using the pointer to get the
GtkSettingsPrivate.
Make sure we use the GtkSettings pointer only after the precondition is
verified.
https://gitlab.gnome.org/GNOME/gtk/-/issues/2780
On gdk_display_close(), the GtkSettings attached to the display are
freed.
Yet the gtk CSS code may still be called from the widget unparent,
leading to a segfault.
Check if the GtkSettings is not NULL and bail out nicely if not.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2780
When installing the scroll cursor, add a weak ref to scrolled_window
that clears it if finalised. Unset the weak ref when the uninstalling
the cursor, and when the widget is destroyed.
Patch by Michael James Gratton
Fixes: #749
In gtk_tree_view_build_tree with recurse=TRUE, the TEST_EXPAND_ROW
signal might invalidate the child iterator. Getting the iterator after
the signal (instead of before) fixes the issue.
Fixes https://gitlab.com/inkscape/inkscape/-/issues/1879
Due to the deprecation in gtkshow.h, there is proper deprecation warning
for C code. But, for bindings (python in one case), there is no warning,
due to missing "Deprecated:" annotation in gtkshow.c
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3166
This is not only a GdkEventButton but can also be a GdkEventTouch.
Having this annotation wrong causes bindings code to fail whenever a
wrongly typed event comes through.
Given it does seem likely Tracker is going to miss the goal to get all
applications ported to Tracker 3, the scenario where there's applications
linking to Tracker 2.x while GTK was built with Tracker 3 support becomes
more likely.
Avoid the upcoming GType clashes if that were the case, and resort to the
good (I lie) old Tracker 2 search engine.
When asking for a password, the message string is split on primary
and secondary if it contains a newline character. However, the newline
character is currently part of both strings, which creates weird
spacing between the GtkLabels. I suppose this is bug, which was not
visible as in most cases (if not all) the message string hasn't
contained the new line characters so far. But we are going to change
that now, see GNOME/gvfs!82. Let's drop the new line character similarly
as it is done when asking for a question, or showing processes in order
to fix the weird spacing.
This code made use of isnan(), which is not provided by pre-2013 Visual
Studio, so fix the build by including fallback-c89.c in place of math.h,
and update fallback-c89.c to include the implementation of isnan() for
Visual Studio, which is copied from the fallback-c89.c in gdk/.
The 'select-all' signal requires a boolean argument to specify
whether to select all or none. So explicitly pass TRUE to select
all text instead of letting the demons choose one for us.
This makes the desired behaviour explicit, and matches the behaviour
seen with Meson, where "external : false" is the default.
Before GNOME/glib!1468, not passing --internal to the resource compiler
meant "no special export attribute, do what you would normally do",
so these symbols were not exported due to our global use of
-fvisibility=hidden.
However, since GNOME/glib!1468, not passing --internal to the resource
compiler results in the symbols being decorated with G_MODULE_EXPORT,
which overrides -fvisibility=hidden. This was necessary because Windows
DLLs normally behave a bit like the equivalent of ELF libraries with
-fvisibility=hidden.
Signed-off-by: Simon McVittie <smcv@debian.org>
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/2919
Add --enable-tracker3 option (off by default, like in meson) and
hook the tracker3 search engine to build. Also, make sure it's part
of dist.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2912
When making changes above the current visible region, we might need to
invalidate the pixelcache as the Y positions will no longer match. This
usually is not needed because changes are made interactively and are made
onscreen.
Other cases, though, can include an application changing the first line
of the buffer automatically. We lose the ability to pixelcache well in
this scenario, but that is unlikely an issue since rapid Y geometry resize
or scrolling is less likely to be occuring. For situations where this is
an issue, you can avoid removing the \n from the buffer so line heights
are uneffected.
Fixes#2882