comparison src/frame-gtk.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents fdefd0186b75
children e38acbeb1cae
comparison
equal deleted inserted replaced
770:336a418893b5 771:943eaba38521
224 { 224 {
225 return (FRAME_GTK_LISP_WIDGETS (f)[2]); 225 return (FRAME_GTK_LISP_WIDGETS (f)[2]);
226 } 226 }
227 #ifdef STUPID_X_SPECIFIC_GTK_STUFF 227 #ifdef STUPID_X_SPECIFIC_GTK_STUFF
228 if (EQ (Qwindow_id, property)) 228 if (EQ (Qwindow_id, property))
229 return Fgtk_window_id (make_frame (f)); 229 return Fgtk_window_id (wrap_frame (f));
230 #endif 230 #endif
231 231
232 return Qunbound; 232 return Qunbound;
233 } 233 }
234 234
254 props = cons3 (Qshell_widget, FRAME_GTK_LISP_WIDGETS (f)[0], props); 254 props = cons3 (Qshell_widget, FRAME_GTK_LISP_WIDGETS (f)[0], props);
255 props = cons3 (Qcontainer_widget, FRAME_GTK_LISP_WIDGETS (f)[1], props); 255 props = cons3 (Qcontainer_widget, FRAME_GTK_LISP_WIDGETS (f)[1], props);
256 props = cons3 (Qtext_widget, FRAME_GTK_LISP_WIDGETS (f)[2], props); 256 props = cons3 (Qtext_widget, FRAME_GTK_LISP_WIDGETS (f)[2], props);
257 257
258 #ifdef STUPID_X_SPECIFIC_GTK_STUFF 258 #ifdef STUPID_X_SPECIFIC_GTK_STUFF
259 props = cons3 (Qwindow_id, Fgtk_window_id (make_frame (f)), props); 259 props = cons3 (Qwindow_id, Fgtk_window_id (wrap_frame (f)), props);
260 #endif 260 #endif
261 261
262 if (!GET_GTK_WIDGET_WINDOW (shell)) 262 if (!GET_GTK_WIDGET_WINDOW (shell))
263 x = y = 0; 263 x = y = 0;
264 else 264 else
332 GdkWindowHints geometry_mask = 0x00; 332 GdkWindowHints geometry_mask = 0x00;
333 333
334 if (GTK_IS_WINDOW (shell)) 334 if (GTK_IS_WINDOW (shell))
335 { 335 {
336 /* Deal with the cell size */ 336 /* Deal with the cell size */
337 default_face_height_and_width (make_frame (f), &geometry.height_inc, &geometry.width_inc); 337 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc);
338 geometry_mask |= GDK_HINT_RESIZE_INC; 338 geometry_mask |= GDK_HINT_RESIZE_INC;
339 339
340 gtk_window_set_geometry_hints (GTK_WINDOW (shell), 340 gtk_window_set_geometry_hints (GTK_WINDOW (shell),
341 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); 341 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask);
342 gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0, GDK_HINT_POS); 342 gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0, GDK_HINT_POS);
941 /************************************************************************/ 941 /************************************************************************/
942 /* Lisp functions */ 942 /* Lisp functions */
943 /************************************************************************/ 943 /************************************************************************/
944 944
945 static void 945 static void
946 gtk_init_frame_1 (struct frame *f, Lisp_Object props) 946 gtk_init_frame_1 (struct frame *f, Lisp_Object props,
947 int frame_name_is_defaulted)
947 { 948 {
948 /* This function can GC */ 949 /* This function can GC */
949 Lisp_Object initially_unmapped; 950 Lisp_Object initially_unmapped;
950 Lisp_Object device = FRAME_DEVICE (f); 951 Lisp_Object device = FRAME_DEVICE (f);
951 Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil); 952 Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil);
1119 GdkWindowHints geometry_mask = 0x00; 1120 GdkWindowHints geometry_mask = 0x00;
1120 1121
1121 if (GTK_IS_WINDOW (shell)) 1122 if (GTK_IS_WINDOW (shell))
1122 { 1123 {
1123 /* Update the cell size */ 1124 /* Update the cell size */
1124 default_face_height_and_width (make_frame (f), &geometry.height_inc, &geometry.width_inc); 1125 default_face_height_and_width (wrap_frame (f), &geometry.height_inc, &geometry.width_inc);
1125 geometry_mask |= GDK_HINT_RESIZE_INC; 1126 geometry_mask |= GDK_HINT_RESIZE_INC;
1126 1127
1127 gtk_window_set_geometry_hints (GTK_WINDOW (shell), 1128 gtk_window_set_geometry_hints (GTK_WINDOW (shell),
1128 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask); 1129 FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask);
1129 } 1130 }
1297 GdkGeometry geometry; 1298 GdkGeometry geometry;
1298 GdkWindowHints geometry_mask; 1299 GdkWindowHints geometry_mask;
1299 gint width_inc = 10; 1300 gint width_inc = 10;
1300 gint height_inc = 10; 1301 gint height_inc = 10;
1301 1302
1302 default_face_height_and_width (make_frame (frm), &height_inc, &width_inc); 1303 default_face_height_and_width (wrap_frame (frm), &height_inc, &width_inc);
1303 geometry_mask = GDK_HINT_RESIZE_INC; 1304 geometry_mask = GDK_HINT_RESIZE_INC;
1304 geometry.width_inc = width_inc; 1305 geometry.width_inc = width_inc;
1305 geometry.height_inc = height_inc; 1306 geometry.height_inc = height_inc;
1306 1307
1307 gtk_window_set_geometry_hints (w, FRAME_GTK_TEXT_WIDGET (frm), &geometry, geometry_mask); 1308 gtk_window_set_geometry_hints (w, FRAME_GTK_TEXT_WIDGET (frm), &geometry, geometry_mask);