From 5997c9cba3fce946320ee78e0b8366d85aa2b828 Mon Sep 17 00:00:00 2001 From: abakkk Date: Sat, 4 Jan 2020 12:58:05 +0100 Subject: [PATCH] small trick to prevent the menu from "jumping" on first opening --- draw.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/draw.js b/draw.js index 1723807..88abd4f 100644 --- a/draw.js +++ b/draw.js @@ -1412,6 +1412,9 @@ var DrawingMenu = new Lang.Class({ Mainloop.timeout_add(0, () => { this._populateOpenDrawingSubMenu(); + // small trick to prevent the menu from "jumping" on first opening + item.menu.open(); + item.menu.close(); return GLib.SOURCE_REMOVE; }); menu.addMenuItem(item); @@ -1462,6 +1465,9 @@ var DrawingMenu = new Lang.Class({ Mainloop.timeout_add(0, () => { this._populateSaveDrawingSubMenu(); + // small trick to prevent the menu from "jumping" on first opening + item.menu.open(); + item.menu.close(); return GLib.SOURCE_REMOVE; }); menu.addMenuItem(item);