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.311 by root, Tue Nov 4 13:28:40 2008 UTC vs.
Revision 1.318 by root, Sat May 30 08:51:23 2009 UTC

625 szHint.x += DisplayWidth (dpy, display->screen) - szHint.width - 2 * ext_bwidth; 625 szHint.x += DisplayWidth (dpy, display->screen) - szHint.width - 2 * ext_bwidth;
626 626
627 if (recalc_y) 627 if (recalc_y)
628 szHint.y += DisplayHeight (dpy, display->screen) - szHint.height - 2 * ext_bwidth; 628 szHint.y += DisplayHeight (dpy, display->screen) - szHint.height - 2 * ext_bwidth;
629 629
630 ncol = width / fwidth; 630 ncol = width / fwidth;
631 nrow = height / fheight; 631 nrow = height / fheight;
632} 632}
633 633
634/*----------------------------------------------------------------------*/ 634/*----------------------------------------------------------------------*/
635/* 635/*
646 646
647 ws.ws_col = ncol; 647 ws.ws_col = ncol;
648 ws.ws_row = nrow; 648 ws.ws_row = nrow;
649 ws.ws_xpixel = width; 649 ws.ws_xpixel = width;
650 ws.ws_ypixel = height; 650 ws.ws_ypixel = height;
651 (void)ioctl (pty->pty, TIOCSWINSZ, &ws); 651 ioctl (pty->pty, TIOCSWINSZ, &ws);
652 652
653#if 0 653#if 0
654 // TIOCSWINSZ is supposed to do this automatically and correctly 654 // TIOCSWINSZ is supposed to do this automatically and correctly
655 if (cmd_pid) /* force through to the command */ 655 if (cmd_pid) /* force through to the command */
656 kill (-cmd_pid, SIGWINCH); 656 kill (-cmd_pid, SIGWINCH);
688 delete fontset[0]; 688 delete fontset[0];
689 fontset[0] = fs; 689 fontset[0] = fs;
690 690
691 prop = (*fs)[1]->properties (); 691 prop = (*fs)[1]->properties ();
692 prop.height += lineSpace; 692 prop.height += lineSpace;
693 prop.width += letterSpace;
693 694
694 fs->set_prop (prop, false); 695 fs->set_prop (prop, false);
695 696
696 fwidth = prop.width; 697 fwidth = prop.width;
697 fheight = prop.height; 698 fheight = prop.height;
911 int old_width = szHint.width; 912 int old_width = szHint.width;
912 int old_height = szHint.height; 913 int old_height = szHint.height;
913 914
914 window_calc (newwidth, newheight); 915 window_calc (newwidth, newheight);
915 916
916 if (!HOOK_INVOKE ((this, HOOK_RESIZE_ALL_WINDOWS, DT_INT, newwidth, DT_INT, newheight, DT_END))) 917 bool set_hint = !HOOK_INVOKE ((this, HOOK_RESIZE_ALL_WINDOWS, DT_INT, newwidth, DT_INT, newheight, DT_END));
918
919 // to avoid races between us and the wm, we clear the incremental size hints around the xresizewindow
920 if (set_hint)
921 {
922 szHint.flags &= ~(PBaseSize | PResizeInc);
917 XSetWMNormalHints (dpy, parent[0], &szHint); 923 XSetWMNormalHints (dpy, parent[0], &szHint);
924 szHint.flags |= PBaseSize | PResizeInc;
925 }
918 926
919 if (!ignoreparent) 927 if (!ignoreparent)
920 { 928 {
921#ifdef SMART_RESIZE 929#ifdef SMART_RESIZE
922 /* 930 /*
962#else 970#else
963 XResizeWindow (dpy, parent[0], szHint.width, szHint.height); 971 XResizeWindow (dpy, parent[0], szHint.width, szHint.height);
964#endif 972#endif
965 } 973 }
966 974
975 if (set_hint)
976 XSetWMNormalHints (dpy, parent[0], &szHint);
977
967 fix_screen = ncol != prev_ncol || nrow != prev_nrow; 978 fix_screen = ncol != prev_ncol || nrow != prev_nrow;
968 979
969 if (fix_screen || newwidth != old_width || newheight != old_height) 980 if (fix_screen || newwidth != old_width || newheight != old_height)
970 { 981 {
971 if (scrollBar.state) 982 if (scrollBar.state)
977 988
978#ifdef HAVE_BG_PIXMAP 989#ifdef HAVE_BG_PIXMAP
979 if (bgPixmap.window_size_sensitive ()) 990 if (bgPixmap.window_size_sensitive ())
980 update_background (); 991 update_background ();
981#endif 992#endif
982
983 scr_clear ();
984 } 993 }
985 994
986 if (fix_screen || old_height == 0) 995 if (fix_screen || old_height == 0)
987 scr_reset (); 996 scr_reset ();
988 997
1067 1076
1068/* Checking whether input method is running. */ 1077/* Checking whether input method is running. */
1069bool 1078bool
1070rxvt_term::IMisRunning () 1079rxvt_term::IMisRunning ()
1071{ 1080{
1072 char *p;
1073 Atom atom; 1081 Atom atom;
1074 Window win; 1082 Window win;
1075 char server[IMBUFSIZ]; 1083 char server[IMBUFSIZ];
1076 1084
1077 /* get current locale modifier */ 1085 /* get current locale modifier */
1078 if ((p = XSetLocaleModifiers (NULL)) != NULL) 1086 if (char *p = XSetLocaleModifiers (0))
1079 { 1087 {
1080 strcpy (server, "@server="); 1088 strcpy (server, "@server=");
1081 strncat (server, & (p[4]), IMBUFSIZ - 9); /* skip "@im=" */ 1089 strncat (server, p + 4, IMBUFSIZ - 9); /* skip "@im=" */
1082 1090
1083 if ((p = strchr (server + 1, '@')) != NULL) /* first one only */ 1091 if (p = strchr (server + 1, '@')) /* first one only */
1084 *p = '\0'; 1092 *p = '\0';
1085 1093
1086 atom = XInternAtom (dpy, server, False); 1094 atom = XInternAtom (dpy, server, False);
1087 win = XGetSelectionOwner (dpy, atom); 1095 win = XGetSelectionOwner (dpy, atom);
1088 1096

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines