summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Frank Erikson <kristian@kristian-desktop.(none)>2008-11-20 22:57:08 +1300
committerKristian Frank Erikson <kristian@kristian-desktop.(none)>2008-11-20 22:57:08 +1300
commit70b5e31e5cf69a5d61b1492143e5c500e5dc9dcf (patch)
tree258a02f70e168af98b8e36349b653fb3b3a722a7
parenta35c4642a77325e82ed3ae9f7df5978142e868f3 (diff)
downloadcf-squeeze-70b5e31e5cf69a5d61b1492143e5c500e5dc9dcf.tar.gz
cf-squeeze-70b5e31e5cf69a5d61b1492143e5c500e5dc9dcf.tar.bz2
Fixed window moving issue, again. But must better solution. Window flicker fully removed now as well. Beautiful resize transition now.
-rw-r--r--squeeze.c17
-rw-r--r--squeeze.xml.in16
2 files changed, 12 insertions, 21 deletions
diff --git a/squeeze.c b/squeeze.c
index b66cf62..34fd1f9 100644
--- a/squeeze.c
+++ b/squeeze.c
@@ -107,8 +107,6 @@ resizeGetPaintRectangle (CompDisplay *d,
SQUEEZE_DISPLAY (d);
SQUEEZE_WINDOW (sd->w);
- // Very useful. Looks like sd->w->input.left is the left window border.
-
pBox->x1 = sw->targetX + sd->w->input.left;
pBox->y1 = sw->targetY + sd->w->input.right;
pBox->x2 = sw->targetX + sw->targetWidth
@@ -515,21 +513,18 @@ squeezePaintWindow (CompWindow *w,
resizeGetPaintRectangle (s->display, &box);
resizeGetStretchScale (w, &box, &xScale, &yScale);
- xOrigin = w->attrib.x - w->input.left;
- yOrigin = w->attrib.y - w->input.top;
+ xOrigin = sw->targetX;
+ yOrigin = sw->targetY;
- // Hack to sort out window resize flicker
if (sw->targetWidth == w->attrib.width)
{
- matrixTranslate (&wTransform, sw->targetX,
- sw->targetY, 0.0f);
- }
-
- matrixScale (&wTransform, xScale, yScale, 1.0f);
- matrixTranslate (&wTransform,
+ //Only scale and translate if resize has happened
+ matrixScale (&wTransform, xScale, yScale, 1.0f);
+ matrixTranslate (&wTransform,
(sw->targetX) / xScale - xOrigin,
(sw->targetY) / yScale - yOrigin,
0.0f);
+ }
glPushMatrix ();
glLoadMatrixf (wTransform.m);
diff --git a/squeeze.xml.in b/squeeze.xml.in
index 041c8cd..720d2a9 100644
--- a/squeeze.xml.in
+++ b/squeeze.xml.in
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<compiz>
<plugin name="squeeze" useBcop="true">
- <_short>Squeeze Window</_short>
+ <_short>Squeeze Windows</_short>
<_long>Put and resize windows with a client application</_long>
<category>Window Management</category>
<display>
@@ -16,19 +16,12 @@
<_short>Resize Animation Settings</_short>
<_short>Resize Animation Settings</_short>
<option name="resize_num_steps" type="int">
- <_short>Resize Speed</_short>
+ <_short>Resize Steps</_short>
<_long>Define how many steps in the resize animation</_long>
- <default>500</default>
+ <default>250</default>
<min>10</min>
<max>2000</max>
</option>
- <option name="resize_update_delay" type="int">
- <_short>Resize Step Interval (ms)</_short>
- <_long>Delay (in ms) between screen updates. Decreasing this value may make window resize more smoothly, but will also increase CPU usage.</_long>
- <default>40</default>
- <min>10</min>
- <max>200</max>
- </option>
</subgroup>
</group>
</display>
@@ -54,6 +47,9 @@
<precision>0.1</precision>
</option>
</subgroup>
+ </group>
+ <group>
+ <_short>General</_short>
<subgroup>
<_short>Window settings</_short>
<option name="pad_left" type="int">