wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

get_sticky.c (425B)


      1 /* Copyright ©2006-2010 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include <stuff/geom.h>
      5 
      6 Align
      7 get_sticky(Rectangle src, Rectangle dst) {
      8 	Align corner;
      9 
     10 	corner = 0;
     11 	if(src.min.x != dst.min.x
     12 	&& src.max.x == dst.max.x)
     13 		corner |= East;
     14 	else
     15 		corner |= West;
     16 
     17 	if(src.min.y != dst.min.y
     18 	&& src.max.y == dst.max.y)
     19 		corner |= South;
     20 	else
     21 		corner |= North;
     22 
     23 	return corner;
     24 }