… | |
… | |
155 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
155 | cursor_blink_ev (this, &rxvt_term::cursor_blink_cb), |
156 | #endif |
156 | #endif |
157 | #ifdef TEXT_BLINK |
157 | #ifdef TEXT_BLINK |
158 | text_blink_ev (this, &rxvt_term::text_blink_cb), |
158 | text_blink_ev (this, &rxvt_term::text_blink_cb), |
159 | #endif |
159 | #endif |
|
|
160 | #ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING |
|
|
161 | cont_scroll_ev (this, &rxvt_term::cont_scroll_cb), |
|
|
162 | #endif |
|
|
163 | #ifdef SELECTION_SCROLLING |
|
|
164 | sel_scroll_ev (this, &rxvt_term::sel_scroll_cb), |
|
|
165 | #endif |
|
|
166 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
|
|
167 | slip_wheel_ev (this, &rxvt_term::slip_wheel_cb), |
|
|
168 | #endif |
160 | #ifdef POINTER_BLANK |
169 | #ifdef POINTER_BLANK |
161 | pointer_ev (this, &rxvt_term::pointer_cb), |
170 | pointer_ev (this, &rxvt_term::pointer_cb), |
162 | #endif |
171 | #endif |
163 | #ifdef USE_XIM |
172 | #ifdef USE_XIM |
164 | im_ev (this, &rxvt_term::im_cb), |
173 | im_ev (this, &rxvt_term::im_cb), |
… | |
… | |
233 | XDestroyWindow (display->display, TermWin.parent[0]); |
242 | XDestroyWindow (display->display, TermWin.parent[0]); |
234 | } |
243 | } |
235 | |
244 | |
236 | // TODO: free pixcolours, colours should become part of rxvt_display |
245 | // TODO: free pixcolours, colours should become part of rxvt_display |
237 | |
246 | |
238 | delete PixColors; |
247 | delete PixColorsFocused; |
|
|
248 | #ifdef OFF_FOCUS_FADING |
|
|
249 | delete PixColorsUnFocused; |
|
|
250 | #endif |
239 | |
251 | |
240 | displays.put (display); |
252 | displays.put (display); |
241 | |
253 | |
242 | scr_release (); |
254 | scr_release (); |
243 | |
255 | |
… | |
… | |
285 | #ifdef CURSOR_BLINK |
297 | #ifdef CURSOR_BLINK |
286 | cursor_blink_ev.stop (); |
298 | cursor_blink_ev.stop (); |
287 | #endif |
299 | #endif |
288 | #ifdef TEXT_BLINK |
300 | #ifdef TEXT_BLINK |
289 | text_blink_ev.stop (); |
301 | text_blink_ev.stop (); |
|
|
302 | #endif |
|
|
303 | #ifndef NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING |
|
|
304 | cont_scroll_ev.stop (); |
|
|
305 | #endif |
|
|
306 | #ifdef SELECTION_SCROLLING |
|
|
307 | sel_scroll_ev.stop (); |
290 | #endif |
308 | #endif |
291 | #ifdef POINTER_BLANK |
309 | #ifdef POINTER_BLANK |
292 | pointer_ev.stop (); |
310 | pointer_ev.stop (); |
293 | #endif |
311 | #endif |
294 | |
312 | |
… | |
… | |
740 | max_height = MAX_ROWS * TermWin.fheight; |
758 | max_height = MAX_ROWS * TermWin.fheight; |
741 | |
759 | |
742 | szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth; |
760 | szHint.base_width = szHint.base_height = 2 * TermWin.int_bwidth; |
743 | |
761 | |
744 | sb_w = mb_h = 0; |
762 | sb_w = mb_h = 0; |
745 | window_vt_x = window_vt_y = 0; |
763 | window_vt_x = window_vt_y = TermWin.int_bwidth; |
746 | |
764 | |
747 | if (scrollbar_visible ()) |
765 | if (scrollbar_visible ()) |
748 | { |
766 | { |
749 | sb_w = scrollbar_TotalWidth (); |
767 | sb_w = scrollbar_TotalWidth (); |
750 | szHint.base_width += sb_w; |
768 | szHint.base_width += sb_w; |
751 | if (! (Options & Opt_scrollBar_right)) |
769 | if (!(Options & Opt_scrollBar_right)) |
752 | window_vt_x = sb_w; |
770 | window_vt_x += sb_w; |
753 | } |
771 | } |
754 | |
772 | |
755 | if (menubar_visible ()) |
773 | if (menubar_visible ()) |
756 | { |
774 | { |
757 | mb_h = menuBar_TotalHeight (); |
775 | mb_h = menuBar_TotalHeight (); |
758 | szHint.base_height += mb_h; |
776 | szHint.base_height += mb_h; |
759 | window_vt_y = mb_h; |
777 | window_vt_y += mb_h; |
760 | } |
778 | } |
761 | |
779 | |
762 | szHint.width_inc = TermWin.fwidth; |
780 | szHint.width_inc = TermWin.fwidth; |
763 | szHint.height_inc = TermWin.fheight; |
781 | szHint.height_inc = TermWin.fheight; |
764 | szHint.min_width = szHint.base_width + szHint.width_inc; |
782 | szHint.min_width = szHint.base_width + szHint.width_inc; |
… | |
… | |
940 | i = atoi (color); |
958 | i = atoi (color); |
941 | if (i >= 8 && i <= 15) |
959 | if (i >= 8 && i <= 15) |
942 | { /* bright colors */ |
960 | { /* bright colors */ |
943 | i -= 8; |
961 | i -= 8; |
944 | # ifndef NO_BRIGHTCOLOR |
962 | # ifndef NO_BRIGHTCOLOR |
945 | PixColors[idx] = PixColors[minBrightCOLOR + i]; |
963 | PixColorsFocused[idx] = PixColorsFocused[minBrightCOLOR + i]; |
946 | SET_PIXCOLOR (idx); |
964 | SET_PIXCOLOR (idx); |
947 | goto Done; |
965 | goto Done; |
948 | # endif |
966 | # endif |
949 | |
967 | |
950 | } |
968 | } |
951 | if (i >= 0 && i <= 7) |
969 | if (i >= 0 && i <= 7) |
952 | { /* normal colors */ |
970 | { /* normal colors */ |
953 | PixColors[idx] = PixColors[minCOLOR + i]; |
971 | PixColorsFocused[idx] = PixColorsFocused[minCOLOR + i]; |
954 | SET_PIXCOLOR (idx); |
972 | SET_PIXCOLOR (idx); |
955 | goto Done; |
973 | goto Done; |
956 | } |
974 | } |
957 | } |
975 | } |
958 | |
976 | |
… | |
… | |
975 | XFreeColors (display->display, XCMAP, (PixColors + idx), 1, |
993 | XFreeColors (display->display, XCMAP, (PixColors + idx), 1, |
976 | DisplayPlanes (display->display, display->screen)); |
994 | DisplayPlanes (display->display, display->screen)); |
977 | } |
995 | } |
978 | # endif |
996 | # endif |
979 | |
997 | |
980 | PixColors[idx] = xcol; |
998 | PixColorsFocused[idx] = xcol; |
981 | SET_PIXCOLOR (idx); |
999 | SET_PIXCOLOR (idx); |
982 | |
1000 | |
983 | /* XSetWindowAttributes attr; */ |
1001 | /* XSetWindowAttributes attr; */ |
984 | /* Cursor cursor; */ |
1002 | /* Cursor cursor; */ |
985 | Done: |
1003 | Done: |
|
|
1004 | #ifdef OFF_FOCUS_FADING |
|
|
1005 | PixColorsUnFocused[idx] = PixColorsFocused[idx].fade (display, atoi (rs[Rs_fade])); |
|
|
1006 | #endif |
986 | if (idx == Color_bg && ! (Options & Opt_transparent)) |
1007 | if (idx == Color_bg && ! (Options & Opt_transparent)) |
987 | XSetWindowBackground (display->display, TermWin.vt, |
1008 | XSetWindowBackground (display->display, TermWin.vt, PixColors[Color_bg]); |
988 | PixColors[Color_bg]); |
|
|
989 | |
1009 | |
990 | /* handle Color_BD, scrollbar background, etc. */ |
1010 | /* handle Color_BD, scrollbar background, etc. */ |
991 | |
1011 | |
992 | set_colorfgbg (); |
1012 | set_colorfgbg (); |
993 | recolour_cursor (); |
1013 | recolour_cursor (); |
… | |
… | |
1001 | void |
1021 | void |
1002 | rxvt_term::recolour_cursor () |
1022 | rxvt_term::recolour_cursor () |
1003 | { |
1023 | { |
1004 | XColor xcol[2]; |
1024 | XColor xcol[2]; |
1005 | |
1025 | |
1006 | xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColors[Color_pointer_fg] : PixColors[Color_fg]; |
1026 | xcol[0].pixel = ISSET_PIXCOLOR (Color_pointer_fg) ? PixColorsFocused[Color_pointer_fg] : PixColorsFocused[Color_fg]; |
1007 | xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColors[Color_pointer_bg] : PixColors[Color_bg]; |
1027 | xcol[1].pixel = ISSET_PIXCOLOR (Color_pointer_bg) ? PixColorsFocused[Color_pointer_bg] : PixColorsFocused[Color_bg]; |
1008 | XQueryColors (display->display, XCMAP, xcol, 2); |
1028 | XQueryColors (display->display, XCMAP, xcol, 2); |
1009 | XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); |
1029 | XRecolorCursor (display->display, TermWin_cursor, xcol + 0, xcol + 1); |
1010 | } |
1030 | } |
1011 | |
1031 | |
1012 | /*----------------------------------------------------------------------*/ |
1032 | /*----------------------------------------------------------------------*/ |