all repos — fluxbox @ 1da02c9f9d5211145271c8aa3dc91bebccdeb404

custom fork of the fluxbox windowmanager

raise and focus on click, and fixed icon mask
fluxgen fluxgen
commit

1da02c9f9d5211145271c8aa3dc91bebccdeb404

parent

c64ffad647e6a92161fc1874f25d1e8c01580b01

1 files changed, 10 insertions(+), 6 deletions(-)

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

@@ -20,7 +20,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: IconButton.cc,v 1.1 2003/08/11 15:45:50 fluxgen Exp $ +// $Id: IconButton.cc,v 1.2 2003/08/12 00:16:16 fluxgen Exp $ #include "IconButton.hh"

@@ -30,6 +30,7 @@

#include "IconButtonTheme.hh" #include "Window.hh" #include "WinClient.hh" +#include "SimpleCommand.hh" #ifdef HAVE_CONFIG_H #include "config.h"

@@ -49,6 +50,9 @@ TextButton(parent, font, win.winClient().title()),

m_win(win), m_icon_window(window(), 1, 1, 1, 1, ExposureMask | ButtonPressMask | ButtonReleaseMask) { + + FbTk::RefCount<FbTk::Command> focus(new FbTk::SimpleCommand<FluxboxWindow>(m_win, &FluxboxWindow::raiseAndFocus)); + setOnClick(focus); m_win.hintSig().attach(this);

@@ -115,16 +119,16 @@ }

if(hints->flags & IconMaskHint) { m_icon_mask.copy(hints->icon_mask); - m_icon_mask.scale(height(), height()); + m_icon_mask.scale(m_icon_pixmap.width(), m_icon_pixmap.height()); } else m_icon_mask = 0; XFree(hints); + hints = 0; #ifdef SHAPE - //!! TODO! bugs!?! - /* - if (m_icon_mask.drawable() != 0) { + + if (m_icon_mask.drawable() != 0) { XShapeCombineMask(FbTk::App::instance()->display(), m_icon_window.drawable(), ShapeBounding,

@@ -132,7 +136,7 @@ 0, 0,

m_icon_mask.drawable(), ShapeSet); } - */ + #endif // SHAPE setupWindow();