GNU bug report logs - #32975
Emacs 26.1; GTK Warnings

Previous Next

Package: emacs;

Reported by: Tjernlund <tjernlund <at> tjernlund.se>

Date: Sun, 7 Oct 2018 18:33:02 UTC

Severity: normal

Tags: fixed

Fixed in version 26.2

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 32975 in the body.
You can then email your comments to 32975 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sun, 07 Oct 2018 18:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tjernlund <tjernlund <at> tjernlund.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 07 Oct 2018 18:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs 26.1; GTK Warnings
Date: Sun, 07 Oct 2018 20:19:26 +0200
Setting background-color like so(in my .emacs files):
(setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))

Prints these GTK warnings:
(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed

(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_override_background_color: assertion 'GTK_IS_WIDGET (widget)' failed

(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed

(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_override_background_color: assertion 'GTK_IS_WIDGET (widget)' failed

(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed

(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_override_background_color: assertion 'GTK_IS_WIDGET (widget)' failed

(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed

(emacs-26:9664): Gtk-CRITICAL **: gtk_widget_override_background_color: assertion 'GTK_IS_WIDGET (widget)' failed




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sun, 07 Oct 2018 19:05:02 GMT) Full text and rfc822 format available.

Message #8 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Sun, 07 Oct 2018 22:03:54 +0300
> From: Tjernlund <tjernlund <at> tjernlund.se>
> Date: Sun, 07 Oct 2018 20:19:26 +0200
> 
> Setting background-color like so(in my .emacs files):
> (setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
> 
> Prints these GTK warnings:
> (emacs-26:9664): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed

Please tell your GTK version (and preferably all the other
information collected by "M-x report-emacs-bug RET").

Thanks.

P.S. Do I understand correctly that these messages are emitted only
for that combination of colors?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Mon, 08 Oct 2018 05:28:01 GMT) Full text and rfc822 format available.

Message #11 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Mon, 08 Oct 2018 07:27:08 +0200
On Sun, 2018-10-07 at 22:03 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund <at> tjernlund.se>
> > Date: Sun, 07 Oct 2018 20:19:26 +0200
> > 
> > Setting background-color like so(in my .emacs files):
> > (setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
> > 
> > Prints these GTK warnings:
> > (emacs-26:9664): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed
> 
> Please tell your GTK version (and preferably all the other
> information collected by "M-x report-emacs-bug RET").
> 
> Thanks.
> 
> P.S. Do I understand correctly that these messages are emitted only
> for that combination of colors?

No, setting background-color to any value will cause the errors
gtk version 3.22.30

Here are some data from M-x report-emacs-bug RET:

Configured using:
 'configure --prefix=/usr --build=x86_64-pc-linux-gnu
 --host=x86_64-pc-linux-gnu --mandir=/usr/share/man
 --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc
 --localstatedir=/var/lib --disable-silent-rules
 --docdir=/usr/share/doc/emacs-26.1-r3
 --htmldir=/usr/share/doc/emacs-26.1-r3/html --libdir=/usr/lib64
 --program-suffix=-emacs-26 --infodir=/usr/share/info/emacs-26
 --localstatedir=/var
 --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp
 --without-compress-install --without-hesiod --without-pop
 --with-file-notification=inotify --enable-acl --with-dbus
 --without-modules --without-gameuser --with-gpm --without-kerberos
 --without-kerberos5 --with-lcms2 --without-xml2 --without-mailutils
 --without-selinux --with-gnutls --without-libsystemd --with-threads
 --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns
 --without-gconf --without-gsettings --without-toolkit-scroll-bars
 --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm
 --without-imagemagick --with-xft --without-cairo --without-libotf
 --without-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets 'CFLAGS=-O2
 -pipe -Wno-error -fno-stack-check' CPPFLAGS= 'LDFLAGS=-Wl,-O1
 -Wl,--as-needed''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS NOTIFY ACL GNUTLS FREETYPE XFT
ZLIB GTK3 X11 THREADS LCMS2

Important settings:
  value of $LANG: en_GB.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-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
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils elec-pair ecb edmacro kmacro
ecb-symboldef ecb-analyse ecb-compatibility ecb-winman-support
ecb-autogen autoload radix-tree lisp-mnt ecb-tod ecb-cycle ecb-eshell
ecb-help ecb-jde ecb-method-browser hideshow ecb-semantic-wrapper
ecb-semantic ecb-file-browser ecb-speedbar ecb-layout compile comint
ansi-color ecb-create-layout advice ecb-compilation ecb-common-browser
speedbar sb-image dframe ecb-navigate eieio-compat ecb-mode-line
ecb-face tree-buffer ecb-upgrade ecb-cedet-wrapper semantic/db-mode
semantic/db-find semantic/db-ref semantic/analyze semantic/sort
semantic/scope semantic/analyze/fcn semantic/db eieio-base cl-seq seq
semantic/format ezimage semantic/tag-ls semantic/find semantic/ctxt
semantic/util-modes semantic/util semantic semantic/tag semantic/lex
semantic/fw eieio byte-opt bytecomp byte-compile cconv eieio-core
cl-macs gv eieio-loaddefs mode-local find-func cedet wid-edit
cl-loaddefs cl-lib ecb-util ring thingatpt info easymenu site-gentoo
ecb-autoloads time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 161892 7932)
 (symbols 48 28117 1)
 (miscs 40 49 111)
 (strings 32 47991 1454)
 (string-bytes 1 1599166)
 (vectors 16 24484)
 (vector-slots 8 622015 7766)
 (floats 8 91 27)
 (intervals 56 331 0)
 (buffers 992 12))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Tue, 09 Oct 2018 15:12:01 GMT) Full text and rfc822 format available.

Message #14 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Tue, 09 Oct 2018 18:10:56 +0300
> From: Tjernlund <tjernlund <at> tjernlund.se>
> Cc: 32975 <at> debbugs.gnu.org
> Date: Mon, 08 Oct 2018 07:27:08 +0200
> 
> > P.S. Do I understand correctly that these messages are emitted only
> > for that combination of colors?
> 
> No, setting background-color to any value will cause the errors
> gtk version 3.22.30

Do the problems go away if you disable the scroll bars?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Tue, 09 Oct 2018 18:02:02 GMT) Full text and rfc822 format available.

Message #17 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Tue, 09 Oct 2018 20:01:12 +0200
On Tue, 2018-10-09 at 18:10 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund <at> tjernlund.se>
> > Cc: 32975 <at> debbugs.gnu.org
> > Date: Mon, 08 Oct 2018 07:27:08 +0200
> > 
> > > P.S. Do I understand correctly that these messages are emitted only
> > > for that combination of colors?
> > 
> > No, setting background-color to any value will cause the errors
> > gtk version 3.22.30
> 
> Do the problems go away if you disable the scroll bars?

The left side scroll bar? Don't know howto do that ..




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Tue, 09 Oct 2018 18:19:02 GMT) Full text and rfc822 format available.

Message #20 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Tue, 09 Oct 2018 21:18:21 +0300
> From: Tjernlund <tjernlund <at> tjernlund.se>
> Cc: 32975 <at> debbugs.gnu.org
> Date: Tue, 09 Oct 2018 20:01:12 +0200
> 
> On Tue, 2018-10-09 at 18:10 +0300, Eli Zaretskii wrote:
> > > From: Tjernlund <tjernlund <at> tjernlund.se>
> > > Cc: 32975 <at> debbugs.gnu.org
> > > Date: Mon, 08 Oct 2018 07:27:08 +0200
> > > 
> > > > P.S. Do I understand correctly that these messages are emitted only
> > > > for that combination of colors?
> > > 
> > > No, setting background-color to any value will cause the errors
> > > gtk version 3.22.30
> > 
> > Do the problems go away if you disable the scroll bars?
> 
> The left side scroll bar?

All of them.

> Don't know howto do that ..

"M-x scroll-bar-mode RET" should toggle display of vertical scroll
bars.  "M-x horizontal-scroll-bar-mode RET" should do the same with
horizontal scroll bars.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Tue, 09 Oct 2018 18:34:02 GMT) Full text and rfc822 format available.

Message #23 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Tue, 09 Oct 2018 20:33:45 +0200
On Tue, 2018-10-09 at 21:18 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund <at> tjernlund.se>
> > Cc: 32975 <at> debbugs.gnu.org
> > Date: Tue, 09 Oct 2018 20:01:12 +0200
> > 
> > On Tue, 2018-10-09 at 18:10 +0300, Eli Zaretskii wrote:
> > > > From: Tjernlund <tjernlund <at> tjernlund.se>
> > > > Cc: 32975 <at> debbugs.gnu.org
> > > > Date: Mon, 08 Oct 2018 07:27:08 +0200
> > > > 
> > > > > P.S. Do I understand correctly that these messages are emitted only
> > > > > for that combination of colors?
> > > > 
> > > > No, setting background-color to any value will cause the errors
> > > > gtk version 3.22.30
> > > 
> > > Do the problems go away if you disable the scroll bars?
> > 
> > The left side scroll bar?
> 
> All of them.
> 
> > Don't know howto do that ..
> 
> "M-x scroll-bar-mode RET" should toggle display of vertical scroll
> bars.  "M-x horizontal-scroll-bar-mode RET" should do the same with
> horizontal scroll bars.

They only happen one at startup, if if put in my .emacs:
   (scroll-bar-mode 0)
They are gone.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Tue, 09 Oct 2018 19:14:01 GMT) Full text and rfc822 format available.

