Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

User Image
krismyklebust
16 discussion posts
Hello!

Just recently stumbled upon DisplayFusion and I'm digging it so far. Great piece of software! :)
Hopefully someone here can help me with a few things.

I currently have three monitors connected to my PC:

* 34" LG Ultrawide (2560x1440) [Office]
* 55" Samsung TV (3840x2160) [Bedroom]
* 65" Philips TV (3840x2160) [Living Room]

I have set up functions with custom key combinations/macros to switch between the aforementioned profiles.
It's all working great apart from one thing:

When I load a monitor profile, all the windows that were previously maximized are now displayed as smaller windows.
I have to maximize them manually to get them back to their previous state.

I have two questions:

* Is there a way to run a script or a function to maximize a select few windows when loading a monitor profile?
I'd like to maximize the following windows: Discord, Vivaldi, Kodi, with Kodi being the topmost window/in the foreground.

* If this is not possible, is there a way to run a script or a function to maximize ALL windows when loading a monitor profile?
Apr 24, 2018 (modified Apr 25, 2018)  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Both are definitely possible! If you'd prefer it to maximize only those selected windows, can you send me the EXE names for each of them? If you'd prefer it to maximize all open windows, just let me know, as that's even easier :)
Apr 27, 2018  • #2
User Image
krismyklebust
16 discussion posts
I think I'll be okay maximizing all windows.
I take it you don't need the .exe-names for that?

Thanks in advance! :)
Apr 28, 2018 (modified Apr 28, 2018)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Correct! One more question. When they're shrunken, are they technically still maximized? i.e. Does the button show the two squares on it, and you have to click once to restore it, then again to re-maximize it?
Apr 30, 2018  • #4
User Image
krismyklebust
16 discussion posts
I want to say that this doesn't happen every time I switch monitor profiles, but more often than not.
When it does happen, it doesn't necessarily affect all running programs.
The programs it does affect will be show in a smaller, shrunken window in the top left corner of the screen.

To answer your question:
I get what you're asking, but that's a no; I only see one square.

For my web browser (Vivaldi), one press of that square button is enough to maximize it.
A double click on the tab bar at top of the window or pressing the "windows key + up arrow" on my keyboard also yield the same result.

Kodi is a bit different since it's running as a fullscreen windowed program.
When switching monitor profiles it's often shown as a smaller window in the upper left corner of the screen as mentioned earlier.
Hitting "alt + enter" will reveal the top bar with minimize, maximize and close buttons and at the same time centering the window on the monitor.
Hitting "alt + enter" one more time will maximize the window so it's shown the way it should be.

Hope this wasn't too confusing and thanks for taking the time to help :)
Apr 30, 2018  • #5
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, here you go! Create a Scripted Function with this code:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        foreach (IntPtr window in BFS.Window.GetVisibleAndMinimizedWindowHandles())
            BFS.Window.Maximize(window);
    }
}

Then create a "Monitor Profile Changed" Trigger rule and have it run that scripted function as an Action.

Hope that helps!
May 4, 2018  • #6
User Image
krismyklebust
16 discussion posts
Thanks for the help, Keith, and sorry for replying so late.
I've been unable to test your script/solution properly until now. It works most of the time, but I sometimes run into weird behaviour after the script has been triggered.
Sometimes my mouse won't let me click on anything in my web browser, now and then the windows won't be maximized and other strange thing like that.
My main gripe is when I switch monitor profiles the playback of videos in Kodi gets choppy.
After restarting Kodi the problem is gone.

So, I was thinking... Could this be done instead:

1. Close all running programs (I think they would need to be forced to quit, especially Kodi)
2. Start Kodi, and ONLY Kodi

Is this something you could help with?
Sorry for being a PITA.

- Kris -
May 11, 2018  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Trying to terminate all running programs would be pretty risky. If you can provide a list of EXE names that you want terminated by the script, I can do that to make it a little safer :)
May 11, 2018  • #8
User Image
krismyklebust
16 discussion posts
Hehe, maybe you're right ;)

Here's a list:

kodi.exe
Steam.exe
vivaldi.exe
Spotify.exe
Discord.exe
May 11, 2018  • #9
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Oh, one more question, what's the full path to kodi.exe on your system?
May 15, 2018  • #10
User Image
krismyklebust
16 discussion posts
C:\Program Files (x86)\Kodi\kodi.exe

EDIT: I had to reinstall Kodi and I've installed the alpha version of Kodi 18 which is now 64-bit.
The path to the .exe now is: C:\Program Files\Kodi\kodi.exe
May 15, 2018 (modified May 15, 2018)  • #11
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! Try this scripted function out:

Code

using System;
using System.Drawing;

public static class DisplayFusionFunction
{
    public static void Run(IntPtr windowHandle)
    {
        // List of apps to kill
        string[] appsToKill = { "*kodi.exe", "*Discord.exe", "*Spotify.exe", "*vivaldi.exe", "*Steam.exe" };
        
        // Path to Kodi
        string kodiPath = @"C:\Program Files\Kodi\kodi.exe";
        
        // Kill the apps
        foreach (string app in appsToKill)
        {
            BFS.Application.Kill(BFS.Application.GetAppIDByFile(app));
        }
        
        // Launch Kodi
        BFS.Application.Start(kodiPath);

    }
}
May 16, 2018  • #12
User Image
krismyklebust
16 discussion posts
Been testing this for a bit now, and it seems to work really well, atleast 90% of the time :D Thanks!

There's one major problem though:
At random intervals when using the computer, the scripted function will run on it's own.
Needless to say, this is pretty inconvenient and a bit annoying.
I can be in the middle of watching a movie when the script suddenly decides to execute with no input from me whatsoever.
Any idea why this would happen? I only have it set up to trigger on "monitor profile changed".

A few other minor gripes:

* This is rare, but sometimes Kodi will close, but it won't reopen.

* Every once in a while the wallpaper doesn't seem to load right and the icon placement is a bit off. Almost like the resolution is wrong. Sometimes the wallpaper won't load and it's just black. All of this is usually fixed by loading a different profile then reloading the one giving me problems.
May 19, 2018 (modified May 19, 2018)  • #13
User Image
krismyklebust
16 discussion posts
I've figured out what's causing the scripted function to run.

I have a Samsung "The Frame" TV in my bedroom
(https://www.samsung.com/us/televisions-home-theater/tvs/premium-uhd-tvs/55--class-the-frame-4k-uhd-tv-un55ls003afxza/).
This TV has a built in sensor that will detect light and motion to turn the TV on to display artwork.
If it detecs no motion it will turn off after 15 minutes of inactivity.

So, whenever someone walks into that room, or even walks past the door if it's open, the TV will turn on and the script will run.
Like I said in the previous post; rather annoying if I'm using the computer to browse the web or watching a movie, since the script will kill Kodi/Vivaldi etc. The wallpaper is also left black after this happens. In other words, it won't load the wallpaper profile.

Do you know if there's a reason why the script is running when that specific display/TV is turned on?
The script is not executing if I turn on the TV in the living room (Philips TV).
May 20, 2018  • #14
Keith Lammers (BFS)'s profile on WallpaperFusion.com
When that Samsung TV turns on, if you open the DisplayFusion Monitor Configuration window, does it show that the profile is detected? If so, that would be what's causing the scripted function to run. Triggers with Monitor Profile conditions will run any time the profile is detected, even if you didn't manually load the profile.
May 26, 2018  • #15
User Image
krismyklebust
16 discussion posts
The profile does not change. It stays the same.

I realize this is a weird problem and that I'm probably the only user that is experiencing it,
so I don't expect you to spend a lot of time on this particular issue.

I'll try to find a work around... thanks for all the help :)
May 26, 2018  • #16
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries! One last question: when the TV is asleep, does the Monitor Configuration window show "Detected Profile" in the top left? And then when the TV is on, does it still show that, with the same profile name?
May 31, 2018  • #17
User Image
krismyklebust
16 discussion posts
I'm not entirely sure what you mean.

If I have the monitor configuration window up on my screen while using the computer in either the office or in the living room (with the respective profile loaded), it says "Detected Profile: Office" or "Detected Profile: Living Room".

Scenario:

I walk into or past my bedroom, allowing the motion sensor to detect me and turn on the TV turns (this takes about 4-5 seconds) and quickly rush back to check the monitor configuration window.
It says "Detected Profile: Office" or "Detected Profile: Living Room", depending on where I've been using the computer from and what profile I've loaded.

It never says "Detected Profile: Bedroom" unless I manually hit the key combination to load that specific profile.

So no; it does not say "Detected Profile: Bedroom" when my TV detects motion. Not before, during or after it's run the script.

In the monitor configuration window I've set it up so no more than one screen is enabled at any given time.
The other two that are not in use are disabled, if that makes sense.
If I use my computer in the office, I hit the key combination to load this specific profile which enables the monitor in the office and disables the other two monitors/TV's.
I've set up a similar profile for the living room and the bedroom, as well.

Hope this clarifies things.
May 31, 2018  • #18
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, thanks! Which Monitor Profile is that script assigned to in the Trigger rule?
Jun 1, 2018  • #19
User Image
krismyklebust
16 discussion posts
I have it set to run on "Monitor Profile Changed". I haven't specified a specific profile, as you can see in the screenshot below.

http://prntscr.com/jplum7

Do I need to set up three rules? One for each monitor profile?
Jun 1, 2018 (modified Jun 1, 2018)  • #20
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No, I think I was able to reproduce this here now. I've added it to our list to fix up, thanks!
Jun 1, 2018  • #21
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Maybe not actually. Could you send me a debug log for this issue? Here are the steps:
  • On the DisplayFusion Settings > Troubleshooting tab, change the Logging drop-down to "L2: Log Detailed" 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
Jun 1, 2018  • #22
User Image
krismyklebust
16 discussion posts
Sure. :)
I've attached the log file as an attachment.

