Subject: FVWM: Maximize just started application using FvwmEvent: Not working for gvim

From: Thomas Glanzmann <[email-masked]>
Date: Fri, 21 Feb 2003 16:53:57 +0100

I maximize some of my newly started Applications using fvwm event. But it does
not work for gvim. Has somebody an idea?

DestroyFunc FullScreen
AddToFunc   FullScreen
	+ I ThisWindow (!Maximized) Style $n BorderWidth 0
	+ I ThisWindow ( Maximized, !"bluescreen") Style $n BorderWidth 1
	+ I ThisWindow Maximize

DestroyFunc AddWindow
AddToFunc   AddWindow
	+ I WindowId $0 ("MAINscreen")    FullScreen
	+ I WindowId $0 ("LOCALscreen")   FullScreen
	+ I WindowId $0 ("DEVELscreen")   FullScreen
	+ I WindowId $0 ("CONSOLEscreen") FullScreen
	+ I WindowId $0 ("Opera*")        FullScreen
	+ I WindowId $0 ("*GVIM*")        FullScreen

*FvwmEvent-NewWindow: Cmd
*FvwmEvent-NewWindow: PassId
*FvwmEvent-NewWindow: StartDelay 4
*FvwmEvent-NewWindow: add_window AddWindow

AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow

Greetings,
	Thomas
--
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: Dan Espen <[email-masked]>
Date: Fri, 21 Feb 2003 11:08:30 -0500

> 	+ I WindowId $0 ("*GVIM*")        FullScreen

It looks like gvim changes its name after its created.
Try using "Gvim" instead.

-- 
Dan Espen                           E-mail: [email-masked]

---

From: Thomas Glanzmann <[email-masked]>
Date: Fri, 21 Feb 2003 17:40:41 +0100

> Try using "Gvim" instead.

Thanks that fixes the problem in the first way. Would you please tell me how you
retrieved the name?

I have still a problem with gvim using the fullscreen command but I guess that
this isn't a problem fvwm can fix:

Gvim becomes fullscreen but there stays a gray unused area:

http://wwwcip.informatik.uni-erlangen.de/~sithglan/gvim1.png

If I resize gvim manually to fullscreen the gray unused area is gone:

http://wwwcip.informatik.uni-erlangen.de/~sithglan/gvim2.png

Greetings,
	Thomas

---

From: Dan Espen <[email-masked]>
Date: Fri, 21 Feb 2003 11:54:34 -0500

> Thanks that fixes the problem in the first way. Would you please tell me how 

I used FvwmIdentify

> I have still a problem with gvim using the fullscreen command but I guess
> that this isn't a problem fvwm can fix:
> 

Here is the output of xwindow for a gvim window:

home> xwininfo -size

xwininfo: Please select the window about which you
          would like information by clicking the
          mouse in that window.

xwininfo: Window id: 0x1c0007a "[No file] + - GVIM"

  Normal window size hints:
      Program supplied minimum size: 104 by 89
      Program supplied base size: 20 by 61
      Program supplied x resize increment: 7
      Program supplied y resize increment: 14
      Program supplied minimum size in resize increments: 14 by 6
      Program supplied base size in resize increments:  2 by 4
  No zoom window size hints defined

Notice the resize increments.
Its the remainders that are not getting covered.

---

From: Thomas Glanzmann <[email-masked]>
Date: Fri, 21 Feb 2003 18:21:04 +0100

> I used FvwmIdentify.

Thnx.

> Its the remainders that are not getting covered.

I can not follow you. You said that I can only resize a window by 14x6
factors. Is that right? If I resize the window to fullscreen the gray area is
the remaining? But why does it work when I do it manually after the application
started up using Ctrl ALT F [1]. Even if I start gvim using the auto fullscreen
stuff and press twice CTRL ALT F the gray area turns into a usable area.

[1] Using CTRL ALT F to go fullscreen.
   Key	F	W	CM	FullScreen
   
   DestroyFunc FullScreen
   AddToFunc   FullScreen

Greetings,
	Thomas

---

From: Dan Espen <[email-masked]>
Date: Fri, 21 Feb 2003 13:08:44 -0500

>    	+ I ThisWindow ( Maximized, !"bluescreen") Style $n BorderWidth 1

I think maximize is using the resize increments and manual resize
isn't.  I don't know why.  I'll try to check a little more, but
maybe someone else on the list already has the answer.

---

From: Thomas Glanzmann <[email-masked]>
Date: Fri, 21 Feb 2003 19:13:28 +0100

> maybe someone else on the list already has the answer.

Hrm. I used both times Maximise (one time called from FvwmEvent, the other time
called by my hotkey). I think that the problem is that the Maximize event from
FvwmEvent is to early for Gvim to handle.

Thanks for your help. You helped me a lot today improving my .fvwm2rc :-)

Greetings,
	Thomas

---

From: Thomas Glanzmann <[email-masked]>
Date: Fri, 21 Feb 2003 20:15:54 +0100

> FvwmEvent is to early for Gvim to handle.

I have also a problem with xterm (it does not catch the resize command on a
faster machine). So I did the following which solves the problem with gvim and
xterm. It is very ugly but it works. Maybe someone else has a better idea.

(I added the + I Piperead "ls -al / &> /dev/null" which delays the the resize
event)

DestroyFunc AddWindow
AddToFunc   AddWindow
	+ I Piperead "ls -al / &> /dev/null"
	+ I WindowId $0 ("MAINscreen")    FullScreen
	+ I WindowId $0 ("LOCALscreen")   FullScreen
	+ I WindowId $0 ("DEVELscreen")   FullScreen
	+ I WindowId $0 ("CONSOLEscreen") FullScreen
	+ I WindowId $0 ("Opera*")        FullScreen
	+ I WindowId $0 ("Gvim")          FullScreen
	+ I WindowId $0 ("Go to page")    WarpToWindow 5 5

Greetings,
	Thomas

---

From: Dan Espen <[email-masked]>
Date: Fri, 21 Feb 2003 14:23:40 -0500

> AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow

PipeRead "sleep 2"

or even better:

*FvwmEvent-NewWindow: add_window Schedule 2000 AddWindow

(Not tested.)

---

From: Thomas Glanzmann <[email-masked]>
Date: Fri, 21 Feb 2003 20:57:12 +0100

> *FvwmEvent-NewWindow: add_window Schedule 2000 AddWindow

two seconds are way to long. And schedule is only in the unstable version of
fvwm :-( But my problem is solved.
--
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: Thomas Glanzmann <[email-masked]>
Date: Sun, 23 Feb 2003 11:16:39 +0100

> I used FvwmIdentify

Just to clear thing up. The name of the module is FvwmIdent. And you retrived
the name out of the 'Class' Field.

	Thomas

---

From: [email-masked]
Date: Mon, 24 Feb 2003 00:14:41 +0100

> > maybe someone else on the list already has the answer.

No, that's not the case.  Gvim must get confused by the arriving
events.

> FvwmEvent is to early for Gvim to handle.

That is probably the case.

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].