[Thread Prev][Thread Next]   >Date Index >Thread Index

Re: [wmx] wmx a winner? Window managers in BBC Internet Services.

Damion Yates - Thu Sep 20 16:26:16 2001

On Wed, 19 Sep 2001, Chris Cannam wrote:

> Damion Yates wrote:
> 
> > wmx: 3

> > evilwm: 2 (evilwm.sourceforge.net - a WM written by a member of I.S.)
> 
> Never used this, but the screenshot shows some rather neatly tiled windows.
> Is that just because Ciaran likes to tile his windows neatly, or does
> evilwm implement some tiling algorithm?

It's just that Ciaran likes to just tile his windows neatly, however this is
made very easy with evilwm's keyboard controls they allow things like "throw
focused window to very top left egde of screen" or "throw focused window to
very bottom left of screen" with a few contorted meta keys that make emacs
look easy :)

It's very useable with no mouse unlike many other WMs.

> > olwm: 2
> 
> Well, I like olwm a lot.

Me too.  It was my choice for years, however I've now tied myself more and
more to wmx.  I badly miss wmx features like the cool channel numbers and
style of switching channels when I try olwm from time to time, I find it a
pain to get re-used to.

> btw, that feature you were talking about having (somewhat) implemented --
> can you make a relatively small patch so we can mess around with it?

It's only a small patch - 1299 bytes - so I've included it as a .bz2 (this
includes the answers to the queries posted by O'Shaughnessy Evans).

> It'd be fine to make a patch against some older version of wmx -- whichever
> one was your base version, or whichever one gives the smallest patch.  And
> I'd say post it to the list unless it's more than a few dozen K (surely
> not!).

I've left pants down at home (pants is my home linux box) so I can't ssh in
and find the XWarpPointer() kludge I'd added above the move(e) you see below.  

This patch is from wmx-6 and is the version I'm using on my work Sparc
workstation now.

> I'm not promising to do anything with it myself, mind.

The biggest no-no is that I've used Mod1Mask rather than catching a key press
event properly, so even if I'd bothered adding ifdefs so this could be
optional in Config.h it needs fixing.

Talking of Config.h this really needs the default left button app to be
"xterm" not "/home/chris/.wmx/terminal".  

> I still have a few things I'd like to add to the manager.  I'd like an
> option for attempting to tile windows neatly on creation, rather than just
> placing them at incrementing x/y coordinates (hence my question about
> evilwm).

Ciaran's evilwm keyboard controlled window corner positioning code might be
useful, for use after the window has been placed.

> It'd have to be a fairly sophisticated algorithm to be worth the bother
> though.  And I'd like proper session-management, that saved the position
> and desktop of windows on exit (I don't run Gnome or KDE, but I think in
> any case this bit is up to the wm -- I got part way through doing this in
> Session.[Ch] a couple of years ago but never finished).

I suspect most of us just run xwininfo on all known open windows then place
the -geometry values in to an .xinitrc file.  Automating this would be really
useful, even if it was only mapping the resource names of the client at least
we'd be able to configure this slightly faster than manually.  olwm has
owplaces, which does it this way.  There is no way you can know what
applications a user has chosen to start via an xterm, and wmx encourages this
as "New" is what a new user gets on their left button, typically starting
xterm so they can do xv& etc before they learn they can fill a .wmx
directory.  Even with .wmx/* stuff you certainly can't assume people want
things like xclock in there as a pulldown option just because they want an
xclock in their default X session.

> Also a couple of bugs that irritate me: if a client deletes itself while
> you have the client menu visible (the most common culprit for me is the
> Mozilla download progress dialog) and then you roll the mouse over it on
> the menu, wmx crashes in the mad-feedback code.

I used to see this all the time when I ran Suns audiocontrol, this behaves
badly in loads of window managers, I could consistantly cause problems if I
tried to kill it any other way than clicking and waiting on the top left
corner, ^C in the term that started it or kill -SIGNAL from anywhere or even
Meta-Delete would always leave a blank line in the left button icon menu that
if you moved past would kill wmx.  I just avoided using audiocontrol.  But
now I've found wmx-6 doesn't have this bug.  I didn't know Mozilla caused it
now.

> If you leave the mouse pointer over the title bar of a window and then the
> window changes its title to something shorter, it can lose focus because
> the pointer is no longer over the shorter title bar.  And I keep meaning to
> deal with the Mozilla file selection dialog that always appears at position
> (0,0).  Reminds me of the old "UsePPosition non-zero" hack in twm ("for
> working around a bug in older toolkits").

I quite like tools doing that as throwing your mouse as far left (and up for
mozilla's dialog) is quick and easy for you to be able to move it.  It's
rarely that a random positioning of an app is where you will leave it so the
next thing is almost always a move.  realplay's statistics box does this too
and I like it as it's one of those dialog boxes with no border.

Anyway..

As the actual stuff I added for move on meta-leftclick is basically just 5
lines (god that sounds lame) I've included those parts of the diff here, it's
pretty self explanitory, sorry about not bothering with indentation, that's a
hangover from my checking peoples perl CGIs and adding code I know I can find
easily (^move finds my code in Buttons.C for example).

diff -ur wmx-6/Buttons.C wmx-6-/Buttons.C
--- wmx-6/Buttons.C     Wed Apr  4 09:58:31 2001
+++ wmx-6-/Buttons.C    Tue Jul 24 11:04:16 2001
@@ -465,6 +465,10 @@
     mapRaised();
 
+if ((e->button == Button1) && (!m_border->hasWindow(e->window))){
+move(e);
+}
+
     if (e->button == Button1) {
        if (m_border->hasWindow(e->window)) {
 
 
diff -ur wmx-6/Client.C wmx-6-/Client.C
--- wmx-6/Client.C      Fri May 12 08:40:20 2000
+++ wmx-6-/Client.C     Mon Jul 23 14:24:57 2001
@@ -214,6 +214,11 @@
         XGrabKey(display(), XKeysymToKeycode(display(), CONFIG_ALT_KEY),
                  0, m_window, True, GrabModeAsync, GrabModeAsync);
 
+//find me
+XGrabButton(display(), Button1, Mod1Mask, m_window, False, 0,
+GrabModeAsync, GrabModeSync, None, None);
+       
        for (i = 0; i < sizeof(keys)/sizeof(keys[0]); ++i) {
            keycode = XKeysymToKeycode(display(), keys[i]);
            if (keycode) {


Damion

-- 
Damion Yates - Senior Internet Operations Engineer - Internet Services
email: Damion.Yates@bbc.co.uk - phone: +44 1737 839510

Attachment: wmx.diff.bz2
Description: Binary data


Next: