Subject: FVWM: per window autoraise?

From: Michael Hirsch <[email-masked]>
Date: Tue, 8 Oct 1996 14:27:17 -0400 (EDT)

Wile I'm on the subject of autoraise, twm (and variants) have per
window autoraise.  You can dynamically toggle autoraise on a window as
well as have a default behavior.  

I would really love this.  Sometimes there is a window that I really
don't want to autoraise, but usually I want to.  Is there any way to
do this with fvwm?

Thanks,

-- 
Michael Hirsch				Work: (404) 727-7940 
Emory University, Atlanta, GA 30322	FAX: (404) 727-5611
Internet:  [email-masked]	BITNET: [email-masked]
UUCP: {rutgers,gatech}!emory!hirsch	http://www.mathcs.emory.edu/~hirsch/

Public key for encrypted mail available upon request (or finger
[email-masked]).
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked]
Date: Tue, 08 Oct 1996 16:41:46 -0400 (EDT)

> well as have a default behavior.  
I kind of have it set up this way...  read on. 

> don't want to autoraise, but usually I want to.  Is there any way to

I don't really know if this will help but I have a few windows that I
rarely want focus to.  I have them styled with ClickToFocus.  On my 
machine, the combination of ClickToFocus and Autoraise have the desired 
effect -- all other windows are autoraised but the ones with ClickToFocus 
are ignored by autoraise.

Relavent portions of my .fvwm2rc.

AddToFunc InitFunction  "I" Module FvwmButtons
+       "I"  Module FvwmAuto 150

Style "xconsole"    ClickToFocus, ForeColor black, BackColor gray
Style "xmessage"    ClickToFocus, ForeColor black, BackColor gray

> Thanks,
sure.

Jason
---
Jason Howk                   E-mail: [email-masked]
UCS Helpdesk Consultant      Phone : 616.387.5161

---

From: Kai Grossjohann <[email-masked]>
Date: 09 Oct 1996 11:05:12 +0200

>>>>> 31howk  writes:

  Jason> I don't really know if this will help but I have a few
  Jason> windows that I rarely want focus to.  I have them styled with
  Jason> ClickToFocus.  On my machine, the combination of ClickToFocus
  Jason> and Autoraise have the desired effect -- all other windows
  Jason> are autoraised but the ones with ClickToFocus are ignored by
  Jason> autoraise.

I really want per-window auto raise, tho.  I usually want only a
couple of windows to be autoraised.  Also, I would like autolower (the
window is lowered when it loses focus).  This way, I could position my
DVI previewer over all the little windows (xbiff, xload, xclock etc)
and turn on both autoraise and autolower.  Then, I move the mouse from
the editor into the DVI previewer, the previewer pops to the front, I
can look at it.  When I move back into the editor, the previewer plops
back to the background again, so that I can look at all the little
windows (want to see the time ;-).

kai
-- 
Life is hard and then you die.

---

From: Michael Hirsch <[email-masked]>
Date: Wed, 9 Oct 1996 14:23:05 -0400 (EDT)

>>>>> Kai Grossjohann <[email-masked]> writes:

Kai> I really want per-window auto raise, tho.  I usually want only a
Kai> couple of windows to be autoraised.  Also, I would like autolower
Kai> (the window is lowered when it loses focus).  This way, I could
Kai> position my DVI previewer over all the little windows (xbiff,
Kai> xload, xclock etc) and turn on both autoraise and autolower.
Kai> Then, I move the mouse from the editor into the DVI previewer,
Kai> the previewer pops to the front, I can look at it.  When I move
Kai> back into the editor, the previewer plops back to the background
Kai> again, so that I can look at all the little windows (want to see
Kai> the time ;-).

Could all this stuff (per window autoraise/autolower) be done via a
module?  The module woul listen for window enter/leave events and then
direct fvwm to do the right thing.

I can't recall if window enter/leave events are available from fvwm.

---

From: Kai Grossjohann <[email-masked]>
Date: 10 Oct 1996 10:20:02 +0200

>>>>> Michael Hirsch writes:

  Michael> I can't recall if window enter/leave events are available
  Michael> from fvwm.

