Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!uwmacc!uwmcsd1!ig!jade!violet.berkeley.edu!jkh From: jkh@violet.berkeley.edu (Jordan K. Hubbard) Newsgroups: comp.windows.x Subject: hacking on uwm (V11) Message-ID: <6037@jade.BERKELEY.EDU> Date: Mon, 23-Nov-87 15:41:01 EST Article-I.D.: jade.6037 Posted: Mon Nov 23 15:41:01 1987 Date-Received: Thu, 26-Nov-87 19:46:00 EST Sender: usenet@jade.BERKELEY.EDU Reply-To: jkh@violet.berkeley.edu (Jordan K. Hubbard) Organization: University of California, Berkeley Lines: 85 I've been hacking on Your Favorite Window Manager and Mine :-), uwm to add title bars, autoraise and various other dubiously useful features. I'd like to get some comments on the hacks (to see if anyone has better ideas, or just plain hates these for some reason) and then describe some of the problems I'm having. There are some new "variables" that uwm lets you set: [no]resizeobscure -- Makes the resize popup window sit on the resized window (the way it is now) or the upper left corner of the screen (like mapwindow popups). [no]titles -- Put title frobs on all windows that aren't icons, overriding map redirect or InputOnly. titlefont -- Set the font to use for titles. [no]autoraise -- Annoyingly raise windows on focus like the old xterm. By default, the text portion of the title is centered. I'll add an option to put it elsewhere if someone gives me a good enough reason. I'm also currently doing the title bar manipulation myself, though if someone can give me a good enough reason to use the toolkit (and let me know the heck I'm supposed to get the event processing stuff to cooperate without major re-write) I'll use that. I've added a hack that allows you to set boolean variables from menus. I.E. The following is now possible: menu = "MISC OPS" { "Nozap": nozap "zap": zap "noobscure": noresizeobscure "Focus": f.focus # for context } If anyone can think of a case where setting numerics and strings(!) is useful, let me know. I added numerics, but the grammer for was a little gross so I took then back out. One prefers to have yacc check the legality of these things before they ever get executed, since uwm may be backgrounded somewhere by then. Functionality is questionable for all but booleans (and even then..) since the values are merely changed, nothing else is notified. Changing a font on the fly would do nothing, for example, since they're all allocated on startup. Now for the PROBLEMS.. For AutoRaise: Let me know if I'm wrong, but by default the focus is in whatever window contains the pointer, yes? So, wouldn't it follow to assume that a window would get FocusIn and FocusOut events for this? Nope. How about at least knowing when the Focus is grabbed? Yeah.. that works. but hmmm. This is strange. I get a FocusIn when I do an XSetInputFocus on my window, but when I do the SetFocus on another window afterwards, I get no FocusOut on the original! Yuck! Why is this? In my case, I just wanted to select a FocusChangeMask on the rootwindow and (hopefully) know when any children got or lost the focus. Zilch. Ok, so we forget about that for the moment and use Enter/Leave for the more trival pointer-focus case. Well. Just how do I see the Enter/Leaves for everybody? uwm already selects Substructure{Notify,Redirect}Mask on the RootWindow, but that doesn't pass up Enter/Leave events, so I also selected Enter/Leave for the RootWindow, which naturally worked only when you went from the root into a child or vice/versa. How do I know when I leave one sibling for another? No events are generated for the root window, that's for sure. I know I could solve all (the enter/leave, not the focus) this by reparenting everyone and selecting for all the parents, but I really don't want to do that unless the person has selected title bars. I'd like each option to do only what's necessary to make itself work and not depend on any other options being set. Of course, if that's the only possible way to make it work, then I guess uwm is just going to reparent the world whether it likes it or not. Am I missing something really big? I've read the event section of the Xlib manual more times than I care to count. Jordan Hubbard U.C. Berkeley P.S. with the exception of autoraise, everything should be releasable in a day or so.