]> git.lyx.org Git - features.git/commitdiff
remove the lyx_focus and work_area_focus stuff
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 28 Jun 2000 16:03:01 +0000 (16:03 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 28 Jun 2000 16:03:01 +0000 (16:03 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@848 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/BufferView_pimpl.C
src/BufferView_pimpl.h
src/insets/insetcollapsable.C
src/insets/insetfoot.C
src/insets/insetmarginal.C

index c4fe36d1af2594358dfe8749d42a8cbcc68bb461..6c8f432e980d6a45e0ccdfafefc0401b7b10d6f5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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  Juergen Vigna  <jug@sad.it>
 
        * src/text.C (GetVisibleRow): fixed clearing of text if rowHeight >
index 59966edfe3da6ba3351a6071f8c68fc41bfc4a10..a9cc18b0999169dbb900c87230862d5356f5a2ed 100644 (file)
@@ -83,8 +83,6 @@ BufferView::Pimpl::Pimpl(BufferView * b, LyXView * o,
        current_scrollbar_value = 0;
        cursor_timeout.start();
        workarea_->setFocus();
-       work_area_focus = true;
-       lyx_focus = false;
        using_xterm_cursor = false;
 }
 
@@ -1061,7 +1059,6 @@ void BufferView::Pimpl::update()
 // update(1)  -> update(1 + 2 + 4) -> update(7) -> update(SELECT|FITCUR|CHANGE)
 // update(3)  -> update(1)         -> update(1) -> update(SELECT)
 
-//void BufferView::Pimpl::update(signed char f)
 void BufferView::Pimpl::update(BufferView::UpdateCodes f)
 {
        owner_->updateLayoutChoice();
@@ -1141,53 +1138,15 @@ void BufferView::Pimpl::cursorToggle()
                goto set_timer_and_return;
        }
 
-       if (lyx_focus && work_area_focus) {
-               if (!bv_->the_locking_inset) {
-                       screen_->CursorToggle(bv_->text);
-               } else {
-                       bv_->the_locking_inset->
-                               ToggleInsetCursor(bv_);
-               }
-               goto set_timer_and_return;
+       if (!bv_->the_locking_inset) {
+               screen_->CursorToggle(bv_->text);
        } else {
-               // Make sure that the cursor is visible.
-               if (!bv_->the_locking_inset) {
-                       screen_->ShowCursor(bv_->text);
-               } 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:
        cursor_timeout.restart();
-  skip_timer:
        return;
 }
 
index e7db7acae9d5d0849946ffad9440e802a5d565ed..7f9aae0b96dbb979280bd70f1fe023b556d51a7f 100644 (file)
@@ -122,10 +122,6 @@ struct BufferView::Pimpl : public SigC::Object {
        ///
        long current_scrollbar_value;
        ///
-       bool lyx_focus;
-       ///
-       bool work_area_focus;
-       ///
        FL_OBJECT * figinset_canvas;
        ///
        Timeout cursor_timeout;
index 2fc7ff83ed511677c55a5eeed1a7b879aa7d90b7..1889b8a1694c4417886d2f85e36f4dbf4021818e 100644 (file)
@@ -5,7 +5,8 @@
  *      
  *          Copyright (C) 1998 The LyX Team.
  *
- *======================================================*/
+ * ======================================================
+ */
 
 #include <config.h>
 
@@ -23,7 +24,8 @@
 
 using std::ostream;
 
-InsetCollapsable::InsetCollapsable() : InsetText()
+InsetCollapsable::InsetCollapsable()
+       : InsetText()
 {
     collapsed = true;
     label = "Label";
index 6d03835a5f0a66d5b37480ba086ec1fe671665e3..818db8b97ad19cda82f78262f251092c1d46d4be 100644 (file)
@@ -5,7 +5,8 @@
  *      
  *          Copyright 1998 The LyX Team.
  *
- *======================================================*/
+ * ======================================================
+ */
 
 #include <config.h>
 
@@ -60,7 +61,8 @@ char const * InsetFoot::EditMessage() const
 }
 
 
-int InsetFoot::Latex(Buffer const * buf, ostream & os, bool fragile, bool fp) const
+int InsetFoot::Latex(Buffer const * buf,
+                    ostream & os, bool fragile, bool fp) const
 {
     os << "\\footnote{%\n";
     
@@ -90,7 +92,8 @@ bool InsetFoot::InsertInsetAllowed(Inset * inset) const
 }
 
 
-LyXFont InsetFoot::GetDrawFont(BufferView * bv,LyXParagraph * p, int pos) const
+LyXFont InsetFoot::GetDrawFont(BufferView * bv,
+                              LyXParagraph * p, int pos) const
 {
     LyXFont fn = getLyXText(bv)->GetFont(bv->buffer(), p, pos);
     fn.decSize().decSize();
index 889743d2a5cdc9a12e4a77729e1cc3926e39148e..546a36c124f93900c37453fa0e4ff792e14974ea 100644 (file)
@@ -5,7 +5,8 @@
  *      
  *          Copyright 1998 The LyX Team.
  *
- *======================================================*/
+ * ======================================================
+ */
 
 #include <config.h>
 
@@ -24,7 +25,8 @@
 using std::ostream;
 using std::endl;
 
-InsetMarginal::InsetMarginal() : InsetCollapsable()
+InsetMarginal::InsetMarginal()
+       : InsetCollapsable()
 {
     setLabel(_("margin"));
     LyXFont font(LyXFont::ALL_SANE);