I am from Northern Italy, close to the border with Slovenia.
I saw this thing today on the window, and was sure it was a piece of a dry rosmarine branch carried there by the wind - until it started to move.
It looks like a cocoon of some kind, on the top of it there is an opening from which a head of something like a caterpillar comes out, sometimes together with some portion of its body with two (?) tiny legs on each of its body "segments". But I imagined cocoons as something attached to a branch, not moving.. While this thing moved from one point of the window to another, always attached to the window (not using what I think are the caterpillar's legs). (I must admit I am reluctant to open the window and examine it from a closer range :) ; the photograph is taken from inside the house).
What can this insect be? (the length is around 4-5 cm)