Title

Message

Confirm

Want to earn a free DisplayFusion Pro license? We're looking for DisplayFusion translators!
<< DiscussionsReply

Some Quality of Life Changes to Mirroring

Avatar from Gravatar.com
jjjjjj
27 discussion posts
I've been enjoying the new mirroring feature, but there are some things that are rather annoying or infuriating about it that I feel could be changed easily.

1) Every mirror window has the exact same title. I've been playing with automating some stuff using AHK, and it'd be SO helpful if you implemented incremental titles (first opened would be "Mirror Monitor (1)", second would be "Mirror Monitor (2)", etc.) so that there is some factor by which to differentiate the windows in the scripts.
2) Is there any plan to improve the low frame rate and latency? OBS is able to do essentially the same thing with almost no latency and a smooth framerate, and I'd love to be able to do the same with DF.
3) When using a key combination to launch the mirror selected area tool, the tool is immediately dismissed when any modifier key is released. Is this behavior intentional? Can it be fixed/changed?
Jan 9, 2019  • #1
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I've added 1 and 3 to our list (3 is definitely not expected). For 2, you can adjust the polling speed with this Advanced Setting: "Mirroring: Mirror Polling Interval (ms)"

I'm not sure how OBS does the mirroring unfortunately, but if we can find a better way to do it, it will definitely go on our list.

Thanks!
Jan 9, 2019  • #2
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Changing the polling rate in advanced settings seems to be sufficient for my uses. It looks like most of the perceived latency was due to the polling rate as well.

I did think of another potential feature to make life easier though:

4) add mirroring as a custom function option such that rather than having to script the hotkey to activate mirroring, then the mouse movements and clicks to select the area, then resize and position the mirroring window (all of which is not very optimal due to having to write in numerous delays as the script waits for each of the corner selectors, the window to launch, etc.); a custom function could be added instead that automatically mirrors a predetermined area and then moves and resizes the resulting window to a second predetermined area
Jan 17, 2019 (modified Jan 17, 2019)  • #3
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Glad to hear the polling speed helped! I've added your request for mirroring functionality in Custom Functions to our feature request list as well.

Thanks!
Jan 17, 2019  • #4
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Is there a list of requested features somewhere that can be referenced? Curious to see what else might be on the plate for the future.

(edit: I saw that 1 and 3 were added in the last beta, and it's working really well. Thanks!)
Jan 24, 2019 (modified Jan 24, 2019)  • #5
Avatar from Gravatar.com
jjjjjj
27 discussion posts
I'm discovering some weird behavior with mirror windows and specifically multiple instances of them. Maybe you could shed some light here?

If I use the keyboard shortcut to activate mirroring (currently using Ctrl+Alt+Shift+M), select two point, then quickly use the shortcut again, the UI overlay to select the first point appears, but after doing so, the overlay to select the second point does not appear until I minimize the maximized mirror window from the first run.

Also I'm seeing some interesting behavior with integration with AHK (possibly due to the nature of keystrokes sent from it). I'm currently using AHK to trigger the keyboard shortcut, sleep for 200ms, click the first point, sleep for 200ms again, click the second point, wait for the window to appear, move and resize the window, send 3 more keyboard shortcuts (Ctrl+Alt+Shift+P, Ctrl+Alt+Shift+R, and Ctrl+Alt+Shift+T), and finally (for debugging purposes to insure the issue was not caused by not waiting sufficiently long enough) wait for 3 seconds before sending a second Ctrl+Alt+Shift+M. Except the mirror UI never appears at all. The 3 keyboard shortcuts before it all activate correctly (as is evident due to their respective actions being performed), but Ctrl+Alt+Shift+M does nothing. To be sure, I had it wait for 10 seconds after sending Ctrl+Alt+Shift+M as well, and it gets to the 10 second wait just fine; the mirror UI just never pops up. Any idea what's causing this?

EDIT: Did some further testing, but I could not reproduce the behavior manually doing the same steps as the script (other than the first issue I mentioned). If I have the script click somewhere on the desktop before issuing the second Ctrl+Alt+Shift+M command, it works as expected... really weird.
Jan 24, 2019 (modified Jan 24, 2019)  • #6
Keith Lammers (BFS)'s profile on WallpaperFusion.com
That's weird indeed! I'll do some more testing here to see if I can reproduce those issues.
Jan 29, 2019  • #7
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I can't seem to reproduce the first issue in 9.5 Beta 1. You're on the beta as well, right?
Jan 30, 2019  • #8
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Yep. Here are the steps exactly. Firstly, I have mirroring bound to Ctrl+Alt+Shift+M. I press the combo, click to select the first point, then click to select the second point. At this point the mirroring window for the region I just selected should open. Immediately after selecting the second point I press the combo again, which prompts me to select the first point. I do so, and the overlay which should appear to have me select the second point never appears. I then close the mirroring window which appeared from selecting the first two points, at which point the second overlay immediately appears. At this point, you can loop the issue indefinitely by pressing the combo again, which will show the first overlay, but not the second until the mirror window is closed again.
Jan 30, 2019  • #9
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! I'm doing the same steps here but no luck reproducing it. If you wait longer after the first mirror window opens, do you still have the same issue? I tried the hotkey within a couple of seconds of the first mirror window opening and still no issues.
Jan 31, 2019  • #10
Avatar from Gravatar.com
jjjjjj
27 discussion posts
I can confirm the issue exists even if I wait longer. I've attached the debug info as well in case it's a specific combo of settings that's causing this.
• Attachment [protected]: DisplayFusionDebugInfo.zip [30,066 bytes]
Jan 31, 2019  • #11
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, thanks! Could you attach a backup of your settings as well? (Settings > Options > Export)

Thanks!
Jan 31, 2019  • #12
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Here you go:
• Attachment [protected]: DisplayFusion Backup (2019-01-31 @ 13-47, 9.4.99.101, ZBOOK-17-G4).reg [450,140 bytes]
Jan 31, 2019  • #13
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! I think I might have found it. If you clear the Mirror Polling Speed advanced setting, does that fix it?
Feb 1, 2019  • #14
Avatar from Gravatar.com
jjjjjj
27 discussion posts
"does changing back the one setting related to mirroring that you changed fix the issue?"

Boy do I feel silly now for not catching that sooner. :'D

Yeah that was it lol. Any fix possible?

On a side note, what's the classic polling method setting? And one last thing. . . actually two things.

I've been using mirroring windows with different functions, and I found an interesting side effect. As you can see from my settings, I have a handful of scripted functions downloaded. The functions of importance here is the one bound to Ctrl+Alt+Shift+T (make translucent/click-through), as well as the built in function bound to Ctrl+Alt+Shift+P (pin to top). I've found that when both are used in conjuntion on a mirroring window, I get the the interesting side-effect that I'm able to keep the window overlayed on top of even full screen games. I MUST use both though. Pin alone cause the game to keep minimizing (though the window does stay on top while the game attempts to stay up (which is interesting considering the next point), and obviously transparent/click-through alone does nothing visible when the game is up. The weird thing is, no other windows (that I've found) behave like this. Most apps are completely hidden when a (true) full screen game is up whether or not I use pin. And due to them not rendering on top, they don't trigger the constant minimizing. Using pin + transparent/click-through does nothing either with any other windows.

