Terminator context menu blocks mouse right click event to terminal apps ie: mc or vim/vimx

Bug #1439458 reported by Dark Shenada
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Incomplete
Undecided
Unassigned

Bug Description

Reproduce how:

vim:
1. open Terminator
2. execute 'vim' or 'vimx'
3. set vim/vimx handle mouse by ':set mouse=a'
4. click mouse right button
expected: vim/vimx default right click behavior 'extend select'
result: context menu popup

mc:
1. open Terminator
2. execute 'mc'
3. click mouse right button on any item of file
expected: mc default right click behavior 'right clicked item be selected'
result: context menu popup

code:
====================================================================
terminatorlib/terminal.py
====================================================================
    def on_buttonpress(self, widget, event):
        """Handler for mouse events"""
        # Any button event should grab focus
        widget.grab_focus()

        if event.button == 1:
            # Ctrl+leftclick on a URL should open it
            if event.state & gtk.gdk.CONTROL_MASK == gtk.gdk.CONTROL_MASK:
                url = self.check_for_url(event)
                if url:
                    self.open_url(url, prepare=True)
        elif event.button == 2:
            # middleclick should paste the clipboard
            self.paste_clipboard(True)
            return(True)
        elif event.button == 3:
            # rightclick should display a context menu if Ctrl is not pressed
            if event.state & gtk.gdk.CONTROL_MASK == 0:
                self.popup_menu(widget, event)
                return(True)
====================================================================
Quick research:

            if event.state & gtk.gdk.CONTROL_MASK == 0:
                self.popup_menu(widget, event)
                return(True)

return True cause event dropped.
return False cause both context menu and terminal application be triggered .
====================================================================
Quick workaround:

            if event.state & gtk.gdk.CONTROL_MASK == gtk.gdk.CONTROL_MASK:
                self.popup_menu(widget, event)
                return(True)

context menu poped up only Ctrl+mouse right click
====================================================================
Expected result:

######################################
Terminator should acted just like gnome-terminal did.
######################################

Any comments ?

By Dark Shenada from Sunnyvale at Apl,1 17:18 PDT

Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

Hi Bug subscribers, this is the maintainer (Steve Boddy) of Terminator, who took over from Chris.

In case you were not aware there has been a new release 0.98 of Terminator in the last few days which has many changes, fixes and updates. We also have an ongoing GTK3 port which uses a much more up-to-date libvte.

Even with the ~50 issues closed by that release, and discounting the ~90 outstanding wishlist items, we still have an unwieldy 95 bugs. With the oldest approaching it's 6th birthday and some that haven't seen any updates in nearly 5, it is time for a purge.

My intention is to try and get this list down to a minimum, and for that I need your help.

First I'm going to work through, oldest to newest, setting bugs to Incomplete, pending confirmation that they are still an issue. If after a month there is no feedback, the issue will get closed as Invalid. Here's where you come in. I can't always reproduce, or setting up (i.e. other distros) to even test takes a long time, so I'm going to try crowdsourcing this.

1. Get the latest release. Is it still an issue? If yes, set the confirmed-0.98 tag. For bonus points follow the guide http://gnometerminator.blogspot.com/2015/09/so-you-want-to-try-terminator-gtk3.html and see if the GTK3 branch has same issue, and set the confirmed-gtk3 or notaffected-gtk3 tag.

2. Can you reproduce with an empty/default config file? You can pass "-g temp_config" to do this without affecting your existing config. If you already have Terminator running, you'll need to pass -u as well to disable the DBus.

3. If able to, can you reproduce with another user/guest account?

4. If the issue does not already have clear, precise instructions to reproduce with minimal setup/steps, add them.

5. Put as much info about what you are running.
   * Software/library versions (libvte, gtk, pango, cairo, distro, desktop environment, language)
   * Screens (single or multi)
   * Any unusual / custom packages or configs that might be interacting.

6. If possible attach the config file, unless the issue also happens with an empty one, but mention that.

7. Attach the "-d" debug output from 0.98.

Some common things that cause incidents.

* Strange sizing issues or rapidly shrinking windows - Try turning off Window geometry hints.
* Input (esp. broadcasting duplicate chars etc) problems - Try killing IBus.
* Hand editing of the config file can cause various issues - Due to misunderstanding, incorrect structure or typos.
* Some issues are actually in libvte - This is why testing GTK3 is so important.
* segfaults - Unfortunately these are dying inside the C libraries, and it is usually beyond me to fix those.

Many thanks for your assistance, and hopefully this will get us closer to a bug-free Terminator.

Changed in terminator:
status: New → Incomplete
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Vte + Gnome-terminal fixed it in 0.36-ish: https://bugzilla.gnome.org/show_bug.cgi?id=13299
Fixing it in Terminator requires at least this vte version (prior to this, vte did not report whether it consumed the mouse event or not).

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Patch available in bug 1518700.

(Sorry I totally didn't remember this bug had already been reported, even though I even commented here :))

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.