The shortcuts inhibitors hash table is created when we create a
GdkWaylandWindow implementation for a GdkWindow, and it's destroyed once
we finalize the instance. The fake "root" window we create for the
Wayland display does not have a backing native window, so the shortcuts
inhibitors hash table is set to NULL; this causes a critical error
message when calling g_hash_table_destroy() on it. The finalization of
the root window happens when we close a display connection.
We should use g_clear_pointer(), instead, as it's NULL safe.
Without this change, the displayclose test fails, as all warnings are
considered fatal.
Instead of hard-coding linker flags for a specific operating system and
a specific compiler, we can should cc.links to test them, so they can be
used on more operating systems and compilers.
All of the four platform-dependent backends are enabled by default. It
is usually a good default because it requires users to explicitly choose
backends they want to use. Rules in meson.build also automatically
disable unavailable backends for macOS, Windows, Linux, so users on
these 3 major platforms don't have to manually disable things when
running meson commands.
However, meson.build doesn't do the same thing for other Unix-like
systems, which is acceptable but not ideal. To make it easier to build
GTK+ on these systems, the Linux case, which enables X11 and Wayland and
disables Win32 and Quartz, is made the default for all operating systems
that are not Windows or macOS.
This commit also changes most 'host_machine.system()' calls to os_*
variables, which are easier to read and less likely to be used wrongly.
The shortcuts inhibitors hash table is created when we create a
GdkWaylandWindow implementation for a GdkWindow, and it's destroyed once
we finalize the instance. The fake "root" window we create for the
Wayland display does not have a backing native window, so the shortcuts
inhibitors hash table is set to NULL; this causes a critical error
message when calling g_hash_table_destroy() on it. The finalization of
the root window happens when we close a display connection.
We should use g_clear_pointer(), instead, as it's NULL safe.
Without this change, the displayclose test fails, as all warnings are
considered fatal.
.linked assumes the container is a GtkBox, which is documented as never
flipping children in RTL, so :first-child is always the left child, etc.
GtkBox does that by reordering its CSS nodes when the direction changes.
But most widgets don’t do that, so :first|last-child are 1st/last ADDED
and swap sides in RTL. GtkPathBar is so, and ignoring that in our themes
meant that in RTL, its left/right buttons got each other’s borders. Yuk!
This patch adds the groundwork for supporting widgets like that, via the
%linked_flippable placeholder, and applies that to override buttons in
filechooser .path-bar.linked > button
so that the correct borders get applied to those buttons when using RTL.
Note that I select only PathBars within a FileChooser because we also
have NautilusPathBar, which also uses widget.path-bar – but *does* flip
its nodes for RTL already, so letting that get affected broke it again!
https://bugzilla.gnome.org/show_bug.cgi?id=772817
See the previous commit.
There may be other cases of these being swapped by Gadget conversions,
but hopefully someone else will find and fix those before I have to…
Close https://gitlab.gnome.org/GNOME/gtk/issues/200
Otherwise, if the Popover is destroyed before the MenuButton, the latter
still had a non-NULL but invalid instance and tried to use it in dispose
Close https://gitlab.gnome.org/GNOME/gtk/issues/199
Use g_signal_connect_data() instead of g_signal_connect_object()
to make sure the callback gets disconnected when the data object
is destroyed. This avoids problems in garbage-collected bindings.
https://bugzilla.gnome.org/show_bug.cgi?id=789215
Instead of hard-coding linker flags for a specific operating system and
a specific compiler, we can should cc.links to test them, so they can be
used on more operating systems and compilers.
All of the four platform-dependent backends are enabled by default. It
is usually a good default because it requires users to explicitly choose
backends they want to use. Rules in meson.build also automatically
disable unavailable backends for macOS, Windows, Linux, so users on
these 3 major platforms don't have to manually disable things when
running meson commands.
However, meson.build doesn't do the same thing for other Unix-like
systems, which is acceptable but not ideal. To make it easier to build
GTK+ on these systems, the Linux case, which enables X11 and Wayland and
disables Win32 and Quartz, is made the default for all operating systems
that are not Windows or macOS.
This commit also changes most 'host_machine.system()' calls to os_*
variables, which are easier to read and less likely to be used wrongly.
Well, they don't require a redraw of the widget, because the widget
itself didn't change.
They require a redraw of the parent, because that now displays the
widget in a different position.
And this means we can keep the cache of the widget's render node.
My fishbowl numbers are through the roof^W water surface. Vulkan gets
4000 now.
Due to the few type checks in gtk_widget_get_display(), it was the
slowest part of a call to gtk_widget_query_size_for_orientation if the
in case of a cache hit.
We pulled out the bounds calculation for performance reasons, but the
caller can't know how to properly compute them. Inside gtk+, we can do
that but it's not good enough for public API.
The GVariant we are getting here might not be coming
from GTK+, but rather from some other source. Best to
be forgiving and deal with missing data without crashing.
This was causing the GTK+ portal backends to crash on
print requests from Qt.