summaryrefslogtreecommitdiff
path: root/src/Fl_x.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-03-01 20:44:56 +0000
committerManolo Gouy <Manolo>2016-03-01 20:44:56 +0000
commit9c77129a28c4e3e4cda1199448c9dcdd69b2078c (patch)
tree254b51b020762857387096ae8d418d8101dfb5cf /src/Fl_x.cxx
parenta3d54d5d6cdd4a3cce8398675514c8e06c9ea13a (diff)
Allow running fluid -c without opening the X11 display.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11259 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_x.cxx')
-rw-r--r--src/Fl_x.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx
index 6f048aee5..cb87b9ee9 100644
--- a/src/Fl_x.cxx
+++ b/src/Fl_x.cxx
@@ -689,6 +689,9 @@ void fl_open_display() {
if (!d) Fl::fatal("Can't open display: %s",XDisplayName(0));
fl_open_display(d);
+ // the unique GC used by all X windows
+ GC gc = XCreateGC(fl_display, RootWindow(fl_display, fl_screen), 0, 0);
+ Fl_Display_Device::display_device()->driver()->gc(gc);
}