Message #26 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>, Robert Pluim <rpluim <at> gmail.com>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Tue, 09 Oct 2018 22:13:40 +0300
> From: Tjernlund <tjernlund <at> tjernlund.se>
> Cc: 32975 <at> debbugs.gnu.org
> Date: Tue, 09 Oct 2018 20:33:45 +0200
> 
> > > > Do the problems go away if you disable the scroll bars?
> > > 
> > > The left side scroll bar?
> > 
> > All of them.
> > 
> > > Don't know howto do that ..
> > 
> > "M-x scroll-bar-mode RET" should toggle display of vertical scroll
> > bars.  "M-x horizontal-scroll-bar-mode RET" should do the same with
> > horizontal scroll bars.
> 
> They only happen one at startup, if if put in my .emacs:
>    (scroll-bar-mode 0)
> They are gone.

Great, then my guess was correct.  These warnings come from
xg_update_scrollbar_pos and from xg_finish_scroll_bar_creation.  Can
some GTK expert try to find out why the scroll-bar widget seems to be
reported as invalid)?  Robert, are you there?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Wed, 10 Oct 2018 08:05:02 GMT) Full text and rfc822 format available.

Message #29 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Wed, 10 Oct 2018 10:04:14 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Tjernlund <tjernlund <at> tjernlund.se>
>> Cc: 32975 <at> debbugs.gnu.org
>> Date: Tue, 09 Oct 2018 20:33:45 +0200
>> 
>> > > > Do the problems go away if you disable the scroll bars?
>> > > 
>> > > The left side scroll bar?
>> > 
>> > All of them.
>> > 
>> > > Don't know howto do that ..
>> > 
>> > "M-x scroll-bar-mode RET" should toggle display of vertical scroll
>> > bars.  "M-x horizontal-scroll-bar-mode RET" should do the same with
>> > horizontal scroll bars.
>> 
>> They only happen one at startup, if if put in my .emacs:
>>    (scroll-bar-mode 0)
>> They are gone.
>
> Great, then my guess was correct.  These warnings come from
> xg_update_scrollbar_pos and from xg_finish_scroll_bar_creation.  Can
> some GTK expert try to find out why the scroll-bar widget seems to be
> reported as invalid)?  Robert, are you there?

