emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x-display-pixel-width/height inconsistency


From: YAMAMOTO Mitsuharu
Subject: Re: x-display-pixel-width/height inconsistency
Date: Mon, 29 Apr 2013 11:42:12 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 29 Apr 2013 11:27:47 +0900, YAMAMOTO Mitsuharu <address@hidden> 
>>>>> said:

> Even with the above fixes, I got different results between GDK and
> XRandR implementations with Xquartz 2.7.4 on OS X 10.8.

>   GDK:

>   (((geometry (left + 0) (top + 22) (width . 2560) (height . 1418))
>     (workarea (left + 0) (top + 22) (width . 2560) (height . 1418))
>     (mm-size (width . 677) (height . 374))
>     (frames #<frame address@hidden 0x1042b4050>))
>    ((geometry (left + 2560) (top + 0) (width . 960) (height . 600))
>     (workarea (left + 2560) (top + 0) (width . 960) (height . 600))
>     (mm-size (width . 254) (height . 158))
>     (frames)))

>   XRandR:

>   (((geometry (left + 0) (top + 0) (width . 3520) (height . 1440))
>     (workarea (left + 0) (top + 0) (width . 3520) (height . 1440))
>     (mm-size (width . 0) (height . 0))
>     (frames #<frame address@hidden 0x1022ae850>)))

>   (Xinerama gave the same result as GDK did.)

> As you can see, there is a difference even in the number of monitors.

> Maybe you need to register some callback to call
> XRRUpdateConfiguration?

This guess was not right.  GDK rejects XRandR in Xquartz and uses
Xinerama instead.  The distinction is made by comparing the output
name with "default".

in init_randr13 (gdkscreen-x11.c):

      XRROutputInfo *output =
        XRRGetOutputInfo (dpy, resources, resources->outputs[i]);

      /* Non RandR1.2 X driver have output name "default" */
      randr12_compat |= !g_strcmp0 (output->name, "default");

        :

  /* non RandR 1.2 X driver doesn't return any usable multihead data */
  if (randr12_compat)
    {
      guint n_monitors = monitors->len;

      free_monitors ((GdkX11Monitor *)g_array_free (monitors, FALSE),
                     n_monitors);

      return FALSE;
    }

                                     YAMAMOTO Mitsuharu
                                address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]