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