summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoronestone <onestone>2006-11-29 22:17:24 +0000
committeronestone <onestone>2006-11-29 22:17:24 +0000
commit55d9e25c2102b04d57e4c101d04522998fdbf8d0 (patch)
tree8e205e6a427b7c3bdeaf27c1473c050ec6111474
parent9d18851fb10c1b80e3d9789b45c9c1fffd1140ac (diff)
downloadaquamarine-55d9e25c2102b04d57e4c101d04522998fdbf8d0.tar.gz
aquamarine-55d9e25c2102b04d57e4c101d04522998fdbf8d0.tar.bz2
aquamarine: fixed default decorations
-rw-r--r--src/window.cpp151
1 files changed, 105 insertions, 46 deletions
diff --git a/src/window.cpp b/src/window.cpp
index 85a0b5f..049035c 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -995,7 +995,7 @@ Aquamarine::Window::updateWindowProperties ()
*data++ = 0;
*data++ = 0;
- //TOP
+ // TOP LEFT
*data++ =
((GRAVITY_NORTH | GRAVITY_WEST) << 0) |
((GRAVITY_NORTH | GRAVITY_WEST) << 4) |
@@ -1010,21 +1010,8 @@ Aquamarine::Window::updateWindowProperties ()
*data++ = 0;
*data++ = 0;
- *data++ =
- ((GRAVITY_NORTH | GRAVITY_WEST) << 0) |
- ((GRAVITY_NORTH | GRAVITY_EAST) << 4) |
- (0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
-
- *data++ = 0;
- *data++ = -top;
- *data++ = 0;
- *data++ = 0;
- *data++ = w_w;
- *data++ = top;
- *data++ = left;
- *data++ = 0;
-
- *data++ =
+ // TOP RIGHT
+ *data++ =
((GRAVITY_NORTH | GRAVITY_EAST) << 0) |
((GRAVITY_NORTH | GRAVITY_EAST) << 4) |
(0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
@@ -1038,8 +1025,7 @@ Aquamarine::Window::updateWindowProperties ()
*data++ = left + w_w;
*data++ = 0;
-
- //BOTTOM
+ // BOTTOM LEFT
*data++ =
((GRAVITY_SOUTH | GRAVITY_WEST) << 0) |
((GRAVITY_SOUTH | GRAVITY_WEST) << 4) |
@@ -1054,21 +1040,8 @@ Aquamarine::Window::updateWindowProperties ()
*data++ = 0;
*data++ = w_h + top;
- *data++ =
- ((GRAVITY_SOUTH | GRAVITY_WEST) << 0) |
- ((GRAVITY_SOUTH | GRAVITY_EAST) << 4) |
- (0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
-
- *data++ = 0;
- *data++ = 0;
- *data++ = 0;
- *data++ = bottom;
- *data++ = w_w;
- *data++ = bottom;
- *data++ = left;
- *data++ = w_h + top;
-
- *data++ =
+ // BOTTOM RIGHT
+ *data++ =
((GRAVITY_SOUTH | GRAVITY_EAST) << 0) |
((GRAVITY_SOUTH | GRAVITY_EAST) << 4) |
(0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
@@ -1082,42 +1055,128 @@ Aquamarine::Window::updateWindowProperties ()
*data++ = left + w_w;
*data++ = w_h + top;
- //LEFT
+ // TOP CENTER
+ *data++ =
+ ((GRAVITY_NORTH | GRAVITY_WEST) << 0) |
+ ((GRAVITY_NORTH | GRAVITY_EAST) << 4) |
+ (0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
+
+ *data++ = 0;
+ *data++ = -top;
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = w_w;
+ *data++ = top;
+ *data++ = left;
+ *data++ = 0;
+
+ *data++ =
+ ((GRAVITY_NORTH | GRAVITY_WEST) << 0) |
+ ((GRAVITY_NORTH | GRAVITY_EAST) << 4) |
+ (0 << 8) | (CLAMP_HORZ << 10) | (YY_MASK);
+
+ *data++ = w_w;
+ *data++ = -top;
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = SHRT_MAX;
+ *data++ = top;
+ *data++ = left + w_w;
+ *data++ = 0;
+
+ // BOTTOM CENTER
+ *data++ =
+ ((GRAVITY_SOUTH | GRAVITY_WEST) << 0) |
+ ((GRAVITY_SOUTH | GRAVITY_EAST) << 4) |
+ (0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
+
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = bottom;
+ *data++ = w_w;
+ *data++ = bottom;
+ *data++ = left;
+ *data++ = w_h + top;
+
+ *data++ =
+ ((GRAVITY_SOUTH | GRAVITY_WEST) << 0) |
+ ((GRAVITY_SOUTH | GRAVITY_EAST) << 4) |
+ (0 << 8) | (CLAMP_HORZ << 10) | (YY_MASK);
+
+ *data++ = w_w;
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = bottom;
+ *data++ = SHRT_MAX;
+ *data++ = bottom;
+ *data++ = left + w_w;
+ *data++ = w_h + top;
+
+ //LEFT
+ *data++ =
+ ((GRAVITY_NORTH | GRAVITY_WEST) << 0) |
+ ((GRAVITY_SOUTH | GRAVITY_WEST) << 4) |
+ (0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
+
+ *data++ = -left;
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = left;
+ *data++ = w_h;
+ *data++ = 0;
+ *data++ = top;
+
+ *data++ =
+ ((GRAVITY_NORTH | GRAVITY_WEST) << 0) |
+ ((GRAVITY_SOUTH | GRAVITY_WEST) << 4) |
+ (0 << 8) | (CLAMP_VERT << 10) | (XX_MASK);
+
+ *data++ = -left;
+ *data++ = w_h;
+ *data++ = 0;
+ *data++ = 0;
+ *data++ = left;
+ *data++ = SHRT_MAX;
+ *data++ = 0;
+ *data++ = top + w_h;
+
+ //RIGHT
*data++ =
- ((GRAVITY_NORTH | GRAVITY_WEST) << 0) |
- ((GRAVITY_SOUTH | GRAVITY_WEST) << 4) |
+ ((GRAVITY_NORTH | GRAVITY_EAST) << 0) |
+ ((GRAVITY_SOUTH | GRAVITY_EAST) << 4) |
(0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
- *data++ = -left;
*data++ = 0;
*data++ = 0;
+ *data++ = right;
*data++ = 0;
- *data++ = left;
+ *data++ = right;
*data++ = w_h;
- *data++ = 0;
+ *data++ = w_w + left;
*data++ = top;
- //RIGHT
- *data++ =
+ *data++ =
((GRAVITY_NORTH | GRAVITY_EAST) << 0) |
((GRAVITY_SOUTH | GRAVITY_EAST) << 4) |
- (0 << 8) | (0 << 10) | (XX_MASK) | (YY_MASK);
+ (0 << 8) | (CLAMP_VERT << 10) | (XX_MASK);
*data++ = 0;
- *data++ = 0;
+ *data++ = w_h;
*data++ = right;
*data++ = 0;
*data++ = right;
- *data++ = w_h;
+ *data++ = SHRT_MAX;
*data++ = w_w + left;
- *data++ = top;
+ *data++ = top + w_h;
Aquamarine::trapXError ();
XChangeProperty (qt_xdisplay (), m_wid,
my_atom,
XA_INTEGER,
32, PropModeReplace, (unsigned char *)mdata,
- 12 + (8 * 9));
+ 12 + (12 * 9));
Aquamarine::popXError ();
XSync (qt_xdisplay (), FALSE);
}