Fix disappearing cursor problem.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/lyx-1_1_5@849 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-06-29 09:05:39 +00:00
parent 3eb270ff0b
commit a2b28bc530
3 changed files with 13 additions and 48 deletions

View File

@ -1,3 +1,12 @@
2000-06-28 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/BufferView_pimpl.h: remove member variables lyx_focus and
work_area_focus
* src/BufferView_pimpl.C (Pimpl): delete init of work_area_focus
and lyx_focus
(cursorToggle): remove special handling of lyx focus.
2000-06-28 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/insets/insetindex.C (Edit): add a callback when popup is

View File

@ -80,8 +80,6 @@ BufferView::Pimpl::Pimpl(BufferView * b, LyXView * o,
current_scrollbar_value = 0;
fl_set_timer(timer_cursor, 0.4);
workarea->setFocus();
work_area_focus = true;
lyx_focus = false;
using_xterm_cursor = false;
}
@ -1248,53 +1246,15 @@ void BufferView::Pimpl::cursorToggle()
goto set_timer_and_return;
}
if (lyx_focus && work_area_focus) {
if (!bv_->the_locking_inset) {
screen->CursorToggle();
} else {
bv_->the_locking_inset->
ToggleInsetCursor(bv_);
}
goto set_timer_and_return;
if (!bv_->the_locking_inset) {
screen->CursorToggle();
} else {
// Make sure that the cursor is visible.
if (!bv_->the_locking_inset) {
screen->ShowCursor();
} else {
if (!bv_->the_locking_inset->isCursorVisible())
bv_->the_locking_inset->
ToggleInsetCursor(bv_);
}
// This is only run when work_area_focus or lyx_focus is false.
Window tmpwin;
int tmp;
XGetInputFocus(fl_display, &tmpwin, &tmp);
// Commenting this out, we have not had problems with this
// for a long time. We will probably work on this code later
// and we can reenable this debug code then. Now it only
// anoying when debugging. (Lgb)
//if (lyxerr.debugging(Debug::INFO)) {
// lyxerr << "tmpwin: " << tmpwin
// << "\nwindow: " << view->owner_->getForm()->window
// << "\nwork_area_focus: " << view->work_area_focus
// << "\nlyx_focus : " << view->lyx_focus
// << endl;
//}
if (tmpwin != owner_->getForm()->window) {
lyx_focus = false;
goto skip_timer;
} else {
lyx_focus = true;
if (!work_area_focus)
goto skip_timer;
else
goto set_timer_and_return;
}
bv_->the_locking_inset->
ToggleInsetCursor(bv_);
}
set_timer_and_return:
fl_set_timer(timer_cursor, 0.4);
skip_timer:
return;
}

View File

@ -127,10 +127,6 @@ struct BufferView::Pimpl {
///
long current_scrollbar_value;
///
bool lyx_focus;
///
bool work_area_focus;
///
FL_OBJECT * figinset_canvas;
///
FL_OBJECT * timer_cursor;