… | |
… | |
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; |
… | |
… | |
913 | |
914 | |
914 | window_calc (newwidth, newheight); |
915 | window_calc (newwidth, newheight); |
915 | |
916 | |
916 | bool set_hint = !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)); |
917 | |
918 | |
|
|
919 | // to avoid races between us and the wm, we clear the incremental size hints around the xresizewindow |
918 | if (set_hint) |
920 | if (set_hint) |
919 | { |
921 | { |
920 | szHint.flags &= ~(PBaseSize | PResizeInc); |
922 | szHint.flags &= ~(PBaseSize | PResizeInc); |
921 | XSetWMNormalHints (dpy, parent[0], &szHint); |
923 | XSetWMNormalHints (dpy, parent[0], &szHint); |
922 | szHint.flags |= PBaseSize | PResizeInc; |
924 | szHint.flags |= PBaseSize | PResizeInc; |
… | |
… | |
968 | #else |
970 | #else |
969 | XResizeWindow (dpy, parent[0], szHint.width, szHint.height); |
971 | XResizeWindow (dpy, parent[0], szHint.width, szHint.height); |
970 | #endif |
972 | #endif |
971 | } |
973 | } |
972 | |
974 | |
|
|
975 | if (set_hint) |
|
|
976 | XSetWMNormalHints (dpy, parent[0], &szHint); |
|
|
977 | |
973 | fix_screen = ncol != prev_ncol || nrow != prev_nrow; |
978 | fix_screen = ncol != prev_ncol || nrow != prev_nrow; |
974 | |
979 | |
975 | if (fix_screen || newwidth != old_width || newheight != old_height) |
980 | if (fix_screen || newwidth != old_width || newheight != old_height) |
976 | { |
981 | { |
977 | if (scrollBar.state) |
982 | if (scrollBar.state) |
… | |
… | |
983 | |
988 | |
984 | #ifdef HAVE_BG_PIXMAP |
989 | #ifdef HAVE_BG_PIXMAP |
985 | if (bgPixmap.window_size_sensitive ()) |
990 | if (bgPixmap.window_size_sensitive ()) |
986 | update_background (); |
991 | update_background (); |
987 | #endif |
992 | #endif |
988 | |
|
|
989 | scr_clear (); |
|
|
990 | } |
993 | } |
991 | |
|
|
992 | if (set_hint) |
|
|
993 | XSetWMNormalHints (dpy, parent[0], &szHint); |
|
|
994 | |
994 | |
995 | if (fix_screen || old_height == 0) |
995 | if (fix_screen || old_height == 0) |
996 | scr_reset (); |
996 | scr_reset (); |
997 | |
997 | |
998 | // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version |
998 | // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version |
… | |
… | |
1076 | |
1076 | |
1077 | /* Checking whether input method is running. */ |
1077 | /* Checking whether input method is running. */ |
1078 | bool |
1078 | bool |
1079 | rxvt_term::IMisRunning () |
1079 | rxvt_term::IMisRunning () |
1080 | { |
1080 | { |
1081 | char *p; |
|
|
1082 | Atom atom; |
1081 | Atom atom; |
1083 | Window win; |
1082 | Window win; |
1084 | char server[IMBUFSIZ]; |
1083 | char server[IMBUFSIZ]; |
1085 | |
1084 | |
1086 | /* get current locale modifier */ |
1085 | /* get current locale modifier */ |
1087 | if ((p = XSetLocaleModifiers (NULL)) != NULL) |
1086 | if (char *p = XSetLocaleModifiers (0)) |
1088 | { |
1087 | { |
1089 | strcpy (server, "@server="); |
1088 | strcpy (server, "@server="); |
1090 | strncat (server, & (p[4]), IMBUFSIZ - 9); /* skip "@im=" */ |
1089 | strncat (server, p + 4, IMBUFSIZ - 9); /* skip "@im=" */ |
1091 | |
1090 | |
1092 | if ((p = strchr (server + 1, '@')) != NULL) /* first one only */ |
1091 | if (p = strchr (server + 1, '@')) /* first one only */ |
1093 | *p = '\0'; |
1092 | *p = '\0'; |
1094 | |
1093 | |
1095 | atom = XInternAtom (dpy, server, False); |
1094 | atom = XInternAtom (dpy, server, False); |
1096 | win = XGetSelectionOwner (dpy, atom); |
1095 | win = XGetSelectionOwner (dpy, atom); |
1097 | |
1096 | |