From: Robert Pluim <rpluim@gmail.com>
To: Tobias Bading <tbading@web.de>
Cc: emacs-devel@gnu.org
Subject: Re: The rabbit hole that is HiDPI... (empty menus / bug#31223 et al)
Date: Wed, 27 Nov 2019 14:00:16 +0100 [thread overview]
Message-ID: <m2y2w1iie7.fsf@gmail.com> (raw)
In-Reply-To: <7fa939cb-0af6-0450-6e9f-619f404b6a87@web.de> (Tobias Bading's message of "Wed, 27 Nov 2019 13:29:32 +0100")
>>>>> On Wed, 27 Nov 2019 13:29:32 +0100, Tobias Bading <tbading@web.de> said:
>> 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 *= xg_get_scale (f);" in gtkutil.c
Tobias> improve things.
Tobias> (frame-monitor-workarea) is incorrect on my machine, too. Top is half of
Tobias> what it should be.
Hmm, thatʼs 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 = gdk_monitor_get_scale_factor (monitor);
#elif defined HAVE_GTK3
scale = gdk_screen_get_monitor_scale_factor (gscreen, i);
#endif
rec.width *= scale;
rec.height *= scale;
work.width *= scale;
work.height *= 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ʼs pretty recent, so your gtk version is greater than 3.22, right?
Robert
next prev parent reply other threads:[~2019-11-27 13:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 19:13 The rabbit hole that is HiDPI... (empty menus / bug#31223 et al) Tobias Bading
2019-11-26 19:24 ` Tobias Bading
2019-11-27 11:06 ` Tobias Bading
2019-11-27 11:30 ` Robert Pluim
2019-11-27 12:29 ` Tobias Bading
2019-11-27 13:00 ` Robert Pluim [this message]
2019-11-27 13:41 ` Tobias Bading
2019-11-27 15:12 ` Robert Pluim
2019-11-27 16:41 ` Tobias Bading
2019-11-27 17:00 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2y2w1iie7.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=tbading@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).