{
buffer.workAreaManager().add(this);
// Setup the signals
- cursor_timeout_.setInterval(400);
connect(&cursor_timeout_, SIGNAL(timeout()),
this, SLOT(toggleCursor()));
-
- cursor_timeout_.start();
+
+ int const time = QApplication::cursorFlashTime() / 2;
+ if (time > 0) {
+ cursor_timeout_.setInterval(time);
+ cursor_timeout_.start();
+ } else
+ // let's initialize this just to be safe
+ cursor_timeout_.setInterval(500);
+
+ general_timer_.setInterval(500);
+ connect(&general_timer_, SIGNAL(timeout()),
+ this, SLOT(handleRegularEvents()));
screen_ = QPixmap(viewport()->width(), viewport()->height());
cursor_ = new frontend::CursorWidget();
void GuiWorkArea::startBlinkingCursor()
{
showCursor();
+ //we're not supposed to cache this value.
+ int const time = QApplication::cursorFlashTime() / 2;
+ if (time <= 0)
+ return;
+ cursor_timeout_.setInterval(time);
cursor_timeout_.start();
}
hideCursor();
else
showCursor();
+}
+
- // Use this opportunity to deal with any child processes that
- // have finished but are waiting to communicate this fact
- // to the rest of LyX.
+void GuiWorkArea::handleRegularEvents()
+{
ForkedCallsController::handleCompletedProcesses();
}
void doubleClickTimeout();
/// toggle the cursor's visibility
void toggleCursor();
-
+ /// events to be triggered by general_timer_ should go here
+ void handleRegularEvents();
/// close this work area.
/// Slot for Buffer::closing signal.
void close();
///
QTimer cursor_timeout_;
+ /// this timer is used for any regular events one wants to
+ /// perform. at present it is used to check if forked processes
+ /// are done.
+ QTimer general_timer_;
///
SyntheticMouseEvent synthetic_mouse_event_;
///