Why do mirroring windows behave like this? And don't get me wrong. NEVER change this. This is amazing. I've been using this plus autohotkey to remap HUD elements from my side displays to my center display when playing games in surround (like league of legends). The cherry on top is the Ctrl+Alt+Shift+R scripted function which removes all borders. I use that and AHK to make the mirrored areas have a perfect 1:1 ratio to the size of the original area and use some clever AHK tricks to make the mouse jump between screen regions seemlessly, allowing me to interact with the minimap as if it were on my main display and it's absolutely amazing.

And the obvious followup question. Can other windows be made to behave like this as well? I'd love to have a small chat window or a website up on the side while playing in surround if possible, but as it is, nothing I've worked out can pin anything but DF's mirroring windows over a full screen game.
Feb 1, 2019  • #15
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks for confirming! I've put that polling/selector bug on our list to fix up.

I believe the classic polling option was for Windows 7 when DWM is disabled, it's not really applicable in Windows 10 or Win 7 with Aero enabled.

I honestly have no idea why the mirror windows behave that way, so I don't imagine it's something we can do to other windows intentionally. It's likely related to the mirroring functions in the Windows API and just a weird quirk :)
Feb 1, 2019  • #16
Avatar from Gravatar.com
jjjjjj
27 discussion posts
well, if you guys ever work out a way to hold other windows on top of full screen apps, that'd be pretty awesome too. :P

One last(?) thing. Is there any way for the mirrored area to correctly reflect the cursor style at the original location? Right now it only shows the default cursor in the mirror window, regardless of the actual cursor's style.
Feb 4, 2019  • #17
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I don't believe there is, no. Sorry!
Feb 5, 2019  • #18
Keith Lammers (BFS)'s profile on WallpaperFusion.com
We're getting ready to release DisplayFusion 9.5 Beta 2 and the mirroring issue when the polling speed setting is configured will be all fixed up in it. It's not posted publicly yet, but you can download it here if you want to give it a try: https://www.binaryfortress.com/Files/DisplayFusion/DisplayFusionSetup-9.5-Beta2.exe

Thanks!
May 2, 2019  • #19
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Quote:
We're getting ready to release DisplayFusion 9.5 Beta 2 and the mirroring issue when the polling speed setting is configured will be all fixed up in it. It's not posted publicly yet, but you can download it here if you want to give it a try: https://www.binaryfortress.com/Files/DisplayFusion/DisplayFusionSetup-9.5-Beta2.exe

Thanks!


I've installed the beta and this issue appears to be partly resolved. Manually, it works as expected now, but I'm still having a problem when it's scripted, though the behavior has slightly changed.

