From d1b14ad0840b7a8976f43b66f2257a13b0c70618 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 24 Aug 2003 15:18:09 +0000 Subject: remove round corners for already shaped windows, i.e xmms --- src/FbWinFrame.hh | 5 +++-- src/Window.cc | 22 ++++++---------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 2379c24..5832924 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWinFrame.hh,v 1.13 2003/08/19 16:13:25 fluxgen Exp $ +// $Id: FbWinFrame.hh,v 1.14 2003/08/24 15:18:09 fluxgen Exp $ #ifndef FBWINFRAME_HH #define FBWINFRAME_HH @@ -134,7 +134,7 @@ public: //@} void reconfigure(); - + void setUseShape(bool value); /** @name accessors */ @@ -281,6 +281,7 @@ private: }; ThemeListener m_themelistener; std::auto_ptr m_shape; + bool m_disable_shape; }; #endif // FBWINFRAME_HH diff --git a/src/Window.cc b/src/Window.cc index 3920367..1d2423d 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.220 2003/08/24 10:46:56 fluxgen Exp $ +// $Id: Window.cc,v 1.221 2003/08/24 15:14:41 fluxgen Exp $ #include "Window.hh" @@ -339,23 +339,13 @@ void FluxboxWindow::init() { // check for shape extension and whether the window is shaped m_shaped = false; -#ifdef SHAPE + if (Fluxbox::instance()->haveShape()) { - Display *disp = FbTk::App::instance()->display(); - int not_used; - unsigned int not_used2; - int shaped; - XShapeSelectInput(disp, m_client->window(), ShapeNotifyMask); - XShapeQueryExtents(disp, m_client->window(), - &shaped, /// bShaped - ¬_used, ¬_used, // xbs, ybs - ¬_used2, ¬_used2, // wbs, hbs - ¬_used, // cShaped - ¬_used, ¬_used, // xcs, ycs - ¬_used2, ¬_used2); // wcs, hcs - m_shaped = (shaped != 0 ? true : false); + Shape::setShapeNotify(winClient()); + m_shaped = Shape::isShaped(winClient()); } -#endif // SHAPE + + frame().setUseShape(!m_shaped); //!! TODO init of client should be better // we don't want to duplicate code here and in attachClient -- cgit v0.11.2