Commit Graph

40 Commits

Author SHA1 Message Date
Kevin Horecka
add63d2dde FancyZones: Added ability to use mouse only for interactions with zones (#729) 2019-12-06 12:32:43 +01:00
yuyoyuppe
7357e40d3f
Use WinRT JSON parser instead of custom cpprestsdk solution (#822) 2019-12-06 11:40:23 +03:00
vldmr11080
3a65d5ce23 Revert: Keep window in their zone after layout changes (#852) 2019-12-04 01:55:12 +01:00
vldmr11080
57845a2739 Don't flash current zone setup when focused window is in full screen (#796) 2019-11-30 14:38:27 +01:00
vldmr11080
9a8ab29330 Reverse logic for keep windows in their zones when fancyzone layout changes (#812) 2019-11-30 12:15:16 +01:00
Bartosz Sosnowski
ee1a1fd614
Prevent number being swallow while dragging. (#788) 2019-11-27 10:32:09 +01:00
Enrico Giordani
4be84e035f
revert overrideSnapHotkeys logic after regression (#756) 2019-11-22 10:56:11 +01:00
Bartosz Sosnowski
254474d12d Make the hotkey control display correct key
Credit to @doterik for the idea in https://github.com/microsoft/PowerToys/issues/700#issuecomment-554329895

RApplies to https://github.com/microsoft/PowerToys/issues/700
2019-11-20 10:00:53 +01:00
Bret
28d7835327
User/bretan/fz remove legacy editor (#1)
* Removed and runs
Still needs some extra cleanup and addressing open issues

* Removed and runs
Still needs some extra cleanup and addressing open issues

* Clean

* Update
2019-11-18 15:29:42 -08:00
Bartosz Sosnowski
03438f9192
FancyZones: improve windows and apps filtering (#673)
Unifies the way windows are considered "interesting" by FancyZone.
Berfore the change WinKey + arrows would use different method than
dragging. This PR makes both use the WinKey + arrows method.

Cleans up FancyZones Settings.cpp by removing m_configStrings variable.
Contrary to its name it was used to create color picker control.

Adds a multiline option to the text input to settings. Uses this to
provide the user with a way to exclude certain apps from snapping to
zones.
2019-11-18 10:29:56 +01:00
yuyoyuppe
e8edbd5394
clear FancyZones::m_zoneWindowMap on Destroy, since it stores 'this', causing a leak (#664) 2019-11-07 22:05:12 +03:00
yuyoyuppe
f3e25ae3e6
Fix for different per-monitor scaling (#657)
* Use DPIAware::DEFAULT_DPI

* Make runner DPI-unaware, since it doesn't need to use a Per Monitor V2 DPI.

* Programmatically enable "Per Monitor V2 DPI" for the runner proccess and use a separate DPI-unaware thread for the corresponding API calls

* Increase PCH memory limit for settings project

* Address review issues

* Draw zoneWindows properly scaled
2019-11-07 21:56:32 +03:00
yuyoyuppe
a9518c2e55 Wrap around colorIndex in a colors array (#669) 2019-11-07 17:50:04 +01:00
Enrico Giordani
dc34379344 Fix telemetry event names
add setting changed event for ShortcutGuide
2019-10-28 19:07:32 +01:00
Bartosz Sosnowski
8f8f4506ff
Make sure m_callback is not null before using it (#541) 2019-10-23 18:42:40 +02:00
Bartosz Sosnowski
e4c7ed9c3e fixup: move the test to IsWindowVisible 2019-10-22 09:46:15 +02:00
Bartosz Sosnowski
b17106e88d Don't zone hidden windows 2019-10-22 09:46:15 +02:00
Enrico Giordani
a07a42624b
Telemetry events
* Don't trace event on exit
change 'PowertoyModuleDeleter' to not call 'module->disable();' before 'module->destroy();' so the module can distinguish between being turned off and PowerToys exiting.
Code formatting.

* uppercase for event name

* Trace on/off event for ShortcutGuide module

* Trace the 'hide' event only if the guide was visible
'on_hide()' is invoked when the module is turned off, in that case don't trace the hide event.

* Remove spaces in data field names
Remove 'ShowGuide' event since it's not providing any useful data.

* Include build number in version number
2019-10-22 08:11:23 +02:00
Bret
6d3ce4e3cd
Merge pull request #504 from TheMrJukes/master
Fix rcNormalPosition in SetWindowPlacement
2019-10-16 09:54:08 -07:00
Bartosz Sosnowski
41842048a3 Save the zone when window is moved by hotkeys 2019-10-16 10:23:22 +02:00
Bret Anderson
03cb04823c Fix rcNormalPosition in SetWindowPlacement 2019-10-14 12:17:55 -07:00
Enrico Giordani
f9be71eca5
Add version number to telemetry event
use defines from version.h in .rc files and other places.
2019-10-14 19:22:14 +02:00
Bartosz Sosnowski
5f8c4ea143
Improve window filter to include start menu and Cortana search box. (#474)
Also moves GetProcessPath* functions to common, renaming both to
get_process_path.
2019-10-07 11:12:44 +02:00
Bartosz Sosnowski
64f606daaa
Add a hotkey settings control and use it in FancyZones (#450)
Add a hotkey settings control and use it in FancyZones
2019-10-02 17:18:55 +02:00
cedi
faf1fae873 Modifying the startup behaviour of the FancyZones Layout Editor
Add setting to allow to choose if the FZ editor opens in the screen where mouse cursor is or where the active windows is.
2019-09-28 16:29:29 +02:00
ebbyd3
a8f0d3298f Fixed some minor code styling issues. Removed some minor redundant calculations for a small performance enhancement with zone detection. 2019-09-26 23:23:09 +02:00
ebbyd3
af67f7782c Added more in-depth check for zone determination when dragging around
the screen. Previously, it would iterate through the zones in the order
they were added and find the first one that fit the description. While
this works in most cases, if a user wants to have overlapping zones, it
is better to iterate through all of them and find the zone that the user
expects. There are cases where a zone is completely inaccessible on drag
because of the current code. To resolve this, the zone search will look
for the smallest zone possible. The reason I chose this solution is
because this guarantees that zones are at least reachable since if a
zone was bigger than another zone, then there must be a part of it
that is exposed, therefore reachable itself. Note: this solution is for
the scenario between two zones. More than that is not guaranteed. But I
feel like this covers enough scenarios to warrant its addition.

Example:
  ----------------
  - Zone1        -
  -  ----------  -
  -  - Zone2  -  -
  -  -        -  -
  -  ----------  -
  ----------------

Previously, zone2 was inaccessible since it would iterate through 1 then
2. But 1 would always be seen first when dragging a window. With this
fix it zone2 will be accessible.
2019-09-26 23:23:09 +02:00
Bartosz Sosnowski
0b86941a3b Make FancyZone distinguish different modern apps. 2019-09-26 08:54:00 +02:00
Bartosz Sosnowski
b85f722e09 When moving window to a zone, ensure it does not remain in maximized state. 2019-09-18 10:41:51 +02:00
Bartosz Sosnowski
1a400bd7fd Filter windows moved by keyboard in FancyZones 2019-09-18 10:41:16 +02:00
Bret
a54e4299aa
Merge pull request #391 from microsoft/user/bretan/fz-multimon
Fix for #195 - Fancy Zones new editor needs to support multiple monitors
Fix for #292 - Zone Editor opens behind PowerToys Window
2019-09-17 17:58:53 -07:00
Bret Anderson
2c3c4e7519 Need to adjust x/y by scaled diff between monitor and work area rect 2019-09-16 12:48:55 -07:00
Bret Anderson
c0cdf7aaa6 Everything is working. 2019-09-15 13:34:00 -07:00
Enrico Giordani
8221f5e641
activate zones for windows with custom titlebar
fixes https://github.com/microsoft/PowerToys/issues/209
2019-09-11 21:12:39 +02:00
Enrico Giordani
1430332b98
default 'flashZones' to false 2019-09-11 21:11:55 +02:00
Bartosz Sosnowski
8ac6db8b5a
Fix cppcheck reported issues (#333)
Fixes: https://github.com/microsoft/PowerToys/issues/266
2019-09-11 12:38:20 +02:00
Bret Anderson
d4c8c84445 Pass DPI through to editor. It is more reliable. 2019-09-08 23:53:30 -07:00
Bret Anderson
3836aaa9d1 Almost working. Doesn't apply on my small monitor running at 150% scaling. 2019-09-08 14:54:44 -07:00
Bret Anderson
e562b29ecd Editor should come up on the monitor with the foreground window. Defaults to primary monitor if there is no foreground window. 2019-09-08 01:47:12 -07:00
Bartosz Sosnowski
8431b80e48 FancyZones and Shortcut Guide initial commit
Co-authored-by: Alexis Campailla <alexis@janeasystems.com>
Co-authored-by: Bret Anderson <bretan@microsoft.com>
Co-authored-by: Enrico Giordani <enrico.giordani@gmail.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Jeff Bogdan <jeffbog@microsoft.com>
Co-authored-by: March Rogers <marchr@microsoft.com>
Co-authored-by: Mike Harsh <mharsh@microsoft.com>
Co-authored-by: Nachum Bundak <Nachum.Bundak@microsoft.com>
Co-authored-by: Oliver Jones <ojones@microsoft.com>
Co-authored-by: Patrick Little <plittle@microsoft.com>
2019-09-05 18:12:40 +02:00