all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions
@ 2018-10-07 19:07 Kai Tetzlaff
  2020-11-26 13:09 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai Tetzlaff @ 2018-10-07 19:07 UTC (permalink / raw)
  To: 32977


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))





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions
  2018-10-07 19:07 bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions Kai Tetzlaff
@ 2020-11-26 13:09 ` Lars Ingebrigtsen
  2020-11-26 14:32   ` Robert Pluim
  2020-11-26 15:45   ` martin rudalics
  0 siblings, 2 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-26 13:09 UTC (permalink / raw)
  To: Kai Tetzlaff; +Cc: 32977

Kai Tetzlaff <kai.tetzlaff@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions
  2020-11-26 13:09 ` Lars Ingebrigtsen
@ 2020-11-26 14:32   ` Robert Pluim
  2020-11-26 15:45   ` martin rudalics
  1 sibling, 0 replies; 7+ messages in thread
From: Robert Pluim @ 2020-11-26 14:32 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Kai Tetzlaff, 32977

Lars Ingebrigtsen <larsi@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions
  2020-11-26 13:09 ` Lars Ingebrigtsen
  2020-11-26 14:32   ` Robert Pluim
@ 2020-11-26 15:45   ` martin rudalics
  2020-11-27  7:58     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 7+ messages in thread
From: martin rudalics @ 2020-11-26 15:45 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Kai Tetzlaff; +Cc: 32977

 > 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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions
  2020-11-26 15:45   ` martin rudalics
@ 2020-11-27  7:58     ` Lars Ingebrigtsen
  2020-11-27  9:35       ` martin rudalics
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-27  7:58 UTC (permalink / raw)
  To: martin rudalics; +Cc: Kai Tetzlaff, 32977

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions
  2020-11-27  7:58     ` Lars Ingebrigtsen
@ 2020-11-27  9:35       ` martin rudalics
  2020-11-29 10:11         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: martin rudalics @ 2020-11-27  9:35 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Kai Tetzlaff, 32977

 >> -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





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions
  2020-11-27  9:35       ` martin rudalics
@ 2020-11-29 10:11         ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-29 10:11 UTC (permalink / raw)
  To: martin rudalics; +Cc: Kai Tetzlaff, 32977

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-29 10:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-07 19:07 bug#32977: 26.1.50; Emacs (on gnome 3, wayland, debian buster) calculates incorrect horizontal positions Kai Tetzlaff
2020-11-26 13:09 ` Lars Ingebrigtsen
2020-11-26 14:32   ` Robert Pluim
2020-11-26 15:45   ` martin rudalics
2020-11-27  7:58     ` Lars Ingebrigtsen
2020-11-27  9:35       ` martin rudalics
2020-11-29 10:11         ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.