From 482c4a5e0a52cc19396fd931c651dc2d89ea8be4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 13 Jan 2013 15:25:37 +0000 Subject: Mac OS: added support for the text input feature introduced in OS 10.7 "Lion" where pressing and holding some key opens a window with possible accented characters. This feature is used by the Fl_Input_ and Fl_Text_Editor widgets. User-defined text input widgets can optionally use this feature, but the default behavior is to not use it. Fl_Secret_Input turns it off, for example. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9792 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Input_.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Fl_Input_.cxx') diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index 644d954c3..0cfc6a8fe 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -388,6 +388,9 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) { } else { fl_rectf((int)(xpos+curx+0.5), Y+ypos, 2, height); } +#ifdef __APPLE__ + Fl::insertion_point_location(xpos+curx, Y+ypos+height, height); +#endif } CONTINUE: @@ -1119,6 +1122,7 @@ Fl_Input_::Fl_Input_(int X, int Y, int W, int H, const char* l) maximum_size_ = 32767; shortcut_ = 0; set_flag(SHORTCUT_LABEL); + set_flag(MAC_USE_ACCENTS_MENU); tab_nav(1); } -- cgit v1.2.3