[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.
This commit is contained in:
Colin Walters 2009-11-12 13:09:20 -05:00
parent 4014313910
commit fec2ea5e9c

View File

@ -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 });