]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/WorkArea.cpp
updated list of LyX translations
[lyx.git] / src / frontends / WorkArea.cpp
index 75b077888d7467d39555e47abd82e85eca5fc0ea..4e8187567c9ce6392994487f98d4ca9c1141ea82 100644 (file)
@@ -20,7 +20,6 @@
 
 #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"
@@ -138,7 +134,7 @@ void WorkArea::redraw()
                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()) {
                // FIXME: it would be nice to optimize for the off-screen case.
@@ -148,6 +144,13 @@ void WorkArea::redraw()
 
        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;
 
@@ -208,7 +211,7 @@ void WorkArea::dispatch(FuncRequest const & cmd0, key_modifier::state k)
 
        // 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();
 
@@ -216,7 +219,7 @@ void WorkArea::dispatch(FuncRequest const & cmd0, key_modifier::state k)
 
        if (needRedraw)
                redraw();
-       
+
        // Skip these when selecting
        if (cmd.action != LFUN_MOUSE_MOTION) {
                lyx_view_.updateLayoutChoice();
@@ -225,7 +228,7 @@ void WorkArea::dispatch(FuncRequest const & cmd0, key_modifier::state k)
        }
 
        // 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
@@ -251,7 +254,7 @@ void WorkArea::resizeBufferView()
 
 void WorkArea::updateScrollbar()
 {
-       buffer_view_->updateScrollbar(); 
+       buffer_view_->updateScrollbar();
        ScrollbarParameters const & scroll_ = buffer_view_->scrollbarParameters();
        setScrollbarParams(scroll_.height, scroll_.position,
                scroll_.lineScrollHeight);