4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
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
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
25 + #if (defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP)) \
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.
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
39 + shellRectangle(Widget shell, XRectangle *r)
41 + Window rootw, shellw, child, parentw;
43 + XWindowAttributes a;
45 + unsigned int childrenCount;
47 + shellw = XtWindow(shell);
52 + XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
53 + &children, &childrenCount);
55 + if (parentw == rootw)
59 + XGetWindowAttributes(XtDisplay(shell), shellw, &a);
60 + XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
61 + &absx, &absy, &child);
64 + XtVaGetValues(shell, XmNheight, &r->height, XmNwidth, &r->width, NULL);
70 gui_x11_resize_window_cb(w, dud, event, dum)
71 *** ../vim-6.2.042/src/integration.c Mon Aug 27 17:25:25 2001
72 --- src/integration.c Sun Jun 22 17:25:16 2003
79 - * This function fills in the XRectangle object with the current
80 - * x,y coordinates and height, width so that an XtVaSetValues to
81 - * the same shell of those resources will restore the window to its
82 - * formar position and dimensions.
84 - * Note: This function may fail, in which case the XRectangle will
85 - * be unchanged. Be sure to have the XRectangle set with the
86 - * proper values for a failed condition prior to calling this
89 - * THIS FUNCTION IS LIFTED FROM libutil/src/Session.cc
91 - void shellRectangle(Widget shell, XRectangle *r)
93 - Window rootw, shellw, child, parentw;
95 - XWindowAttributes a;
97 - unsigned int childrenCount;
99 - shellw = XtWindow(shell);
103 - XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
104 - &children, &childrenCount);
106 - if (parentw == rootw)
110 - XGetWindowAttributes(XtDisplay(shell), shellw, &a);
111 - XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
112 - &absx, &absy, &child);
115 - XtVaGetValues(shell, XmNheight, &r->height,
116 - XmNwidth, &r->width,
121 Boolean workshop_get_width_height(int *width, int *height)
124 *** ../vim-6.2.042/src/netbeans.c Mon Jun 2 22:26:17 2003
125 --- src/netbeans.c Tue Jul 22 10:39:55 2003
132 - #if defined(FEAT_GUI_MOTIF) || defined(PROTO)
134 - * This function fills in the XRectangle object with the current
135 - * x,y coordinates and height, width so that an XtVaSetValues to
136 - * the same shell of those resources will restore the window to its
137 - * formar position and dimensions.
139 - * Note: This function may fail, in which case the XRectangle will
140 - * be unchanged. Be sure to have the XRectangle set with the
141 - * proper values for a failed condition prior to calling this
145 - shellRectangle(Widget shell, XRectangle *r)
147 - Window rootw, shellw, child, parentw;
149 - XWindowAttributes a;
151 - unsigned int childrenCount;
153 - shellw = XtWindow(shell);
158 - XQueryTree(XtDisplay(shell), shellw, &rootw, &parentw,
159 - &children, &childrenCount);
161 - if (parentw == rootw)
165 - XGetWindowAttributes(XtDisplay(shell), shellw, &a);
166 - XTranslateCoordinates(XtDisplay(shell), shellw, a.root, 0, 0,
167 - &absx, &absy, &child);
170 - XtVaGetValues(shell, XmNheight, &r->height,
171 - XmNwidth, &r->width, NULL);
175 #endif /* defined(FEAT_NETBEANS_INTG) */
177 *** ../vim-6.2.042/src/proto/netbeans.pro Mon Jun 2 22:26:17 2003
178 --- src/proto/netbeans.pro Sun Jun 22 17:37:19 2003
181 void netbeans_deleted_all_lines __ARGS((buf_T *bufp));
182 int netbeans_is_guarded __ARGS((linenr_T top, linenr_T bot));
183 void netbeans_draw_multisign_indicator __ARGS((int row));
184 - void netbeans_draw_multisign_indicator __ARGS((int row));
185 void netbeans_gutter_click __ARGS((linenr_T lnum));
186 - void shellRectangle __ARGS((Widget shell, XRectangle *r));
187 /* vim: set ft=c : */
189 *** ../vim-6.2.042/src/version.c Sun Jul 27 13:40:24 2003
190 --- src/version.c Sun Jul 27 14:10:16 2003
194 { /* Add new patch number below this line */
200 Eye have a spelling checker, it came with my PC;
201 It plainly marks four my revue mistakes I cannot sea.
202 I've run this poem threw it, I'm sure your please to no,
203 It's letter perfect in it's weigh, my checker tolled me sew!
205 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
206 /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
207 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
208 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///