diff --git a/draw.js b/draw.js index 7d81452..2dbe213 100644 --- a/draw.js +++ b/draw.js @@ -856,8 +856,8 @@ var DrawingHelper = new Lang.Class({ else this.vscrollbar_policy = Gtk.PolicyType.NEVER; this.set_height(Math.min(this.height, maxHeight)); - this.set_position(this.monitor.x + Math.floor(this.monitor.width / 2 - this.width / 2), - this.monitor.y + Math.floor(this.monitor.height / 2 - this.height / 2)); + this.set_position(Math.floor(this.monitor.width / 2 - this.width / 2), + Math.floor(this.monitor.height / 2 - this.height / 2)); Tweener.removeTweens(this); Tweener.addTween(this, { opacity: 255, diff --git a/extension.js b/extension.js index 989dc5c..2d22604 100644 --- a/extension.js +++ b/extension.js @@ -103,7 +103,6 @@ var AreaManager = new Lang.Class({ Main.uiGroup.insert_child_above(container, global.window_group); container.set_position(monitor.x, monitor.y); container.set_size(monitor.width, monitor.height); - area.set_position(monitor.x, monitor.y); area.set_size(monitor.width, monitor.height); area.emitter.stopDrawingHandler = area.emitter.connect('stop-drawing', this.toggleDrawing.bind(this)); area.emitter.showOsdHandler = area.emitter.connect('show-osd', this.showOsd.bind(this)); @@ -275,13 +274,12 @@ var AreaManager = new Lang.Class({ removeAreas: function() { for (let i = 0; i < this.areas.length; i++) { let area = this.areas[i]; - Main.uiGroup.remove_actor(area.helper); - Main.uiGroup.remove_actor(area.get_parent()); + let container = area.get_parent(); + container.get_parent().remove_actor(container); area.emitter.disconnect(area.emitter.stopDrawingHandler); area.emitter.disconnect(area.emitter.showOsdHandler); area.disable(); - area.helper.destroy(); - area.get_parent().destroy(); + container.destroy(); } this.areas = []; },