X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FColorHandler.C;h=fcd516610e6a08cdbcf71a431bf3b457d75d6a8d;hb=c0ef23bc2a2f2b3bd6c3520e0c0bd6223bb1a1a2;hp=f1a9f29bd807d70dc32def1c05db509b5d709336;hpb=916ae4222d5218ad7d5c2d5b989ed95437eb3491;p=lyx.git diff --git a/src/ColorHandler.C b/src/ColorHandler.C index f1a9f29bd8..fcd516610e 100644 --- a/src/ColorHandler.C +++ b/src/ColorHandler.C @@ -1,10 +1,9 @@ -// -*- C++ -*- /* This file is part of * ====================================================== * * LyX, The Document Processor * - * Copyright 1998-2000 The LyX Team + * Copyright 1998-2001 The LyX Team * *======================================================*/ @@ -16,22 +15,23 @@ #include -#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); } }