From 615ec14ab26bdff2458457a26c5adfe743154873 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Wed, 14 May 2003 14:37:06 +0000 Subject: added better shape support --- src/fluxbox.cc | 10 ++++++++-- src/fluxbox.hh | 7 +++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index ba8994f..ecec988 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.146 2003/05/14 12:10:54 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.147 2003/05/14 14:37:06 fluxgen Exp $ #include "fluxbox.hh" @@ -454,6 +454,12 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile cursor.lr_angle = XCreateFontCursor(disp, XC_lr_angle); s_singleton = this; + m_have_shape = false; + m_shape_eventbase = 0; +#ifdef SHAPE + int shape_err; + m_have_shape = XShapeQueryExtension(disp, &m_shape_eventbase, &shape_err); +#endif // SHAPE #ifdef HAVE_RANDR // get randr event type @@ -877,7 +883,7 @@ void Fluxbox::handleEvent(XEvent * const e) { BScreen *scr = searchScreen(e->xany.window); if (scr != 0) scr->updateSize(); - } + } #endif // HAVE_RANDR } diff --git a/src/fluxbox.hh b/src/fluxbox.hh index a3c4f81..e0cfc6c 100644 --- a/src/fluxbox.hh +++ b/src/fluxbox.hh @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.hh,v 1.58 2003/05/13 00:18:28 fluxgen Exp $ +// $Id: fluxbox.hh,v 1.59 2003/05/14 14:35:39 fluxgen Exp $ #ifndef FLUXBOX_HH #define FLUXBOX_HH @@ -189,7 +189,8 @@ public: typedef std::vector TitlebarList; /// @return whether the timestamps on the menu changed bool menuTimestampsChanged() const; - + bool haveShape() const { return m_have_shape; } + int shapeEventbase() const { return m_shape_eventbase; } private: struct cursor { Cursor session, move, ll_angle, lr_angle; @@ -273,6 +274,8 @@ private: bool m_shutdown; int m_server_grabs; int m_randr_event_type; ///< the type number of randr event + int m_shape_eventbase; ///< event base for shape events + bool m_have_shape; ///< if shape is supported by server const char *m_RC_PATH; const char *m_RC_INIT_FILE; }; -- cgit v0.11.2