GNU bug report logs - #32977
26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions

Previous Next

Package: emacs;

Reported by: Kai Tetzlaff <kai.tetzlaff <at> web.de>

Date: Sun, 7 Oct 2018 19:09:02 UTC

Severity: normal

Found in version 26.1.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32977 in the body.
You can then email your comments to 32977 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32977; Package emacs. (Sun, 07 Oct 2018 19:09:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kai Tetzlaff <kai.tetzlaff <at> web.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 07 Oct 2018 19:09:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kai Tetzlaff <kai.tetzlaff <at> web.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1.50;
 Emacs (on gnome 3, wayland, debian buster) calculates incorrect
 horizontal positions
Date: Sun, 07 Oct 2018 21:07:20 +0200
The following happens within Gnome 3 (3.30, but also earlier versions),
Wayland on Debian Buster on a Laptop with HiDPI display with fractional
scaling factor set to 1.5.

Position frame at the left border of the display, evaluate:

    (frame-parameter (selected-frame) 'left)
    ;; -10

or

    (car (frame-position (selected-frame)))
    ;; '(+ -10)

The horizontal frame position should be 0, instead it gets reported as
-10 (indicating that part of the frame is invisible - which is not the
case). Even if the frame is positioned within the first 9 pixel
positions, the result is still negative.


In GNU Emacs 26.1.50 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-09-15 built on moka
Repository revision: 20ecc5266e1ffb1cff3e31475631b5c76b99e997
Windowing system distributor 'The X.Org Foundation', version 11.0.12001000
System Description:	Debian GNU/Linux testing (buster)

Recent messages:
Wrote /home/kail/.emacs.d/init/user/kai_tetzlaff.el
Mark set [8 times]
Auto-saving...
Mark set [2 times]
Quit
Mark set [6 times]
Auto-saving...done
Saving file /home/kail/.emacs.d/init/user/kai_tetzlaff.el...
Wrote /home/kail/.emacs.d/init/user/kai_tetzlaff.el
Computing completion candidates... [2 times]

Configured using:
 'configure --with-modules --with-xwidgets'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB
NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD LCMS2

Important settings:
  value of $LC_COLLATE: de_DE.UTF-8
  value of $LC_CTYPE: de_DE.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: de_DE.UTF-8
  value of $LC_NUMERIC: de_DE.UTF-8
  value of $LC_TIME: de_DE.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  icicle-mode: t
  minibuffer-depth-indicate-mode: t
  shell-dirtrack-mode: t
  recentf-mode: t
  pretty-control-l-mode: t
  diredp-highlight-autofiles-mode: t
  Info-breadcrumbs-in-mode-line-mode: t
  display-time-mode: t
  delete-selection-mode: t
  show-paren-mode: t
  global-auto-revert-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/kail/.emacs.d/elpa/pde-0.2.16/perlcritic hides /home/kail/.emacs.d/elpa/perlcritic-1.10/perlcritic
/home/kail/.emacs.d/lisp/yaml-mode hides /home/kail/.emacs.d/elpa/yaml-mode-0.0.13/yaml-mode
/home/kail/.emacs.d/lisp/adams/ls-lisp hides /usr/local/share/emacs/26.1.50/lisp/ls-lisp
/home/kail/.emacs.d/lisp/tempo hides /usr/local/share/emacs/26.1.50/lisp/tempo
/home/kail/.emacs.d/lisp/cc-mode/cc-guess hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-guess
/home/kail/.emacs.d/lisp/cc-mode/cc-bytecomp hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-bytecomp
/home/kail/.emacs.d/lisp/cc-mode/cc-engine hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-engine
/home/kail/.emacs.d/lisp/cc-mode/cc-fonts hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-fonts
/home/kail/.emacs.d/lisp/cc-mode/cc-cmds hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-cmds
/home/kail/.emacs.d/lisp/cc-mode/cc-langs hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-langs
/home/kail/.emacs.d/lisp/cc-mode/cc-mode hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-mode
/home/kail/.emacs.d/lisp/cc-mode/cc-styles hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-styles
/home/kail/.emacs.d/lisp/cc-mode/cc-vars hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-vars
/home/kail/.emacs.d/lisp/cc-mode/cc-align hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-align
/home/kail/.emacs.d/lisp/cc-mode/cc-menus hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-menus
/home/kail/.emacs.d/lisp/cc-mode/cc-defs hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-defs
/home/kail/.emacs.d/lisp/cc-mode/cc-awk hides /usr/local/share/emacs/26.1.50/lisp/progmodes/cc-awk

Features:
(shadow sort mailalias bbdb-com crm bbdb bbdb-site timezone mail-extr
emacsbug message rmc puny rfc822 mml mml-sec gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mail-utils cl-indent ibuf-ext ibuffer ibuffer-loaddefs time-stamp edebug
misearch multi-isearch vc-git diff-mode cl-print debug find-dired grep
compile eieio-opt speedbar sb-image ezimage dframe sh-script smie
executable face-remap rc-icicles two-column icicles icicles-mode
mb-depth+ mb-depth icicles-cmd2 icicles-cmd1 icicles-mcmd icicles-fn
icicles-var apropos-fn+var icicles-face icicles-opt ffap- ffap cus-theme
cus-edit cus-start cus-load hexrgb elec-pair kai_tetzlaff rc-misc
tramp-cache tramp-sh tramp tramp-compat tramp-loaddefs trampver
ucs-normalize shell pcomplete comint ansi-color ring parse-time recentf
tree-widget browse-kill-ring+ browse-kill-ring generic-x rc-cc-mode
gtags kt-tiny cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs generic replace+ isearch+ pp-c-l
buff-menu+ dired-sort-menu+ dired-sort-menu dired+ image-dired
image-mode format-spec image-file highlight bookmark+ bookmark+-key
bookmark+-1 font-lock+ bookmark+-bmu menu-bar+ apropos+ apropos
second-sel warnings misc-cmds help-fns+ wid-edit+ wid-edit help-fns
radix-tree help+ info+ bookmark+-lit pp+ bookmark pp dired-x dired-aux
dired dired-loaddefs finder+ finder find-func lisp-mnt window+
modeline-posn time files+ faces+ nuke-whitespace rc-markdown rc-ecb
rc-session rc-nxml rng-loc rng-uri rng-parse rng-match rng-dt rng-util
rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util rc-ediff rc-irfc
rc-filladapt filladapt rc-spelling rw-hunspell rw-ispell ispell rc-dired
rc-hs rc-template template rc-epa epa-file epa epg rc-mail rc-w3
rc-psprint rc-bookmark rc-bbdb rc-gnus rc-clojure delsel paren mic-paren
server autorevert filenotify frame-cmds advice strings misc-fns
thingatpt+ thingatpt frame-fns avoid fit-frame rc-ibuffer edmacro kmacro
rc-calendar rc-limits mm-util mail-prsvr zenburn-theme solarized-theme
solarized-definitions whiteboard-theme dichromacy-theme tango-theme
rc-gnutls gnutls rc-git cl-extra help-mode kt-tools use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core derived subr-x
rc-package finder-inf rw-hunspell-autoloads rw-ispell-autoloads info
package easymenu epg-config url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs eieio-loaddefs password-cache url-vars seq
byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads dbusbind
inotify lcms2 dynamic-setting system-font-setting font-render-setting
xwidget-internal move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 554725 49389)
 (symbols 48 47965 4)
 (miscs 40 175 1139)
 (strings 32 118287 4659)
 (string-bytes 1 4060436)
 (vectors 16 68163)
 (vector-slots 8 1102590 23108)
 (floats 8 221 695)
 (intervals 56 2006 944)
 (buffers 992 19))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32977; Package emacs. (Thu, 26 Nov 2020 13:10:01 GMT) Full text and rfc822 format available.

Message #8 received at 32977 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kai Tetzlaff <kai.tetzlaff <at> web.de>
Cc: 32977 <at> debbugs.gnu.org
Subject: Re: bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster)
 calculates incorrect horizontal positions
Date: Thu, 26 Nov 2020 14:09:43 +0100
Kai Tetzlaff <kai.tetzlaff <at> web.de> writes:

> The following happens within Gnome 3 (3.30, but also earlier versions),
> Wayland on Debian Buster on a Laptop with HiDPI display with fractional
> scaling factor set to 1.5.
>
> Position frame at the left border of the display, evaluate:
>
>     (frame-parameter (selected-frame) 'left)
>     ;; -10
>
> or
>
>     (car (frame-position (selected-frame)))
>     ;; '(+ -10)

(This bug report unfortunately got no response at the time.)

I can reproduce this bug in Emacs 28:

(set-frame-position (selected-frame) 0 0)
=> t
(frame-position (selected-frame))
=> (-10 . 66)

If I do this, I can clearly see that the frame isn't outside the screen
(i.e., I can see other windows between the Emacs frame and the border of
the screen):

(set-frame-position (selected-frame) 9 0)
=> t

But still:

(frame-position (selected-frame))
=> (-1 . 66)

This is a Debian bullseye system with Gnome Shell.

Anybody got an idea what's going on here?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32977; Package emacs. (Thu, 26 Nov 2020 14:33:01 GMT) Full text and rfc822 format available.

Message #11 received at 32977 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Kai Tetzlaff <kai.tetzlaff <at> web.de>, 32977 <at> debbugs.gnu.org
Subject: Re: bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster)
 calculates incorrect horizontal positions
