Changeset 1693
- Timestamp:
- 1998年02月17日 01時45分19秒 (11 years ago)
- Files:
-
- branches/GNU/src/w32inevt.h (added)
- branches/GNU/src/widget.c (added)
- branches/GNU/src/widget.h (added)
- branches/GNU/src/window.h (added)
- branches/GNU/src/xfaces.c (modified) (13 diffs)
- branches/GNU/src/xmenu.c (modified) (1 diff)
- branches/GNU/src/xrdb.c (modified) (1 diff)
- branches/GNU/src/xselect.c (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/GNU/src/xfaces.c
r1677 r1693 474 474 int face_change_count; 475 475 476 /* Incremented for every change in the `menu' face. */ 477 478 int menu_face_change_count; 479 476 480 /* Non-zero means don't display bold text if a face's foreground 477 481 and background colors are the inverse of the default colors of the … … 494 498 #endif 495 499 496 /* Non-zero means the definition of the `menu' face for new frames has497 been changed. */498 499 int menu_face_changed_default;500 500 501 501 … … 598 598 static GC x_create_gc P_ ((struct frame *, unsigned long, XGCValues *)); 599 599 static void x_free_gc P_ ((struct frame *, GC)); 600 static void clear_font_table P_ ((struct x_display_info*));600 static void clear_font_table P_ ((struct frame *)); 601 601 602 602 #ifdef WINDOWSNT … … 980 980 || ++clear_font_table_count == CLEAR_FONT_TABLE_COUNT) 981 981 { 982 struct x_display_info *dpyinfo;983 984 /* Fonts are common for frames on one display, i.e. on985 one X screen. */986 for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)987 if (dpyinfo->n_fonts > CLEAR_FONT_TABLE_NFONTS)988 clear_font_table (dpyinfo);989 990 982 /* From time to time see if we can unload some fonts. This also 991 983 frees all realized faces on all frames. Fonts needed by … … 995 987 FOR_EACH_FRAME (tail, frame) 996 988 { 997 struct frame *f = XFRAME (frame);989 f = XFRAME (frame); 998 990 if (FRAME_WINDOW_P (f) 999 991 && FRAME_X_DISPLAY_INFO (f)->n_fonts > CLEAR_FONT_TABLE_NFONTS) 1000 free_all_realized_faces (frame); 992 { 993 free_all_realized_faces (frame); 994 clear_font_table (f); 995 } 1001 996 } 1002 997 } … … 1035 1030 1036 1031 1037 /* Remove fonts from the font table of DPYINFO except for the default1038 ASCII fonts of frames on that display. Called from clear_face_cache1032 /* Remove those fonts from the font table of frame F exept for the 1033 default ASCII font for the frame. Called from clear_face_cache 1039 1034 from time to time. */ 1040 1035 1041 1036 static void 1042 clear_font_table (dpyinfo) 1043 struct x_display_info *dpyinfo; 1044 { 1037 clear_font_table (f) 1038 struct frame *f; 1039 { 1040 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 1045 1041 int i; 1046 1042 1047 /* Free those fonts that are not used by frames on DPYINFO. */ 1043 xassert (FRAME_WINDOW_P (f)); 1044 1045 /* Free those fonts that are not used by the frame F as the default. */ 1048 1046 for (i = 0; i < dpyinfo->n_fonts; ++i) 1049 1047 { 1050 1048 struct font_info *font_info = dpyinfo->font_table + i; 1051 Lisp_Object tail, frame; 1052 1053 /* Check if slot is already free. */ 1054 if (font_info->name == NULL) 1055 continue; 1056 1057 /* Don't free a default font of some frame on this display. */ 1058 FOR_EACH_FRAME (tail, frame) 1059 { 1060 struct frame *f = XFRAME (frame); 1061 if (FRAME_WINDOW_P (f) 1062 && FRAME_X_DISPLAY_INFO (f) == dpyinfo 1063 && font_info->font == FRAME_FONT (f)) 1064 break; 1065 } 1066 1067 if (!NILP (tail)) 1049 1050 if (!font_info->name 1051 || font_info->font == FRAME_FONT (f)) 1068 1052 continue; 1069 1053 … … 3771 3755 "Set attribute ATTR of FACE to VALUE.\n\ 3772 3756 FRAME being a frame means change the face on that frame.\n\ 3773 FRAME nil means change the face of the selected frame.\n\3757 FRAME nil means change change the face of the selected frame.\n\ 3774 3758 FRAME t means change the default for new frames.\n\ 3775 3759 FRAME 0 means change the face on all frames, and change the default\n\ … … 4127 4111 /* Changed font-related attributes of the `default' face are 4128 4112 reflected in changed `font' frame parameters. */ 4129 if (FRAMEP (frame) 4130 && (font_related_attr_p || font_attr_p) 4113 if ((font_related_attr_p || font_attr_p) 4131 4114 && lface_fully_specified_p (XVECTOR (lface)->contents)) 4132 4115 set_font_frame_param (frame, lface); … … 4174 4157 #endif /* HAVE_WINDOW_SYSTEM */ 4175 4158 else if (EQ (face, Qmenu)) 4176 { 4177 /* Indicate that we have to update the menu bar when 4178 realizing faces on FRAME. FRAME t change the 4179 default for new frames. We do this by setting 4180 setting the flag in new face caches */ 4181 if (FRAMEP (frame)) 4182 { 4183 struct frame *f = XFRAME (frame); 4184 if (FRAME_FACE_CACHE (f) == NULL) 4185 FRAME_FACE_CACHE (f) = make_face_cache (f); 4186 FRAME_FACE_CACHE (f)->menu_face_changed_p = 1; 4187 } 4188 else 4189 menu_face_changed_default = 1; 4190 } 4159 ++menu_face_change_count; 4191 4160 4192 4161 if (!NILP (param)) … … 4484 4453 4485 4454 if (changed_p && f->output_data.x->menubar_widget) 4486 free_frame_menubar (f); 4455 { 4456 free_frame_menubar (f); 4457 set_frame_menubar (f, 1, 1); 4458 } 4487 4459 } 4488 4460 } … … 4986 4958 c->faces_by_id = (struct face **) xmalloc (c->size * sizeof *c->faces_by_id); 4987 4959 c->f = f; 4988 c->menu_face_changed_p = menu_face_changed_default;4989 4960 return c; 4990 4961 } … … 6053 6024 int count = BINDING_STACK_SIZE (); 6054 6025 6055 /* Block input here so that we won't be surprised by an X expose6056 event, for instance ,without having the faces set up. */6026 /* Block input there so that we won't be surprised by an X expose 6027 event, for instance without having the faces set up. */ 6057 6028 BLOCK_INPUT; 6058 6029 specbind (Qscalable_fonts_allowed, Qt); … … 6071 6042 6072 6043 /* Reflect changes in the `menu' face in menu bars. */ 6073 if ( FRAME_FACE_CACHE (f)->menu_face_changed_p)6044 if (menu_face_change_count) 6074 6045 { 6075 FRAME_FACE_CACHE (f)->menu_face_changed_p = 0;6046 --menu_face_change_count; 6076 6047 #ifdef USE_X_TOOLKIT 6077 6048 x_update_menu_appearance (f); branches/GNU/src/xmenu.c
r1689 r1693 1691 1691 1692 1692 /* Save the frame's previous menu bar contents data. */ 1693 if (previous_menu_items_used) 1694 bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, 1695 previous_menu_items_used * sizeof (Lisp_Object)); 1693 bcopy (XVECTOR (f->menu_bar_vector)->contents, previous_items, 1694 previous_menu_items_used * sizeof (Lisp_Object)); 1696 1695 1697 1696 /* Fill in the current menu bar contents. */ 1698 1697 menu_items = f->menu_bar_vector; 1699 menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;1698 menu_items_allocated = XVECTOR (menu_items)->size; 1700 1699 init_menu_items (); 1701 1700 for (i = 0; i < XVECTOR (items)->size; i += 4) branches/GNU/src/xrdb.c
r1689 r1693 34 34 35 35 #if 1 /* I'd really appreciate it if this code could go away... -JimB */ 36 /* This avoids lossage in the `dual-universe' headers on AT&T SysV 37 X11. Don't do it on Solaris, because it breaks compilation with 38 XFree86 4.0.3 (and probably many other X11R6 releases) on Solaris 39 2 */ 40 #if defined(USG5) && !defined(SOLARIS2) 36 /* this avoids lossage in the `dual-universe' headers on AT&T SysV X11 */ 37 #ifdef USG5 41 38 #ifndef SYSV 42 39 #define SYSV 43 40 #endif 44 #endif /* USG5 && !SOLARIS2*/41 #endif /* USG5 */ 45 42 46 43 #endif /* 1 */
