+void screen::updateNumDesktops() {
+ assert(_managed);
+
+ if (! _xatom->getValue(_root, XAtom::net_number_of_desktops, XAtom::cardinal,
+ (unsigned long)_num_desktops))
+ _num_desktops = 1; // assume that there is at least 1 desktop!
+}
+
+
+void screen::updateActiveDesktop() {
+ assert(_managed);
+
+ if (! _xatom->getValue(_root, XAtom::net_current_desktop, XAtom::cardinal,
+ (unsigned long)_active_desktop))
+ _active_desktop = 0; // there must be at least one desktop, and it must
+ // be the current one
+}
+
+