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_Text_Editor.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/Fl_Text_Editor.cxx') diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index b580951ae..cc57725ed 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -73,6 +73,7 @@ Fl_Text_Editor::Fl_Text_Editor(int X, int Y, int W, int H, const char* l) mCursorOn = 1; insert_mode_ = 1; key_bindings = 0; + set_flag(MAC_USE_ACCENTS_MENU); // handle the default key bindings add_default_key_bindings(&key_bindings); @@ -526,12 +527,8 @@ int Fl_Text_Editor::handle_key() { } #ifdef __APPLE__ if (Fl::marked_text_length()) { - int x, y; int pos = this->insert_position(); this->buffer()->select(pos - Fl::marked_text_length(), pos); - this->position_to_xy( this->insert_position(), &x, &y); - y += this->textsize(); - Fl::insertion_point_location(x, y); } #endif show_insert_position(); -- cgit v1.2.3