I've changed my script to specifically wait for the mirror selection overlay to appear after sending the shortcut, and by doing so I've gained better insight into its behavior. The first shortcut triggers correctly and the mirror window comes up after selecting the two points. When triggering the shortcut again (via script), the mirror overlay appears briefly (literally flashes) and disappears again. For further testing I configured the script to activate the shortcut multiple times in a row after the initial successful trigger, and to wait for the overlay to appear after each time, and sure enough, each time the overlay would just flash for a moment before disappearing. At this point, if I (without even moving the mouse) manually send the shortcut, the overlay opens correctly.
May 3, 2019  • #20
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Would you be able to attach the script so that I can test it out here?
May 3, 2019  • #21
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Quote:
Would you be able to attach the script so that I can test it out here?


Yes. I added some comments in the script explaining how DF and the script must first be configured, as well as explaining what triggers the issue.

EDIT: I guess for perfect replication, you should set the polling rate down to 1 as I have.
• Attachment [protected]: script.ahk [5,548 bytes]
May 3, 2019 (modified May 3, 2019)  • #22
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Thanks! I'll test this out and let you know how it goes.
May 7, 2019  • #23
Keith Lammers (BFS)'s profile on WallpaperFusion.com
I can't seem to get this working. The mirror selected overlay shows but then nothing else happens.

I'm not AutoHotkey expert, but I think it's because I don't have the BFFormMousePositionSelector class?

Code

May 10, 2019  • #24
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Quote:
I can't seem to get this working. The mirror selected overlay shows but then nothing else happens.

I'm not AutoHotkey expert, but I think it's because I don't have the BFFormMousePositionSelector class?

Code



That should be the class of the mirroring overlay. You can confirm that with the Window Spy tool that comes with AHK: https://imgur.com/a/GcAr4a9
May 10, 2019  • #25
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ah yep, sorry. Told you I was no AHK expert ;)

So that line just tells the script to wait until a window with the "BFFormMousePositionSelector" class shows up?
May 13, 2019  • #26
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Quote:
Ah yep, sorry. Told you I was no AHK expert ;)

So that line just tells the script to wait until a window with the "BFFormMousePositionSelector" class shows up?


Yep. When working correctly, it should wait for the window to appear, execute the first mouse click, which briefly closes that window. AHK checks that it closed, then checks that a new selection window was opened (the second point), before issuing the second click. I used slightly differing code in some areas depending on my experience with how certain parts of the script tended to behave. You can see the second time around for selecting the second region to mirror, it uses a bit more error checking because I was having issues with the mouse clicks in that section timing nicely with DF's overlay appearing.
May 13, 2019  • #27
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Ok, I think we have something that will work better for you now. In 9.5 Beta 4, we've added scripting functions for the mirroring, so you can now create the window, and it will return a handle so that you can move/size it as well. For example:

Code



Hope that helps!
May 17, 2019 (modified May 17, 2019)  • #28
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Quote:
Ok, I think we have something that will work better for you now. In 9.5 Beta 4, we've added scripting functions for the mirroring, so you can now create the window, and it will return a handle so that you can move/size it as well. For example:

Code



Hope that helps!


Thanks for the example. It works pretty well for my use case, but I'm hoping to make it a bit more flexible. In the AHK script I shared with you earlier, you can see I was using variables set at the top of the script for the display width and bezel correction width, as well as some game-specific variables to determine the coordinates to mirror. Is there any way to pass on these variables to the mirroring script so I don't have to create multiple scripts for every scenario?
May 28, 2019  • #29
Jon Tackabury (BFS)'s profile on WallpaperFusion.com
You can't pass variables directly into the script, but you can use the BFS.ScriptSettings.ReadValue/BFS.ScriptSettings.WriteValue scripting commands. In your AHK script you can set a registry value, then in your script just call BFS.ScriptSettings.ReadValue to read that value back again. To see where and how to write the registry values just call BFS.ScriptSettings.WriteValue as a test, then look in HKEY_CURRENT_USER\Software\Binary Fortress Software\DisplayFusion\ScriptSettings.

Thanks!
May 28, 2019  • #30
Avatar from Gravatar.com
jjjjjj
27 discussion posts
Quote:
You can't pass variables directly into the script, but you can use the BFS.ScriptSettings.ReadValue/BFS.ScriptSettings.WriteValue scripting commands. In your AHK script you can set a registry value, then in your script just call BFS.ScriptSettings.ReadValue to read that value back again. To see where and how to write the registry values just call BFS.ScriptSettings.WriteValue as a test, then look in HKEY_CURRENT_USER\Software\Binary Fortress Software\DisplayFusion\ScriptSettings.

Thanks!


That was the last piece of the puzzle! I now have a DF script that reads the registry to create a mirrored window at (x2, y2) named <whatever> of any region at (x1, y1) of size w*h at a 1:1 ratio that can be customized and called from my AHK script seamlessly. It's never run as smooth as this before. Thanks for the help!
Jun 8, 2019  • #31
Keith Lammers (BFS)'s profile on WallpaperFusion.com
Excellent, glad to hear it!
Jun 10, 2019  • #32
Was this helpful?  Login to Vote(1)  Login to Vote
<< DiscussionsReply