all repos — fluxbox @ 5835711c20bffc831be69fc70fd6ac186c1f881f

custom fork of the fluxbox windowmanager

groupable function
fluxgen fluxgen
commit

5835711c20bffc831be69fc70fd6ac186c1f881f

parent

ff62b8edce0e94648c7a16a2e989f9fec4260d1e

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

jump to
M src/Window.ccsrc/Window.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: Window.cc,v 1.91 2002/10/19 10:56:30 fluxgen Exp $ +// $Id: Window.cc,v 1.92 2002/10/22 14:39:21 fluxgen Exp $ #include "Window.hh"

@@ -287,7 +287,7 @@ positionWindows();

// use tab? and don't create a tab on windows that's not // maximizable as default (such as dialogs) - if (decorations.tab && fluxbox->useTabs() && decorations.maximize) + if (decorations.tab && fluxbox->useTabs() && isGroupable()) tab = new Tab(this, 0, 0); decorate();

@@ -434,6 +434,12 @@ cerr<<__FILE__<<"("<<__LINE__<<"): ~FluxboxWindow("<<this<<")"<<endl;

#endif // DEBUG } +bool FluxboxWindow::isGroupable() const { + if (isResizable() && isMaximizable() && ! isTransient()) + return true; + return false; +} + Window FluxboxWindow::createToplevelWindow( int x, int y, unsigned int width, unsigned int height,

@@ -990,7 +996,7 @@ upsize();

if (Fluxbox::instance()->useTabs()) { //no tab and we allowed to use tab? then create it - if (!tab && decorations.tab) { + if (!tab && isGroupable()) { tab = new Tab(this, 0, 0); if (current_state == IconicState) tab->iconify();

@@ -1545,7 +1551,7 @@ // Enables or disables the tab on the window

//---------------------------------- void FluxboxWindow::setTab(bool flag) { if (flag) { - if (!tab) + if (!tab && isGroupable()) tab = new Tab(this, 0, 0); tab->focus(); // draws the tab with correct texture tab->setPosition(); // set tab windows position

@@ -2436,7 +2442,7 @@ frame.label,

screen->getScreenNumber(), gc, getTitle().c_str(), getTitle().size(), - frame.bevel_w, frame.bevel_w/4 + screen->getWindowStyle()->font.height()); + frame.bevel_w, frame.bevel_w/2 + screen->getWindowStyle()->font.ascent()); } }

@@ -3289,7 +3295,7 @@ setInputFocus();

screen->raiseFocus(); if (screen->doShowWindowPos()) screen->showPosition(frame.move_x, frame.move_y); - XSync(display,false); + XSync(display, false); XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), frame.move_x, frame.move_y, frame.resize_w, frame.resize_h);