Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running gvim in foreground causes some toolbar icons to disappear #567

Closed
metasyntax opened this issue Jan 18, 2016 · 3 comments
Closed

Comments

@metasyntax
Copy link

The default gVim launcher in Arch uses the "-f" option to run in the foreground. When doing that, some of the toolbar icons disappear. This doesn't happen when forking to the background (i.e. without "-f"). I've attached two screenshots to show the behavior.

This is what I get with gvim -N -u NONE -U NONE:

background

This is what I get with gvim -N -u NONE -U NONE -f:

foreground

Here's my :version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 13 2016 12:08:13)
Included patches: 1-1089
Compiled by Arch Linux
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl             +cscope          +folding         +menu            +netbeans_intg   -sniff           +virtualedit
+arabic          +cursorbind      -footer          +mksession       +path_extra      +startuptime     +visual
+autocmd         +cursorshape     +fork()          +modify_fname    +perl/dyn        +statusline      +visualextra
+balloon_eval    +dialog_con_gui  +gettext         +mouse           +persistent_undo -sun_workshop    +viminfo
+browse          +diff            -hangul_input    +mouseshape      +postscript      +syntax          +vreplace
++builtin_terms  +digraphs        +iconv           +mouse_dec       +printer         +tag_binary      +wildignore
+byte_offset     +dnd             +insert_expand   +mouse_gpm       +profile         +tag_old_static  +wildmenu
+cindent         -ebcdic          +jumplist        -mouse_jsbterm   +python/dyn      -tag_any_white   +windows
+clientserver    +emacs_tags      +keymap          +mouse_netterm   +python3/dyn     -tcl             +writebackup
+clipboard       +eval            +langmap         +mouse_sgr       +quickfix        +terminfo        +X11
+cmdline_compl   +ex_extra        +libcall         -mouse_sysmouse  +reltime         +termresponse    -xfontset
+cmdline_hist    +extra_search    +linebreak       +mouse_urxvt     +rightleft       +textobjects     +xim
+cmdline_info    +farsi           +lispindent      +mouse_xterm     +ruby/dyn        +title           +xsmp_interact
+comments        +file_in_path    +listcmds        +multi_byte      +scrollbind      +toolbar         +xterm_clipboard
+conceal         +find_in_path    +localmap        +multi_lang      +signs           +user_commands   -xterm_save
+cryptv          +float           +lua/dyn         -mzscheme        +smartindent     +vertsplit       -xpm
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/inclu
de -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I
/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/lib
png16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/gl
ib-2.0 -I/usr/lib/glib-2.0/include -D_FORTIFY_SOURCE=2  -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl
,-rpath,/usr/lib/perl5/core_perl/CORE  -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vi
m   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0
 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE  -lm -lncurses -lelf -lnsl
 -lacl -lattr -lgpm -ldl   -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -f
stack-protector-strong -L/usr/local/lib  -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil
-lc

This is the binary version currently distributed by Arch Linux. But since it changes depending on "-f" I thought it might be a bug in Vim. Thanks for looking.

@vim-ml
Copy link

vim-ml commented Jan 19, 2016

This issue is caused by calling gui_gtk_register_resource() at a wrong
place when gvim is invoked with the option -f.

Attached is a patch to fix it.

Thank you for reporting.

Best regards,
Kazunobu Kuriyama

2016-01-19 4:38 GMT+09:00 Taylor Venable vim-dev-github@256bit.org:

The default gVim launcher in Arch uses the "-f" option to run in the
foreground When doing that, some of the toolbar icons disappear This
doesn't happen when forking to the background (ie without "-f") I've
attached two screenshots to show the behavior

This is what I get with gvim -N -u NONE -U NONE:

[image: background]
https://camo.githubusercontent.com/5b76cf61ae6159c7310858728b3a65866a1eb9ba/68747470733a2f2f636c6f756467697468756275736572636f6e74656e74636f6d2f6173736574732f3539333733312f31323430303834392f38363166653235302d626466302d313165352d386434382d323362646533353537396638706e67

This is what I get with gvim -N -u NONE -U NONE -f:

[image: foreground]
https://camo.githubusercontent.com/e2a67161dfc0145caa7157d1dd38c0c73a056957/68747470733a2f2f636c6f756467697468756275736572636f6e74656e74636f6d2f6173736574732f3539333733312f31323430303835302f38363233623834652d626466302d313165352d386363312d306361346236333061653133706e67

Here's my :version

