request updated info from X instead of the stale stuff that we were getting
This commit is contained in:
parent
aac16f01ef
commit
e3e1408c10
@ -114,7 +114,7 @@ int rex_edid_xrandr(void){
|
||||
randr_ver_min, /*return location for RandR version*/
|
||||
randr_ver_maj; /*see above*/
|
||||
int i; /*counter*/
|
||||
xcb_randr_get_screen_resources_current_reply_t* randr_resources_reply; /*X server reply to our resource query*/
|
||||
xcb_randr_get_screen_resources_reply_t* randr_resources_reply; /*X server reply to our resource query*/
|
||||
|
||||
|
||||
/*initialize connection to x server*/
|
||||
@ -133,13 +133,13 @@ int rex_edid_xrandr(void){
|
||||
|
||||
/*get all this bs so we can get what we actually want*/
|
||||
root = get_screen_root_window(connection, screen_num);
|
||||
randr_resources_reply = xcb_randr_get_screen_resources_current_reply(connection, xcb_randr_get_screen_resources_current(connection, root), NULL);
|
||||
randr_resources_reply = xcb_randr_get_screen_resources_reply(connection, xcb_randr_get_screen_resources(connection, root), NULL);
|
||||
timestamp = randr_resources_reply->config_timestamp;
|
||||
|
||||
/*number of displays*/
|
||||
num_randr_outputs = xcb_randr_get_screen_resources_current_outputs_length(randr_resources_reply);
|
||||
num_randr_outputs = xcb_randr_get_screen_resources_outputs_length(randr_resources_reply);
|
||||
/*list of displays*/
|
||||
randr_outputs = xcb_randr_get_screen_resources_current_outputs(randr_resources_reply);
|
||||
randr_outputs = xcb_randr_get_screen_resources_outputs(randr_resources_reply);
|
||||
|
||||
for(i = 0;i < num_randr_outputs;++i){
|
||||
xcb_randr_get_output_info_reply_t* output_info_reply;
|
||||
@ -165,7 +165,6 @@ int rex_edid_xrandr(void){
|
||||
unsigned int k;
|
||||
/*get atom_name*/
|
||||
atom_name_reply = xcb_get_atom_name_reply(connection, xcb_get_atom_name(connection, output_atoms[j]), NULL);
|
||||
|
||||
/*if the atom is the EDID data, we want to get it*/
|
||||
if(!memcmp(xcb_get_atom_name_name(atom_name_reply), "EDID", 4)){
|
||||
/*get property data for the current atom*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user