diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Ewmh.cc | 13 | ||||
-rw-r--r-- | src/FbWinFrame.hh | 3 | ||||
-rw-r--r-- | src/Screen.cc | 26 | ||||
-rw-r--r-- | src/Window.cc | 7 |
4 files changed, 36 insertions, 13 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 15caab0..27c938b 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc | |||
@@ -1249,11 +1249,16 @@ void Ewmh::setupState(FluxboxWindow &win) { | |||
1249 | } | 1249 | } |
1250 | 1250 | ||
1251 | void Ewmh::updateFrameExtents(FluxboxWindow &win) { | 1251 | void Ewmh::updateFrameExtents(FluxboxWindow &win) { |
1252 | /* Frame extents are basically the amount the window manager frame | ||
1253 | protrudes from the client window, on left, right, top, bottom | ||
1254 | (it is independent of window position). | ||
1255 | */ | ||
1252 | int extents[4]; | 1256 | int extents[4]; |
1253 | extents[0] = win.frame().x(); | 1257 | // our frames currently don't protrude from left/right |
1254 | extents[1] = win.frame().x() + win.frame().width(); | 1258 | extents[0] = 0; |
1255 | extents[2] = win.frame().y(); | 1259 | extents[1] = 0; |
1256 | extents[3] = win.frame().y() + win.frame().height(); | 1260 | extents[2] = win.frame().titlebarHeight(); |
1261 | extents[3] = win.frame().handleHeight(); | ||
1257 | 1262 | ||
1258 | FluxboxWindow::ClientList::iterator it = win.clientList().begin(); | 1263 | FluxboxWindow::ClientList::iterator it = win.clientList().begin(); |
1259 | FluxboxWindow::ClientList::iterator it_end = win.clientList().end(); | 1264 | FluxboxWindow::ClientList::iterator it_end = win.clientList().end(); |
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh index 6858579..fc64900 100644 --- a/src/FbWinFrame.hh +++ b/src/FbWinFrame.hh | |||
@@ -233,7 +233,8 @@ public: | |||
233 | inline bool isShaded() const { return m_shaded; } | 233 | inline bool isShaded() const { return m_shaded; } |
234 | inline FbWinFrameTheme &theme() const { return m_theme; } | 234 | inline FbWinFrameTheme &theme() const { return m_theme; } |
235 | /// @return titlebar height | 235 | /// @return titlebar height |
236 | unsigned int titlebarHeight() const { return m_titlebar.height(); } | 236 | unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_window.borderWidth():0); } |
237 | unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_window.borderWidth():0); } | ||
237 | /// @return size of button | 238 | /// @return size of button |
238 | unsigned int buttonHeight() const; | 239 | unsigned int buttonHeight() const; |
239 | bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; } | 240 | bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; } |
diff --git a/src/Screen.cc b/src/Screen.cc index a723f3c..c6155fe 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -696,6 +696,24 @@ void BScreen::update(FbTk::Subject *subj) { | |||
696 | 696 | ||
697 | renderGeomWindow(); | 697 | renderGeomWindow(); |
698 | renderPosWindow(); | 698 | renderPosWindow(); |
699 | |||
700 | Fluxbox *fluxbox = Fluxbox::instance(); | ||
701 | |||
702 | // and update frame extents on theme changes | ||
703 | Workspaces::iterator w_it = getWorkspacesList().begin(); | ||
704 | const Workspaces::iterator w_it_end = getWorkspacesList().end(); | ||
705 | for (; w_it != w_it_end; ++w_it) { | ||
706 | Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); | ||
707 | const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); | ||
708 | for (; win_it != win_it_end; ++win_it) | ||
709 | fluxbox->updateFrameExtents(**win_it); | ||
710 | } | ||
711 | |||
712 | Icons::iterator it = iconList().begin(); | ||
713 | const Icons::iterator it_end = iconList().end(); | ||
714 | for (; it != it_end; ++it) | ||
715 | fluxbox->updateFrameExtents(**it); | ||
716 | |||
699 | } | 717 | } |
700 | 718 | ||
701 | FbTk::Menu *BScreen::createMenu(const std::string &label) { | 719 | FbTk::Menu *BScreen::createMenu(const std::string &label) { |
@@ -749,7 +767,7 @@ void BScreen::hideMenus() { | |||
749 | #endif // SLIT | 767 | #endif // SLIT |
750 | 768 | ||
751 | // hide icon menus | 769 | // hide icon menus |
752 | if (iconList().size()) { | 770 | if (!iconList().empty()) { |
753 | Icons::iterator it = iconList().begin(); | 771 | Icons::iterator it = iconList().begin(); |
754 | const Icons::iterator it_end = iconList().end(); | 772 | const Icons::iterator it_end = iconList().end(); |
755 | for (; it != it_end; ++it) | 773 | for (; it != it_end; ++it) |
@@ -764,7 +782,7 @@ void BScreen::hideWindowMenus(const FluxboxWindow* except) { | |||
764 | Workspaces::iterator w_it = getWorkspacesList().begin(); | 782 | Workspaces::iterator w_it = getWorkspacesList().begin(); |
765 | const Workspaces::iterator w_it_end = getWorkspacesList().end(); | 783 | const Workspaces::iterator w_it_end = getWorkspacesList().end(); |
766 | for (; w_it != w_it_end; ++w_it) { | 784 | for (; w_it != w_it_end; ++w_it) { |
767 | if ((*w_it)->windowList().size()) { | 785 | if (!(*w_it)->windowList().empty()) { |
768 | Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); | 786 | Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); |
769 | const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); | 787 | const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); |
770 | for (; win_it != win_it_end; ++win_it) { | 788 | for (; win_it != win_it_end; ++win_it) { |
@@ -895,7 +913,7 @@ void BScreen::reconfigureTabs() { | |||
895 | Workspaces::iterator w_it = getWorkspacesList().begin(); | 913 | Workspaces::iterator w_it = getWorkspacesList().begin(); |
896 | const Workspaces::iterator w_it_end = getWorkspacesList().end(); | 914 | const Workspaces::iterator w_it_end = getWorkspacesList().end(); |
897 | for (; w_it != w_it_end; ++w_it) { | 915 | for (; w_it != w_it_end; ++w_it) { |
898 | if ((*w_it)->windowList().size()) { | 916 | if (!(*w_it)->windowList().empty()) { |
899 | Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); | 917 | Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); |
900 | const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); | 918 | const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); |
901 | for (; win_it != win_it_end; ++win_it) { | 919 | for (; win_it != win_it_end; ++win_it) { |
@@ -1517,7 +1535,7 @@ void BScreen::initMenu() { | |||
1517 | m_rootmenu.reset(createMenu("")); | 1535 | m_rootmenu.reset(createMenu("")); |
1518 | 1536 | ||
1519 | Fluxbox * const fb = Fluxbox::instance(); | 1537 | Fluxbox * const fb = Fluxbox::instance(); |
1520 | if (fb->getMenuFilename().size() > 0) { | 1538 | if (!fb->getMenuFilename().empty()) { |
1521 | m_rootmenu.reset(MenuCreator::createFromFile(fb->getMenuFilename(), | 1539 | m_rootmenu.reset(MenuCreator::createFromFile(fb->getMenuFilename(), |
1522 | screenNumber(), true)); | 1540 | screenNumber(), true)); |
1523 | 1541 | ||
diff --git a/src/Window.cc b/src/Window.cc index 5fb5d86..2016ab9 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -3209,8 +3209,10 @@ void FluxboxWindow::applyDecorations(bool initial) { | |||
3209 | } | 3209 | } |
3210 | 3210 | ||
3211 | frame().reconfigure(); | 3211 | frame().reconfigure(); |
3212 | if (!initial && client_move) | 3212 | if (!initial && client_move) { |
3213 | Fluxbox::instance()->updateFrameExtents(*this); | ||
3213 | sendConfigureNotify(); | 3214 | sendConfigureNotify(); |
3215 | } | ||
3214 | 3216 | ||
3215 | } | 3217 | } |
3216 | 3218 | ||
@@ -3936,9 +3938,6 @@ void FluxboxWindow::sendConfigureNotify(bool send_to_netizens) { | |||
3936 | } | 3938 | } |
3937 | } // end for | 3939 | } // end for |
3938 | 3940 | ||
3939 | if (send_to_netizens) { | ||
3940 | Fluxbox::instance()->updateFrameExtents(*this); | ||
3941 | } | ||
3942 | } | 3941 | } |
3943 | 3942 | ||
3944 | 3943 | ||