VIM - Vi IMproved 74 (2013 Aug 10, compiled Jan 13 2016 12:08:13)
Included patches: 1-1089
Compiled by Arch Linux
Huge version with GTK2 GUI Features included (+) or not (-):
+acl +cscope +folding +menu +netbeans_intg -sniff +virtualedit
+arabic +cursorbind -footer +mksession +path_extra +startuptime +visual
+autocmd +cursorshape +fork() +modify_fname +perl/dyn +statusline +visualextra
+balloon_eval +dialog_con_gui +gettext +mouse +persistent_undo -sun_workshop +viminfo
+browse +diff -hangul_input +mouseshape +postscript +syntax +vreplace
++builtin_terms +digraphs +iconv +mouse_dec +printer +tag_binary +wildignore
+byte_offset +dnd +insert_expand +mouse_gpm +profile +tag_old_static +wildmenu
+cindent -ebcdic +jumplist -mouse_jsbterm +python/dyn -tag_any_white +windows
+clientserver +emacs_tags +keymap +mouse_netterm +python3/dyn -tcl +writebackup
+clipboard +eval +langmap +mouse_sgr +quickfix +terminfo +X11
+cmdline_compl +ex_extra +libcall -mouse_sysmouse +reltime +termresponse -xfontset
+cmdline_hist +extra_search +linebreak +mouse_urxvt +rightleft +textobjects +xim
+cmdline_info +farsi +lispindent +mouse_xterm +ruby/dyn +title +xsmp_interact
+comments +file_in_path +listcmds +multi_byte +scrollbind +toolbar +xterm_clipboard
+conceal +find_in_path +localmap +multi_lang +signs +user_commands -xterm_save
+cryptv +float +lua/dyn -mzscheme +smartindent +vertsplit -xpm
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/vimrc"
2nd user vimrc file: "/vim/vimrc"
user exrc file: "$HOME/exrc"
system gvimrc file: "/etc/gvimrc"
user gvimrc file: "$HOME/gvimrc"
2nd user gvimrc file: "
/vim/gvimrc"
system menu file: "$VIMRUNTIME/menuvim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-20 -I/usr/lib/gtk-20/inclu
de -I/usr/include/pango-10 -I/usr/include/atk-10 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I
/usr/include/gdk-pixbuf-20 -I/usr/include/libpng16 -I/usr/include/pango-10 -I/usr/include/freetype2 -I/usr/include/lib
png16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/gl
ib-20 -I/usr/lib/glib-20/include -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl
,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed -o vi
m -lgtk-x11-20 -lgdk-x11-20 -lpangocairo-10 -latk-10 -lcairo -lgdk_pixbuf-20 -lgio-20 -lpangoft2-10 -lpango-10
-lgobject-20 -lglib-20 -lfontconfig -lfreetype -lSM -lICE -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl
-lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -f
stack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE -lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil
-lc

This is the binary version currently distributed by Arch Linux But since
it changes depending on "-f" I thought it might be a bug in Vim Thanks
for looking


Reply to this email directly or view it on GitHub
#567.

You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to vim_dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

@nuko8
Copy link

nuko8 commented Jan 19, 2016

Patch updated.

Cleanup code is added in case the GUI initialization should fail.

Although the previous patch causes no problem, the updated one is more
sanitary than the previous one, I hope :-)

2016-01-19 15:56 GMT+09:00 vim-dev ML notifications@github.com:

This issue is caused by calling gui_gtk_register_resource() at a wrong
place when gvim is invoked with the option -f.

Attached is a patch to fix it.

Thank you for reporting.

Best regards,
Kazunobu Kuriyama

2016-01-19 4:38 GMT+09:00 Taylor Venable vim-dev-github@256bit.org:

The default gVim launcher in Arch uses the "-f" option to run in the
foreground When doing that, some of the toolbar icons disappear This
doesn't happen when forking to the background (ie without "-f") I've
attached two screenshots to show the behavior

This is what I get with gvim -N -u NONE -U NONE:

[image: background]
<
https://camo.githubusercontent.com/5b76cf61ae6159c7310858728b3a65866a1eb9ba/68747470733a2f2f636c6f756467697468756275736572636f6e74656e74636f6d2f6173736574732f3539333733312f31323430303834392f38363166653235302d626466302d313165352d386434382d323362646533353537396638706e67

This is what I get with gvim -N -u NONE -U NONE -f:

