From 2f9f29df22e82f8648c048eec574443811cec5c1 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Tue, 1 Jan 2008 17:32:10 -0800 Subject: make reported frame extents include border width --- src/Ewmh.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/Ewmh.cc b/src/Ewmh.cc index 257b432..067b445 100644 --- a/src/Ewmh.cc +++ b/src/Ewmh.cc @@ -810,14 +810,14 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce, if (!screen) return true; FbWinFrameTheme &theme = screen->winFrameTheme(); + unsigned int bw = theme.border(true).width(); long title_h = theme.titleHeight() || - theme.font().height() + 2*theme.bevelWidth() + 2; - title_h += theme.border(true).width(); - long handle_h = theme.handleWidth() + theme.border(true).width(); + theme.font().height() + 2*theme.bevelWidth() + 2 + 2*bw; + long handle_h = theme.handleWidth() + 2*bw; long extents[4]; // our frames currently don't protrude from left/right - extents[0] = 0; - extents[1] = 0; + extents[0] = bw; + extents[1] = bw; extents[2] = title_h; extents[3] = handle_h; @@ -1195,16 +1195,18 @@ void Ewmh::updateFrameExtents(FluxboxWindow &win) { protrudes from the client window, on left, right, top, bottom (it is independent of window position). */ - long extents[4]; - // 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(); for (; it != it_end; ++it) { + long extents[4]; + // our frames currently don't protrude from left/right + int bw = win.frame().window().borderWidth() - (*it)->old_bw; + extents[0] = bw; + extents[1] = bw; + extents[2] = win.frame().titlebarHeight() + bw; + extents[3] = win.frame().handleHeight() + bw; + (*it)->changeProperty(m_net_frame_extents, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)extents, 4); -- cgit v0.11.2