If we map, reposition, unmap, remap, the reposition feedback from the
last time a popup was mapped might be received while we're dealing with
the new version of the popup. At this point, the old reposition token
has no meating, so lets drop it. Also reset the reposition tokens when
creating new protocol objects, so that the reposition token are as if
we're in the initial state.
This fixes an issue where we'd get stuck if repeatedly smashing a button
that'd create popups that'd immediately get dismissed by the compositor.
Since Wayland 1.15, it is now possible to use absolute paths in
"WAYLAND_DISPLAY".
In that scenario, having a valid "XDG_RUNTIME_DIR" is not a requirement
anymore.
For this reason we remove the "XDG_RUNTIME_DIR" check and we let
`wl_display_connect()` decide if our environment is correct.
Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
An inert gridview is a gridview that does not use the factory. This
allows faster updates because no calls into user code need to happen.
A gridview is inert when either:
- It is not rooted.
- It is not visible.
- No factory is set (that one is obvious)
The gridview does not need to be inert without a model, as that case is
handled by the item manager.
This should allow Nautilus to keep both the gridview and the columnview
around, and just gtk_widget_hide() the unused widget.
The code for now does not disable the item manager, as some
functionality of the item manager is required to allow setting scroll
positions and such.
But that is a place where more gains could be found if profiling showed
that was useful to do.
An inert listview is a listview that does not use the factory. This
allows faster updates because no calls into user code need to happen.
A listview is inert when either:
- It is not rooted.
- It is not visible.
- No factory is set (that one is obvious)
The listview does not need to be inert without a model, as that case is
handled by the item manager.
This should allow Nautilus to keep both the gridview and the columnview
around, and just gtk_widget_hide() the unused widget.
The code for now does not disable the item manager, as some
functionality of the item manager is required to allow setting scroll
positions and such.
But that is a place where more gains could be found if profiling showed
that was useful to do.
The widget would teardown the factory on unroot to avoid unnecessary
work when it isn't shown.
However, recycling may reposition widgets, and repositioning widgets
does a unroot/root.
We don't want to recycle widgets then.
The implementation lives (as always) in GtkListBase.
This is a feature request from the Nautilus developers, who currently do
some hacks to emulate that behavior and it apparently only breaks
sometimes.
We connect gtk_scrolled_window_update_use_indicators
as signal handler in realize(), but we were disconnecting
gtk_scrolled_window_sync_use_indicators in unrealize.
Spotted by Milan Crha.
Fixes: #5684
Just like GdkToplevel::compute-size, the size argument of the signal is
given to the handlers by GDK; it's not an out argument meant to be
allocated by the caller.
The size argument is passed to the signal by the GDK surface machinery,
as is: it's not going to be allocated by the caller (since it's a
signal), and it's not an out argument.
The cursor-theme-size setting is documented as
'0 means the default size'. Make it so by using
size 24 if we see a 0. Its better than crashing.
Fixes: #5700