5
#include "xparsegeometry.h"
15
int RLayoutXParseGeometry(RLayout *layout, const char *geometry, int *x, int *y,
16
unsigned int *width, unsigned int *height)
20
sep = strchr(geometry, ':');
23
RArea mon = RLayoutGetAreaByName(layout, geometry, sep - geometry);
24
if(RAreaIsValid(&mon)) {
25
int mask = XParseGeometry(sep + 1, x, y, width, height);
26
RArea big = RLayoutBigArea(layout);
29
if(mask & XNegative) {
30
*x -= big.width - mon.width - (mon.x - big.x);
38
if(mask & YNegative) {
39
*y -= big.height - mon.height - (mon.y - big.y);
50
// Name not found, keep the geometry part as-is
54
return XParseGeometry(geometry, x, y, width, height);