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.286 by sf-exg, Tue Dec 14 08:01:51 2010 UTC vs.
Revision 1.293 by root, Mon Feb 21 07:41:01 2011 UTC

10 * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM> 10 * Copyright (c) 1996 Chuck Blake <cblake@BBN.COM>
11 * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca> 11 * Copyright (c) 1997 mj olesen <olesen@me.queensu.ca>
12 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de> 12 * Copyright (c) 1997,1998 Oezguer Kesim <kesim@math.fu-berlin.de>
13 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> 13 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com>
14 * - extensive modifications 14 * - extensive modifications
15 * Copyright (c) 2003-2008 Marc Lehmann <pcg@goof.com> 15 * Copyright (c) 2003-2008 Marc Lehmann <schmorp@schmorp.de>
16 * 16 *
17 * This program is free software; you can redistribute it and/or modify 17 * This program is free software; you can redistribute it and/or modify
18 * it under the terms of the GNU General Public License as published by 18 * it under the terms of the GNU General Public License as published by
19 * the Free Software Foundation; either version 2 of the License, or 19 * the Free Software Foundation; either version 2 of the License, or
20 * (at your option) any later version. 20 * (at your option) any later version.
811 811
812 if (option (Opt_scrollBar)) 812 if (option (Opt_scrollBar))
813 scrollBar.resize (); /* create and map scrollbar */ 813 scrollBar.resize (); /* create and map scrollbar */
814#ifdef HAVE_BG_PIXMAP 814#ifdef HAVE_BG_PIXMAP
815 { 815 {
816 bgPixmap.set_target (this); 816 bg_init ();
817 bgPixmap.invalidate ();
818 817
819#ifdef ENABLE_TRANSPARENCY 818#ifdef ENABLE_TRANSPARENCY
820 if (option (Opt_transparent)) 819 if (option (Opt_transparent))
821 { 820 {
822 bgPixmap.set_transparent (); 821 bg_set_transparent ();
823 822
824 if (rs [Rs_blurradius]) 823 if (rs [Rs_blurradius])
825 bgPixmap.set_blur_radius (rs [Rs_blurradius]); 824 bg_set_blur (rs [Rs_blurradius]);
826 825
827 if (ISSET_PIXCOLOR (Color_tint)) 826 if (ISSET_PIXCOLOR (Color_tint))
828 bgPixmap.set_tint (pix_colors_focused [Color_tint]); 827 bg_set_tint (pix_colors_focused [Color_tint]);
829 828
830 if (rs [Rs_shade]) 829 if (rs [Rs_shade])
831 bgPixmap.set_shade (rs [Rs_shade]); 830 bg_set_shade (rs [Rs_shade]);
832 831
833 bgPixmap.set_root_pixmap (); 832 bg_set_root_pixmap ();
834 XSelectInput (dpy, display->root, PropertyChangeMask); 833 XSelectInput (dpy, display->root, PropertyChangeMask);
835 rootwin_ev.start (display, display->root); 834 rootwin_ev.start (display, display->root);
836 } 835 }
837#endif 836#endif
838 837
842 const char *p = rs[Rs_backgroundPixmap]; 841 const char *p = rs[Rs_backgroundPixmap];
843 842
844 if ((p = strchr (p, ';')) != 0) 843 if ((p = strchr (p, ';')) != 0)
845 { 844 {
846 p++; 845 p++;
847 bgPixmap.set_geometry (p); 846 bg_set_geometry (p);
848 } 847 }
849 else 848 else
850 bgPixmap.set_defaultGeometry (); 849 bg_set_default_geometry ();
851 850
852 if (bgPixmap.set_file (rs[Rs_backgroundPixmap])) 851 if (bg_set_file (rs[Rs_backgroundPixmap]))
853 if (!bgPixmap.window_position_sensitive ()) 852 if (!bg_window_position_sensitive ())
854 update_background (); 853 update_background ();
855 } 854 }
856#endif 855#endif
857 } 856 }
858#endif 857#endif
890 889
891/*----------------------------------------------------------------------*/ 890/*----------------------------------------------------------------------*/
892void 891void
893rxvt_term::init_env () 892rxvt_term::init_env ()
894{ 893{
895 int i;
896 char *val; 894 char *val;
897 895
898#ifdef DISPLAY_IS_IP 896#ifdef DISPLAY_IS_IP
899 /* Fixup display_name for export over pty to any interested terminal 897 /* Fixup display_name for export over pty to any interested terminal
900 * clients via "ESC[7n" (e.g. shells). Note we use the pure IP number 898 * clients via "ESC[7n" (e.g. shells). Note we use the pure IP number
914 val = XDisplayString (dpy); 912 val = XDisplayString (dpy);
915 913
916 if (rs[Rs_display_name] == NULL) 914 if (rs[Rs_display_name] == NULL)
917 rs[Rs_display_name] = val; /* use broken `:0' value */ 915 rs[Rs_display_name] = val; /* use broken `:0' value */
918 916
919 i = strlen (val);
920 env_display = (char *)rxvt_malloc (i + 9); 917 env_display = (char *)rxvt_malloc (strlen (val) + 9);
921 918
922 sprintf (env_display, "DISPLAY=%s", val); 919 sprintf (env_display, "DISPLAY=%s", val);
923 920
924 sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent[0]); 921 sprintf (env_windowid, "WINDOWID=%lu", (unsigned long)parent[0]);
925 922
1507#if ENABLE_EWMH 1504#if ENABLE_EWMH
1508 xa[XA_NET_WM_PING], 1505 xa[XA_NET_WM_PING],
1509#endif 1506#endif
1510 }; 1507 };
1511 1508
1512 XSetWMProtocols (dpy, top, protocols, sizeof (protocols) / sizeof (protocols[0])); 1509 XSetWMProtocols (dpy, top, protocols, ARRAY_LENGTH(protocols));
1513 1510
1514#if ENABLE_FRILLS 1511#if ENABLE_FRILLS
1515 if (rs[Rs_transient_for]) 1512 if (rs[Rs_transient_for])
1516 XSetTransientForHint (dpy, top, (Window)strtol (rs[Rs_transient_for], 0, 0)); 1513 XSetTransientForHint (dpy, top, (Window)strtol (rs[Rs_transient_for], 0, 0));
1517#endif 1514#endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines