]>
Dogcows Code - chaz/openbox/blob - openbox/frame.c
3 void frame_client_gravity(Frame
*self
, int *x
, int *y
)
6 switch (self
->client
->gravity
) {
16 *x
-= (self
->size
.left
+ self
->size
.right
) / 2;
19 case NorthEastGravity
:
20 case SouthEastGravity
:
22 *x
-= self
->size
.left
+ self
->size
.right
;
27 *x
-= self
->size
.left
;
32 switch (self
->client
->gravity
) {
34 case NorthWestGravity
:
35 case NorthEastGravity
:
42 *y
-= (self
->size
.top
+ self
->size
.bottom
) / 2;
45 case SouthWestGravity
:
46 case SouthEastGravity
:
48 *y
-= self
->size
.top
+ self
->size
.bottom
;
58 void frame_frame_gravity(Frame
*self
, int *x
, int *y
)
61 switch (self
->client
->gravity
) {
63 case NorthWestGravity
:
65 case SouthWestGravity
:
70 *x
+= (self
->size
.left
+ self
->size
.right
) / 2;
72 case NorthEastGravity
:
74 case SouthEastGravity
:
75 *x
+= self
->size
.left
+ self
->size
.right
;
84 switch (self
->client
->gravity
) {
86 case NorthWestGravity
:
88 case SouthWestGravity
:
93 *y
+= (self
->size
.top
+ self
->size
.bottom
) / 2;
95 case NorthEastGravity
:
97 case SouthEastGravity
:
98 *y
+= self
->size
.top
+ self
->size
.bottom
;
102 *y
+= self
->size
.top
;
This page took 0.043225 seconds and 4 git commands to generate.