+ {
+ if (gdk_net_wm_supports(gdk_atom_intern("_NET_FRAME_EXTENTS", false)))
+ {
+ success = true;
+ property = gdk_x11_get_xatom_by_name("_NET_FRAME_EXTENTS");
+ }
+ }
+ if (success)
+ {
+ Atom type;
+ int format;
+ gulong nitems, bytes_after;
+ long* data = NULL;
+ success = XGetWindowProperty(
+ gdk_x11_drawable_get_xdisplay(window),
+ gdk_x11_drawable_get_xid(window),
+ property,
+ 0, 4,
+ false,
+ XA_CARDINAL,
+ &type, &format, &nitems, &bytes_after, (guchar**)&data
+ ) == Success;
+ if (success)
+ {
+ success = data && nitems == 4;
+ if (success)
+ {
+ if (left) *left = int(data[0]);
+ if (right) *right = int(data[1]);
+ if (top) *top = int(data[2]);
+ if (bottom) *bottom = int(data[3]);
+ }
+ if (data)
+ XFree(data);
+ }
+ }