fix _NET_FRAME_EXTENTS
This commit is contained in:
parent
ee02bc2258
commit
6e60c53ae7
5 changed files with 38 additions and 13 deletions
|
@ -1,6 +1,8 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0rc2:
|
||||
*06/06/26:
|
||||
* Fix _NET_FRAME_EXTENTS implementation (Simon)
|
||||
Ewmh.cc Window.cc Screen.cc FbWinFrame.hh
|
||||
* Fix FocusHidden (Mark)
|
||||
Window.cc/hh
|
||||
*06/06/25:
|
||||
|
|
13
src/Ewmh.cc
13
src/Ewmh.cc
|
@ -1249,11 +1249,16 @@ void Ewmh::setupState(FluxboxWindow &win) {
|
|||
}
|
||||
|
||||
void Ewmh::updateFrameExtents(FluxboxWindow &win) {
|
||||
/* Frame extents are basically the amount the window manager frame
|
||||
protrudes from the client window, on left, right, top, bottom
|
||||
(it is independent of window position).
|
||||
*/
|
||||
int extents[4];
|
||||
extents[0] = win.frame().x();
|
||||
extents[1] = win.frame().x() + win.frame().width();
|
||||
extents[2] = win.frame().y();
|
||||
extents[3] = win.frame().y() + win.frame().height();
|
||||
// our frames currently don't protrude from left/right
|
||||
extents[0] = 0;
|
||||
extents[1] = 0;
|
||||
extents[2] = win.frame().titlebarHeight();
|
||||
extents[3] = win.frame().handleHeight();
|
||||
|
||||
FluxboxWindow::ClientList::iterator it = win.clientList().begin();
|
||||
FluxboxWindow::ClientList::iterator it_end = win.clientList().end();
|
||||
|
|
|
@ -233,7 +233,8 @@ public:
|
|||
inline bool isShaded() const { return m_shaded; }
|
||||
inline FbWinFrameTheme &theme() const { return m_theme; }
|
||||
/// @return titlebar height
|
||||
unsigned int titlebarHeight() const { return m_titlebar.height(); }
|
||||
unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_window.borderWidth():0); }
|
||||
unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_window.borderWidth():0); }
|
||||
/// @return size of button
|
||||
unsigned int buttonHeight() const;
|
||||
bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; }
|
||||
|
|
|
@ -696,6 +696,24 @@ void BScreen::update(FbTk::Subject *subj) {
|
|||
|
||||
renderGeomWindow();
|
||||
renderPosWindow();
|
||||
|
||||
Fluxbox *fluxbox = Fluxbox::instance();
|
||||
|
||||
// and update frame extents on theme changes
|
||||
Workspaces::iterator w_it = getWorkspacesList().begin();
|
||||
const Workspaces::iterator w_it_end = getWorkspacesList().end();
|
||||
for (; w_it != w_it_end; ++w_it) {
|
||||
Workspace::Windows::iterator win_it = (*w_it)->windowList().begin();
|
||||
const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end();
|
||||
for (; win_it != win_it_end; ++win_it)
|
||||
fluxbox->updateFrameExtents(**win_it);
|
||||
}
|
||||
|
||||
Icons::iterator it = iconList().begin();
|
||||
const Icons::iterator it_end = iconList().end();
|
||||
for (; it != it_end; ++it)
|
||||
fluxbox->updateFrameExtents(**it);
|
||||
|
||||
}
|
||||
|
||||
FbTk::Menu *BScreen::createMenu(const std::string &label) {
|
||||
|
@ -749,7 +767,7 @@ void BScreen::hideMenus() {
|
|||
#endif // SLIT
|
||||
|
||||
// hide icon menus
|
||||
if (iconList().size()) {
|
||||
if (!iconList().empty()) {
|
||||
Icons::iterator it = iconList().begin();
|
||||
const Icons::iterator it_end = iconList().end();
|
||||
for (; it != it_end; ++it)
|
||||
|
@ -764,7 +782,7 @@ void BScreen::hideWindowMenus(const FluxboxWindow* except) {
|
|||
Workspaces::iterator w_it = getWorkspacesList().begin();
|
||||
const Workspaces::iterator w_it_end = getWorkspacesList().end();
|
||||
for (; w_it != w_it_end; ++w_it) {
|
||||
if ((*w_it)->windowList().size()) {
|
||||
if (!(*w_it)->windowList().empty()) {
|
||||
Workspace::Windows::iterator win_it = (*w_it)->windowList().begin();
|
||||
const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end();
|
||||
for (; win_it != win_it_end; ++win_it) {
|
||||
|
@ -895,7 +913,7 @@ void BScreen::reconfigureTabs() {
|
|||
Workspaces::iterator w_it = getWorkspacesList().begin();
|
||||
const Workspaces::iterator w_it_end = getWorkspacesList().end();
|
||||
for (; w_it != w_it_end; ++w_it) {
|
||||
if ((*w_it)->windowList().size()) {
|
||||
if (!(*w_it)->windowList().empty()) {
|
||||
Workspace::Windows::iterator win_it = (*w_it)->windowList().begin();
|
||||
const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end();
|
||||
for (; win_it != win_it_end; ++win_it) {
|
||||
|
@ -1517,7 +1535,7 @@ void BScreen::initMenu() {
|
|||
m_rootmenu.reset(createMenu(""));
|
||||
|
||||
Fluxbox * const fb = Fluxbox::instance();
|
||||
if (fb->getMenuFilename().size() > 0) {
|
||||
if (!fb->getMenuFilename().empty()) {
|
||||
m_rootmenu.reset(MenuCreator::createFromFile(fb->getMenuFilename(),
|
||||
screenNumber(), true));
|
||||
|
||||
|
|
|
@ -3209,8 +3209,10 @@ void FluxboxWindow::applyDecorations(bool initial) {
|
|||
}
|
||||
|
||||
frame().reconfigure();
|
||||
if (!initial && client_move)
|
||||
if (!initial && client_move) {
|
||||
Fluxbox::instance()->updateFrameExtents(*this);
|
||||
sendConfigureNotify();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -3936,9 +3938,6 @@ void FluxboxWindow::sendConfigureNotify(bool send_to_netizens) {
|
|||
}
|
||||
} // end for
|
||||
|
||||
if (send_to_netizens) {
|
||||
Fluxbox::instance()->updateFrameExtents(*this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue