Skip to content
Snippets Groups Projects
Commit 27af0da0 authored by Niels Möller's avatar Niels Möller
Browse files

* Types.pmod (Window): New function GetProperty.

Rev: lib/modules/Protocols.pmod/X.pmod/Types.pmod:1.11
parent 22f32adb
No related branches found
No related tags found
No related merge requests found
......@@ -565,6 +565,33 @@ class Window
}
return a;
}
object GetProperty_req(object property, object|void type)
{
object req = Requests.GetProperty();
req->window = id;
req->property = property->id;
if (type)
req->type = type->id;
return req;
}
mapping GetProperty(object property, object|void type)
{
object req = GetProperty_req(property, type);
array a = display->blocking_request(req);
if (!a[0])
return 0;
mapping m = a[1];
if (type && (m->type == type->id))
m->type = type;
else
m->type = display->lookup_atom(m->type);
return m;
}
// Shape extension
void ShapeRectangles( string kind, int xo, int yo, string operation,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment