After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674727 - Compilation error when compiling without xinerama support
Compilation error when compiling without xinerama support
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-04-24 15:03 UTC by Javier Jardón (IRC: jjardon)
Modified: 2012-04-25 18:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix compilation warning (933 bytes, patch)
2012-04-24 15:05 UTC, Javier Jardón (IRC: jjardon)
none Details | Review
Make support for "XFree86" Xinerama mandatory (9.17 KB, patch)
2012-04-24 19:38 UTC, Owen Taylor
committed Details | Review

Description Javier Jardón (IRC: jjardon) 2012-04-24 15:03:23 UTC
core/screen.c: In function 'reload_monitor_infos':
core/screen.c:434:16: error: variable 'display' set but not used [-Werror=unused-but-set-variable]
core/screen.c: At top level:
core/screen.c:383:1: error: 'find_monitor_with_rect' defined but not used [-Werror=unused-function]
core/screen.c:407:1: error: 'find_main_output_for_crtc' defined but not used [-Werror=unused-function]
Comment 1 Javier Jardón (IRC: jjardon) 2012-04-24 15:05:48 UTC
Created attachment 212710 [details] [review]
Fix compilation warning

This patch fix the first warning
Comment 2 Owen Taylor 2012-04-24 19:38:30 UTC
Created attachment 212729 [details] [review]
Make support for "XFree86" Xinerama mandatory

Require the headers for "XFree86" Xinerama to be present at compile
time. The older "Solaris" Xinerama is only needed for versions of
Solaris where Mutter is unlikely to work. Solaris 10 and 11 include
the XFree86 Xinerama libraries, and apparently that's the only version
that will actually work for Solaris 11, which uses Xorg.
Comment 3 Florian Müllner 2012-04-24 20:34:13 UTC
Review of attachment 212729 [details] [review]:

Looks good, lest some nitpicks regarding debug messages:

::: src/core/screen.c
@@ +555,1 @@
                   "No XFree86 Xinerama extension or XFree86 Xinerama inactive on display %s\n",

Only the latter is still possible, right?

@@ +558,2 @@
   meta_topic (META_DEBUG_XINERAMA,
               "Mutter compiled without XFree86 Xinerama support\n");

Wrong :-)
Comment 4 Colin Walters 2012-04-24 21:39:23 UTC
Review of attachment 212729 [details] [review]:

It's worth noting that "git annotate" traces the code you're deleting to:

commit 74b3bca93d0223e3b273c7613b9020fdbd8fef80
Author: Havoc Pennington <hp@redhat.com>
Date:   Fri Sep 27 20:28:34 2002 +0000

    Try to handle Solaris Xinerama, all coded blind, someone on Solaris will need to debug the typos.

Sooo...yeah =)  Patch looks correct to me.
Comment 5 Colin Walters 2012-04-24 21:40:39 UTC
Comment on attachment 212729 [details] [review]
Make support for "XFree86" Xinerama mandatory

Oops, I overwrite Florian's review status accidentally.  His "reviewed" state should stand.
Comment 6 Owen Taylor 2012-04-25 18:37:09 UTC
(In reply to comment #3)
> Review of attachment 212729 [details] [review]:
> 
> Looks good, lest some nitpicks regarding debug messages:
> 
> ::: src/core/screen.c
> @@ +555,1 @@
>                    "No XFree86 Xinerama extension or XFree86 Xinerama inactive
> on display %s\n",
> 
> Only the latter is still possible, right?

I don't think so - there's a distinction between the extension not being present at all, and being in the inactive state.

Bool XineramaIsActive(Display *dpy)
{
    xXineramaIsActiveReply      rep;
    xXineramaIsActiveReq        *req;
    XExtDisplayInfo             *info = find_display (dpy);

    if(!XextHasExtension(info))
        return False;  /* server doesn't even have the extension */

    LockDisplay (dpy);
    GetReq (XineramaIsActive, req);
    req->reqType = info->codes->major_opcode;
    req->panoramiXReqType = X_XineramaIsActive;
    if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
        UnlockDisplay (dpy);
        SyncHandle ();
        return False;
    }
    UnlockDisplay (dpy);
    SyncHandle ();
    return rep.state;
}

I've changed the message to remove "XFree86" but otherwise left it unchanged. (And removed the other leftover, thanks)
Comment 7 Owen Taylor 2012-04-25 18:38:44 UTC
Attachment 212729 [details] pushed as 93037e4 - Make support for "XFree86" Xinerama mandatory