diff --git a/elements/window.lua b/elements/window.lua index d14efab..318a4d2 100644 --- a/elements/window.lua +++ b/elements/window.lua @@ -318,7 +318,7 @@ do return false end self.header.mousepressed = function(self, x, y, button) - if self.data.moveable and button == pop.constants.left_mouse then + if button == pop.constants.left_mouse and self.parent.data.moveable then local grandparent = self.parent.parent table.insert(grandparent.child, table.remove(grandparent.child, grandparent:indexOf(self.parent))) selected = true diff --git a/elements/window.moon b/elements/window.moon index 03a4b21..2a1db96 100644 --- a/elements/window.moon +++ b/elements/window.moon @@ -143,7 +143,7 @@ class window extends element return false @header.mousepressed = (x, y, button) => - if @data.moveable and button == pop.constants.left_mouse + if button == pop.constants.left_mouse and @parent.data.moveable grandparent = @parent.parent table.insert grandparent.child, table.remove(grandparent.child, grandparent\indexOf @parent) selected = true