[BUG]: Firefox sometimes doesn't tile after opening #344

Closed
opened 2026-01-05 14:49:52 +01:00 by adam · 7 comments
Owner

Originally created by @Insprill on GitHub (Apr 18, 2024).

Describe the bug
Firefox sometimes (more often than not) doesn't tile correctly after being opened. Increasing the delay here to 50ms fixes the issue in my testing. 25ms works most of the time, but it would still fail occasionally.
6b42587af4/komorebi/src/window.rs (L493-L495)

As a side note, has an issue been created on Mozilla's bug tracker to potentially get this issue fixed in Firefox instead of having to work around it here?

To Reproduce
Steps to reproduce the behavior:

  1. Open a new Firefox window.
  2. Observe it is not tiled correctly. If it is tiled correctly, close it and try again, moving windows around so it isn't opening in the same location.

Operating System

OS Name:                   Microsoft Windows 11 Pro for Workstations
OS Version:                10.0.22631 N/A Build 22631

komorebic check Output

No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Insprill

Looking for configuration files in C:\Users\Insprill

Found komorebi.json; this file can be passed to the start command with the --config flag

No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard
Originally created by @Insprill on GitHub (Apr 18, 2024). **Describe the bug** Firefox sometimes (more often than not) doesn't tile correctly after being opened. Increasing the delay here to 50ms fixes the issue in my testing. 25ms works most of the time, but it would still fail occasionally. https://github.com/LGUG2Z/komorebi/blob/6b42587af4b38a13c735df23088dc0e142d51931/komorebi/src/window.rs#L493-L495 As a side note, has an issue been created on Mozilla's bug tracker to potentially get this issue fixed in Firefox instead of having to work around it here? **To Reproduce** Steps to reproduce the behavior: 1. Open a new Firefox window. 2. Observe it is not tiled correctly. If it is tiled correctly, close it and try again, moving windows around so it isn't opening in the same location. **Operating System** ``` OS Name: Microsoft Windows 11 Pro for Workstations OS Version: 10.0.22631 N/A Build 22631 ``` **`komorebic check` Output** ``` No KOMOREBI_CONFIG_HOME detected, defaulting to C:\Users\Insprill Looking for configuration files in C:\Users\Insprill Found komorebi.json; this file can be passed to the start command with the --config flag No ~/.config/whkdrc found; you may not be able to control komorebi with your keyboard ```
adam added the bug label 2026-01-05 14:49:52 +01:00
adam closed this issue 2026-01-05 14:49:52 +01:00
Author
Owner

@LGUG2Z commented on GitHub (Apr 18, 2024):

Nothing has been opened on the Firefox tracker AFAIK. There are a few other programs I'm sure that this delay could be useful for, I think it makes sense to look at making the list of executables to match against configurable as well as the timing, which I suspect is probably dependent on the specs of the machine where komorebi is running.

@LGUG2Z commented on GitHub (Apr 18, 2024): Nothing has been opened on the Firefox tracker AFAIK. There are a few other programs I'm sure that this delay could be useful for, I think it makes sense to look at making the list of executables to match against configurable as well as the timing, which I suspect is probably dependent on the specs of the machine where komorebi is running.
Author
Owner

@mmikeww commented on GitHub (Apr 20, 2024):

my suspicion is that my chrome extension bugs would also be fixed if they could also be delayed before being tiled

perhaps this configurability setting should be added to the applications.yaml and keep a list of all known programs in there

@mmikeww commented on GitHub (Apr 20, 2024): my suspicion is that my chrome extension bugs would also be fixed if they could also be delayed before being tiled perhaps this configurability setting should be added to the applications.yaml and keep a list of all known programs in there
Author
Owner

@Insprill commented on GitHub (Apr 20, 2024):

Do we know what the applications, Firefox at least in this case, are doing that causes them to not be tiled correctly? Investigating that would be better since relying on fixed delays is extremely fragile. I don't know much about the inner workings of Komorebi, but could it detect when an application tries to resize/reposition itself shortly after opening (or always?) and force it back to the correct size/place?

@Insprill commented on GitHub (Apr 20, 2024): Do we know what the applications, Firefox at least in this case, are doing that causes them to not be tiled correctly? Investigating that would be better since relying on fixed delays is extremely fragile. I don't know much about the inner workings of Komorebi, but could it detect when an application tries to resize/reposition itself shortly after opening (or always?) and force it back to the correct size/place?
Author
Owner

@mmikeww commented on GitHub (Apr 20, 2024):

Of course that would be preferable. But what Firefox might be doing, vs
what the chrome extensions might be doing, vs whatever the next problem is,
could all be different. One thing you can count on in Windows, is that
there are never ending edge cases. So I think it's worthwhile to have a
catch all method sooner rather than later to simply have a window match
where we can trigger an intentional delay. Saves user and dev headaches in
the meantime until deeper realer fixes can be found

