Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed geometry hints #416

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions terminatorlib/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,9 @@ def on_vte_size_allocate(self, widget, allocation):
if self.config['geometry_hinting']:
window = self.get_toplevel()
window.deferred_set_rough_geometry_hints()
else:
window = self.get_toplevel()
window.disable_geometry_hints()

def on_vte_notify_enter(self, term, event):
"""Handle the mouse entering this terminal"""
Expand Down
5 changes: 4 additions & 1 deletion terminatorlib/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,10 @@ def set_rough_geometry_hints(self):
geometry.base_height = extra_height
geometry.width_inc = font_width
geometry.height_inc = font_height
self.set_geometry_hints(self, geometry, Gdk.WindowHints.BASE_SIZE | Gdk.WindowHints.RESIZE_INC)
self.set_geometry_hints(None, geometry, Gdk.WindowHints.BASE_SIZE | Gdk.WindowHints.RESIZE_INC)

def disable_geometry_hints(self):
self.set_geometry_hints(None, None, 0)

def tab_change(self, widget, num=None):
"""Change to a specific tab"""
Expand Down