-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ioquake3 fails to create window #23
Comments
0ad also fails with the same error, though the serial numbers are different. |
This seems related to this issue from SDL: X_setInputfocus BadMatch 42. It mentions needing to call |
Strange, doesn't seem to fix it. |
Hey @morgant Hope you don't mind, but I took a look at this (since you seem to be using fvwm to crib from), and I think all you need to do is make I've not tested the below, but I believe it should work for you: % git diff
diff --git a/mlvwm/mlvwm.c b/mlvwm/mlvwm.c
index b39be9f..f4cfdac 100644
--- a/mlvwm/mlvwm.c
+++ b/mlvwm/mlvwm.c
@@ -293,6 +293,9 @@ Atom _XA_WM_PROTOCOLS;
Atom _XA_WM_TAKE_FOCUS;
Atom _XA_WM_DELETE_WINDOW;
Atom _XA_WM_DESKTOP;
+Atom _NET_SUPPORTING_WM_CHECK;
+Atom _NET_WM_NAME;
+Atom utf8string;
void InternUsefulAtoms (void)
{
@@ -307,6 +310,9 @@ void InternUsefulAtoms (void)
_XA_WM_TAKE_FOCUS = XInternAtom (dpy, "WM_TAKE_FOCUS", False);
_XA_WM_DELETE_WINDOW = XInternAtom (dpy, "WM_DELETE_WINDOW", False);
_XA_WM_DESKTOP = XInternAtom (dpy, "WM_DESKTOP", False);
+ _NET_SUPPORTING_WM_CHECK = XInternAtom (dpy, "_NET_SUPPORTING_WM_CHECK", False);
+ _NET_WM_NAME = XInternAtom(dpy, "_NET_WM_NAME", False);
+ utf8string = XInternAtom(dpy, "UTF8_STRING", False);
return;
}
@@ -681,6 +687,13 @@ int main( int argc, char *argv[] )
CreateMenuBar();
LoadDefaultFonts();
+ XChangeProperty(dpy, Scr.NoFocusWin, _NET_SUPPORTING_WM_CHECK, XA_WINDOW, 32,
+ PropModeReplace, (unsigned char *) &Scr.NoFocusWin, 1);
+ XChangeProperty(dpy, Scr.NoFocusWin, _NET_WM_NAME, utf8string, 8,
+ PropModeReplace, (unsigned char *) "mlvwm", 5);
+ XChangeProperty(dpy, Scr.Root, _NET_SUPPORTING_WM_CHECK, XA_WINDOW, 32,
+ PropModeReplace, (unsigned char *) &Scr.NoFocusWin, 1);
+
if( Scr.flags & DEBUGOUT )
DrawStringMenuBar( "Read Config File !" );
ReadConfigFile( config_file? config_file : CONFIGNAME ); |
@ThomasAdam Huge thanks for your taking the time to look into this and propose a fix! I know that MLVWM is very behind on supported XAtoms (it's based on fvwm from 1997 or so) and I didn't even think to investigate that as a potential cause in this particular case. Your proposed fix does allow Would you mind pointing me to where in the SDL2 source you found how it determines whether it's using a WM? Only if it's easy for you to find again, of course. The reason I ask is, OpenBSD's version of fvwm 2.xx (which I'm comparing with both because that's what I'm testing against and because it still has a license compatible with MLVWM's), doesn't use any of the Again, I can't thank you enough for assisting with this as it pointed me in the right direction and gave me a massive head start. |
@ThomasAdam Looks like I found the SDL X11 WM code here, so no need to answer that question for me: https://github.com/libsdl-org/SDL/blob/main/src/video/x11/SDL_x11window.c |
No problem. Glad it proves the general idea (I really hadn't done much more than write the code in the correct place, so I'm pleased you didn't end up on a wild-goose chase). I think your first task should be getting some level of EWMH support in to http://fvwm-ewmh.sourceforge.net/
That's going to be unrelated to the XAtom's I've introduced, but might now be because there's other EWMH-specific things which have been "unlocked" by having
Well, OpenBSD's version of fvwm2 in base likely has a few other things in it, although I am not clear what (I've not checked what's in Xenocara in a while). I wouldn't necessarily waste your time trying to figure that out. In terms of SDL, sure. Have a look here (
Further on, in
Which is where you were seeing those
|
ioquake3 fails to create a window with the following logged to the terminal:
The text was updated successfully, but these errors were encountered: