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.313 by root, Tue Nov 4 16:43:50 2008 UTC vs.
Revision 1.319 by sf-exg, Sun Jan 24 21:53:13 2010 UTC

237#endif 237#endif
238 238
239 if (display) 239 if (display)
240 { 240 {
241 selection_clear (); 241 selection_clear ();
242 selection_clear (true);
242 243
243#ifdef USE_XIM 244#ifdef USE_XIM
244 im_destroy (); 245 im_destroy ();
245#endif 246#endif
246 scrollBar.destroy (); 247 scrollBar.destroy ();
271 /* clear all resources */ 272 /* clear all resources */
272 for (int i = 0; i < allocated.size (); i++) 273 for (int i = 0; i < allocated.size (); i++)
273 free (allocated [i]); 274 free (allocated [i]);
274 275
275 free (selection.text); 276 free (selection.text);
277 free (selection.clip_text);
276 // TODO: manage env vars in child only(!) 278 // TODO: manage env vars in child only(!)
277 free (env_display); 279 free (env_display);
278 free (env_term); 280 free (env_term);
279 free (locale); 281 free (locale);
280 free (v_buffer); 282 free (v_buffer);
646 648
647 ws.ws_col = ncol; 649 ws.ws_col = ncol;
648 ws.ws_row = nrow; 650 ws.ws_row = nrow;
649 ws.ws_xpixel = width; 651 ws.ws_xpixel = width;
650 ws.ws_ypixel = height; 652 ws.ws_ypixel = height;
651 (void)ioctl (pty->pty, TIOCSWINSZ, &ws); 653 ioctl (pty->pty, TIOCSWINSZ, &ws);
652 654
653#if 0 655#if 0
654 // TIOCSWINSZ is supposed to do this automatically and correctly 656 // TIOCSWINSZ is supposed to do this automatically and correctly
655 if (cmd_pid) /* force through to the command */ 657 if (cmd_pid) /* force through to the command */
656 kill (-cmd_pid, SIGWINCH); 658 kill (-cmd_pid, SIGWINCH);
688 delete fontset[0]; 690 delete fontset[0];
689 fontset[0] = fs; 691 fontset[0] = fs;
690 692
691 prop = (*fs)[1]->properties (); 693 prop = (*fs)[1]->properties ();
692 prop.height += lineSpace; 694 prop.height += lineSpace;
695 prop.width += letterSpace;
693 696
694 fs->set_prop (prop, false); 697 fs->set_prop (prop, false);
695 698
696 fwidth = prop.width; 699 fwidth = prop.width;
697 fheight = prop.height; 700 fheight = prop.height;
969#else 972#else
970 XResizeWindow (dpy, parent[0], szHint.width, szHint.height); 973 XResizeWindow (dpy, parent[0], szHint.width, szHint.height);
971#endif 974#endif
972 } 975 }
973 976
977 if (set_hint)
978 XSetWMNormalHints (dpy, parent[0], &szHint);
979
974 fix_screen = ncol != prev_ncol || nrow != prev_nrow; 980 fix_screen = ncol != prev_ncol || nrow != prev_nrow;
975 981
976 if (fix_screen || newwidth != old_width || newheight != old_height) 982 if (fix_screen || newwidth != old_width || newheight != old_height)
977 { 983 {
978 if (scrollBar.state) 984 if (scrollBar.state)
984 990
985#ifdef HAVE_BG_PIXMAP 991#ifdef HAVE_BG_PIXMAP
986 if (bgPixmap.window_size_sensitive ()) 992 if (bgPixmap.window_size_sensitive ())
987 update_background (); 993 update_background ();
988#endif 994#endif
989
990 scr_clear ();
991 } 995 }
992
993 if (set_hint)
994 XSetWMNormalHints (dpy, parent[0], &szHint);
995 996
996 if (fix_screen || old_height == 0) 997 if (fix_screen || old_height == 0)
997 scr_reset (); 998 scr_reset ();
998 999
999 // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version 1000 // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version
1077 1078
1078/* Checking whether input method is running. */ 1079/* Checking whether input method is running. */
1079bool 1080bool
1080rxvt_term::IMisRunning () 1081rxvt_term::IMisRunning ()
1081{ 1082{
1082 char *p;
1083 Atom atom; 1083 Atom atom;
1084 Window win; 1084 Window win;
1085 char server[IMBUFSIZ]; 1085 char server[IMBUFSIZ];
1086 1086
1087 /* get current locale modifier */ 1087 /* get current locale modifier */
1088 if ((p = XSetLocaleModifiers (NULL)) != NULL) 1088 if (char *p = XSetLocaleModifiers (0))
1089 { 1089 {
1090 strcpy (server, "@server="); 1090 strcpy (server, "@server=");
1091 strncat (server, & (p[4]), IMBUFSIZ - 9); /* skip "@im=" */ 1091 strncat (server, p + 4, IMBUFSIZ - 9); /* skip "@im=" */
1092 1092
1093 if ((p = strchr (server + 1, '@')) != NULL) /* first one only */ 1093 if (p = strchr (server + 1, '@')) /* first one only */
1094 *p = '\0'; 1094 *p = '\0';
1095 1095
1096 atom = XInternAtom (dpy, server, False); 1096 atom = XInternAtom (dpy, server, False);
1097 win = XGetSelectionOwner (dpy, atom); 1097 win = XGetSelectionOwner (dpy, atom);
1098 1098

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines