Commit Graph

89 Commits

Author SHA1 Message Date
Terry MacDonald
3fba28087c Made TaskBarLayout creation more robust
TaskBarLayout now catches exceptions recording the taskbar location and handles them properly. It will skip any screenss that it cannot access the taskbar information for. The Screen layout generator for NVIDIA, AMD and Windows have all been updated to handle having no taskbar layout information (it just assumes the taskbar is down the bottom of the screen).

Hopefully fixes #114
2022-06-02 19:51:07 +12:00
Terry MacDonald
56c2410d85 Updated WinLibrary so it patches adapter IDs accurately
This was a major error that somehow slipped through previous work. WinLibrary was only partially patching the Windows Display Config when it was being loaded, and that resulted in some parts  of the Windows Display Config not working after a windows reboot. This should now be fixed!

Fixes #103
2022-06-02 18:14:51 +12:00
Terry MacDonald
340387dcc4 Updated WinLibrary, NVIDIALibrary and AMDLIbrary to latest versions
Updated video libraries to v1.7.5
2022-05-31 09:02:18 +12:00
Terry MacDonald
a93c9e62d2 Added Windows per source DPI scaling settings 2022-05-30 10:01:43 +12:00
Terry MacDonald
f40640ccbd Updated UpdateActiveConfig 2022-05-29 21:16:55 +12:00
Terry MacDonald
567c9b7af2 Reduced the displayid calls for profile comparison 2022-05-29 21:01:08 +12:00
Terry MacDonald
b7194dd6e9 Added extra logging 2022-04-19 09:51:35 +12:00
Terry MacDonald
f042622921 Added SpaceDesk to recognised PCI devices
Also improved logging around PatchAdapterIDs
2022-04-19 09:31:07 +12:00
Terry MacDonald
7bb96956f1 Fixed merge errors 2022-03-30 10:56:24 +13:00
Terry MacDonald
168fab9fc2 Merge from feature branch 2022-03-30 10:49:10 +13:00
Terry MacDonald
37b9a79ff2 [WIP] Partial integration of new libraries.
Still some bits broken.
2022-03-25 21:51:38 +13:00
Terry MacDonald
842854e957 Merged from feature-update-libraries 2022-03-24 22:41:16 +13:00
Terry MacDonald
67c1015730 Updated the NVIDIALibrary and WinLibrary to v1.7.0
This is the version used within NVIDIAInfo v1.7.0
2022-03-24 22:36:42 +13:00
Terry MacDonald
72b1acfe46 [WIP] Attempt to get TaskBar changing to work 2022-03-05 18:46:47 +13:00
Terry MacDonald
87f62aa322 Made display changes reliable 2022-02-12 09:18:03 +13:00
Terry MacDonald
1f6af1f0c7 Working taskbar refresh after stopping programs
Moved the refreshnotificationarea logic to only be used when needed.
2022-02-07 15:18:30 +13:00
Terry MacDonald
b65d42e3ea Working taskbar notification tray refresh 2022-02-07 15:01:59 +13:00
Terry MacDonald
093663bb1c Reverted attempts to get notification tray refresh
I have been attempting to force Windows to refresh the notification tray using various Win32 API methods by sending messages to those notification tray windows to get them to refresh, but I haven't been able to get the right combination of setings. I am now leaving it for the next littlw while to concentrate on other issues.
2022-02-07 14:43:20 +13:00
Terry MacDonald
2e52e3ceb1 [WIP] Attempt to refresh Taskbar SystemTary and Overflow Notification Window
Trying to get rid of any left over applications that DIsplayMagician had to kill the process of, so that the system tray is nice and tidy. Having some issues doing so.
2022-02-06 21:54:00 +13:00
Terry MacDonald
4f64537d89 Update AMDLibrary and WinLibrary to skip HDR if connector doesn't support it
This works for WinLibrary and *should* work for AMDLibrary, but I don't have an AMD video card to test it with :(.
2022-02-06 15:33:15 +13:00
Terry MacDonald
81b565dfa6 Fixed taskbar move in profiletools 2022-02-05 21:28:51 +13:00
Terry MacDonald
3aa07257b8 Working Taskbar positioning
Finally managed to get taskbar positioning working perfectly. Also managed to add a 'Profile Tools' button which will allow the user to easily move the windows taskbar around the screen to different places. Please note that Windwows 11 taskbar only works at the top of the screen, or at the bottom. The taskbar will move to the left or right, but only the start button is shown :(. So I've disabled selecting left or right in Windows 11.
2022-02-04 21:30:52 +13:00
Terry MacDonald
3e150cc28b Success moving main taskbar without explorer restart
Woo hoo! I managed to make the main taskbar move by sending a custom message I found that Windows 10 sends to the main taskbar.
2022-02-04 17:37:52 +13:00
Terry MacDonald
c45e66275a [WIP] Removing manual setting of taskbar location in DM
The idea should be to make the changes directly to windows, and DisplayMagician will set things up the same as it recorded you'd set.
2022-02-03 09:20:06 +13:00
Terry MacDonald
3b34d6943d [WIP] Fixed taskbar ProfileSettingsFOrm 2022-02-02 21:59:00 +13:00
Terry MacDonald
a13aa60258 [WIP] TaskBar changes 2022-02-02 11:44:13 +13:00
Terry MacDonald
c9a349125d [WIP] Added forcing taskbar edge ability 2022-02-02 11:25:11 +13:00
Terry MacDonald
f6e5dbc0b7 [WIP] Refactor for taskbar code
Partially through a different refactor to completely change how the taskbar settigns are stored, and the logic behind the application. Should make the taskbar more robust to apply.
2022-02-01 22:04:08 +13:00
Terry MacDonald
cd25f9a0fa [WIP] Partially working taskbar moving 2022-01-30 20:24:36 +13:00
Terry MacDonald
76ec3d6426 Fixed bug in TaskBar processing when ni edge available 2022-01-29 14:55:24 +13:00
Terry MacDonald
b12815dcff Fixed mistaken file copy 2022-01-28 17:18:20 +13:00
Terry MacDonald
7d0c8e1ca4 Updated NVIDIALibrary and WinLibrary to latest version 2022-01-28 17:04:42 +13:00
Terry MacDonald
be30996020 Changed the message shown to users to remove recreate message
We are able to patch the taskbar settings in DisplayProfiles without needing to get the users to remake their display proifiles. This changes the messaging to users.

This changes *should* be the last ones needed to get taskbar setting integrated. Fixes #78 (as much as we can fix it).
2022-01-25 09:28:13 +13:00
Terry MacDonald
f40863685c Modify tasbkarsettings to only get the useful settings
Also updated the code comments to describe the various values and what they mean.
2022-01-24 21:39:49 +13:00
Terry MacDonald
b6e0f83163 Working windows taskbar location tracking
Works on Win 10, and partially on Win 11. Win11 won't update the main window until explorer.exe is restarted :(. There is talk that an upcoming Win 11 update will change that behaviour.
2022-01-23 22:45:02 +13:00
Terry MacDonald
918e3cda04 Initial working TaskBar position changes
Note - doesn't work n Windows 11.
2022-01-23 10:33:14 +13:00
Terry MacDonald
587814409a [WIP] Added in TaskBarSettings and restarting explorer 2022-01-22 15:35:25 +13:00
Terry MacDonald
f860b91a72 Enforced update to file format v2.2 2022-01-21 20:37:56 +13:00
Terry MacDonald
29b592a6d1 Initial attempt at recording taskbar location
Used some of Soroush Falahati's amazing code, and now have the potential for storing the taskbar display layout. This unfortunately requires a display config change, so I will need to engineer some backwards compatibility.
2022-01-19 22:02:57 +13:00
Terry MacDonald
b148d7484a Updated HDR colour setting logic
The NVIDIA HDR colour logic was flawed, and wouldn't always apply properly. These logic changes now set the NVIDIA HDR colour back to windows controlled each time  so the settings are at a known inital logical state. Then winlibray can set the windows HDR mode, and NVIDIA can set the NVIDIA HDR mode.
2022-01-18 20:43:45 +13:00
Terry MacDonald
de1d93ee4d Updated WinLibrary to v1.3.8
This version adds USB device support, and SuperDisplay detection (it is a way to use an Android Tablet as another windows display).

Also fixes cloned displays so that it uses the path priority rather than relying on HDR settings for mapping the cloned display ID to the real Display ID. This corrects some errors which occurred when some earlier screens didn't support HDR or the advanced Windows colour settings. It will now work in those situations.
2021-12-16 12:25:11 +13:00
Terry MacDonald
22ae2bc178 Fixed multiple adapters and unsupported HDR parsing
Now supports multiple display adapters. Has been tested by @matthex with his 7 screens and 2 display adapters and works. Should fix #60 finally.

Also changed the way that cloned display configurations are patched. Was using the HDR structure previously as that contains a direct mapping, but of course it completely breaks if HDR information isn't supported by the monitor, or provided over the connection technology used. So the changes I made now use the display path priority order to figure out which cloned monitor belongs to which item.

Firstly, the UID's are pulled from the physical displays so that we have a list of them. We then go through the paths, and for each target we check if there is a matching physical UID. If there is NOT a matching physical ID, then it is a cloned display target. We store that for later.

Next, we go through the paths again, and we figure out which physical displays are NOT in use as display targets. When we have that list, we then map the left over physical displays to the cloned displays in path priority order.

Finally, we then go through each cloned display target in the paths array, and set it to the configuration that windows needs so it will make a cloned display. We also go through the modes array, and set the physical display id to the corresponding mapped physical UID we calculated earlier.

All of this results in Windows accepting the cloned display configuration as expected.
2021-12-12 09:23:24 +13:00
Terry MacDonald
9416ac3346 Updated WinLibrary to latest version
This corrects some errors with the WinLibrary and how it handles cloned displays.

Also removed the 0.5 second delay between the end of the NVIDIALibrary call, and the start of the WinLibrary one, because they do not appear to be needed based on the NVIDIALibrary testing we've been doing with NVIDIAInfo.

Also corrected some log entries and comments.
2021-12-11 00:15:49 +13:00
Terry MacDonald
b34cdcce6c Updated to latest WinLibrary version
This version of WinLibrary improves handling of multiple display adapters to cope with multiple displays across multiple display adapters. Hopefully fixes #60 (but no guarantees yet)
2021-12-07 18:33:16 +13:00
Terry MacDonald
77ab0f20f1 Updated NVIDIA Library and WinLibrary based on testing
Did a HUGE amount of testing with the amazing help of @domenic as part of #41, and we finally got the right configuration sorted out! This update is a reflection of the changes required.
2021-11-19 22:20:43 +13:00
Terry MacDonald
21d173b6ca Fixed mistake 2021-11-13 21:30:21 +13:00
Terry MacDonald
6f1721342f Updated NVIDIALibrary with the latest version
This version hopefully fixes the issues when returning from surround profiles to non-surround profiles.
2021-11-13 21:28:25 +13:00
Terry MacDonald
d4494aa699 Updated NVIDIA, AMD and Windows Video libraries
Updated with enhancements to make application of colour more robust, and to avoid a Windows CCD display validation issue.
2021-11-13 15:06:54 +13:00
Terry MacDonald
cc125b6601 Add an extra layer of library protection
Stopping unneeded AMD calls in NVIDIA mode, and NVIDIA calls in AMD mode.
2021-10-29 22:10:29 +13:00
Terry MacDonald
0b759ce378 Updated WinLibrary to latest version 2021-10-28 09:26:44 +13:00