[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#986066: marked as done (unblock: terminator/2.1.0-2)



Your message dated Mon, 29 Mar 2021 17:17:14 +0000
with message-id <E1lQvVq-0003UH-Sa@respighi.debian.org>
and subject line unblock terminator
has caused the Debian Bug report #986066,
regarding unblock: terminator/2.1.0-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
986066: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986066
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package terminator

[ Reason ]
Small fix (actually a revert), applied upstream, to fix terminals
going white when unfocused.

[ Impact ]
Can't see what's in the (last) terminal if it's not focused.

[ Tests ]
No automated tests afaik. However I have been running this patch for over
two months without issues.

[ Risks ]
Small change that reverts a patch included in 2.1.0, so it basically restores
code back to what we had previously that was working fine, so the risk is
minimal. Also this is not a key package.

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

unblock terminator/2.1.0-2

-- System Information:
Debian Release: bullseye/sid
  APT prefers testing-security
  APT policy: (500, 'testing-security'), (200, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-3-amd64 (SMP w/12 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru terminator-2.1.0/debian/changelog terminator-2.1.0/debian/changelog
--- terminator-2.1.0/debian/changelog	2021-01-06 11:40:53.000000000 +0100
+++ terminator-2.1.0/debian/changelog	2021-03-22 09:20:01.000000000 +0100
@@ -1,3 +1,11 @@
+terminator (2.1.0-2) unstable; urgency=medium
+
+  * fix-white-background.patch: fix a bug where having multiple tabs
+    causes the last terminal in the tab to become fully white.
+  * Add myself to Uploaders.
+
+ -- Emilio Pozuelo Monfort <pochu@debian.org>  Mon, 22 Mar 2021 09:20:01 +0100
+
 terminator (2.1.0-1) unstable; urgency=medium
 
   * [7c08e04] d/changelog: Add missing change
diff -Nru terminator-2.1.0/debian/control terminator-2.1.0/debian/control
--- terminator-2.1.0/debian/control	2021-01-06 11:38:08.000000000 +0100
+++ terminator-2.1.0/debian/control	2021-03-22 09:20:01.000000000 +0100
@@ -2,7 +2,8 @@
 Section: misc
 Priority: optional
 Maintainer: Debian Python Team <team+python@tracker.debian.org>
-Uploaders: Markus Frosch <lazyfrosch@debian.org>
+Uploaders: Markus Frosch <lazyfrosch@debian.org>,
+ Emilio Pozuelo Monfort <pochu@debian.org>,
 Build-Depends: debhelper-compat (= 13),
  dh-python,
  intltool,
diff -Nru terminator-2.1.0/debian/patches/fix-white-background.patch terminator-2.1.0/debian/patches/fix-white-background.patch
--- terminator-2.1.0/debian/patches/fix-white-background.patch	1970-01-01 01:00:00.000000000 +0100
+++ terminator-2.1.0/debian/patches/fix-white-background.patch	2021-03-22 09:20:01.000000000 +0100
@@ -0,0 +1,171 @@
+From 4b6753746271ac0faa166d9f92a099befeea140e Mon Sep 17 00:00:00 2001
+From: Emilio Pozuelo Monfort <pochu27@gmail.com>
+Date: Fri, 15 Jan 2021 09:54:38 +0100
+Subject: [PATCH] Revert "fix issue #74"
+
+This reverts commit 77696aa2cdc95c356501a1ba971684ee1aee857b.
+---
+ terminatorlib/terminal.py | 94 ++++++++++++++++++++++-----------------
+ 1 file changed, 52 insertions(+), 42 deletions(-)
+
+diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py
+index c76cd9a8..da49338c 100644
+--- a/terminatorlib/terminal.py
++++ b/terminatorlib/terminal.py
+@@ -6,7 +6,6 @@
+ import os
+ import signal
+ import gi
+-import cairo
+ from gi.repository import GLib, GObject, Pango, Gtk, Gdk, GdkPixbuf
+ gi.require_version('Vte', '2.91')  # vte-0.38 (gnome-3.14)
+ from gi.repository import Vte
+@@ -32,32 +31,6 @@ from . import plugin
+ from terminatorlib.layoutlauncher import LayoutLauncher
+ from . import regex
+ 
+-class Overpaint(Vte.Terminal):
+-    def __init__(self):
+-        Vte.Terminal.__init__(self)
+-        self.config = Config()
+-        ### inactive_color_offset is the opposite of alpha level
+-        self.dim_p = float(self.config['inactive_color_offset'])
+-        self.dim_l = round(1.0 - self.dim_p,3)
+-    def dim(self,b):
+-        self.overpaint = b
+-
+-    def do_draw(self,cr):
+-        ### get_color_background_for_draw is not available in older 
+-        ### versions of vte
+-        try:
+-            bgc = Vte.Terminal.get_color_background_for_draw(self)
+-        except AttributeError as e:
+-            bgc = Gdk.RGBA()
+-            bgc.parse(self.config['background_color'])
+-        Vte.Terminal.do_draw(self,cr)
+-        if self.overpaint:
+-            bgc.alpha = self.dim_l
+-            cr.set_operator(cairo.Operator.OVER)
+-            Gdk.cairo_set_source_rgba(cr,bgc)
+-            cr.rectangle(0.0,0.0,self.get_allocated_width(),self.get_allocated_height())
+-            cr.paint()
+-
+ # pylint: disable-msg=R0904
+ class Terminal(Gtk.VBox):
+     """Class implementing the VTE widget and its wrappings"""
+@@ -132,8 +105,10 @@ class Terminal(Gtk.VBox):
+     is_held_open = False
+ 
+     fgcolor_active = None
++    fgcolor_inactive = None
+     bgcolor = None
+     palette_active = None
++    palette_inactive = None
+ 
+     composite_support = None
+ 
+@@ -163,9 +138,7 @@ class Terminal(Gtk.VBox):
+ 
+         self.pending_on_vte_size_allocate = False
+ 
+-        self.vte = Overpaint()
+-        self.vte.dim(False)
+-        self.queue_draw()
++        self.vte = Vte.Terminal()
+         self.background_image = None
+         if self.config['background_image'] != '':
+             try: 
+@@ -743,23 +716,58 @@ class Terminal(Gtk.VBox):
+         else:
+             self.bgcolor.alpha = 1
+ 
++        factor = self.config['inactive_color_offset']
++        if factor > 1.0:
++          factor = 1.0
++        self.fgcolor_inactive = self.fgcolor_active.copy()
++        dbg(("fgcolor_inactive set to: RGB(%s,%s,%s)", getattr(self.fgcolor_inactive, "red"),
++                                                      getattr(self.fgcolor_inactive, "green"),
++                                                      getattr(self.fgcolor_inactive, "blue")))
++
++        for bit in ['red', 'green', 'blue']:
++            setattr(self.fgcolor_inactive, bit,
++                    getattr(self.fgcolor_inactive, bit) * factor)
++
++        dbg(("fgcolor_inactive set to: RGB(%s,%s,%s)", getattr(self.fgcolor_inactive, "red"),
++                                                      getattr(self.fgcolor_inactive, "green"),
++                                                      getattr(self.fgcolor_inactive, "blue")))
+         colors = self.config['palette'].split(':')
+         self.palette_active = []
+-
+         for color in colors:
+             if color:
+                 newcolor = Gdk.RGBA()
+                 newcolor.parse(color)
+                 self.palette_active.append(newcolor)
+-        self.vte.set_colors(self.fgcolor_active, self.bgcolor,
+-                                self.palette_active)
+-
++        if len(colors) == 16:
++            # RGB values for indices 16..255 copied from vte source in order to dim them
++            shades = [0, 95, 135, 175, 215, 255]
++            for r in range(0, 6):
++                for g in range(0, 6):
++                    for b in range(0, 6):
++                        newcolor = Gdk.RGBA()
++                        setattr(newcolor, "red",   shades[r] / 255.0)
++                        setattr(newcolor, "green", shades[g] / 255.0)
++                        setattr(newcolor, "blue",  shades[b] / 255.0)
++                        self.palette_active.append(newcolor)
++            for y in range(8, 248, 10):
++                newcolor = Gdk.RGBA()
++                setattr(newcolor, "red",   y / 255.0)
++                setattr(newcolor, "green", y / 255.0)
++                setattr(newcolor, "blue",  y / 255.0)
++                self.palette_active.append(newcolor)
++        self.palette_inactive = []
++        for color in self.palette_active:
++            newcolor = Gdk.RGBA()
++            for bit in ['red', 'green', 'blue']:
++                setattr(newcolor, bit,
++                        getattr(color, bit) * factor)
++            self.palette_inactive.append(newcolor)
+         if self.terminator.last_focused_term == self:
+-            self.vte.dim(False)
+-            self.queue_draw()
++            self.vte.set_colors(self.fgcolor_active, self.bgcolor,
++                                self.palette_active)
+         else:
+-            self.vte.dim(True)
+-            self.queue_draw()
++            self.vte.set_colors(self.fgcolor_inactive, self.bgcolor,
++                                self.palette_inactive)
+         profiles = self.config.base.profiles
+         terminal_box_style_context = self.terminalbox.get_style_context()
+         for profile in list(profiles.keys()):
+@@ -1265,8 +1273,9 @@ class Terminal(Gtk.VBox):
+ 
+     def on_vte_focus_in(self, _widget, _event):
+         """Inform other parts of the application when focus is received"""
+-        self.vte.dim(False)
+-        self.queue_draw()
++        self.vte.set_colors(self.fgcolor_active, self.bgcolor,
++                            self.palette_active)
++        self.set_cursor_color()
+         if not self.terminator.doing_layout:
+             self.terminator.last_focused_term = self
+             if self.get_toplevel().is_child_notebook():
+@@ -1280,8 +1289,9 @@ class Terminal(Gtk.VBox):
+ 
+     def on_vte_focus_out(self, _widget, _event):
+         """Inform other parts of the application when focus is lost"""
+-        self.vte.dim(True)
+-        self.queue_draw()
++        self.vte.set_colors(self.fgcolor_inactive, self.bgcolor,
++                            self.palette_inactive)
++        self.set_cursor_color()
+         self.emit('focus-out')
+ 
+     def on_window_focus_out(self):
+-- 
+2.30.0
+
diff -Nru terminator-2.1.0/debian/patches/series terminator-2.1.0/debian/patches/series
--- terminator-2.1.0/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ terminator-2.1.0/debian/patches/series	2021-03-22 09:20:01.000000000 +0100
@@ -0,0 +1 @@
+fix-white-background.patch

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply to: