$screen = Gnome2::Wnck::Screen->get_default() $screen->force_update(); $workspace = $screen->get_active_workspace();