all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#32975: Emacs 26.1; GTK Warnings
@ 2018-10-07 18:19 Tjernlund
  2018-10-07 19:03 ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-07 18:19 UTC (permalink / raw)
  To: 32975

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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-07 18:19 bug#32975: Emacs 26.1; GTK Warnings Tjernlund
@ 2018-10-07 19:03 ` Eli Zaretskii
  2018-10-08  5:27   ` Tjernlund
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-07 19:03 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975

> From: Tjernlund <tjernlund@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?





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-07 19:03 ` Eli Zaretskii
@ 2018-10-08  5:27   ` Tjernlund
  2018-10-09 15:10     ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-08  5:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32975

On Sun, 2018-10-07 at 22:03 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund@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))





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-08  5:27   ` Tjernlund
@ 2018-10-09 15:10     ` Eli Zaretskii
  2018-10-09 18:01       ` Tjernlund
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-09 15:10 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975

> From: Tjernlund <tjernlund@tjernlund.se>
> Cc: 32975@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?





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-09 15:10     ` Eli Zaretskii
@ 2018-10-09 18:01       ` Tjernlund
  2018-10-09 18:18         ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-09 18:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32975

On Tue, 2018-10-09 at 18:10 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund@tjernlund.se>
> > Cc: 32975@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 ..





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-09 18:01       ` Tjernlund
@ 2018-10-09 18:18         ` Eli Zaretskii
  2018-10-09 18:33           ` Tjernlund
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-09 18:18 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975

> From: Tjernlund <tjernlund@tjernlund.se>
> Cc: 32975@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@tjernlund.se>
> > > Cc: 32975@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.





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-09 18:18         ` Eli Zaretskii
@ 2018-10-09 18:33           ` Tjernlund
  2018-10-09 19:13             ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-09 18:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32975

On Tue, 2018-10-09 at 21:18 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund@tjernlund.se>
> > Cc: 32975@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@tjernlund.se>
> > > > Cc: 32975@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.





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-09 18:33           ` Tjernlund
@ 2018-10-09 19:13             ` Eli Zaretskii
  2018-10-10  8:04               ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-09 19:13 UTC (permalink / raw)
  To: Tjernlund, Robert Pluim; +Cc: 32975

> From: Tjernlund <tjernlund@tjernlund.se>
> Cc: 32975@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.





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-09 19:13             ` Eli Zaretskii
@ 2018-10-10  8:04               ` Robert Pluim
  2018-10-10  8:46                 ` martin rudalics
  0 siblings, 1 reply; 41+ messages in thread
From: Robert Pluim @ 2018-10-10  8:04 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Tjernlund, 32975

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Tjernlund <tjernlund@tjernlund.se>
>> Cc: 32975@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-10  8:04               ` Robert Pluim
@ 2018-10-10  8:46                 ` martin rudalics
  2018-10-10 10:08                   ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: martin rudalics @ 2018-10-10  8:46 UTC (permalink / raw)
  To: Robert Pluim, Eli Zaretskii; +Cc: Tjernlund, 32975

 > 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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-10  8:46                 ` martin rudalics
@ 2018-10-10 10:08                   ` Robert Pluim
  2018-10-10 17:44                     ` Tjernlund
  0 siblings, 1 reply; 41+ messages in thread
From: Robert Pluim @ 2018-10-10 10:08 UTC (permalink / raw)
  To: martin rudalics; +Cc: Tjernlund, 32975

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-10 10:08                   ` Robert Pluim
@ 2018-10-10 17:44                     ` Tjernlund
  2018-10-11  6:27                       ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-10 17:44 UTC (permalink / raw)
  To: Robert Pluim, martin rudalics; +Cc: 32975

On Wed, 2018-10-10 at 12:08 +0200, Robert Pluim wrote:
> martin rudalics <rudalics@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))





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-10 17:44                     ` Tjernlund
@ 2018-10-11  6:27                       ` Robert Pluim
  2018-10-11  7:35                         ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: Robert Pluim @ 2018-10-11  6:27 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975

Tjernlund <tjernlund@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  6:27                       ` Robert Pluim
@ 2018-10-11  7:35                         ` Robert Pluim
  2018-10-11  8:24                           ` martin rudalics
  2018-10-11 13:58                           ` Eli Zaretskii
  0 siblings, 2 replies; 41+ messages in thread
From: Robert Pluim @ 2018-10-11  7:35 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975

Robert Pluim <rpluim@gmail.com> writes:

> Tjernlund <tjernlund@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);





^ permalink raw reply related	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  7:35                         ` Robert Pluim
@ 2018-10-11  8:24                           ` martin rudalics
  2018-10-11  8:33                             ` Robert Pluim
  2018-10-11 13:58                           ` Eli Zaretskii
  1 sibling, 1 reply; 41+ messages in thread
