all repos — fluxbox @ 16d5dfd6f2c1359428ea02cd3c34fc37ac130e78

custom fork of the fluxbox windowmanager

added shape
fluxgen fluxgen
commit

16d5dfd6f2c1359428ea02cd3c34fc37ac130e78

parent

34e479a1d4b8fbaf14c23094742541df5a393ce0

2 files changed, 25 insertions(+), 13 deletions(-)

jump to
M src/FbWinFrame.ccsrc/FbWinFrame.cc

@@ -19,15 +19,16 @@ // 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: FbWinFrame.cc,v 1.29 2003/06/24 14:05:00 fluxgen Exp $ +// $Id: FbWinFrame.cc,v 1.30 2003/07/10 11:36:21 fluxgen Exp $ #include "FbWinFrame.hh" #include "ImageControl.hh" #include "EventManager.hh" #include "TextButton.hh" #include "App.hh" +#include "FbWinFrameTheme.hh" #ifdef SHAPE -//#include "Shape.hh" +#include "Shape.hh" #endif // SHAPE #include <algorithm>

@@ -71,9 +72,8 @@ m_use_handle(true),

m_focused(false), m_visible(false), m_button_pm(0), - m_themelistener(*this) { - - // m_shape(new Shape(m_window, 0)) { //Shape::TOPLEFT | Shape::TOPRIGHT)) { + m_themelistener(*this), + m_shape(new Shape(m_window, theme.shapePlace())) { theme.addListener(m_themelistener); init(); }

@@ -488,8 +488,6 @@ }

void FbWinFrame::reconfigure() { m_window.clear(); - // if (m_shape.get()) - // m_shape->update(); // align titlebar and render it if (m_use_titlebar)

@@ -542,6 +540,17 @@ // render the theme

renderButtons(); if (!m_shaded) renderHandles(); + + if (m_shape.get() && theme().shapePlace() == Shape::NONE) + m_shape.reset(0); + else if (m_shape.get() == 0 && theme().shapePlace() != Shape::NONE) + m_shape.reset(new Shape(window(), theme().shapePlace())); + else if (m_shape.get()) + m_shape->setPlaces(theme().shapePlace()); + + if (m_shape.get()) + m_shape->update(); + // titlebar stuff rendered already by reconftitlebar }
M src/FbWinFrame.hhsrc/FbWinFrame.hh

@@ -19,27 +19,29 @@ // 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: FbWinFrame.hh,v 1.8 2003/05/21 23:59:53 rathnor Exp $ +// $Id: FbWinFrame.hh,v 1.9 2003/07/10 11:36:21 fluxgen Exp $ #ifndef FBWINFRAME_HH #define FBWINFRAME_HH #include "FbWindow.hh" -#include "Button.hh" #include "EventHandler.hh" -#include "Font.hh" -#include "Text.hh" -#include "FbWinFrameTheme.hh" #include "RefCount.hh" -#include "Command.hh" #include "Observer.hh" +#include "Color.hh" +#include "FbPixmap.hh" #include <vector> #include <string> +#include <memory> +class Shape; class FbWinFrameTheme; namespace FbTk { class ImageControl; +class Command; +class Button; +class Texture; }; /// holds a window frame with a client window

@@ -266,6 +268,7 @@ private:

FbWinFrame &m_frame; }; ThemeListener m_themelistener; + std::auto_ptr<Shape> m_shape; }; #endif // FBWINFRAME_HH