From 914e7f9b0926a62f65c0351963ba533c6dee09f5 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Fri, 8 Feb 2013 11:58:19 +0000 Subject: Mac OS text input: removed the Fl::marked_text_length() function that's not necessary. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Display.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Fl_Text_Display.cxx') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index e8af2c555..0b5d75c3f 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1942,7 +1942,7 @@ void Fl_Text_Display::draw_string(int style, if (style & PRIMARY_MASK) { if (Fl::focus() == (Fl_Widget*)this) { #ifdef __APPLE__ - if (Fl::marked_text_length()) background = color();// Mac OS: underline marked text + if (Fl::compose_state) background = color();// Mac OS: underline marked text else #endif background = selection_color(); @@ -1978,8 +1978,8 @@ void Fl_Text_Display::draw_string(int style, fl_push_clip(X, Y, toX - X, mMaxsize); #endif fl_draw( string, nChars, X, Y + mMaxsize - fl_descent()); -#ifdef __APPLE__ // Mac OS: underline marked (= selected + Fl::marked_text_length() != 0) text - if (Fl::marked_text_length() && (style & PRIMARY_MASK)) { +#ifdef __APPLE__ // Mac OS: underline marked (= selected + Fl::compose_state != 0) text + if (Fl::compose_state && (style & PRIMARY_MASK)) { fl_color( fl_color_average(foreground, background, 0.6) ); fl_line(X, Y + mMaxsize - 1, X + fl_width(string, nChars), Y + mMaxsize - 1); } @@ -3476,7 +3476,7 @@ void Fl_Text_Display::draw(void) { if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_SCROLL | FL_DAMAGE_EXPOSE) && ( #ifdef __APPLE__ - Fl::marked_text_length() || + Fl::compose_state || #endif !has_selection || mCursorPos < start || mCursorPos > end) && mCursorOn && Fl::focus() == (Fl_Widget*)this ) { -- cgit v1.2.3