From fec2ea5e9c0e0cc78d6238a951fe520a3347a1c1 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 12 Nov 2009 13:09:20 -0500 Subject: [PATCH] [dash] Convert pane close to St.Button, avoiding release event propagation The workspaces was handling the release event after closing the pane, catch it before closing by using St.Button. --- js/ui/dash.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/js/ui/dash.js b/js/ui/dash.js index fd5d947a9..3398fce9e 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -94,11 +94,9 @@ Pane.prototype = { let chromeTop = new St.BoxLayout(); - let closeIcon = new St.Bin({ style_class: "dash-pane-close" }); - closeIcon.reactive = true; - closeIcon.connect('button-press-event', Lang.bind(this, function (b, e) { + let closeIcon = new St.Button({ style_class: "dash-pane-close" }); + closeIcon.connect('clicked', Lang.bind(this, function (b, e) { this.close(); - return true; })); let dummy = new St.Bin(); chromeTop.add(dummy, { expand: true });