summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@XPS-SUSE.site>2008-11-02 09:26:51 +0900
committerSam Spilsbury <Sam@XPS-SUSE.site>2008-11-02 09:26:51 +0900
commitacfa5ae6cff3e433c1c5ab9acb211f21a867ec57 (patch)
treea752158bb52f097815e1b29114306f9d929cfb5c
parentc7429140196ac02cb76cf8e053ca07dd34430b8f (diff)
downloadcompiz-mpx-ir-acfa5ae6cff3e433c1c5ab9acb211f21a867ec57.tar.gz
compiz-mpx-ir-acfa5ae6cff3e433c1c5ab9acb211f21a867ec57.tar.bz2
Fix some freewins bugs
-rw-r--r--fusion/plugins/freewins/0002-Input-Redirection-Support.patch108
1 files changed, 84 insertions, 24 deletions
diff --git a/fusion/plugins/freewins/0002-Input-Redirection-Support.patch b/fusion/plugins/freewins/0002-Input-Redirection-Support.patch
index 2b490ef..f55cbd9 100644
--- a/fusion/plugins/freewins/0002-Input-Redirection-Support.patch
+++ b/fusion/plugins/freewins/0002-Input-Redirection-Support.patch
@@ -1,20 +1,87 @@
-From cfce9126a9b7f14e8f45106fc8ab7a5326622248 Mon Sep 17 00:00:00 2001
+From 8e49fb84555e34f2e30a01decae3936d1b9e26fd Mon Sep 17 00:00:00 2001
From: Sam Spilsbury <Sam@XPS-SUSE.site>
-Date: Fri, 31 Oct 2008 18:33:43 +0900
+Date: Sun, 2 Nov 2008 09:23:07 +0900
Subject: [PATCH] Input Redirection Support
---
- events.c | 34 ++++++++++++++++++++++++++++++++++
+ events.c | 52 +++++++++++++++++++++++++++++++++++++++++++---------
freewins.h | 10 +++++++++-
freewins.xml.in | 25 ++++++++++++++++++++-----
- input.c | 9 +++++++--
+ paint.c | 2 ++
util.c | 2 +-
- 5 files changed, 71 insertions(+), 9 deletions(-)
+ 5 files changed, 75 insertions(+), 16 deletions(-)
diff --git a/events.c b/events.c
-index 16781cb..3a59ee2 100644
+index 16781cb..478bb7e 100644
--- a/events.c
+++ b/events.c
+@@ -171,15 +171,15 @@ static void FWHandleRotateMotionEvent (CompWindow *w, float dx, float dy, int x,
+ int oldX = lastPointerX - 100;
+ int oldY = lastPointerY - 100;
+
+- float midX = WIN_REAL_X(fwd->grabWindow) + WIN_REAL_W(fwd->grabWindow)/2.0;
+- float midY = WIN_REAL_Y(fwd->grabWindow) + WIN_REAL_H(fwd->grabWindow)/2.0;
++ float midX = WIN_REAL_X(w) + WIN_REAL_W(w)/2.0;
++ float midY = WIN_REAL_Y(w) + WIN_REAL_H(w)/2.0;
+
+ float angX;
+ float angY;
+ float angZ;
+
+ /* Save the current angles so we can work with them */
+- if (freewinsGetSnap (fwd->grabWindow->screen) || fwd->snap)
++ if (freewinsGetSnap (w->screen) || fwd->snap)
+ {
+ angX = fww->transform.unsnapAngX;
+ angY = fww->transform.unsnapAngY;
+@@ -350,7 +350,7 @@ static void FWHandleRotateMotionEvent (CompWindow *w, float dx, float dy, int x,
+
+ /* Restore angles */
+
+- if (freewinsGetSnap (fwd->grabWindow->screen) || fwd->snap)
++ if (freewinsGetSnap (w->screen) || fwd->snap)
+ {
+ fww->transform.unsnapAngX = angX;
+ fww->transform.unsnapAngY = angY;
+@@ -380,7 +380,7 @@ static void FWHandleScaleMotionEvent (CompWindow *w, float dx, float dy, int x,
+
+ float scaleX, scaleY;
+
+- if (freewinsGetSnap (fwd->grabWindow->screen) || fwd->snap)
++ if (freewinsGetSnap (w->screen) || fwd->snap)
+ {
+ scaleX = fww->transform.unsnapScaleX;
+ scaleY = fww->transform.unsnapScaleY;
+@@ -457,7 +457,7 @@ static void FWHandleScaleMotionEvent (CompWindow *w, float dx, float dy, int x,
+ break;
+ }
+
+- if (freewinsGetSnap (fwd->grabWindow->screen) || fwd->snap)
++ if (freewinsGetSnap (w->screen) || fwd->snap)
+ {
+ fww->transform.unsnapScaleX = scaleX;
+ fww->transform.unsnapScaleY = scaleY;
+@@ -469,9 +469,9 @@ static void FWHandleScaleMotionEvent (CompWindow *w, float dx, float dy, int x,
+ }
+
+ /* Stop scale at threshold specified */
+- if (!freewinsGetAllowNegative (fwd->grabWindow->screen))
++ if (!freewinsGetAllowNegative (w->screen))
+ {
+- float minScale = freewinsGetMinScale (fwd->grabWindow->screen);
++ float minScale = freewinsGetMinScale (w->screen);
+ if (fww->animate.destScaleX < minScale)
+ fww->animate.destScaleX = minScale;
+
+@@ -480,7 +480,7 @@ static void FWHandleScaleMotionEvent (CompWindow *w, float dx, float dy, int x,
+ }
+
+ /* Change scales for maintaining aspect ratio */
+- if (freewinsGetScaleUniform (fwd->grabWindow->screen))
++ if (freewinsGetScaleUniform (w->screen))
+ {
+ float tempscaleX = fww->animate.destScaleX;
+ float tempscaleY = fww->animate.destScaleY;
@@ -1136,3 +1136,37 @@ void FWHandleEvent(CompDisplay *d, XEvent *ev){
break;
}
@@ -126,26 +193,19 @@ index fe87124..a1ffe0a 100644
</option>
<option type="bool" name="immediate_moves">
<_short>Immediate Moves</_short>
-diff --git a/input.c b/input.c
-index 5a11efa..daa66b8 100644
---- a/input.c
-+++ b/input.c
-@@ -425,8 +425,13 @@ FWHandleWindowInputInfo (CompWindow *w)
- return FALSE;
-
- fww->input->w = w;
-- FWShapeInput (w);
-- FWCreateIPW (w);
-+ if (freewinsGetInputHandlingMode (w->screen) != InputHandlingModeRealRedirection)
-+ {
-+ if (freewinsGetInputHandlingMode (w->screen) > 0)
-+ FWShapeInput (w);
-+ if (freewinsGetInputHandlingMode (w->screen) > 1)
-+ FWCreateIPW (w);
-+ }
- FWAddWindowToList (fww->input);
+diff --git a/paint.c b/paint.c
+index 3142cb3..0a28888 100644
+--- a/paint.c
++++ b/paint.c
+@@ -413,6 +413,8 @@ FWPaintWindow (CompWindow *w,
+ fww->isAnimating = FALSE;
}
++ updateMesh (w);
++
+ return status;
+ }
+
diff --git a/util.c b/util.c
index 0ef58eb..7b860e4 100644
--- a/util.c