- WindowHandle root = DefaultRootWindow(priv->display);
- XRRScreenResources *res = XRRGetScreenResources(priv->display, root);
- RROutput primary = XRRGetOutputPrimary(priv->display, root);
+ XRRScreenResources *res = XRRGetScreenResources(priv->display, priv->root_window);
+ RROutput primary = XRRGetOutputPrimary(priv->display, priv->root_window);