gnome-shell/src
Cosimo Cecchi ca3f4cfb41 StTextureCache: use right event to detect file changes
StTextureCache installs file monitors that invalidate caches when
contents of the underlying file change.
At the moment, the cache uses the Gio.FileMonitorEvent.CHANGED event
type to make that determination.

However, that is suboptimal for at least two reasons:
- while a file is being written to disk, many CHANGED events will be
  emitted in sequence. That will cause needless cache invalidations,
  and we will risk loading the file before it's fully loaded.
- if an existing file is replaced, e.g. with g_file_replace(), we may
  not get a CHANGED event but a CREATED one instead, so the cache ends
  up never getting invalidated.

The good news is that in both of those cases GFileMonitor will send a
CHANGES_DONE_HINT event after changes have settled, or after the file
is replaced.

This commit fixes both cases by switching from the CHANGED event to
CHANGES_DONE_HINT to determine that a file has in fact changed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/286
2018-11-10 00:42:49 +01:00
..
calendar-server calendar-server: Update views only after the time range is set 2018-05-02 16:10:33 +02:00
hotplug-sniffer build: Support the meson build system 2017-07-20 00:20:54 +02:00
st StTextureCache: use right event to detect file changes 2018-11-10 00:42:49 +01:00
tray build: Support the meson build system 2017-07-20 00:20:54 +02:00
data-to-c.pl build: Fix the path of perl for data-to-c.pl 2015-05-22 19:03:44 +08:00
gnome-shell-extension-prefs.c build: Don't modify typelib search path in tools 2018-08-14 17:28:03 +00:00
gnome-shell-extension-tool.in build: Support the meson build system 2017-07-20 00:20:54 +02:00
gnome-shell-perf-tool.in perf-tool: Fix default value for --extra-filter 2018-04-29 16:15:16 +00:00
gnome-shell-plugin.c Remove usage of MetaScreen 2018-07-06 19:56:19 +02:00
gnome-shell-portal-helper.c build: Don't modify typelib search path in tools 2018-08-14 17:28:03 +00:00
gtkactionmuxer.c build: Fix build with clang -Werror 2016-02-26 02:06:55 +08:00
gtkactionmuxer.h Also update gtkaction* 2014-01-09 14:59:31 -05:00
gtkactionobservable.c Update copy/paste code from upstream 2013-05-13 18:34:26 -04:00
gtkactionobservable.h Update copy/paste code from upstream 2013-05-13 18:34:26 -04:00
gtkactionobserver.c Also update gtkaction* 2014-01-09 14:59:31 -05:00
gtkactionobserver.h Also update gtkaction* 2014-01-09 14:59:31 -05:00
gtkmenutracker.c menutracker: Don't shadow existing variables 2015-09-23 21:32:49 +02:00
gtkmenutracker.h Changed obsolete FSF postal address. 2014-01-08 04:35:14 +07:00
gtkmenutrackeritem.c menutracker: Fix a small memory leak 2018-03-02 19:43:45 +00:00
gtkmenutrackeritem.h gtkmenutracker: Update from GTK+ 2014-01-09 14:47:11 -05:00
main.c Replace custom override schema with per-desktop override 2018-07-31 18:36:26 +00:00
meson.build shell: Remove ShellGenericContainer 2018-10-08 22:44:14 -03:00
org.gtk.Application.xml Generate GDBus proxy object for org.gtk.Application 2014-11-27 10:59:55 +00:00
run-js-test.c Don't set clutters 'window-scaling-factor' property 2017-04-07 22:30:35 +08:00
shell-action-modes.h Drop MESSAGE_TRAY action mode 2015-02-26 01:41:18 +01:00
shell-app-private.h appDisplay: Use the desktop file index for app searching 2013-11-14 14:28:52 -05:00
shell-app-system-private.h apps: Ensure running apps override new .desktop file data 2011-09-05 17:29:41 -04:00
shell-app-system.c Properly detect changes in .desktop files 2017-01-23 17:25:39 -06:00
shell-app-system.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-app-usage.c shell: Don't avoid parameter list 2015-09-23 21:32:50 +02:00
shell-app-usage.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-app.c app: Close all closable windows from quit() 2018-09-13 10:54:39 +00:00
shell-app.h shell-app: Add "discrete_gpu" option when launching apps 2016-10-21 19:26:49 +02:00
shell-embedded-window-private.h shell-embedded-window: Remove hacks for old and fixed Clutter bug 2012-07-13 17:28:50 -04:00
shell-embedded-window.c shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-embedded-window.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-global-private.h main: Destroy GjsContext before exit 2016-12-07 11:34:15 -08:00
shell-global.c Replace custom override schema with per-desktop override 2018-07-31 18:36:26 +00:00
shell-global.h Replace custom override schema with per-desktop override 2018-07-31 18:36:26 +00:00
shell-glsl-quad.c build: Fix build with clang -Werror 2016-02-26 02:06:55 +08:00
shell-glsl-quad.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-gtk-embed.c gtk-embed: ensure we only listen for window-created events once 2017-09-15 15:32:46 -04:00
shell-gtk-embed.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-invert-lightness-effect.c shell-invert-lightness-effect: Fix Cogl deprecations 2015-02-20 17:40:46 -08:00
shell-invert-lightness-effect.h shell: Define COGL_ENABLE_EXPERIMENTAL_API and related defines globally 2014-08-07 14:49:54 -04:00
shell-keyring-prompt.c shell: Port to GTask 2015-10-15 22:59:49 +02:00
shell-keyring-prompt.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-menu-tracker.c Update (allow-none) annotations 2014-05-28 22:01:55 +02:00
shell-menu-tracker.h Changed obsolete FSF postal address. 2014-01-08 04:35:14 +07:00
shell-mount-operation.c shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-mount-operation.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-network-agent.c network: port to libnm 2018-01-12 11:48:49 +01:00
shell-network-agent.h network: port to libnm 2018-01-12 11:48:49 +01:00
shell-perf-helper.c shell: Don't mix declarations and code 2015-09-23 21:32:50 +02:00
shell-perf-log.c shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-perf-log.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-polkit-authentication-agent.c polkit: Only unregister registered handles 2018-11-06 13:05:29 -02:00
shell-polkit-authentication-agent.h polkit: Port to G_DECLARE_FINAL_CLASS 2018-11-06 13:05:15 -02:00
shell-recorder-src.c recorder-src: Rewrite switch statement 2015-09-23 21:32:49 +02:00
shell-recorder-src.h Add emacs modelines to all .c and .h files that were missing them 2009-10-27 11:27:45 -04:00
shell-recorder.c Remove usage of MetaScreen 2018-07-06 19:56:19 +02:00
shell-recorder.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-screenshot.c screenshot: Add pick_color() method 2018-07-30 16:55:10 +00:00
shell-screenshot.h screenshot: Add pick_color() method 2018-07-30 16:55:10 +00:00
shell-secure-text-buffer.c shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-secure-text-buffer.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-stack.c shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-stack.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-tray-icon.c systray: Bail out if the plug window is gone 2016-09-08 12:08:02 +02:00
shell-tray-icon.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-tray-manager.c Remove usage of MetaScreen 2018-07-06 19:56:19 +02:00
shell-tray-manager.h Remove usage of MetaScreen 2018-07-06 19:56:19 +02:00
shell-util.c util: Fix code style 2018-07-30 21:23:28 -03:00
shell-util.h build: Remove obsolete soup dependency 2018-09-25 23:57:51 +00:00
shell-window-tracker-private.h apps: Ensure running apps override new .desktop file data 2011-09-05 17:29:41 -04:00
shell-window-tracker.c Remove usage of MetaScreen 2018-07-06 19:56:19 +02:00
shell-window-tracker.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-wm-private.h ui: Add InhibitShortcutsDialog 2017-08-02 11:27:42 +01:00
shell-wm.c ui: Add InhibitShortcutsDialog 2017-08-02 11:27:42 +01:00
shell-wm.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00