Processing Ajax...

Title
Close Dialog

Message

Confirm
Close Dialog

Confirm
Close Dialog

Confirm
Close Dialog

User Image
StevenZ
11 discussion posts
Hi,

I have a scripted function to open a browser window under the cursor and maximise it, however, there's a delay (as much as 5 seconds) between after the browser window opens and it being maximised, I noticed that it only happens when the window opens in a monitor with splits. I have looked around but couldn't find much info on this.

The script is as follows:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        string website = "";
        
        IntPtr window = BFS.Web.OpenUrlNewWindow(website);
        
        BFS.Window.SetSizeAndLocation(window, BFS.Input.GetMousePositionX(), BFS.Input.GetMousePositionY(), 500, 500);
        BFS.Window.Maximize(window);
    }
}
Aug 21, 2021  • #1
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

Strange, I tested it out on my end and it seemed to work fine. Could you send me a copy of your troubleshooting info? Here are the steps:

  • Open the Settings > Troubleshooting tab
  • Click the "Export Info to File" button
  • Reply with the file attached

Thanks!
Aug 23, 2021  • #2
User Image
StevenZ
11 discussion posts
Hi there,

Thanks for the reply. I have attached the troubleshooting info below, I also attached a video of me running the script with a hotkey. Thanks.
• Attachment [protected]: DisplayFusionDebugInfo.zip [90,219 bytes]
• Attachment [protected]: record.mp4 [617,279 bytes]
Aug 23, 2021  • #3
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

Thanks for sending that over. If you create a new script that just has the maximize function in it, is there still a delay?

Thanks!
Aug 24, 2021  • #4
User Image
StevenZ
11 discussion posts
Nope, using the built in "move window to current monitor and maximise" function works fine.
Aug 24, 2021  • #5
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

Could you send me over a debug log? Here are the steps:

  • On the DisplayFusion Settings > Troubleshooting tab, change the Logging drop-down to "L1: Log Minimal" and click Apply
  • Reproduce the issue and note the time so we'll know where to check in the log file
  • Click the "Export Info to File" button on the Settings > Troubleshooting tab
  • Reply with the file attached
  • Disable debug logging after sending the log

Thanks!
Aug 24, 2021  • #6
User Image
StevenZ
11 discussion posts
Hi, here's the log file, the time would be 2021/08/25 03:41, although looking at the log file myself, there seem to be many instances of
FAIL:L1##_##displayfusionservice.exe:18416##_##BFProcessHelpers.Static:GetProcessMainFileNameOldMethodNOCACHE:69
, with the pid pointing to either memory compression or registry. Not sure how they're related to my issue but hope the info would help.

Thanks!
• Attachment [protected]: DisplayFusionDebugInfo.zip [177,504 bytes]
• Attachment [protected]: Screenshot_1.png [10,948 bytes]
Aug 24, 2021 (modified Aug 24, 2021)  • #7
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

It doesn't look like the file were looking for got attached, it should be called "DisplayFusion.log". Could you try running through those steps again?

Thanks!
Aug 25, 2021  • #8
User Image
StevenZ
11 discussion posts
Hmm this is weird, when I click export info to file, the log file doesn't get exported, this is pulled from AppData\Local\DisplayFusion. The time would be 2021/08/25 22:17:25. Thanks.
• Attachment [protected]: DisplayFusion.log [107,325 bytes]
Aug 25, 2021  • #9
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

Sorry for the delay. Does the issue also happen with any other applications outside of your browser?

Thanks!
Sep 14, 2021  • #10
User Image
StevenZ
11 discussion posts
Hi, I have tried opening other browsers (Brave, Edge, IE) using the same command and the same behaviour was exhibited.
Sep 15, 2021  • #11
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

Interesting, and it doesn't matter which monitor it opens on, as long as it's opening within a monitor split, the issue will happen?

Thanks!
Sep 15, 2021  • #12
User Image
StevenZ
11 discussion posts
Hi Owen,

That is correct, on my main monitor without a split, there is minimal delay and the time it takes to complete the script is consistent. But on my other two monitors with splits, there will be a delay and the time for the window to be maximised varies. I'm using monitors with different resolutions, could that be what's causing the problem?

Thanks.
Sep 15, 2021  • #13
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

If you remove the splits on one of your side monitors and then try it, does the issue persist? I don't think it's an issue with mixed resolutions, but this should point us in the right direction :)

Thanks!
Sep 16, 2021  • #14
User Image
StevenZ
11 discussion posts
Hi Owen,

I seem to have found the potential issue. Removing the splits didn't seem to reduce the latency, so I tried changing the resolution of the monitors. For context I'm using 3 monitors with 1080p, 1440p and 4k respectively, with the 1440p and 4k running at their native resolution and the 1080p monitor upscaled to 2880x1620. The 4k and upscaled monitor just so happened to be the ones with splits, hence I assumed that the splits might be causing the problem.

I removed the upscaling and changed the resolution of the 4k monitor down to 1080p, and the delay when executing the script is gone. I have also tried with upscaling disabled and the 4k monitor running native resolution, there is minimal delay on the 1080p monitor and the usual longer delay on the 4k monitor. It seems that there will be a longer delay with increased resolution, the delay of running the script is slightly shorter on the 1080p monitor compared to the 1440p monitor. I have tried this with splits enabled and disabled (splits might be causing a very slight delay but I can't really tell), and with the different browsers mentioned in the earlier message.
Sep 16, 2021  • #15
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

Interesting, I've been playing around with this on my end with a 3K monitor, but I can't seem to reproduce it.

Can you try adding this line right after your "OpenUrlNewWindow" line:

BFS.General.ThreadWait(1000);

Let me know if that helps!
Oct 1, 2021  • #16
User Image
StevenZ
11 discussion posts
Hi Owen,
Unfortunately the delay when trying to maximise the window is still there. Do you think it would help to reinstall Displayfusion?
Thanks.
Oct 2, 2021  • #17
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

A reinstall certainly won't hurt. If you would like to create a backup of your settings, you can do so in the DisplayFusion Settings > Options > Export Settings.

Let me know how you make out.

Thanks!
Oct 4, 2021  • #18
User Image
StevenZ
11 discussion posts
Hi Owen,
Not sure that the reinstallation did anything at all. But I guess it's alright, the delay isn't too much of a problem and I'm not sure if it's even Displayfusion's problem. Thank you very much for your help :)
Oct 5, 2021  • #19
Owen Muhlethaler (BFS)'s profile on WallpaperFusion.com
Hi Steven,

Ah, sorry to hear. I'm going to keep an eye on this, and see if any other customers experience something similar. If we're able to reproduce anything on our end, we'll be sure to let you know.

Thanks!
Oct 5, 2021  • #20
User Image
StevenZ
11 discussion posts
Hi Owen,
No problem! This is just a minor incontinence, DF is still one of the most important utilities that I use, keep up the good work! :)
Oct 6, 2021  • #21
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)