home *** CD-ROM | disk | FTP | other *** search
- To: vim-dev@vim.org
- Subject: Patch 6.2.043
- Fcc: outbox
- From: Bram Moolenaar <Bram@moolenaar.net>
- Mime-Version: 1.0
- Content-Type: text/plain; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- ------------
-
- Patch 6.2.043
- Problem: Compiling with both netbeans and workshop doesn't work.
- Solution: Move the shellRectangle() function to gui_x11.c. (Gordon Prieur)
- Files: src/gui_x11.c, src/integration.c, src/netbeans.c,
- src/proto/netbeans.pro
-
-
- *** ../vim-6.2.042/src/gui_x11.c Sat May 24 13:17:24 2003
- --- src/gui_x11.c Sun Jun 22 17:37:21 2003
- ***************
- *** 627,632 ****
- --- 627,675 ----
- gui_mch_update();
- }
-
- + #if (defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)) \
- + || defined(PROTO)
- + /*
- + * This function fills in the XRectangle object with the current
- + * x,y coordinates and height, width so that an XtVaSetValues to
- + * the same shell of those resources will restore the window to its
- + * formar position and dimensions.
- + *
- + * Note: This function may fail, in which case the XRectangle will
- + * be unchanged. Be sure to have the XRectangle set with the
- + * proper values for a failed condition prior to calling this
- + * function.
- + */
- + static void
- + shellRectangle(Widget shell, XRectangle *r)
- + {
- + Window rootw, shellw, child, parentw;
- + int absx, absy;
- + XWindowAttributes a;
- + Window *children;
- + unsigned int childrenCount;
- +
- + shellw = XtWindow(shell);
- + if (shellw == 0)
- + return;
- + for (;;)
- + {
- + XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
- + &children, &childrenCount);
- + XFree(children);
- + if (parentw == rootw)
- + break;
- + shellw = parentw;
- + }
- + XGetWindowAttributes(XtDisplay(shell), shellw, &a);
- + XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
- + &absx, &absy, &child);
- + r->x = absx;
- + r->y = absy;
- + XtVaGetValues(shell, XmNheight, &r->height, XmNwidth, &r->width, NULL);
- + }
- + #endif
- +
- /* ARGSUSED */
- static void
- gui_x11_resize_window_cb(w, dud, event, dum)
- *** ../vim-6.2.042/src/integration.c Mon Aug 27 17:25:25 2001
- --- src/integration.c Sun Jun 22 17:25:16 2003
- ***************
- *** 890,937 ****
- }
- }
-
- - /*
- - * This function fills in the XRectangle object with the current
- - * x,y coordinates and height, width so that an XtVaSetValues to
- - * the same shell of those resources will restore the window to its
- - * formar position and dimensions.
- - *
- - * Note: This function may fail, in which case the XRectangle will
- - * be unchanged. Be sure to have the XRectangle set with the
- - * proper values for a failed condition prior to calling this
- - * function.
- - *
- - * THIS FUNCTION IS LIFTED FROM libutil/src/Session.cc
- - */
- - void shellRectangle(Widget shell, XRectangle *r)
- - {
- - Window rootw, shellw, child, parentw;
- - int absx, absy;
- - XWindowAttributes a;
- - Window *children;
- - unsigned int childrenCount;
- -
- - shellw = XtWindow(shell);
- - if (shellw == 0)
- - return;
- - for (;;){
- - XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
- - &children, &childrenCount);
- - XFree(children);
- - if (parentw == rootw)
- - break;
- - shellw = parentw;
- - }
- - XGetWindowAttributes(XtDisplay(shell), shellw, &a);
- - XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
- - &absx, &absy, &child);
- - r->x = absx;
- - r->y = absy;
- - XtVaGetValues(shell, XmNheight, &r->height,
- - XmNwidth, &r->width,
- - NULL);
- - }
- -
-
- Boolean workshop_get_width_height(int *width, int *height)
- {
- --- 890,895 ----
- *** ../vim-6.2.042/src/netbeans.c Mon Jun 2 22:26:17 2003
- --- src/netbeans.c Tue Jul 22 10:39:55 2003
- ***************
- *** 2790,2837 ****
- return offset;
- }
-
- -
- - #if defined(FEAT_GUI_MOTIF) || defined(PROTO)
- - /*
- - * This function fills in the XRectangle object with the current
- - * x,y coordinates and height, width so that an XtVaSetValues to
- - * the same shell of those resources will restore the window to its
- - * formar position and dimensions.
- - *
- - * Note: This function may fail, in which case the XRectangle will
- - * be unchanged. Be sure to have the XRectangle set with the
- - * proper values for a failed condition prior to calling this
- - * function.
- - */
- - void
- - shellRectangle(Widget shell, XRectangle *r)
- - {
- - Window rootw, shellw, child, parentw;
- - int absx, absy;
- - XWindowAttributes a;
- - Window *children;
- - unsigned int childrenCount;
- -
- - shellw = XtWindow(shell);
- - if (shellw == 0)
- - return;
- - for (;;)
- - {
- - XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
- - &children, &childrenCount);
- - XFree(children);
- - if (parentw == rootw)
- - break;
- - shellw = parentw;
- - }
- - XGetWindowAttributes(XtDisplay(shell), shellw, &a);
- - XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
- - &absx, &absy, &child);
- - r->x = absx;
- - r->y = absy;
- - XtVaGetValues(shell, XmNheight, &r->height,
- - XmNwidth, &r->width, NULL);
- - }
- - #endif
-
- #endif /* defined(FEAT_NETBEANS_INTG) */
- --- 2813,2817 ----
- *** ../vim-6.2.042/src/proto/netbeans.pro Mon Jun 2 22:26:17 2003
- --- src/proto/netbeans.pro Sun Jun 22 17:37:19 2003
- ***************
- *** 14,20 ****
- void netbeans_deleted_all_lines __ARGS((buf_T *bufp));
- int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot));
- void netbeans_draw_multisign_indicator __ARGS((int row));
- - void netbeans_draw_multisign_indicator __ARGS((int row));
- void netbeans_gutter_click __ARGS((linenr_T lnum));
- - void shellRectangle __ARGS((Widget shell, XRectangle *r));
- /* vim: set ft=c : */
- --- 14,18 ----
- *** ../vim-6.2.042/src/version.c Sun Jul 27 13:40:24 2003
- --- src/version.c Sun Jul 27 14:10:16 2003
- ***************
- *** 632,633 ****
- --- 632,635 ----
- { /* Add new patch number below this line */
- + /**/
- + 43,
- /**/
-
- --
- Eye have a spelling checker, it came with my PC;
- It plainly marks four my revue mistakes I cannot sea.
- I've run this poem threw it, I'm sure your please to no,
- It's letter perfect in it's weigh, my checker tolled me sew!
-
- /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
- /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
- \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
- \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///
-