On Sat, Apr 20, 2024, 2:14 PM Pierce Thompson @.***>
wrote:

Do we know what the applications, Firefox at least in this case, are doing
that causes them to not be tiled correctly? Investigating that would be
better since relying on fixed delays is extremely fragile. I don't know
much about the inner workings of Komorebi, but could it detect when an
application tries to resize/reposition itself shortly after opening (or
always?) and force it back to the correct size/place?


Reply to this email directly, view it on GitHub
https://github.com/LGUG2Z/komorebi/issues/771#issuecomment-2067747027,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOQBDCTMPLROAKMYUTRKLLY6KWBBAVCNFSM6AAAAABGNMHQECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXG42DOMBSG4
.
You are receiving this because you commented.Message ID:
@.***>

@mmikeww commented on GitHub (Apr 20, 2024): Of course that would be preferable. But what Firefox might be doing, vs what the chrome extensions might be doing, vs whatever the next problem is, could all be different. One thing you can count on in Windows, is that there are never ending edge cases. So I think it's worthwhile to have a catch all method sooner rather than later to simply have a window match where we can trigger an intentional delay. Saves user and dev headaches in the meantime until deeper realer fixes can be found On Sat, Apr 20, 2024, 2:14 PM Pierce Thompson ***@***.***> wrote: > Do we know what the applications, Firefox at least in this case, are doing > that causes them to not be tiled correctly? Investigating that would be > better since relying on fixed delays is extremely fragile. I don't know > much about the inner workings of Komorebi, but could it detect when an > application tries to resize/reposition itself shortly after opening (or > always?) and force it back to the correct size/place? > > — > Reply to this email directly, view it on GitHub > <https://github.com/LGUG2Z/komorebi/issues/771#issuecomment-2067747027>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AAOQBDCTMPLROAKMYUTRKLLY6KWBBAVCNFSM6AAAAABGNMHQECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRXG42DOMBSG4> > . > You are receiving this because you commented.Message ID: > ***@***.***> >
Author
Owner

@Impasse52 commented on GitHub (Dec 31, 2024):

I'm experiencing this same behavior with Zen browser, I wonder if that's a coincidence since Zen is also based on Gecko. Has there been any progress on implementing a workaround/solution like the ones suggested above?

@Impasse52 commented on GitHub (Dec 31, 2024): I'm experiencing this same behavior with Zen browser, I wonder if that's a coincidence since Zen is also based on Gecko. Has there been any progress on implementing a workaround/solution like the ones suggested above?
Author
Owner

@LGUG2Z commented on GitHub (Dec 31, 2024):

You can now customize the slow application identifier list and compensation time: https://komorebi.lgug2z.com/schema#slow_application_compensation_time

I'm using this and it's fairly reliable for me with Zen and Firefox, but it's not perfect.

Ultimately this is a Gecko bug which needs to be solved upstream - feel free to link any issues on the Gecko issue tracker related to this issue, but this isn't something we can do anything more about in komorebi for now.

@LGUG2Z commented on GitHub (Dec 31, 2024): You can now customize the slow application identifier list and compensation time: https://komorebi.lgug2z.com/schema#slow_application_compensation_time I'm using this and it's fairly reliable for me with Zen and Firefox, but it's not perfect. Ultimately this is a Gecko bug which needs to be solved upstream - feel free to link any issues on the Gecko issue tracker related to this issue, but this isn't something we can do anything more about in komorebi for now.
Author
Owner

@Impasse52 commented on GitHub (Dec 31, 2024):

Thank you for pointing to the solution! Unfortunately though, I'm not able to get it to work. Are you able to tell me what's wrong here?

I've added the following to my config, according to the schema you linked:

  "slow_application_compensation_time": 50,
  "slow_application_identifiers": [
      {
        "id": "zen.exe",
        "kind": "Exe",
        "matching_strategy": "Equals"
      }
  ],

but this doesn't seem to do anything sadly. I open Zen, yet it doesn't tile straight away. Any ideas?

EDIT: Whoops, turns out I was using an older version of Komorebi. Updated through winget, changed the link in the config to the newer schema and restarted. Everything works now! Thank you for this amazing piece of software, happy new year :)

@Impasse52 commented on GitHub (Dec 31, 2024): Thank you for pointing to the solution! Unfortunately though, I'm not able to get it to work. Are you able to tell me what's wrong here? I've added the following to my [config](https://pastebin.com/MVBUYQFG), according to the schema you linked: ``` "slow_application_compensation_time": 50, "slow_application_identifiers": [ { "id": "zen.exe", "kind": "Exe", "matching_strategy": "Equals" } ], ``` but this doesn't seem to do anything sadly. I open Zen, yet it doesn't tile straight away. Any ideas? EDIT: Whoops, turns out I was using an older version of Komorebi. Updated through winget, changed the link in the config to the newer schema and restarted. Everything works now! Thank you for this amazing piece of software, happy new year :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#344