Subject: Re: bug#75936: monitor width reporting

From: Po Lu <[email-masked]>
Date: Sun, 02 Feb 2025 18:30:31 +0800

Eli Zaretskii <[email-masked]> writes:

>> From: Po Lu <[email-masked]>
>> Cc: "david" <[email-masked]>,  [email-masked],  [email-masked]
>> Date: Sun, 02 Feb 2025 14:59:29 +0800
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> >> At the very least, the build information should indicate the difference.
>> >
>> > Agreed.  Po Lu, do we have some indication of whether XRandR was used
>> > in the recorded features that report-emacs-bug shows?  If not, can we
>> > add that?
>> 
>> No, but it's an exceedingly simple oversight that can be addressed thus:
>> 
>> diff --git a/configure.ac b/configure.ac
>> index 9db1f07d7fc..55a4be1a0ee 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -7481,7 +7481,7 @@ AC_DEFUN
>>   HARFBUZZ IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 \
>>   M17N_FLT MODULES NATIVE_COMP NOTIFY NS OLDXMENU PDUMPER PGTK PNG RSVG SECCOMP \
>>   SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER \
>> - UNEXEC WEBP X11 XAW3D XDBE XFT XIM XINPUT2 XPM XWIDGETS X_TOOLKIT \
>> + UNEXEC WEBP X11 XAW3D XDBE XFT XIM XINPUT2 XPM XRANDR XWIDGETS X_TOOLKIT \
>>   ZLIB; do
>>  
>>      case $opt in
>
> Thanks.  And the same with XINERAMA, I presume?

Right.  That's also absent.

> The documentation portion of the changeset which added support for
> XRandR and Xinerama is lacking in more than one way, unfortunately.
> E.g., the NEWS item didn't even mention these two X features, which
> are prerequisites for multiple-monitor support.

That's quite lamentable.

> So GTK also supports this internally?  Where's the code for that?
> xfns.c defines monitor attributes only "#ifndef USE_GTK", AFAICT.
> What did I miss?

The code that interfaces with GTK is in the DEFUN
Fx_display_monitor_attributes_list, not x_get_monitor_attributes.