From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ola Nilsson Newsgroups: gmane.emacs.bugs Subject: bug#28605: 26.0.60; Part of leftmost character hidden Date: Tue, 3 Oct 2017 18:58:00 +0200 Message-ID: References: <59CB5D69.7040404@gmx.at> <59CE05F2.1010202@gmx.at> <59CE8E74.5010308@gmx.at> <59D35549.6030905@gmx.at> <87wp4c750c.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1134e8aad31447055aa7640f" X-Trace: blaine.gmane.org 1507049953 15872 195.159.176.226 (3 Oct 2017 16:59:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Oct 2017 16:59:13 +0000 (UTC) Cc: Lars Magne Ingebrigtsen , 28605@debbugs.gnu.org, Kaushal To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 03 18:59:09 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzQXD-0003US-9J for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 18:59:07 +0200 Original-Received: from localhost ([::1]:59533 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzQXK-0003Hi-PK for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Oct 2017 12:59:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzQXB-0003Gn-LF for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 12:59:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzQX8-0001t6-IX for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 12:59:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzQX8-0001t2-EQ for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 12:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzQX8-0000Ns-7u for bug-gnu-emacs@gnu.org; Tue, 03 Oct 2017 12:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ola Nilsson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Oct 2017 16:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28605 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28605-submit@debbugs.gnu.org id=B28605.15070498881406 (code B ref 28605); Tue, 03 Oct 2017 16:59:02 +0000 Original-Received: (at 28605) by debbugs.gnu.org; 3 Oct 2017 16:58:08 +0000 Original-Received: from localhost ([127.0.0.1]:46655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzQWG-0000Mc-0f for submit@debbugs.gnu.org; Tue, 03 Oct 2017 12:58:08 -0400 Original-Received: from mail-oi0-f42.google.com ([209.85.218.42]:45675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzQWE-0000M4-S8 for 28605@debbugs.gnu.org; Tue, 03 Oct 2017 12:58:07 -0400 Original-Received: by mail-oi0-f42.google.com with SMTP id f3so15394418oia.2 for <28605@debbugs.gnu.org>; Tue, 03 Oct 2017 09:58:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=f4u9CUeL1Mhp85Amw5WZpRdFnbu0NhCDqovIa7pZLW0=; b=sQAUbQ9uTTmTSkblbDAGGZqbdpKrnKk2BOS8Xr7d+Dv6Ml5ZIgbC4od3XyuQ9prLSi Hqwgrsr7yigAX7yudtfSKVqlNsZF7lIkvfpKS229kM6gm2BWKoxJN7sTcPOVNE7eh8/a WSR5yqgN+Hp8JtdJCglsn9KgfaKcIHE9IU191re7OFZzyFAOmtMErJG/RXtUS0QB3J+S uhI55dS3mJ0BCNIsy01oBIWjRq3yNJrr01Qo+PDPJAkeExJ6CmzT9xf2hOxaNECt3fwY mPXBPTQ4DA7zfUI9Z6S7SXbeoQgY9+UnlFUjovL0nAF2EB7+jrYM4SeN1OuuyR2hbHoj TMNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=f4u9CUeL1Mhp85Amw5WZpRdFnbu0NhCDqovIa7pZLW0=; b=Z/pvQr0jvk1/YrE/GPXTSL+ElIayv6mTUIMSvETHt5ea2KlQXWazDT1A4KmO5HVbQy cA8E0gDAgyVRvmCcsR/Rlu52Uqgu3T1cdRmcRHcC0TNLx666X81R66arUWDJyYZ6cv77 8MkBlEWwTYl0Ycy0EJaG9obhyUDhtljGtoriGsQ2ZvYs+JGHAOAKxktCmVEqurkpvnXW UB0AAz1bqsb8/A+EwvevCiBCVq0YzMBljNAhLX1ugL7Vxe1la1BjoHla6lg3Ut0znA7J gY+8lBLjZwJwAbOiCMUDSZn19gDUkIx8qeUELgAeAfhBos9nJd4x6JLXWvV4BkEPyNYe svRw== X-Gm-Message-State: AMCzsaXG90Hx7zyfE1jUKxVtiDBbrVqXTvWWeGHQqIiAxFC//UIah9rI 94SYwKpm/dpCPz08NI/9kZEDtFBaGBQJ17PzOeg= X-Google-Smtp-Source: AOwi7QATf4dWR62Kk2pZGCc7yuPMN5+fXqGVe2CyaD7lBi+y/xIyv2mCX9unV5iouBSh4F6QSf4NXt3Esh/uwy+37BU= X-Received: by 10.202.244.145 with SMTP id s139mr8221728oih.24.1507049881141; Tue, 03 Oct 2017 09:58:01 -0700 (PDT) Original-Received: by 10.168.167.136 with HTTP; Tue, 3 Oct 2017 09:58:00 -0700 (PDT) Original-Received: by 10.168.167.136 with HTTP; Tue, 3 Oct 2017 09:58:00 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:137848 Archived-At: --001a1134e8aad31447055aa7640f Content-Type: text/plain; charset="UTF-8" On Oct 3, 2017 17:49, "Ola Nilsson" wrote: On Tue, Oct 3, 2017 at 3:08 PM, Robert Pluim wrote: > Ola Nilsson writes: > >>> does your problem go away? If so, then it would be interesting how the >>> values returned by xg_get_scale differ with gtk_widget_get_scale_factor >>> and xg_get_gdk_scale called. >> >> Made no difference what I can see, except a lot of messages : >> >> (emacs:2302): Gtk-CRITICAL **: gtk_distribute_natural_allocation: >> assertion 'extra_space >= 0' failed > > Through inspection I noticed we're not adjusting the width of the > scrollbar for the scale. Does the following help? > > diff --git a/src/gtkutil.c b/src/gtkutil.c > index 0da7039..60ba627 100644 > --- a/src/gtkutil.c > +++ b/src/gtkutil.c > @@ -3879,6 +3879,7 @@ xg_update_scrollbar_pos (struct frame *f, > top /= scale; > left /= scale; > height /= scale; > + width /= scale; > left -= (scale - 1) * ((width / scale) >> 1); > > /* Clear out old position. */ This works for me: @@ -3883,7 +3883,7 @@ xg_update_scrollbar_pos (struct frame *f, top /= scale; left /= scale; height /= scale; - left -= (scale - 1) * ((width / scale) >> 1); + width /= scale; /* Clear out old position. */ int oldx = -1, oldy = -1, oldw, oldh; I just realized that I never tested with scaling off. /Ola Nilsson --001a1134e8aad31447055aa7640f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Oct 3, 2017 17:49, "Ola Nilsson" <ola.nilsson@gmail.com> wrote:
On Tue, Oct= 3, 2017 at 3:08 PM, Robert Pluim <r= pluim@gmail.com> wrote:
> Ola Nilsson <ola.nilsson@g= mail.com> writes:
>
>>> does your problem go away?=C2=A0 If so, then it would be inter= esting how the
>>> values returned by xg_get_scale differ with gtk_widget_get_sca= le_factor
>>> and xg_get_gdk_scale called.
>>
>> Made no difference what I can see, except a lot of messages :
>>
>> (emacs:2302): Gtk-CRITICAL **: gtk_distribute_natural_allocat= ion:
>> assertion 'extra_space >=3D 0' failed
>
> Through inspection I noticed we're not adjusting the width of the<= br> > scrollbar for the scale. Does the following help?
>
> diff --git a/src/gtkutil.c b/src/gtkutil.c
> index 0da7039..60ba627 100644
> --- a/src/gtkutil.c
> +++ b/src/gtkutil.c
> @@ -3879,6 +3879,7 @@ xg_update_scrollbar_pos (struct frame *f,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 top /=3D scale;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 left /=3D scale;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 height /=3D scale;
> +=C2=A0 =C2=A0 =C2=A0 width /=3D scale;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 left -=3D (scale - 1) * ((width / scale) &g= t;> 1);
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Clear out old position.=C2=A0 */

This works for me:

@@ -3883,7 +3883,7 @@ xg_update_scrollbar_pos (struct frame *f,
=C2=A0 =C2=A0 =C2=A0 =C2=A0top /=3D scale;
=C2=A0 =C2=A0 =C2=A0 =C2=A0left /=3D scale;
=C2=A0 =C2=A0 =C2=A0 =C2=A0height /=3D scale;
-=C2=A0 =C2=A0 =C2=A0 left -=3D (scale - 1) * ((width / scale) >&g= t; 1);
+=C2=A0 =C2=A0 =C2=A0 width /=3D scale;

=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Clear out old position.=C2=A0 */
=C2=A0 =C2=A0 =C2=A0 =C2=A0int oldx =3D -1, oldy =3D -1, oldw, oldh;<= br>

I just realized that I never tested with scaling off.=C2=A0

/Ola Nilsson=C2=A0
<= div dir=3D"auto">

--001a1134e8aad31447055aa7640f--