They aren't, but focus/unfocus events are.  Please note that I
carefully talked about getting focus and losing focus rather than
window enter/leave :-)

kai

---

From: [email-masked] (Albrecht Kadlec)
Date: Mon, 14 Oct 96 21:22:37 +0200

>>>>> Michael Hirsch writes:

M> Wile I'm on the subject of autoraise, twm (and variants) have per
M> window autoraise.  You can dynamically toggle autoraise on a window as
M> well as have a default behavior.  

M> I would really love this.  Sometimes there is a window that I really
M> don't want to autoraise, but usually I want to.  Is there any way to
M> do this with fvwm?

M> Thanks,

sorry style bits are on back order till 2001 ;^)

if you have my patches for 2.0.43 (or wait till 44 is out, it might include
some or all of them), it should be possible to say sth like 

FvwmAuto 300 "next [CirculateHit Windowid $w] raise"

well on second thought it might not work yet - no time to have a look,
but just try and mail me wether id does/doesn't work.

I'll try to have a look sometimes soon.

albrecht
-- 
We used to walk down by the river, she loved to watch the sun go down
We used to walk along the river, and dream our way out of this town ...
							-- Richard Marx
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Albrecht Kadlec)
Date: Mon, 14 Oct 96 21:27:29 +0200

>>>>> Albrecht Kadlec writes:

M> Thanks,

A> sorry style bits are on back order till 2001 ;^)
[...]

forgot that there is already a style bit for that. ClickToFocus.
:-(

A> albrecht

---

From: [email-masked] (Albrecht Kadlec)
Date: Mon, 14 Oct 96 21:43:36 +0200

M> Could all this stuff (per window autoraise/autolower) be done via a
M> module?  The module woul listen for window enter/leave events and then
M> direct fvwm to do the right thing.

it IS done this way.
And I'll add the leave command, as soon, as I find the time.

M> I can't recall if window enter/leave events are available from fvwm.

albrecht
-- 
Look at me, you never look at me.
Ooh, I've been sittin, starin', seems so long.
But you're lookin' through me
Like I wasn't here at all.

No reply.  There's no reply at all.	-- Genesis

---

From: [email-masked] (Albrecht Kadlec)
Date: Tue, 15 Oct 96 23:28:22 +0200

A> it IS done this way.
A> And I'll add the leave command, as soon, as I find the time.

M> I can't recall if window enter/leave events are available from fvwm.
no, sorry. they aren't, but focus is mostly equivalent, except for sloppyfocus.

Well FvwmAuto does actually only listen to FocusChange events.
I now added a LeaveCommand, which is executed Timout milliseconds, after
the focus has left the window.

With SloppyFocus, this is not the same as a leave event: If you leave the
window, but don't enter another one - i.e: stay on root - focus doesn't
change. 

It's quite fun to use 
	FvwmAuto 0 Nop iconify
together with 
	style "*" NoIcon
and the windowlist to open windows.
You can of course use lower instead.

Using 
	FvwmAuto 300 raise iconify
does somewhat more dramatic changes to the screen than raise alone.

Experiment.
More confusing actions via separate FvwmAuto's with separate timeouts.

	<URL:http://www.auto.tuwien.ac.at/~albrecht>

PS to Kai: your problem is special. I still can't get a style flag out of
thin air. You could peruse circulateskip and windowlistskip flags, but the
problem is, there's no 
	if [!circulateskip] command
and the 
	FvwmAuto 300 "Next [!circulateskip,windowid $w] command"
doesn't work yet (timout, I'll have to be in the barracks at 24:00).
- maybe soon (no more changes in FvwmAuto, but bugfixes for the circulate
option parsing part of fvwm2)

have fun,
albrecht
-- 
No one understood what I felt for Mary
No one cared until the night she went out walking alone
And never came home ...
Men with a badge came knocking next morning
Here was I surrounded by a thousand fingers suddenly
Pointed right at me ...       -- Richard Marx
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Kai Grossjohann <[email-masked]>
Date: 16 Oct 1996 15:50:54 +0200

