summaryrefslogtreecommitdiff
path: root/src/FbTk/GContext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/GContext.cc')
-rw-r--r--src/FbTk/GContext.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/FbTk/GContext.cc b/src/FbTk/GContext.cc
index 5f6f3b9..838c92e 100644
--- a/src/FbTk/GContext.cc
+++ b/src/FbTk/GContext.cc
@@ -34,11 +34,10 @@ namespace FbTk {
34Display *GContext::m_display = 0; 34Display *GContext::m_display = 0;
35 35
36GContext::GContext(const FbTk::FbDrawable &drawable): 36GContext::GContext(const FbTk::FbDrawable &drawable):
37 m_gc(XCreateGC(m_display != 0 ? m_display : FbTk::App::instance()->display(), 37 m_gc(XCreateGC(drawable.display(), drawable.drawable(), 0, 0)) {
38 drawable.drawable(), 38
39 0, 0)) {
40 if (m_display == 0) 39 if (m_display == 0)
41 m_display = FbTk::App::instance()->display(); 40 m_display = drawable.display();
42 41
43 setGraphicsExposure(false); 42 setGraphicsExposure(false);
44} 43}