I can't reproduce this under Gnome or KDE, with the same GTK version.
Which window manager/desktop environment is being used here?

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Wed, 10 Oct 2018 08:48:01 GMT) Full text and rfc822 format available.

Message #32 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Robert Pluim <rpluim <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Wed, 10 Oct 2018 10:46:45 +0200
> I can't reproduce this under Gnome or KDE, with the same GTK version.
> Which window manager/desktop environment is being used here?

I don't have that GTK version installed to test here.  But note this
question of the OP:

> The left side scroll bar?

By default, GTK builds show scroll bars on the right so either he has
customized them already (which makes me wonder why he asked how to
turn off scroll bars) or other strange things are going on.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Wed, 10 Oct 2018 10:09:02 GMT) Full text and rfc822 format available.

Message #35 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, Eli Zaretskii <eliz <at> gnu.org>,
 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Wed, 10 Oct 2018 12:08:41 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>> I can't reproduce this under Gnome or KDE, with the same GTK version.
>> Which window manager/desktop environment is being used here?
>
> I don't have that GTK version installed to test here.  But note this
> question of the OP:
>
>> The left side scroll bar?
>
> By default, GTK builds show scroll bars on the right so either he has
> customized them already (which makes me wonder why he asked how to
> turn off scroll bars) or other strange things are going on.

Ah, the configure command has '--without-toolkit-scroll-bars', so the
error is even more mystifying.

I can't reproduce even with '--without-toolkit-scroll-bars'.

This is all under X11 though, perhaps the OP is using Wayland?

Cheers

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Wed, 10 Oct 2018 17:45:02 GMT) Full text and rfc822 format available.

Message #38 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Robert Pluim <rpluim <at> gmail.com>, martin rudalics <rudalics <at> gmx.at>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Wed, 10 Oct 2018 19:44:13 +0200
On Wed, 2018-10-10 at 12:08 +0200, Robert Pluim wrote:
> martin rudalics <rudalics <at> gmx.at> writes:
> 
> > > I can't reproduce this under Gnome or KDE, with the same GTK version.
> > > Which window manager/desktop environment is being used here?

This is under MATE

> > 
> > I don't have that GTK version installed to test here.  But note this
> > question of the OP:
> > 
> > > The left side scroll bar?
> > 
> > By default, GTK builds show scroll bars on the right so either he has
> > customized them already (which makes me wonder why he asked how to
> > turn off scroll bars) or other strange things are going on.

I have not, maybe Gentoo has ?

> 
> Ah, the configure command has '--without-toolkit-scroll-bars', so the
> error is even more mystifying.
> 
> I can't reproduce even with '--without-toolkit-scroll-bars'.
> 
> This is all under X11 though, perhaps the OP is using Wayland?

X11

