Subject: bug#52042: 29.0.50; [feature/pgtk] issue in moving a fullscreen emacs frame from a scale@1x display to a scale@2x display

From: Fred Fu <[email-masked]>
Date: Mon, 22 Nov 2021 12:43:57 -0500

Hi,

Firstly, thanks for the hard work.

My DE is gnome 41. I have three monitors sitting in a row: the left
and middle runs at 3840 * 2160 with a scale factor of 2, the right
runs at 1920*1080 with a scale factor of 1.

When I move an *fullscreen* emacs frame from the right display to the
middle one,  the frame gets stretched over the two displays and the
text in the part of the frame on the middle display becomes blurry. I
have to move the frame again to the middle display to get the frame
back to normal.

This issue does not happen when I move a frame between the left and
middle display.  It neither happens when I use a non-pgtk build.

Here are the minimal steps to reproduce with emacs -Q:

1. move the frame to the right display (using super+shift+right)

2. make the emacs frame fullscreen (using super+up). See the attached
image file named "start".

3. move it to the middle display (using super+shift+left). The frame
gets stretched over the two displays. See the attached image file
named "stretched".

4. move it to the middle display again (using super+shift+left). The
frame now looks right on the middle display. See the attached image
file named "end".

In GNU Emacs 29.0.50 (build 5, x86_64-pc-linux-gnu, GTK+ Version
3.24.30, cairo version 1.16.0)
 of 2021-11-14 built on localhost.localdomain
Repository revision: f1a60225152af1f87d8580db0785cf5a0a9c7544
Repository branch: pgtk
Windowing system distributor 'System Description: openSUSE Tumbleweed

Configured using:
 'configure --with-native-compilation --prefix=/home/capfredf/.local/
 --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP
NOTIFY INOTIFY PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS XIM GTK3 ZLIB

Important settings:
  value of $LC_CTYPE: en_US.utf-8
  value of $LANG: en_US.utf-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-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
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media rmc puny
dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068
epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json map
text-property-search time-date seq gv subr-x byte-opt bytecomp
byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils help-mode cl-loaddefs cl-lib iso-transl
tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/pgtk-win pgtk-win term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer 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 emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit pgtk lcms2 multi-tty make-network-process
native-compile emacs)

Memory information:
((conses 16 79732 6491)
 (symbols 48 6800 0)
 (strings 32 20166 2340)
 (string-bytes 1 676176)
 (vectors 16 14281)
 (vector-slots 8 255752 11716)
 (floats 8 24 44)
 (intervals 56 482 0)
 (buffers 992 10))

-- 
Best regards
F