summaryrefslogtreecommitdiff
diff options
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-12-22 14:26:46 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-12-22 14:26:46 +0800
commit68c5e0f2c6906915d3f7dc48756fe88ae9d26cf8 (patch)
treedcf06d6dceeb024c973a66ae7cba3ca83444ec65
parent4cc27af94e10e655317fc638deb7aaa5489cfec6 (diff)
Set the high bit if no state or actions are set since our bitwise check
requires that at least one bit is set (bzr r1794.3.2)
-rw-r--r--plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp
index 48fb1b589..cac9210e0 100644
--- a/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp
+++ b/plugins/unity-mt-grab-handles/src/unity-mt-grab-handle-layout.cpp
@@ -85,6 +85,14 @@ unity::MT::getLayoutForMask (unsigned int state,
},
};
+ /* Set the high bit if it was zero */
+ if (!state)
+ state |= 0x8000;
+
+ /* Set the high bit if it was zero */
+ if (!actions)
+ actions |= 0x8000;
+
for (unsigned int j = 0; j < numSkipInfo; j++)
{
const bool exactState = skip[j].state && skip[j].state != static_cast <unsigned int> (~0);