I now did some more test and found that (require 'ecb) is also needed.

Here is my .emacs;

;(scroll-bar-mode 0)
(setq inhibit-splash-screen t)
(global-set-key "\C-cg" 'goto-line)
(require 'ecb)
;; Color settings.
(setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
(setq initial-frame-alist default-frame-alist)

(defun my-commit-mode()
(ispell-change-dictionary "en")
;; Flyspell commit msgs
(flyspell-mode)
;; Do not create svn-commit.tmp~ backup file
(set (make-local-variable 'backup-inhibited) t))

(setq auto-mode-alist (cons '("/svn-commit\\.tmp\\'" . my-commit-mode)
auto-mode-alist))

(setq auto-mode-alist (cons '("COMMIT_EDITMSG" . my-commit-mode)
auto-mode-alist))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 06:29:01 GMT) Full text and rfc822 format available.

Message #41 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: martin rudalics <rudalics <at> gmx.at>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 08:27:59 +0200
Tjernlund <tjernlund <at> tjernlund.se> writes:

> X11
>
> I now did some more test and found that (require 'ecb) is also needed.

With that I can reproduce it. '--without-toolkit-scroll-bars' is
required, which narrows down the potential source a lot.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 07:37:01 GMT) Full text and rfc822 format available.

Message #44 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: martin rudalics <rudalics <at> gmx.at>, Eli Zaretskii <eliz <at> gnu.org>,
 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 09:35:57 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

> Tjernlund <tjernlund <at> tjernlund.se> writes:
>
>> X11
>>
>> I now did some more test and found that (require 'ecb) is also needed.
>
> With that I can reproduce it. '--without-toolkit-scroll-bars' is
> required, which narrows down the potential source a lot.
>

So I donʼt think we should be calling GTK functions on scrollbars that
are not GTK widgets (Iʼm stunned we've never seen this before). This
fixes it for me. Martin?

diff --git a/src/xfns.c b/src/xfns.c
index 1381fee57e..4fad01a68e 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1085,12 +1085,13 @@ x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
       XSetWindowBackground (dpy, FRAME_X_WINDOW (f), bg);
       XSetForeground (dpy, x->cursor_gc, bg);
 
-#ifdef USE_GTK
+#ifdef USE_TOOLKIT_SCROLL_BARS
+# ifdef USE_GTK
       xg_set_background_color (f, bg);
-#endif
-
-#ifndef USE_TOOLKIT_SCROLL_BARS /* Turns out to be annoying with
-				   toolkit scroll bars.  */
+# endif
+#else
+/* Turns out to be annoying with toolkit scroll bars, so only set the
+   background for non-toolkit.  */
       {
 	Lisp_Object bar;
 	for (bar = FRAME_SCROLL_BARS (f);




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 08:25:01 GMT) Full text and rfc822 format available.

Message #47 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Robert Pluim <rpluim <at> gmail.com>, Tjernlund <tjernlund <at> tjernlund.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 10:24:06 +0200
> So I donʼt think we should be calling GTK functions on scrollbars that
> are not GTK widgets (Iʼm stunned we've never seen this before).

Setting the background color on a GTK build without GTK scroll bars
seems pretty rare to me.  In addition, one usually has to look at the
console to see the warnings.

> This
> fixes it for me. Martin?

Do we want to skip xg_set_widget_bg too?

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 08:34:01 GMT) Full text and rfc822 format available.

Message #50 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 10:33:24 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>> So I donʼt think we should be calling GTK functions on scrollbars that
>> are not GTK widgets (Iʼm stunned we've never seen this before).
>
> Setting the background color on a GTK build without GTK scroll bars
> seems pretty rare to me.  In addition, one usually has to look at the
> console to see the warnings.
>
>> This
>> fixes it for me. Martin?
>
> Do we want to skip xg_set_widget_bg too?

I can't see a code path where that would get called in the non-toolkit
case, but the code is a twisty maze of similar functions.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 08:59:02 GMT) Full text and rfc822 format available.

Message #53 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 10:58:44 +0200
>> Do we want to skip xg_set_widget_bg too?
>
> I can't see a code path where that would get called in the non-toolkit
> case, but the code is a twisty maze of similar functions.

Don't we want to fix toolkit (GTK) builds with non-toolkit scroll bars
here?  Or am I missing something?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 09:23:02 GMT) Full text and rfc822 format available.

Message #56 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 11:22:30 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>>> Do we want to skip xg_set_widget_bg too?
>>
>> I can't see a code path where that would get called in the non-toolkit
>> case, but the code is a twisty maze of similar functions.
>
> Don't we want to fix toolkit (GTK) builds with non-toolkit scroll bars
> here?  Or am I missing something?

We do, but I only see xg_set_widget_bg getting called on scrollbar
widgets when USE_TOOLKIT_SCROLL_BARS is set, in which case they're GTK
widgets, so thatʼs the right thing to do.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 09:34:01 GMT) Full text and rfc822 format available.

Message #59 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 11:32:56 +0200
> We do, but I only see xg_set_widget_bg getting called on scrollbar
> widgets when USE_TOOLKIT_SCROLL_BARS is set, in which case they're GTK
> widgets, so thatʼs the right thing to do.

I apologize for my stubbornness.

xg_set_background_color (struct frame *f, unsigned long bg)

has

      xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));

which IIUC does not work on scrollbar widgets.

martin





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 09:51:01 GMT) Full text and rfc822 format available.

Message #62 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 11:50:04 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>> We do, but I only see xg_set_widget_bg getting called on scrollbar
>> widgets when USE_TOOLKIT_SCROLL_BARS is set, in which case they're GTK
>> widgets, so thatʼs the right thing to do.
>
> I apologize for my stubbornness.
>

No apology needed

> xg_set_background_color (struct frame *f, unsigned long bg)
>
> has
>
>       xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));
>
> which IIUC does not work on scrollbar widgets.

There is only one call to xg_set_background_color, from xfns.c, which looks
like this with my patch applied:

#ifdef USE_TOOLKIT_SCROLL_BARS
# ifdef USE_GTK
      xg_set_background_color (f, bg);
# endif
#else

So it will only ever happen when the scrollbars are GTK widgets.

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 12:03:02 GMT) Full text and rfc822 format available.

Message #65 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 14:02:25 +0200
> There is only one call to xg_set_background_color, from xfns.c, which looks
> like this with my patch applied:
>
> #ifdef USE_TOOLKIT_SCROLL_BARS
> # ifdef USE_GTK
>        xg_set_background_color (f, bg);
> # endif
> #else
>
> So it will only ever happen when the scrollbars are GTK widgets.

But this effectively throws out the baby - painting the background of
the frame widget proper via

      xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));

with the bathwater - painting the background of non-existent scroll
bar widgets via

          xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f));

for GTK builds with native Emacs scroll bars.  Maybe on X the

      XSetWindowBackground (dpy, FRAME_X_WINDOW (f), bg);

in x_set_background_color would take care of that.  But are we sure?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 12:27:02 GMT) Full text and rfc822 format available.

