summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-10-20 19:17:48 +0200
committerBram Moolenaar <Bram@vim.org>2010-10-20 19:17:48 +0200
commit727c876b7869050d5da4f4d3dba975350bdbd7d8 (patch)
tree338efeb6d6eb7681b55eb35622067982e1a82dbd /src
parent483c5d80a708a81edd96f8241c231a29e5c58a2f (diff)
downloadvim-727c876b7869050d5da4f4d3dba975350bdbd7d8.zip
updated for version 7.3.031
Problem: Can't pass the X window ID to another application. Solution: Add v:windowid. (Christian J. Robinson, Lech Lorens)
Diffstat (limited to 'src')
-rw-r--r--src/eval.c1
-rw-r--r--src/gui.c10
-rw-r--r--src/os_unix.c5
-rw-r--r--src/version.c2
-rw-r--r--src/vim.h3
5 files changed, 20 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 699598be0..1216dc672 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -362,6 +362,7 @@ static struct vimvar
{VV_NAME("operator", VAR_STRING), VV_RO},
{VV_NAME("searchforward", VAR_NUMBER), 0},
{VV_NAME("oldfiles", VAR_LIST), 0},
+ {VV_NAME("windowid", VAR_NUMBER), VV_RO},
};
/* shorthand */
diff --git a/src/gui.c b/src/gui.c
index 6029e3b7c..89d8d5a88 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -105,8 +105,18 @@ gui_start()
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
if (gui.in_use)
+ {
+# ifdef FEAT_EVAL
+ Window x11_window;
+ Display *x11_display;
+
+ if (gui_get_x11_windis(&x11_window, &x11_display) == OK)
+ set_vim_var_nr(VV_WINDOWID, (long)x11_window);
+# endif
+
/* Display error messages in a dialog now. */
display_errors();
+ }
#endif
#if defined(MAY_FORK) && !defined(__QNXNTO__)
diff --git a/src/os_unix.c b/src/os_unix.c
index 150bdad6d..9fcebd6a3 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1738,6 +1738,11 @@ get_x11_windis()
}
if (x11_window == 0 || x11_display == NULL)
return (result = FAIL);
+
+# ifdef FEAT_EVAL
+ set_vim_var_nr(VV_WINDOWID, (long)x11_window);
+# endif
+
return (result = OK);
}
diff --git a/src/version.c b/src/version.c
index e776e1d52..e5164d362 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 31,
+/**/
30,
/**/
29,
diff --git a/src/vim.h b/src/vim.h
index 6c846c1d7..5b7420330 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1842,7 +1842,8 @@ typedef int proftime_T; /* dummy for function prototypes */
#define VV_OP 52
#define VV_SEARCHFORWARD 53
#define VV_OLDFILES 54
-#define VV_LEN 55 /* number of v: vars */
+#define VV_WINDOWID 55
+#define VV_LEN 56 /* number of v: vars */
#ifdef FEAT_CLIPBOARD