From: martin rudalics @ 2018-10-11  8:24 UTC (permalink / raw)
  To: Robert Pluim, Tjernlund; +Cc: 32975

 > 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






^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  8:24                           ` martin rudalics
@ 2018-10-11  8:33                             ` Robert Pluim
  2018-10-11  8:58                               ` martin rudalics
  0 siblings, 1 reply; 41+ messages in thread
From: Robert Pluim @ 2018-10-11  8:33 UTC (permalink / raw)
  To: martin rudalics; +Cc: Tjernlund, 32975

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  8:33                             ` Robert Pluim
@ 2018-10-11  8:58                               ` martin rudalics
  2018-10-11  9:22                                 ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: martin rudalics @ 2018-10-11  8:58 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Tjernlund, 32975

 >> 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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  8:58                               ` martin rudalics
@ 2018-10-11  9:22                                 ` Robert Pluim
  2018-10-11  9:32                                   ` martin rudalics
  0 siblings, 1 reply; 41+ messages in thread
From: Robert Pluim @ 2018-10-11  9:22 UTC (permalink / raw)
  To: martin rudalics; +Cc: Tjernlund, 32975

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  9:22                                 ` Robert Pluim
@ 2018-10-11  9:32                                   ` martin rudalics
  2018-10-11  9:50                                     ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: martin rudalics @ 2018-10-11  9:32 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Tjernlund, 32975

 > 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






^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  9:32                                   ` martin rudalics
@ 2018-10-11  9:50                                     ` Robert Pluim
  2018-10-11 12:02                                       ` martin rudalics
  0 siblings, 1 reply; 41+ messages in thread
From: Robert Pluim @ 2018-10-11  9:50 UTC (permalink / raw)
  To: martin rudalics; +Cc: Tjernlund, 32975

martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  9:50                                     ` Robert Pluim
@ 2018-10-11 12:02                                       ` martin rudalics
  2018-10-11 12:26                                         ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: martin rudalics @ 2018-10-11 12:02 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Tjernlund, 32975

 > 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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 12:02                                       ` martin rudalics
@ 2018-10-11 12:26                                         ` Robert Pluim
  2018-10-11 13:51                                           ` martin rudalics
  0 siblings, 1 reply; 41+ messages in thread
From: Robert Pluim @ 2018-10-11 12:26 UTC (permalink / raw)
  To: martin rudalics; +Cc: Tjernlund, 32975

martin rudalics <rudalics@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 ();
     }
 }







^ permalink raw reply related	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 12:26                                         ` Robert Pluim
@ 2018-10-11 13:51                                           ` martin rudalics
  2018-10-11 14:06                                             ` Robert Pluim
  0 siblings, 1 reply; 41+ messages in thread
From: martin rudalics @ 2018-10-11 13:51 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Tjernlund, 32975

 > 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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11  7:35                         ` Robert Pluim
  2018-10-11  8:24                           ` martin rudalics
@ 2018-10-11 13:58                           ` Eli Zaretskii
  2018-10-11 17:10                             ` martin rudalics
  1 sibling, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-11 13:58 UTC (permalink / raw)
  To: Robert Pluim, rudalics; +Cc: tjernlund, 32975

> From: Robert Pluim <rpluim@gmail.com>
> Cc: 32975@debbugs.gnu.org, martin rudalics <rudalics@gmx.at>,
> 	Eli Zaretskii <eliz@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.





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 13:51                                           ` martin rudalics
@ 2018-10-11 14:06                                             ` Robert Pluim
  2018-10-11 14:25                                               ` Eli Zaretskii
  2018-10-11 19:43                                               ` Tjernlund
  0 siblings, 2 replies; 41+ messages in thread
From: Robert Pluim @ 2018-10-11 14:06 UTC (permalink / raw)
  To: martin rudalics; +Cc: Tjernlund, 32975

martin rudalics <rudalics@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@gmail.com>
Date: Thu, 11 Oct 2018 16:02:51 +0200
Subject: [PATCH] Call GTK functions only on GTK scrollbars
To: emacs-devel@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






^ permalink raw reply related	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 14:06                                             ` Robert Pluim
@ 2018-10-11 14:25                                               ` Eli Zaretskii
  2018-10-13  8:46                                                 ` Robert Pluim
  2018-10-11 19:43                                               ` Tjernlund
  1 sibling, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-11 14:25 UTC (permalink / raw)
  To: Robert Pluim; +Cc: tjernlund, 32975

> From: Robert Pluim <rpluim@gmail.com>
> Date: Thu, 11 Oct 2018 16:06:42 +0200
> Cc: Tjernlund <tjernlund@tjernlund.se>, 32975@debbugs.gnu.org
> 
> martin rudalics <rudalics@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.





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 13:58                           ` Eli Zaretskii
@ 2018-10-11 17:10                             ` martin rudalics
  0 siblings, 0 replies; 41+ messages in thread
From: martin rudalics @ 2018-10-11 17:10 UTC (permalink / raw)
  To: Eli Zaretskii, Robert Pluim; +Cc: tjernlund, 32975

 > 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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 14:06                                             ` Robert Pluim
  2018-10-11 14:25                                               ` Eli Zaretskii
@ 2018-10-11 19:43                                               ` Tjernlund
  2018-10-11 19:51                                                 ` Tjernlund
  1 sibling, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-11 19:43 UTC (permalink / raw)
  To: Robert Pluim, martin rudalics; +Cc: 32975

On Thu, 2018-10-11 at 16:06 +0200, Robert Pluim wrote:
> martin rudalics <rudalics@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@gmail.com>
> Date: Thu, 11 Oct 2018 16:02:51 +0200
> Subject: [PATCH] Call GTK functions only on GTK scrollbars
> To: emacs-devel@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 ();
>      }
>  }





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 19:43                                               ` Tjernlund
@ 2018-10-11 19:51                                                 ` Tjernlund
  2018-10-11 21:04                                                   ` martin rudalics
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-11 19:51 UTC (permalink / raw)
  To: Robert Pluim, martin rudalics; +Cc: 32975

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@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 19:51                                                 ` Tjernlund
@ 2018-10-11 21:04                                                   ` martin rudalics
  2018-10-11 21:54                                                     ` Tjernlund
  0 siblings, 1 reply; 41+ messages in thread
From: martin rudalics @ 2018-10-11 21:04 UTC (permalink / raw)
  To: Tjernlund, Robert Pluim; +Cc: 32975

 > 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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 21:04                                                   ` martin rudalics
@ 2018-10-11 21:54                                                     ` Tjernlund
  2018-10-12  4:28                                                       ` Eli Zaretskii
  2018-10-12  8:44                                                       ` martin rudalics
  0 siblings, 2 replies; 41+ messages in thread
From: Tjernlund @ 2018-10-11 21:54 UTC (permalink / raw)
  To: martin rudalics, Robert Pluim; +Cc: 32975

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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 21:54                                                     ` Tjernlund
@ 2018-10-12  4:28                                                       ` Eli Zaretskii
  2018-10-12  5:31                                                         ` Tjernlund
  2018-10-12  8:44                                                       ` martin rudalics
  1 sibling, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-12  4:28 UTC (permalink / raw)
  To: Tjernlund; +Cc: rpluim, 32975

> From: Tjernlund <tjernlund@tjernlund.se>
> Date: Thu, 11 Oct 2018 23:54:58 +0200
> Cc: 32975@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?





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-12  4:28                                                       ` Eli Zaretskii
@ 2018-10-12  5:31                                                         ` Tjernlund
  2018-10-12  6:36                                                           ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-12  5:31 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: rpluim, 32975

On Fri, 2018-10-12 at 07:28 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund@tjernlund.se>
> > Date: Thu, 11 Oct 2018 23:54:58 +0200
> > Cc: 32975@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 





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-12  5:31                                                         ` Tjernlund
@ 2018-10-12  6:36                                                           ` Eli Zaretskii
       [not found]                                                             ` <1539444400.8755.38.camel@tjernlund.se>
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-12  6:36 UTC (permalink / raw)
  To: Tjernlund; +Cc: rpluim, 32975

> From: Tjernlund <tjernlund@tjernlund.se>
> Cc: rudalics@gmx.at, rpluim@gmail.com, 32975@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.





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 21:54                                                     ` Tjernlund
  2018-10-12  4:28                                                       ` Eli Zaretskii
@ 2018-10-12  8:44                                                       ` martin rudalics
  1 sibling, 0 replies; 41+ messages in thread
From: martin rudalics @ 2018-10-12  8:44 UTC (permalink / raw)
  To: Tjernlund, Robert Pluim; +Cc: 32975

 > 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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-11 14:25                                               ` Eli Zaretskii
@ 2018-10-13  8:46                                                 ` Robert Pluim
  0 siblings, 0 replies; 41+ messages in thread
From: Robert Pluim @ 2018-10-13  8:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: tjernlund, 32975

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Robert Pluim <rpluim@gmail.com>
>> Date: Thu, 11 Oct 2018 16:06:42 +0200
>> Cc: Tjernlund <tjernlund@tjernlund.se>, 32975@debbugs.gnu.org
>> 
>> martin rudalics <rudalics@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
       [not found]                                                             ` <1539444400.8755.38.camel@tjernlund.se>
