unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Yuuki Harano <masm+emacs@masm11.me>
To: moonsolo@gmail.com
Cc: 52042@debbugs.gnu.org
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
Date: Thu, 02 Dec 2021 00:08:56 +0900 (JST)	[thread overview]
Message-ID: <20211202.000856.162232917581372790.masm@luna.pink.masm11.me> (raw)
In-Reply-To: <CAOR66h=Xd11E3fbCk7SWo7ckEVQ2Ne9PfgKgE7Pz695Tjx6fjQ@mail.gmail.com>


On Tue, 30 Nov 2021 11:10:37 -0500,
	Fred Fu <moonsolo@gmail.com> wrote:
> I don't think three monitors are needed. Two monitors, one scaled@2x
> and one @1x, should be enough to reproduce the issue.

Reproduced.
I have a TV, that can be connected to my note PC, and tried GNOME(Wayland).
The PC's monitor is 2x and the TV is 1x.
I moved a pgtk emacs frame from the TV to the PC's monitor, and it became
blurry.  When I resized it, it recovered.

> That said, I'd love to help debug this issue on my end, but I don't
> know what to start with. Any ideas?

I have a cairo_surface_t and draw on it.  And I copy it on gtk window
when gtk wants so.
I don't scale fonts explicitly.  Scaling is done implicitly by compositor,
gtk, and cairo.

My guess:
cairo_surface_t is bitmap.
On 1x, cairo_surface_t has non-scaled texts, and it is drawn on
gtk window as is.
When I move it to 2x, cairo_surface_t is drawn on gtk window
at double size.  It is blurry, because cairo_surface_it is bitmap.
When I resize it, I recreate cairo_surface_t of logical size.
When that, cairo_surface_t is double size implicitly.
cairo_surface_t has 2x scaled texts.  It is not blurry, because
fonts are vector graphics.
It is drawn on gtk window as is.

Maybe, I need to recreate cairo_surface_t when monitor
is changed.  I looked for such a signal but nothing found.

-- 
Yuuki Harano





  reply	other threads:[~2021-12-01 15:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAOR66hntRyn0hZA_-vMhN=kGhw7x=dOxbfGJYQp-CBzX_b__mw@mail.gmail.com>
2021-11-30 15:59 ` bug#52042: 29.0.50; [feature/pgtk] issue in moving a fullscreen emacs frame from a scale@1x display to a scale@2x display Yuuki Harano
2021-11-30 16:10   ` Fred Fu
2021-12-01 15:08     ` Yuuki Harano [this message]
2021-12-01 15:20       ` Fred Fu
2021-12-01 15:47         ` Yuuki Harano
2021-12-04  7:41         ` Yuuki Harano
2021-12-02 22:09       ` Alan Third
2021-12-02 22:12         ` Alan Third

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=20211202.000856.162232917581372790.masm@luna.pink.masm11.me \
    --to=masm+emacs@masm11.me \
    --cc=52042@debbugs.gnu.org \
    --cc=moonsolo@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).