x11: resize fake leader window to panel dimensions before reparenting
x11_fake_leader_create() creates a 10x10 parent window, but the original code created each parent at the correct pwidth x pheight. When the WINGs panel is reparented into a 10x10 parent, X11 clips child windows to parent bounds, making dialog contents invisible. wWindowConfigure never resizes the client because client.width is pre-set to the correct value, so resize evaluates to false. Add wm_backend->window_resize() on the parent immediately after fake_leader_create in all 9 callers that reparent content into it: dialog.c (7), winspector.c (1), dockedapp.c (1). The window.c group-leader caller is unaffected (size irrelevant).
This commit is contained in:
parent
95b0b8ee7c
commit
42e07acc4f
|
|
@ -81,6 +81,7 @@ int wMessageDialog(WScreen *scr, const char *title, const char *message, const c
|
|||
pheight = WMWidgetHeight(panel->win);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
||||
|
|
@ -139,6 +140,7 @@ int wExitDialog(WScreen *scr, const char *title, const char *message, const char
|
|||
WMMapWidget(saveSessionBtn);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
||||
|
|
@ -448,6 +450,7 @@ int wAdvancedInputDialog(WScreen *scr, const char *title, const char *message, c
|
|||
pheight = WMWidgetHeight(p->panel->win);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
wm_backend->window_select_events((WNativeWindow)parent, KeyPressMask | KeyReleaseMask);
|
||||
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(p->panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
|
@ -504,6 +507,7 @@ int wInputDialog(WScreen *scr, const char *title, const char *message, char **te
|
|||
pheight = WMWidgetHeight(panel->win);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
wm_backend->window_select_events((WNativeWindow)parent, KeyPressMask | KeyReleaseMask);
|
||||
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
|
@ -1022,6 +1026,7 @@ Bool wIconChooserDialog(WScreen *scr, char **file, const char *instance, const c
|
|||
WMMapSubwidgets(panel->win);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
||||
|
|
@ -1479,6 +1484,7 @@ void wShowInfoPanel(WScreen *scr)
|
|||
WMMapSubwidgets(panel->win);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
||||
|
|
@ -1586,6 +1592,7 @@ void wShowLegalPanel(WScreen *scr)
|
|||
WMMapSubwidgets(panel->frame);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
center = getCenter(scr, pwidth, pheight);
|
||||
wwin = wManageInternalWindow(scr, parent, None, _("Legal"), center.x, center.y, pwidth, pheight);
|
||||
|
|
|
|||
|
|
@ -380,6 +380,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
|
|||
updateSettingsPanelIcon(panel);
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
|
||||
wm_backend->window_select_events((WNativeWindow)parent, KeyPressMask | KeyReleaseMask);
|
||||
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
|
|
|||
|
|
@ -1214,6 +1214,7 @@ static InspectorPanel *createInspectorForWindow(WWindow *wwin, int xpos, int ypo
|
|||
}
|
||||
|
||||
parent = (Window)wm_backend->fake_leader_create(scr);
|
||||
wm_backend->window_resize((WNativeWindow)parent, PWIDTH, PHEIGHT);
|
||||
wm_backend->window_select_events((WNativeWindow)parent, KeyPressMask | KeyReleaseMask);
|
||||
panel->parent = parent;
|
||||
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue