Fix opening recents popover affecting font size

github/fork/yochananmarqos/patch-1
Gonçalo Silva 2019-04-19 00:00:33 +01:00
parent ec3dc6d632
commit dfe7cc420e
1 changed files with 5 additions and 0 deletions

View File

@ -262,6 +262,11 @@ class Window(Gtk.ApplicationWindow):
"""set paddings dependant of the window size
"""
# Ensure the window receiving the event is the one we care about, ie. the main window.
# On Wayland (bug?), sub-windows such as the recents popover will also trigger this.
if event and event.window != window.get_window():
return
# Adjust text editor width depending on window width, so that:
# - The number of characters per line is adequate (http://webtypography.net/2.1.2)
# - The number of characters stays constant while resizing the window / font