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 / 6.2.043 < prev    next >
Encoding:
Internet Message Format  |  2003-10-13  |  6.2 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.043
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.043
  11. Problem:    Compiling with both netbeans and workshop doesn't work.
  12. Solution:   Move the shellRectangle() function to gui_x11.c. (Gordon Prieur)
  13. Files:        src/gui_x11.c, src/integration.c, src/netbeans.c,
  14.         src/proto/netbeans.pro
  15.  
  16.  
  17. *** ../vim-6.2.042/src/gui_x11.c    Sat May 24 13:17:24 2003
  18. --- src/gui_x11.c    Sun Jun 22 17:37:21 2003
  19. ***************
  20. *** 627,632 ****
  21. --- 627,675 ----
  22.       gui_mch_update();
  23.   }
  24.   
  25. + #if (defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)) \
  26. +     || defined(PROTO)
  27. + /*
  28. +  *    This function fills in the XRectangle object with the current
  29. +  *    x,y coordinates and height, width so that an XtVaSetValues to
  30. +  *    the same shell of those resources will restore the window to its
  31. +  *    formar position and dimensions.
  32. +  *
  33. +  *    Note: This function may fail, in which case the XRectangle will
  34. +  *    be unchanged.  Be sure to have the XRectangle set with the
  35. +  *    proper values for a failed condition prior to calling this
  36. +  *    function.
  37. +  */
  38. +     static void
  39. + shellRectangle(Widget shell, XRectangle *r)
  40. + {
  41. +     Window        rootw, shellw, child, parentw;
  42. +     int            absx, absy;
  43. +     XWindowAttributes    a;
  44. +     Window        *children;
  45. +     unsigned int    childrenCount;
  46. +     shellw = XtWindow(shell);
  47. +     if (shellw == 0)
  48. +     return;
  49. +     for (;;)
  50. +     {
  51. +     XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
  52. +                            &children, &childrenCount);
  53. +     XFree(children);
  54. +     if (parentw == rootw)
  55. +         break;
  56. +     shellw = parentw;
  57. +     }
  58. +     XGetWindowAttributes(XtDisplay(shell), shellw, &a);
  59. +     XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
  60. +                             &absx, &absy, &child);
  61. +     r->x = absx;
  62. +     r->y = absy;
  63. +     XtVaGetValues(shell, XmNheight, &r->height, XmNwidth, &r->width, NULL);
  64. + }
  65. + #endif
  66.   /* ARGSUSED */
  67.       static void
  68.   gui_x11_resize_window_cb(w, dud, event, dum)
  69. *** ../vim-6.2.042/src/integration.c    Mon Aug 27 17:25:25 2001
  70. --- src/integration.c    Sun Jun 22 17:25:16 2003
  71. ***************
  72. *** 890,937 ****
  73.       }
  74.   }
  75.   
  76. - /*
  77. -  *    This function fills in the XRectangle object with the current
  78. -  *    x,y coordinates and height, width so that an XtVaSetValues to
  79. -  *    the same shell of those resources will restore the window to its
  80. -  *    formar position and dimensions.
  81. -  *
  82. -  *    Note: This function may fail, in which case the XRectangle will
  83. -  *    be unchanged.  Be sure to have the XRectangle set with the
  84. -  *    proper values for a failed condition prior to calling this
  85. -  *    function.
  86. -  *
  87. -  * THIS FUNCTION IS LIFTED FROM libutil/src/Session.cc
  88. -  */
  89. - void    shellRectangle(Widget shell, XRectangle *r)
  90. - {
  91. -     Window        rootw, shellw, child, parentw;
  92. -     int        absx, absy;
  93. -     XWindowAttributes    a;
  94. -     Window        *children;
  95. -     unsigned int    childrenCount;
  96. -     shellw = XtWindow(shell);
  97. -     if (shellw == 0)
  98. -         return;
  99. -     for (;;){
  100. -         XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
  101. -                     &children, &childrenCount);
  102. -         XFree(children);
  103. -         if (parentw == rootw)
  104. -             break;
  105. -         shellw = parentw;
  106. -     }
  107. -     XGetWindowAttributes(XtDisplay(shell), shellw, &a);
  108. -     XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
  109. -                 &absx, &absy, &child);
  110. -     r->x = absx;
  111. -     r->y = absy;
  112. -     XtVaGetValues(shell, XmNheight, &r->height,
  113. -                 XmNwidth, &r->width,
  114. -                 NULL);
  115. - }
  116.   
  117.   Boolean workshop_get_width_height(int *width, int *height)
  118.   {
  119. --- 890,895 ----
  120. *** ../vim-6.2.042/src/netbeans.c    Mon Jun  2 22:26:17 2003
  121. --- src/netbeans.c    Tue Jul 22 10:39:55 2003
  122. ***************
  123. *** 2790,2837 ****
  124.       return offset;
  125.   }
  126.   
  127. - #if defined(FEAT_GUI_MOTIF) || defined(PROTO)
  128. - /*
  129. -  *    This function fills in the XRectangle object with the current
  130. -  *    x,y coordinates and height, width so that an XtVaSetValues to
  131. -  *    the same shell of those resources will restore the window to its
  132. -  *    formar position and dimensions.
  133. -  *
  134. -  *    Note: This function may fail, in which case the XRectangle will
  135. -  *    be unchanged.  Be sure to have the XRectangle set with the
  136. -  *    proper values for a failed condition prior to calling this
  137. -  *    function.
  138. -  */
  139. -     void
  140. - shellRectangle(Widget shell, XRectangle *r)
  141. - {
  142. -     Window        rootw, shellw, child, parentw;
  143. -     int        absx, absy;
  144. -     XWindowAttributes    a;
  145. -     Window        *children;
  146. -     unsigned int    childrenCount;
  147. -     shellw = XtWindow(shell);
  148. -     if (shellw == 0)
  149. -         return;
  150. -     for (;;)
  151. -     {
  152. -         XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
  153. -                     &children, &childrenCount);
  154. -         XFree(children);
  155. -         if (parentw == rootw)
  156. -         break;
  157. -         shellw = parentw;
  158. -     }
  159. -     XGetWindowAttributes(XtDisplay(shell), shellw, &a);
  160. -     XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
  161. -                 &absx, &absy, &child);
  162. -     r->x = absx;
  163. -     r->y = absy;
  164. -     XtVaGetValues(shell, XmNheight, &r->height,
  165. -                 XmNwidth, &r->width, NULL);
  166. - }
  167. - #endif
  168.   
  169.   #endif /* defined(FEAT_NETBEANS_INTG) */
  170. --- 2813,2817 ----
  171. *** ../vim-6.2.042/src/proto/netbeans.pro    Mon Jun  2 22:26:17 2003
  172. --- src/proto/netbeans.pro    Sun Jun 22 17:37:19 2003
  173. ***************
  174. *** 14,20 ****
  175.   void netbeans_deleted_all_lines __ARGS((buf_T *bufp));
  176.   int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot));
  177.   void netbeans_draw_multisign_indicator __ARGS((int row));
  178. - void netbeans_draw_multisign_indicator __ARGS((int row));
  179.   void netbeans_gutter_click __ARGS((linenr_T lnum));
  180. - void shellRectangle __ARGS((Widget shell, XRectangle *r));
  181.   /* vim: set ft=c : */
  182. --- 14,18 ----
  183. *** ../vim-6.2.042/src/version.c    Sun Jul 27 13:40:24 2003
  184. --- src/version.c    Sun Jul 27 14:10:16 2003
  185. ***************
  186. *** 632,633 ****
  187. --- 632,635 ----
  188.   {   /* Add new patch number below this line */
  189. + /**/
  190. +     43,
  191.   /**/
  192.  
  193. -- 
  194. Eye have a spelling checker, it came with my PC;
  195. It plainly marks four my revue mistakes I cannot sea.
  196. I've run this poem threw it, I'm sure your please to no,
  197. It's letter perfect in it's weigh, my checker tolled me sew!
  198.  
  199.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  200. ///          Creator of Vim - Vi IMproved -- http://www.Vim.org          \\\
  201. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  202.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  203.