Loading ...
Sorry, an error occurred while loading the content.

Re: Fedora 13 Gvim popup pops down unless you hold right mouse down?

Expand Messages
  • H Xu
    ... Hello, I think I have fixed this problem. The attachment is the patch. The reason is that when gtk_menu_popup is called, its last parameter is not passed
    Message 1 of 8 , Dec 3, 2010
    • 0 Attachment
      On 12/04/2010 01:45 AM, H Xu wrote:
      > On Thu, Oct 28, 2010 at 4:58 PM, George Hawkins
      > <george.c.hawkins@...> wrote:
      >> Hi there --
      >>
      >> I'm using the standard yum installed Gvim on a normal Fedora 13 system
      >> running Gnome.
      >>
      >> For whatever reason I quite like the Windows Gvim arrangement where
      >> clicking the right mouse button brings up the paste and select popup
      >> menu - so I have "behave mswin".
      >>
      >> However on my latest system this menu pops down unless I keep the
      >> right mouse button held down, i.e. I have to hold, drag and release to
      >> choose a menu option. This is contrary to the normal UI behavior in
      >> Gnome (and I think most modern Windowing systems), where selecting a
      >> menu item can be accompanied by two separate clicks (and releases),
      >> one to popup the menu and one to select the desired menu item.
      >>
      >> Is this something I can control via my vimrc? I looked through the
      >> documentation but didn't find anything obvious. Or is it the result of
      >> the build time options of whoever built the gvim install for Fedora
      >> 13?
      >>
      >> I did gvim --version on an older Fedora system where I don't have this
      >> issue and compared the output with that on my current system and the
      >> only difference in features is that the newer one has +ruby and
      >> +startuptime and the only difference in defined marcos is that the
      >> newer one has -DPERL_USE_SAFE_PUTENV and -DRUBY_VERSION=18.
      >>
      >> So can anyone explain the behavior I see?
      >>
      >> For reference I include the version info below.
      >>
      >> Thanks for your time and help,
      >>
      >> /George
      >>
      >> VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Mar 25 2010 23:22:32)
      >> Included patches: 1-411
      >> Modified by<bugzilla@...>
      >> Compiled by<bugzilla@...>
      >> Huge version with GTK2 GUI. Features included (+) or not (-):
      >> +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
      >> +cindent
      >> +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info
      >> +comments
      >> +cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -
      >> ebcdic
      >> +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
      >> +find_in_path
      >> +float +folding -footer +fork() +gettext -hangul_input +iconv
      >> +insert_expand
      >> +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds
      >> +localmap
      >> +menu +mksession +modify_fname +mouse +mouseshape +mouse_dec
      >> +mouse_gpm
      >> -mouse_jsbterm +mouse_netterm -mouse_sysmouse +mouse_xterm
      >> +multi_byte
      >> +multi_lang -mzscheme +netbeans_intg -osfiletype +path_extra +perl
      >> +postscript
      >> +printer +profile +python +quickfix +reltime +rightleft +ruby
      >> +scrollbind
      >> +signs +smartindent -sniff +startuptime +statusline -sun_workshop
      >> +syntax
      >> +tag_binary +tag_old_static -tag_any_white -tcl +terminfo
      >> +termresponse
      >> +textobjects +title +toolbar +user_commands +vertsplit +virtualedit
      >> +visual
      >> +visualextra +viminfo +vreplace +wildignore +wildmenu +windows
      >> +writebackup
      >> +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
      >> system vimrc file: "/etc/vimrc"
      >> user vimrc file: "$HOME/.vimrc"
      >> user exrc file: "$HOME/.exrc"
      >> system gvimrc file: "/etc/gvimrc"
      >> user gvimrc file: "$HOME/.gvimrc"
      >> system menu file: "$VIMRUNTIME/menu.vim"
      >> fall-back for $VIM: "/etc"
      >> f-b for $VIMRUNTIME: "/usr/share/vim/vim72"
      >> Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -
      >> pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/
      >> include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/
      >> include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
      >> -I/usr/include/freetype2 -I/usr/include/libpng12 -O2 -g -pipe -
      >> Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -
      >> mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -
      >> D_FORTIFY_SOURCE=1 -D_REENTRANT -D_GNU_SOURCE -
      >> DPERL_USE_SAFE_PUTENV -fstack-protector -I/usr/local/include -
      >> D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/perl5/CORE -I/
      >> usr/include/python2.6 -pthread -I/usr/lib64/ruby/1.8/x86_64-linux -
      >> DRUBY_VERSION=18
      >> Linking: gcc -L. -rdynamic -Wl,-export-dynamic -Wl,-E -Wl,-rpath,/
      >> usr/lib64/perl5/CORE -L/usr/local/lib -o vim -pthread -lgtk-
      >> x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -
      >> lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -
      >> lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -
      >> lglib-2.0 -lXt -lX11 -lSM -lICE -lselinux -lncurses -lacl -lgpm -
      >> Wl,-E -Wl,-rpath,/usr/lib64/perl5/CORE -fstack-protector -L/usr/
      >> lib64/perl5/CORE -lperl -lresolv -lutil -lc -L/usr/lib64/python2.6/
      >> config -lpython2.6 -lutil -Xlinker -export-dynamic -lruby -lrt -ldl -
      >> lm
      >>
      >> --
      >> You received this message from the "vim_use" 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
      >>
      >
      > Hi,
      >
      > I have the same problem and don't how to solve it. The windows popup
      > behavior is better than this.
      >
      > Hong Xu
      > 2010/12/4
      >
      Hello,

      I think I have fixed this problem. The attachment is the patch. The
      reason is that when gtk_menu_popup is called, its last parameter is
      not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
      this by adding a global varible, which is ugly, I think. Is there a
      better way to pass the time stamp?

      Regards,
      Hong Xu
      12/04/2010

      --
      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
    • Bram Moolenaar
      ... Perhaps we should rename clipboard_event_time to gtk_event_time and move it to globals.h. -- Female engineers become irresistible at the age of consent and
      Message 2 of 8 , Dec 4, 2010
      • 0 Attachment
        Hong Xu wrote:

        > I think I have fixed this problem. The attachment is the patch. The
        > reason is that when gtk_menu_popup is called, its last parameter is
        > not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
        > this by adding a global varible, which is ugly, I think. Is there a
        > better way to pass the time stamp?

        Perhaps we should rename clipboard_event_time to gtk_event_time and move
        it to globals.h.

        --
        Female engineers become irresistible at the age of consent and remain that
        way until about thirty minutes after their clinical death. Longer if it's a
        warm day.
        (Scott Adams - The Dilbert principle)

        /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
        /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
        \\\ an exciting new programming language -- http://www.Zimbu.org ///
        \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

        --
        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
      • H Xu
        ... Hi Bram, Would it be better if we use a global pointer, whose type is GdkEvent* , to store the event pointer? Then we can get more information about the
        Message 3 of 8 , Dec 4, 2010
        • 0 Attachment
          On 12/04/2010 11:09 PM, Bram Moolenaar wrote:
          >
          > Hong Xu wrote:
          >
          >> I think I have fixed this problem. The attachment is the patch. The
          >> reason is that when gtk_menu_popup is called, its last parameter is
          >> not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
          >> this by adding a global varible, which is ugly, I think. Is there a
          >> better way to pass the time stamp?
          >
          > Perhaps we should rename clipboard_event_time to gtk_event_time and move
          > it to globals.h.
          >

          Hi Bram,

          Would it be better if we use a global pointer, whose type is
          "GdkEvent*", to store the event pointer? Then we can get more
          information about the event through this pointer, including the
          event_time -- In the future, we might also need to access other
          varibles in the GdkEvent.

          Regards,
          Hong Xu
          12/05/2010

          --
          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
        • Bram Moolenaar
          ... That involves managing allocated memory. What other fields would we use? And can t we use a simple value for them instead of having to make a copy? --
          Message 4 of 8 , Dec 5, 2010
          • 0 Attachment
            Hong Xu wrote:

            > >> I think I have fixed this problem. The attachment is the patch. The
            > >> reason is that when gtk_menu_popup is called, its last parameter is
            > >> not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
            > >> this by adding a global varible, which is ugly, I think. Is there a
            > >> better way to pass the time stamp?
            > >
            > > Perhaps we should rename clipboard_event_time to gtk_event_time and move
            > > it to globals.h.
            > >
            >
            > Hi Bram,
            >
            > Would it be better if we use a global pointer, whose type is
            > "GdkEvent*", to store the event pointer? Then we can get more
            > information about the event through this pointer, including the
            > event_time -- In the future, we might also need to access other
            > varibles in the GdkEvent.

            That involves managing allocated memory. What other fields would we
            use? And can't we use a simple value for them instead of having to make
            a copy?

            --
            Engineers understand that their appearance only bothers other people and
            therefore it is not worth optimizing.
            (Scott Adams - The Dilbert principle)

            /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
            /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
            \\\ an exciting new programming language -- http://www.Zimbu.org ///
            \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

            --
            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
          • H Xu
            Hello Bram, Now we don t need to access any other field, we can change this when we need to access them. The attachment is the patch to rename the variable and
            Message 5 of 8 , Dec 5, 2010
            • 0 Attachment
              Hello Bram,

              Now we don't need to access any other field, we can change this when we need to access them. The attachment is the patch to rename the variable and fix the problem.

              Regards,
              Hong Xu
              2010/12/5


              -----Original Message-----
              From: Bram Moolenaar
              Sent: 2010/12/05 22:47:29
              To: H Xu
              Cc: vim_dev@...
              Subject: Re: Fedora 13 Gvim popup pops down unless you hold right mouse down?


              Hong Xu wrote:

              > >> I think I have fixed this problem. The attachment is the patch. The
              > >> reason is that when gtk_menu_popup is called, its last parameter is
              > >> not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
              > >> this by adding a global varible, which is ugly, I think. Is there a
              > >> better way to pass the time stamp?
              > >
              > > Perhaps we should rename clipboard_event_time to gtk_event_time and move
              > > it to globals.h.
              > >
              >
              > Hi Bram,
              >
              > Would it be better if we use a global pointer, whose type is
              > "GdkEvent*", to store the event pointer? Then we can get more
              > information about the event through this pointer, including the
              > event_time -- In the future, we might also need to access other
              > varibles in the GdkEvent.

              That involves managing allocated memory. What other fields would we
              use? And can't we use a simple value for them instead of having to make
              a copy?

              --
              Engineers understand that their appearance only bothers other people and
              therefore it is not worth optimizing.
              (Scott Adams - The Dilbert principle)

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ an exciting new programming language -- http://www.Zimbu.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --
              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
            • H Xu
              ... Hello Bram, I add a event_time field to the gui structure instead of a gtk_event_time global varible. I think this would be better. Hong Xu 2011/2/3 --
              Message 6 of 8 , Feb 2 10:00 PM
              • 0 Attachment
                On Sat, Dec 4, 2010 at 11:09 PM, Bram Moolenaar <Bram@...> wrote:
                >
                > Hong Xu wrote:
                >
                >> I think I have fixed this problem. The attachment is the patch. The
                >> reason is that when gtk_menu_popup is called, its last parameter is
                >> not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
                >> this by adding a global varible, which is ugly, I think. Is there a
                >> better way to pass the time stamp?
                >
                > Perhaps we should rename clipboard_event_time to gtk_event_time and move
                > it to globals.h.


                Hello Bram,

                I add a "event_time" field to the gui structure instead of a
                gtk_event_time global
                varible. I think this would be better.

                Hong Xu
                2011/2/3

                --
                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
              • H Xu
                ... Hello Bram, I add a event_time field to the gui structure instead of a gtk_event_time global variable. I think this would be better. Hong Xu 2011/2/3 --
                Message 7 of 8 , Feb 2 10:03 PM
                • 0 Attachment
                  On Sat, Dec 4, 2010 at 11:09 PM, Bram Moolenaar <Bram@...> wrote:
                  >
                  > Hong Xu wrote:
                  >
                  >> I think I have fixed this problem. The attachment is the patch. The
                  >> reason is that when gtk_menu_popup is called, its last parameter is
                  >> not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
                  >> this by adding a global varible, which is ugly, I think. Is there a
                  >> better way to pass the time stamp?
                  >
                  > Perhaps we should rename clipboard_event_time to gtk_event_time and move
                  > it to globals.h.


                  Hello Bram,

                  I add a "event_time" field to the gui structure instead of a
                  gtk_event_time global variable. I think this would be better.

                  Hong Xu
                  2011/2/3

                  --
                  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
                • Bram Moolenaar
                  ... Agreed. -- hundred-and-one symptoms of being an internet addict: 186. You overstay in the office so you can have more time surfing the net. /// Bram
                  Message 8 of 8 , Feb 3 11:43 AM
                  • 0 Attachment
                    Hong Xu wrote:

                    > >> I think I have fixed this problem. The attachment is the patch. The
                    > >> reason is that when gtk_menu_popup is called, its last parameter is
                    > >> not passed in the correct time stamp but GDK_CURRENT_TIME. I fixed
                    > >> this by adding a global varible, which is ugly, I think. Is there a
                    > >> better way to pass the time stamp?
                    > >
                    > > Perhaps we should rename clipboard_event_time to gtk_event_time and move
                    > > it to globals.h.
                    >
                    >
                    > Hello Bram,
                    >
                    > I add a "event_time" field to the gui structure instead of a
                    > gtk_event_time global
                    > varible. I think this would be better.

                    Agreed.

                    --
                    hundred-and-one symptoms of being an internet addict:
                    186. You overstay in the office so you can have more time surfing the net.

                    /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                    /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                    \\\ an exciting new programming language -- http://www.Zimbu.org ///
                    \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                    --
                    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
                  Your message has been successfully submitted and would be delivered to recipients shortly.