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 12:30:27 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="205262"; 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 12:31:01 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 1iZvXA-000rGw-Qa for ged-emacs-devel@m.gmane.org; Wed, 27 Nov 2019 12:31:00 +0100 Original-Received: from localhost ([::1]:37192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZvX9-0000kD-Ij for ged-emacs-devel@m.gmane.org; Wed, 27 Nov 2019 06:30:59 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42445) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZvWi-0000k3-GT for emacs-devel@gnu.org; Wed, 27 Nov 2019 06:30:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZvWh-0004gc-Ag for emacs-devel@gnu.org; Wed, 27 Nov 2019 06:30:32 -0500 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:39581) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iZvWh-0004ei-4j for emacs-devel@gnu.org; Wed, 27 Nov 2019 06:30:31 -0500 Original-Received: by mail-wr1-x434.google.com with SMTP id y11so23137951wrt.6 for ; Wed, 27 Nov 2019 03:30:30 -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; bh=rOj5QaMUz1xRE5RyqlS99xg58ijTlwAPxKfqv0+Af9Q=; b=n+YapOegyIy62ZlttuJeoTruZiCdyrWgIqiopw2FhlfQmnj51n8eedctNGldmIrk96 N4BybXoNVUF+I6LCrmbrj27g0TYd/ujfP0STDxeeB073Qi2YVlkkwx/cHi53FFIA8kxB dAblLfVZWCbggi8tiM3wCxVK0eZ4FdmgKjq3fHg2olLk++7xrLwYc2lO9M9WJHMNmvm3 QuBTcLCJX/Ax5au6YqSxInkQVG02YMzR2uJfI5DD/7S/LRiPGzMcgssg20S7f5SRhlF0 b3lPM9pZ+A+op151sjlfDSiRmk0tUWUfP7kHbEH++8n55oUjisVuXWo5XqDW1aDw8FKX Fxxw== 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; bh=rOj5QaMUz1xRE5RyqlS99xg58ijTlwAPxKfqv0+Af9Q=; b=kmMQEXvxiaO5p9iji9XfY/OvpNBTRyehMMM3jN6cBpnb4jmlQMxU6BeILF6kMyIPmG YSVG52/2CotmIsi0TQrMxhjsffeoi9oBmY/CLxmv0PumFNWIpQ5tHHjigzRLd2Gf2ij+ DiQneJNQwb+k1W6hzBsm4ouAtPb5rA4dgxF4+7K3aSwKf9tUc+jBwi1ZSOvtCA8PPOx8 w4T1Ng2mG6DI2pZGz4U8wEhIPhrkmZOXbDhrsPP6fcdC3aAganidXNbMoXbYt8t/Uuo3 Pz8ZW2hRVnEjegiY82rDdJQFonkph75Ofxc7w5UHqv8g2SPWLGYAZOGz+42/PLFhPHQO xaAQ== X-Gm-Message-State: APjAAAVcql5Sn2JZnQJkEs7cGCVIETE7oE1RrulrGPLvt0JhkXyFoMvC 5Yoifu0xLg2zRZrV4psotrLAljm5UBI= X-Google-Smtp-Source: APXvYqx9SQwZ0sbuA8yrRDuYYY/IiV0QmdYKGOMns43uDHg5WqCM/f/yqXA5ngCNc3eOgwSr2A/B6g== X-Received: by 2002:a5d:4445:: with SMTP id x5mr43906936wrr.341.1574854229412; Wed, 27 Nov 2019 03:30:29 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:6dee:4697:b3c4:4ce5]) by smtp.gmail.com with ESMTPSA id 205sm9080336wmb.3.2019.11.27.03.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Nov 2019 03:30:28 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: (Tobias Bading's message of "Tue, 26 Nov 2019 20:13:21 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 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:242782 Archived-At: >>>>> On Tue, 26 Nov 2019 20:13:21 +0100, Tobias Bading said: Tobias> But seriously... what would be the proper way to deal with HiDPI in Tobias> Emacs? Has anyone done any work on this? xg_get_scale(). And yes, which is why my hair is turning grey. Tobias> I don't have much experience with GTK or HiDPI solutions on GNU/Linux in Tobias> general. From what I've debugged so far it seems that GTK works similar Tobias> to CSS, with some form of abstract pixels, which are mapped to 2x2 Tobias> device pixels in my case. Since the low-level X11 APIs and events still Tobias> seem to use actual device pixels, would it make sense to look for the Tobias> source of the halved values returned by FRAME_MENUBAR_HEIGHT(f) et al Tobias> and multiply these by two in my case? 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? BTW, which distribution and desktop environment is this? Ubuntu xx with Gnome? Robert PS. You might have more luck with emacs-27 and 'configure --with-cairo'