all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
To: "N. Jackson" <nljlistbox2@gmail.com>
Cc: "20182@debbugs.gnu.org" <20182@debbugs.gnu.org>
Subject: bug#20182: 24.4.91; [GTK3] Vertical scroll bar is "indented" from right edge of frame
Date: Tue, 24 Mar 2015 22:38:13 +0100	[thread overview]
Message-ID: <54B90A62-61CB-42DA-9E08-69D80D0C83CB@swipnet.se> (raw)
In-Reply-To: <87619qnn8s.fsf@moondust.localdomain>

Hi.

> 24 mar 2015 kl. 21:39 skrev N. Jackson <nljlistbox2@gmail.com>:
> 
> At 13:16 -0300 on Tuesday 2015-03-24, Jan D. wrote:
> 
>>>> 24 mar 2015 kl. 11:51 skrev martin rudalics <rudalics@gmx.at>:
>>>> 
>>>> 16 was the hardcoded width for Gtk2.
>>> 
>>> Does that mean gtk_widget_style_get is broken for Gtk2?
>> 
>> It means that the width it returns is 16.
>> 
>>> 
>>>> You can #ifdef it.
>>> 
>>> Like
>>> 
>>> #if (! GTK_CHECK_VERSION (3, 0, 0)
>>> if (w < 16) w = 16;
>>> #endif
>>> 
>> 
>> Yes, or 
>> #ifndef HAVE_GTK3
>> ...
>> 
>>    Jan D.
> 
> Of course, if gtk_widget_style_get() only returns 16 when the GDK
> version is not GDK3, then this line
> 
>    if (w < 16) w = 16;
> 
> in update_theme_scrollbar_width() of gtkutil.c does nothing when the
> GDK version is not GDK3.
> 
> Since we don't need this adjustment with GDK3 (with which
> gtk_widget_style_get() returns the correct value from the toolkit), I
> replaced the offending line with
> 
>    #ifndef HAVE_GTK3
>        /*  if (w < 16) w = 16; */
>        eassert (w == 16); 
>    #endif 
> 
> and this seems to fix the bug for me. (Of course, removing the offending
> line altogether has the same effect.)

You have added an assert that is dependent on how non-Emacs code behaves. That is wrong in all possible ways.

> 
> I don't have a GTK2 system to test on, though.

If you are adding asserts, you should be sure that all Gtk+ 2 versions behaves like this, which includes all patched versions that are used by distributions. 

       Jan D. 
> 
> Note: The badness is somehow encoded in my desktop file as well, so to
> see that the fix was working I had to rename my desktop file or run with
> emacs --no-desktop.
> 





  parent reply	other threads:[~2015-03-24 21:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 18:58 bug#20182: 24.4.91; [GTK3] Vertical scroll bar is "indented" from right edge of frame N. Jackson
2015-03-23 19:54 ` martin rudalics
2015-03-23 21:26   ` N. Jackson
2015-03-23 21:48     ` martin rudalics
2015-03-24  6:02       ` Jan D.
2015-03-24 10:51         ` martin rudalics
2015-03-24 16:16           ` Jan D.
2015-03-24 20:39             ` N. Jackson
2015-03-24 21:06               ` N. Jackson
2015-03-24 21:38               ` Jan D. [this message]
2015-03-24 23:20                 ` N. Jackson
2015-03-25  6:05                   ` Jan D.
2015-03-25 10:25             ` martin rudalics
2015-07-06 11:08               ` martin rudalics

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B90A62-61CB-42DA-9E08-69D80D0C83CB@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --cc=20182@debbugs.gnu.org \
    --cc=nljlistbox2@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 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.