From eaabe0321d66d348405f32eacda2be6acb018eca Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Mon, 24 Dec 2007 21:15:17 -0800 Subject: make bit depth accessible from an FbDrawable --- src/FbTk/FbDrawable.hh | 1 + src/FbTk/FbWindow.cc | 6 +++--- src/FbTk/FbWindow.hh | 10 +++++----- src/FbTk/MenuItem.cc | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/FbTk/FbDrawable.hh b/src/FbTk/FbDrawable.hh index 8d91377..32f5c53 100644 --- a/src/FbTk/FbDrawable.hh +++ b/src/FbTk/FbDrawable.hh @@ -72,6 +72,7 @@ public: virtual Drawable drawable() const = 0; virtual unsigned int width() const = 0; virtual unsigned int height() const = 0; + virtual unsigned int depth() const = 0; static inline Display *display() { return s_display; } protected: static Display *s_display; // display connection // display connection diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index f8141cf..12492d9 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc @@ -69,7 +69,7 @@ FbWindow::FbWindow(int screen_num, long eventmask, bool override_redirect, bool save_unders, - int depth, + unsigned int depth, int class_type): FbDrawable(), m_parent(0), @@ -89,7 +89,7 @@ FbWindow::FbWindow(const FbWindow &parent, long eventmask, bool override_redirect, bool save_unders, - int depth, int class_type): + unsigned int depth, int class_type): m_parent(&parent), m_screen_num(parent.screenNumber()), m_destroy(true), @@ -599,7 +599,7 @@ void FbWindow::updateGeometry() { void FbWindow::create(Window parent, int x, int y, unsigned int width, unsigned int height, long eventmask, bool override_redirect, - bool save_unders, int depth, int class_type) { + bool save_unders, unsigned int depth, int class_type) { m_border_width = 0; diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 091fb48..b69dfd7 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh @@ -58,7 +58,7 @@ public: int x, int y, unsigned int width, unsigned int height, long eventmask, bool overrride_redirect = false, bool save_unders = false, - int depth = CopyFromParent, + unsigned int depth = CopyFromParent, int class_type = InputOutput); FbWindow(const FbWindow &parent, @@ -67,7 +67,7 @@ public: long eventmask, bool overrride_redirect = false, bool save_unders = false, - int depth = CopyFromParent, + unsigned int depth = CopyFromParent, int class_type = InputOutput); virtual ~FbWindow(); @@ -179,7 +179,7 @@ public: inline unsigned int width() const { return m_width; } inline unsigned int height() const { return m_height; } inline unsigned int borderWidth() const { return m_border_width; } - inline int depth() const { return m_depth; } + inline unsigned int depth() const { return m_depth; } unsigned char alpha() const; int screenNumber() const; long eventMask() const; @@ -218,7 +218,7 @@ private: long eventmask, bool override_redirect, bool save_unders, - int depth, + unsigned int depth, int class_type); const FbWindow *m_parent; ///< parent FbWindow @@ -227,7 +227,7 @@ private: int m_x, m_y; ///< position of window unsigned int m_width, m_height; ///< size of window unsigned int m_border_width; ///< border size - int m_depth; ///< bit depth + unsigned int m_depth; ///< bit depth bool m_destroy; ///< wheter the x window was created before std::auto_ptr m_transparent; bool m_lastbg_color_set; diff --git a/src/FbTk/MenuItem.cc b/src/FbTk/MenuItem.cc index 1e708d3..0e99192 100644 --- a/src/FbTk/MenuItem.cc +++ b/src/FbTk/MenuItem.cc @@ -114,7 +114,7 @@ void MenuItem::draw(FbDrawable &draw, int icon_x = x + theme.bevelWidth(); int icon_y = y + theme.bevelWidth(); // enable clip mask - XSetClipMask(disp, gc, tmp_mask.drawable()); + XSetClipMask(disp, gc, None); //tmp_mask.drawable()); XSetClipOrigin(disp, gc, icon_x, icon_y); draw.copyArea(tmp_pixmap.drawable(), -- cgit v0.11.2