fix multi-monitor

Layer container allocation box is relative to the drawing area. So transform stage point before checking.

Fix 58677dc1.
Close #52.
This commit is contained in:
abakkk 2020-10-16 12:50:54 +02:00
parent baf5e7c968
commit e99927d985
1 changed files with 4 additions and 3 deletions

View File

@ -390,11 +390,12 @@ var DrawingArea = new Lang.Class({
this.gridLayer.queue_repaint();
},
_transformStagePoint: function(x, y) {
if (!this.layerContainer.get_allocation_box().contains(x, y))
_transformStagePoint: function(stageX, stageY) {
let [s, x, y] = this.transform_stage_point(stageX, stageY);
if (!s || !this.layerContainer.get_allocation_box().contains(x, y))
return [false, 0, 0];
return this.layerContainer.transform_stage_point(x, y);
return this.layerContainer.transform_stage_point(stageX, stageY);
},
_onButtonPressed: function(actor, event) {