nvctrl: call XDefaultScreen for screen id (#1152)
Calling nvctrl XNVCTRLIsNvScreen with X display ID used for screen id is a programmer error. For most common use cases, Gnome on X11 may launch user sessions on X display ":1" but still uses screen 0. Current code will always fail to find a correct display in this case, as both `IsNvScreen(":0", 0)` and `IsNvScreen(":1", 1)` returns false. Call XDefaultScreen with `struct Display *` to obtain the correct screen id, then use this id for `IsNvScreen()`.pull/1153/head
parent
2b29f2d89d
commit
823cdf01d0
Loading…
Reference in New Issue