fix: realize dialog panel before client_reparent so WMWidgetXID returns a valid view ID
This commit is contained in:
parent
c968c0b6f9
commit
59088e2f86
|
|
@ -83,6 +83,8 @@ int wMessageDialog(WScreen *scr, const char *title, const char *message, const c
|
|||
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
|
||||
/* Realize so WMWidgetXID is valid before reparent */
|
||||
WMRealizeWidget(panel->win);
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
||||
center = getCenter(scr, pwidth, pheight);
|
||||
|
|
@ -142,6 +144,8 @@ int wExitDialog(WScreen *scr, const char *title, const char *message, const char
|
|||
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
|
||||
/* Realize so WMWidgetXID is valid before reparent */
|
||||
WMRealizeWidget(panel->win);
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
||||
center = getCenter(scr, pwidth, pheight);
|
||||
|
|
@ -510,6 +514,8 @@ int wInputDialog(WScreen *scr, const char *title, const char *message, char **te
|
|||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
wm_backend->window_select_events((WNativeWindow)parent, WM_EVMASK_KEY_PRESS | WM_EVMASK_KEY_RELEASE);
|
||||
|
||||
/* Realize so WMWidgetXID is valid before reparent */
|
||||
WMRealizeWidget(panel->win);
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
||||
center = getCenter(scr, pwidth, pheight);
|
||||
|
|
|
|||
Loading…
Reference in New Issue