From: Dmitry Antipov Date: Tue, 11 Mar 2014 06:50:01 +0000 (+0400) Subject: * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor. X-Git-Tag: emacs-24.3.90~219 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b0b486db04acbbcb923539ab2b427384247875f3;p=emacs.git * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor. * xterm.c (x_free_frame_resources): Free all allocated cursors. --- diff --git a/src/ChangeLog b/src/ChangeLog index 14c917a4e61..2475fd5a1d0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-03-11 Dmitry Antipov + + * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor. + * xterm.c (x_free_frame_resources): Free all allocated cursors. + 2014-03-10 Eli Zaretskii * w32.c (fstatat): Don't add an extra slash if the argument ends diff --git a/src/xfns.c b/src/xfns.c index ff492dcf126..5dbc7053fd9 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -716,6 +716,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) XRecolorCursor (dpy, hand_cursor, &fore_color, &back_color); XRecolorCursor (dpy, hourglass_cursor, &fore_color, &back_color); XRecolorCursor (dpy, horizontal_drag_cursor, &fore_color, &back_color); + XRecolorCursor (dpy, vertical_drag_cursor, &fore_color, &back_color); } if (FRAME_X_WINDOW (f) != 0) diff --git a/src/xterm.c b/src/xterm.c index bf5456b5f8b..8ae26344f95 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9305,6 +9305,22 @@ x_free_frame_resources (struct frame *f) f->output_data.x->black_relief.gc = 0; } + /* Free cursors. */ + if (f->output_data.x->text_cursor != 0) + XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->text_cursor); + if (f->output_data.x->nontext_cursor != 0) + XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->nontext_cursor); + if (f->output_data.x->modeline_cursor != 0) + XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->modeline_cursor); + if (f->output_data.x->hand_cursor != 0) + XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->hand_cursor); + if (f->output_data.x->hourglass_cursor != 0) + XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->hourglass_cursor); + if (f->output_data.x->horizontal_drag_cursor != 0) + XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->horizontal_drag_cursor); + if (f->output_data.x->vertical_drag_cursor != 0) + XFreeCursor (FRAME_X_DISPLAY (f), f->output_data.x->vertical_drag_cursor); + XFlush (FRAME_X_DISPLAY (f)); }