Fl_Text_Editor now correctly handles middle mouse clicks (STR #1384)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5325 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
2d2e6f9bf8
commit
ae971b97da
2
CHANGES
2
CHANGES
@ -1,5 +1,7 @@
|
||||
CHANGES IN FLTK 1.1.8
|
||||
|
||||
- Fl_Text_Editor now correctly handles middle mouse
|
||||
clicks (STR #1384)
|
||||
- Added some GLUT4 functions (STR #1370)
|
||||
- Added "context_changed()" function for OpenGL windows
|
||||
which allows efficent texture loading (STR #1372)
|
||||
|
@ -3122,6 +3122,7 @@ int Fl_Text_Display::handle(int event) {
|
||||
Fl::focus(this);
|
||||
handle(FL_FOCUS);
|
||||
}
|
||||
if (Fl_Group::handle(event)) return 1;
|
||||
if (Fl::event_state()&FL_SHIFT) return handle(FL_DRAG);
|
||||
dragging = 1;
|
||||
int pos = xy_to_position(Fl::event_x(), Fl::event_y(), CURSOR_POS);
|
||||
|
@ -431,15 +431,6 @@ void Fl_Text_Editor::maybe_do_callback() {
|
||||
int Fl_Text_Editor::handle(int event) {
|
||||
if (!buffer()) return 0;
|
||||
|
||||
if (event == FL_PUSH && Fl::event_button() == 2) {
|
||||
dragType = -1;
|
||||
Fl::paste(*this, 0);
|
||||
Fl::focus(this);
|
||||
set_changed();
|
||||
if (when()&FL_WHEN_CHANGED) do_callback();
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (event) {
|
||||
case FL_FOCUS:
|
||||
show_cursor(mCursorOn); // redraws the cursor
|
||||
@ -475,6 +466,19 @@ int Fl_Text_Editor::handle(int event) {
|
||||
// case FL_MOVE:
|
||||
show_cursor(mCursorOn);
|
||||
return 1;
|
||||
|
||||
case FL_PUSH:
|
||||
if (Fl::event_button() == 2) {
|
||||
// don't let the text_display see this event
|
||||
if (Fl_Group::handle(event)) return 1;
|
||||
dragType = -1;
|
||||
Fl::paste(*this, 0);
|
||||
Fl::focus(this);
|
||||
set_changed();
|
||||
if (when()&FL_WHEN_CHANGED) do_callback();
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return Fl_Text_Display::handle(event);
|
||||
|
Loading…
Reference in New Issue
Block a user