added better shape support
fluxgen fluxgen
2 files changed,
13 insertions(+),
4 deletions(-)
M
src/fluxbox.cc
→
src/fluxbox.cc
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ cursor.ll_angle = XCreateFontCursor(disp, XC_ll_angle);
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 @@ // update root window size in screen
BScreen *scr = searchScreen(e->xany.window); if (scr != 0) scr->updateSize(); - } + } #endif // HAVE_RANDR }
M
src/fluxbox.hh
→
src/fluxbox.hh
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@
typedef std::vector<Fluxbox::Titlebar> 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 @@ bool m_starting;
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; };