i am using allegro 5.0.10 , and i am trying to create a sub display , a normal display that my classes treats as a sub window of a parent one , the problem is all drawing operation made on that child window are not visible until i move it (shake it , move it 2 times go and back) . i am wondering , what are the correct flags and options i need to use to let the sub window draws correctly

You'll note that al_flip_display() doesn't take any parameters, like a display. This means it is operating on globally stored data, in this case, the currently active display. al_set_target_backbuffer(display); will change the currently active display.