… | |
… | |
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); |
… | |
… | |
1075 | |
1075 | |
1076 | /* Checking whether input method is running. */ |
1076 | /* Checking whether input method is running. */ |
1077 | bool |
1077 | bool |
1078 | rxvt_term::IMisRunning () |
1078 | rxvt_term::IMisRunning () |
1079 | { |
1079 | { |
1080 | char *p; |
|
|
1081 | Atom atom; |
1080 | Atom atom; |
1082 | Window win; |
1081 | Window win; |
1083 | char server[IMBUFSIZ]; |
1082 | char server[IMBUFSIZ]; |
1084 | |
1083 | |
1085 | /* get current locale modifier */ |
1084 | /* get current locale modifier */ |
1086 | if ((p = XSetLocaleModifiers (NULL)) != NULL) |
1085 | if (char *p = XSetLocaleModifiers (0)) |
1087 | { |
1086 | { |
1088 | strcpy (server, "@server="); |
1087 | strcpy (server, "@server="); |
1089 | strncat (server, & (p[4]), IMBUFSIZ - 9); /* skip "@im=" */ |
1088 | strncat (server, p + 4, IMBUFSIZ - 9); /* skip "@im=" */ |
1090 | |
1089 | |
1091 | if ((p = strchr (server + 1, '@')) != NULL) /* first one only */ |
1090 | if (p = strchr (server + 1, '@')) /* first one only */ |
1092 | *p = '\0'; |
1091 | *p = '\0'; |
1093 | |
1092 | |
1094 | atom = XInternAtom (dpy, server, False); |
1093 | atom = XInternAtom (dpy, server, False); |
1095 | win = XGetSelectionOwner (dpy, atom); |
1094 | win = XGetSelectionOwner (dpy, atom); |
1096 | |
1095 | |