Message #68 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 14:26:38 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>> There is only one call to xg_set_background_color, from xfns.c, which looks
>> like this with my patch applied:
>>
>> #ifdef USE_TOOLKIT_SCROLL_BARS
>> # ifdef USE_GTK
>>        xg_set_background_color (f, bg);
>> # endif
>> #else
>>
>> So it will only ever happen when the scrollbars are GTK widgets.
>
> But this effectively throws out the baby - painting the background of
> the frame widget proper via
>
>       xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));
>
> with the bathwater - painting the background of non-existent scroll
> bar widgets via
>
>           xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f));
>
> for GTK builds with native Emacs scroll bars.

Iʼm being particularly dense today: youʼre right. How about moving the
check for USE_TOOLKIT_SCROLL_BARS down into xg_set_background_color
like so (which I think was your original suggestion):

diff --git i/src/gtkutil.c w/src/gtkutil.c
index 6b72671da9..5879ab683e 100644
--- i/src/gtkutil.c
+++ w/src/gtkutil.c
@@ -1498,6 +1498,7 @@ xg_set_background_color (struct frame *f, unsigned long bg)
       block_input ();
       xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));
 
+#ifdef USE_TOOLKIT_SCROLL_BARS
       Lisp_Object bar;
       for (bar = FRAME_SCROLL_BARS (f);
            !NILP (bar);
@@ -1508,7 +1509,7 @@ xg_set_background_color (struct frame *f, unsigned long bg)
           GtkWidget *webox = gtk_widget_get_parent (scrollbar);
           xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f));
         }
-
+#endif
       unblock_input ();
     }
 }






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 13:52:01 GMT) Full text and rfc822 format available.

Message #71 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 15:51:23 +0200
> How about moving the
> check for USE_TOOLKIT_SCROLL_BARS down into xg_set_background_color
> like so (which I think was your original suggestion):

That's what I would do for Emacs 26.2.

Thanks, martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 13:59:02 GMT) Full text and rfc822 format available.

Message #74 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>, rudalics <at> gmx.at
Cc: tjernlund <at> tjernlund.se, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 16:58:30 +0300
> From: Robert Pluim <rpluim <at> gmail.com>
> Cc: 32975 <at> debbugs.gnu.org, martin rudalics <rudalics <at> gmx.at>,
> 	Eli Zaretskii <eliz <at> gnu.org>
> Date: Thu, 11 Oct 2018 09:35:57 +0200
> 
> So I donʼt think we should be calling GTK functions on scrollbars that
> are not GTK widgets

Sounds reasonable.

I think whatever the changes you eventually come up with, they should
be pushed to the emacs-26 branch.  Do you (both) agree?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 14:07:02 GMT) Full text and rfc822 format available.

Message #77 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 16:06:42 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>> How about moving the
>> check for USE_TOOLKIT_SCROLL_BARS down into xg_set_background_color
>> like so (which I think was your original suggestion):
>
> That's what I would do for Emacs 26.2.

Sure. Eli, is the following OK for you? Itʼs a pretty rare setup, so
master would probably be fine as well.

Robert

From 21e193c8211d21cd46c2ee90902ae627e837a62f Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Thu, 11 Oct 2018 16:02:51 +0200
Subject: [PATCH] Call GTK functions only on GTK scrollbars
To: emacs-devel <at> gnu.org

* src/gtkutil.c (xg_set_background_color) [USE_TOOLKIT_SCROLL_BARS]:
Don't call GTK functions on non-GTK scrollbars (Bug#32975).
---
 src/gtkutil.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 6b72671da9..5879ab683e 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1498,6 +1498,7 @@ xg_set_background_color (struct frame *f, unsigned long bg)
       block_input ();
       xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));
 
+#ifdef USE_TOOLKIT_SCROLL_BARS
       Lisp_Object bar;
       for (bar = FRAME_SCROLL_BARS (f);
            !NILP (bar);
@@ -1508,7 +1509,7 @@ xg_set_background_color (struct frame *f, unsigned long bg)
           GtkWidget *webox = gtk_widget_get_parent (scrollbar);
           xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f));
         }
-
+#endif
       unblock_input ();
     }
 }
-- 
2.19.0.271.gfe8321ec05





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 14:26:02 GMT) Full text and rfc822 format available.

Message #80 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: tjernlund <at> tjernlund.se, rudalics <at> gmx.at, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 17:25:34 +0300
> From: Robert Pluim <rpluim <at> gmail.com>
> Date: Thu, 11 Oct 2018 16:06:42 +0200
> Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
> 
> martin rudalics <rudalics <at> gmx.at> writes:
> 
> >> How about moving the
> >> check for USE_TOOLKIT_SCROLL_BARS down into xg_set_background_color
> >> like so (which I think was your original suggestion):
> >
> > That's what I would do for Emacs 26.2.
> 
> Sure. Eli, is the following OK for you?

Yes, thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 17:12:02 GMT) Full text and rfc822 format available.

Message #83 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Eli Zaretskii <eliz <at> gnu.org>, Robert Pluim <rpluim <at> gmail.com>
Cc: tjernlund <at> tjernlund.se, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 19:10:41 +0200
> I think whatever the changes you eventually come up with, they should
> be pushed to the emacs-26 branch.  Do you (both) agree?

Definitely.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 19:44:02 GMT) Full text and rfc822 format available.

Message #86 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Robert Pluim <rpluim <at> gmail.com>, martin rudalics <rudalics <at> gmx.at>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 21:43:31 +0200
On Thu, 2018-10-11 at 16:06 +0200, Robert Pluim wrote:
> martin rudalics <rudalics <at> gmx.at> writes:
> 
> > > How about moving the
> > > check for USE_TOOLKIT_SCROLL_BARS down into xg_set_background_color
> > > like so (which I think was your original suggestion):
> > 
> > That's what I would do for Emacs 26.2.
> 
> Sure. Eli, is the following OK for you? Itʼs a pretty rare setup, so
> master would probably be fine as well.

