How to properly detect touch on two objects

Hope some can help me here, been searching and testing, but can’t find any solution.

Goal is to have a background detecting touch, and two objects in front that also detect touch (end goal is to detect if both front objects, using two fingers/multitouch, are pressed 2-3 seconds then execute some function).

But I want to be able detect touch on background and front object(s) at same time, but I can only get it properly to do so on either front or back.

Made an example with square on the back and circle at front. Commenting out getCurrentStage focus things makes it work to press both with one finger, but dragging finger out of area will make them stuck and not end/cancel the touch eventlistener.

local square = display.newRect( 150,150, 250, 250 ) square.fill = { .2, 0.5, 0.2 } local function isTouchingSquare(event) -- end local function squareTouchFunc(event) if(event.phase == "began") then print("square, began") display.getCurrentStage():setFocus( event.target, event.id ) event.target.isFocus = true Runtime:addEventListener("enterFrame", isTouchingSquare) elseif event.target.isFocus then if event.phase == "moved" then print("square, moved") end if event.phase == "ended" or event.phase == "cancelled" then print("square, ended") Runtime:removeEventListener( "enterFrame", isTouchingSquare ) display.getCurrentStage():setFocus(event.target, nil ) event.target.isFocus = false end end end square:addEventListener("touch", squareTouchFunc) local circle = display.newCircle( 250, 250, 75 ) circle.fill = {1.0, 0.2, 0.2 } local function isTouchingCircle(event) -- end local function circleTouchFunc(event) if(event.phase == "began") then print("Circle, began") display.getCurrentStage():setFocus( event.target, event.id ) event.target.isFocus = true Runtime:addEventListener("enterFrame", isTouchingCircle) elseif event.target.isFocus then if event.phase == "moved" then print("Circle, moved") end if event.phase == "ended" or event.phase == "cancelled" then print("Circle, ended") Runtime:removeEventListener( "enterFrame", isTouchingCircle ) display.getCurrentStage():setFocus(event.target, nil ) event.target.isFocus = false end end end circle:addEventListener("touch", circleTouchFunc)