The last event, matching lifting the finger/releasing the mouse button,
is important when there's a large delay between it and the previous events,
as in when performing a movement, stopping, then releasing fingers as
opposed to doing a swipe.
If this event is skipped, doing this will result in kinetic deceleration
matching the previous finger movement, while the expected behavior would
be no deceleration.
See also 97f540622a for a similar fix in
GtkEventControllerScroll.
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
epoxy_dep cannot be used in a configure time check when it comes from a
subproject. Use variables set in pc file instead.
This requires https://github.com/anholt/libepoxy/pull/231.
Remove all of the selectors. They just set the passthrough anyway so
there's not much point to maintaining them and they weren't the
complete set of possible selectors.
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.
At least from GTK v3.22.30, the code disallows attempts to print PDF and
PS files using the LPR backend. Although it is not easy or possible for
GTK to determine if the printer can print these formats by querying lpr,
the print backend should allow lpr to try.
There are two uses cases:
- A filter is being used by lpr, specified in the printcap file, to process the
files prior to printing them.
- The printer can print PDF and PS files directly. There are many printers that
can print these formats, so GTK should allow for the possibility.
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
Additionally to gtk_primary_selection, the gtk-private predecessor,
support the upstream unstable protocol.
This allows the primary selection to work on Kwin and potentially
other compositors, as well as dropping the private version eventually.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2591
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