This patch works for me too.

Thanks guys
             Jocke

> 
> Robert
> 
> From 21e193c8211d21cd46c2ee90902ae627e837a62f Mon Sep 17 00:00:00 2001
> From: Robert Pluim <rpluim <at> gmail.com>
> Date: Thu, 11 Oct 2018 16:02:51 +0200
> Subject: [PATCH] Call GTK functions only on GTK scrollbars
> To: emacs-devel <at> gnu.org
> 
> * src/gtkutil.c (xg_set_background_color) [USE_TOOLKIT_SCROLL_BARS]:
> Don't call GTK functions on non-GTK scrollbars (Bug#32975).
> ---
>  src/gtkutil.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gtkutil.c b/src/gtkutil.c
> index 6b72671da9..5879ab683e 100644
> --- a/src/gtkutil.c
> +++ b/src/gtkutil.c
> @@ -1498,6 +1498,7 @@ xg_set_background_color (struct frame *f, unsigned long bg)
>        block_input ();
>        xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));
>  
> +#ifdef USE_TOOLKIT_SCROLL_BARS
>        Lisp_Object bar;
>        for (bar = FRAME_SCROLL_BARS (f);
>             !NILP (bar);
> @@ -1508,7 +1509,7 @@ xg_set_background_color (struct frame *f, unsigned long bg)
>            GtkWidget *webox = gtk_widget_get_parent (scrollbar);
>            xg_set_widget_bg (f, webox, FRAME_BACKGROUND_PIXEL (f));
>          }
> -
> +#endif
>        unblock_input ();
>      }
>  }




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 19:52:02 GMT) Full text and rfc822 format available.

Message #89 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Robert Pluim <rpluim <at> gmail.com>, martin rudalics <rudalics <at> gmx.at>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 21:51:54 +0200
On Thu, 2018-10-11 at 21:43 +0200, Tjernlund wrote:
> On Thu, 2018-10-11 at 16:06 +0200, Robert Pluim wrote:
> > martin rudalics <rudalics <at> gmx.at> writes:
> > 
> > > > How about moving the
> > > > check for USE_TOOLKIT_SCROLL_BARS down into xg_set_background_color
> > > > like so (which I think was your original suggestion):
> > > 
> > > That's what I would do for Emacs 26.2.
> > 
> > Sure. Eli, is the following OK for you? Itʼs a pretty rare setup, so
> > master would probably be fine as well.
> 
> This patch works for me too.
> 
> Thanks guys
>              Jocke

I just got to ask you guys something that bugs me, why do I have have both:
;; Color settings.
(setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
(setq initial-frame-alist default-frame-alist)

I think one of the should inherit the other.

 Jocke




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 21:05:02 GMT) Full text and rfc822 format available.

Message #92 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Tjernlund <tjernlund <at> tjernlund.se>, Robert Pluim <rpluim <at> gmail.com>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 23:04:14 +0200
> I just got to ask you guys something that bugs me, why do I have have both:
> ;; Color settings.
> (setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
> (setq initial-frame-alist default-frame-alist)
>
> I think one of the should inherit the other.

Throw away the second form.  It's redundant.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Thu, 11 Oct 2018 21:56:01 GMT) Full text and rfc822 format available.

Message #95 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: martin rudalics <rudalics <at> gmx.at>, Robert Pluim <rpluim <at> gmail.com>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Thu, 11 Oct 2018 23:54:58 +0200
On Thu, 2018-10-11 at 23:04 +0200, martin rudalics wrote:
>  > I just got to ask you guys something that bugs me, why do I have have both:
>  > ;; Color settings.
>  > (setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
>  > (setq initial-frame-alist default-frame-alist)
>  >
>  > I think one of the should inherit the other.
> 
> Throw away the second form.  It's redundant.
> 

But I cannot, the color settings will not work, just tried it to confirm.

 Jocke




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Fri, 12 Oct 2018 04:29:02 GMT) Full text and rfc822 format available.

Message #98 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: rudalics <at> gmx.at, rpluim <at> gmail.com, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Fri, 12 Oct 2018 07:28:38 +0300
> From: Tjernlund <tjernlund <at> tjernlund.se>
> Date: Thu, 11 Oct 2018 23:54:58 +0200
> Cc: 32975 <at> debbugs.gnu.org
> 
> On Thu, 2018-10-11 at 23:04 +0200, martin rudalics wrote:
> >  > I just got to ask you guys something that bugs me, why do I have have both:
> >  > ;; Color settings.
> >  > (setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
> >  > (setq initial-frame-alist default-frame-alist)
> >  >
> >  > I think one of the should inherit the other.
> > 
> > Throw away the second form.  It's redundant.
> > 
> 
> But I cannot, the color settings will not work, just tried it to confirm.

How do you start Emacs?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Fri, 12 Oct 2018 05:32:02 GMT) Full text and rfc822 format available.

Message #101 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rudalics <at> gmx.at, rpluim <at> gmail.com, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Fri, 12 Oct 2018 07:31:15 +0200
On Fri, 2018-10-12 at 07:28 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund <at> tjernlund.se>
> > Date: Thu, 11 Oct 2018 23:54:58 +0200
> > Cc: 32975 <at> debbugs.gnu.org
> > 
> > On Thu, 2018-10-11 at 23:04 +0200, martin rudalics wrote:
> > >  > I just got to ask you guys something that bugs me, why do I have have both:
> > >  > ;; Color settings.
> > >  > (setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color .
> > > "White")))
> > >  > (setq initial-frame-alist default-frame-alist)
> > >  >
> > >  > I think one of the should inherit the other.
> > > 
> > > Throw away the second form.  It's redundant.
> > > 
> > 
> > But I cannot, the color settings will not work, just tried it to confirm.
> 
> How do you start Emacs?

