home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.031 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  3.5 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 7.3.031
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 7.3.031
  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,
  14.         src/os_unix.c
  15.  
  16.  
  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
  19. ***************
  20. *** 1657,1662 ****
  21. --- 1657,1667 ----
  22.                       *v:warningmsg* *warningmsg-variable*
  23.   v:warningmsg    Last given warning message.  It's allowed to set this variable.
  24.   
  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.
  29.   ==============================================================================
  30.   4. Builtin Functions                    *functions*
  31.   
  32. *** ../vim-7.3.030/src/eval.c    2010-10-20 17:44:01.000000000 +0200
  33. --- src/eval.c    2010-10-20 18:48:40.000000000 +0200
  34. ***************
  35. *** 362,367 ****
  36. --- 362,368 ----
  37.       {VV_NAME("operator",     VAR_STRING), VV_RO},
  38.       {VV_NAME("searchforward",     VAR_NUMBER), 0},
  39.       {VV_NAME("oldfiles",     VAR_LIST), 0},
  40. +     {VV_NAME("windowid",     VAR_NUMBER), VV_RO},
  41.   };
  42.   
  43.   /* shorthand */
  44. *** ../vim-7.3.030/src/gui.c    2010-09-29 17:26:57.000000000 +0200
  45. --- src/gui.c    2010-10-20 19:15:56.000000000 +0200
  46. ***************
  47. *** 105,112 ****
  48. --- 105,122 ----
  49.   
  50.   #if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
  51.       if (gui.in_use)
  52. +     {
  53. + # ifdef FEAT_EVAL
  54. +     Window    x11_window;
  55. +     Display    *x11_display;
  56. +     if (gui_get_x11_windis(&x11_window, &x11_display) == OK)
  57. +         set_vim_var_nr(VV_WINDOWID, (long)x11_window);
  58. + # endif
  59.       /* Display error messages in a dialog now. */
  60.       display_errors();
  61. +     }
  62.   #endif
  63.   
  64.   #if defined(MAY_FORK) && !defined(__QNXNTO__)
  65. *** ../vim-7.3.030/src/vim.h    2010-10-10 17:08:28.000000000 +0200
  66. --- src/vim.h    2010-10-20 18:48:40.000000000 +0200
  67. ***************
  68. *** 1842,1848 ****
  69.   #define VV_OP        52
  70.   #define VV_SEARCHFORWARD 53
  71.   #define VV_OLDFILES    54
  72. ! #define VV_LEN        55    /* number of v: vars */
  73.   
  74.   #ifdef FEAT_CLIPBOARD
  75.   
  76. --- 1842,1849 ----
  77.   #define VV_OP        52
  78.   #define VV_SEARCHFORWARD 53
  79.   #define VV_OLDFILES    54
  80. ! #define VV_WINDOWID    55
  81. ! #define VV_LEN        56    /* number of v: vars */
  82.   
  83.   #ifdef FEAT_CLIPBOARD
  84.   
  85. *** ../vim-7.3.030/src/os_unix.c    2010-10-13 16:22:05.000000000 +0200
  86. --- src/os_unix.c    2010-10-20 19:15:46.000000000 +0200
  87. ***************
  88. *** 1738,1743 ****
  89. --- 1738,1748 ----
  90.       }
  91.       if (x11_window == 0 || x11_display == NULL)
  92.       return (result = FAIL);
  93. + # ifdef FEAT_EVAL
  94. +     set_vim_var_nr(VV_WINDOWID, (long)x11_window);
  95. + # endif
  96.       return (result = OK);
  97.   }
  98.   
  99. *** ../vim-7.3.030/src/version.c    2010-10-20 17:44:01.000000000 +0200
  100. --- src/version.c    2010-10-20 19:11:31.000000000 +0200
  101. ***************
  102. *** 716,717 ****
  103. --- 716,719 ----
  104.   {   /* Add new patch number below this line */
  105. + /**/
  106. +     31,
  107.   /**/
  108.  
  109. -- 
  110. What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
  111. meaning 'bloodsucking creatures'.
  112.  
  113.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  114. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  115. \\\        download, build and distribute -- http://www.A-A-P.org        ///
  116.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  117.