X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fscreen.C;h=d7a1f34e55dad26386c26ecefe6c9f32f52c53dc;hb=36945644e70db39a8316570bb44fabc7a3bd3d49;hp=537a13a8aa67da716962320c9def9e0639fcff86;hpb=31bded06b1b4a9d99e309254886433876b2a57d2;p=lyx.git diff --git a/src/frontends/screen.C b/src/frontends/screen.C index 537a13a8aa..d7a1f34e55 100644 --- a/src/frontends/screen.C +++ b/src/frontends/screen.C @@ -35,8 +35,6 @@ #include "rowpainter.h" #include "version.h" -#include "insets/updatableinset.h" - #include "graphics/GraphicsImage.h" #include "graphics/GraphicsLoader.h" @@ -122,7 +120,7 @@ SplashScreen::SplashScreen() LyXScreen::LyXScreen() - : greyed_out_(true), cursor_visible_(false), sync_allowed_(true) + : greyed_out_(true), cursor_visible_(false) { // Start loading the pixmap as soon as possible if (lyxrc.show_banner) { @@ -147,20 +145,6 @@ void LyXScreen::checkAndGreyOut() void LyXScreen::showCursor(BufferView & bv) { - // This code is currently meaningful only for the Qt frontend. - // This is the place (like below in hideCursor) where - // processEvents is being called, and things like keystrokes and - // mouse clicks are being handed to the LyX core, once every - // cursor blink. - // THERE IS NOT SUPPOSED TO BE ANY OTHER CALL TO processEvents - // ANYWHERE ELSE. - // in BufferView::Pimpl::update() and here, the sync_allowed_ - // guard is set/cleared which is used here to prevent recursive - // calls to screen update. startUpdating() and doneUpdating() in - // coordcache again contain asserts to detect such recursion. - if (sync_allowed_) - lyx_gui::sync_events(); - if (cursor_visible_) return; @@ -206,9 +190,6 @@ void LyXScreen::showCursor(BufferView & bv) void LyXScreen::hideCursor() { - if (sync_allowed_) - lyx_gui::sync_events(); - if (!cursor_visible_) return; @@ -226,6 +207,12 @@ void LyXScreen::toggleCursor(BufferView & bv) } +void LyXScreen::prepareCursor() +{ + cursor_visible_ = false; +} + + void LyXScreen::redraw(BufferView & bv, ViewMetricsInfo const & vi) { greyed_out_ = false; @@ -235,7 +222,6 @@ void LyXScreen::redraw(BufferView & bv, ViewMetricsInfo const & vi) expose(0, 0, workarea().workWidth(), workarea().workHeight()); workarea().getPainter().end(); theCoords.doneUpdating(); - sync_allowed_ = true; }