[Wsmanager-devel] Re: WS Manager -> X11 bridge
Status: Alpha
Brought to you by:
richwareham
From: Nathaniel G. <n8...@gm...> - 2004-07-27 05:45:10
|
Hello again, I'm almost ready to do a first release of the X11 Bridge plugin but I'm missing one vital feature. When the user warps a window to another desktop it doesn't cause any X11 event to be sent, so there's no way to detect it from the X11 side. I've poked through the DM code a bit to try to figure out what notification might be sent when this happens, but it's not obvious to me if such a notification exists. It looks like maybe there are notifications for "warp to next/prev workspace" but I don't see how this covers warping a window from workspace 1 to workspace 3, for example. Furthermore, I don't see how to figure out which window got warped. What I would really like is a notification NOTIFICATION_WINDOWWARPED that carries a pointer to the ForeignWindow that warped and the index of the workspace it warped to. With that information it hopefully won't be too tough to figure out if the window was an X11 window and update the desktop hints as needed. Any suggestions? FYI, the bridge is one-way for now -- X11 apps are made aware of the current workspace and which workspace they're on but they can't initiate workspace switches. That should be possible in a future release, meaning you'll be able to use one of the 5 billion X11 desktop pagers if you want to. :-) Thanks, -n8 On Tue, 20 Jul 2004 21:40:10 -0700, Nathaniel Gray <n8...@gm...> wrote: > Hello, > > I'm a big fan of Desktop Manager but there's one thing about it that > I'd like to try to improve on, namely integration with X11. Unlike OS > X applications, X11 applications are routinely used in multi-desktop > environments and many of them are multi-desktop-aware. As an example, > take NEdit. The upcoming 5.5 release supports tabbed editing. If you > open a document and there's not a window on the current desktop then > it will open in a new window on the current desktop. Otherwise, it > will open the document as a tab in a window on your current desktop. > (Of course this behavior is customizable.) On OS X with Desktop > Manager it cannot figure out what desktop it's on, so this smart > behavior is not possible. > > It's actually really easy to support this capability, but it requires > a program linked with the X11 libraries. We obviously don't want to > link WS Manager with X11, so I'm envisioning a small daemon, call it > dmx11d, that makes the necessary X11 library calls and watches for > interesting X11 events. > > I have a pretty good idea of how to write dmx11d, but I don't know how > to integrate it with DM itself. It will at least need to be able to > find out: > 1. How many desktops there are > 2. What the current desktop is > 3. What desktop a given OS X window (specified by window ID) is on. > Alternately, a data structure mapping window ID to desktop. > > It will also need to be notified when any of the above things change. > > Can anybody suggest where in DM's code I should look to get this done? > Also, is there a simple way of doing inter-process procedure calls on > OS X? > > Any constructive feedback is welcome, > Cheers, > -n8 > > -- > >>>-- Nathaniel Gray -- Caltech Computer Science ------> > >>>-- Mojave Project -- http://mojave.cs.caltech.edu --> > -- >>>-- Nathaniel Gray -- Caltech Computer Science ------> >>>-- Mojave Project -- http://mojave.cs.caltech.edu --> |