#include "FuncRequest.h"
#include "LyXFunc.h"
-#include "Painter.h"
#include "BufferView.h"
#include "Buffer.h"
#include "Color.h"
#include "Font.h"
#include "LyXRC.h"
-#include "Row.h"
#include "Text.h"
#include "LyXView.h"
#include "MetricsInfo.h"
-#include "Paragraph.h"
-#include "rowpainter.h"
#include "gettext.h"
#include "support/ForkedcallsController.h"
return;
}
- // No need to do anything if this is the current view. The BufferView
+ // No need to do anything if this is the current view. The BufferView
// metrics are already up to date.
- if (&lyx_view_ != theApp()->currentView())
+ if (&lyx_view_ != theApp()->currentView()) {
// FIXME: it would be nice to optimize for the off-screen case.
buffer_view_->updateMetrics(false);
+ buffer_view_->cursor().fixIfBroken();
+ }
updateScrollbar();
+ // update cursor position, because otherwise it has to wait until
+ // the blinking interval is over
+ if (cursor_visible_) {
+ hideCursor();
+ showCursor();
+ }
+
ViewMetricsInfo const & vi = buffer_view_->viewMetricsInfo();
greyed_out_ = false;
// In order to avoid bad surprise in the middle of an operation, we better stop
// the blinking cursor.
- if (!(cmd.action == LFUN_MOUSE_MOTION
+ if (!(cmd.action == LFUN_MOUSE_MOTION
&& cmd.button() == mouse_button::none))
stopBlinkingCursor();
if (needRedraw)
redraw();
-
+
// Skip these when selecting
if (cmd.action != LFUN_MOUSE_MOTION) {
lyx_view_.updateLayoutChoice();
}
// GUI tweaks except with mouse motion with no button pressed.
- if (!(cmd.action == LFUN_MOUSE_MOTION
+ if (!(cmd.action == LFUN_MOUSE_MOTION
&& cmd.button() == mouse_button::none)) {
// Slight hack: this is only called currently when we
// clicked somewhere, so we force through the display
void WorkArea::updateScrollbar()
{
- buffer_view_->updateScrollbar();
+ buffer_view_->updateScrollbar();
ScrollbarParameters const & scroll_ = buffer_view_->scrollbarParameters();
setScrollbarParams(scroll_.height, scroll_.position,
scroll_.lineScrollHeight);