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

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.373 by root, Mon May 28 16:40:03 2012 UTC vs.
Revision 1.376 by root, Mon Jun 4 15:18:52 2012 UTC

172#endif 172#endif
173#if ENABLE_TRANSPARENCY || ENABLE_PERL 173#if ENABLE_TRANSPARENCY || ENABLE_PERL
174 rootwin_ev.set <rxvt_term, &rxvt_term::rootwin_cb> (this), 174 rootwin_ev.set <rxvt_term, &rxvt_term::rootwin_cb> (this),
175#endif 175#endif
176 scrollbar_ev.set <rxvt_term, &rxvt_term::x_cb> (this), 176 scrollbar_ev.set <rxvt_term, &rxvt_term::x_cb> (this),
177#ifdef USE_XIM 177#if USE_XIM
178 im_ev.set <rxvt_term, &rxvt_term::im_cb> (this), 178 im_ev.set <rxvt_term, &rxvt_term::im_cb> (this),
179#endif 179#endif
180#ifdef POINTER_BLANK 180#ifdef POINTER_BLANK
181 pointer_ev.set <rxvt_term, &rxvt_term::pointer_cb> (this); 181 pointer_ev.set <rxvt_term, &rxvt_term::pointer_cb> (this);
182#endif 182#endif
231 if (display) 231 if (display)
232 { 232 {
233 selection_clear (); 233 selection_clear ();
234 selection_clear (true); 234 selection_clear (true);
235 235
236#ifdef USE_XIM 236#if USE_XIM
237 im_destroy (); 237 im_destroy ();
238#endif 238#endif
239 scrollBar.destroy (); 239 scrollBar.destroy ();
240 if (gc) XFreeGC (dpy, gc); 240 if (gc) XFreeGC (dpy, gc);
241 241
571 old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler); 571 old_xerror_handler = XSetErrorHandler ((XErrorHandler) rxvt_xerror_handler);
572 // TODO: handle this with exceptions and tolerate the memory loss 572 // TODO: handle this with exceptions and tolerate the memory loss
573 XSetIOErrorHandler (rxvt_xioerror_handler); 573 XSetIOErrorHandler (rxvt_xioerror_handler);
574 574
575 XrmInitialize (); 575 XrmInitialize ();
576
577#if HAVE_PIXBUF
578 g_type_init ();
579#endif
576} 580}
577 581
578/*----------------------------------------------------------------------*/ 582/*----------------------------------------------------------------------*/
579/* 583/*
580 * window size/position calculations for XSizeHint and other storage. 584 * window size/position calculations for XSizeHint and other storage.
961 965
962 for (i = Color_Black; i <= Color_White; i++) 966 for (i = Color_Black; i <= Color_White; i++)
963 if (pix_colors[Color_bg] == pix_colors[i]) 967 if (pix_colors[Color_bg] == pix_colors[i])
964 { 968 {
965 sprintf (bstr, "%d", i - Color_Black); 969 sprintf (bstr, "%d", i - Color_Black);
966#ifdef BG_IMAGE_FROM_FILE 970#if BG_IMAGE_FROM_FILE
967 xpmb = "default;"; 971 xpmb = "default;";
968#endif 972#endif
969 break; 973 break;
970 } 974 }
971 975
1083 } 1087 }
1084 1088
1085 if (fix_screen || old_height == 0) 1089 if (fix_screen || old_height == 0)
1086 scr_reset (); 1090 scr_reset ();
1087 1091
1088#ifdef USE_XIM 1092#if USE_XIM
1089 im_set_position (); 1093 im_set_position ();
1090#endif 1094#endif
1091} 1095}
1092 1096
1093/* 1097/*
1118} 1122}
1119 1123
1120/* -------------------------------------------------------------------- * 1124/* -------------------------------------------------------------------- *
1121 * - X INPUT METHOD ROUTINES - * 1125 * - X INPUT METHOD ROUTINES - *
1122 * -------------------------------------------------------------------- */ 1126 * -------------------------------------------------------------------- */
1123#ifdef USE_XIM 1127#if USE_XIM
1124 1128
1125void 1129void
1126rxvt_term::im_set_color (unsigned long &fg, unsigned long &bg) 1130rxvt_term::im_set_color (unsigned long &fg, unsigned long &bg)
1127{ 1131{
1128 fg = pix_colors [Color_fg]; 1132 fg = pix_colors [Color_fg];
1620{ 1624{
1621 Window cr; 1625 Window cr;
1622 XTranslateCoordinates (dpy, parent, display->root, 0, 0, &x, &y, &cr); 1626 XTranslateCoordinates (dpy, parent, display->root, 0, 0, &x, &y, &cr);
1623} 1627}
1624 1628
1625Pixmap
1626rxvt_term::get_pixmap_property (Atom property)
1627{
1628 Pixmap pixmap = None;
1629
1630 int aformat;
1631 unsigned long nitems, bytes_after;
1632 Atom atype;
1633 unsigned char *prop;
1634 int result = XGetWindowProperty (dpy, display->root, property,
1635 0L, 1L, False, XA_PIXMAP, &atype, &aformat,
1636 &nitems, &bytes_after, &prop);
1637 if (result == Success)
1638 {
1639 if (atype == XA_PIXMAP)
1640 pixmap = *(Pixmap *)prop;
1641 XFree (prop);
1642 }
1643
1644 return pixmap;
1645}
1646
1647#ifdef HAVE_BG_PIXMAP 1629#ifdef HAVE_BG_PIXMAP
1648 1630
1649void 1631void
1650rxvt_term::update_background () 1632rxvt_term::update_background ()
1651{ 1633{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines