Subject: FVWM: Click in a window raises, move marks, can I?

From: Anssi Saari <[email-masked]>
Date: Tue, 15 Jan 2002 16:23:10 +0200

Hi,

The one window-related thing in fvwm I haven't been able to config to
my satisfaction is as follows: I use SloppyFocus and want a click inside
a window to raise it, which is easy. However, I also want to be able to
mark text in a window which is not on top without it raising to the top.

Is there any way of doing this in fvwm?
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Dominik Vogt <[email-masked]>
Date: Tue, 15 Jan 2002 16:03:41 +0100

> Is there any way of doing this in fvwm?

I don't think so.  When fvwm notices that you actually moved the
mouse it's already too late.

Bye

Dominik ^_^  ^_^

-- 
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Olivier Chapuis <[email-masked]>
Date: Tue, 15 Jan 2002 16:42:28 +0100

> Is there any way of doing this in fvwm?

I am not sure to understand but what about marking the text using
the mouse + a modifier (as Shift). This may work with some app
and fail with others which can do somthing special if a modifier
is used (shift work with my xemacs). This may also interact with
your mouse bindings and with the IgnoreModifiers command.

Regards, Olivier

---

From: Walter Dnes <[email-masked]>
Date: Wed, 16 Jan 2002 01:26:15 -0500

On Tue, Jan 15, 2002 at 04:23:10PM +0200, Anssi Saari wrote

> Is there any way of doing this in fvwm?

  Not the way you're trying to do it.  When you mark text in a window,
you are in fact clicking inside the window... see the problem?  The way
around this is to *NOT* have clicks-inside-window raise the window.

Style * SloppyFocus
Style * ClickToFocusRaisesOff
Style * MouseFocusClickRaisesOff

  Set up to raise the window when you click on any of the four sides

DestroyFunc RaiseOrMove
AddToFunc RaiseOrMove
+ I Raise
+ M Move

Mouse 1 ST      A       Function RaiseOrMove

  With this setup, I can focus in a window without raising it.  I can
even be typing away in a window while a smaller window is raised and
floating above it in a corner.

-- 
Walter Dnes <[email-masked]>
If you had purchased $1000 of @home stock in 1999, today you would
have $1.30.  If you had purchased $1000 of beer in 1999, today you
would still have $59 in empty cans.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Anssi Saari <[email-masked]>
Date: Wed, 16 Jan 2002 09:13:10 +0200

On Wed, Jan 16, 2002 at 01:26:15AM -0500, Walter Dnes wrote:
> you are in fact clicking inside the window... see the problem?

Well, fvwm can tell the difference. Marking is not clicking, it's
moving. Consider the titlebar. By default, clicking on it raises
the window, but moving (press and hold button, move mouse) moves the
window. And it's not necessary for the window to raise while it's moved.

So, what I want to do in 'fvwm-speak' is this:

Mouse 1 W       A       Current [ !Raised ] SomeFuction

and then have SomeFunction like this:

AddToFunc SomeFunction
+ C Raise
+ M Magic

Where the function Magic tells fvwm to let go and give control to the
client. Now that I think about it, FakeClick might be the solution. I'll
have to see. If I just pass a buttonpress to the client and not the
release?

> The way

Yes, but that's trivial and also what I've been doing. With a Sun
keyboard, it's even pretty good as there's a 'Front' button which can
be used to raise the window.  However, with my Linux box at home I have
rather few keys as it's a Happy Hacking Keyboard Lite.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: Walter Dnes <[email-masked]>
Date: Thu, 17 Jan 2002 21:37:25 -0500

On Wed, Jan 16, 2002 at 09:13:10AM +0200, Anssi Saari wrote

> > The way around this is to *NOT* have clicks-inside-window
> > raise the window.
> 
> Yes, but that's trivial

  OK, so I'm lazy.  I let the computer do all the hard work<g>.  Besides
it occasionally *IS* nice to be able to type away in a fullscreen
document while keeping another window floating on top.  This beats the
daylights out of {ALT-TAB}'ing back and forth during multiple cut/paste
operations.  Or you may want a TV program running in it

> However, with my Linux box at home I have rather few keys as it's
> a Happy Hacking Keyboard Lite.

  Hmmmm, maybe there is a use for those idiot keys that Bill Gates has
dumped on the spacebar.

---

From: Anssi Saari <[email-masked]>
Date: Fri, 18 Jan 2002 11:20:39 +0200

> mouse it's already too late.

Hm, disappointing. Not "try CVS now" or "here's some pointers on how to
implement it"?-)

I thought FakeClick might be a solution, but I can't seem to get it to
work. What I tried is this:

Mouse 1 W       N       Current [ !Raised ] AnssiRaiseOrNop

DestroyFunc AnssiRaiseOrNop
AddToFunc AnssiRaiseOrNop
+ M FakeClick depth 3 press 1
+ C Raise

I tried depth 2 also, but no change.

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 19 Jan 2002 22:38:24 +0100

> Hm, disappointing. Not "try CVS now" or "here's some pointers on how to

It's a very difficult thing to do.  One one hand, fvwm needs to
process the pointer events to decide if the click was meant for
the application or for fvwm.  But when it receives the first
motion exent, the X server has already forgotten about the initial
click and the application will never get it.  This works fine with
rxvt, but xterm and xemacs need the click to mark a region.  Also,
since the click is lost for the application, a simple click is no
longer handled by the application, i.e. if you click on a button
or menu in the application it is raised, but the click does not
work on the button or menu.

[hours later]

Success! :-D

I found a way to implement this.  Try 

  Style * MouseFocusClickIgnoreMotion

I don't recommend to use this feature in conjunction with mouse
bindings on the client part of the windows ('W' context).  This
will probably fail utterly.

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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].