XRandR Verify Active Rate

re.mcclue re.mcclue at protonmail.com
Thu Mar 25 23:03:23 UTC 2021


A XRRScreenResources contains multiple XRRModeInfo and RROutput (which with XRRGetOutputInfo() effectively means XRROutputInfo). Therefore, a screen can have many outputs which in turn, can have many modes. The rate is a property of the mode. Because of this many-to-many relationship, how can I determine what the active rate is?
In other words:

XRRScreenResources *res = XRRGetScreenResources(display, default_root_window);
  for (int i = 0; i < res->nmode; ++i) {
    XRRModeInfo *mode_info = &res->modes[i];
    // How do you verify this is the active rate?
    double rate = (double)mode_info->dotClock / ((double)mode_info->hTotal * (double)mode_info->vTotal));
  }

Sent with [ProtonMail](https://protonmail.com) Secure Email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg-devel/attachments/20210325/b8a5317b/attachment.htm>


More information about the xorg-devel mailing list