Commit Graph

5 Commits

Author SHA1 Message Date
Benjamin Otte
e8f2eeac92 bitmask: Fix intersection code
With the fix in 77912a65e2, another bug
got visible: booleans are 32 bits, so if the intersection between the 2
bitmasks happened in higher bits, the return value would be truncated to
FALSE.

This actually made slider handles disappear, so it was pretty visible.
2012-11-10 18:35:37 +01:00
Alexander Larsson
77912a65e2 Fix cnp bug in _gtk_bitmask_intersects
We need to use the allocated codepath if *any* argument is
allocated, not if one arg is not allocated.
This bug caused unnecessary calls to _gtk_bitmask_is_allocated,
as well as return completely wrong result if both bitmask are
allocated.
2012-11-09 10:11:47 +01:00
John Ralls
b2a8e6ed04 Fix compile error from splitting bitmask code
GtkBitMask was typedef'd twice.
2012-03-01 16:26:38 -08:00
Neil Roberts
6044dfc35b bitmask: Don't allocate memory for small bitmasks
Code taken more or less verbatim from CoglBitmask.
2012-03-01 15:10:36 +01:00
Benjamin Otte
27eb83a410 bitmask: Split bitmask code into two
This does nothing but turn all GtkBitmask functions into static inline
functions that call the gtk_allocated_bitmask_*() equivalent.

The implementation of the static functions has also been put into a
private header, to not scare people who want to see how things are
implemented.
2012-03-01 15:10:36 +01:00