emacs-devel
[Top][All Lists]
Advanced

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

Re: Child-frame can not move to proper position when run "env GDK_SCALE=


From: Dmitry Gutov
Subject: Re: Child-frame can not move to proper position when run "env GDK_SCALE=2 emacs"
Date: Wed, 10 Jan 2018 03:52:22 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Thunderbird/58.0

On 1/9/18 1:06 PM, Robert Pluim wrote:

Ugh. I don't think we should expose the scale values, we should fix
whatever the issue is with set-frame-position. Naively that's the
attached patch, but I worry about other places that assume unscaled
coordinates. I'll run with it for a while and see if any pop up.

This seems to fix the immediate issue (company-mode popup based on child frames is now positioned correctly on my HiDPI screen). Would be great to get this one into Emacs 26.

Longer term we need to implement your 'eliminate direct X calls' plan,
and have everything inside Emacs use GTK coordinates.

Robert

diff --git i/src/xterm.c w/src/xterm.c
index f771631daf..950e6231e0 100644
--- i/src/xterm.c
+++ w/src/xterm.c
@@ -10311,6 +10311,14 @@ x_set_offset (struct frame *f, register int xoff, 
register int yoff, int change_
  {
    int modified_top, modified_left;
+#ifdef USE_GTK
+  {
+    int scale = xg_get_scale(f);
+    xoff /= scale;
+    yoff /= scale;
+  }
+#endif
+
    if (change_gravity > 0)
      {
        f->top_pos = yoff;





reply via email to

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