From 9049aa855a08bb8fdb36f6c7f51658f105d4d474 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 6 Feb 2008 10:32:49 +0000 Subject: [PATCH] Bugfixes --- source/drawcontext.cpp | 2 +- source/drawcontext.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/drawcontext.cpp b/source/drawcontext.cpp index 44ecf21..d3ac485 100644 --- a/source/drawcontext.cpp +++ b/source/drawcontext.cpp @@ -26,7 +26,7 @@ DrawContext::DrawContext(Window &w): #ifndef WIN32 ::Display *dpy=display.get_display(); - use_shm=false; XShmQueryExtension(dpy); + use_shm=XShmQueryExtension(dpy); XWindowAttributes wa; XGetWindowAttributes(dpy, window.get_handle(), &wa); diff --git a/source/drawcontext.h b/source/drawcontext.h index 15f66cb..54ae3b3 100644 --- a/source/drawcontext.h +++ b/source/drawcontext.h @@ -35,7 +35,7 @@ public: ~DrawContext(); Window &get_window() const { return window; } - unsigned get_depth() const { return image->depth; } + unsigned get_depth() const { return image->bits_per_pixel; } unsigned char *get_data() { return reinterpret_cast(image->data); } void update(); }; -- 2.45.2