From: Mikko Rasa Date: Wed, 6 Feb 2008 10:32:49 +0000 (+0000) Subject: Bugfixes X-Git-Tag: 0.9~8 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=9049aa855a08bb8fdb36f6c7f51658f105d4d474;p=libs%2Fgui.git Bugfixes --- 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(); };