ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.C
(Generate patch)

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.110 by root, Thu Feb 17 15:07:48 2005 UTC vs.
Revision 1.112 by root, Sat Feb 19 01:07:58 2005 UTC

181 "MULTIPLE", 181 "MULTIPLE",
182 "TARGETS", 182 "TARGETS",
183 "TIMESTAMP", 183 "TIMESTAMP",
184 "VT_SELECTION", 184 "VT_SELECTION",
185 "INCR", 185 "INCR",
186 "WM_PROTOCOLS",
186 "WM_DELETE_WINDOW", 187 "WM_DELETE_WINDOW",
187 "CLIPBOARD", 188 "CLIPBOARD",
188#if ENABLE_FRILLS 189#if ENABLE_FRILLS
189 "_NET_WM_PID", 190 "_NET_WM_PID",
190 "_MOTIF_WM_HINTS", 191 "_MOTIF_WM_HINTS",
199 "ESETROOT_PMAP_ID", 200 "ESETROOT_PMAP_ID",
200#endif 201#endif
201#ifdef OFFIX_DND 202#ifdef OFFIX_DND
202 "DndProtocol", 203 "DndProtocol",
203 "DndSelection", 204 "DndSelection",
205#endif
206#if ENABLE_XEMBED
207 "_XEMBED",
204#endif 208#endif
205 }; 209 };
206 210
207bool 211bool
208rxvt_term::init_vars () 212rxvt_term::init_vars ()
973 Get_Colours (); 977 Get_Colours ();
974 978
975 if (!set_fonts ()) 979 if (!set_fonts ())
976 rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n"); 980 rxvt_fatal ("unable to load base fontset, please specify a valid one using -fn, aborting.\n");
977 981
978#if ENABLE_FRILLS 982#if ENABLE_XEMBED
979 if (rs[Rs_embed]) 983 if (rs[Rs_embed])
980 { 984 {
985 XWindowAttributes wattr;
986
981 top = strtol (rs[Rs_embed], 0, 0); 987 top = strtol (rs[Rs_embed], 0, 0);
982 988
983 XWindowAttributes wattr;
984 XGetWindowAttributes (disp, top, &wattr); 989 if (!XGetWindowAttributes (disp, top, &wattr))
990 rxvt_fatal ("invalid window-id specified with -embed, aborting.\n");
985 991
986 window_calc (wattr.width, wattr.height); 992 window_calc (wattr.width, wattr.height);
987 993
988#if 0 994#if 0
989 if (wattr.map_state == IsViewable) 995 if (wattr.map_state == IsViewable)
1009#ifdef PREFER_24BIT 1015#ifdef PREFER_24BIT
1010 attributes.background_pixel = pix_colors_focused[Color_border]; 1016 attributes.background_pixel = pix_colors_focused[Color_border];
1011 attributes.border_pixel = pix_colors_focused[Color_border]; 1017 attributes.border_pixel = pix_colors_focused[Color_border];
1012 attributes.colormap = display->cmap; 1018 attributes.colormap = display->cmap;
1013 top = XCreateWindow (disp, DefaultRootWindow (disp), 1019 top = XCreateWindow (disp, DefaultRootWindow (disp),
1014 szHint.x, szHint.y, 1020 szHint.x, szHint.y,
1015 szHint.width, szHint.height, 1021 szHint.width, szHint.height,
1016 TermWin.ext_bwidth, 1022 TermWin.ext_bwidth,
1017 display->depth, InputOutput, 1023 display->depth, InputOutput,
1018 display->visual, 1024 display->visual,
1019 CWColormap | CWBackPixel | CWBorderPixel, &attributes); 1025 CWColormap | CWBackPixel | CWBorderPixel, &attributes);
1020#else 1026#else
1021 top = XCreateSimpleWindow (disp, DefaultRootWindow (disp), 1027 top = XCreateSimpleWindow (disp, DefaultRootWindow (disp),
1022 szHint.x, szHint.y, 1028 szHint.x, szHint.y,
1023 szHint.width, szHint.height, 1029 szHint.width, szHint.height,
1024 TermWin.ext_bwidth, 1030 TermWin.ext_bwidth,
1025 pix_colors_focused[Color_border], 1031 pix_colors_focused[Color_border],
1026 pix_colors_focused[Color_border]); 1032 pix_colors_focused[Color_border]);
1027#endif 1033#endif
1028 } 1034 }
1029 1035
1030 TermWin.parent[0] = top; 1036 TermWin.parent[0] = top;
1031 1037
1045 1051
1046 XSetWMProperties (disp, top, NULL, NULL, 1052 XSetWMProperties (disp, top, NULL, NULL,
1047 (char **)argv, argc, &szHint, &wmHint, &classHint); 1053 (char **)argv, argc, &szHint, &wmHint, &classHint);
1048 1054
1049 /* Enable delete window protocol */ 1055 /* Enable delete window protocol */
1050 XSetWMProtocols (disp, top, &xa[XA_WMDELETEWINDOW], 1); 1056 XSetWMProtocols (disp, top, &xa[XA_WM_DELETE_WINDOW], 1);
1051 1057
1052#if ENABLE_FRILLS 1058#if ENABLE_FRILLS
1053 long pid = getpid (); 1059 long pid = getpid ();
1054 1060
1055 XChangeProperty (disp, top, 1061 XChangeProperty (disp, top,
1061 KeyPressMask 1067 KeyPressMask
1062#if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ENABLE_FRILLS || ISO_14755 1068#if (MOUSE_WHEEL && MOUSE_SLIP_WHEELING) || ENABLE_FRILLS || ISO_14755
1063 | KeyReleaseMask 1069 | KeyReleaseMask
1064#endif 1070#endif
1065 | FocusChangeMask | VisibilityChangeMask 1071 | FocusChangeMask | VisibilityChangeMask
1066 | ExposureMask
1067 | StructureNotifyMask); 1072 | ExposureMask | StructureNotifyMask);
1073
1068 termwin_ev.start (display, top); 1074 termwin_ev.start (display, top);
1069 1075
1070#if ENABLE_FRILLS 1076#if ENABLE_FRILLS
1071 if (mwmhints.flags) 1077 if (mwmhints.flags)
1072 XChangeProperty (disp, top, xa[XA_MOTIF_WM_HINTS], xa[XA_MOTIF_WM_HINTS], 32, 1078 XChangeProperty (disp, top, xa[XA_MOTIF_WM_HINTS], xa[XA_MOTIF_WM_HINTS], 32,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines