Improve window/tab creation/update detection

Signed-off-by: Eli Skeggs <skeggse@gmail.com>