Window Manager

I have a problem with the window manager
unhiding a dialog

Window state set to Ph_WM_STATE_ISHIDDEN in PhAB

code snippet:

PhWindowEvent_t event;
ApCreateModule(ABM_mymodule, NULL, NULL);
mywindow = ApGetInstance(ABW_mymodule);
memset(&event, 0, sizeof(event));
event.event_f = Ph_WM_HIDE;
event.event_state = Ph_WM_EVSTATE_UNHIDE;
event.rid = PtWidgetRid(mywidget);
PtForwardWindowEvent(&event);

Window doesn’t show?
photon 1.14, 6.2.1
Any ideas?