From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fred Fu Newsgroups: gmane.emacs.bugs 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: Wed, 1 Dec 2021 10:20:41 -0500 Message-ID: References: <20211201.005929.360164672494884943.masm@luna.pink.masm11.me> <20211202.000856.162232917581372790.masm@luna.pink.masm11.me> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000433f7f05d21738fe" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13355"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52042@debbugs.gnu.org To: Yuuki Harano Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 01 16:28:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1msRWr-0003Hp-2Z for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Dec 2021 16:28:17 +0100 Original-Received: from localhost ([::1]:55020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1msRWp-000603-M4 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 01 Dec 2021 10:28:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:42096) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1msRQo-0004Qh-JV for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 10:22:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33558) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1msRQn-0003xl-O3 for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 10:22:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1msRQn-0004Du-K5 for bug-gnu-emacs@gnu.org; Wed, 01 Dec 2021 10:22:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Fred Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Dec 2021 15:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52042 X-GNU-PR-Package: emacs Original-Received: via spool by 52042-submit@debbugs.gnu.org id=B52042.163837206216110 (code B ref 52042); Wed, 01 Dec 2021 15:22:01 +0000 Original-Received: (at 52042) by debbugs.gnu.org; 1 Dec 2021 15:21:02 +0000 Original-Received: from localhost ([127.0.0.1]:45098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msRPp-0004BZ-Ju for submit@debbugs.gnu.org; Wed, 01 Dec 2021 10:21:01 -0500 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:43522) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1msRPn-0004B7-DP for 52042@debbugs.gnu.org; Wed, 01 Dec 2021 10:21:00 -0500 Original-Received: by mail-pl1-f172.google.com with SMTP id m24so17961595pls.10 for <52042@debbugs.gnu.org>; Wed, 01 Dec 2021 07:20:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xnMLiElx1qYAk/Ovv3LiyTRdCEmOO0TKyKPJZCVVAuU=; b=LeI2J04zeYcaqQ+Yp7/UIzbHQjD2L/oY/Dldx6XPwtFv7cnJuAV77eFmYYg/mpBdjv eEDHOjE0Y+oFrBDEUl7fA3kcI8atn4ew51fY6F3dTKlrvQ8vemnxpZJ8dj0YnnLD/0yh ofs8ikvCey8j3ERofHmOXdeHuG7KEjVsoI9axL2apcupfRHne5Hh1DFmx17B4CBIqFEw IvWkjlHVRd/fm3asyshyFE6vqQRmqvbwC5VhoERgBiZo3LUbiIp26j+thehxIh7CKJWC Evvo5lsBuGmy5v4DdreK4O61debPKuo5y8oSrwl+AXIaNhzNUAAvVO7NYWvWshCYHT+F gjfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xnMLiElx1qYAk/Ovv3LiyTRdCEmOO0TKyKPJZCVVAuU=; b=tAX+AITNj/+jSXyfz5rShidlsPBZpG9EhWlbT+ktL9H6ZQIBxVnQuZXvpU64qRK4b6 aUn7bOFd3I/sJskk42EpvtE4R/nzWYwcA3Bsq+3U+UFVZUY/LU/RjM+WBCuqJhqForT8 iwS5fmrY4cbujiBVkeoc3JxS0xbV2ZrtVpi+LQmKosJTdihJEQhn7Hgc1fD7LBL8bDn0 05eQokUQG8H2hobcr0p95cXDZF213hJj1JeAk4iu6b0JP30EK2kVU9H8h6+4kgt80X/0 vFy2eVNeoq9C0YU52ZW/xFwpw4AsgUmV7e7Wh6JtptAld0BVRGqL9PwHdS4ZGCwKnTKP gXHg== X-Gm-Message-State: AOAM532fDaZBsq+0VWqPEBPAL3vQqDdMUCXt4Wq4p5ws0iaQ8Ohf+Ifz Um/HAp/8WpzikQk57FjQ9lqnUYHhOBOpIQkN8Q5SkxsAzPY= X-Google-Smtp-Source: ABdhPJzKHl7llK1gHKblbLL6V/2spHh/LxXBPY+xfcoBuVI4UWbWymd4OJdhui9JJ2GfdJnR9hkPEZR8q707PZP75qY= X-Received: by 2002:a17:902:7fc3:b0:144:e29c:228d with SMTP id t3-20020a1709027fc300b00144e29c228dmr8395189plb.4.1638372053563; Wed, 01 Dec 2021 07:20:53 -0800 (PST) In-Reply-To: <20211202.000856.162232917581372790.masm@luna.pink.masm11.me> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:221206 Archived-At: --000000000000433f7f05d21738fe Content-Type: text/plain; charset="UTF-8" I have zero knowledge of GTK thus I have some dump questions: How do GTK applications handle this situation? Does each gnome app deal with their windows moving among displays of scale factors on their own? Or do they just delegate the dirty job to GTK or other lower-level mechanisms? On Wed, Dec 1, 2021, 10:09 AM Yuuki Harano wrote: > > On Tue, 30 Nov 2021 11:10:37 -0500, > Fred Fu 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 > --000000000000433f7f05d21738fe Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I have zero knowledge of= GTK thus I have some dump questions:

How do= GTK applications handle this situation?=C2=A0

Does each gnome app deal with their windows moving among displays of scal= e factors on their own?=C2=A0

Or do they just= delegate the dirty job to GTK or other lower-level mechanisms?
=
On Wed= , Dec 1, 2021, 10:09 AM Yuuki Harano <masm+emacs@masm11.me> wrote:

On Tue, 30 Nov 2021 11:10:37 -0500,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 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 beca= me
blurry.=C2=A0 When I resized it, it recovered.

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

I have a cairo_surface_t and draw on it.=C2=A0 And I copy it on gtk window<= br> when gtk wants so.
I don't scale fonts explicitly.=C2=A0 Scaling is done implicitly by com= positor,
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.=C2=A0 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.=C2=A0 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.=C2=A0 I looked for such a signal but nothing found.

--
Yuuki Harano
--000000000000433f7f05d21738fe--