gnome-terminator / terminator

multiple GNOME terminals in one window
https://gnome-terminator.org
GNU General Public License v2.0
2.13k stars 257 forks source link

Reimplement "unfocused dim" using overpainting #74

Open egmontkob opened 4 years ago

egmontkob commented 4 years ago

Currently Terminator dims unfocused panels by temporarily setting a different color palette.

This has the following drawbacks:

As recommended in the linked bug, dimming should be done by overpainting with a mostly-transparent white or black (or whatever-the-background-color-is) in the ::draw handler, as done in the VTE test app.

lazyfrosch commented 4 years ago

TBH I didn't even notice terminator does this until now.

The idea of the feature is nice, but it definitely needs a better implementation!

mattrose commented 4 years ago

Oddly enough this might tie into the background image work as well.

mattrose commented 4 years ago

@egmontkob can you take a look at #223 and see if this is what you mean? It works really well on my Mac but it has weird inexplicable effects on my Fedora box. There is some code in the vte-2.91 test app that I'm not sure why it's there.

egmontkob commented 4 years ago

@mattrose Sorry for not notifying you about this, but I no longer work on terminals. See https://gitlab.gnome.org/GNOME/vte/-/issues/259.

Wishing you all the best, egmont

mattrose commented 4 years ago

@egmontkob Understandable. The politics and sheer stubborn-ness have frustrated me quite a bit too, when I can't just ignore it. I'm already running my own fork of vte on my mac laptop just to get the emacs keybindings to work (Ctrl-A, Ctrl-E, etc.), and am thinking of merging the fedora patchset in and distributing that with the snap and flatpak versions of terminator. There are so many different patches from Ubuntu and Fedora that implement functionality that the GTK and/or VTE teams have refused to implement, that it seems the lesser of 2 evils at this point.

Sorry to hear you're not involved anymore, and I wish you the best.

epozuelo commented 3 years ago

This is broken in my config. The last terminal in each tab becomes completely white when dimmed (see screenshot). There needs to be at least two tabs open. It doesn't happen if I show the scrollbar (hidden by default in my config). I have white on black on my profile, with a solid background. The shade background is set to 0.50, but is unused (grayed out) because I have the solid background color option set.

Steps to reproduce:

It also happens if you open a terminal, open a new tab, then go to GNOME's activity overview.

This is under GNOME 3.38, GTK+ 3.24.24 terminator-white-terminals

mattrose commented 3 years ago

Can you paste the config that this set of steps generates?

I'm wondering if this generates a conflicting set of directives in the config that confuses terminator

epozuelo commented 3 years ago

Sure, here it is:

[keybindings]
[profiles]
  [[default]]
    cursor_color = "#aaaaaa"
    font = Monospace 14
    foreground_color = "#ffffff"
    show_titlebar = False
    scrollbar_position = hidden
    scrollback_infinite = True
    use_system_font = False
    copy_on_selection = True
[layouts]
  [[default]]
    [[[window0]]]
      type = Window
      parent = ""
    [[[child1]]]
      type = Terminal
      parent = window0
[plugins]
epozuelo commented 3 years ago

@mattrose got a chance to look at this?

mattrose commented 3 years ago

sigh yes, and I think I figured out what's going on, but I really can't figure out how to stop it. When I'm getting the size of the terminal window in a notebook without a scrollbar or titlebar, for some reason, the window size gets bigger to encompass the notebook tabs as well, and that seems to make the opacity of the terminal stronger.

What I haven't figured out is how to stop this behaviour. When I get a chance I'm going to try to talk to some pyGTK devs to see if I can figure out how to prevent this from happening, and possibly open up a GTK bug for it. If it is a bug in GTK I'll have to go back to the old way of doing things and wait for the bug to be fixed. :(

Later edit. I honestly can't promise to look at this very soon, as I started a new job and that's taking up most of my mental energy these days. I will poke as soon as I'm able.