4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Can't pass the X window ID to another application.
12 Solution: Add v:windowid. (Christian J. Robinson, Lech Lorens)
13 Files: runtime/doc/eval.txt, src/eval.c, src/gui.c, src/vim.h,
17 *** ../vim-7.3.030/runtime/doc/eval.txt 2010-08-15 21:57:15.000000000 +0200
18 --- runtime/doc/eval.txt 2010-10-20 19:11:03.000000000 +0200
22 *v:warningmsg* *warningmsg-variable*
23 v:warningmsg Last given warning message. It's allowed to set this variable.
25 + *v:windowid* *windowid-variable*
26 + v:windowid When any X11 based GUI is running or when running in a
27 + terminal and Vim connects to the X server (|-X|) this will be
28 + set to the window ID. Otherwise the value is zero.
30 ==============================================================================
31 4. Builtin Functions *functions*
33 *** ../vim-7.3.030/src/eval.c 2010-10-20 17:44:01.000000000 +0200
34 --- src/eval.c 2010-10-20 18:48:40.000000000 +0200
38 {VV_NAME("operator", VAR_STRING), VV_RO},
39 {VV_NAME("searchforward", VAR_NUMBER), 0},
40 {VV_NAME("oldfiles", VAR_LIST), 0},
41 + {VV_NAME("windowid", VAR_NUMBER), VV_RO},
45 *** ../vim-7.3.030/src/gui.c 2010-09-29 17:26:57.000000000 +0200
46 --- src/gui.c 2010-10-20 19:15:56.000000000 +0200
51 #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
56 + Display *x11_display;
58 + if (gui_get_x11_windis(&x11_window, &x11_display) == OK)
59 + set_vim_var_nr(VV_WINDOWID, (long)x11_window);
62 /* Display error messages in a dialog now. */
67 #if defined(MAY_FORK) && !defined(__QNXNTO__)
68 *** ../vim-7.3.030/src/vim.h 2010-10-10 17:08:28.000000000 +0200
69 --- src/vim.h 2010-10-20 18:48:40.000000000 +0200
73 #define VV_SEARCHFORWARD 53
74 #define VV_OLDFILES 54
75 ! #define VV_LEN 55 /* number of v: vars */
81 #define VV_SEARCHFORWARD 53
82 #define VV_OLDFILES 54
83 ! #define VV_WINDOWID 55
84 ! #define VV_LEN 56 /* number of v: vars */
88 *** ../vim-7.3.030/src/os_unix.c 2010-10-13 16:22:05.000000000 +0200
89 --- src/os_unix.c 2010-10-20 19:15:46.000000000 +0200
94 if (x11_window == 0 || x11_display == NULL)
95 return (result = FAIL);
98 + set_vim_var_nr(VV_WINDOWID, (long)x11_window);
101 return (result = OK);
104 *** ../vim-7.3.030/src/version.c 2010-10-20 17:44:01.000000000 +0200
105 --- src/version.c 2010-10-20 19:11:31.000000000 +0200
109 { /* Add new patch number below this line */
115 What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
116 meaning 'bloodsucking creatures'.
118 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
119 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
120 \\\ download, build and distribute -- http://www.A-A-P.org ///
121 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///