diff --git a/src/af/ev/gtk/ev_UnixMouse.cpp b/src/af/ev/gtk/ev_UnixMouse.cpp
index af3cb2a..2ca54ec 100644
a
|
b
|
void EV_UnixMouse::mouseClick(AV_View* pView, GdkEventButton* e) |
164 | 164 | invokeMouseMethod(pView,pEM,static_cast<UT_sint32>(pView->getGraphics()->tluD(e->x)),static_cast<UT_sint32>(pView->getGraphics()->tluD(e->y))); |
165 | 165 | signal(emc|mop|emb|state, static_cast<UT_sint32>(pView->getGraphics()->tluD(e->x)),static_cast<UT_sint32>(pView->getGraphics()->tluD(e->y))); |
166 | 166 | |
167 | | if (gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN) { |
| 167 | if (gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN || getenv ("ABI_TEST_TOUCH")) { |
168 | 168 | pView->setVisualSelectionEnabled(true); |
169 | 169 | } else { |
170 | 170 | pView->setVisualSelectionEnabled(false); |
diff --git a/src/text/fmt/gtk/gtktexthandle.c b/src/text/fmt/gtk/gtktexthandle.c
index 64a37ed..e0524eb 100644
a
|
b
|
_fv_text_handle_draw (FvTextHandle *handle, |
93 | 93 | priv = handle->priv; |
94 | 94 | cairo_save (cr); |
95 | 95 | |
| 96 | cairo_save (cr); |
96 | 97 | cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE); |
97 | 98 | cairo_set_source_rgba (cr, 0, 0, 0, 0); |
98 | 99 | cairo_paint (cr); |
| 100 | cairo_restore (cr); |
99 | 101 | |
100 | 102 | gtk_style_context_save (priv->style_context); |
101 | 103 | gtk_style_context_add_class (priv->style_context, "cursor-handle"); |
… |
… |
_fv_text_handle_set_relative_to (FvTextHandle *handle, |
523 | 525 | priv->windows[FV_TEXT_HANDLE_POSITION_SELECTION_START].window = |
524 | 526 | _fv_text_handle_create_window (handle, FV_TEXT_HANDLE_POSITION_SELECTION_START); |
525 | 527 | priv->windows[FV_TEXT_HANDLE_POSITION_SELECTION_END].window = |
526 | | _fv_text_handle_create_window (handle, FV_TEXT_HANDLE_POSITION_SELECTION_START); |
| 528 | _fv_text_handle_create_window (handle, FV_TEXT_HANDLE_POSITION_SELECTION_END); |
527 | 529 | priv->realized = TRUE; |
528 | 530 | } |
529 | 531 | else |
… |
… |
_fv_text_handle_set_mode (FvTextHandle *handle, |
550 | 552 | if (priv->mode == mode) |
551 | 553 | return; |
552 | 554 | |
| 555 | priv->mode = mode; |
| 556 | |
| 557 | if (mode != FV_TEXT_HANDLE_MODE_NONE) |
| 558 | _fv_text_handle_update_shape (handle, |
| 559 | priv->windows[FV_TEXT_HANDLE_POSITION_CURSOR].window, |
| 560 | FV_TEXT_HANDLE_POSITION_CURSOR); |
553 | 561 | switch (mode) |
554 | 562 | { |
555 | 563 | case FV_TEXT_HANDLE_MODE_CURSOR: |
… |
… |
_fv_text_handle_set_mode (FvTextHandle *handle, |
568 | 576 | gdk_window_hide (priv->windows[FV_TEXT_HANDLE_POSITION_SELECTION_END].window); |
569 | 577 | break; |
570 | 578 | } |
571 | | |
572 | | priv->mode = mode; |
573 | 579 | } |
574 | 580 | |
575 | 581 | FvTextHandleMode |
… |
… |
_fv_text_handle_set_visible (FvTextHandle *handle, |
645 | 651 | if (!window) |
646 | 652 | return; |
647 | 653 | |
| 654 | if (priv->windows[pos].dragged) |
| 655 | return; |
| 656 | |
648 | 657 | if (!visible) |
649 | 658 | gdk_window_hide (window); |
650 | 659 | else |
diff --git a/src/text/fmt/xp/fv_SelectionHandles.cpp b/src/text/fmt/xp/fv_SelectionHandles.cpp
index c8d538b..8c6cc4b 100644
a
|
b
|
void FV_SelectionHandles::updateSelectionEnd(UT_sint32 x, UT_sint32 y) |
107 | 107 | pos = UT_MAX (pos, left + 1); |
108 | 108 | |
109 | 109 | m_pView->selectRange(left, pos); |
| 110 | m_pView->_fixInsertionPointCoords(); |
| 111 | m_pView->ensureInsertionPointOnScreen(); |
110 | 112 | } |
111 | 113 | |
112 | 114 | void FV_SelectionHandles::updateCursor(UT_sint32 x, UT_sint32 y) |
diff --git a/src/text/fmt/xp/fv_View.cpp b/src/text/fmt/xp/fv_View.cpp
index 9e78a85..5948ebe 100644
a
|
b
|
bool FV_View::rtlPages() const |
14426 | 14426 | void |
14427 | 14427 | FV_View::selectRange( PT_DocPosition start, PT_DocPosition end ) |
14428 | 14428 | { |
| 14429 | PT_DocPosition prev_start, prev_end; |
| 14430 | |
| 14431 | prev_start = m_Selection.getSelectionLeftAnchor(); |
| 14432 | prev_end = m_Selection.getSelectionRightAnchor(); |
| 14433 | |
| 14434 | if (prev_start == start && prev_end == end) |
| 14435 | return; |
| 14436 | |
14429 | 14437 | _clearSelection(false); |
14430 | 14438 | _setPoint(start); |
14431 | 14439 | m_Selection.setSelectionLeftAnchor(start); |
14432 | 14440 | _setSelectionAnchor(); |
14433 | 14441 | setPoint(end); |
14434 | 14442 | m_Selection.setSelectionRightAnchor(end); |
14435 | | _drawSelection(); |
| 14443 | |
| 14444 | _drawBetweenPositions(MIN (prev_start, start), MAX (prev_end, end)); |
14436 | 14445 | _updateSelectionHandles(); |
14437 | 14446 | } |
14438 | 14447 | |