diff options
author | fluxgen <fluxgen> | 2003-01-10 20:20:37 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-01-10 20:20:37 (GMT) |
commit | 19e4d6eb042d5a48e755ee6b168d7e9fee3bcc8a (patch) | |
tree | 91f5cd577a91d7aacbc0fc3a1622fb59e74e461e /src | |
parent | 6072177888cf5cad55bb843a88e80b493e8fd60c (diff) | |
download | fluxbox_paul-19e4d6eb042d5a48e755ee6b168d7e9fee3bcc8a.zip fluxbox_paul-19e4d6eb042d5a48e755ee6b168d7e9fee3bcc8a.tar.bz2 |
fixed bug in configureRequestEvent and some minor indent
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 76 |
1 files changed, 40 insertions, 36 deletions
diff --git a/src/Window.cc b/src/Window.cc index bff313b..8d1069e 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.111 2003/01/09 22:18:06 fluxgen Exp $ | 25 | // $Id: Window.cc,v 1.112 2003/01/10 20:20:37 fluxgen Exp $ |
26 | 26 | ||
27 | #include "Window.hh" | 27 | #include "Window.hh" |
28 | 28 | ||
@@ -776,7 +776,7 @@ void FluxboxWindow::moveResize(int new_x, int new_y, | |||
776 | if (tab) | 776 | if (tab) |
777 | tab->setPosition(); | 777 | tab->setPosition(); |
778 | 778 | ||
779 | // if (! moving) | 779 | // if (! moving) |
780 | send_event = true; | 780 | send_event = true; |
781 | } | 781 | } |
782 | 782 | ||
@@ -1572,7 +1572,7 @@ void FluxboxWindow::mapRequestEvent(XMapRequestEvent &re) { | |||
1572 | 1572 | ||
1573 | 1573 | ||
1574 | void FluxboxWindow::mapNotifyEvent(XMapEvent &ne) { | 1574 | void FluxboxWindow::mapNotifyEvent(XMapEvent &ne) { |
1575 | if (ne.window == client.window && (! ne.override_redirect) && (visible)) { | 1575 | if (ne.window == client.window && !ne.override_redirect && visible) { |
1576 | Fluxbox *fluxbox = Fluxbox::instance(); | 1576 | Fluxbox *fluxbox = Fluxbox::instance(); |
1577 | fluxbox->grab(); | 1577 | fluxbox->grab(); |
1578 | if (! validateClient()) | 1578 | if (! validateClient()) |
@@ -1734,49 +1734,53 @@ void FluxboxWindow::exposeEvent(XExposeEvent &ee) { | |||
1734 | 1734 | ||
1735 | 1735 | ||
1736 | void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) { | 1736 | void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent &cr) { |
1737 | if (cr.window == client.window) { | 1737 | if (cr.window != client.window) |
1738 | if (! validateClient()) | 1738 | return; |
1739 | return; | ||
1740 | 1739 | ||
1741 | int cx = m_frame.x(), cy = m_frame.y(); | 1740 | if (! validateClient()) |
1742 | unsigned int cw = m_frame.width(), ch = m_frame.height(); | 1741 | return; |
1743 | 1742 | ||
1744 | if (cr.value_mask & CWBorderWidth) | 1743 | int cx = m_frame.x(), cy = m_frame.y(); |
1745 | client.old_bw = cr.border_width; | 1744 | unsigned int cw = m_frame.width(), ch = m_frame.height(); |
1746 | 1745 | ||
1747 | if (cr.value_mask & CWX) | 1746 | if (cr.value_mask & CWBorderWidth) |
1748 | cx = cr.x;// - frame_mwm_border_w - screen->getBorderWidth(); | 1747 | client.old_bw = cr.border_width; |
1749 | 1748 | ||
1750 | if (cr.value_mask & CWY) | 1749 | if (cr.value_mask & CWX) |
1751 | cy = cr.y - m_frame.titlebar().height(); // - frame_mwm_border_w - screen->getBorderWidth(); | 1750 | cx = cr.x;// - frame_mwm_border_w - screen->getBorderWidth(); |
1752 | 1751 | ||
1753 | if (cr.value_mask & CWWidth) | 1752 | if (cr.value_mask & CWY) |
1754 | cw = cr.width;// + (frame_mwm_border_w * 2); | 1753 | cy = cr.y - m_frame.titlebar().height(); // - frame_mwm_border_w - screen->getBorderWidth(); |
1755 | 1754 | ||
1756 | if (cr.value_mask & CWHeight) { | 1755 | if (cr.value_mask & CWWidth) |
1757 | ch = cr.height; | 1756 | cw = cr.width;// + (frame_mwm_border_w * 2); |
1758 | } | ||
1759 | 1757 | ||
1760 | if (m_frame.x() != cx || m_frame.y() != cy || | 1758 | if (cr.value_mask & CWHeight) |
1761 | m_frame.width() != cw || m_frame.height() != ch) { | 1759 | ch = cr.height; |
1762 | moveResize(cx, cy, cw, ch); | ||
1763 | } | ||
1764 | 1760 | ||
1765 | if (cr.value_mask & CWStackMode) { | 1761 | if (m_frame.x() != cx || m_frame.y() != cy || |
1766 | switch (cr.detail) { | 1762 | m_frame.width() != cw || m_frame.height() != ch) { |
1767 | case Above: | 1763 | // the request is for client window so we resize the frame to it first |
1768 | case TopIf: | 1764 | frame().resizeForClient(cw, ch); |
1769 | default: | 1765 | move(cx, cy); |
1770 | raise(); | 1766 | |
1771 | break; | 1767 | } |
1772 | 1768 | ||
1773 | case Below: | 1769 | if (cr.value_mask & CWStackMode) { |
1774 | case BottomIf: | 1770 | switch (cr.detail) { |
1775 | lower(); | 1771 | case Above: |
1776 | break; | 1772 | case TopIf: |
1777 | } | 1773 | default: |
1774 | raise(); | ||
1775 | break; | ||
1776 | |||
1777 | case Below: | ||
1778 | case BottomIf: | ||
1779 | lower(); | ||
1780 | break; | ||
1778 | } | 1781 | } |
1779 | } | 1782 | } |
1783 | |||
1780 | } | 1784 | } |
1781 | 1785 | ||
1782 | 1786 | ||