summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/Window.cc b/src/Window.cc
index e53d461..ac79f73 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.43 2002/04/12 14:54:57 fluxgen Exp $ 25// $Id: Window.cc,v 1.44 2002/04/14 11:54:59 fluxgen Exp $
26 26
27#include "Window.hh" 27#include "Window.hh"
28 28
@@ -80,6 +80,7 @@ tab(0)
80,gnome_hints(0) 80,gnome_hints(0)
81#endif 81#endif
82{ 82{
83
83 lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0; 84 lastFocusTime.tv_sec = lastFocusTime.tv_usec = 0;
84 85
85 fprintf(stderr, 86 fprintf(stderr,
@@ -1744,7 +1745,7 @@ void FluxboxWindow::configure(int dx, int dy,
1744 frame.y = dy; 1745 frame.y = dy;
1745 frame.width = dw; 1746 frame.width = dw;
1746 frame.height = dh; 1747 frame.height = dh;
1747 1748
1748 downsize(); 1749 downsize();
1749 1750
1750#ifdef SHAPE 1751#ifdef SHAPE
@@ -1772,7 +1773,6 @@ void FluxboxWindow::configure(int dx, int dy,
1772 xrect, num, ShapeUnion, Unsorted); 1773 xrect, num, ShapeUnion, Unsorted);
1773 } 1774 }
1774#endif // SHAPE 1775#endif // SHAPE
1775
1776 XMoveResizeWindow(display, frame.window, frame.x, frame.y, 1776 XMoveResizeWindow(display, frame.window, frame.x, frame.y,
1777 frame.width, frame.height); 1777 frame.width, frame.height);
1778 positionWindows(); 1778 positionWindows();
@@ -2042,9 +2042,9 @@ void FluxboxWindow::maximize(unsigned int button) {
2042#ifdef SLIT 2042#ifdef SLIT
2043 2043
2044#ifdef XINERAMA 2044#ifdef XINERAMA
2045// take the slit in account if it's on the same head 2045 // take the slit in account if it's on the same head
2046// (always true if we don't have xinerama 2046 // (always true if we don't have xinerama
2047if (!screen->hasXinerama() || screen->getSlitOnHead() == head) { 2047 if (!screen->hasXinerama() || screen->getSlitOnHead() == head) {
2048#endif // XINERAMA 2048#endif // XINERAMA
2049 2049
2050 Slit* mSlt = screen->getSlit(); 2050 Slit* mSlt = screen->getSlit();
@@ -2102,7 +2102,7 @@ if (!screen->hasXinerama() || screen->getSlitOnHead() == head) {
2102 } 2102 }
2103 } 2103 }
2104#ifdef XINERAMA 2104#ifdef XINERAMA
2105} 2105 }
2106#endif // XINERAMA 2106#endif // XINERAMA
2107 2107
2108#endif // SLIT 2108#endif // SLIT
@@ -3002,10 +3002,11 @@ void FluxboxWindow::propertyNotifyEvent(Atom atom) {
3002 if (client.max_width <= client.min_width && 3002 if (client.max_width <= client.min_width &&
3003 client.max_height <= client.min_height) 3003 client.max_height <= client.min_height)
3004 decorations.maximize = decorations.handle = 3004 decorations.maximize = decorations.handle =
3005 functions.resize = functions.maximize = false; 3005 functions.resize = functions.maximize = false;
3006 else 3006 else {
3007 decorations.maximize = decorations.handle = 3007 decorations.handle = false;
3008 functions.resize = functions.maximize = true; 3008 decorations.maximize = functions.resize = functions.maximize = true;
3009 }
3009 } 3010 }
3010 3011
3011 int x = frame.x, y = frame.y; 3012 int x = frame.x, y = frame.y;
@@ -3083,10 +3084,11 @@ void FluxboxWindow::configureRequestEvent(XConfigureRequestEvent *cr) {
3083 if (cr->value_mask & CWWidth) 3084 if (cr->value_mask & CWWidth)
3084 cw = cr->width + (frame.mwm_border_w * 2); 3085 cw = cr->width + (frame.mwm_border_w * 2);
3085 3086
3086 if (cr->value_mask & CWHeight) 3087 if (cr->value_mask & CWHeight) {
3087 ch = cr->height + frame.y_border + (frame.mwm_border_w * 2) + 3088 ch = cr->height + (frame.y_border + (frame.mwm_border_w * 2) +
3088 (screen->getBorderWidth() * decorations.handle) + frame.handle_h; 3089 screen->getBorderWidth()) * decorations.border +
3089 3090 frame.handle_h*decorations.handle;
3091 }
3090 if (frame.x != cx || frame.y != cy || 3092 if (frame.x != cx || frame.y != cy ||
3091 frame.width != cw || frame.height != ch) { 3093 frame.width != cw || frame.height != ch) {
3092 configure(cx, cy, cw, ch); 3094 configure(cx, cy, cw, ch);
@@ -3448,7 +3450,6 @@ void FluxboxWindow::shapeEvent(XShapeEvent *) {
3448 3450
3449 3451
3450void FluxboxWindow::setDecoration(Decoration decoration) { 3452void FluxboxWindow::setDecoration(Decoration decoration) {
3451
3452 switch (decoration) { 3453 switch (decoration) {
3453 case DECOR_NONE: 3454 case DECOR_NONE:
3454 decorations.titlebar = decorations.border = decorations.handle = 3455 decorations.titlebar = decorations.border = decorations.handle =