[compiz] Return value from an action function
Mike Dransfield
mike at blueroot.co.uk
Sat Jan 6 17:36:54 PST 2007
David Reveman wrote:
> A non zero return value indicates that the event should be stolen and
> that no more processing of the event should be done. There might be a
> few places where initiate functions return FALSE but should instead be
> returning TRUE. We should fix those cases.
>
>
Here is a patch for the cases that I am aware of
There maybe others but not in actions commonly
initiated by the mouse.
Does the same apply in reverse? ie. Should I also
change the terminate functions to return false to
swallow the button up event?
-------------- next part --------------
>From 5e094651e6d12695c0a9c3eb2825a1526d66c24c Mon Sep 17 00:00:00 2001
From: mike at blueroot.co.uk <mike at localhost.(none)>
Date: Sun, 7 Jan 2007 01:29:49 +0000
Subject: [PATCH] Swallow clicks for initiate functions in screenshot, rotate and annotate
---
plugins/annotate.c | 2 +-
plugins/rotate.c | 2 +-
plugins/screenshot.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/annotate.c b/plugins/annotate.c
index 42ef705..1bb530b 100644
--- a/plugins/annotate.c
+++ b/plugins/annotate.c
@@ -500,7 +500,7 @@ annoInitiate (CompDisplay *d,
as->eraseMode = FALSE;
}
- return FALSE;
+ return TRUE;
}
static Bool
diff --git a/plugins/rotate.c b/plugins/rotate.c
index 3e89e9f..e68d0ed 100644
--- a/plugins/rotate.c
+++ b/plugins/rotate.c
@@ -653,7 +653,7 @@ rotateInitiate (CompDisplay *d,
}
}
- return FALSE;
+ return TRUE;
}
static Bool
diff --git a/plugins/screenshot.c b/plugins/screenshot.c
index ad27772..ddb9b52 100644
--- a/plugins/screenshot.c
+++ b/plugins/screenshot.c
@@ -104,7 +104,7 @@ shotInitiate (CompDisplay *d,
ss->grab = TRUE;
}
- return FALSE;
+ return TRUE;
}
static Bool
--
1.4.4.3
More information about the compiz
mailing list