]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/xscreen.C
fix crash with "save as"
[lyx.git] / src / frontends / xforms / xscreen.C
index 23544eb6a65df73a2de02a10610404defc1ebe9a..40d72f39532751f7dc8a3b798e52bd916a117cf4 100644 (file)
@@ -1,10 +1,12 @@
 /**
  * \file xscreen.C
- * Copyright 1995-2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author unknown
- * \author John Levon <moz@compsoc.man.ac.uk>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
@@ -49,13 +51,12 @@ GC createGC()
        val.line_width = 0;
        return XCreateGC(fl_get_display(), RootWindow(fl_get_display(), 0),
                         GCForeground | GCFunction | GCGraphicsExposures
-                        | GCLineWidth | GCLineStyle , &val);
+                        | GCLineWidth | GCLineStyle, &val);
 }
 
 } // namespace anon
 
 
-// Constructor
 XScreen::XScreen(XWorkArea & o)
        : LyXScreen(), owner_(o)
 {
@@ -79,7 +80,8 @@ XScreen::~XScreen()
 
 void XScreen::setCursorColor()
 {
-       if (!lyxColorHandler.get()) return;
+       if (!lyxColorHandler.get())
+               return;
 
        GC gc = lyxColorHandler->getGCForeground(LColor::cursor);
 
@@ -203,10 +205,11 @@ void XScreen::expose(int x, int y, int w, int h)
 
 void XScreen::draw(LyXText * text, BufferView * bv, unsigned int y)
 {
-       if (cursor_visible_) hideCursor();
+       if (cursor_visible_)
+               hideCursor();
 
        int const old_first = text->first_y;
-       bool internal = (text == bv->text);
+       bool const internal = (text == bv->text);
        text->first_y = y;
 
        // is any optimization possible?