From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: The rabbit hole that is HiDPI... (empty menus / bug#31223 et al) Date: Wed, 27 Nov 2019 14:00:16 +0100 Message-ID: References: <7fa939cb-0af6-0450-6e9f-619f404b6a87@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="53943"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Tobias Bading Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 27 14:01:20 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iZwwZ-000DuP-Tb for ged-emacs-devel@m.gmane.org; Wed, 27 Nov 2019 14:01:20 +0100 Original-Received: from localhost ([::1]:37938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZwwY-0006fu-Hc for ged-emacs-devel@m.gmane.org; Wed, 27 Nov 2019 08:01:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59370) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZwvp-0006e6-GZ for emacs-devel@gnu.org; Wed, 27 Nov 2019 08:00:37 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZwvl-0001D8-Vc for emacs-devel@gnu.org; Wed, 27 Nov 2019 08:00:31 -0500 Original-Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:41743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZwvi-00018J-Mu for emacs-devel@gnu.org; Wed, 27 Nov 2019 08:00:28 -0500 Original-Received: by mail-wr1-x42b.google.com with SMTP id b18so26566247wrj.8 for ; Wed, 27 Nov 2019 05:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=LkMoBp4ptPlVGdCIT6EWi7F6aL8NVQbFUbyJV2Wgmsk=; b=tSubu24NIravG7tOMM6B4wmSJ29sXPoCnkrMUmXZPSYz6lqVzZUep82UoCtATVbg9E py6DB1z3MZZy8RNRCVO4x00QivNNZyovT46Myl5MtC8s8X2+4YEsC6958hmlQlhaxiCQ PlhxZkdYid0Ohkpixr2ewUL6YvWDZ74j8jBytXBAV7bGp9BGxPKHUKVdGKYiv+GTgY9I 3jYheYX7sAIZhA3fEvafO2FUXsLs1vX1IXms7+N1m+OfhIpJ19Ea8wl9p2eSlvX9Lawo yWPqX25pzzd98KkGfJwiMj2HwSKlO5Ji1GAQ9c8ebinyagHLMyyc+LL83gLV0PcNDSMl YhaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=LkMoBp4ptPlVGdCIT6EWi7F6aL8NVQbFUbyJV2Wgmsk=; b=XgJoahX04KO+/A0YVKgp0Gx6iCJvR+ijk5+Qn0yybWyW4hQm7i5bNvBw3hEeh99Dbq ozLQz3TeuXVgqTsOsFHaV5//Unt22QOGWE3LH/yDGGzbPewKr9EcOhvB42exCxJ1HHoU OFJi+eU3dQknTy/B0CynjoHPAuZsRYWYL1g/TSRdf0ftcpAdcnV0hW49HX4KSCCuIhUL 22dpkybzQeuoe9iQpDg5uPGLRretIvGQb92QO0tF/vP3NM0Wag3crKBvu4DitpOC9XUm EFYwrlK8Hkh0ge5Roloh6GrHuZpiOlNjxwPxhiMhpulMPqd+jeTzrR77r6GPvjw8DbyF 98ug== X-Gm-Message-State: APjAAAXaTsx38hP+LJKausXqFE11I8XHfEjOneMK+Uw3teRjrJhCFn2O KY1OaB93S5N9v4I9HP33VtShMhnK X-Google-Smtp-Source: APXvYqy6C0DpBKgBw1VyKJ+KKGCOn8YaRS4bhNVJ0co0P5KwSeBmwpRk71iDzCupHQZ2k5dx/2CREg== X-Received: by 2002:adf:e310:: with SMTP id b16mr34751688wrj.202.1574859618582; Wed, 27 Nov 2019 05:00:18 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:6dee:4697:b3c4:4ce5]) by smtp.gmail.com with ESMTPSA id d14sm6043789wru.9.2019.11.27.05.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 05:00:17 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <7fa939cb-0af6-0450-6e9f-619f404b6a87@web.de> (Tobias Bading's message of "Wed, 27 Nov 2019 13:29:32 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:242785 Archived-At: >>>>> On Wed, 27 Nov 2019 13:29:32 +0100, Tobias Bading sa= id: >> Yes, if you have scaling in GTK the number of pixels as seen by GTK = is >> scaled up or down. Unfortunately too much code in Emacs still works = in >> device pixels. Who will rid us of this turbulent mix of X and GTK? Tobias> I'm trying to fix the mix.;-) Tobias> About to test whether two "req.height *=3D xg_get_scale (f);" i= n gtkutil.c Tobias> improve things. Tobias> (frame-monitor-workarea) is incorrect on my machine, too. Top i= s half of Tobias> what it should be. Hmm, that=CA=BCs already a sign of things going wrong. Fx_display_monitor_attributes_list does this: /* GTK returns scaled sizes for the workareas. */ #if GTK_CHECK_VERSION (3, 22, 0) scale =3D gdk_monitor_get_scale_factor (monitor); #elif defined HAVE_GTK3 scale =3D gdk_screen_get_monitor_scale_factor (gscreen, i); #endif rec.width *=3D scale; rec.height *=3D scale; work.width *=3D scale; work.height *=3D scale; Which should give you the right width and height, or the wrong width and height, but not only one being wrong, unless gdk_monitor_get_workarea is returning the wrong values. >> BTW, which distribution and desktop environment is this? Ubuntu xx >> with Gnome? Tobias> Ubuntu MATE Eoan. That=CA=BCs pretty recent, so your gtk version is greater than 3.22, right? Robert