20:30 is the time I walked into the bedroom to provoke the issue.
• Attachment [protected]: DisplayFusionDebugInfo.zip [243,659 bytes]
Jun 1, 2018  • #23
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! When the TV is off, does it show up as a disabled monitor in Monitor Configuration, or does it get completely removed?
Jun 10, 2018  • #24
User Image
krismyklebust
16 discussion posts
The TV is disabled in the monitor configuration regardless of it being in "art mode", "sleep mode" (no motion detected for 15 minutes), or off (longpress on the power button on the remote to turn the TV off and disable the motion sensor).

EDIT: I have not pulled the power cord from the TV if that's what you mean.
Do you want me to do that to see if the TV gets completely removed from the monitor configuration?

I'll do that as soon as possible and report back.
Jun 13, 2018 (modified Jun 13, 2018)  • #25
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Nah, that's ok. I was just wondering if it disappears completely (as if it were disconnected) when it's in sleep mode. From the log I can see that when the TV wakes up from sleep, DisplayFusion sees it and the detected monitor profile goes to "null" because the config doesn't match any profiles, then right after, it goes back to recognizing your monitor profile, which is what's causing the Trigger to fire. So something happens with the monitor configuration briefly when the TV wakes from sleep.

Do the other monitors flicker briefly when the TV wakes from sleep? Or do you hear the Windows "device connected" beep?
Jun 14, 2018  • #26
User Image
krismyklebust
16 discussion posts
Ahhh I see.
No, they do not flicker and there are no sounds :)

PS: Thanks for not giving up. The customer service is top notch. :)
Jun 14, 2018  • #27
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries! I will need to check with our devs on a few things to see where to go next.
Jun 19, 2018  • #28
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Unfortunately they're not sure what's up here either, so I'm going to have to do some more work to try and reproduce it locally here. I will keep you updated if/when I make some progress on it.

Thanks!
Jun 21, 2018  • #29
User Image
krismyklebust
16 discussion posts
Thanks for all your hard work :)
Please do let me know if you figure out how to fix the issue.
Jun 21, 2018  • #30
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've been chugging away at this but not made any progress. I think it may just be a weird quirk with the way your Samsung TV works with the motion detector :(

Are you still running into this issue with DisplayFusion 9.3?
Aug 17, 2018  • #31
User Image
krismyklebust
16 discussion posts
After seeing your post from yesterday I went through my setup once again, configuring everything and everything seems to be working running on the latest version! Oh happy day! :D

I really haven't done any huge changes apart from unplugging the HDMI-cables on the computer end when doing some cable management, and that's something I've done before when troubleshooting.
I can only assume something in the newer version fixed my issue.
Anyway, it is now working and I couldn't be more happy!

Thank you so much for all the help and for the great software.
Have a wonderful weekend!
Aug 18, 2018  • #32
Keith Lammers (BFS)'s profile on WallpaperFusion.com
No worries, that's really great to hear, thanks for letting me know!
Aug 20, 2018  • #33
Subscribe to this discussion topic using RSS
Was this helpful?  Login to Vote(-)  Login to Vote(-)