Re: RANDR + xcb_screen_t root, the fields (width_in_pixels/height_in_pixels) are not changed
Alan Coopersmith <[email protected]> Mon, 6 Sep 2021 09:41:42 -0700
| Newsgroups | gmane.comp.freedesktop.xcb |
|---|---|
| Message-ID | <[email protected]> |
On 9/3/21 11:22 PM, Andrey Af wrote: > Hi, > > After changing the screen size via utility xrandr -s 1 or the RANDR > API, why does the size information in screen root > width_in_pixels/height_in_pixels not change? > > But if I make a new connection, then the information is correct. > How do I update the information in the current connection correctly? xcb_get_setup returns pointers to the information provided at connection time - there is no way to update that information on an existing connection. (The X11 core protocol did not expect that information to ever change - and it couldn't until the RANDR extension came along decades later.) You'll need to keep track of resize events from the RANDR extension instead and store the screen sizes in your own structure instead. -- -Alan Coopersmith- [email protected] Oracle Solaris Engineering - https://blogs.oracle.com/alanc