Date: Thu, 26 Nov 2020 15:32:10 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> (This bug report unfortunately got no response at the time.)
>
> I can reproduce this bug in Emacs 28:
>
> (set-frame-position (selected-frame) 0 0)
> => t
> (frame-position (selected-frame))
> => (-10 . 66)
>
> If I do this, I can clearly see that the frame isn't outside the screen
> (i.e., I can see other windows between the Emacs frame and the border of
> the screen):
>
> (set-frame-position (selected-frame) 9 0)
> => t
>
> But still:
>
> (frame-position (selected-frame))
> => (-1 . 66)
>
> This is a Debian bullseye system with Gnome Shell.
>
> Anybody got an idea what's going on here?

This is under X, right? GTK/GDK's idea of window coordinates and
Emacs's idea sometimes disagree, especially when using Gnome Shell.

The answer is pure gtk, but in the pure gtk branch under Wayland,
frame-position will return (0 . 0) however the frame will not actually
move when you call set-frame-position.

pure gtk under X moves the frame, *and* returns (0 . 0), so I guess
this should be filed as a bug against the pure gtk branch.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32977; Package emacs. (Thu, 26 Nov 2020 15:46:01 GMT) Full text and rfc822 format available.

Message #14 received at 32977 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Kai Tetzlaff <kai.tetzlaff <at> web.de>
Cc: 32977 <at> debbugs.gnu.org
Subject: Re: bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster)
 calculates incorrect horizontal positions
Date: Thu, 26 Nov 2020 16:45:20 +0100
> I can reproduce this bug in Emacs 28:
>
> (set-frame-position (selected-frame) 0 0)
> => t
> (frame-position (selected-frame))
> => (-10 . 66)

-10 is the position of the WM border.  I tried to describe that in
Bug#40817.  The frame proper starts at 0.

> If I do this, I can clearly see that the frame isn't outside the screen
> (i.e., I can see other windows between the Emacs frame and the border of
> the screen):
>
> (set-frame-position (selected-frame) 9 0)
> => t
>
> But still:
>
> (frame-position (selected-frame))
> => (-1 . 66)
>
> This is a Debian bullseye system with Gnome Shell.
>
> Anybody got an idea what's going on here?

Mutter doesn't like us.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32977; Package emacs. (Fri, 27 Nov 2020 07:59:01 GMT) Full text and rfc822 format available.

Message #17 received at 32977 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Kai Tetzlaff <kai.tetzlaff <at> web.de>, 32977 <at> debbugs.gnu.org
Subject: Re: bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster)
 calculates incorrect horizontal positions
Date: Fri, 27 Nov 2020 08:58:37 +0100
martin rudalics <rudalics <at> gmx.at> writes:

> -10 is the position of the WM border.  I tried to describe that in
> Bug#40817.  The frame proper starts at 0.

I see.  Would it make sense to mention something about this in the
`frame-position' doc string.  I.e., that the value is (somewhat)
system-dependent?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32977; Package emacs. (Fri, 27 Nov 2020 09:36:02 GMT) Full text and rfc822 format available.

Message #20 received at 32977 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Kai Tetzlaff <kai.tetzlaff <at> web.de>, 32977 <at> debbugs.gnu.org
Subject: Re: bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster)
 calculates incorrect horizontal positions
Date: Fri, 27 Nov 2020 10:35:10 +0100
>> -10 is the position of the WM border.  I tried to describe that in
>> Bug#40817.  The frame proper starts at 0.
>
> I see.  Would it make sense to mention something about this in the
> `frame-position' doc string.  I.e., that the value is (somewhat)
> system-dependent?

So far, I haven't been able to find a suitable description of what these
WMs do or want to do.  Hence any recommendation (and that's what we
probably should provide in order to be of any assistance) would have to
be based on some sort of second guessing.  Maybe it's also an X issue
and using pgtk builds will improve things.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32977; Package emacs. (Sun, 29 Nov 2020 10:13:02 GMT) Full text and rfc822 format available.

Message #23 received at 32977 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Kai Tetzlaff <kai.tetzlaff <at> web.de>, 32977 <at> debbugs.gnu.org
Subject: Re: bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster)
 calculates incorrect horizontal positions
Date: Sun, 29 Nov 2020 11:11:56 +0100
martin rudalics <rudalics <at> gmx.at> writes:

>> I see.  Would it make sense to mention something about this in the
>> `frame-position' doc string.  I.e., that the value is (somewhat)
>> system-dependent?
>
> So far, I haven't been able to find a suitable description of what these
> WMs do or want to do.  Hence any recommendation (and that's what we
> probably should provide in order to be of any assistance) would have to
> be based on some sort of second guessing.  Maybe it's also an X issue
> and using pgtk builds will improve things.

I think just mentioning that there's a quirk here in the doc string is
helpful, so I've now done that in the `frame-position' doc string.

With that, I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 32977 <at> debbugs.gnu.org and Kai Tetzlaff <kai.tetzlaff <at> web.de> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 29 Nov 2020 10:13:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 27 Dec 2020 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 121 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.