summaryrefslogtreecommitdiff
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-19 17:47:25 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-19 17:47:25 +0100
commit3a466a87180d677b898687ef72d09f14a397794e (patch)
treec768f9b7b0aaae92465fbedd73ecdc4b3126668a /src/gui_gtk_x11.c
parent62ef797496c6243d111c596a592a8ef8c1d1e710 (diff)
downloadvim-git-3a466a87180d677b898687ef72d09f14a397794e.tar.gz
patch 7.4.1138v7.4.1138
Problem: When running gvim in the foreground some icons are missing. (Taylor Venable) Solution: Move the call to gui_gtk_register_resource(). (Kazunobu Kuriyama)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 9967795e0..8a718ac5d 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -1437,9 +1437,6 @@ gui_mch_early_init_check(void)
EMSG(_((char *)e_opendisp));
return FAIL;
}
-#ifdef USE_GRESOURCE
- gui_gtk_register_resource();
-#endif
return OK;
}
@@ -1451,6 +1448,18 @@ gui_mch_early_init_check(void)
int
gui_mch_init_check(void)
{
+#ifdef USE_GRESOURCE
+ static int res_registered = FALSE;
+
+ if (!res_registered)
+ {
+ /* Call this function in the GUI process; otherwise, the resources
+ * won't be available. Don't call it twice. */
+ res_registered = TRUE;
+ gui_gtk_register_resource();
+ }
+#endif
+
#ifdef FEAT_GUI_GNOME
if (gtk_socket_id == 0)
using_gnome = 1;