emacs-devel
[Top][All Lists]
Advanced

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

Re: The rabbit hole that is HiDPI... (empty menus / bug#31223 et al)


From: Robert Pluim
Subject: Re: The rabbit hole that is HiDPI... (empty menus / bug#31223 et al)
Date: Wed, 27 Nov 2019 14:00:16 +0100

>>>>> On Wed, 27 Nov 2019 13:29:32 +0100, Tobias Bading <address@hidden> 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



reply via email to

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