On Mon, Mar 9, 2009 at 11:31 PM, Joel Bosveld <[email protected]>wrote:

> From f301f618a18764102b6212fa11c2ae672c69586c Mon Sep 17 00:00:00 2001
> From: Joel Bosveld <[email protected]>
> Date: Mon, 9 Mar 2009 23:29:23 +0900
> Subject: [PATCH] passive_grab and nodelay should be case-insensitive
>
> ---
>  src/metadata.cpp |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/metadata.cpp b/src/metadata.cpp
> index cf2f30c..ccc00ed 100644
> --- a/src/metadata.cpp
> +++ b/src/metadata.cpp
> @@ -676,14 +676,14 @@ initActionState (CompMetadata      *metadata,
>
>      value = stringFromMetadataPathElement (metadata, path,
> "passive_grab");
>      if (!value.empty ())
> -    if (value == "false")
> +    if (strcasecmp (str.c_str (), "false") == 0)
>          *state = 0;
>
>      if (type == CompOption::TypeEdge)
>      {
>      value = stringFromMetadataPathElement (metadata, path, "nodelay");
>      if (!value.empty ())
> -        if (value == "true")
> +        if (strcasecmp (value.c_str (), "true") == 0)
>          *state |= CompAction::StateNoEdgeDelay;
>      }
>
> --
> 1.6.0.3
>
>
*sigh* copy and paste error (and must not have saved it before testing the
build...)
---
 src/metadata.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/metadata.cpp b/src/metadata.cpp
index cf2f30c..ccc00ed 100644
--- a/src/metadata.cpp
+++ b/src/metadata.cpp
@@ -676,14 +676,14 @@ initActionState (CompMetadata      *metadata,

     value = stringFromMetadataPathElement (metadata, path, "passive_grab");
     if (!value.empty ())
-    if (value == "false")
+    if (strcasecmp (str.c_str (), "false") == 0)
         *state = 0;

     if (type == CompOption::TypeEdge)
     {
     value = stringFromMetadataPathElement (metadata, path, "nodelay");
     if (!value.empty ())
-        if (value == "true")
+        if (strcasecmp (value.c_str (), "true") == 0)
         *state |= CompAction::StateNoEdgeDelay;
     }

-- 
1.6.0.3

Attachment: 0001-passive_grab-and-nodelay-should-be-case-insensitive.patch
Description: Binary data

_______________________________________________
Dev mailing list
[email protected]
http://lists.compiz-fusion.org/mailman/listinfo/dev

Reply via email to