Fvwm3: StartsOnDesk being ignored by chromium

Here it is.

I asked about your chromium version in case there is something peculiar about mine which doesn’t apply to you (if our versions are different).

I’m using Debian bookworm for what it is worth. Though the issue might be with the os / chromium version, it could also be with your user’s profile too. Checking the default-config and maybe checking a blank user with a new profile could also verify that.

Using a VBox VM right now to check things. I’ll report back on how things go there.

In the VM the chromium was starting up on the desired page with my current config. However, it was set to start up with a new empty tab. However, when I changed the settings so that it continued on from where I was, it started opening on random pages. My next step is to use the default fvwm3 config and see what happens.

I am using MX Linux (Debian). Did a test on the config.

Chromium works fine with a minor edit for MX Linux… “Exec exec chromium” not “chromium-browser

Style Chromium StartsOnDesk 4, Skipmapping ## OK

VERSION: fvwm3 1.1.1

I tried the default config (inside a VBox VM, Slackware64-15.0).
I started FvwmConsole and entered
Style chromium StartsOnPage 3 0 0
Style Chromium StartsOnPage 3 0 0

When I start chromium up with it configured to only open a new tab, it obediently starts on desktop 3. However, if I open a number of tabs, configure chromium to “Continue where you left off”, shut down chromium, the next time I start it, it starts on desktop 2. Then if I shut it down and start it back up, it starts on desktop 1. The next time desktop 0. Then desktop 0 and desktop 0 and desktop 0. (Initially I was wondering if it was going to wrap around, but it didn’t.)

Adding ‘, SkipMapping’ did not change anything.

So… rasat said that chromium works fine, but I now wonder whether that was with chromium configured to start up with a single empty tab, or whether that was starting up with multiple tabs and/or windows.

rasat, care to comment? Thanks.

Some apps just do their own things, and after they are mapped/positioned by the window manager, and there really isn’t anything the window manager can do about that. You might be able to dig through chrome://flags you can find something that will tell chrome to not position itself.

Most what SkipMapping does is prevent fvwm from switching to the page/desk you open the window on, so it doesn’t force it to be visible by moving you to its location. I don’t think it is something that the app itself will listen to, so not surprised it didn’t help.

Maybe disabling chrome://flags/#enable-desktop-pwas-additional-windowing-controls will help.

I tried all the options and styles you suggested. Everything worked fine until I accidentally Kill (+ "Kill%mini-bomb.xpm%" Destroy) the Chromium window. I never use Destroy but instead Delete (Close) for any app or module.
Chromium went on Desk 3 for the next startup, followed by Desks 2, 1, and 0.
Didn’t fix with Close but reset the Chromium Setting to “Open the New Tab page”. Close and new startup goes to correct Desk. Now, setup the wanted Setting.

I usually terminate chromium using it’s “Exit” menu item. (IIRC, I have Destroy because many (many many) years ago I needed that for some recalcitrant program that wouldn’t terminate with “Close”, and I’ve never since seen the need to change it. But thanks for mentioning that.)

Back to chromium: if I interpret your message correctly, you can duplicate the “it doesn’t open on the specified desk”, at least when it opens multiple windows and/or tabs? And, if so, can we conclude that it isn’t an issue with my config? And, if this is a reproducible problem with the default config, does this give some hope that it could be tracked down (at least by someone who understands fvwm internals)?

Can you try the following patch please, on top of the latest git checkout:

diff --git a/fvwm/add_window.c b/fvwm/add_window.c
index 7d005a2f6..8af54d678 100644
--- a/fvwm/add_window.c
+++ b/fvwm/add_window.c
@@ -2354,6 +2354,7 @@ FvwmWindow *AddWindow(
 
                /****** layer ******/
                setup_layer(fw, &style);
+               lookup_style(fw, &style);
 
                /****** window placement ******/
                attr_g.x = wattr.x;

@thomasadam, the patch works fine. Both Destroy and Delete including with multiple tabs, is OK.

Your config is fine. It is a system bug. It will be fixed with this patch. Are you using the Fvwm3 GitHub install? In next version, it is updated. Current version: 1.1.1 (1.1.0-118-g5c9b0ae2-dirty)

Hey @rasat

That’s… helpful? I’m not interested in Destroy and Delete as this code doesn’t affect those commands.

What I want to confirm is whether Chromium or any other window styles, are working, with the patch I’ve provided.

@thomasadam, I didn’t have a problem with Chromium using Style Chromium StartsOnPage 4 0 0 and Style Chromium StartsOnDesk 4, SkipMapping. I tested it on two machines.

The issue is with the command Destroy when closing Chromium having the browser setting: “Continue where you left off” (multiple tabs). Delete command is ok. At the next startup, it loads on Desk 3. After next closing and startup, it loads on Desk 2. This unstable behaviour is what @bobl33 is telling.

With the patch, everything is okay. Chromium loads on Desk 4; how it was closed does not affect it.

You may have a problem related to Destroy, but I don’t use it to terminate Chromium, so the issue I raised is independent of that.

I don’t know what Chromium Exit does, destroy or delete. Do a test with the window’s frame Close option.

First, change Chromium setting to “Open the New Tab page”. Then next, close the Chromium with Close option.

close-chromium

Thomas,

The bad news: I tried compiling the latest git, but it started complaining about me not havng a new enough something or other, and so rather than going down the dependency rabbit hole, I tried fvwm3-1.1.0, which is what I am using on my system right now.

The good news: that solved the chromium problem. So far I see no problems, but I will get back to you if I do.

In summary, thanks very much for that line of code.

What are you on about? This is just meaningless drivel which is distracting from the original point of this thread.

To show how to check if it is a problem with the config or fvwm system.

I did a test with version 3.1.0. It has the same problem on MX Linux. The patch is fixing it.

EDIT: version 1.1.1 (1.1.0-119-g360b5bb2) is OK.