>>>>> Albrecht Kadlec writes:

  Albrecht> PS to Kai: your problem is special. I still can't get a
  Albrecht> style flag out of thin air. You could peruse circulateskip
  Albrecht> and windowlistskip flags, but the problem is, there's no
  Albrecht> 	if [!circulateskip] command
  Albrecht> and the 
  Albrecht> 	FvwmAuto 300 "Next [!circulateskip,windowid $w] command"
  Albrecht> doesn't work yet (timout, I'll have to be in the barracks
  Albrecht> at 24:00).  - maybe soon (no more changes in FvwmAuto, but
  Albrecht> bugfixes for the circulate option parsing part of fvwm2)

Dear Albrecht,

I do not understand the last FvwmAuto line, but there is in fact a way
to do it without style flags.  Though I agree that it is ugly.  Here's
my proposal, you might want to add your comments on the
meaningfulness.

With the new SendToModule command, it would be easy to add a menu
entry that enables or disables AutoRaise for the particular window for
which it was invoked.  FvwmAuto could read an initial specification of
windows which are to be autoraised as *FvwmAuto lines in .fvwm2rc;
this could then later be changed on a per-window basis with
SendToModule.

I would use the autoraise and autolower features as follows:  the
console window (plus a few others) should always be autoraised (and
-lowered), so I would put them in the *FvwmAuto lines.  After that,
when I create a new xdvi window and feel like it, I turn on autoraise
(and -lower) for that particular window with a key binding or a menu
entry.

Whatcha think?
kai

---

From: [email-masked] (Albrecht Kadlec)
Date: Fri, 18 Oct 96 19:28:30 +0200

>>>>> Kai Grossjohann writes:

K> Dear Albrecht,

K> I do not understand the last FvwmAuto line, but there is in fact a way
K> to do it without style flags.
which is not the best thing to do, I think (see below).

the above line is from my alpha version of fvwm (patches are at my
homepage, as soon, as they become stable).
It basically says: go to the next window, that doesn't have the
circulateskip bit set and the windowid $w (window, which has been given
focus) and execute command on it (command is raise, normally).
this is basically a hunchback version if an IF command (if window $w
doesn't have this bit set, do sth).

K> Though I agree that it is ugly. 

mine too, but I think an IF is easy to implement, and a set of user
perusable style bits is very flexible, and doesn't bloat FvwmAuto to a
100k program (it doesn't bloat fvwm itself much, either).

K> Here's my proposal, you might want to add your comments on the
K> meaningfulness.

K> With the new SendToModule command, it would be easy to add a menu
K> entry that enables or disables AutoRaise for the particular window for
K> which it was invoked.  FvwmAuto could read an initial specification of
K> windows which are to be autoraised as *FvwmAuto lines in .fvwm2rc;
K> this could then later be changed on a per-window basis with
K> SendToModule.

So FvwmAuto would have to do a whole lot more: parse more config entries,
keep that info in a global (linked) list, use this for any window.
This is a duplication of the Fvwm internal linked list of windows,
where only one bit in a 32 bit integer is used for any binary style flag.
(that`s a 64:1 bloat ratio in storage requirements, not to mention the 
code for parsing and the communication, and the respective cpu overhead.)

I'd wait till after The Great Mythical Style Flag Rewrite, which will
hopefully include some user-flags (user1 - user4 ?) which can be used in
conjunction with the PREV/NEXT/NONE (and hopefully someone will implement 
IF and FOREACH) commands.

K> I would use the autoraise and autolower features as follows:  the
K> console window (plus a few others) should always be autoraised (and
K> -lowered), so I would put them in the *FvwmAuto lines.  After that,
K> when I create a new xdvi window and feel like it, I turn on autoraise
K> (and -lower) for that particular window with a key binding or a menu
K> entry.

this would be sth like
	FvwmAuto 300 "if [!user1] raise"
which is equivalent to the soon (when I get the time) usable version
	FvwmAuto 300 "Next [!circulateskip,windowid $w] raise"

K> Whatcha think?
everything clear as mud now?

albrecht
-- 
On the news a nation mourns your unknown soldier count the cost,
  For a second you'll be famous but labelled posthumous  -- Marillion
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].