Usually from the terminal, no args other than file names.
Unless I have the new colors in both variables, it wont display the right colors.
Just try with my values. Either the first or the second Frame gets different colors.

 Jocke 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Fri, 12 Oct 2018 06:38:02 GMT) Full text and rfc822 format available.

Message #104 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: rudalics <at> gmx.at, rpluim <at> gmail.com, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Fri, 12 Oct 2018 09:36:58 +0300
> From: Tjernlund <tjernlund <at> tjernlund.se>
> Cc: rudalics <at> gmx.at, rpluim <at> gmail.com, 32975 <at> debbugs.gnu.org
> Date: Fri, 12 Oct 2018 07:31:15 +0200
> 
> > > >  > ;; Color settings.
> > > >  > (setq default-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color .
> > > > "White")))
> > > >  > (setq initial-frame-alist default-frame-alist)
> > > >  >
> > > >  > I think one of the should inherit the other.
> > > > 
> > > > Throw away the second form.  It's redundant.
> > > > 
> > > 
> > > But I cannot, the color settings will not work, just tried it to confirm.
> > 
> > How do you start Emacs?
> 
> Usually from the terminal, no args other than file names.

Any non-default command-line options?  Do you have something in your
~/.Xdefaults or in site-init file?  Anything else in your ~/.emacs or
other init files besides those two lines?

> Unless I have the new colors in both variables, it wont display the right colors.
> Just try with my values. Either the first or the second Frame gets different colors.

I just tried that, and I cannot reproduce what you describe.  The
first setting alone, for the default-frame-alist, is enough to set the
colors for the initial frame and all other frames I create.  As I
would expect, and as Martin said.  initial-frame-alist is only needed
if you want the initial frame to look different from all the rest.

So some other factor is at work here, most probably in your other
customizations.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Fri, 12 Oct 2018 08:45:02 GMT) Full text and rfc822 format available.

Message #107 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: martin rudalics <rudalics <at> gmx.at>
To: Tjernlund <tjernlund <at> tjernlund.se>, Robert Pluim <rpluim <at> gmail.com>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Fri, 12 Oct 2018 10:44:37 +0200
> But I cannot, the color settings will not work, just tried it to confirm.

They work here in a GTK build of master without toolkit scroll bars.

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sat, 13 Oct 2018 08:47:01 GMT) Full text and rfc822 format available.

Message #110 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tjernlund <at> tjernlund.se, 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Sat, 13 Oct 2018 10:46:33 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Robert Pluim <rpluim <at> gmail.com>
>> Date: Thu, 11 Oct 2018 16:06:42 +0200
>> Cc: Tjernlund <tjernlund <at> tjernlund.se>, 32975 <at> debbugs.gnu.org
>> 
>> martin rudalics <rudalics <at> gmx.at> writes:
>> 
>> >> How about moving the
>> >> check for USE_TOOLKIT_SCROLL_BARS down into xg_set_background_color
>> >> like so (which I think was your original suggestion):
>> >
>> > That's what I would do for Emacs 26.2.
>> 
>> Sure. Eli, is the following OK for you?
>
> Yes, thanks.

Pushed as 80e0bfa96da69e5d1484c5031f42b1b1742567db

Robert




Added tag(s) fixed. Request was from Robert Pluim <rpluim <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 13 Oct 2018 11:58:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 26.2, send any further explanations to 32975 <at> debbugs.gnu.org and Tjernlund <tjernlund <at> tjernlund.se> Request was from Robert Pluim <rpluim <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 13 Oct 2018 11:58:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sun, 14 Oct 2018 02:37:01 GMT) Full text and rfc822 format available.

Message #117 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Sun, 14 Oct 2018 05:36:54 +0300
[Please don't remove the bug address from the list of addressees.]

> From: Tjernlund <tjernlund <at> tjernlund.se>
> Date: Sat, 13 Oct 2018 17:26:40 +0200
> 
> > Any non-default command-line options?  Do you have something in your
> > ~/.Xdefaults or in site-init file?  Anything else in your ~/.emacs or
> > other init files besides those two lines?
> My .emacs:

That's a lot to consume.  Let's start from the other end: if you have
only this line in your .emacs:

  (setq initial-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))

does it then work as expected?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sun, 14 Oct 2018 14:58:02 GMT) Full text and rfc822 format available.

Message #120 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Sun, 14 Oct 2018 17:57:19 +0300
[PLEASE don't remove the bug address from the list of addressees.]

> From: Tjernlund <tjernlund <at> tjernlund.se>
> Date: Sun, 14 Oct 2018 10:31:46 +0200
> 
> > That's a lot to consume.  Let's start from the other end: if you have
> > only this line in your .emacs:
> > 
> >   (setq initial-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color . "White")))
> > 
> > does it then work as expected?
> 
> Did that and no, it does not work as expected.

