… | |
… | |
168 | sel_scroll_ev.set <rxvt_term, &rxvt_term::sel_scroll_cb> (this); |
168 | sel_scroll_ev.set <rxvt_term, &rxvt_term::sel_scroll_cb> (this); |
169 | #endif |
169 | #endif |
170 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
170 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
171 | slip_wheel_ev.set <rxvt_term, &rxvt_term::slip_wheel_cb> (this); |
171 | slip_wheel_ev.set <rxvt_term, &rxvt_term::slip_wheel_cb> (this); |
172 | #endif |
172 | #endif |
173 | #if ENABLE_TRANSPARENCY || ENABLE_PERL |
173 | #if BG_IMAGE_FROM_ROOT || ENABLE_PERL |
174 | rootwin_ev.set <rxvt_term, &rxvt_term::rootwin_cb> (this), |
174 | rootwin_ev.set <rxvt_term, &rxvt_term::rootwin_cb> (this), |
175 | #endif |
175 | #endif |
176 | scrollbar_ev.set <rxvt_term, &rxvt_term::x_cb> (this), |
176 | scrollbar_ev.set <rxvt_term, &rxvt_term::x_cb> (this), |
177 | #if USE_XIM |
177 | #if USE_XIM |
178 | im_ev.set <rxvt_term, &rxvt_term::im_cb> (this), |
178 | im_ev.set <rxvt_term, &rxvt_term::im_cb> (this), |
… | |
… | |
226 | |
226 | |
227 | #ifdef HAVE_BG_PIXMAP |
227 | #ifdef HAVE_BG_PIXMAP |
228 | bg_destroy (); |
228 | bg_destroy (); |
229 | #endif |
229 | #endif |
230 | |
230 | |
|
|
231 | #if HAVE_IMG |
|
|
232 | delete bg_img; |
|
|
233 | #endif |
|
|
234 | |
231 | if (display) |
235 | if (display) |
232 | { |
236 | { |
233 | selection_clear (); |
237 | selection_clear (); |
234 | selection_clear (true); |
238 | selection_clear (true); |
235 | |
239 | |
236 | #if USE_XIM |
240 | #if USE_XIM |
237 | im_destroy (); |
241 | im_destroy (); |
238 | #endif |
242 | #endif |
239 | scrollBar.destroy (); |
243 | scrollBar.destroy (); |
|
|
244 | |
|
|
245 | if (gc) |
240 | if (gc) XFreeGC (dpy, gc); |
246 | XFreeGC (dpy, gc); |
241 | |
247 | |
242 | delete drawable; |
248 | delete drawable; |
|
|
249 | |
243 | // destroy all windows |
250 | // destroy all windows |
244 | if (parent) |
251 | if (parent) |
245 | XDestroyWindow (dpy, parent); |
252 | XDestroyWindow (dpy, parent); |
246 | |
253 | |
247 | for (int i = 0; i < TOTAL_COLORS; i++) |
254 | for (int i = 0; i < TOTAL_COLORS; i++) |
… | |
… | |
311 | { |
318 | { |
312 | #if USE_XIM |
319 | #if USE_XIM |
313 | im_ev.stop (display); |
320 | im_ev.stop (display); |
314 | #endif |
321 | #endif |
315 | scrollbar_ev.stop (display); |
322 | scrollbar_ev.stop (display); |
316 | #if ENABLE_TRANSPARENCY || ENABLE_PERL |
323 | #if BG_IMAGE_FROM_ROOT || ENABLE_PERL |
317 | rootwin_ev.stop (display); |
324 | rootwin_ev.stop (display); |
318 | #endif |
325 | #endif |
319 | termwin_ev.stop (display); |
326 | termwin_ev.stop (display); |
320 | vt_ev.stop (display); |
327 | vt_ev.stop (display); |
321 | } |
328 | } |
… | |
… | |
817 | |
824 | |
818 | delete fontset[0]; |
825 | delete fontset[0]; |
819 | fontset[0] = fs; |
826 | fontset[0] = fs; |
820 | |
827 | |
821 | prop = (*fs)[rxvt_fontset::firstFont]->properties (); |
828 | prop = (*fs)[rxvt_fontset::firstFont]->properties (); |
822 | prop.width += letterSpace; |
829 | prop.width = max (prop.width + letterSpace, 1); |
823 | |
830 | |
824 | fs->set_prop (prop, false); |
831 | fs->set_prop (prop, false); |
825 | |
832 | |
826 | fwidth = prop.width; |
833 | fwidth = prop.width; |
827 | fheight = prop.height + lineSpace; |
834 | fheight = prop.height + lineSpace; |
… | |
… | |
1365 | char **s; |
1372 | char **s; |
1366 | XIMStyles *xim_styles; |
1373 | XIMStyles *xim_styles; |
1367 | |
1374 | |
1368 | set_environ (envv); |
1375 | set_environ (envv); |
1369 | |
1376 | |
1370 | if (! ((p = XSetLocaleModifiers (modifiers)) && *p)) |
1377 | if (!((p = XSetLocaleModifiers (modifiers)) && *p)) |
1371 | return false; |
1378 | return false; |
1372 | |
1379 | |
1373 | input_method = display->get_xim (locale, modifiers); |
1380 | input_method = display->get_xim (locale, modifiers); |
1374 | if (input_method == NULL) |
1381 | if (input_method == NULL) |
1375 | return false; |
1382 | return false; |
… | |
… | |
1683 | rxvt_term::update_background () |
1690 | rxvt_term::update_background () |
1684 | { |
1691 | { |
1685 | if (update_background_ev.is_active ()) |
1692 | if (update_background_ev.is_active ()) |
1686 | return; |
1693 | return; |
1687 | |
1694 | |
1688 | bg_invalidate (); |
|
|
1689 | |
|
|
1690 | if (!mapped) |
|
|
1691 | return; |
|
|
1692 | |
|
|
1693 | ev_tstamp to_wait = 0.5 - (ev::now () - bg_valid_since); |
1695 | ev_tstamp to_wait = 0.5 - (ev::now () - bg_valid_since); |
1694 | |
1696 | |
1695 | if (to_wait <= 0.) |
1697 | if (to_wait <= 0.) |
1696 | bg_render (); |
1698 | bg_render (); |
1697 | else |
1699 | else |