WINGs: fix WPrefs not launching in X11 mode
Three issues prevented WPrefs from being managed by wmaker in X11:
1. W_X11OpenDisplay: XOpenDisplay("") fails; treat empty string as NULL
so it falls back to DISPLAY env var.
2. wevent_x11.c/wevent.c: MapRequest and ConfigureRequest events must
bypass WINGs view lookup (both _view_target in x11_fetch and
W_GetViewForWindow in WMHandleEvent) to reach DispatchEvent via
extraEventHandler.
3. wview_x11.c: x11_create_root must use RootWindow() not
scr->rootWin (which may be an intermediate window created by
RCreateContext for non-default visuals). Otherwise toplevel
WINGs windows are created as children of the wrong parent and
their MapRequest never reaches the WM.
This commit is contained in:
parent
8700f9a955
commit
db8cd0ea34
|
|
@ -196,7 +196,7 @@ int WMHandleEvent(WMEvent * event)
|
|||
|
||||
/* Look up the WINGs view for this event via the view backend. */
|
||||
view = (W_View *)event->_view_target;
|
||||
if (!view) {
|
||||
if (!view && event->type != WME_MAP_REQUEST && event->type != WME_CONFIGURE_REQUEST) {
|
||||
extern W_View *W_GetViewForWindow(WNativeWindow id);
|
||||
view = W_GetViewForWindow((WNativeWindow)window);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,11 @@ static void x11_create_root(void *vctx, W_View *view)
|
|||
{
|
||||
W_Screen *scr = (W_Screen *)vctx;
|
||||
|
||||
view->window = scr->rootWin;
|
||||
/* Always use the real root window as parent for toplevel windows,
|
||||
* even when RContext->drawable is an intermediate window created
|
||||
* for a non-default visual. Otherwise MapRequest won't reach the
|
||||
* window manager (which selects SubstructureRedirect on root). */
|
||||
view->window = RootWindow(scr->display, scr->screen);
|
||||
view->size.width = WidthOfScreen(ScreenOfDisplay(scr->display, scr->screen));
|
||||
view->size.height = HeightOfScreen(ScreenOfDisplay(scr->display, scr->screen));
|
||||
}
|
||||
|
|
|
|||
BIN
core.177174
BIN
core.177174
Binary file not shown.
BIN
core.877872
BIN
core.877872
Binary file not shown.
26
wprefs.log
26
wprefs.log
|
|
@ -1,4 +1,22 @@
|
|||
; WPrefs
|
||||
Fontconfig warning: using without calling FcInit()
|
||||
WPrefs(registry_handle_global(wclient_wl.c:1132)): warning: wclient_wl: bound wmaker_popup_manager_v1
|
||||
WPrefs(xdg_toplevel_handle_close(wclient_wl.c:368)): warning: wclient_wl: xdg_toplevel_handle_close fired for view=0x20000001
|
||||
W_X11OpenDisplay: display="" calling XOpenDisplay...
|
||||
W_X11OpenDisplay: XOpenDisplay returned 0x55c91220c1a0
|
||||
W_X11OpenDisplay: calling WMCreateSimpleApplicationScreen...
|
||||
W_X11OpenDisplay: WMCreateSimpleApplicationScreen returned 0x55c91221e220
|
||||
WPrefs: WMOpenScreen returned 0x55c91221e220
|
||||
WPrefs: calling Initialize...
|
||||
WPrefs: Initialize done, entering event loop
|
||||
W_X11OpenDisplay: display="" calling XOpenDisplay...
|
||||
W_X11OpenDisplay: XOpenDisplay returned 0x56054383e1a0
|
||||
W_X11OpenDisplay: calling WMCreateSimpleApplicationScreen...
|
||||
W_X11OpenDisplay: WMCreateSimpleApplicationScreen returned 0x560543850220
|
||||
WPrefs: WMOpenScreen returned 0x560543850220
|
||||
WPrefs: calling Initialize...
|
||||
WPrefs: Initialize done, entering event loop
|
||||
W_X11OpenDisplay: display="" calling XOpenDisplay...
|
||||
W_X11OpenDisplay: XOpenDisplay returned 0x5617f63571a0
|
||||
W_X11OpenDisplay: calling WMCreateSimpleApplicationScreen...
|
||||
W_X11OpenDisplay: WMCreateSimpleApplicationScreen returned 0x5617f6369220
|
||||
WPrefs: WMOpenScreen returned 0x5617f6369220
|
||||
WPrefs: calling Initialize...
|
||||
WPrefs: Initialize done, entering event loop
|
||||
X connection to :3 broken (explicit kill or server shutdown).
|
||||
|
|
|
|||
Loading…
Reference in New Issue