How can I copy the NETRootInfo instance of a running plasma?

vatbier vatbier at yahoo.com
Tue Oct 28 15:55:58 CET 2008


Is it possible to read p->showing_desktop of NETRootInfo of plasma with a program I write myself?
With NETRootinfo::showingDesktop() I should be able to do so but if I define a NetRootinfo info(QX11Info::display(), 0) the constructor for NETRootinfo sets p->showing_desktop to false.

http://www.englishbreakfastnetwork.org/apidocs/apidox-kde-4.1/kdelibs-apidocs/kdeui/html/classNETRootInfo.html#b5d0363dc1a9c70863b073f1fa9644d9 says "use this constructor to create a NETRootInfo object, which will be used to query information set on the root window." but the constructor sets several variables itself so you can't query them, e.g.:
p->supportwindow = None;
p->number_of_desktops = p->current_desktop = 0;
p->active = None;
p->clients = p->stacking = p->virtual_roots = (Window *) 0;
p->clients_count = p->stacking_count = p->virtual_roots_count = 0;
p->showing_desktop = false;
p->desktop_layout_orientation = OrientationHorizontal;
p->desktop_layout_corner = DesktopLayoutCornerTopLeft;
p->desktop_layout_columns = p->desktop_layout_rows = 0;

With copy-constructor NETRootInfo::NETRootInfo(const NETRootInfo &rootinfo) I should be able to read showing_desktop but how can I write a program that can get the address of the NETRootinfo instance of the running plasma?

vatbier


      


More information about the Plasma-devel mailing list