]> git.lyx.org Git - lyx.git/blobdiff - src/ColorHandler.C
- remove some unused code
[lyx.git] / src / ColorHandler.C
index 8b6536c2bb42bf27f090bd7ad5a34a3d3f431022..fcd516610e6a08cdbcf71a431bf3b457d75d6a8d 100644 (file)
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /* This file is part of
  * ======================================================
  * 
 
 #include <cmath>
 
-#include FORMS_H_LOCATION
-#include "debug.h"
-
+#include "frontends/GUIRunTime.h"
 #include "ColorHandler.h"
 #include "LColor.h"
 #include "gettext.h"
+#include "debug.h"
 
 using std::endl;
 
 LyXColorHandler::LyXColorHandler() 
 {
-       display = fl_get_display();
-       drawable = XCreatePixmap(display, fl_root, 10, 10,
-                                fl_get_visual_depth());
+       display = GUIRunTime::x11Display();
+       drawable = XCreatePixmap(display,
+                                RootWindow(display, GUIRunTime::x11Screen()),
+                                10, 10,
+                                GUIRunTime::x11VisualDepth());
        
-       colormap = fl_state[fl_get_vclass()].colormap;
+       colormap = GUIRunTime::x11Colormap();
        // Clear the GC cache
        for (int i = 0; i <= LColor::ignore; ++i) {
                colorGCcache[i] = 0;
@@ -50,7 +50,7 @@ LyXColorHandler::~LyXColorHandler()
        // Iterate over the line cache and Free the GCs
        for (LineGCCache::iterator lit = lineGCcache.begin();
             lit != lineGCcache.end(); ++lit) {
-               XFreeGC(display, (*lit).second);
+               XFreeGC(display, lit->second);
        }
 }