… | |
… | |
227 | delete fontset[0]; |
227 | delete fontset[0]; |
228 | |
228 | |
229 | #ifdef HAVE_BG_PIXMAP |
229 | #ifdef HAVE_BG_PIXMAP |
230 | bgPixmap.destroy (); |
230 | bgPixmap.destroy (); |
231 | #endif |
231 | #endif |
|
|
232 | #ifdef HAVE_AFTERIMAGE |
|
|
233 | if (asv) |
|
|
234 | destroy_asvisual (asv, 0); |
|
|
235 | if (asimman) |
|
|
236 | destroy_image_manager (asimman, 0); |
|
|
237 | #endif |
232 | |
238 | |
233 | if (display) |
239 | if (display) |
234 | { |
240 | { |
235 | selection_clear (); |
241 | selection_clear (); |
236 | |
242 | |
… | |
… | |
619 | szHint.x += DisplayWidth (dpy, display->screen) - szHint.width - 2 * ext_bwidth; |
625 | szHint.x += DisplayWidth (dpy, display->screen) - szHint.width - 2 * ext_bwidth; |
620 | |
626 | |
621 | if (recalc_y) |
627 | if (recalc_y) |
622 | szHint.y += DisplayHeight (dpy, display->screen) - szHint.height - 2 * ext_bwidth; |
628 | szHint.y += DisplayHeight (dpy, display->screen) - szHint.height - 2 * ext_bwidth; |
623 | |
629 | |
624 | ncol = width / fwidth; |
630 | ncol = width / fwidth; |
625 | nrow = height / fheight; |
631 | nrow = height / fheight; |
626 | } |
632 | } |
627 | |
633 | |
628 | /*----------------------------------------------------------------------*/ |
634 | /*----------------------------------------------------------------------*/ |
629 | /* |
635 | /* |
… | |
… | |
905 | int old_width = szHint.width; |
911 | int old_width = szHint.width; |
906 | int old_height = szHint.height; |
912 | int old_height = szHint.height; |
907 | |
913 | |
908 | window_calc (newwidth, newheight); |
914 | window_calc (newwidth, newheight); |
909 | |
915 | |
910 | if (!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 | |
|
|
918 | // to avoid races between us and the wm, we clear the incremental size hints around the xresizewindow |
|
|
919 | if (set_hint) |
|
|
920 | { |
|
|
921 | szHint.flags &= ~(PBaseSize | PResizeInc); |
911 | XSetWMNormalHints (dpy, parent[0], &szHint); |
922 | XSetWMNormalHints (dpy, parent[0], &szHint); |
|
|
923 | szHint.flags |= PBaseSize | PResizeInc; |
|
|
924 | } |
912 | |
925 | |
913 | if (!ignoreparent) |
926 | if (!ignoreparent) |
914 | { |
927 | { |
915 | #ifdef SMART_RESIZE |
928 | #ifdef SMART_RESIZE |
916 | /* |
929 | /* |
… | |
… | |
956 | #else |
969 | #else |
957 | XResizeWindow (dpy, parent[0], szHint.width, szHint.height); |
970 | XResizeWindow (dpy, parent[0], szHint.width, szHint.height); |
958 | #endif |
971 | #endif |
959 | } |
972 | } |
960 | |
973 | |
|
|
974 | if (set_hint) |
|
|
975 | XSetWMNormalHints (dpy, parent[0], &szHint); |
|
|
976 | |
961 | fix_screen = ncol != prev_ncol || nrow != prev_nrow; |
977 | fix_screen = ncol != prev_ncol || nrow != prev_nrow; |
962 | |
978 | |
963 | if (fix_screen || newwidth != old_width || newheight != old_height) |
979 | if (fix_screen || newwidth != old_width || newheight != old_height) |
964 | { |
980 | { |
965 | if (scrollBar.state) |
981 | if (scrollBar.state) |
… | |
… | |
971 | |
987 | |
972 | #ifdef HAVE_BG_PIXMAP |
988 | #ifdef HAVE_BG_PIXMAP |
973 | if (bgPixmap.window_size_sensitive ()) |
989 | if (bgPixmap.window_size_sensitive ()) |
974 | update_background (); |
990 | update_background (); |
975 | #endif |
991 | #endif |
976 | |
|
|
977 | scr_clear (); |
|
|
978 | } |
992 | } |
979 | |
993 | |
980 | if (fix_screen || old_height == 0) |
994 | if (fix_screen || old_height == 0) |
981 | scr_reset (); |
995 | scr_reset (); |
982 | |
996 | |
… | |
… | |
1061 | |
1075 | |
1062 | /* Checking whether input method is running. */ |
1076 | /* Checking whether input method is running. */ |
1063 | bool |
1077 | bool |
1064 | rxvt_term::IMisRunning () |
1078 | rxvt_term::IMisRunning () |
1065 | { |
1079 | { |
1066 | char *p; |
|
|
1067 | Atom atom; |
1080 | Atom atom; |
1068 | Window win; |
1081 | Window win; |
1069 | char server[IMBUFSIZ]; |
1082 | char server[IMBUFSIZ]; |
1070 | |
1083 | |
1071 | /* get current locale modifier */ |
1084 | /* get current locale modifier */ |
1072 | if ((p = XSetLocaleModifiers (NULL)) != NULL) |
1085 | if (char *p = XSetLocaleModifiers (0)) |
1073 | { |
1086 | { |
1074 | strcpy (server, "@server="); |
1087 | strcpy (server, "@server="); |
1075 | strncat (server, & (p[4]), IMBUFSIZ - 9); /* skip "@im=" */ |
1088 | strncat (server, p + 4, IMBUFSIZ - 9); /* skip "@im=" */ |
1076 | |
1089 | |
1077 | if ((p = strchr (server + 1, '@')) != NULL) /* first one only */ |
1090 | if (p = strchr (server + 1, '@')) /* first one only */ |
1078 | *p = '\0'; |
1091 | *p = '\0'; |
1079 | |
1092 | |
1080 | atom = XInternAtom (dpy, server, False); |
1093 | atom = XInternAtom (dpy, server, False); |
1081 | win = XGetSelectionOwner (dpy, atom); |
1094 | win = XGetSelectionOwner (dpy, atom); |
1082 | |
1095 | |