Commit graph

286 commits

Author SHA1 Message Date
stefansjfw 6a0061dde3
Fix PowerRename UI doesn't handling DPI changes (#1424)
* Fix PowerRename UI doesn't handling DPI changes

* Address PR comments

* Address PR comments
2020-03-05 10:21:25 +01:00
yuyoyuppe 84fbdba9f5 MSIX: use com_object_factory for powerrename 2020-03-05 10:41:36 +03:00
vldmr11080 39cac396f5
Swallow shift keyboard event when dragging window (#1423) 2020-03-05 08:01:58 +01:00
Enrico Giordani 8373204c94
Now working on 0.15.2 (#1432) 2020-03-04 05:52:16 +01:00
Enrico Giordani 6787af413e
Increment version to 0.15.1 (#1428) 2020-03-03 22:31:57 +01:00
stefansjfw 0199b4e212
Handle exception while editor is parsing custom layouts (#1430)
* Fix migrating never applied custom zonesets

* Handle json parsing exception in LoadCustomModels()
2020-03-03 22:31:22 +01:00
stefansjfw 121be772df
Fix migrating never applied custom zonesets (#1427) 2020-03-03 21:48:22 +01:00
Enrico Giordani f3b3e3eded
Sanity check for imported settings that may have invalid data. (#1426) 2020-03-03 21:45:25 +01:00
vldmr11080 6556e1b4a2
Skip cloning device information from parent virtual desktop if it is deleted. (#1415) 2020-03-02 18:52:38 +01:00
vldmr11080 66892aea60
Secure acces from multiple threads to JSONHelpers (add missing lock) (#1375) 2020-02-27 09:52:14 +01:00
stefansjfw e2026aedbc
Fix typo in powerrenamer README (#1378) 2020-02-26 16:33:50 -08:00
yuyoyuppe 16b1bfa4d0 increment version to 0.15 🎉 2020-02-26 23:21:17 +03:00
PrzemyslawTusinski f015995ac4 Now updater is comparing versions instead of comparing thier strings 2020-02-26 23:06:44 +03:00
yuyoyuppe 0016836022 runner: periodically check if there's a new version available on github and offer a visit 2020-02-26 23:06:44 +03:00
yuyoyuppe c543b7585a notifications: add support for unpackaged apps and protocol activation 2020-02-26 23:06:44 +03:00
yuyoyuppe b90f1fc237 common: always use 0 for build number and make get_product_version return "vX.X.X" 2020-02-26 23:06:44 +03:00
vldmr11080 1f8f9aaf81
Revert "Swallow shift keyboard event when dragging window (#1362)" (#1363)
This reverts commit 2f9b753c5b.
2020-02-26 08:11:39 +01:00
vldmr11080 2f9b753c5b
Swallow shift keyboard event when dragging window (#1362) 2020-02-25 21:03:14 +01:00
Seraphima Zykova b1ac1859be
Removed FancyZones unit-test (#1360) 2020-02-25 17:14:59 +03:00
Enrico Giordani 74b076e31f
[CDPx] update SDK, restore telemetry, build MSIX (#1358) 2020-02-24 23:49:28 +01:00
Enrico Giordani 9b7f92188d
Runner check for MSI and MSIX (#1345)
* Add startup check for the MSI version of PT

* Alert if another instance of PowerToys is already running
2020-02-21 11:12:04 +01:00
Andrey Nekrasov 883bbf102a
settings: add a clarifying label if running as elevated (#1330) 2020-02-19 19:31:09 +03:00
Andrey Nekrasov e21f83267a
settings: remove Restart as a user button in an elevated context (#1328) 2020-02-19 18:51:24 +03:00
yuyoyuppe 27f0782465 settings: fix general settings hanging on save for a non-admin user 2020-02-19 17:20:09 +03:00
yuyoyuppe d45b0dee10 runner: fix Restart as... option 2020-02-19 17:20:09 +03:00
Yevhenii Holovachov 607a297c4a
"Always run as administrator" and "Restart as ..." only for administrator account (#1318) 2020-02-18 20:56:34 +01:00
Andrey Nekrasov 20519e3b81
MSIX: prompt and uninstall MSI PT version (#1248) 2020-02-18 18:11:01 +03:00
vldmr11080 733613ad28
Introduce handling of new/old work areas (#1296)
* Introduce handling of new/old work areas (defined by virtual desktop id and monitor)

* Save data to JSON storage only once after we register all deleted virtual desktops

* Update saving mechanism

* Remove resolution from unique identifier

* Update comments related to new unique identifier

* Don't handle NULL GUID as it is default one

* Revert "Remove resolution from unique identifier"

This reverts commit 5a36651217.

* Revert "Update comments related to new unique identifier"

This reverts commit 8e89802549.

* removed MigrateDeviceInfoFromRegistry

Co-authored-by: Seraphima Zykova <zykovas91@gmail.com>
2020-02-18 11:55:08 +01:00
Seraphima Zykova 604070763d
Add telemetry event for FZ editor (#1294)
* trace zones settings changes
2020-02-17 19:40:02 +03:00
yuyoyuppe 9607888fc5 PowerRename: bring the rename dialog to foreground 2020-02-17 18:38:14 +03:00
Andrey Nekrasov 1e6936a8c3
Thread safety for FanncyZonesData (#1281)
* FancyZones: make FancyZonesData thread-safe

* fixup: format affected sources

* fixup: clang-format case-style and format FancyZones.cpp

* fixup! add missing lock
2020-02-17 18:28:49 +03:00
Andrey Nekrasov fa3ce8de64
MSIX: add missing dependencies for the FancyZonesEditor (#1298) 2020-02-14 11:57:20 +03:00
Seraphima 59d218d623
Add telemetry event for PowerRename settings (#1279)
* moved MAX_INPUT_STRING_LEN constant
* added settings changed event log
2020-02-13 12:44:03 +03:00
Seraphima 8c86c3dc1b
Update FancyZones telemetry event for settings changed (#1268) 2020-02-12 13:08:11 +03:00
Seraphima 2bef7631ae
Add telemetry event for general settings (#1269)
* telemetry for general settings
2020-02-12 13:03:40 +03:00
Chris Davis 679b26cde4
Set the rename button to the default button on the dialog. Prior to this change, users would setup the rename inputs and hit return only to discover the cancel button had the key focus and all work would be lost. (#1271) 2020-02-11 11:33:30 -08:00
Seraphima 79c625d737
Persist app zone history in real time (#1257)
* save settings every time changes are performed
* settings are not saved on app exit
2020-02-11 14:34:37 +03:00
Seraphima a1d277e771
Unit-tests fixes (#1265)
* fixed typecast warnings
* removed unneded tests
2020-02-11 14:33:41 +03:00
vldmr11080 bde0f2f0ba
Fix crash when saving any module settings while module being disabled (#1259) 2020-02-11 07:57:11 +01:00
stefansjfw 53f830bb38
Migrate FancyZones data persisting from Registry to JSON file (#1194)
* Migrate FancyZones data persisting from Registry to JSON file

* Address PR comment: Remove redundant check

* Addres PR comment: Remove unused Dpi and add CmdArgs enum

* Address PR comment: Make methods const and inline

* Address PR comments: Expose GenerateUniqueId function and use const ref instead of passing wstring by value

* Address PR comment: Use lamdba as callback

* Address PR comment: Move GenerateUniqueId to ZoneWindowUtils namespace

* Address PR comment: Use regular comparison instead of std::wstring::compare

* Address PR comment: Use std::wstring_view for tmp file paths

* Address PR comment: Use scoped lock when accessing member data

* Address PR comment: Remove typedefs to increase code readability

* Address PR comment: removed nullptr checks with corresponding tests

* Address PR comment: Move ZoneSet object instead of copying

* Address PR comment: Make FancyZonesData instance const where possible

* Remove unnecessary gutter variable during calculating zone coordinates

* Remove uneeded subclass

* Avoid unnecessary copying and reserve space for vector if possible

* Save FancyZones data after exiting editor

* App zone history (#18)

* added window and zone set ids to app zone history

* Rename JSON file

* Remove AppZoneHistory migration

* Move parsing of ZoneWindow independent temp files outside of it

* Unit tests update (#19)

* check device existence in map
* updated ZoneSet tests
* updated JsonHelpers tests

* Use single zone count information

* Remove uneeded tests

* Remove one more test

* Remove uneeded line

* Address PR comments - Missing whitespace

* Update zoneset data for new virtual desktops (#21)

* update active zone set with actual data

* Introduce Blank zone set (used to indicate that no layout applied yet). Move parsing completely outside of ZoneWindow.

* Fix unit tests to match modifications in implementation

* Fix applying layouts on startup (second monitor)

Co-authored-by: vldmr11080 <57061786+vldmr11080@users.noreply.github.com>
Co-authored-by: Seraphima <zykovas91@gmail.com>
2020-02-10 14:59:51 +01:00
Bartosz Sosnowski 0fdc1d0a1f
ShortcutGuide, FancyZones: split window filtering (#1225)
Splits the code use to filter windows for FancyZones and the
"active window" for the ShortcutGuide. The FancyZones logic is preserved
and merged into a single function. We keep it in common.h, as it might
be also used in other PowerToys, like maximized to new desktop. We do
however change the return type to be more descriptive. It also returns
a separate flag for if the window has a visible owner. This can be used
to implement the approved apps list.

For the ShortcutGuide, the logic is relaxed to include more windows. One
example are Explorer properties windows. Those are (and should) filtered
by the FancyZones, but should appear in the window preview in the SCG.

The new return type also includes information if the window will react
to the default Windows Snap. This is not ideal though. Currently, SCG
can only disable the entire "Windows Controls" group. OTOH windows like
"Save As..." dialogs can be snapped to corners etc., but cannot be
minimized nor maximized. Until SCG can separately disable those buttons
we will display the buttons in the enabled state only if the window
supports all settings. In the future, we should integrate FancyZones
snap override here too.
2020-02-07 15:53:57 +01:00
Andrey Nekrasov f963d28ba8
MSIX: keep PowerRename local COM server in memory (#1222) 2020-02-07 14:21:10 +03:00
Bartosz Sosnowski 09d1af9c46
Common: remove hwnd_data_cache (#1223)
The cache was introduced to improve performance by not querying the
OS for the window process path every time we need to check if the window
is interesting to FancyZones. Since then other changes were made to the
the way we check the windows. Right now, the IsInterestingWindow function is
called when:

  1) WinKey + arrows are used
  2) window is started to be dragged
  3) window is created

1) and 2) are initiated by the user, happen only once per interaction so
their performance impact can be dismissed. The 3) happens all the time
but for the most part the check for WS_CHILD or
GetAncestor(window, GA_ROOT) == window will filter those out. In the
end, only top-level windows will be queried for their path.

Removing the cache improves code readability and will make code
maintenance easier.
2020-02-06 18:04:10 +01:00
Bartosz Sosnowski 5d8e894802
FancyZones: if window is not interesting, allow Windows snap (#1186)
Do not swallow WinKey+Arrow events for non-interesting windows. This makes apps that are in the "excluded apps" list behave as if "Override windows snap keys" is disabled - they will react to the Windows default snap.
2020-02-06 13:12:59 +01:00
Bartosz Sosnowski 0ecfbfad53
FancyZones: filter out WM_POPUP windows if they dont have maximize/minimize button or a sizable frame (#1212)
This filters out TaskView and Win32 menus.
2020-02-05 12:31:35 +01:00
Bartosz Sosnowski ed35a143ec
FancyZones: allow windows with invisible or zero-sized owner to be zonable (#1216) 2020-02-05 12:27:51 +01:00
yuyoyuppe 5089729b18
MSIX: implement initial version of notifications library (#1178) 2020-02-04 19:41:00 +03:00
Bartosz Sosnowski 25e882eb78
Fancyzones: unify window filtering (#1184)
Makes FancyZone use the same code for filtering windows when windows are
being dragged and when moved by WinKey + arrows.
2020-02-03 09:32:38 +01:00
Betsegaw Tadele b4f81a0c2a
Import the source code for Window Walker (#1177)
Import the codebase for Window Walker 

- Not loaded into the module list 
- Not added it to the installer list.
2020-01-31 15:14:37 -08:00
yuyoyuppe aa714f7d80
Runner: fix startup task state setting for MSIX (#1181) 2020-01-31 20:35:21 +03:00