RE: dummy rootless question...
Pierre CHATEL wrote: i can't figure out wich config file to edit in order to get X11 with Window Maker running in rootless mode (i already use wmaker). I saw that -rootless was an option to XWin but how to pass it to XWin at wmaker startup. In .xinitrc ?? I prefer this mechanism: I use startx to start X Windows, either from the command line or from a Windows shortcut with the following Target: C:\cygwin\usr\X11R6\bin\run.exe C:\cygwin\bin\bash.exe --login -c startx In my home directory, the files .xserverrc and .xinitrc initialize the X server and X clients, respectively. My .xserverrc contains: exec X -rootless -nowinkill -emulate3buttons 50 My .xinitrc contains: xrdb -load $HOME/.Xdefaults exec wmaker -Jerry
RE: Window Maker received signal 11
Patrick Knodle wrote: I just installed the latest version of XFree86 and made 2 changes to the startxwin.bat file to access our servers. When I open this file I get the message: I think I saw this when I was using text-mounted file systems. Switching to binary mounts corrected it for me. I'm pretty sure this is in a FAQ someplace. Or you can always search/google the archives. -Jerry
Removing focus from X
I had meant to try this, but I'm having some build problems at the moment. I backed out my patch, and found that the build still fails on the CVS snapshot I took 2 weeks ago. It reports this error when I run make in xc/programs/Xserver: [...] gcc -o XWin.exe -O2 -fno-strength-reduce -Wall -Wpointer-arith -mwindows -e _ma inCRTStartup -L../../exports/lib hw/xwin/stubs.o hw/xwin/XWin.resdix /libdix.a os/libos.a ../../exports/lib/libXau.a ../../exports/lib/libXdmcp.a hw /xwin/libXwin.a fb/libfb.a dix/libxpstubs.a mi/libmi.a Xext/libext.a xkb/libxkb. a Xi/libxinput.albx/liblbx.a ../../lib/lbx util/liblbxutil.a dbe/libdbe.a record/librecord.aXTrap/libxt rap.a GL/glx/libglx.aGL/mesa/GLcore/libGLcore.a render/librender.a miext/shadow/libshadow.ahw/xfree86/parser/libxf 86config.a -L/usr/X11R6/lib../../lib/font/libXfont.a dix/libxpstubs.a -lfr eetype -L../../exports/lib -lXext -lX11 -lz.dll -lgdi32 -Wl, --enable-auto-import hw/xwin/libXwin.a(winscrinit.o)(.text+0x9ce):winscrinit.c: undefined reference to `_LayerStartInit' hw/xwin/libXwin.a(winscrinit.o)(.text+0xa2e):winscrinit.c: undefined reference to `_LayerFinishInit' hw/xwin/libXwin.a(winlayer.o)(.text+0xa9):winlayer.c: undefined reference to `_LayerCreate' hw/xwin/libXwin.a(winlayer.o)(.text+0xfd):winlayer.c: undefined reference to `_LayerWindowAdd' hw/xwin/libXwin.a(winlayer.o)(.text+0x15d):winlayer.c: undefined reference to `_LayerWindowRemove' collect2: ld returned 1 exit status make: *** [XWin.exe] Error 1 Was there a problem with the CVS snapshot, or am I just doing something wrong? Any ideas? Anyway, here are the changes that I had made to the file xc/programs/Xserver/hw/xwin/winwndproc.c: Index: xc/programs/Xserver/hw/xwin/winwndproc.c === RCS file: /cvs/xc/programs/Xserver/hw/xwin/winwndproc.c,v retrieving revision 1.23 diff -u -1 -0 -r1.23 winwndproc.c --- xc/programs/Xserver/hw/xwin/winwndproc.c2002/10/17 08:18:25 1.23 +++ xc/programs/Xserver/hw/xwin/winwndproc.c2002/11/14 17:36:39 -29,20 +29,40 * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II * MATSUZAKI Kensuke */ /* $XFree86: xc/programs/Xserver/hw/xwin/winwndproc.c,v 1.23 2002/10/17 08:18:25 alanh Exp $ */ #include win.h #include commctrl.h +#define KILL_FOCUS_ENHANCEMENT +#ifdef KILL_FOCUS_ENHANCEMENT + +#define INCLUDE_XLIB_WORKAROUND +#ifdef INCLUDE_XLIB_WORKAROUND +typedef void Display; + +extern Display *XOpenDisplay( +const char*/* display_name */ +); + +extern void XSetInputFocus( +Display* /* display */, +Window /* focus */, +int/* revert_to */, +Time /* time */ +); +#endif /* INCLUDE_XLIB_WORKAROUND */ +#endif /* KILL_FOCUS_ENHANCEMENT */ + BOOL CALLBACK winChangeDepthDlgProc (HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); /* * Called by winWakeupHandler * Processes current Windows message */ -831,20 +851,33 case WM_KILLFOCUS: if (s_pScreenPriv == NULL || s_pScreenInfo-fIgnoreInput) break; /* Store the state of all mode keys */ winStoreModeKeyStates (s_pScreen); /* Release any pressed keys */ winKeybdReleaseKeys (); + +#ifdef KILL_FOCUS_ENHANCEMENT + /* Remove focus from all X windows (crude implementation) */ + { + Display *display = XOpenDisplay(NULL); + + if (display) + { + /* Revert is ignored... */ + XSetInputFocus(display,None,RevertToNone,CurrentTime); + } + } +#endif /* KILL_FOCUS_ENHANCEMENT */ return 0; #if WIN_NEW_KEYBOARD_SUPPORT case WM_SYSKEYDOWN: case WM_KEYDOWN: case WM_SYSKEYUP: case WM_KEYUP: if (s_pScreenPriv == NULL || s_pScreenInfo-fIgnoreInput) break; As you can see, it simply sets the input focus to NONE when the KILLFOCUS event is received. Does this sound like a reasonable approach? Sorry about the weird declarations at the top--if you try to #include X11/Xlib.h in this file, you get some duplicate declarations (another thing for me to look into). I'm not sure if anything needs to be done with the SETFOCUS event or not--I figured I'd try this change out first. For mouse-initiated focus changes, I would expect the focus to be updated anyway. I suppose alt-tab initiated changes may not get the focus updated (I haven't tracked it through). Perhaps a WarpCursor call could be added to SETFOCUS (if needed). -Jerry
Re: Removing focus from X
Thanks Harold, that change to win.h did the trick. Too bad my patch didn't work as well. :-( As per Harold's advice, I added a call to XCloseDisplay(). Here is the revised (still crude) patch to winwndproc.c: Index: winwndproc.c === RCS file: /cvs/xc/programs/Xserver/hw/xwin/winwndproc.c,v retrieving revision 1.23 diff -u -1 -0 -r1.23 winwndproc.c --- winwndproc.c2002/10/17 08:18:25 1.23 +++ winwndproc.c2002/11/14 21:19:55 -29,20 +29,44 * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II * MATSUZAKI Kensuke */ /* $XFree86: xc/programs/Xserver/hw/xwin/winwndproc.c,v 1.23 2002/10/17 08:18:25 alanh Exp $ */ #include win.h #include commctrl.h +#define KILL_FOCUS_ENHANCEMENT 1 +#if KILL_FOCUS_ENHANCEMENT + +#define INCLUDE_XLIB_WORKAROUND 1 +#if INCLUDE_XLIB_WORKAROUND +typedef void Display; + +extern Display *XOpenDisplay( +const char*/* display_name */ +); + +extern void XSetInputFocus( +Display* /* display */, +Window /* focus */, +int/* revert_to */, +Time /* time */ +); + +extern int XCloseDisplay( +Display* /* display */ +); +#endif /* INCLUDE_XLIB_WORKAROUND */ +#endif /* KILL_FOCUS_ENHANCEMENT */ + BOOL CALLBACK winChangeDepthDlgProc (HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); /* * Called by winWakeupHandler * Processes current Windows message */ -831,20 +855,34 case WM_KILLFOCUS: if (s_pScreenPriv == NULL || s_pScreenInfo-fIgnoreInput) break; /* Store the state of all mode keys */ winStoreModeKeyStates (s_pScreen); /* Release any pressed keys */ winKeybdReleaseKeys (); + +#if KILL_FOCUS_ENHANCEMENT + /* Remove focus from all X windows (crude implementation) */ + { + Display *display = XOpenDisplay(NULL); + + if (display) + { + /* Revert is ignored... */ + XSetInputFocus(display,None,RevertToNone,CurrentTime); + XCloseDisplay(display); + } + } +#endif /* KILL_FOCUS_ENHANCEMENT */ return 0; #if WIN_NEW_KEYBOARD_SUPPORT case WM_SYSKEYDOWN: case WM_KEYDOWN: case WM_SYSKEYUP: case WM_KEYUP: if (s_pScreenPriv == NULL || s_pScreenInfo-fIgnoreInput) break; === However, in -rootless mode, the patch doesn't seem to make any difference. And without -rootless, all of X seems to hang as soon as I launch wmaker (I'm using WindowMaker as my current window manager). I realize that the patch needs cleaning up, but I wasn't expecting the results I saw. Any thoughts? -Jerry
Re: rootless mode and mousing to other windows
So how was it that you start rootless mode again? Just kidding. I guess I should have mentioned that I was about to go on vacation for over a week after I sent my last message. My impression of XOpenWin was that it was going to replace the low-level graphic calls from Windows with calls to X. Ambitious, but sounds like a great deal of overhead. This does solve some of the problems you'll run into trying to get Windows to manage X applications, though. I'll have to join the win32-x11 mailing list and see what's happening there. The current direction you're taking is to allow Windows to manage the X windows (please keep this a separate feature from -rootless). I hope somebody's thinking about keeping this compatible with XOpenWin, since there could be some serious benefits to using both together. There are a number of other ways that integration between Windows and X could have been approached, although these are the most straightforward approaches. Both approaches wrap everything of interest, albeit at opposite ends (and the end results look totally different). But right now I'm interested in something much simpler: just removing focus from all windows when X itself loses focus. I've looked at this briefly, but I'd better follow up in another e-mail, rather than causing this thread to fork too much. -Jerry
RE: wmaker signal 11
Vikram [mailto:[EMAIL PROTECTED]] wrote: I downloaded cygwin afresh on a new box yesterday. For the first time decided to try out wmaker.exe wmaker got signal 11 everytime I started. I had similar problems at first. I believe I had to switch to a binary mount point. Something like this: $ mount -f -s -b C:/cygwin / But make sure you know what you're doing before you try it. :-) -Jerry
RE: Trackpoint support?
Harold Hunt wrote: In this case you're going to have to do some investigation to find out how the Trackpoint driver emulates a mouse wheel. Done. I found out that there is a special configuration file for the trackpoint driver. It's in /WINNT/System32/tp4table.dat in my case, although it looks like in the beta driver they've renamed it to tp4scrol.dat. The beta driver's at http://wwwcssrv.almaden.ibm.com/trackpoint (thanks to Scott Brim for the reference), although I was able to make my current driver work. I simply added the following to the end of the Pass 0 rules in that configuration file and rebooted: ; X Windows *,*,XWin.exe,*,*,cygwin/xfree86,WheelStd,0,9 That tells the driver to use Wheel messages as opposed to whatever it normally does. Since the driver is capable of scrolling in both directions, it probably does look for the scrollbars by default. I was guessing a bit about what to put in this entry, although that one seems to work. Unfortunately, this doesn't allow the button to work as a middle button as well, but -emulate3buttons works for me. -Jerry
Trackpoint support?
I'm using an IBM T21 Thinkpad w/Win2K Cygwin/XFree86 4.2.0 installed via Cygwin setup: My computer has a trackpoint mouse and a third button that is supposed to let it scroll like an enhanced wheel. But it doesn't work under X. Has anyone already looked into making something like this work under Cygwin/XFree86? I didn't find anything in the FAQ/Manual. Google came up with a number of solutions for Linux/XFree86, but all required new drivers. Perhaps I need a Windows driver that makes it look more like a wheel mouse? The latest driver from IBM doesn't help (I'm not sure how it scrolls, though--it can scroll on both axes). I think the driver at http://rsim.cs.uiuc.edu/~sachs/tp-scroll/ does what I want (allowing the scroll button to double as a middle button), but again that's for Linux. I could live with using -emulate3buttons and just using the scroll button for scrolling. For now, I turn the scroll button into a middle button. I didn't find any info on turning middle-button/mouse-moves into scroll actions, but that would be another way to approach the problem. -Jerry
RE: Best place for WindowMaker, Openbox, etc.?
Harold Hunt wrote: Hmm... the problem I'm running into with fvwm95 is that I can't do a build from a directory other than the source root Probably true. I didn't look into it more than being able to compile and run from the source directory. IIRC, I still got a number of warnings about DLL auto-imports and the like. I didn't even try changing the prefix from /usr/local. (I'm no autotools expert, either.) I was building from a complete Cygwin installation--with all of the tools kept current but without extension libraries/etc. from other sources. BTW, WindowMaker exits with a SEGV on our systems. I haven't looked into it, but verified the problem on multiple systems so it's not isolated to my machine (all IBM laptops running Win2K/Cygwin, though). In all cases, wmaker begins to run and starts creating icons, etc., then throws up a screen reporting that it received a signal 11. I haven't had time to look into it yet. (I got similar behavior from X11 GVIM until I rebuilt it specifically excluding GTK, although that's probably just a coincidence.) The other window managers in the Cygwin dist (openbox, twm) run fine. Fvwm95 seems to work, but I haven't really been using it (before I put much effort into tweaking it, I'd like to check out some other window managers). -Jerry -O Gerald S. Williams, 55A-134A-E : mailto:[EMAIL PROTECTED] O- -O AGERE SYSTEMS, 6755 SNOWDRIFT RD : office:610-712-8661 O- -O ALLENTOWN, PA, USA 18106-9353: mobile:908-672-7592 O-