@ 2018-10-14  2:36                                                               ` Eli Zaretskii
       [not found]                                                                 ` <1539505906.8755.41.camel@tjernlund.se>
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-14  2:36 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975

[Please don't remove the bug address from the list of addressees.]

> From: Tjernlund <tjernlund@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?





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
       [not found]                                                                 ` <1539505906.8755.41.camel@tjernlund.se>
@ 2018-10-14 14:57                                                                   ` Eli Zaretskii
  2018-10-14 15:22                                                                     ` Tjernlund
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-14 14:57 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975


[PLEASE don't remove the bug address from the list of addressees.]

> From: Tjernlund <tjernlund@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"?





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-14 14:57                                                                   ` Eli Zaretskii
@ 2018-10-14 15:22                                                                     ` Tjernlund
  2018-10-14 16:02                                                                       ` Eli Zaretskii
  0 siblings, 1 reply; 41+ messages in thread
From: Tjernlund @ 2018-10-14 15:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32975

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@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





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-14 15:22                                                                     ` Tjernlund
@ 2018-10-14 16:02                                                                       ` Eli Zaretskii
  2018-10-14 20:00                                                                         ` Tjernlund
  0 siblings, 1 reply; 41+ messages in thread
From: Eli Zaretskii @ 2018-10-14 16:02 UTC (permalink / raw)
  To: Tjernlund; +Cc: 32975

> From: Tjernlund <tjernlund@tjernlund.se>
> Cc: 32975@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.





^ permalink raw reply	[flat|nested] 41+ messages in thread

* bug#32975: Emacs 26.1; GTK Warnings
  2018-10-14 16:02                                                                       ` Eli Zaretskii
@ 2018-10-14 20:00                                                                         ` Tjernlund
  0 siblings, 0 replies; 41+ messages in thread
From: Tjernlund @ 2018-10-14 20:00 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 32975

On Sun, 2018-10-14 at 19:02 +0300, Eli Zaretskii wrote:
> > From: Tjernlund <tjernlund@tjernlund.se>
> > Cc: 32975@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






^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2018-10-14 20:00 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-07 18:19 bug#32975: Emacs 26.1; GTK Warnings Tjernlund
2018-10-07 19:03 ` Eli Zaretskii
2018-10-08  5:27   ` Tjernlund
2018-10-09 15:10     ` Eli Zaretskii
2018-10-09 18:01       ` Tjernlund
2018-10-09 18:18         ` Eli Zaretskii
2018-10-09 18:33           ` Tjernlund
2018-10-09 19:13             ` Eli Zaretskii
2018-10-10  8:04               ` Robert Pluim
2018-10-10  8:46                 ` martin rudalics
2018-10-10 10:08                   ` Robert Pluim
2018-10-10 17:44                     ` Tjernlund
2018-10-11  6:27                       ` Robert Pluim
2018-10-11  7:35                         ` Robert Pluim
2018-10-11  8:24                           ` martin rudalics
2018-10-11  8:33                             ` Robert Pluim
2018-10-11  8:58                               ` martin rudalics
2018-10-11  9:22                                 ` Robert Pluim
2018-10-11  9:32                                   ` martin rudalics
2018-10-11  9:50                                     ` Robert Pluim
2018-10-11 12:02                                       ` martin rudalics
2018-10-11 12:26                                         ` Robert Pluim
2018-10-11 13:51                                           ` martin rudalics
2018-10-11 14:06                                             ` Robert Pluim
2018-10-11 14:25                                               ` Eli Zaretskii
2018-10-13  8:46                                                 ` Robert Pluim
2018-10-11 19:43                                               ` Tjernlund
2018-10-11 19:51                                                 ` Tjernlund
2018-10-11 21:04                                                   ` martin rudalics
2018-10-11 21:54                                                     ` Tjernlund
2018-10-12  4:28                                                       ` Eli Zaretskii
2018-10-12  5:31                                                         ` Tjernlund
2018-10-12  6:36                                                           ` Eli Zaretskii
     [not found]                                                             ` <1539444400.8755.38.camel@tjernlund.se>
2018-10-14  2:36                                                               ` Eli Zaretskii
     [not found]                                                                 ` <1539505906.8755.41.camel@tjernlund.se>
2018-10-14 14:57                                                                   ` Eli Zaretskii
2018-10-14 15:22                                                                     ` Tjernlund
2018-10-14 16:02                                                                       ` Eli Zaretskii
2018-10-14 20:00                                                                         ` Tjernlund
2018-10-12  8:44                                                       ` martin rudalics
2018-10-11 13:58                           ` Eli Zaretskii
2018-10-11 17:10                             ` martin rudalics

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.