Subject: FVWM: Making an app pop up on the desk where it was started?

From: "Felix E. Klee" <[email-masked]>
Date: Sat, 19 Apr 2003 23:52:47 +0200

Hi,

when I start an application on a certain desktop, say 1, and switch to 
another desktop, say 2, I find it annoying that the application pops up on 
desktop 2. Is there a setting to force all applications and their child 
windows to appear on the desktop where they were started?

Felix

-- 
To contact me in private don't reply but send email to 
  felix DOT klee AT inka DOT de
--
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: Ben Winslow <[email-masked]>
Date: 19 Apr 2003 18:30:43 -0400

> windows to appear on the desktop where they were started?

Well, that's a little tricky...  FVWM doesn't know which desktop an
application was started on, but you can say that you want to start a
certain application on a certain desktop all of the time with the Style
command, or you can have an application say it wants to start on a
certain desktop with an X resource.

Check out 'THE VIRTUAL DESKTOP' section in the manpage.

-- 
Ben Winslow <[email-masked]>

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 19 Apr 2003 22:58:20 +0000

> windows to appear on the desktop where they were started?

If an application sets a window group hint on all its windos, you may
force them to appear on the same desk using:

  Style * KeepWindowGroupsOnDesk

If your app does not set this hint, I guess, you may submit a feature
request to that application.

Regards,
Mikhael.

---

From: "Felix E. Klee" <[email-masked]>
Date: Sun, 20 Apr 2003 10:43:33 +0200

On Sunday 20 April 2003 00:58, Mikhael Goikhman wrote:
> > another desktop, say 2, I find it annoying that the application pops up
> > on desktop 2. Is there a setting to force all applications and their
> > child windows to appear on the desktop where they were started?
>

Hm, many apps don't support that hint. But I forged a function that might be 
usable as a replacement for Exec:
    
    DestroyFunc DExec
    AddToFunc DExec
    + I Style $0 StartsOnDesk $[desk.n], SkipMapping
    + I Exec $0

But this doesn't seem to work since the command name $0 doesn't neccessarily 
coincide with the proper style idenitifier.

Any ideas how to fix this?

BTW, even KDE has that feature builtin.

Felix

---

From: Simon Matthews <[email-masked]>
Date: Sun, 20 Apr 2003 10:04:56 +0100

> Any ideas how to fix this?

I have no idea if the applications you are trying to use it with support
-xrm, but in theory ... (ie completely untested):

DestroyFunc DExec
AddToFunc DExec
+ I Exec $0 -xrm "*Desk:$[desk.n]" $1

if you call it using:

DExec xterm "-e mutt"

will do the correct thing.

Regards,

Simon

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 20 Apr 2003 13:00:37 +0000

> Any ideas how to fix this?

Pass 2 arguments to a function, the mask and the command line.

> BTW, even KDE has that feature builtin.

Which feature exactly do you speak about?
Explain in detail what you want to get that KDE has builtin.
Which application and which popup windows?

I suspect there is a solution for your app without using StartsOnDesk.

Regards,
Mikhael.

---

From: "Felix E. Klee" <[email-masked]>
Date: Sun, 20 Apr 2003 16:58:49 +0200

> + I Exec $0 -xrm "*Desk:$[desk.n]" $1

Thanks, but this is not an option. Some applications (eg. Mozilla) ignore 
that option and some (eg. Knode) complain about it and don't start at all.

Felix

-- 
To contact me personally don't reply but send email to

---

From: "Felix E. Klee" <[email-masked]>
Date: Sun, 20 Apr 2003 17:45:21 +0200

On Sunday 20 April 2003 15:00, Mikhael Goikhman wrote:
> > Hm, many apps don't support that hint. But I forged a function that
> > might be usable as a replacement for Exec:
> >
> >     DestroyFunc DExec
> >     AddToFunc DExec
> > But this doesn't seem to work since the command name $0 doesn't
> > neccessarily coincide with the proper style idenitifier.
> >

Uh, then I need to find the mask (what is that exacly, do you mean the 
class?) for each application that I have in the menus. Any idea how to 
automate this by a script when I use eg. FVWM menus generated by external 
tools.

> Which application and which popup windows?

It's quite simple: Under KDE when I start an application on a certain 
desktop, say 2, and switch to another desktop, say 1, then, after being 
loaded, the application will pop up on desktop 2 without interrupting me 
working on desktop 1. Note that I'm not sure whether that holds true for 
absolutely all application and, unfortunately, I can't check it since KDE 
doesn't start anymore on my system (this might be due to some bugs in 
XFree86 as part of SuSE 8.2).

Felix

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 20 Apr 2003 16:27:57 +0000

> automate this by a script when I use eg. FVWM menus generated by external 

I mean any name with a possible wildcards that Style accepts: window
name, class or resource. As reported by FvwmIdent for example.

You can't automate a proper discovering of this name/pattern given the
executable name unless there is a central database of all application
window names. I am not aware of such.

> XFree86 as part of SuSE 8.2).

You still didn't say which application shows a problem for you.

I just happened to run konqueror to test how a site looks in it and it
opened a dialog window (transient) on the same desk where the konqueror
itself runs when I was on another desk.

Regards,
Mikhael.

---

From: "Felix E. Klee" <[email-masked]>
Date: Sun, 20 Apr 2003 19:25:59 +0200

On Sunday 20 April 2003 18:27, Mikhael Goikhman wrote:
> > loaded, the application will pop up on desktop 2 without interrupting
> > me working on desktop 1. Note that I'm not sure whether that holds true
> > for absolutely all application and, unfortunately, I can't check it
> > since KDE doesn't start anymore on my system (this might be due to some
> > bugs in XFree86 as part of SuSE 8.2).
>

That's not what I described (although this is another feature I want). Just 
try this:
    1. Goto desktop 2
    2. Start Konqueror
    3. Switch to desktop 1
Then Konqueror will pop up on desktop 1. In KDE Konqueror will pop up on 
desktop 2.

Felix

---

From: "Felix E. Klee" <[email-masked]>
Date: Tue, 22 Apr 2003 09:28:33 +0200

On Sunday 20 April 2003 19:25, Felix E. Klee wrote:
> That's not what I described (although this is another feature I want).
> Just try this:
>     1. Goto desktop 2
>     2. Start Konqueror
>     3. Switch to desktop 1

Any news on that? Will I see this feature in the next version?

Felix

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 22 Apr 2003 10:09:56 +0200

> Then Konqueror will pop up on desktop 1. In KDE Konqueror will pop up on 

Do you use the EWMHIgnoreStateHints style?  If yes, switch it off,
if no send a bug report to the KDE/Konqueror folks.  Probably they
are using some KDE internal mechanism to do this instead of using
EWMH hints.

Bye

Dominik ^_^  ^_^

---

From: "Felix E. Klee" <[email-masked]>
Date: Tue, 22 Apr 2003 10:57:39 +0200

On Tuesday 22 April 2003 10:09, Dominik Vogt wrote:
> > Then Konqueror will pop up on desktop 1. In KDE Konqueror will pop up
> > on desktop 2.
>
> Do you use the EWMHIgnoreStateHints style?  

No, but to make sure I put 
    Style * EWMHUseStateHints
in my .fvwm2rc

> If yes, switch it off,

This is not Konqueror specific. I have yet to find an application that 
behaves the way I want. I just tried Netscape and EMACS as well. Both pop 
up on the desktop I'm currently working on, even if they were started on 
another desktop. Again: in KDE this works out of the box. Why can't it work 
under FVWM?

Felix

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 22 Apr 2003 11:06:27 +0200

> another desktop. Again: in KDE this works out of the box. Why can't it work 

Because it's probably some undocumented KDE internal stuff.

Bye

Dominik ^_^  ^_^