… | |
… | |
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) |
|
|
995 | { |
996 | scr_reset (); |
996 | scr_reset (); |
|
|
997 | } |
997 | |
998 | |
998 | // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version |
999 | // TODO, with nvidia-8178, resizes kill the alpha channel, report if not fixed in newer version |
999 | //scr_touch (false); |
1000 | //scr_touch (false); |
1000 | |
1001 | |
1001 | #ifdef HAVE_BG_PIXMAP |
1002 | #ifdef HAVE_BG_PIXMAP |