And if you invoke Emacs with "emacs --no-x-resources"?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sun, 14 Oct 2018 15:23:01 GMT) Full text and rfc822 format available.

Message #123 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Sun, 14 Oct 2018 17:22:41 +0200
On Sun, 2018-10-14 at 17:57 +0300, Eli Zaretskii wrote:
> [PLEASE don't remove the bug address from the list of addressees.]
> 
> > From: Tjernlund <tjernlund <at> tjernlund.se>
> > Date: Sun, 14 Oct 2018 10:31:46 +0200
> > 
> > > That's a lot to consume.  Let's start from the other end: if you have
> > > only this line in your .emacs:
> > > 
> > >   (setq initial-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color .
> > > "White")))
> > > 
> > > does it then work as expected?
> > 
> > Did that and no, it does not work as expected.
> 
> And if you invoke Emacs with "emacs --no-x-resources"?

That works ! :)
I only need default-frame-alist settings then.

Seems like MATE tries to control every background color there is:

xrdb -query | grep background
*Box.background:	#edeceb
*Button.background:	#edeceb
*Canvas.background:	#edeceb
*Canvas.selectbackground:	#86abd9
*Checkbutton.background:	#edeceb
*Command.background:	#edeceb
*Dialog.background:	#edeceb
*Entry.background:	#edeceb
*Form.background:	#edeceb
*Frame.background:	#edeceb
*Label.background:	#edeceb
*Labelframe.background:	#edeceb
*List.background:	#edeceb
*Listbox.background:	#edeceb
*Menu.background:	#edeceb
*MenuButton.background:	#edeceb
*Menubutton.background:	#edeceb
*Radiobutton.background:	#edeceb
*Scale.background:	#edeceb
*Scrollbar*background:	#edeceb
*Scrollbar.background:	#edeceb
*SimpleMenu*background:	#edeceb
*Text.background:	#edeceb
*Toggle.background:	#edeceb
*Toplevel.background:	#edeceb
*XmCascadeButton.background:	#edeceb
*XmCascadeButtonGadget.background:	#edeceb
*XmDialogShell.background:	#edeceb
*XmFileSelectionBox.background:	#edeceb
*XmForm.background:	#edeceb
*XmFrame.background:	#edeceb
*XmLabel.background:	#edeceb
*XmLabelGadget.background:	#edeceb
*XmList.background:	#edeceb
*XmMenuShell.background:	#edeceb
*XmMessageBox.background:	#edeceb
*XmPanedWindow.background:	#edeceb
*XmPushButton.background:	#edeceb
*XmPushButtonGadget.background:	#edeceb
*XmRowColumn.background:	#edeceb
*XmSash.background:	#edeceb
*XmScrollBar.background:	#edeceb
*XmScrolledWindow.background:	#edeceb
*XmSelectionBox.background:	#edeceb
*XmSeparator.background:	#edeceb
*XmSeparatorGadget.background:	#edeceb
*XmTearOffButton.background:	#edeceb
*XmTearOffButtonGadget.background:	#edeceb
*XmText.background:	#edeceb
*XmTextField.background:	#edeceb
*XmToggleButton.background:	#edeceb
*XmToggleButtonGadget.background:	#edeceb
*background:	#edeceb
Emacs*Dialog*background:	#edeceb
Emacs*backgroundToolBarColor:	#edeceb
Emacs*menubar*background:	#edeceb




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sun, 14 Oct 2018 16:03:02 GMT) Full text and rfc822 format available.

Message #126 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Tjernlund <tjernlund <at> tjernlund.se>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Sun, 14 Oct 2018 19:02:29 +0300
> From: Tjernlund <tjernlund <at> tjernlund.se>
> Cc: 32975 <at> debbugs.gnu.org
> Date: Sun, 14 Oct 2018 17:22:41 +0200
> 
> > > >   (setq initial-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color .
> > > > "White")))
> > > > 
> > > > does it then work as expected?
> > > 
> > > Did that and no, it does not work as expected.
> > 
> > And if you invoke Emacs with "emacs --no-x-resources"?
> 
> That works ! :)
> I only need default-frame-alist settings then.

As expected.  X resources override .emacs, at least for the colors.

> Seems like MATE tries to control every background color there is:

Yes, looks like that.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32975; Package emacs. (Sun, 14 Oct 2018 20:01:02 GMT) Full text and rfc822 format available.

Message #129 received at 32975 <at> debbugs.gnu.org (full text, mbox):

From: Tjernlund <tjernlund <at> tjernlund.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32975 <at> debbugs.gnu.org
Subject: Re: bug#32975: Emacs 26.1; GTK Warnings
Date: Sun, 14 Oct 2018 22:00:41 +0200
On Sun, 2018-10-14 at 19:02 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund <at> tjernlund.se>
> > Cc: 32975 <at> debbugs.gnu.org
> > Date: Sun, 14 Oct 2018 17:22:41 +0200
> > 
> > > > >   (setq initial-frame-alist '((background-color . "#333333") (foreground-color . "White") (cursor-color .
> > > > > "White")))
> > > > > 
> > > > > does it then work as expected?
> > > > 
> > > > Did that and no, it does not work as expected.
> > > 
> > > And if you invoke Emacs with "emacs --no-x-resources"?
> > 
> > That works ! :)
> > I only need default-frame-alist settings then.
> 
> As expected.  X resources override .emacs, at least for the colors.

Not quite to me in this case. I would expect initial frame inherit default frame 
in this case too.

 Jocke





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 12 Nov 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.