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

Comparing rxvt-unicode/src/rxvttoolkit.C (file contents):
Revision 1.63 by root, Fri Aug 18 23:03:31 2006 UTC vs.
Revision 1.70 by sasha, Thu Jul 12 22:33:16 2007 UTC

64#endif 64#endif
65#if USE_XIM 65#if USE_XIM
66 "WM_LOCALE_NAME", 66 "WM_LOCALE_NAME",
67 "XIM_SERVERS", 67 "XIM_SERVERS",
68#endif 68#endif
69#ifdef TRANSPARENT 69#ifdef ENABLE_TRANSPARENCY
70 "_XROOTPMAP_ID", 70 "_XROOTPMAP_ID",
71 "ESETROOT_PMAP_ID", 71 "ESETROOT_PMAP_ID",
72#endif 72#endif
73#if ENABLE_XEMBED 73#if ENABLE_XEMBED
74 "_XEMBED", 74 "_XEMBED",
469 is_local = 0; 469 is_local = 0;
470 sockaddr_un sa; 470 sockaddr_un sa;
471 socklen_t sl = sizeof (sa); 471 socklen_t sl = sizeof (sa);
472 472
473 if (!getsockname (fd, (sockaddr *)&sa, &sl)) 473 if (!getsockname (fd, (sockaddr *)&sa, &sl))
474 is_local = sa.sun_family == AF_LOCAL; 474 is_local = sa.sun_family == AF_UNIX;
475 475
476 x_ev.start (fd, EVENT_READ); 476 x_ev.start (fd, EVENT_READ);
477 fcntl (fd, F_SETFD, FD_CLOEXEC); 477 fcntl (fd, F_SETFD, FD_CLOEXEC);
478 478
479 XSelectInput (dpy, root, PropertyChangeMask); 479 XSelectInput (dpy, root, PropertyChangeMask);
553 if (xev.type == PropertyNotify 553 if (xev.type == PropertyNotify
554 && xev.xany.window == root 554 && xev.xany.window == root
555 && xev.xproperty.atom == xa[XA_XIM_SERVERS]) 555 && xev.xproperty.atom == xa[XA_XIM_SERVERS])
556 im_change_check (); 556 im_change_check ();
557#endif 557#endif
558 if (xev.type == MappingNotify)
559 XRefreshKeyboardMapping (&xev.xmapping);
560
558 for (int i = xw.size (); i--; ) 561 for (int i = xw.size (); i--; )
559 { 562 {
560 if (!xw[i]) 563 if (!xw[i])
561 xw.erase_unordered (i); 564 xw.erase_unordered (i);
562 else if (xw[i]->window == xev.xany.window) 565 else if (xw[i]->window == xev.xany.window)
707 c.green = color.g; 710 c.green = color.g;
708 c.blue = color.b; 711 c.blue = color.b;
709 712
710 if (screen->visual->c_class == TrueColor) 713 if (screen->visual->c_class == TrueColor)
711 { 714 {
712 c.pixel = (color.r * (screen->visual->red_mask >> ctz (screen->visual->red_mask )) 715 c.pixel = (color.r >> (16 - popcount (screen->visual->red_mask )) << ctz (screen->visual->red_mask ))
713 / rgba::MAX_CC) << ctz (screen->visual->red_mask ) 716 | (color.g >> (16 - popcount (screen->visual->green_mask)) << ctz (screen->visual->green_mask))
714 | (color.g * (screen->visual->green_mask >> ctz (screen->visual->green_mask))
715 / rgba::MAX_CC) << ctz (screen->visual->green_mask)
716 | (color.b * (screen->visual->blue_mask >> ctz (screen->visual->blue_mask )) 717 | (color.b >> (16 - popcount (screen->visual->blue_mask )) << ctz (screen->visual->blue_mask ));
717 / rgba::MAX_CC) << ctz (screen->visual->blue_mask );
718 718
719 return true; 719 return true;
720 } 720 }
721 else if (XAllocColor (screen->dpy, screen->cmap, &c)) 721 else if (XAllocColor (screen->dpy, screen->cmap, &c))
722 return true; 722 return true;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines