Repository: lutris/lutris

Issue:
White flash occurs when switching between sidebar rows
### Bug description

There's an unpleasant white flash that occurs when switching between sidebar rows. It doesn't really break anything, but it's not classy.

It's actually trying to accommodate a spinner that is sometimes displayed- it's useful to do this when searching Lutris, which can take seconds to complete. But it does it even when switching between ordinary sidebar rows, which is too fast for this to be useful.

### How to Reproduce

Run Lutris. Switch between rows; there's a brief flash as the game view is visibly removed then replaced just after.

### Expected behavior

I think it should update without this visual discontinuity - when possible. When searching Lutris.net, it can take several seconds to complete the search, so the white 'flash' is needed  or the spinner looks dumb.

### Log output

```shell
INFO     2022-01-17 05:44:57,599 [startup.check_driver:53]:Using NVIDIA drivers 470.86 for x86_64
INFO     2022-01-17 05:44:57,599 [startup.check_driver:57]:GPU: NVIDIA GeForce RTX 3060
INFO     2022-01-17 05:44:57,599 [startup.check_driver:73]:GPU: 10DE:2503 196E:1377 (nvidia drivers)
WARNING  2022-01-17 05:44:57,702 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,702 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,702 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,702 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,702 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,702 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,703 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,703 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,703 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,703 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,703 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,703 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,704 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,704 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,705 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,707 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,708 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,708 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,708 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,709 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,709 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,709 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,710 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,718 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,718 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,718 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,719 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,721 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,723 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,723 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,723 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,723 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,723 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,723 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,724 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,724 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,724 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,724 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,724 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,724 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,725 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of DXVK versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of VKD3D versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of D3D Extras versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
WARNING  2022-01-17 05:44:57,726 [dll_manager.versions:38]:Loading of DXVK-NVAPI versions failed, defaulting to locally available versions
DEBUG    2022-01-17 05:44:57,749 [lutriswindow.update_store:451]:Showing 30 games
DEBUG    2022-01-17 05:44:59,671 [lutriswindow.update_store:451]:Showing 30 games
DEBUG    2022-01-17 05:45:00,969 [lutriswindow.update_store:451]:Showing 30 games
INFO     2022-01-17 05:45:03,011 [application.do_shutdown:631]:Shutting down Lutris
```


### System Information

```shell
[System]
OS:              Pop!_OS 21.10 impish
Arch:            x86_64
Kernel:          5.15.11-76051511-generic
Desktop:         GNOME
Display Server:  x11

[CPU]
Vendor:          AuthenticAMD
Model:           AMD Ryzen 7 5800X 8-Core Processor
Physical cores:  8
Logical cores:   16

[Memory]
RAM:             31.4 GB
Swap:            0.0 GB

[Graphics]
Vendor:          NVIDIA Corporation
OpenGL Renderer: NVIDIA GeForce RTX 3060/PCIe/SSE2
OpenGL Version:  4.6.0 NVIDIA 470.86
OpenGL Core:     4.6.0 NVIDIA 470.86
OpenGL ES:       OpenGL ES 3.2 NVIDIA 470.86
Vulkan:          Supported
```


### Media (optional)

_No response_

### Checklist:

- [X] I'm not asking for support with a game or the wine runner.
- [X] I have followed the above mentioned guides and have all the graphics and wine dependencies installed.
- [X] I have checked for existing issues that describe my problem prior to opening this one.
- [X] I understand that improperly formatted bug reports may be closed without explanation.


Discussion:

Resolving patch:
diff --git a/lutris/gui/lutriswindow.py b/lutris/gui/lutriswindow.py
--- a/lutris/gui/lutriswindow.py
+++ b/lutris/gui/lutriswindow.py
@@ -564,7 +564,7 @@ def redraw_view(self):
         self.games_scrollwindow.add(self.view)
 
         self.view.show_all()
-        GLib.idle_add(self.update_store)
+        self.update_store()
 
     def set_viewtype_icon(self, view_type):
         self.viewtype_icon.set_from_icon_name("view-%s-symbolic" % view_type, Gtk.IconSize.BUTTON)


Test patch: