Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libxcb-randr support #22

Closed
wants to merge 7 commits into from
Closed

Conversation

nmschulte
Copy link
Contributor

This is a work in progress; I'm mainly creating the PR to show progress to those that are interested.

There is still much to be done, but I think I've got a good grasp of the task at hand now and things should start flowing.

I will be actively re-writing this branch as I make changes and assimilate them into the history. If you wish to collaborate, let me know and I will change my process to make this easier.

@nmschulte
Copy link
Contributor Author

@phillipberndt Could you clarify:

You're using the same XID for the CRTC and the Mode in the OutputInfo structure; is that intentional? https://github.com/phillipberndt/fakexrandr/blob/master/libXrandr.c#L126

@phillipberndt
Copy link
Owner

It should not matter, because there is no API that takes an arbitrary XID and then differentiates between CRTCs and modes. Each call takes either one or the other as an argument, so there's no ambiguity. BTW, neither the fake CRTC nor the fake mode are actual XIDs. They are just made up numbers.

@nmschulte
Copy link
Contributor Author

That's what I was thinking; thanks.

@nmschulte
Copy link
Contributor Author

I haven't had much time to work on this since I started this effort back in August; I've been making due with autorandr and hooks to configure my i3 config (which supports "fake-outputs" configuration), and I'm just biding my time until Monitors are supported in stable builds of Xorg, which eliminates (my) need for this library.

If anyone wants to pick up this work again, or would like me to continue, I'll be happy to help or consider looking at this again. I've pushed my work in progress (which is pretty raw; the latest commit is just my working tree) to my repository.

@baestards
Copy link

If anyone wants to pick up this work again, or would like me to continue, I'll be happy to help or consider looking at this again.

it would be great to use this with KDE. :)

@phillipberndt
Copy link
Owner

@atmalik If you feel up to it yourself, go ahead and give it a try! I'll happily assist you with any questions that might arise along the way, it's not actually that hard if you regard the task as writing a proxy for a networking application and forget that it's actually about graphics ;-) My personal motivation for implementing this is quite low since the intel video drivers nowadays can correctly distinguish between the second and third monitor and people are slowly transitioning away from X11 anyway..

@tyll
Copy link

tyll commented Mar 17, 2018

Just wondering, can the same that frakexrandr does be achieved with --setmonitor, see this answer:
https://askubuntu.com/a/998435

@phillipberndt
Copy link
Owner

phillipberndt commented Mar 19, 2018 via email

@nmschulte nmschulte closed this Mar 27, 2018
@10110111
Copy link

I was trying to revive this development, but when I tried to compile your branch, I got lots of errors. The first one is this:

cc -O2 -fPIC -shared -o libxcb-randr.so libxcb-randr.c -ldl
libxcb-randr.c: In function ‘_config_foreach_split’:
libxcb-randr.c:78:60: error: ‘xcb_randr_output_info_t’ undeclared (first use in this function); did you mean ‘xcb_randr_output_next’?
   **fake_outputs = malloc(sizeof(struct FakeInfo) + sizeof(xcb_randr_output_info_t) + output_info->nameLen + sizeof("~NNN ") + sizeof(RRCrtc) + sizeof(RROutput) * output_info->nclone + (1 + output_info->nmode) * sizeof(RRMode));
                                                            ^~~~~~~~~~~~~~~~~~~~~~~
                                                            xcb_randr_output_next

This makes me wonder: what version of XRandR XCB were you using? Google fails to find anything for xcb_randr_output_info_t. Or was it a type you were planning to define yourself?

@nmschulte
Copy link
Contributor Author

I started making these changes before I knew the actual API, or knew which ones were synchronous and which weren't -- that type probably doesn't exist; I doubt the WIP actually builds, as you've discovered.

@10110111
Copy link

10110111 commented Apr 9, 2020

I've made some progress in my fork. So far I've been able to make XFCE4-panel, XFWM4, Yakuake, KWin and KDE Display and Monitor settings module believe the fakes. Haven't tested anything other yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants