From 27af0da03c55793721b67c986d41e6c71f8ed6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Sat, 10 Jan 1998 06:18:28 +0100 Subject: [PATCH] * Types.pmod (Window): New function GetProperty. Rev: lib/modules/Protocols.pmod/X.pmod/Types.pmod:1.11 --- lib/modules/Protocols.pmod/X.pmod/Types.pmod | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/lib/modules/Protocols.pmod/X.pmod/Types.pmod b/lib/modules/Protocols.pmod/X.pmod/Types.pmod index c9cd2f33cd..e70cf700db 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Types.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Types.pmod @@ -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, -- GitLab