[image: foreground]
<
https://camo.githubusercontent.com/e2a67161dfc0145caa7157d1dd38c0c73a056957/68747470733a2f2f636c6f756467697468756275736572636f6e74656e74636f6d2f6173736574732f3539333733312f31323430303835302f38363233623834652d626466302d313165352d386363312d306361346236333061653133706e67

Here's my :version

VIM - Vi IMproved 74 (2013 Aug 10, compiled Jan 13 2016 12:08:13)
Included patches: 1-1089
Compiled by Arch Linux
Huge version with GTK2 GUI Features included (+) or not (-):
+acl +cscope +folding +menu +netbeans_intg -sniff +virtualedit
+arabic +cursorbind -footer +mksession +path_extra +startuptime +visual
+autocmd +cursorshape +fork() +modify_fname +perl/dyn +statusline
+visualextra
+balloon_eval +dialog_con_gui +gettext +mouse +persistent_undo
-sun_workshop +viminfo
+browse +diff -hangul_input +mouseshape +postscript +syntax +vreplace
++builtin_terms +digraphs +iconv +mouse_dec +printer +tag_binary
+wildignore
+byte_offset +dnd +insert_expand +mouse_gpm +profile +tag_old_static
+wildmenu
+cindent -ebcdic +jumplist -mouse_jsbterm +python/dyn -tag_any_white
+windows
+clientserver +emacs_tags +keymap +mouse_netterm +python3/dyn -tcl
+writebackup
+clipboard +eval +langmap +mouse_sgr +quickfix +terminfo +X11
+cmdline_compl +ex_extra +libcall -mouse_sysmouse +reltime +termresponse
-xfontset
+cmdline_hist +extra_search +linebreak +mouse_urxvt +rightleft
+textobjects +xim
+cmdline_info +farsi +lispindent +mouse_xterm +ruby/dyn +title
+xsmp_interact
+comments +file_in_path +listcmds +multi_byte +scrollbind +toolbar
+xterm_clipboard
+conceal +find_in_path +localmap +multi_lang +signs +user_commands
-xterm_save
+cryptv +float +lua/dyn -mzscheme +smartindent +vertsplit -xpm
system vimrc file: "/etc/vimrc"
user vimrc file: "$HOME/vimrc"
2nd user vimrc file: "/vim/vimrc"
user exrc file: "$HOME/exrc"
system gvimrc file: "/etc/gvimrc"
user gvimrc file: "$HOME/gvimrc"
2nd user gvimrc file: "
/vim/gvimrc"
system menu file: "$VIMRUNTIME/menuvim"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread
-I/usr/include/gtk-20 -I/usr/lib/gtk-20/inclu
de -I/usr/include/pango-10 -I/usr/include/atk-10 -I/usr/include/cairo
-I/usr/include/pixman-1 -I/usr/include/libdrm -I
/usr/include/gdk-pixbuf-20 -I/usr/include/libpng16
-I/usr/include/pango-10 -I/usr/include/freetype2 -I/usr/include/lib
png16 -I/usr/include/harfbuzz -I/usr/include/freetype2
-I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/gl
ib-20 -I/usr/lib/glib-20/include -D_FORTIFY_SOURCE=2 -march=x86-64
-mtune=generic -O2 -pipe -fstack-protector-strong
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L -Wl,-O1,--sort-common,--as-needed,-z,relro
-fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -Wl
,-rpath,/usr/lib/perl5/core_perl/CORE
-Wl,-O1,--sort-common,--as-needed,-z,relro -L/usr/local/lib -Wl,--as-needed
-o vi
m -lgtk-x11-20 -lgdk-x11-20 -lpangocairo-10 -latk-10 -lcairo
-lgdk_pixbuf-20 -lgio-20 -lpangoft2-10 -lpango-10
-lgobject-20 -lglib-20 -lfontconfig -lfreetype -lSM -lICE -lXt -lX11
-lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl
-lacl -lattr -lgpm -ldl -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE
-Wl,-O1,--sort-common,--as-needed,-z,relro -f
stack-protector-strong -L/usr/local/lib -L/usr/lib/perl5/core_perl/CORE
-lperl -lpthread -lnsl -ldl -lm -lcrypt -lutil
-lc

This is the binary version currently distributed by Arch Linux But since
it changes depending on "-f" I thought it might be a bug in Vim Thanks
for looking


Reply to this email directly or view it on GitHub
#567.

You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to vim_dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply to this email directly or view it on GitHub
#567 (comment).

@chrisbra
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants