diff options
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/src/Window.cc b/src/Window.cc index 70531be..5c67618 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -1839,7 +1839,7 @@ void FluxboxWindow::maximize(unsigned int button) { | |||
1839 | 1839 | ||
1840 | if (! screen->doFullMax()) | 1840 | if (! screen->doFullMax()) |
1841 | dh -= screen->getToolbar()->getExposedHeight() + | 1841 | dh -= screen->getToolbar()->getExposedHeight() + |
1842 | screen->getBorderWidth(); | 1842 | screen->getBorderWidth2x(); |
1843 | 1843 | ||
1844 | if (dw < client.min_width) dw = client.min_width; | 1844 | if (dw < client.min_width) dw = client.min_width; |
1845 | if (dh < client.min_height) dh = client.min_height; | 1845 | if (dh < client.min_height) dh = client.min_height; |
@@ -1862,24 +1862,24 @@ void FluxboxWindow::maximize(unsigned int button) { | |||
1862 | if (screen->doFullMax()) { | 1862 | if (screen->doFullMax()) { |
1863 | dy = ((screen->getHeight() - dh) / 2) - screen->getBorderWidth(); | 1863 | dy = ((screen->getHeight() - dh) / 2) - screen->getBorderWidth(); |
1864 | } else { | 1864 | } else { |
1865 | dy = (((screen->getHeight() - screen->getToolbar()->getExposedHeight()) | 1865 | dy = (((screen->getHeight() - (screen->getToolbar()->getExposedHeight())) |
1866 | - dh) / 2) - screen->getBorderWidth(); | 1866 | - dh) / 2) - screen->getBorderWidth2x(); |
1867 | 1867 | ||
1868 | switch (screen->getToolbarPlacement()) { | 1868 | switch (screen->getToolbarPlacement()) { |
1869 | case Toolbar::TopLeft: | 1869 | case Toolbar::TopLeft: |
1870 | case Toolbar::TopCenter: | 1870 | case Toolbar::TopCenter: |
1871 | case Toolbar::TopRight: | 1871 | case Toolbar::TopRight: |
1872 | dy += screen->getToolbar()->getExposedHeight() + | 1872 | dy += screen->getToolbar()->getExposedHeight() + |
1873 | screen->getBorderWidth(); | 1873 | screen->getBorderWidth2x(); |
1874 | break; | 1874 | break; |
1875 | } | 1875 | } |
1876 | } | 1876 | } |
1877 | 1877 | ||
1878 | if (decorations.tab && Fluxbox::instance()->useTabs()) { // Want to se the tabs | 1878 | if (hasTab()) { |
1879 | switch(screen->getTabPlacement()) { | 1879 | switch(screen->getTabPlacement()) { |
1880 | case Tab::PTop: | 1880 | case Tab::PTop: |
1881 | dy += screen->getTabHeight(); | 1881 | dy += screen->getTabHeight(); |
1882 | dh -= screen->getTabHeight() + screen->getBorderWidth(); | 1882 | dh -= screen->getTabHeight(); |
1883 | break; | 1883 | break; |
1884 | case Tab::PLeft: | 1884 | case Tab::PLeft: |
1885 | if (screen->isTabRotateVertical()) { | 1885 | if (screen->isTabRotateVertical()) { |
@@ -1897,11 +1897,11 @@ void FluxboxWindow::maximize(unsigned int button) { | |||
1897 | dw -= screen->getTabWidth(); | 1897 | dw -= screen->getTabWidth(); |
1898 | break; | 1898 | break; |
1899 | case Tab::PBottom: | 1899 | case Tab::PBottom: |
1900 | dh -= screen->getTabHeight() + screen->getBorderWidth(); | 1900 | dh -= screen->getTabHeight(); |
1901 | break; | 1901 | break; |
1902 | default: | 1902 | default: |
1903 | dy += screen->getTabHeight(); | 1903 | dy += screen->getTabHeight(); |
1904 | dh -= screen->getTabHeight() + screen->getBorderWidth(); | 1904 | dh -= screen->getTabHeight(); |
1905 | break; | 1905 | break; |
1906 | } | 1906 | } |
1907 | } | 1907 | } |
@@ -2365,13 +2365,11 @@ void FluxboxWindow::redrawLabel(void) { | |||
2365 | 2365 | ||
2366 | GC gc = ((focused) ? screen->getWindowStyle()->l_text_focus_gc : | 2366 | GC gc = ((focused) ? screen->getWindowStyle()->l_text_focus_gc : |
2367 | screen->getWindowStyle()->l_text_unfocus_gc); | 2367 | screen->getWindowStyle()->l_text_unfocus_gc); |
2368 | 2368 | ||
2369 | Misc::DrawString(display, frame.label, gc, | 2369 | Misc::DrawString(display, frame.label, gc, |
2370 | &screen->getWindowStyle()->font, | 2370 | &screen->getWindowStyle()->font, |
2371 | client.title_text_w, frame.label_w, | 2371 | client.title_text_w, frame.label_w, |
2372 | frame.bevel_w, client.title); | 2372 | frame.bevel_w, client.title); |
2373 | |||
2374 | |||
2375 | } | 2373 | } |
2376 | 2374 | ||
2377 | 2375 | ||
@@ -2587,8 +2585,27 @@ void FluxboxWindow::propertyNotifyEvent(Atom atom) { | |||
2587 | if (decorations.titlebar) | 2585 | if (decorations.titlebar) |
2588 | redrawLabel(); | 2586 | redrawLabel(); |
2589 | 2587 | ||
2588 | if (hasTab()) // update tab | ||
2589 | getTab()->draw(false); | ||
2590 | |||
2590 | if (! iconic) | 2591 | if (! iconic) |
2591 | screen->getWorkspace(workspace_number)->update(); | 2592 | screen->getWorkspace(workspace_number)->update(); |
2593 | else if (Fluxbox::instance()->useIconBar()) { | ||
2594 | IconBar *iconbar = 0; | ||
2595 | IconBarObj *icon = 0; | ||
2596 | if ((iconbar = screen->getToolbar()->getIconBar()) != 0) { | ||
2597 | if ((icon = iconbar->findIcon(this)) != 0) | ||
2598 | iconbar->draw(icon, icon->getWidth()); | ||
2599 | #ifdef DEBUG | ||
2600 | else | ||
2601 | cerr<<__FILE__<<"("<<__LINE__<<"): can't find icon!"<<endl; | ||
2602 | #endif //DEBUG | ||
2603 | } | ||
2604 | #ifdef DEBUG | ||
2605 | else | ||
2606 | cerr<<__FILE__<<"("<<__LINE__<<"): can't find iconbar!"<<endl; | ||
2607 | #endif //DEBUG | ||
2608 | } | ||
2592 | 2609 | ||
2593 | break; | 2610 | break; |
2594 | 2611 | ||
@@ -2762,7 +2779,7 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent *be) { | |||
2762 | } | 2779 | } |
2763 | } else if (be->button == 2 && be->window == frame.label) { | 2780 | } else if (be->button == 2 && be->window == frame.label) { |
2764 | screen->getWorkspace(workspace_number)->lowerWindow(this); | 2781 | screen->getWorkspace(workspace_number)->lowerWindow(this); |
2765 | 2782 | ||
2766 | } else if (windowmenu && be->button == 3 && | 2783 | } else if (windowmenu && be->button == 3 && |
2767 | (frame.title == be->window || frame.label == be->window || | 2784 | (frame.title == be->window || frame.label == be->window || |
2768 | frame.handle == be->window)) { | 2785 | frame.handle == be->window)) { |