aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorGediminas Liktaras <gliktaras@gmail.com>2011-12-08 13:34:09 (GMT)
committerPaul Tagliamonte <paultag@fluxbox.org>2011-12-10 16:13:19 (GMT)
commitcd339169d1961eb508ea89cee2609ec6d0fc0c15 (patch)
tree01acd158a03fb17a72e067ff0b36701da75e49dc /src/Window.cc
parent85ac5c4b2c6a526992f483a6e91867dc2f82a19e (diff)
downloadfluxbox_paul-cd339169d1961eb508ea89cee2609ec6d0fc0c15.zip
fluxbox_paul-cd339169d1961eb508ea89cee2609ec6d0fc0c15.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.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Window.cc b/src/Window.cc
index a8e4534..f390fc5 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -1882,6 +1882,16 @@ bool FluxboxWindow::getState() {
1882 return ret; 1882 return ret;
1883} 1883}
1884 1884
1885void FluxboxWindow::setReconfigureRectProperty(int x, int y, int width, int height) {
1886 long data[4] = { x, y, width, height };
1887 winClient().screen().rootWindow().changeProperty(FbAtoms::instance()->getFluxboxResizeRectAtom(),
1888 XA_CARDINAL, 32, PropModeReplace, reinterpret_cast<unsigned char*>(data), 4);
1889}
1890
1891void FluxboxWindow::clearReconfigureRectProperty() {
1892 setReconfigureRectProperty(0, 0, 0, 0);
1893}
1894
1885/** 1895/**
1886 Show the window menu at pos x, y 1896 Show the window menu at pos x, y
1887*/ 1897*/
@@ -2579,6 +2589,10 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2579 m_last_resize_w - 1 + 2 * frame().window().borderWidth(), 2589 m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
2580 m_last_resize_h - 1 + 2 * frame().window().borderWidth()); 2590 m_last_resize_h - 1 + 2 * frame().window().borderWidth());
2581 2591
2592 setReconfigureRectProperty(m_last_resize_x, m_last_resize_y,
2593 m_last_resize_w + 2 * frame().window().borderWidth() - 1,
2594 m_last_resize_h + 2 * frame().window().borderWidth() - 1);
2595
2582 } 2596 }
2583 } else if (m_attaching_tab != 0) { 2597 } else if (m_attaching_tab != 0) {
2584 // 2598 //
@@ -2596,6 +2610,8 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
2596 dx, dy, 2610 dx, dy,
2597 m_last_resize_w, m_last_resize_h); 2611 m_last_resize_w, m_last_resize_h);
2598 2612
2613 setReconfigureRectProperty(dx, dy, m_last_resize_w, m_last_resize_h);
2614
2599 // change remembered position of rectangle 2615 // change remembered position of rectangle
2600 m_last_move_x = dx; 2616 m_last_move_x = dx;
2601 m_last_move_y = dy; 2617 m_last_move_y = dy;
@@ -3096,6 +3112,10 @@ void FluxboxWindow::startResizing(int x, int y, ReferenceCorner dir) {
3096 m_last_resize_x, m_last_resize_y, 3112 m_last_resize_x, m_last_resize_y,
3097 m_last_resize_w - 1 + 2 * frame().window().borderWidth(), 3113 m_last_resize_w - 1 + 2 * frame().window().borderWidth(),
3098 m_last_resize_h - 1 + 2 * frame().window().borderWidth()); 3114 m_last_resize_h - 1 + 2 * frame().window().borderWidth());
3115
3116 setReconfigureRectProperty(m_last_resize_x, m_last_resize_y,
3117 m_last_resize_w + 2 * frame().window().borderWidth() - 1,
3118 m_last_resize_h + 2 * frame().window().borderWidth() - 1);
3099} 3119}
3100 3120
3101void FluxboxWindow::stopResizing(bool interrupted) { 3121void FluxboxWindow::stopResizing(bool interrupted) {
@@ -3116,6 +3136,7 @@ void FluxboxWindow::stopResizing(bool interrupted) {
3116 } 3136 }
3117 3137
3118 ungrabPointer(CurrentTime); 3138 ungrabPointer(CurrentTime);
3139 clearReconfigureRectProperty();
3119} 3140}
3120 3141
3121WinClient* FluxboxWindow::winClientOfLabelButtonWindow(Window window) { 3142WinClient* FluxboxWindow::winClientOfLabelButtonWindow(Window window) {
@@ -3172,6 +3193,8 @@ void FluxboxWindow::startTabbing(const XButtonEvent &be) {
3172 m_last_resize_w, m_last_resize_h); 3193 m_last_resize_w, m_last_resize_h);
3173 3194
3174 menu().hide(); 3195 menu().hide();
3196
3197 setReconfigureRectProperty(m_last_move_x, m_last_move_y, m_last_resize_w, m_last_resize_h);
3175} 3198}
3176 3199
3177void FluxboxWindow::attachTo(int x, int y, bool interrupted) { 3200void FluxboxWindow::attachTo(int x, int y, bool interrupted) {
@@ -3182,6 +3205,8 @@ void FluxboxWindow::attachTo(int x, int y, bool interrupted) {
3182 m_last_move_x, m_last_move_y, 3205 m_last_move_x, m_last_move_y,
3183 m_last_resize_w, m_last_resize_h); 3206 m_last_resize_w, m_last_resize_h);
3184 3207
3208 clearReconfigureRectProperty();
3209
3185 ungrabPointer(CurrentTime); 3210 ungrabPointer(CurrentTime);
3186 3211
3187 Fluxbox::instance()->ungrab(); 3212 Fluxbox::instance()->ungrab();