Flag is hided if open sub-window

I use xxk for keyboard layout. In default config of fvwm with RightPanel I include flag of layout

 *RightPanel: (Id kbd, 108x73, Padding 5 5, Swallow(UseOld, NoKill, NoHints) "XXkb" 'Exec exec xxkb', Frame 0)   

with following config of xxkb

XXkb.mainwindow.type: top
XXkb.mainwindow.enable: yes
XXkb.mainwindow.in_tray: no
XXkb.mainwindow.label.enable: no
XXkb.mainwindow.geometry: 108x73-6-930
XXkb.mainwindow.border.width: 2
XXkb.mainwindow.border.color: red
XXkb.image.path: /home/nail/.icons/flags/xxkb
XXkb.mainwindow.image.1: us.xpm
XXkb.mainwindow.image.2: ru.xpm
XXkb.mainwindow.image.3: br.xpm
XXkb.mainwindow.image.4:
XXkb.button.enable: no
XXkb.mousebutton.1.enable: no
XXkb.ignore.reverse: yes
XXkb.controls.two_state: no
XXkb.controls.add_when_create: yes
XXkb.controls.add_when_change: yes

But I have strange behavior of flag. When I open sub-window (for example in window geany I open “about program”) the flag disappears. I verified, in fact, it appears below panel and all opened windows. I do not understand how to solve this problem. Any ideas?

I found by myself the reason of this problem. Maybe it will help for somebody.
Change XXkb.mainwindow.type: top to XXkb.mainwindow.type: normal.
But till now there is no border around. I changed size the place and changed size of icon - there is no border in any case.