diff options
-rw-r--r-- | src/Window.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/Window.cc b/src/Window.cc index 68494e2..7cbc253 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Window.cc,v 1.91 2002/10/19 10:56:30 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.92 2002/10/22 14:39:21 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -287,7 +287,7 @@ tab(0) { | |||
287 | 287 | ||
288 | // use tab? and don't create a tab on windows that's not | 288 | // use tab? and don't create a tab on windows that's not |
289 | // maximizable as default (such as dialogs) | 289 | // maximizable as default (such as dialogs) |
290 | if (decorations.tab && fluxbox->useTabs() && decorations.maximize) | 290 | if (decorations.tab && fluxbox->useTabs() && isGroupable()) |
291 | tab = new Tab(this, 0, 0); | 291 | tab = new Tab(this, 0, 0); |
292 | 292 | ||
293 | decorate(); | 293 | decorate(); |
@@ -434,6 +434,12 @@ FluxboxWindow::~FluxboxWindow() { | |||
434 | #endif // DEBUG | 434 | #endif // DEBUG |
435 | } | 435 | } |
436 | 436 | ||
437 | bool FluxboxWindow::isGroupable() const { | ||
438 | if (isResizable() && isMaximizable() && ! isTransient()) | ||
439 | return true; | ||
440 | return false; | ||
441 | } | ||
442 | |||
437 | Window FluxboxWindow::createToplevelWindow( | 443 | Window FluxboxWindow::createToplevelWindow( |
438 | int x, int y, unsigned int width, | 444 | int x, int y, unsigned int width, |
439 | unsigned int height, | 445 | unsigned int height, |
@@ -990,7 +996,7 @@ void FluxboxWindow::reconfigure() { | |||
990 | 996 | ||
991 | if (Fluxbox::instance()->useTabs()) { | 997 | if (Fluxbox::instance()->useTabs()) { |
992 | //no tab and we allowed to use tab? then create it | 998 | //no tab and we allowed to use tab? then create it |
993 | if (!tab && decorations.tab) { | 999 | if (!tab && isGroupable()) { |
994 | tab = new Tab(this, 0, 0); | 1000 | tab = new Tab(this, 0, 0); |
995 | if (current_state == IconicState) | 1001 | if (current_state == IconicState) |
996 | tab->iconify(); | 1002 | tab->iconify(); |
@@ -1545,7 +1551,7 @@ bool FluxboxWindow::setInputFocus() { | |||
1545 | //---------------------------------- | 1551 | //---------------------------------- |
1546 | void FluxboxWindow::setTab(bool flag) { | 1552 | void FluxboxWindow::setTab(bool flag) { |
1547 | if (flag) { | 1553 | if (flag) { |
1548 | if (!tab) | 1554 | if (!tab && isGroupable()) |
1549 | tab = new Tab(this, 0, 0); | 1555 | tab = new Tab(this, 0, 0); |
1550 | tab->focus(); // draws the tab with correct texture | 1556 | tab->focus(); // draws the tab with correct texture |
1551 | tab->setPosition(); // set tab windows position | 1557 | tab->setPosition(); // set tab windows position |
@@ -2436,7 +2442,7 @@ void FluxboxWindow::redrawLabel() { | |||
2436 | screen->getScreenNumber(), | 2442 | screen->getScreenNumber(), |
2437 | gc, | 2443 | gc, |
2438 | getTitle().c_str(), getTitle().size(), | 2444 | getTitle().c_str(), getTitle().size(), |
2439 | frame.bevel_w, frame.bevel_w/4 + screen->getWindowStyle()->font.height()); | 2445 | frame.bevel_w, frame.bevel_w/2 + screen->getWindowStyle()->font.ascent()); |
2440 | } | 2446 | } |
2441 | } | 2447 | } |
2442 | 2448 | ||
@@ -3289,7 +3295,7 @@ void FluxboxWindow::resumeMoving() { | |||
3289 | screen->raiseFocus(); | 3295 | screen->raiseFocus(); |
3290 | if (screen->doShowWindowPos()) | 3296 | if (screen->doShowWindowPos()) |
3291 | screen->showPosition(frame.move_x, frame.move_y); | 3297 | screen->showPosition(frame.move_x, frame.move_y); |
3292 | XSync(display,false); | 3298 | XSync(display, false); |
3293 | XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), | 3299 | XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(), |
3294 | frame.move_x, frame.move_y, frame.resize_w, | 3300 | frame.move_x, frame.move_y, frame.resize_w, |
3295 | frame.resize_h); | 3301 | frame.resize_h); |