unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Bading <tbading@web.de>
To: Robert Pluim <rpluim@gmail.com>
Cc: 31223@debbugs.gnu.org
Subject: bug#31223: [PATCH] Fix empty/incorrect GTK menus on HiDPI monitors with window scaling factor > 1
Date: Thu, 28 Nov 2019 10:32:39 +0100	[thread overview]
Message-ID: <3d8e4309-c7df-c70a-a47c-36422d6c6ded@web.de> (raw)
In-Reply-To: <m24kyoif8s.fsf@gmail.com>

On 28.11.19 09:20, Robert Pluim wrote:
 >>>>>> On Wed, 27 Nov 2019 17:03:32 +0100, Tobias Bading
<tbading@web.de> said:
 >
 >     Tobias> This should fix Bug#31223, Bug#28106, Bug#23672 as well
as Ubuntu bug
 >     Tobias>
https://bugs.launchpad.net/ubuntu/+source/emacs25/+bug/1695228
 >
 > If those are all the same bug we should merge them.

Noam Postavsky already did that over a year ago, although I have no idea
what
"merging" means in this bug tracker. The new comments don't appear in the
merged reports and there's no indication as to which report became kind
of the
leading one after the merged. I simply chose 31223 because that's the
one Noam
sent his "merge 23672 28106 31223" command to, if I'm reading it right.

 > Yes. You need this as well, I think:
 >
 > diff --git a/src/gtkutil.c b/src/gtkutil.c
 > index cf5c31aa20..4f8b06941b 100644
 > --- a/src/gtkutil.c
 > +++ b/src/gtkutil.c
 > @@ -3503,6 +3503,8 @@ xg_update_frame_menubar (struct frame *f)
 >    gtk_widget_show_all (x->menubar_widget);
 >    gtk_widget_get_preferred_size (x->menubar_widget, NULL, &req);
 >
 > +  req.height *= xg_get_scale (f);
 >    if (FRAME_MENUBAR_HEIGHT (f) != req.height)
 >      {
 >        FRAME_MENUBAR_HEIGHT (f) = req.height;

This change in xg_update_frame_menubar is already a part of my patch,
with the
only difference that I replaced the empty line. Or am I reading this hunk
wrong?

 >     Tobias> diff --git a/src/xfns.c b/src/xfns.c
 >     Tobias> index b1b40702c2..47aa19607f 100644
 >     Tobias> --- a/src/xfns.c
 >     Tobias> +++ b/src/xfns.c
 >     Tobias> @@ -5093,6 +5093,8 @@ DEFUN
("x-display-monitor-attributes-list", Fx_display_monitor_attributes_list,
 >     Tobias>  #endif
 >     Tobias>        rec.width *= scale;
 >     Tobias>        rec.height *= scale;
 >     Tobias> +      work.x *= scale;
 >     Tobias> +      work.y *= scale;
 >     Tobias>        work.width *= scale;
 >     Tobias>        work.height *= scale;
 >
 > This seems correct as well. Probably rec.x and rec.y need scaling as
well, for
 > the multi-monitor case, which will require some cabling for me to test.

Good point. The documentation of gdk_monitor_get_geometry() says

"Retrieves the size and position of an individual monitor within the display
coordinate space. The returned geometry is in "application pixels", not in
"device pixels" (see gdk_monitor_get_scale_factor())."

Unfortunately, I don't have a second monitor at hand to test this.

Tobias






  reply	other threads:[~2019-11-28  9:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 11:40 bug#31223: 25.3; New menus are empty with GTK3 Thomas Schneider
     [not found] ` <handler.31223.B.15242361664927.ack@debbugs.gnu.org>
2018-05-01 16:16   ` Thomas Schneider
2018-05-01 16:48     ` Eli Zaretskii
2018-05-01 17:01       ` Thomas Schneider
2018-05-01 17:08         ` Eli Zaretskii
2018-05-01 17:20           ` Thomas Schneider
2018-05-01 18:43             ` Eli Zaretskii
2018-05-03  8:36               ` Thomas Schneider
2018-05-03 17:52                 ` Eli Zaretskii
2018-07-20 22:44         ` Noam Postavsky
2018-05-01 23:18 ` Noam Postavsky
2019-11-27 16:03 ` bug#31223: [PATCH] Fix empty/incorrect GTK menus on HiDPI monitors with window scaling factor > 1 Tobias Bading
2019-11-28  8:20   ` Robert Pluim
2019-11-28  9:32     ` Tobias Bading [this message]
2019-11-28  9:44       ` Robert Pluim
2019-12-02 10:35         ` Robert Pluim
2019-12-02 15:53           ` Eli Zaretskii
2019-12-03  8:22             ` Robert Pluim
2019-12-17 14:43               ` Robert Pluim
2020-01-07 16:15                 ` Robert Pluim
2020-01-07 16:22                   ` Eli Zaretskii
2020-01-07 16:31                     ` Robert Pluim
2019-11-28 12:04       ` Noam Postavsky

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=3d8e4309-c7df-c70a-a47c-36422d6c6ded@web.de \
    --to=tbading@web.de \
    --cc=31223@debbugs.gnu.org \
    --cc=rpluim@gmail.com \
    /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).