From dfe7cc420e3e8eb87dd972db62d894145b2699c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A7alo=20Silva?= Date: Fri, 19 Apr 2019 00:00:33 +0100 Subject: [PATCH] Fix opening recents popover affecting font size --- uberwriter/window.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uberwriter/window.py b/uberwriter/window.py index f541773..7abdca8 100644 --- a/uberwriter/window.py +++ b/uberwriter/window.py @@ -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