Directly rende r borders instead of going through the active tab

This commit is contained in:
Kovid Goyal 2017-09-11 16:35:34 +05:30
parent ff6c366b8a
commit 2fff6e1cb9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 4 additions and 10 deletions

View File

@ -7,8 +7,8 @@ from itertools import chain
from .constants import viewport_size
from .fast_data_types import (
BORDERS_PROGRAM, add_borders_rect, compile_program, draw_borders,
init_borders_program, send_borders_rects
BORDERS_PROGRAM, add_borders_rect, compile_program, init_borders_program,
send_borders_rects
)
from .shaders import load_shaders
from .utils import color_as_int, pt_to_px
@ -76,6 +76,3 @@ class Borders:
g.bottom + pw
)
send_borders_rects(viewport_size.width, viewport_size.height)
def render(self):
draw_borders()

View File

@ -16,7 +16,7 @@ from .fast_data_types import (
GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, GLFW_CURSOR, GLFW_CURSOR_HIDDEN,
GLFW_CURSOR_NORMAL, GLFW_MOUSE_BUTTON_1, GLFW_PRESS, GLFW_REPEAT,
ChildMonitor, Timers as _Timers, glBlendFunc, glfw_post_empty_event,
glViewport
glViewport, draw_borders
)
from .fonts.render import set_font_family
from .keys import (
@ -375,7 +375,7 @@ class Boss:
cocoa_update_title(self.glfw_window_title)
with self.sprites:
self.sprites.render_dirty_sprites()
tab.render()
draw_borders()
with self.cell_program:
self.tab_manager.render(self.cell_program, self.sprites)
for window in tab.visible_windows():

View File

@ -195,9 +195,6 @@ class Tab:
def destroy(self):
self.windows = deque()
def render(self):
borders.render()
def __repr__(self):
return 'Tab(title={}, id={})'.format(self.name or self.title, hex(id(self)))