diff options
author | Gediminas Liktaras <gliktaras@gmail.com> | 2011-12-08 13:34:09 (GMT) |
---|---|---|
committer | Paul Tagliamonte <paultag@ubuntu.com> | 2011-12-08 13:34:09 (GMT) |
commit | 63a82c3b1af803dbedc284830be2976ec4dc8e61 (patch) | |
tree | d3a13e346ae79aa4df1003dde9bcd36dd4f91359 /src/Window.cc | |
parent | 2223c879bf41d2b4f40fa43db478ba1bce8523de (diff) | |
download | fluxbox_paul-63a82c3b1af803dbedc284830be2976ec4dc8e61.zip fluxbox_paul-63a82c3b1af803dbedc284830be2976ec4dc8e61.tar.bz2 |
fbcompose - A compositing addon for fluxbox window manager.
fbcompose(1) is an optional compositing addon for fluxbox window manager. It
augments fluxbox with a number of graphical features. Most notably, fbcompose
allows fluxbox to properly display applications that require compositing
(docky, for example), adds support for true window transparency (as opposed to
fluxbox's pseudo transparency) and provides a plugin framework to extend the
compositor's functionality.
As this is still a beta version of the compositor, the bugs are likely.
Diffstat (limited to 'src/Window.cc')
-rw-r--r-- | src/Window.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc index db5bacc..6bd075d 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -1876,6 +1876,16 @@ bool FluxboxWindow::getState() { | |||
1876 | return ret; | 1876 | return ret; |
1877 | } | 1877 | } |
1878 | 1878 | ||
1879 | void FluxboxWindow::setReconfigureRectProperty(int x, int y, int width, int height) { | ||
1880 | long data[4] = { x, y, width, height }; | ||
1881 | winClient().screen().rootWindow().changeProperty(FbAtoms::instance()->getFluxboxResizeRectAtom(), | ||
1882 | XA_CARDINAL, 32, PropModeReplace, reinterpret_cast<unsigned char*>(data), 4); | ||
1883 | } | ||
1884 | |||
1885 | void FluxboxWindow::clearReconfigureRectProperty() { | ||
1886 | setReconfigureRectProperty(0, 0, 0, 0); | ||
1887 | } | ||
1888 | |||
1879 | /** | 1889 | /** |
1880 | Show the window menu at pos x, y | 1890 | Show the window menu at pos x, y |
1881 | */ | 1891 | */ |
@@ -2573,6 +2583,10 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { | |||
2573 | m_last_resize_w - 1 + 2 * frame().window().borderWidth(), | 2583 | m_last_resize_w - 1 + 2 * frame().window().borderWidth(), |
2574 | m_last_resize_h - 1 + 2 * frame().window().borderWidth()); | 2584 | m_last_resize_h - 1 + 2 * frame().window().borderWidth()); |
2575 | 2585 | ||
2586 | setReconfigureRectProperty(m_last_resize_x, m_last_resize_y, | ||
2587 | m_last_resize_w + 2 * frame().window().borderWidth() - 1, | ||
2588 | m_last_resize_h + 2 * frame().window().borderWidth() - 1); | ||
2589 | |||
2576 | } | 2590 | } |
2577 | } else if (m_attaching_tab != 0) { | 2591 | } else if (m_attaching_tab != 0) { |
2578 | // | 2592 | // |
@@ -2590,6 +2604,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) { | |||
2590 | dx, dy, | 2604 | dx, dy, |
2591 | m_last_resize_w, m_last_resize_h); | 2605 | m_last_resize_w, m_last_resize_h); |
2592 | 2606 | ||
2607 | setReconfigureRectProperty(dx, dy, m_last_resize_w, m_last_resize_h); | ||
2608 | |||
2593 | // change remembered position of rectangle | 2609 | // change remembered position of rectangle |
2594 | m_last_move_x = dx; | 2610 | m_last_move_x = dx; |
2595 | m_last_move_y = dy; | 2611 | m_last_move_y = dy; |
@@ -3083,6 +3099,10 @@ void FluxboxWindow::startResizing(int x, int y, ReferenceCorner dir) { | |||
3083 | m_last_resize_x, m_last_resize_y, | 3099 | m_last_resize_x, m_last_resize_y, |
3084 | m_last_resize_w - 1 + 2 * frame().window().borderWidth(), | 3100 | m_last_resize_w - 1 + 2 * frame().window().borderWidth(), |
3085 | m_last_resize_h - 1 + 2 * frame().window().borderWidth()); | 3101 | m_last_resize_h - 1 + 2 * frame().window().borderWidth()); |
3102 | |||
3103 | setReconfigureRectProperty(m_last_resize_x, m_last_resize_y, | ||
3104 | m_last_resize_w + 2 * frame().window().borderWidth() - 1, | ||
3105 | m_last_resize_h + 2 * frame().window().borderWidth() - 1); | ||
3086 | } | 3106 | } |
3087 | 3107 | ||
3088 | void FluxboxWindow::stopResizing(bool interrupted) { | 3108 | void FluxboxWindow::stopResizing(bool interrupted) { |
@@ -3103,6 +3123,7 @@ void FluxboxWindow::stopResizing(bool interrupted) { | |||
3103 | } | 3123 | } |
3104 | 3124 | ||
3105 | ungrabPointer(CurrentTime); | 3125 | ungrabPointer(CurrentTime); |
3126 | clearReconfigureRectProperty(); | ||
3106 | } | 3127 | } |
3107 | 3128 | ||
3108 | WinClient* FluxboxWindow::winClientOfLabelButtonWindow(Window window) { | 3129 | WinClient* FluxboxWindow::winClientOfLabelButtonWindow(Window window) { |
@@ -3159,6 +3180,8 @@ void FluxboxWindow::startTabbing(const XButtonEvent &be) { | |||
3159 | m_last_resize_w, m_last_resize_h); | 3180 | m_last_resize_w, m_last_resize_h); |
3160 | 3181 | ||
3161 | menu().hide(); | 3182 | menu().hide(); |
3183 | |||
3184 | setReconfigureRectProperty(m_last_move_x, m_last_move_y, m_last_resize_w, m_last_resize_h); | ||
3162 | } | 3185 | } |
3163 | 3186 | ||
3164 | void FluxboxWindow::attachTo(int x, int y, bool interrupted) { | 3187 | void FluxboxWindow::attachTo(int x, int y, bool interrupted) { |
@@ -3169,6 +3192,8 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) { | |||
3169 | m_last_move_x, m_last_move_y, | 3192 | m_last_move_x, m_last_move_y, |
3170 | m_last_resize_w, m_last_resize_h); | 3193 | m_last_resize_w, m_last_resize_h); |
3171 | 3194 | ||
3195 | clearReconfigureRectProperty(); | ||
3196 | |||
3172 | ungrabPointer(CurrentTime); | 3197 | ungrabPointer(CurrentTime); |
3173 | 3198 | ||
3174 | Fluxbox::instance()->ungrab(); | 3199 | Fluxbox::instance()->ungrab(); |