From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: x-display-pixel-width/height inconsistency Date: Mon, 29 Apr 2013 11:42:12 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <514A5DE1.10009@gmx.de> <831ub767wf.fsf@gnu.org> <83mwtu4p7c.fsf@gnu.org> <83vc8h313t.fsf@gnu.org> <5073D6B8-95E4-4012-AA74-106F428379DC@swipnet.se> <8BD4B041-5A3F-4D7C-AFD3-E997E194AA9D@swipnet.se> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1367203345 18712 80.91.229.3 (29 Apr 2013 02:42:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Apr 2013 02:42:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: "Jan D." Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 29 04:42:29 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UWe2u-0004uR-QV for ged-emacs-devel@m.gmane.org; Mon, 29 Apr 2013 04:42:28 +0200 Original-Received: from localhost ([::1]:57275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWe2u-0003zB-9u for ged-emacs-devel@m.gmane.org; Sun, 28 Apr 2013 22:42:28 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:47701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWe2m-0003yx-Da for emacs-devel@gnu.org; Sun, 28 Apr 2013 22:42:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWe2g-00032S-AV for emacs-devel@gnu.org; Sun, 28 Apr 2013 22:42:20 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:59630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWe2f-00032I-PO for emacs-devel@gnu.org; Sun, 28 Apr 2013 22:42:14 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 40E8FC055D; Mon, 29 Apr 2013 11:42:12 +0900 (JST) In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159203 Archived-At: >>>>> On Mon, 29 Apr 2013 11:27:47 +0900, YAMAMOTO Mitsuharu 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 #)) > ((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 #))) > (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 mituharu@math.s.chiba-u.ac.jp